minipower-frontend-crud-react-dialog
Mẫu CRUD theo dialog của kit @platform/core — một {Feature}ListPage duy nhất, tạo/sửa/xem trong FeatureDialog dùng chung một instance react-hook-form (reset mỗi lần mở), xoá qua ConfirmDialog, chỉ một route. Dùng khi danh mục ít trường, thao tác nhanh, không cần URL riêng cho từng bản ghi.
- License 许可
- MIT
- 最近更新
- 2026-11-09
- Stars
- ★ 7
- Forks
- 0
01 前言 Front Matter
- name
- minipower-frontend-crud-react-dialog
- description
- Mẫu CRUD theo dialog của kit @platform/core — một {Feature}ListPage duy nhất, tạo/sửa/xem trong FeatureDialog dùng chung một instance react-hook-form (reset mỗi lần mở), xoá qua ConfirmDialog, chỉ một route. Dùng khi danh mục ít trường, thao tác nhanh, không cần URL riêng cho từng bản ghi.
03 SKILL.md 正文
Mẫu theo dialog — một màn danh sách
Copy
| Template | Đích |
|---|---|
| ../../templates/shared/components/ | src/features/{feature}/components/ |
| ../../templates/dialog/pages/{Feature}List/ | pages/{Feature}List/ |
Rút gọn theo mẫu này:
routes/paths.tschỉ giữlist(+get{Feature}ListPath); bỏcreate/detail/edit.- Barrel feature bỏ
{Feature}FormPage·{Feature}DetailPagevà cácget{Feature}*Pathđã bỏ. - Host chỉ một route:
<Route path={{FEATURE}_ROUTES.list} element={<{Feature}ListPage />} />— không wrapperuseParams.
Một form, ba trạng thái dialog
dialogMode: null | 'create' | 'edit' | 'view'
openCreate() → reset({feature}FormDefaultValues) → 'create'
openEdit(x) → reset(to{Feature}FormValues(x)) → 'edit'
openView(x) → (không đụng form) → 'view' FeatureDialog không onSubmit ⇒ chỉ nút đóng
onSave = handleSubmit(data ⇒ handleAction(create | update) ⇒ onSuccess: đóng dialog + reload)
FeatureDialog có onSubmit thì tự bọc <form> + nút Lưu / Hủy; submitting={isSubmitting} khoá nút khi đang gửi.
Khi nào chuyển sang mẫu route
Dialog bắt đầu cuộn dài, cần tab, cần dán link một bản ghi cho người khác, hoặc có resource con ⇒ chuyển route-pages: giữ {Feature}Table · {Feature}Form · services, chỉ thay page.
Validate
Chạy npm run dev: /{features} → Thêm mới mở dialog → submit trống hiện lỗi → nhập đủ, lưu → dialog đóng, danh sách có bản ghi mới → menu dòng Chỉnh sửa mở dialog có dữ liệu cũ → Xoá qua hộp xác nhận.
04 同仓库更多 Skills
minipower-vcs-gitlab
Tra GitLab (search, issue, pipeline, MR), soạn MR/comment, tạo MR và commit/push sau L2. Dùng khi merge request, GitLab MCP, code_provider gitlab — không scaffold .NET, không force-push.
minipower-toolbox-skill-author
Viết và soát skill lá-rời Minipower (minipower-{module}-{capability}) — chọn module bằng 3 câu hỏi ADR-022, dựng cây SKILL.md/README.md/workflows/providers, đặt description kích hoạt được, cập nhật hub và test canh. Hỏi người xác nhận trước mọi quyết định, không tự chốt. Dùng khi tạo skill mới, thêm provider/pattern/workflow, mở module mới, hoặc soát skill có sẵn lệch chuẩn.
minipower-tasks-lark
Đọc, lọc, tìm, soạn nháp và ghi task Lark (tasklist / task) theo L1–L3. Dùng khi việc trên Lark, sprint, tasklist, "tìm task", "tạo task", tasks_provider lark — không dùng cho tin nhắn nhóm hay wiki.
minipower-support-registry
Rà registry DOC theo project_mode, nhắc owner thiếu ID hoặc chỗ lưu sai. Dùng khi doc-registry, thiếu DOC, rà soát tiêu chuẩn — không tự sửa FR, không init.
minipower-support-publish
暂无简介
minipower-router
Phân loại intent Minipower rồi gợi ý đúng một pack nghề hoặc kênh. Dùng khi làm gì tiếp, chọn skill, dispatcher, không biết mở pack nào — không tự gọi MCP L3, không spawn agent.