changes
This commit is contained in:
parent
d76f59284b
commit
c928480566
@ -1614,7 +1614,8 @@ const location = useLocation();
|
|||||||
</label>
|
</label>
|
||||||
<Input
|
<Input
|
||||||
className="w-24"
|
className="w-24"
|
||||||
type="number"
|
type="text"
|
||||||
|
inputMode="decimal"
|
||||||
value={p.janCost || ''}
|
value={p.janCost || ''}
|
||||||
error={!!formErrors[`janCost_${idx}`]}
|
error={!!formErrors[`janCost_${idx}`]}
|
||||||
placeholder="Enter"
|
placeholder="Enter"
|
||||||
@ -1630,7 +1631,8 @@ const location = useLocation();
|
|||||||
</label>
|
</label>
|
||||||
<Input
|
<Input
|
||||||
className="w-24"
|
className="w-24"
|
||||||
type="number"
|
type="text"
|
||||||
|
inputMode="decimal"
|
||||||
value={p.febCost || ''}
|
value={p.febCost || ''}
|
||||||
error={!!formErrors[`febCost_${idx}`]}
|
error={!!formErrors[`febCost_${idx}`]}
|
||||||
placeholder="Enter"
|
placeholder="Enter"
|
||||||
@ -1646,7 +1648,8 @@ const location = useLocation();
|
|||||||
</label>
|
</label>
|
||||||
<Input
|
<Input
|
||||||
className="w-24"
|
className="w-24"
|
||||||
type="number"
|
type="text"
|
||||||
|
inputMode="decimal"
|
||||||
value={p.marCost || ''}
|
value={p.marCost || ''}
|
||||||
error={!!formErrors[`marCost_${idx}`]}
|
error={!!formErrors[`marCost_${idx}`]}
|
||||||
placeholder="Enter"
|
placeholder="Enter"
|
||||||
@ -1759,7 +1762,8 @@ const location = useLocation();
|
|||||||
</label>
|
</label>
|
||||||
<Input
|
<Input
|
||||||
className="w-24"
|
className="w-24"
|
||||||
type="number"
|
type="text"
|
||||||
|
inputMode="decimal"
|
||||||
required
|
required
|
||||||
placeholder="Enter"
|
placeholder="Enter"
|
||||||
value={p.aprCost || ''}
|
value={p.aprCost || ''}
|
||||||
@ -1776,7 +1780,8 @@ const location = useLocation();
|
|||||||
</label>
|
</label>
|
||||||
<Input
|
<Input
|
||||||
className="w-24"
|
className="w-24"
|
||||||
type="number"
|
type="text"
|
||||||
|
inputMode="decimal"
|
||||||
required
|
required
|
||||||
placeholder="Enter"
|
placeholder="Enter"
|
||||||
value={p.mayCost || ''}
|
value={p.mayCost || ''}
|
||||||
@ -1793,7 +1798,8 @@ const location = useLocation();
|
|||||||
</label>
|
</label>
|
||||||
<Input
|
<Input
|
||||||
className="w-24"
|
className="w-24"
|
||||||
type="number"
|
type="text"
|
||||||
|
inputMode="decimal"
|
||||||
required
|
required
|
||||||
placeholder="Enter"
|
placeholder="Enter"
|
||||||
value={p.junCost || ''}
|
value={p.junCost || ''}
|
||||||
|
|||||||
@ -153,7 +153,7 @@ const AddAdminUsers = ({ isOpen, onClose, onSave }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="fixed inset-0 bg-black/30 backdrop-blur-sm flex items-center justify-center p-4 z-[9998]">
|
<div className="fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-[9998]">
|
||||||
<div className="bg-white rounded-2xl w-[628px] max-h-[calc(100vh-2rem)] overflow-y-auto">
|
<div className="bg-white rounded-2xl w-[628px] max-h-[calc(100vh-2rem)] overflow-y-auto">
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
<div className="flex justify-between items-center p-6 border-b sticky top-0 bg-white z-10">
|
<div className="flex justify-between items-center p-6 border-b sticky top-0 bg-white z-10">
|
||||||
|
|||||||
@ -132,8 +132,8 @@ const AdminUserForm = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="fixed inset-0 bg-black/30 backdrop-blur-sm flex items-center justify-center p-4 z-[9998]">
|
<div className="fixed inset-0 bg-black/40 flex items-center justify-center p-4 z-[9998]">
|
||||||
<div className="bg-white rounded-2xl w-[628px] max-h-[calc(100vh-2rem)] overflow-y-auto">
|
<div className="bg-white rounded-xl w-[628px] max-h-[calc(100vh-2rem)] overflow-y-auto">
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
<div className="flex justify-between items-center p-6 border-b sticky top-0 bg-white z-10">
|
<div className="flex justify-between items-center p-6 border-b sticky top-0 bg-white z-10">
|
||||||
<h2 className="text-xl font-semibold text-[#232528]">
|
<h2 className="text-xl font-semibold text-[#232528]">
|
||||||
|
|||||||
@ -95,7 +95,7 @@ const ResetPasswordModal = ({
|
|||||||
if (!isOpen) return null;
|
if (!isOpen) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="fixed inset-0 z-[9999] flex items-center justify-center bg-opacity-70 backdrop-blur-sm">
|
<div className="fixed inset-0 z-[9999] flex items-center justify-center bg-black/40 ">
|
||||||
<div className="bg-white rounded-2xl w-[90%] max-w-md shadow-xl p-6 relative border border-gray-200">
|
<div className="bg-white rounded-2xl w-[90%] max-w-md shadow-xl p-6 relative border border-gray-200">
|
||||||
|
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
|
|||||||
@ -590,8 +590,8 @@ const IsicHsCodes = () => {
|
|||||||
sortable: true
|
sortable: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Actions',
|
name: <span className="whitespace-nowrap">Status</span>,
|
||||||
key: 'actions',
|
key: 'status',
|
||||||
sortable: false
|
sortable: false
|
||||||
}
|
}
|
||||||
].map(header => {
|
].map(header => {
|
||||||
@ -656,7 +656,9 @@ const IsicHsCodes = () => {
|
|||||||
item.code,
|
item.code,
|
||||||
item.product,
|
item.product,
|
||||||
// item.description || '-',
|
// item.description || '-',
|
||||||
item.unit,
|
// item.unit,
|
||||||
|
item.unit || '',
|
||||||
|
|
||||||
<div className="whitespace-nowrap">{item.estimatedMapped}</div>,
|
<div className="whitespace-nowrap">{item.estimatedMapped}</div>,
|
||||||
displayName,
|
displayName,
|
||||||
item.updated || item.createdOn || '-',
|
item.updated || item.createdOn || '-',
|
||||||
@ -931,7 +933,8 @@ const extractText = (node) => {
|
|||||||
const handleExportCSV = () => {
|
const handleExportCSV = () => {
|
||||||
// FIX HEADER TEXT EXTRACTION
|
// FIX HEADER TEXT EXTRACTION
|
||||||
const csvHeader = headers
|
const csvHeader = headers
|
||||||
.slice(0, headers.length - 1)
|
// .slice(0, headers.length - 1)
|
||||||
|
.filter((h) => h.key !== "")
|
||||||
.map((h) => extractText(h.name)) // <-- main fix
|
.map((h) => extractText(h.name)) // <-- main fix
|
||||||
.join(",");
|
.join(",");
|
||||||
|
|
||||||
@ -940,12 +943,12 @@ const handleExportCSV = () => {
|
|||||||
return [
|
return [
|
||||||
item.code,
|
item.code,
|
||||||
item.product,
|
item.product,
|
||||||
item.description || "-",
|
// item.description || "-",
|
||||||
item.unit,
|
item.unit || "",
|
||||||
item.estimatedMapped,
|
item.estimatedMapped,
|
||||||
item.createdBy,
|
item.createdBy,
|
||||||
item.updated || item.createdOn || "-",
|
item.updated || item.createdOn || "-",
|
||||||
item.status,
|
item.status ||" ",
|
||||||
]
|
]
|
||||||
.map((value) => `"${String(value ?? "").replace(/"/g, '""')}"`)
|
.map((value) => `"${String(value ?? "").replace(/"/g, '""')}"`)
|
||||||
.join(",");
|
.join(",");
|
||||||
@ -1175,7 +1178,9 @@ const handleExportCSV = () => {
|
|||||||
code: product.hs_code || 'N/A',
|
code: product.hs_code || 'N/A',
|
||||||
product: product.product_name || 'N/A',
|
product: product.product_name || 'N/A',
|
||||||
description: product.hs_description || '',
|
description: product.hs_description || '',
|
||||||
unit: product.unit?.uom || 'N/A',
|
// unit: product.unit?.uom || 'N/A',
|
||||||
|
unit: product.unit?.uom ?? '',
|
||||||
|
|
||||||
estimatedMapped: 0,
|
estimatedMapped: 0,
|
||||||
createdBy: creatorName,
|
createdBy: creatorName,
|
||||||
createdOn: createdDate,
|
createdOn: createdDate,
|
||||||
@ -1634,15 +1639,15 @@ const handleExportCSV = () => {
|
|||||||
|
|
||||||
|
|
||||||
{/* Footer */}
|
{/* Footer */}
|
||||||
{modalMode !== 'view' && (
|
<div className="flex justify-end p-6 border-t border-[#E5E7EB] space-x-3">
|
||||||
<div className="flex justify-end p-6 border-t border-[#E5E7EB] space-x-3">
|
<button
|
||||||
<button
|
type="button"
|
||||||
type="button"
|
onClick={closeModal}
|
||||||
onClick={closeModal}
|
className="h-8 px-4 text-sm font-medium text-[#374151] bg-white border border-[#B68A35] rounded-lg hover:bg-gray-50 "
|
||||||
className="h-10 px-6 text-sm font-medium text-[#374151] bg-white border border-[#D1D5DB] rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[#92722A]"
|
>
|
||||||
>
|
{modalMode === 'view' ? 'Close' : 'Cancel'}
|
||||||
Cancel
|
</button>
|
||||||
</button>
|
{modalMode !== 'view' && (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={handleSaveForm}
|
onClick={handleSaveForm}
|
||||||
@ -1655,8 +1660,8 @@ const handleExportCSV = () => {
|
|||||||
>
|
>
|
||||||
{modalMode === 'add' ? 'Add' : 'Save Changes'}
|
{modalMode === 'add' ? 'Add' : 'Save Changes'}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
)}
|
||||||
)}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -267,8 +267,8 @@ const QuarterlyWindows = () => {
|
|||||||
className: 'whitespace-nowrap text-left'
|
className: 'whitespace-nowrap text-left'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Actions',
|
name: 'Status',
|
||||||
key: 'actions',
|
key: 'status',
|
||||||
sortable: false,
|
sortable: false,
|
||||||
className: 'whitespace-nowrap text-left'
|
className: 'whitespace-nowrap text-left'
|
||||||
},
|
},
|
||||||
@ -727,7 +727,7 @@ const handleSave = async () => {
|
|||||||
// .map((h) => `"${h.name}"`)
|
// .map((h) => `"${h.name}"`)
|
||||||
// .join(',');
|
// .join(',');
|
||||||
const csvHeader = headers
|
const csvHeader = headers
|
||||||
.filter((h) => extractText(h.name) !== 'Actions') // remove Actions
|
.filter((h) => extractText(h.name) !== "") // remove Actions
|
||||||
.map((h) => `"${extractText(h.name)}"` ) // extract plain text
|
.map((h) => `"${extractText(h.name)}"` ) // extract plain text
|
||||||
.join(',');
|
.join(',');
|
||||||
const csvRows = filteredRows.map((item) => {
|
const csvRows = filteredRows.map((item) => {
|
||||||
|
|||||||
@ -1028,7 +1028,7 @@ const downloadSampleCSV = async () => {
|
|||||||
<div className="fixed inset-0 z-50">
|
<div className="fixed inset-0 z-50">
|
||||||
<div className="absolute inset-0 bg-black/40" onClick={closeModal} />
|
<div className="absolute inset-0 bg-black/40" onClick={closeModal} />
|
||||||
<div
|
<div
|
||||||
className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-[16px] bg-white"
|
className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-xl bg-white"
|
||||||
style={{
|
style={{
|
||||||
width: '628px',
|
width: '628px',
|
||||||
maxWidth: '92vw',
|
maxWidth: '92vw',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user