changes in ern
This commit is contained in:
parent
f0e364d84e
commit
d4e0a19b21
@ -159,6 +159,7 @@ const createEmptyProfile = () => ({
|
||||
// Identification particulars
|
||||
permanentFactoryCode: '',
|
||||
uniqueLicenseNumber: '',
|
||||
ERN: '',
|
||||
industryCodeBusiness: '',
|
||||
industryCodeProduction: '',
|
||||
industryCodeCurrent: '',
|
||||
@ -1012,7 +1013,6 @@ const CompanyProfile = () => {
|
||||
readOnly={modalMode === 'view'}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<TextField
|
||||
label="Industry Code(Business Register)"
|
||||
@ -1038,16 +1038,28 @@ const CompanyProfile = () => {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-2 w-full">
|
||||
<div>
|
||||
<TextField
|
||||
label="ERN"
|
||||
value={form.ERN}
|
||||
onChange={handleFormChange('ERN')}
|
||||
placeholder="Enter ERN"
|
||||
className="w-full"
|
||||
readOnly={modalMode === 'view'}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="mt-4 w-[calc(100%-1px)]">
|
||||
<TextField
|
||||
label="Description"
|
||||
value={form.industryDescription}
|
||||
onChange={handleFormChange('industryDescription')}
|
||||
placeholder="Enter Description"
|
||||
className="w-full"
|
||||
readOnly={modalMode === 'view'}
|
||||
/>
|
||||
<div>
|
||||
<TextField
|
||||
label="Description"
|
||||
value={form.industryDescription}
|
||||
onChange={handleFormChange('industryDescription')}
|
||||
placeholder="Enter Description"
|
||||
className="w-full"
|
||||
readOnly={modalMode === 'view'}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{form.industryCodeProduction && form.industryCodeBusiness && form.industryCodeBusiness !== form.industryCodeProduction && (
|
||||
@ -2055,6 +2067,7 @@ const displayedRows = sortedProfiles.map((item) => {
|
||||
contactWebsite: item?.establishment_website ?? base.contactWebsite,
|
||||
permanentFactoryCode: item?.permanent_factory_code ?? base.permanentFactoryCode,
|
||||
uniqueLicenseNumber: item?.license_number ?? base.uniqueLicenseNumber,
|
||||
ERN: item?.ERN ?? base.ERN,
|
||||
corporateName: item?.factory_name ?? '',
|
||||
corporateAddress: item?.corporate_address ?? base.corporateAddress,
|
||||
corporateCityTown: corporateCityName || base.corporateCityTown,
|
||||
@ -2772,6 +2785,7 @@ const handleView = async (id) => {
|
||||
industry_code_production: form.industryCodeProduction || form.industryCodeCurrent || '',
|
||||
industry_code_mismatch_remarks: form.industryCodeMismatchRemarks || '',
|
||||
license_number: form.uniqueLicenseNumber || '',
|
||||
ERN: form.ERN || '',
|
||||
isic_code: form.industryCodeProduction || '',
|
||||
description: form.industryDescription || '',
|
||||
establishment_address: form.contactAddress || '',
|
||||
@ -2881,6 +2895,7 @@ const handleView = async (id) => {
|
||||
industry_code_production: form.industryCodeProduction || form.industryCodeCurrent || '',
|
||||
industry_code_mismatch_remarks: form.industryCodeMismatchRemarks || '',
|
||||
license_number: form.uniqueLicenseNumber || '',
|
||||
ERN: form.ERN || '',
|
||||
isic_code: form.industryCodeProduction || '',
|
||||
description: form.industryDescription || '',
|
||||
establishment_address: form.contactAddress || '',
|
||||
@ -3790,4 +3805,4 @@ const handleImport = async () => {
|
||||
);
|
||||
};
|
||||
|
||||
export default CompanyProfile;
|
||||
export default CompanyProfile;
|
||||
|
||||
@ -15,6 +15,7 @@ const createEmptyProfile = () => ({
|
||||
userProfileEmail: '',
|
||||
permanentFactoryCode: '',
|
||||
uniqueLicenseNumber: '',
|
||||
ERN: '',
|
||||
industryCodeBusiness: '',
|
||||
industryCodeCurrent: '',
|
||||
industryCodeMismatchRemarks: '',
|
||||
@ -43,6 +44,7 @@ const mapApiEstablishmentToProfile = (apiData) => {
|
||||
userProfileEmail: data.users?.[0]?.email || '',
|
||||
permanentFactoryCode: data.permanent_factory_code || '',
|
||||
uniqueLicenseNumber: data.license_number || '',
|
||||
ERN: data.ERN || '',
|
||||
industryCodeBusiness: data.industry_code || '',
|
||||
industryCodeCurrent: data.isic_code || '',
|
||||
industryCodeMismatchRemarks: data.industry_code_mismatch_remarks || '',
|
||||
@ -696,6 +698,7 @@ const EditCompanyProfile = () => {
|
||||
permanent_factory_code: form.permanentFactoryCode || "",
|
||||
industry_code: form.industryCodeBusiness || "",
|
||||
license_number: form.uniqueLicenseNumber || "",
|
||||
ERN: form.ERN || "",
|
||||
industry_code_production: form.industryCodeCurrent || "",
|
||||
industry_code_mismatch_remarks: form.industryCodeMismatchRemarks || null,
|
||||
description: form.industryDescription || "",
|
||||
@ -818,8 +821,16 @@ const EditCompanyProfile = () => {
|
||||
width="100%"
|
||||
required
|
||||
error={fieldErrors.uniqueLicenseNumber}
|
||||
/> */}
|
||||
{/* <TextField
|
||||
/>
|
||||
<TextField
|
||||
label="ERN"
|
||||
value={form.ERN || ""}
|
||||
onChange={(e) => handleFormChange("ERN", e.target.value)}
|
||||
placeholder="Enter ERN"
|
||||
width="100%"
|
||||
error={fieldErrors.ERN}
|
||||
/>
|
||||
<TextField
|
||||
label="Industry Code (Business Register)"
|
||||
value={form.industryCodeBusiness || ""}
|
||||
onChange={(e) => handleFormChange("industryCodeBusiness", e.target.value)}
|
||||
@ -839,6 +850,18 @@ const EditCompanyProfile = () => {
|
||||
error={fieldErrors.industryCodeCurrent}
|
||||
/>
|
||||
</div>
|
||||
<div className="whitespace-nowrap">
|
||||
<TextField
|
||||
label="ERN"
|
||||
value={form.ERN || ""}
|
||||
onChange={(e) => handleFormChange("ERN", e.target.value)}
|
||||
placeholder="Enter ERN"
|
||||
width="100%"
|
||||
error={fieldErrors.ERN}
|
||||
readOnly
|
||||
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-full">
|
||||
{/* <TextField
|
||||
label="Description of Industry"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user