fix: dialog error & i18n
This commit is contained in:
parent
b20f40658d
commit
20dc04c769
3 changed files with 12 additions and 2 deletions
|
|
@ -24,10 +24,10 @@ function parseError(
|
||||||
status: number,
|
status: number,
|
||||||
body?: { status: number; message: string; code: string },
|
body?: { status: number; message: string; code: string },
|
||||||
) {
|
) {
|
||||||
if (status === 422) return 'ข้อมูลไม่ถูกต้อง กรุณาตรวจสอบใหม่อีกครั้ง';
|
if (status === 422) return 'invalideData';
|
||||||
if (body && body.code) return body.code;
|
if (body && body.code) return body.code;
|
||||||
|
|
||||||
return 'เกิดข้อผิดพลาดทำให้ระบบไม่สามารถทำงานได้ กรุณาลองใหม่ในภายหลัง';
|
return 'errorOccure';
|
||||||
}
|
}
|
||||||
|
|
||||||
api.interceptors.request.use(async (config) => {
|
api.interceptors.request.use(async (config) => {
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,7 @@ export default {
|
||||||
beforeEdit: 'Before',
|
beforeEdit: 'Before',
|
||||||
afterEdit: 'After',
|
afterEdit: 'After',
|
||||||
generated: 'System Generated',
|
generated: 'System Generated',
|
||||||
|
urgent: 'Urgent',
|
||||||
},
|
},
|
||||||
|
|
||||||
menu: {
|
menu: {
|
||||||
|
|
@ -621,6 +622,7 @@ export default {
|
||||||
contactName: 'Contact Name',
|
contactName: 'Contact Name',
|
||||||
documentReceivePoint: 'Document Drop-Off Point"',
|
documentReceivePoint: 'Document Drop-Off Point"',
|
||||||
dueDate: 'Quotation Due Date',
|
dueDate: 'Quotation Due Date',
|
||||||
|
special: 'Special',
|
||||||
|
|
||||||
paymentCondition: 'Payment Terms',
|
paymentCondition: 'Payment Terms',
|
||||||
payType: 'Payment Methods',
|
payType: 'Payment Methods',
|
||||||
|
|
@ -744,6 +746,9 @@ export default {
|
||||||
codeMisMatch: 'Code Mismatch',
|
codeMisMatch: 'Code Mismatch',
|
||||||
userExists: 'User already exits.',
|
userExists: 'User already exits.',
|
||||||
crossCompanyNotPermit: 'Cannot move between different headoffice',
|
crossCompanyNotPermit: 'Cannot move between different headoffice',
|
||||||
|
errorOccure:
|
||||||
|
'An error has occurred, causing the system to be unable to function. Please try again later.',
|
||||||
|
invalideData: 'The information is incorrect. Please try again later.',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,7 @@ export default {
|
||||||
beforeEdit: 'ค่าเดิม',
|
beforeEdit: 'ค่าเดิม',
|
||||||
afterEdit: 'แก้ใหม่',
|
afterEdit: 'แก้ใหม่',
|
||||||
generated: 'ระบบออกให้',
|
generated: 'ระบบออกให้',
|
||||||
|
urgent: 'เร่งด่วน',
|
||||||
},
|
},
|
||||||
|
|
||||||
menu: {
|
menu: {
|
||||||
|
|
@ -619,6 +620,7 @@ export default {
|
||||||
contactName: 'ชื่อผู้ติดต่อ',
|
contactName: 'ชื่อผู้ติดต่อ',
|
||||||
documentReceivePoint: 'จุดรับเอกสาร',
|
documentReceivePoint: 'จุดรับเอกสาร',
|
||||||
dueDate: 'วันครบกำหนดใบเสนอราคา',
|
dueDate: 'วันครบกำหนดใบเสนอราคา',
|
||||||
|
special: 'พิเศษ',
|
||||||
|
|
||||||
paymentCondition: 'เงื่อนไขการชำระเงิน',
|
paymentCondition: 'เงื่อนไขการชำระเงิน',
|
||||||
payType: 'วิธีการชำระเงิน',
|
payType: 'วิธีการชำระเงิน',
|
||||||
|
|
@ -739,6 +741,9 @@ export default {
|
||||||
codeMisMatch: 'รหัสไม่ตรงกัน',
|
codeMisMatch: 'รหัสไม่ตรงกัน',
|
||||||
userExists: 'ชื่อผู้ใช้นี้มีอยู่ในระบบอยู่แล้ว',
|
userExists: 'ชื่อผู้ใช้นี้มีอยู่ในระบบอยู่แล้ว',
|
||||||
crossCompanyNotPermit: 'ไม่สามารถดำเนินการระหว่างสำนักงานใหญ่อื่นได้',
|
crossCompanyNotPermit: 'ไม่สามารถดำเนินการระหว่างสำนักงานใหญ่อื่นได้',
|
||||||
|
errorOccure:
|
||||||
|
'เกิดข้อผิดพลาดทำให้ระบบไม่สามารถทำงานได้ กรุณาลองใหม่ในภายหลัง',
|
||||||
|
invalideData: 'ข้อมูลไม่ถูกต้อง กรุณาตรวจสอบใหม่อีกครั้ง',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue