Skip to content

feat(catalogs): catalog editor as a container of categories, products, hours and who serves it; catalogs assignable to stores - #128

Closed
roncodes wants to merge 16 commits into
release/v0.4.25from
feat/catalog-editor
Closed

roncodes wants to merge 16 commits into
release/v0.4.25from
feat/catalog-editor

Conversation

@roncodes

Copy link
Copy Markdown
Member

Summary

The catalog editor from design board 9b, and the "catalogs can be assigned to stores" release change. Stacked on #127; review the top commit.

  • Editor (catalogs.index.edit, full page, replaces the modal): header with the name, status select, counts and a hours/served-by summary, Duplicate and Delete. Four sections:
    • Categories and products: categories on the left (add inline, rename inline, move up/down, remove), the selected category's products in the middle with store price, variants and add-ons count, in-stock badge and remove; an in-place Add products picker over the store's products that hides what is already in the catalog, with search and multi-select; a health column (visible in app, out of stock, empty categories, hours).
    • Hours: the seven-day strip plus ScheduleManager on catalog-hour.
    • Served by: the stores and trucks that serve the catalog with their online dot; Manage opens a modal with two multi-selects.
    • Details: name, description, status.
    • Sticky save bar with "N products added · M removed · categories changed", Discard and Save; leaving with changes asks first.
  • Stores can serve catalogs: Store gains catalogAssignments() and catalogs() (morph, same pivot as trucks); PUT catalogs/{id}/subjects syncs stores and food_trucks; the catalog resource exposes hours and a subjects summary (type, name, online, plate, logo). CatalogController eager-loads categories, products, hours and assignments. Category order is persisted and categories are read in order.
  • List: the card title and the draft card's Continue setup open the editor; the create modal asks only for name, description and status and then opens the editor; the card shows who serves the catalog (or "Store only, no trucks").

Not here: per-catalog price override and availability (needs two columns on catalog_category_products, board 7), drag-and-drop reorder (up/down buttons for now), ember-ui HoursStrip extraction.

Related Issue

Storefront UX overhaul, design canvas boards 9a and 9b; release change "catalogs can be assigned to stores".

Type of Change

  • Feature
  • Refactor

Implementation Notes

Saving still goes through catalog.save(); CatalogObserver reads the embedded categories (now with order) exactly as before. Subject assignment is a separate endpoint so the save bar's dirty tracking stays about the catalog's own structure.

Validation

  • Tests — not run locally per the maintainer's request.
  • Lint / Build — not run locally (CI).
  • Manual validation — maintainer.
php -l on the four changed PHP files: no syntax errors

Documentation Impact

  • Documentation needed but not included

API Reference Impact

  • No API reference changes needed
  • Updated fleetbase/postman
  • API reference updates required but not included

API reference notes: internal console endpoint PUT storefront/int/v1/catalogs/{id}/subjects (body stores[], food_trucks[]); the internal catalog resource gains hours and subjects. Public v1 catalog responses are unchanged (Http::isInternalRequest() guards).

Documentation Notes

docs/storefront → catalogs: the editor, assigning catalogs to stores and trucks, hours. needs-docs for the series.

Risk

The edit modal is gone; anything linking to it now lands in the editor. Catalog categories are now ordered by order, which is 0 for pre-existing rows (stable within a catalog, ties keep DB order).

Screenshots / Recordings

Design canvas boards 9a and 9b: https://claude.ai/artifact/771ptEFmi4BLmYHBZuUhWF

The dummy app never ran: ember-classic-decorator (unused) crashes on Ember 5,
lazy loading kept the engine's modules out of the test bundle, and the host
services, config and intl data the panels need were missing. Mirrors what
fleetops already does: eager loading when `ember test` runs from this package,
an inert stand-in for the console's extensions module, the API config the
core adapter reads at module scope, and the legacy built-in components the
engine's templates still use.

The dummy intl service ignores missing locale data, since headless Chrome has
no number formats for every bundled locale, and the order details and network
controller tests stub the host router, fetch and app cache the way the widget
tests already do.
…rce card

Catalog, truck and network index pages use Layout::Resource::CardsGrid with
one card each on Layout::Resource::Card, following the Fleet-Ops anatomy:
identity and subtitle in the header, media or facts in the body, status,
icon actions and meta in the footer, with registry slots at each end.

A catalog card shows its categories with product counts, its hours as a
seven-day strip (the new Storefront::HoursStrip) and its product total; a
draft is dashed. A truck card is a Vehicle::Pill with the online dot, the
vehicle photo, where it serves, and a presence badge that says serving,
offline, inactive, or online with no catalog. A network card shows the logo on
its backdrop, the online state, the currency and member count.

"Food trucks" reads "Trucks" in the UI; the food-truck model, routes and
permissions keep their names. The catalogs and trucks pages gain the search
the header already offered.
@roncodes roncodes added needs-docs Requires documentation updates needs-api-spec Requires API specification updates needs-human-review Requires human review before proceeding type:feature Feature or enhancement labels Oct 10, 2026
@roncodes
roncodes force-pushed the feat/catalog-editor branch 2 times, most recently from 0a27297 to c430d19 Compare October 10, 2026 08:16
… and crashed createRecord; the store summary is store_summary
…s own sidebar for each

- storefront service tracks a network context derived from the network route
- StoreSelector becomes the context switcher with a Networks group and create-network
- application route loads networks; sidebar rewrites for the network context
- network page is a full page with an identity strip; the list hides while one is open
- new Trucks section for a network backed by FoodTruckFilter::network
- network orders and customers are scoped to the network being viewed, not the active store
- createNewNetwork lives on the storefront service
…enu without Networks

- trigger: context icon, name, STORE/NETWORK label and caret; blue for a store, indigo for a network; invitation badge
- menu: Stores and Networks groups with tiles, currency or member count, a check on the active one, readable in dark mode; footer actions read New store / New network
- store navigation follows the design order (Dashboard, Orders, Products, Catalogs, Customers, Trucks, Promotions, Settings); networks live in the switcher, not the menu
- network page loses the All networks button; leaving a network is the switcher's job
@roncodes
roncodes force-pushed the feat/catalog-editor branch from c430d19 to 3e1b027 Compare October 10, 2026 09:31
…e sidebar re-renders on a switch; networks report their store count
…d an invite panel

- network index is now an Overview (stat tiles, members with 7-day share, invitations, recent orders); settings move to networks.index.network.settings
- NetworkController gains overview, invitations, resend and revoke; one Invite per recipient carrying category, expiry, message and approval in meta
- OrderFilter/CustomerFilter gain a network filter on meta.storefront_network_id; the network orders and customers routes use it
- Storefront::Network::InvitePanel (by email, shareable link, add a store you manage) replaces the share-network and add-stores modals
- stores page: store identity column via a new store descriptor, All/Online/Offline/Invited tabs, bulk assign category and remove, invitation rows with resend/revoke/invite again
- store and network resource descriptors registered with the shared identity registry; SelectOption::Store wrapper; width-style helper
…ost re-export broke console boot before the lazy engine loaded
…ore stacks and next actions

- a multi-store checkout is one expandable row (customer, stores, fulfillment, total with tip split, shared driver, least-advanced status) that opens into each store's order
- status tabs (needs action, preparing, ready for pickup, out for delivery, completed, canceled) drive the status query param; grouped/flat toggle
- new cells: reference, stores (identity stack of store pills), fulfillment, total, driver (inline assign), status, placed, actions (next action promoted, rest behind an ellipsis)
- order index resource keeps meta.checkout_id so the console can group
…lide with the networks list's page, sort and query
…ive questions first

- header: id, status and store/network badges, the next workflow action promoted to a button, Edit, the rest behind a menu
- Storefront::Order::FlowSteps renders the activity flow as steps (custom order configs contribute their own)
- Storefront::Order::IdentityStrip: customer, driver with inline assign, fulfillment and timing, total with tip and promotion
- tabs: Items (with store block and the other orders of the checkout), Route (with tracking), Payment, Activity (with comments), Customer, Data (metadata and documents); registered tabs still appended
- panel widened to 600px
…out rules and a save bar

- settings shell: store identity header with copy-store-key, a section rail (General, Branding and media, Locations, Checkout rules, Payment gateways, Notification channels, Alerts, API keys); anchors on the General page, routes for the rest
- General page restructured into always-open sections: general, branding and media, checkout rules, alerts
- every rule the server honours is a Storefront::SettingRule row with its consequence written under it, detail inputs appear when it is on
- sticky save bar with unsaved-change count and the sections touched; Discard rolls back attributes, options and alerts
…f categories, products, hours and who serves it

- new full-page route catalogs.index.edit: categories on the left (add, rename, reorder, remove), the selected category's products in the middle with an in-place picker over the store's products that hides what is already in the catalog, health on the right; Hours (ScheduleManager), Served by (stores and trucks) and Details sections; sticky save bar with a summary of unsaved changes
- a store can now serve a catalog like a truck: Store gains catalog relations, PUT catalogs/{id}/subjects syncs stores and trucks, the catalog resource exposes hours and subjects
- category order persists; the catalog list opens the editor, the create modal only asks for name, description and status, and the card shows who serves the catalog
@roncodes
roncodes force-pushed the feat/catalog-editor branch from 3e1b027 to 5ab0bc3 Compare October 10, 2026 10:19
@roncodes

Copy link
Copy Markdown
Member Author

Superseded by the single overhaul PR (one branch, one PR targeting release/v0.4.25, per maintainer request).

@roncodes roncodes closed this Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-api-spec Requires API specification updates needs-docs Requires documentation updates needs-human-review Requires human review before proceeding type:feature Feature or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant