From 63561e3804ac47791fd57e1291b578472487c59c Mon Sep 17 00:00:00 2001 From: Lei OT Date: Mon, 5 Aug 2024 14:56:16 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BA=A7=E5=93=81=E7=AE=A1=E7=90=86:=20?= =?UTF-8?q?=E5=A4=8D=E5=88=B6:=20=E6=96=87=E5=AD=97=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/products/Detail/CopyProducts.jsx | 2 +- src/views/products/Detail/ProductInfoForm.jsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/products/Detail/CopyProducts.jsx b/src/views/products/Detail/CopyProducts.jsx index a460e95..40fbca5 100644 --- a/src/views/products/Detail/CopyProducts.jsx +++ b/src/views/products/Detail/CopyProducts.jsx @@ -48,7 +48,7 @@ export const CopyProductsForm = ({ action, initialValues, onFormInstanceReady, s {/* disabledDate={(current) => current <= dayjs([source.sourceYear, 12, 31])} */} - + ); diff --git a/src/views/products/Detail/ProductInfoForm.jsx b/src/views/products/Detail/ProductInfoForm.jsx index eed89f6..70c8036 100644 --- a/src/views/products/Detail/ProductInfoForm.jsx +++ b/src/views/products/Detail/ProductInfoForm.jsx @@ -400,8 +400,8 @@ const formValuesMapper = (values) => { } // omit empty // Object.keys(dest).forEach((key) => (dest[key] == null || dest[key] === '' || dest[key].length === 0) && delete dest[key]); - const { lgc_details, lgc_details_mapped, quotation, ...info } = dest; // quotation - return { info, lgc_details, lgc_details_mapped, quotation }; // quotation + const { lgc_details, lgc_details_mapped, quotation, ...info } = dest; + return { info, lgc_details, lgc_details_mapped, quotation }; }; export default InfoForm; From 0601729c92efbc960b2fcb889a4f6bf5da3f80c7 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Mon, 5 Aug 2024 15:05:30 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BA=A7=E5=93=81=E7=AE=A1=E7=90=86:=20?= =?UTF-8?q?=E7=BC=96=E8=BE=91:=20=E6=8A=A5=E4=BB=B7:=20CNY->=20RMB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useProductsSets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useProductsSets.js b/src/hooks/useProductsSets.js index 904c653..b83efad 100644 --- a/src/hooks/useProductsSets.js +++ b/src/hooks/useProductsSets.js @@ -166,7 +166,7 @@ export const useNewProductRecord = () => { 'id': '', 'adult_cost': 0, 'child_cost': 0, - 'currency': 'CNY', + 'currency': 'RMB', 'unit_id': '1', 'unit_name': '每团', 'group_size_min': 1, From 7c85e61f7829f0206ef6da507ed9eec4cdbbc50d Mon Sep 17 00:00:00 2001 From: Lei OT Date: Mon, 5 Aug 2024 15:31:14 +0800 Subject: [PATCH 3/3] todo: form tooltip --- public/locales/en/products.json | 21 +++++++++++++++++++ public/locales/zh/products.json | 20 ++++++++++++++++++ src/views/products/Detail/NewProductModal.jsx | 6 +++--- src/views/products/Detail/ProductInfoForm.jsx | 17 ++++++++------- src/views/products/Detail/ProductInfoLgc.jsx | 14 ++++++------- 5 files changed, 60 insertions(+), 18 deletions(-) diff --git a/public/locales/en/products.json b/public/locales/en/products.json index 74e08bb..02689b7 100644 --- a/public/locales/en/products.json +++ b/public/locales/en/products.json @@ -116,5 +116,26 @@ "Weekdays": "Weekdays" }, + "FormTooltip": { + "Type": "Product Type", + "Title": "Title", + "Code": "Code", + "City": "City", + "Dept": "Department", + "Duration": "Duration", + "RecommendsRate": "RecommendsRate", + "OpenHours": "Open Hours", + "OpenWeekdays": "Open Weekdays", + "DisplayToC": "Display Type", + "KM": "KM", + "Description": "Description", + "Remarks": "Remarks" + }, + + "LgcModal": { + "title": "Add language", + "placeholder": "Pick a language" + }, + "#": "Product" } diff --git a/public/locales/zh/products.json b/public/locales/zh/products.json index fdb7785..1778f9d 100644 --- a/public/locales/zh/products.json +++ b/public/locales/zh/products.json @@ -104,5 +104,25 @@ "Weekdays": "周末", "Operation": "Operation" }, + "FormTooltop": { + "Type": "Product Type", + "Title": "Title", + "Code": "Code", + "City": "City", + "dept": "Department", + "Duration": "Duration", + "RecommendsRate": "RecommendsRate", + "OpenHours": "Open Hours", + "OpenWeekdays": "Open Weekdays", + "DisplayToC": "Display Type", + "KM": "KM", + "Description": "Description", + "Remarks": "Remarks" + }, + + "LgcModal": { + "title": "添加语种", + "placeholder": "选择语种" + }, "#": "产品" } diff --git a/src/views/products/Detail/NewProductModal.jsx b/src/views/products/Detail/NewProductModal.jsx index 09ed31e..4903d4e 100644 --- a/src/views/products/Detail/NewProductModal.jsx +++ b/src/views/products/Detail/NewProductModal.jsx @@ -10,7 +10,7 @@ import { useDefaultLgc } from '@/i18n/LanguageSwitcher'; import dayjs from 'dayjs' export const NewProductsForm = ({ initialValues, onFormInstanceReady, ...props }) => { - const { t } = useTranslation(); + const { t } = useTranslation('products'); const [form] = Form.useForm(); useEffect(() => { @@ -21,10 +21,10 @@ export const NewProductsForm = ({ initialValues, onFormInstanceReady, ...props } return (
- + - + diff --git a/src/views/products/Detail/ProductInfoForm.jsx b/src/views/products/Detail/ProductInfoForm.jsx index 70c8036..5fd5322 100644 --- a/src/views/products/Detail/ProductInfoForm.jsx +++ b/src/views/products/Detail/ProductInfoForm.jsx @@ -176,7 +176,7 @@ function getFields(props) { item( 'title', 99, - + , fieldProps?.title?.col || midCol @@ -184,7 +184,7 @@ function getFields(props) { item( 'code', 99, - + , fieldProps?.code?.col || midCol @@ -192,7 +192,7 @@ function getFields(props) { item( 'city', 99, - + , fieldProps?.city?.col || midCol @@ -208,7 +208,7 @@ function getFields(props) { item( 'duration', 99, - + {/* */} , @@ -217,7 +217,7 @@ function getFields(props) { item( 'km', 99, - + , fieldProps?.km?.col || midCol @@ -225,7 +225,7 @@ function getFields(props) { item( 'recommends_rate', 99, - + {/* */} { disabled={!editable} /> - + { key: lgcItem.value, children: ( - + - +