Admin restaurant apis - #21
Conversation
…e image Deployed builds rendered raw i18n keys (`admin.categories.map.open`) beside strings that translated fine. The file on the server was correct — the browser was reusing an old copy of it. nginx set no Cache-Control at all, so browsers fell back to guessing a lifetime from Last-Modified. Angular fingerprints its JS/CSS, so those always refreshed; `i18n/vi.json` is fetched from a fixed path, so a stale copy could sit in the cache for hours. New code, previous deploy's strings. index.html had the same exposure, which pins the whole app to an older bundle. Caching is now stated rather than guessed: fingerprinted JS/CSS immutable for a year, index.html and /i18n/ revalidated on every request (the ETag makes that a 304 with no body), other unhashed assets a day. Also repairs the deploy path for the required API_BASE_URL introduced in the previous commit. `.dockerignore` did not exclude `.env`, so an image would either bake real config into a layer or — with no file in the CI context — fail the build. `.env` is now out of the build context and the values arrive as build args, which `generate-env.mjs` already prefers over any file. They are set only in the discarded builder stage, so they do not reach the final image's metadata. Verified against a real image: nginx config passes `nginx -t`; a build without API_BASE_URL fails with the fix in the message; a build with args bakes the values into the bundle, serves the intended Cache-Control per path, and leaks nothing into `docker history`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Restaurant onboarding (M2, /profile), spec-driven under
specs/001-restaurant-onboarding:
- self-service business-profile page: name/address/contact/receiving-window
form with cross-field window validation, approval-status gate, save toasts
- lazy /profile route (restaurant-gated), storefront nav item, wired user menu
Admin > Restaurants -- surface RestaurantCredit endpoints that had no UI:
- credit statements list + monthly statement generation + PDF download
- credit transactions ledger
Admin > Categories:
- status (active/inactive) filter and a shared "clear all filters" button on
the config-driven CRUD screen
Backend rejection surfacing:
- shared apiErrorMessage now reads the reason from BOTH the typed ApiError
subclasses (401/403/5xx) and the generated ResponseError (4xx); wired into
the admin CRUD screen and the restaurant profile form so permission/
validation/conflict reasons show in the toast instead of a generic message
Contract:
- add PATCH /categories/{id}/activate to the generated client and use it for
category reactivate (replacing the ignored PUT+isActive workaround); refresh
the openapi.json snapshot
- fix stale ignore paths (src/api -> src/contract) in .prettierignore and
eslint.config.js so the generated client/spec are excluded as intended
Verified: lint, prettier, 53 unit tests, production build all green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Align admin lists with the Fuse inventory pattern, move market-agent assignment onto markets, and wire restaurant approve/suspend/credit actions into the restaurants detail flow. Ignore the local Fuse demo folder. Co-authored-by: Cursor <cursoragent@cursor.com>
Code Review Could Not Complete
|
| Options | Enabled |
|---|---|
| Bug | ✅ |
| Performance | ✅ |
| Security | ✅ |
| Business Logic | ✅ |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (78)
📝 WalkthroughWalkthroughA restaurant self-service profile flow, expanded admin management screens, centralized API error localization, responsive layout updates, and Docker/nginx configuration changes were added. New specifications, translations, validators, services, routes, and UI workflows accompany the changes. ChangesRestaurant onboarding
Admin workspace
Platform and delivery
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Trivy (0.72.0)Trivy execution failed: 2026-07-24T00:14:20Z FATAL Fatal error run error: fs scan error: scan error: scan failed: failed analysis: post analysis error: post analysis error: helm scan error: fs filter error: fs filter error: walk error range error: stat .coderabbit-oasdiff.yaml: no such file or directory: range error: stat .coderabbit-oasdiff.yaml: no such file or directory Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
New Features
Bug Fixes