feat(management): store readiness — MCP fields, inventory edit form, add item modal #29

Open
yuris wants to merge 3 commits from feat/management-store-readiness into main
Owner

Makes the management app fully capable of managing store catalog items from the UI and MCP. Three independent changes landed on one branch.

Changes

#26 — MCP create_inventory_item + update_inventory_item

  • Added slug, description, images, is_published to both tool schemas.
  • Guard: is_published: true without a slug returns a clear error before touching the DB (respects the inventory_published_slug_check DB constraint).
  • update_inventory_item pre-fetches the existing slug from the DB before validating the publish guard.

#27 — "Toko" tab in inventory details sheet

  • New inventory-edit-form.tsx: fields for slug, description, image URLs (dynamic list with add/remove), and publish toggle (disabled when slug is empty).
  • Third tab added to inventory-details-sheet.tsx; existing Detail and Riwayat tabs untouched.
  • Submit calls updateInventory server action; success toasts + refreshes; error toasts.

#28 — Add inventory item modal

  • New add-inventory-modal.tsx: all fields (name, type, prices, initial stock, slug, description, images, publish toggle).
  • Mounted in stok/page.tsx alongside the existing AdjustmentModal.
  • Duplicate-name error from the server action surfaces as a toast.

Verification

  • tsc --noEmit (management): exit 0 on each branch + integrated branch.
  • Both changed files pass biome on each worker branch (39 pre-existing errors in untouched generated components — separate cleanup issue).
  • pnpm --filter garage build (production Next.js build): exit 0, 11/11 pages.
  • Zero-conflict cherry-pick (no file overlap between the three branches).

Closes #26
Closes #27
Closes #28

Makes the management app fully capable of managing store catalog items from the UI and MCP. Three independent changes landed on one branch. ## Changes ### #26 — MCP `create_inventory_item` + `update_inventory_item` - Added `slug`, `description`, `images`, `is_published` to both tool schemas. - Guard: `is_published: true` without a slug returns a clear error before touching the DB (respects the `inventory_published_slug_check` DB constraint). - `update_inventory_item` pre-fetches the existing slug from the DB before validating the publish guard. ### #27 — "Toko" tab in inventory details sheet - New `inventory-edit-form.tsx`: fields for slug, description, image URLs (dynamic list with add/remove), and publish toggle (disabled when slug is empty). - Third tab added to `inventory-details-sheet.tsx`; existing Detail and Riwayat tabs untouched. - Submit calls `updateInventory` server action; success toasts + refreshes; error toasts. ### #28 — Add inventory item modal - New `add-inventory-modal.tsx`: all fields (name, type, prices, initial stock, slug, description, images, publish toggle). - Mounted in `stok/page.tsx` alongside the existing `AdjustmentModal`. - Duplicate-name error from the server action surfaces as a toast. ## Verification - `tsc --noEmit` (management): exit 0 on each branch + integrated branch. - Both changed files pass biome on each worker branch (39 pre-existing errors in untouched generated components — separate cleanup issue). - `pnpm --filter garage build` (production Next.js build): exit 0, 11/11 pages. - Zero-conflict cherry-pick (no file overlap between the three branches). Closes #26 Closes #27 Closes #28
yuris changed title from Management: store readiness — MCP fields, edit form, add item modal to feat(management): store readiness — MCP fields, inventory edit form, add item modal 2026-07-25 14:52:33 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/management-store-readiness:feat/management-store-readiness
git switch feat/management-store-readiness

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff feat/management-store-readiness
git switch feat/management-store-readiness
git rebase main
git switch main
git merge --ff-only feat/management-store-readiness
git switch feat/management-store-readiness
git rebase main
git switch main
git merge --no-ff feat/management-store-readiness
git switch main
git merge --squash feat/management-store-readiness
git switch main
git merge --ff-only feat/management-store-readiness
git switch main
git merge feat/management-store-readiness
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
yuris/garage!29
No description provided.