bug fixed

This commit is contained in:
Malini 2025-11-22 21:48:50 +05:30
parent 318d35235d
commit 821c913b59
2 changed files with 35 additions and 8 deletions

View File

@ -55,8 +55,8 @@ const Footer = () => {
className="h-4 w-4 mt-[2px] opacity-80" className="h-4 w-4 mt-[2px] opacity-80"
/> />
<div className="flex flex-col leading-[1.4]"> <div className="flex flex-col leading-[1.4]">
<span className="font-semibold text-[#232528]">+971 4 608 0000</span> <span className="font-semibold text-[#232528]">+971-504519711</span>
<span className="font-semibold text-[#232528]">+971 4 327 3535</span> {/* <span className="font-semibold text-[#232528]">+971 4 327 3535</span> */}
</div> </div>
</div> </div>
@ -68,10 +68,10 @@ const Footer = () => {
className="h-4 w-4 opacity-80" className="h-4 w-4 opacity-80"
/> />
<a <a
href="mailto:info@fcsc.gov.ae" href="mailto:Bhavinkumar.Chandulal@fcsc.gov.ae"
className="text-[#232528] hover:underline" className="text-[#232528] hover:underline"
> >
info@fcsc.gov.ae Bhavinkumar.Chandulal@fcsc.gov.ae
</a> </a>
</div> </div>
</div> </div>

View File

@ -836,8 +836,7 @@ const CompanyProfile = () => {
width="100%" width="100%"
required required
error={fieldErrors.userProfileName} error={fieldErrors.userProfileName}
{...fieldProps('userProfileName')} readOnly={modalMode === 'view'}
/> />
<TextField <TextField
label="Email" label="Email"
@ -848,6 +847,7 @@ const CompanyProfile = () => {
type="email" type="email"
required required
error={fieldErrors.userProfileEmail} error={fieldErrors.userProfileEmail}
readOnly={modalMode === 'view'}
/> />
{modalMode === 'add' && ( {modalMode === 'add' && (
<> <>
@ -919,6 +919,7 @@ const CompanyProfile = () => {
onChange={handleFormChange('permanentFactoryCode')} onChange={handleFormChange('permanentFactoryCode')}
placeholder="Enter Factory Code" placeholder="Enter Factory Code"
width="100%" width="100%"
readOnly={modalMode === 'view'}
/> />
<TextField <TextField
@ -929,6 +930,7 @@ const CompanyProfile = () => {
width="100%" width="100%"
required required
error={fieldErrors.uniqueLicenseNumber} error={fieldErrors.uniqueLicenseNumber}
readOnly={modalMode === 'view'}
/> />
<TextField <TextField
@ -937,6 +939,7 @@ const CompanyProfile = () => {
onChange={handleFormChange('industryCodeBusiness')} onChange={handleFormChange('industryCodeBusiness')}
placeholder="Enter Code" placeholder="Enter Code"
width="100%" width="100%"
readOnly={modalMode === 'view'}
/> />
<TextField <TextField
@ -945,6 +948,7 @@ const CompanyProfile = () => {
onChange={handleFormChange('industryCodeProduction')} onChange={handleFormChange('industryCodeProduction')}
placeholder="Enter Code" placeholder="Enter Code"
width="100%" width="100%"
readOnly={modalMode === 'view'}
/> />
</div> </div>
@ -957,6 +961,7 @@ const CompanyProfile = () => {
placeholder="Enter Description" placeholder="Enter Description"
width="100%" width="100%"
style={{ height: '72px' }} style={{ height: '72px' }}
readOnly={modalMode === 'view'}
/> />
</div> </div>
@ -971,6 +976,7 @@ const CompanyProfile = () => {
width="100%" width="100%"
multiline multiline
rows={3} rows={3}
readOnly={modalMode === 'view'}
/> />
{/* <div className="mt-2"> {/* <div className="mt-2">
<TextField <TextField
@ -1004,6 +1010,7 @@ const CompanyProfile = () => {
width="100%" width="100%"
required required
error={fieldErrors.contactName} error={fieldErrors.contactName}
readOnly={modalMode === 'view'}
/> />
<TextField <TextField
label="Address" label="Address"
@ -1011,6 +1018,7 @@ const CompanyProfile = () => {
onChange={handleFormChange('contactAddress')} onChange={handleFormChange('contactAddress')}
placeholder="Enter Address" placeholder="Enter Address"
width="100%" width="100%"
readOnly={modalMode === 'view'}
// required // required
// error={fieldErrors.contactAddress} // error={fieldErrors.contactAddress}
/> />
@ -1029,6 +1037,7 @@ const CompanyProfile = () => {
width="100%" width="100%"
required required
error={fieldErrors.contactEmirate} error={fieldErrors.contactEmirate}
readOnly={modalMode === 'view'}
/> />
<SelectField <SelectField
label="City/Town" label="City/Town"
@ -1045,6 +1054,7 @@ const CompanyProfile = () => {
width="100%" width="100%"
required required
error={fieldErrors.contactCityTown} error={fieldErrors.contactCityTown}
readOnly={modalMode === 'view'}
/> />
<TextField <TextField
label="Postal Code" label="Postal Code"
@ -1059,6 +1069,7 @@ const CompanyProfile = () => {
type="tel" type="tel"
inputMode="numeric" inputMode="numeric"
pattern="[0-9]*" pattern="[0-9]*"
readOnly={modalMode === 'view'}
/> />
<TextField <TextField
label="PO Box" label="PO Box"
@ -1066,6 +1077,7 @@ const CompanyProfile = () => {
onChange={handleFormChange('contactPoBox')} onChange={handleFormChange('contactPoBox')}
placeholder="Enter PO box" placeholder="Enter PO box"
width="100%" width="100%"
readOnly={modalMode === 'view'}
/> />
<TextField <TextField
label="Makani Number" label="Makani Number"
@ -1074,6 +1086,7 @@ const CompanyProfile = () => {
placeholder="Enter Makani Number" placeholder="Enter Makani Number"
width="100%" width="100%"
error={fieldErrors.contactMakaniNumber} error={fieldErrors.contactMakaniNumber}
readOnly={modalMode === 'view'}
/> />
<TextField <TextField
label="Contact Person Name" label="Contact Person Name"
@ -1082,6 +1095,7 @@ const CompanyProfile = () => {
placeholder="Enter Name" placeholder="Enter Name"
width="100%" width="100%"
error={fieldErrors.contactPersonName} error={fieldErrors.contactPersonName}
readOnly={modalMode === 'view'}
/> />
<TextField <TextField
label="Contact Person Designation" label="Contact Person Designation"
@ -1089,6 +1103,7 @@ const CompanyProfile = () => {
onChange={handleFormChange('contactPersonDesignation')} onChange={handleFormChange('contactPersonDesignation')}
placeholder="Enter contact person designation" placeholder="Enter contact person designation"
width="100%" width="100%"
readOnly={modalMode === 'view'}
/> />
<PhoneField <PhoneField
label="Mobile Number" label="Mobile Number"
@ -1098,6 +1113,7 @@ const CompanyProfile = () => {
value={form.contactMobileNumber} value={form.contactMobileNumber}
onChange={handleFormChange('contactMobileNumber')} onChange={handleFormChange('contactMobileNumber')}
width="100%" width="100%"
readOnly={modalMode === 'view'}
// required // required
// error={fieldErrors.contactMobileNumber} // error={fieldErrors.contactMobileNumber}
/> />
@ -1109,6 +1125,7 @@ const CompanyProfile = () => {
width="100%" width="100%"
required required
error={fieldErrors.contactEmail} error={fieldErrors.contactEmail}
readOnly={modalMode === 'view'}
/> />
<TextField <TextField
label="Website" label="Website"
@ -1117,6 +1134,7 @@ const CompanyProfile = () => {
placeholder="Enter Website" placeholder="Enter Website"
width="100%" width="100%"
error={fieldErrors.contactWebsite} error={fieldErrors.contactWebsite}
readOnly={modalMode === 'view'}
/> />
</div> </div>
</div> </div>
@ -1134,6 +1152,7 @@ const CompanyProfile = () => {
width="100%" width="100%"
type="number" type="number"
error={fieldErrors.employmentEmiratiMale} error={fieldErrors.employmentEmiratiMale}
readOnly={modalMode === 'view'}
/> />
<TextField <TextField
label="Number of Non-Emirati Male" label="Number of Non-Emirati Male"
@ -1143,6 +1162,7 @@ const CompanyProfile = () => {
width="100%" width="100%"
type="number" type="number"
error={fieldErrors.employmentNonEmiratiMale} error={fieldErrors.employmentNonEmiratiMale}
readOnly={modalMode === 'view'}
/> />
<TextField <TextField
label="Number of Emirati Female" label="Number of Emirati Female"
@ -1152,6 +1172,7 @@ const CompanyProfile = () => {
width="100%" width="100%"
type="number" type="number"
error={fieldErrors.employmentEmiratiFemale} error={fieldErrors.employmentEmiratiFemale}
readOnly={modalMode === 'view'}
/> />
<TextField <TextField
label="Number of Non-Emirati Female" label="Number of Non-Emirati Female"
@ -1161,6 +1182,7 @@ const CompanyProfile = () => {
width="100%" width="100%"
type="number" type="number"
error={fieldErrors.employmentNonEmiratiFemale} error={fieldErrors.employmentNonEmiratiFemale}
readOnly={modalMode === 'view'}
/> />
<TextField <TextField
label="Total Employees" label="Total Employees"
@ -1225,6 +1247,7 @@ const CompanyProfile = () => {
{(product.hsCode || product.hs_code) && (product.productName || product.label || product.product_name) ? ' - ' : ''} {(product.hsCode || product.hs_code) && (product.productName || product.label || product.product_name) ? ' - ' : ''}
{product.productName || product.label || product.product_name || ''} {product.productName || product.label || product.product_name || ''}
</div> </div>
{modalMode !== 'view' && (
<button <button
type="button" type="button"
@ -1233,6 +1256,8 @@ const CompanyProfile = () => {
> >
Add Add
</button> </button>
)}
</li> </li>
))} ))}
</ul> </ul>
@ -1268,6 +1293,7 @@ const CompanyProfile = () => {
{product.product_name || product.productName || product.label || 'Unnamed Product'} {product.product_name || product.productName || product.label || 'Unnamed Product'}
</div> </div>
</div> </div>
{modalMode !== 'view' && (
<button <button
type="button" type="button"
onClick={() => handleRemoveProduct(product)} onClick={() => handleRemoveProduct(product)}
@ -1275,6 +1301,7 @@ const CompanyProfile = () => {
> >
Remove Remove
</button> </button>
)}
</li> </li>
))} ))}
</ul> </ul>
@ -2124,7 +2151,7 @@ const displayedRows = filteredProfiles.map((item) => {
setSelectedProducts([]); setSelectedProducts([]);
} }
} }
setIsViewMode(false);
setModalMode('edit'); setModalMode('edit');
setIsDirty(false); setIsDirty(false);
@ -3130,7 +3157,7 @@ const handleImport = async () => {
<div className="flex items-center justify-between px-6 py-4 border-b border-[#F1F2F4]"> <div className="flex items-center justify-between px-6 py-4 border-b border-[#F1F2F4]">
<h3 className="text-[18px] font-medium text-[#232528]"> <h3 className="text-[18px] font-medium text-[#232528]">
{/* {modalMode === 'edit' ? 'Edit Company Profile' : 'Add Profile'} */} {/* {modalMode === 'edit' ? 'Edit Company Profile' : 'Add Profile'} */}
{isViewMode ? 'View Profile' : modalMode === 'edit' ? 'Edit Profile' : 'Add Profile'} {isViewMode ? 'View Profile' : modalMode === 'edit' ? 'Edit Profile' : 'Add Profile'}
</h3> </h3>
<button <button
type="button" type="button"