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