From 6e2e9da1be85f4bf9c4f17942bfbc53f8ff71c1f Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Fri, 6 Feb 2026 09:45:38 +0700 Subject: [PATCH] chore: adjust ProjectFlockClosingForm styling --- .../closing/ProjectFlockClosingForm.tsx | 421 +++++++++--------- 1 file changed, 213 insertions(+), 208 deletions(-) diff --git a/src/components/pages/production/project-flock/closing/ProjectFlockClosingForm.tsx b/src/components/pages/production/project-flock/closing/ProjectFlockClosingForm.tsx index ead77e30..aab21172 100644 --- a/src/components/pages/production/project-flock/closing/ProjectFlockClosingForm.tsx +++ b/src/components/pages/production/project-flock/closing/ProjectFlockClosingForm.tsx @@ -94,230 +94,235 @@ const ProjectFlockClosingForm = ({ return ( <> - +
+ - {/* Informasi Kandang */} -
-
-

Informasi Kandang

+ {/* Informasi Kandang */} +
+
+

Informasi Kandang

- {/* Badge Row */} -
- - {' '} - Aktif - -
- - - {` Kapasitas ${formatNumber(projectFlockKandang.kandang?.capacity)} Ekor`} - + {/* Badge Row */} +
+ + {' '} + Aktif + +
+ + + {` Kapasitas ${formatNumber(projectFlockKandang.kandang?.capacity)} Ekor`} + +
+ + {/* Information Grid */} +
+ {/* Area */} +
+ Area +
+
{projectFlock.area?.name}
+ + {/* Lokasi */} +
+ Lokasi +
+
{projectFlock.location?.name}
+ + {/* Kandang */} +
+ Kandang +
+
+ {projectFlockKandang.kandang?.name} +
+ + {/* Jumlah DOC */} +
+ Jumlah + DOC +
+
+ {formatNumber( + projectFlockKandang.chickins?.reduce( + (total, chickin) => total + chickin.usage_qty, + 0 + ) ?? 0 + )}{' '} + Ekor +
+
- {/* Information Grid */} -
- {/* Area */} -
- Area -
-
{projectFlock.area?.name}
- - {/* Lokasi */} -
- Lokasi -
-
{projectFlock.location?.name}
- - {/* Kandang */} -
- Kandang -
-
{projectFlockKandang.kandang?.name}
- - {/* Jumlah DOC */} -
- Jumlah DOC -
-
- {formatNumber( - projectFlockKandang.chickins?.reduce( - (total, chickin) => total + chickin.usage_qty, - 0 - ) ?? 0 - )}{' '} - Ekor -
-
-
- - {/* Table Biaya */} -
-
-

Biaya

- - data={ - isResponseSuccess(closingData) ? closingData.data?.expenses : [] - } - columns={[ - { - header: 'PO Number', - accessorKey: 'po_number', - }, - { - header: 'Total', - accessorKey: 'total', - }, - { - header: 'Status', - accessorKey: 'status', - cell(props) { - return ( - - {formatTitleCase(props.row.original.step_name)} - - ); + {/* Table Biaya */} +
+
+

Biaya

+ + data={ + isResponseSuccess(closingData) ? closingData.data?.expenses : [] + } + columns={[ + { + header: 'PO Number', + accessorKey: 'po_number', }, - }, - ]} - className={{ - containerClassName: cn('my-4'), - tableWrapperClassName: 'overflow-x-auto min-h-full! max-w-120', - tableClassName: 'font-inter w-full table-sm min-h-full!', - headerRowClassName: 'border-b border-b-gray-200', - headerColumnClassName: - 'px-3 py-3 text-xs font-semibold text-gray-500 last:flex last:flex-row last:justify-end', - bodyRowClassName: 'border-b border-b-gray-200', - bodyColumnClassName: - 'px-3 py-3 last:flex last:flex-row last:justify-end', - paginationClassName: 'hidden', - }} - /> - {/* {errorExpense && ( + { + header: 'Total', + accessorKey: 'total', + }, + { + header: 'Status', + accessorKey: 'status', + cell(props) { + return ( + + {formatTitleCase(props.row.original.step_name)} + + ); + }, + }, + ]} + className={{ + containerClassName: cn('my-4'), + tableWrapperClassName: 'overflow-x-auto min-h-full! max-w-120', + tableClassName: 'font-inter w-full table-sm min-h-full!', + headerRowClassName: 'border-b border-b-gray-200', + headerColumnClassName: + 'px-3 py-3 text-xs font-semibold text-gray-500 last:flex last:flex-row last:justify-end', + bodyRowClassName: 'border-b border-b-gray-200', + bodyColumnClassName: + 'px-3 py-3 last:flex last:flex-row last:justify-end', + paginationClassName: 'hidden', + }} + /> + {/* {errorExpense && (
*Pastikan semua biaya sudah selesai sebelum melakukan closing.
)} */} -
+
- {/* Table Persediaan Gudang */} -
-
-

Persediaan Gudang

- - data={ - isResponseSuccess(closingData) - ? closingData.data?.stock_remaining - : [] - } - columns={[ - { - header: 'Product', - accessorKey: 'product_name', - }, - { - header: 'Kategori', - accessorKey: 'product_category', - }, - { - header: 'Quantity', - accessorKey: 'quantity', - }, - { - header: 'UOM', - accessorKey: 'uom', - }, - ]} - className={{ - containerClassName: cn('my-4'), - tableWrapperClassName: 'overflow-x-auto min-h-full! max-w-120', - tableClassName: 'font-inter w-full table-sm min-h-full!', - headerRowClassName: 'border-b border-b-gray-200', - headerColumnClassName: - 'px-3 py-3 text-xs font-semibold text-gray-500 last:flex last:flex-row last:justify-end', - bodyRowClassName: 'border-b border-b-gray-200', - bodyColumnClassName: - 'px-3 py-3 last:flex last:flex-row last:justify-end', - paginationClassName: 'hidden', - }} - /> - {/* {errorStock && ( + {/* Table Persediaan Gudang */} +
+
+

Persediaan Gudang

+ + data={ + isResponseSuccess(closingData) + ? closingData.data?.stock_remaining + : [] + } + columns={[ + { + header: 'Product', + accessorKey: 'product_name', + }, + { + header: 'Kategori', + accessorKey: 'product_category', + }, + { + header: 'Quantity', + accessorKey: 'quantity', + }, + { + header: 'UOM', + accessorKey: 'uom', + }, + ]} + className={{ + containerClassName: cn('my-4'), + tableWrapperClassName: 'overflow-x-auto min-h-full! max-w-120', + tableClassName: 'font-inter w-full table-sm min-h-full!', + headerRowClassName: 'border-b border-b-gray-200', + headerColumnClassName: + 'px-3 py-3 text-xs font-semibold text-gray-500 last:flex last:flex-row last:justify-end', + bodyRowClassName: 'border-b border-b-gray-200', + bodyColumnClassName: + 'px-3 py-3 last:flex last:flex-row last:justify-end', + paginationClassName: 'hidden', + }} + /> + {/* {errorStock && (
*Masih ada sisa stock yang belum dihabiskan.
)} */} -
+
-
- - - -
+
+ + + +
- + +
); };