diff --git a/cope2n-fe/src/locales/en/messages.json b/cope2n-fe/src/locales/en/messages.json index e21a284..eaee229 100644 --- a/cope2n-fe/src/locales/en/messages.json +++ b/cope2n-fe/src/locales/en/messages.json @@ -11,11 +11,14 @@ "Email format is not correct": "Email format is not correct", "English": "English", "Go to Reports": "Go to Reports", + "Handwritten": "Handwritten", "Inference": "Inference", + "Invalid image": "Invalid image", "Is Test": "Is Test", "Language": "Language", "Login": "Login", "Logout": "Logout", + "Missing information": "Missing information", "New Report": "New Report", "Only characters (a-z), (A-Z), (0-9), @, ., +, -, _ are available": "Only characters (a-z), (A-Z), (0-9), @, ., +, -, _ are available", "Password": "Password", @@ -28,8 +31,11 @@ "Please enter a valid domain": "Please enter a valid domain", "Please specify a password": "Please specify a password", "Please specify a username": "Please specify a username", + "Reason for bad quality:": "Reason for bad quality:", + "Recheck": "Recheck", "Report Details": "Report Details", "Report Filters": "Report Filters", + "Report Type": "Report Type", "Reports": "Reports", "Retry": "Retry", "Review": "Review", @@ -43,6 +49,8 @@ "This field must not have more than {MAX_EMAIL_LENGTH} characters": "This field must not have more than {MAX_EMAIL_LENGTH} characters", "This field must not have more than {MAX_STRING_LENGTH} characters": "This field must not have more than {MAX_STRING_LENGTH} characters", "This field must not have more than {MAX_USERNAME_LENGTH} characters": "This field must not have more than {MAX_USERNAME_LENGTH} characters", + "Too blurry text": "Too blurry text", + "Too small text": "Too small text", "Upload files to process. The requests here will not be used in accuracy or payment calculations.": "Upload files to process. The requests here will not be used in accuracy or payment calculations.", "User log in successfully": "User log in successfully", "Username": "Username", diff --git a/cope2n-fe/src/locales/vi/messages.json b/cope2n-fe/src/locales/vi/messages.json index 950c2bb..07a56ed 100644 --- a/cope2n-fe/src/locales/vi/messages.json +++ b/cope2n-fe/src/locales/vi/messages.json @@ -11,11 +11,14 @@ "Email format is not correct": "Định dạng email không hợp lệ", "English": "Tiếng Anh", "Go to Reports": "", + "Handwritten": "", "Inference": "", + "Invalid image": "", "Is Test": "", "Language": "Ngôn ngữ", "Login": "Đăng nhập", "Logout": "Đăng xuất", + "Missing information": "", "New Report": "", "Only characters (a-z), (A-Z), (0-9), @, ., +, -, _ are available": "Chỉ cho phép các ký tự (a-z), (A-Z), (0-9), @, ., +, -, _", "Password": "Mật khẩu", @@ -28,8 +31,11 @@ "Please enter a valid domain": "Vui lòng nhập một tên miền hợp lệ", "Please specify a password": "Vui lòng nhập một mật khẩu", "Please specify a username": "Vui lòng nhập một tên tài khoản", + "Reason for bad quality:": "", + "Recheck": "", "Report Details": "", "Report Filters": "", + "Report Type": "", "Reports": "", "Retry": "Thử lại", "Review": "", @@ -43,6 +49,8 @@ "This field must not have more than {MAX_EMAIL_LENGTH} characters": "Độ dài chuỗi không được vượt quá {MAX_EMAIL_LENGTH} kí tự", "This field must not have more than {MAX_STRING_LENGTH} characters": "Độ dài chuỗi không được vượt quá {MAX_STRING_LENGTH} kí tự", "This field must not have more than {MAX_USERNAME_LENGTH} characters": "Độ dài chuỗi không được vượt quá {MAX_USERNAME_LENGTH} kí tự", + "Too blurry text": "", + "Too small text": "", "Upload files to process. The requests here will not be used in accuracy or payment calculations.": "", "User log in successfully": "Đăng nhập thành công", "Username": "Tên tài khoản", diff --git a/cope2n-fe/src/pages/reports/index.tsx b/cope2n-fe/src/pages/reports/index.tsx index be9c5e4..909c4e5 100644 --- a/cope2n-fe/src/pages/reports/index.tsx +++ b/cope2n-fe/src/pages/reports/index.tsx @@ -13,10 +13,31 @@ export interface ReportFormValues { reportType: string; } +const DEFAULT_SUBSIDIARY_OPTIONS = [ + { value: 'SEAO', label: 'SEAO' }, + { value: 'SEAU', label: 'SEAU' }, + { value: 'SESP', label: 'SESP' }, + { value: 'SME', label: 'SME' }, + { value: 'SEPCO', label: 'SEPCO' }, + { value: 'TSE', label: 'TSE' }, + { value: 'SEIN', label: 'SEIN' }, + ]; + const ReportsPage = () => { const [form] = Form.useForm(); const [isModalOpen, setIsModalOpen] = useState(false); const makeReportMutation = useMakeReport(); + const [subsidiaryOptions, setSubsidiaryOptions] = useState(DEFAULT_SUBSIDIARY_OPTIONS); + + const onReportTypeChange = (value: string) => { + if (value === 'billing') { + setSubsidiaryOptions([DEFAULT_SUBSIDIARY_OPTIONS[0]]); + form.setFieldValue('subsidiary', 'SEAO'); + } else if (value === 'payment') { + } else { + setSubsidiaryOptions(DEFAULT_SUBSIDIARY_OPTIONS); + } + }; const showModal = () => { setIsModalOpen(true); @@ -113,15 +134,7 @@ const ReportsPage = () => {