Commit Graph

655 Commits

Author SHA1 Message Date
BenClaw c48f4d9041 fix(action_cable): allow employee to subscribe to supplier channel
- Employee authenticates via auth_token, acts on behalf of a Supplier
- Connection now accepts ?supplier_id=ID query param
- identified_by :current_supplier_id added
- MozoChannel#authorized? allows :employee to subscribe to supplier_<id>
  when current_supplier_id matches
2026-05-17 21:08:38 +02:00
BenClaw 02df03282e Revert "fix(broadcasting): broadcast on mark_helped! even when already false"
This reverts commit 4ad701c1a5.
2026-05-17 20:12:22 +02:00
BenClaw 4ad701c1a5 fix(broadcasting): broadcast on mark_helped! even when already false
- mark_helped! gated broadcast on if save, but save returns false
  when needs_help is already false (no dirty attributes in CouchDB)
- Same fix applied to remove_needs_payment!
- Broadcast is the important side effect — save is just persistence
2026-05-17 19:48:19 +02:00
BenClaw ee8861355b fix(action_cable): add missing ApplicationCable::Channel base class
- MozoChannel < ApplicationCable::Channel was failing with
  NameError: uninitialized constant ApplicationCable::Channel
- Standard Rails convention requires both connection.rb and channel.rb
2026-05-17 19:06:00 +02:00
BenClaw a755d8a205 refactor(broadcasting): add Broadcastable to List + Order, remove monkey-patch
- include Broadcastable in app/models/list.rb
- include Broadcastable in app/models/order.rb
- Remove config/initializers/model_broadcast.rb (ApplicationController.new anti-pattern)
- Broadcasting now goes through Mozo.broadcast_* directly, not via controller hack
2026-05-17 16:36:28 +02:00
root 1f52448253 feat(broadcasting): add ActionCable adapter + fix model broadcast anti-pattern
- Add Mozo::Broadcaster::ActionCable as drop-in Faye replacement
- Fix model_broadcast.rb: delegate to Mozo directly instead of
  ApplicationController.new (memory-unsafe anti-pattern)
- Add Broadcastable concern for clean model-side broadcasting
- ActionCable config: async adapter, cable.yml, WebSocket endpoint
- MozoChannel with per-entity authorization (user/supplier/employee)
- Connection auth via auth_token (matches existing auth pattern)
- Mount /cable WebSocket in routes
- Add broadcasting-migration.md with Faye→ActionCable guide
2026-05-17 15:25:49 +02:00
bterkuile 7364de2a45 transit 2026-03-28 18:23:35 -05:00
bterkuile 4e1d3bd052 Add spanish locales and gravatar options 2026-03-09 11:17:25 -05:00
bterkuile e624ec2d0b User flow updates 2026-02-10 11:38:56 -05:00
bterkuile 63b19cb78a Infrastructure and add removeListNeedsHelp to users 2026-02-09 17:56:05 -05:00
bterkuile be3ee9096b stash apply 2026-02-09 12:52:31 -05:00
bterkuile a1c1a0c34e yodate 2026-02-08 20:00:34 -05:00
bterkuile f0c561311f progress today, clicking and fixing 2026-02-04 15:09:46 -05:00
bterkuile a72559666d Better list users frontend connection and setup of payment page 2025-12-07 16:57:33 -05:00
bterkuile 63d334eb48 work movement to other machine 2025-11-23 10:05:12 -05:00
bterkuile f76ff718a0 updates 2025-11-02 19:50:08 -05:00
bterkuile 7dadb28004 make more specs work 2025-09-23 17:45:00 -05:00
bterkuile 6a100555bc Make the products controller specs green 2025-09-23 12:15:09 -05:00
bterkuile 54f86078f5 More accessible, still not good environment based settings 2025-09-20 18:06:18 -05:00
bterkuile 0e051b1f93 rename qwaiter to mozo 2025-09-20 17:35:58 -05:00
bterkuile ea56d33472 Make sorting and attachments work 2025-09-02 13:33:48 -05:00
bterkuile 4a50b54ca5 small things 2025-08-30 10:12:27 -05:00
bterkuile 6b02c05a99 Make work on Fedora M1 and use faye on http for development 2025-08-29 13:54:43 -05:00
bterkuile 7efb2a3aa5 Cleanup unused file 2025-02-13 11:51:13 -05:00
bterkuile 326af55c5c Do not build user css 2025-02-10 11:05:16 -05:00
bterkuile 58178cc66d Changes for Fedora ruby 3.4 and rails 8 2025-02-10 10:39:21 -05:00
bterkuile 8b0ddff515 Fixes and add label to tables 2022-04-16 15:21:07 -05:00
bterkuile 0e917ccdb4 New versions 2022-01-27 09:32:01 -05:00
bterkuile cf7f5d0f16 updates for new development env 2021-04-30 15:22:16 -05:00
Benjamin 714ce8f8c6 some updates 2021-04-21 17:22:56 -05:00
Benjamin 46fc427694 updates 2021-04-19 15:14:37 -05:00
bterkuile 2e3daf1e9c changes 2020-03-19 12:50:02 -05:00
bterkuile e8410b64e7 updates 2020-03-12 10:54:58 -05:00
bterkuile 68f7d4dd54 cleanup switch_to supplier and make facebook image https 2020-03-07 11:11:06 -05:00
bterkuile eda3fc280b Mostly enriching supplier's user info with number of lists finished at the restaurant 2020-03-06 19:27:44 -05:00
bterkuile f1ef618dae updates based on F5 testing 2020-03-06 08:35:12 -05:00
bterkuile 8288595b3f Force set omniauth full_host for redirection 2020-03-05 19:18:44 -05:00
bterkuile cf464aed8d deploy upgrades 2020-03-05 18:12:59 -05:00
bterkuile b170521619 changes 2020-03-05 17:53:35 -05:00
bterkuile aac62f8e55 cleanup 2020-03-05 15:43:52 -05:00
bterkuile 840bac4d54 infra updates 2020-03-05 11:36:49 -05:00
bterkuile aec5364f2e Infrastructure connection updates 2020-03-04 19:52:28 -05:00
bterkuile 51748d5783 Move supplier full pull to being an api for the ember app and handle login and authorization a little bit better (should be even a lot better in the future) 2020-03-03 17:11:57 -05:00
bterkuile a7e771557d Fix hash return for image attributes 2020-03-02 14:12:56 -05:00
bterkuile ebcfaadfde Fix product images 2020-03-02 10:39:44 -05:00
bterkuile 2a5f7e6b03 do param slice for supplier products params 2020-03-01 18:05:21 -05:00
bterkuile 73c207c324 many important fixes 2020-02-29 11:43:00 -05:00
bterkuile 2149345d3d supplier client sections working with problematic authentication still active 2020-02-27 15:44:43 -05:00
bterkuile 9e86b18c3e work with current supplier backend 2020-02-26 14:24:32 -05:00
bterkuile 8740300b9a work off today 2020-02-25 11:09:27 -05:00