diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 0810454..09471cf 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -21,6 +21,9 @@ "preview": "Preview", "Total": "Total", "Action": "Action", + "Import": "Import", + "Export": "Export", + "Copy": "Copy", "Login": "Login", "Username": "Username", diff --git a/public/locales/en/products.json b/public/locales/en/products.json index 2076875..637b8f8 100644 --- a/public/locales/en/products.json +++ b/public/locales/en/products.json @@ -16,11 +16,27 @@ "Rejected": "Rejected", "Published": "Published" }, + "Status": "Status", + "Title": "Title", "Vendor": "Vendor", "AuState": "Audit State", "CreatedBy": "Created By", "CreateDate": "Create Date", "AuditedBy": "Audited By", - "AuditDate": "Audit Date" + "AuditDate": "Audit Date", + + "Quotation": "Quotation", + "Unit": "Unit", + "GroupSize": "Group Size", + "UseDates": "Use Dates", + "Weekdays": "Weekdays", + + "AgeType": { + "Type": "Age Type", + "Adult": "Adult", + "Child": "Child" + }, + + "#": "#" } diff --git a/public/locales/zh/common.json b/public/locales/zh/common.json index 4ef0694..2c54705 100644 --- a/public/locales/zh/common.json +++ b/public/locales/zh/common.json @@ -21,6 +21,9 @@ "preview": "预览", "Total": "总数", "Action": "操作", + "Import": "导入", + "Export": "导出", + "Copy": "复制", "Login": "登录", "Username": "账号", diff --git a/public/locales/zh/products.json b/public/locales/zh/products.json index 326bd78..8d5c4e9 100644 --- a/public/locales/zh/products.json +++ b/public/locales/zh/products.json @@ -16,11 +16,27 @@ "Rejected": "已拒绝", "Published": "已发布" }, + "Status": "状态", + "Title": "名称", "Vendor": "供应商", "AuState": "审核状态", "CreatedBy": "提交人员", "CreateDate": "提交时间", - "Auditors": "审核人员", - "AuditDate": "审核时间" + "AuditedBy": "审核人员", + "AuditDate": "审核时间", + + "Quotation": "报价", + "Unit": "单位", + "GroupSize": "人等", + "UseDates": "使用日期", + "Weekdays": "有效日", + + "AgeType": { + "Type": "人群", + "Adult": "成人", + "Child": "儿童" + }, + + "#": "#" } diff --git a/src/components/AuditStateSelector.jsx b/src/components/AuditStateSelector.jsx new file mode 100644 index 0000000..db4c77d --- /dev/null +++ b/src/components/AuditStateSelector.jsx @@ -0,0 +1,12 @@ +import { Select } from 'antd'; +import { useProductsAuditStates } from '@/hooks/useProductsSets'; + +const AuditStateSelector = ({ ...props }) => { + const states = useProductsAuditStates(); + return ( + <> + + + , fieldProps?.auditState?.col || 3 ), diff --git a/src/components/SecondHeaderWrapper.jsx b/src/components/SecondHeaderWrapper.jsx index 2b2ffca..097b0d4 100644 --- a/src/components/SecondHeaderWrapper.jsx +++ b/src/components/SecondHeaderWrapper.jsx @@ -14,7 +14,7 @@ const HeaderWrapper = ({ children, header, ...props }) => {
{/* {header} */} -
{header}
+
{header}
diff --git a/src/hooks/useProductsSets.js b/src/hooks/useProductsSets.js index 4545d91..ee33d47 100644 --- a/src/hooks/useProductsSets.js +++ b/src/hooks/useProductsSets.js @@ -27,17 +27,17 @@ export const useProductsTypes = () => { }; -export const useProductsAuditStatus = () => { +export const useProductsAuditStates = () => { const [types, setTypes] = useState([]); const { t, i18n } = useTranslation(); useEffect(() => { const newData = [ - { value: '0', label: 'New' }, - { value: '1', label: 'Pending' }, - { value: '2', label: 'Approve' }, - { value: '3', label: 'Rejected' }, - { value: '4', label: 'Published' }, + { value: '0', label: t('products:auditState.New') }, + { value: '1', label: t('products:auditState.Pending') }, + { value: '2', label: t('products:auditState.Approve') }, + { value: '3', label: t('products:auditState.Rejected') }, + { value: '4', label: t('products:auditState.Published') }, ]; setTypes(newData); }, [i18n.language]); diff --git a/src/views/products/Index.jsx b/src/views/products/Index.jsx index b793b2f..df1b189 100644 --- a/src/views/products/Index.jsx +++ b/src/views/products/Index.jsx @@ -17,6 +17,7 @@ function Index() { useEffect(() => {}, []); const showTotal = (total) => `Total ${total} items`; + const columns = [ { title: t('products:Vendor'), key: 'vendor', dataIndex: 'travel_agency_name' }, { title: t('products:CreatedBy'), key: 'created_by', dataIndex: 'created_by' }, @@ -38,9 +39,6 @@ function Index() { return ( { }} /> - +