From f0894928302800565b11f57b774f26fae86c1298 Mon Sep 17 00:00:00 2001 From: ValdiANS Date: Tue, 30 Dec 2025 22:49:39 +0700 Subject: [PATCH] chore: adjust closing data type --- .../ClosingGeneralInformationTable.tsx | 4 ++-- .../pages/closing/ClosingsTable.tsx | 22 ------------------- src/types/api/closing.d.ts | 13 +++++------ 3 files changed, 8 insertions(+), 31 deletions(-) diff --git a/src/components/pages/closing/ClosingGeneralInformationTable.tsx b/src/components/pages/closing/ClosingGeneralInformationTable.tsx index af21497a..6d5b52b2 100644 --- a/src/components/pages/closing/ClosingGeneralInformationTable.tsx +++ b/src/components/pages/closing/ClosingGeneralInformationTable.tsx @@ -25,9 +25,9 @@ const ClosingGeneralInformationTable = ({ {initialValue?.period} - Kategori + Project Flock : - {initialValue?.project_category} + {initialValue?.project_flock?.name} Populasi diff --git a/src/components/pages/closing/ClosingsTable.tsx b/src/components/pages/closing/ClosingsTable.tsx index e6574d4f..0cacb549 100644 --- a/src/components/pages/closing/ClosingsTable.tsx +++ b/src/components/pages/closing/ClosingsTable.tsx @@ -126,28 +126,6 @@ const ClosingsTable = () => { accessorKey: 'shed_label', header: 'Jumlah Kandang', }, - { - accessorKey: 'sales_paid_amount', - header: 'Jumlah Sudah Bayar', - cell: (props) => ( - - {formatCurrency(props.row.original.sales_paid_amount)} - - ), - }, - { - accessorKey: 'sales_remaining_amount', - header: 'Jumlah Sisa Bayar', - cell: (props) => ( - - {formatCurrency(props.row.original.sales_remaining_amount)} - - ), - }, - { - accessorKey: 'sales_payment_status', - header: 'Status Pembayaran', - }, { accessorKey: 'project_status', header: 'Status', diff --git a/src/types/api/closing.d.ts b/src/types/api/closing.d.ts index c23354f8..ecdaebb9 100644 --- a/src/types/api/closing.d.ts +++ b/src/types/api/closing.d.ts @@ -6,6 +6,11 @@ import { Kandang } from '@/types/api/master-data/kandang'; import { Product } from '@type/api/master-data/product'; import { Customer } from '@type/api/master-data/customer'; import { BaseMetadata } from '@/types/api/api-general'; +import { Kandang } from '@/types/api/master-data/kandang'; +import { Product } from '@type/api/master-data/product'; +import { Customer } from '@type/api/master-data/customer'; +import { BaseMetadata } from '@/types/api/api-general'; +import { ProjectFlock } from '@/types/api/production/project-flock'; export type BaseSales = { id: number; @@ -29,10 +34,6 @@ export type BaseClosingSales = { period: number; sales: BaseSales[]; }; -import { Kandang } from '@/types/api/master-data/kandang'; -import { Product } from '@type/api/master-data/product'; -import { Customer } from '@type/api/master-data/customer'; -import { BaseMetadata } from '@/types/api/api-general'; export type BaseSales = { id: number; @@ -66,9 +67,6 @@ export type BaseClosing = { closing_date?: string; shed_label: string; shed_count: number; - sales_paid_amount: number; - sales_remaining_amount: number; - sales_payment_status: string; project_status: 'Pengajuan' | 'Aktif' | 'Selesai'; }; @@ -83,6 +81,7 @@ export type BaseClosingGeneralInformation = BaseClosing & { sales_payment_status: string; project_status: 'Pengajuan' | 'Aktif' | 'Selesai'; closing_status: string; + project_flock: ProjectFlock; }; export type ClosingGeneralInformation = BaseMetadata &