xforge · tài liệu FE

FE: module customer_type — loại khách #

Phần chung (khởi tạo client, lỗi, danh sách, ngôn ngữ) ở tài liệu FE của Core: docs/fe/common.md (bản đọc: xforge-documentation, ADR-0102 của xforge-core). Sửa file này CÙNG PR khi đổi hành vi FE thấy được của module.

Chỉ có ở CMS (XforgeClient). Menu: key customer_type.customer_types (quyền customer_type.read).

Loại khách #

Bộ route CRUD chuẩn (listCustomerTypes, getCustomerType, createCustomerType, updateCustomerType, replaceCustomerType, deleteCustomerType, restoreCustomerType, listCustomerTypeTrash, listCustomerTypeOptions): code duy nhất trong store (409 customer_type_code_exists), name, active, notes.

Gán loại cho khách #

Khách có TỐI ĐA một loại trong mỗi store.

Tắt hoặc xoá loại không bỏ loại của khách; giá theo loại khách (customer_type_price_rule) bỏ qua loại đang tắt / trong thùng rác. Gỡ khách khỏi store (unlinkCustomer của Core) hoặc xoá khách thì loại của khách ở store đó bị bỏ.

Màn hình dựng sẵn #

listMenu() → mục customer_type.customer_types có screen (type: "crud"): CMS chung vẽ được từ getMenuScreen({ params: { key: "customer_type.customer_types" } }) mà không cần code riêng (tài liệu FE của Core: cms.md §3.1). Có: danh sách, form tạo / sửa, xoá, thùng rác + khôi phục.

KHÔNG có: gán loại cho khách (listCustomerTypeMembers / setCustomerType) — màn tay.

Nguồn: xforge-modules: modules/marketing/customer_type/FE.md