From ea7f8a68f439245372135f196036c5005ab7004a Mon Sep 17 00:00:00 2001 From: randy-ar Date: Mon, 29 Dec 2025 13:19:16 +0700 Subject: [PATCH] fix(FE): change select option warehouse marketing to correct data warehouses --- .../FormFinanceAddInitialBalance.schema.ts | 13 ------------- .../repeater/delivery-order/DeliverOrderProduct.tsx | 13 ------------- .../repeater/sales-order/SalesOrderProductForm.tsx | 4 ++-- 3 files changed, 2 insertions(+), 28 deletions(-) diff --git a/src/components/pages/finance/add/initial-balance/FormFinanceAddInitialBalance.schema.ts b/src/components/pages/finance/add/initial-balance/FormFinanceAddInitialBalance.schema.ts index c700f973..776028c6 100644 --- a/src/components/pages/finance/add/initial-balance/FormFinanceAddInitialBalance.schema.ts +++ b/src/components/pages/finance/add/initial-balance/FormFinanceAddInitialBalance.schema.ts @@ -1,19 +1,6 @@ import * as Yup from 'yup'; import { OptionType } from '@/components/input/SelectInput'; -/** - * API Payload format for Initial Balance: - * { - "party_type": "CUSTOMER", - "party_id": 1, - "bank_id": 1, - "reference_number": "IB.MBU.001", - "initial_balance_type": "DEBIT", - "nominal": 5000000, - "note": "Saldo awal piutang customer" - } - */ - // Type for form values (includes option objects for SelectInput) export type InitialBalanceFormValues = { party_type_option: OptionType | null; diff --git a/src/components/pages/marketing/form/repeater/delivery-order/DeliverOrderProduct.tsx b/src/components/pages/marketing/form/repeater/delivery-order/DeliverOrderProduct.tsx index f169eb3c..a0eed811 100644 --- a/src/components/pages/marketing/form/repeater/delivery-order/DeliverOrderProduct.tsx +++ b/src/components/pages/marketing/form/repeater/delivery-order/DeliverOrderProduct.tsx @@ -174,19 +174,6 @@ const DeliveryOrderProductForm = ({ }} onReset={handleResetForm} > - {/* - {JSON.stringify(exisitingValues)} - - - {JSON.stringify(formik.values)} - */} - {/* - {JSON.stringify(formik.errors)} - -
- {JSON.stringify(formik.values.marketing_product)} -
*/} - {formikErrorMessage && (
setFormErrorMessage('')} className='my-3 w-full'> {formikErrorMessage} diff --git a/src/components/pages/marketing/form/repeater/sales-order/SalesOrderProductForm.tsx b/src/components/pages/marketing/form/repeater/sales-order/SalesOrderProductForm.tsx index ad50a927..75aa3ba6 100644 --- a/src/components/pages/marketing/form/repeater/sales-order/SalesOrderProductForm.tsx +++ b/src/components/pages/marketing/form/repeater/sales-order/SalesOrderProductForm.tsx @@ -11,7 +11,7 @@ import SelectInput, { useSelect, } from '@/components/input/SelectInput'; import { Kandang } from '@/types/api/master-data/kandang'; -import { KandangApi } from '@/services/api/master-data'; +import { KandangApi, WarehouseApi } from '@/services/api/master-data'; import { ProductWarehouse } from '@/types/api/inventory/product-warehouse'; import { ProductWarehouseApi } from '@/services/api/inventory'; import NumberInput from '@/components/input/NumberInput'; @@ -61,7 +61,7 @@ const SalesOrderProductForm = ({ const { options: kandangSourceOptions, isLoadingOptions: isLoadingKandangSourceOptions, - } = useSelect(KandangApi.basePath, 'id', 'name'); + } = useSelect(WarehouseApi.basePath, 'id', 'name'); const { options: warehouseSourceOptions,