21 Commits

Author SHA1 Message Date
kae_mihara
219d308d1a
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-05 07:54:19 +09:00
kae_mihara
48ec6ffc18
Merge branch 'main' into feat/a-better-product-table 2026-07-05 07:47:38 +09:00
kae
cf94cb3b88 feat: improve product yarn ratio workflow 2026-07-05 07:33:09 +09:00
kae
6e3ee00a6a feat: support product batch inventory UI 2026-07-04 18:38:50 +09:00
Chenwei Jiang
e23f94d105 Merge branch 'feat/production-plan-collaboration' into 'main'
feat: add production management frontend with CI/CD pipeline

See merge request kihaneseifu/muyu-portal!1
2026-07-04 02:29:22 +00:00
Chenwei Jiang
b66d113ef8 feat: add production management frontend with CI/CD pipeline 2026-07-04 02:29:21 +00:00
kae
0eef618bc1 feat: complete purchase order and stock management UI
Changes from fix-muyu-portal branch:

Frontend (muyu-portal):
- Add create purchase order page with form and route
- Implement create/edit modals for stock check (盘点) and stock adjust (调整)
- Add detail pages for stock checks and adjusts
- Fix supplier modal submit flow (field mapping and reset on close)
- Add regression tests for GROUP_CONCAT NULL bug and reload path behavior
2026-06-18 19:42:24 +09:00
kae
7545799fdc feat: add detail pages for stock checks and adjusts
Both list pages had 查看 links with no onClick. Added detail pages showing
header info and line items, with action buttons (确认开始盘点 / 审核通过+驳回).

Also: extended StockCheck/StockAdjust types to include details and extra
fields; added /inventory/checks/:id and /inventory/adjusts/:id routes;
moved columns definitions inside components (module-level columns with
history.push were silently ignored by the browser due to MFSU caching);
switched to Link component for SPA navigation.
2026-06-18 19:20:49 +09:00
kae
c08a9a4854 feat: implement create stock check and adjust modals
Both pages had toolbar buttons with no onClick handler. Added modal forms:
- Checks: date + checker + optional detail rows (product + actual qty)
- Adjusts: date + reason + required detail rows (product + adjust qty, negative to decrease)

Also updated createStockCheck and createStockAdjust API function signatures
from Partial<StockCheck/Adjust> to explicit typed request shapes.

Fixed a go-zero validation bug: non-optional fields (checker, adjustReason)
must be present in the JSON body; antd Form returns undefined for untouched
inputs which JSON.stringify omits, causing 400. Solved by setting default
empty strings in Form initialValues.
2026-06-18 18:33:57 +09:00
kae
5c903d7abc feat: add create purchase order page and route
The "创建采购订单" button navigated to /purchase/orders/new which matched
the /:id detail route with id="new", causing the detail page to request a
non-existent order and render blank.

Added a dedicated new.tsx form page (supplier select, date, dynamic detail
rows with product autocomplete and computed line totals) and registered
/purchase/orders/new in .umirc.ts before the /:id route so it takes
precedence.
2026-06-18 18:25:00 +09:00
kae
391ea29f1a fix: repair supplier modal submit flow
destroyOnClose unmounts the Form on close, disconnecting the useForm
instance so validateFields throws on reopen. Replaced with afterOpenChange
to reset fields without unmounting.

Also moved setModalOpen(false) and reload() before message.success so that
antd v5's static message API throwing outside an <App> context no longer
prevents the modal from closing after a successful create or update.
2026-06-18 18:24:51 +09:00
kae
a713f944b6 update tests 2026-06-18 17:37:11 +09:00
kae
0db2be28d8 test(products): add regression tests for GROUP_CONCAT NULL bug and reload path
- 'renders summary table without crash when product has empty colors and locations':
  mocks getProductSummary returning a product with colors/locations='', verifying the
  page does not crash and calls the API (reproduces the previously-broken scenario).

- 'closes dialog after successful product creation (reload branch reached)':
  verifies that a successful form submission calls createProduct and the ModalForm
  closes, confirming onFinish returned true — the same code branch that triggers
  summaryRef.reload().
2026-06-16 03:30:47 +09:00
kae
70532dda3a add tests 2026-06-15 19:47:45 +09:00
kae
4ba4dc98bf update ourchase 2026-05-24 20:05:28 +09:00
kae
4626bf2771 update api 2026-05-22 18:59:15 +09:00
Chever John
8096f4a848 first init 2026-04-20 01:58:36 +00:00
Chenwei Jiang
4aba6541f3 Merge pull request 'feat: 多租户 CRM Portal + 供应商客户视图 + Terminal 风格关系图' (#1) from feat/multitenant-crm into main
Reviewed-on: https://forgejo.cheverjohn.me/Business/muyuqingfeng-portal/pulls/1
2026-03-30 21:02:14 +08:00
Chever John
f61e216c43 feat: multi-tenant CRM portal with tenant login, supplier/customer views, and graph visualization
- Login page: tenantId mandatory, ruby logo (木羽清風), brand rename to 木羽清風
- Tenant session: localStorage tenantId + X-Tenant-Id header on all requests
- CRM Relations page: "我的供应商" / "我的客户" tabs with Chinese relation type mapping
- CRM Graph page: Terminal CLI aesthetic force-directed supply chain visualization (admin only)
- Menu filtering: empty menuPaths hides all menus (security fix)
- Error handler: 403 no longer triggers logout (security fix)
- API layer: added CRM endpoints (upstream/downstream/relations/history/full graph)
- Route config: added /crm/relations and /crm/graph routes
- app.ts renamed to app.tsx for JSX support in layout config

Made-with: Cursor
2026-03-30 02:56:16 +00:00
Chever John
68fc27a5fd
chore: update .gitignore with Node/macOS/VSCode template
- Replace hand-written gitignore with comprehensive generator template
- Add .umi/ and .umi-production/ to custom rules

Made-with: Cursor
2026-02-28 15:41:20 +08:00
Chever John
0437aa04ed
feat: initial commit for muyu-portal
Umi-based frontend portal with TypeScript config.

Made-with: Cursor
2026-02-28 15:29:12 +08:00