mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 15:25:46 +00:00
Merge branch 'development' of gitlab.com:mbugroup/lti-web-client into dev/hotfix/restu
This commit is contained in:
@@ -444,7 +444,13 @@ const DashboardProduction = () => {
|
|||||||
)?.value === 'FARM' ? (
|
)?.value === 'FARM' ? (
|
||||||
<SelectInputCheckbox
|
<SelectInputCheckbox
|
||||||
label='Farm'
|
label='Farm'
|
||||||
value={formik.values.location}
|
value={
|
||||||
|
formik.values.location as
|
||||||
|
| { value: number; label: string }
|
||||||
|
| { value: number; label: string }[]
|
||||||
|
| null
|
||||||
|
| undefined
|
||||||
|
}
|
||||||
onInputChange={setInputValueLocation}
|
onInputChange={setInputValueLocation}
|
||||||
onMenuScrollToBottom={loadMoreLocation}
|
onMenuScrollToBottom={loadMoreLocation}
|
||||||
onChange={(selected) => {
|
onChange={(selected) => {
|
||||||
@@ -466,7 +472,13 @@ const DashboardProduction = () => {
|
|||||||
) : (
|
) : (
|
||||||
<SelectInputRadio
|
<SelectInputRadio
|
||||||
label='Farm'
|
label='Farm'
|
||||||
value={formik.values.location as OptionType}
|
value={
|
||||||
|
formik.values.location as
|
||||||
|
| { value: number; label: string }
|
||||||
|
| { value: number; label: string }[]
|
||||||
|
| null
|
||||||
|
| undefined
|
||||||
|
}
|
||||||
onInputChange={setInputValueLocation}
|
onInputChange={setInputValueLocation}
|
||||||
onMenuScrollToBottom={loadMoreLocation}
|
onMenuScrollToBottom={loadMoreLocation}
|
||||||
onChange={(selected) => {
|
onChange={(selected) => {
|
||||||
@@ -502,7 +514,13 @@ const DashboardProduction = () => {
|
|||||||
)?.value === 'FLOCK' ? (
|
)?.value === 'FLOCK' ? (
|
||||||
<SelectInputCheckbox
|
<SelectInputCheckbox
|
||||||
label='Flock'
|
label='Flock'
|
||||||
value={formik.values.flock as OptionType[]}
|
value={
|
||||||
|
formik.values.flock as
|
||||||
|
| { value: number; label: string }
|
||||||
|
| { value: number; label: string }[]
|
||||||
|
| null
|
||||||
|
| undefined
|
||||||
|
}
|
||||||
onChange={(selected) =>
|
onChange={(selected) =>
|
||||||
formik.setFieldValue('flock', selected)
|
formik.setFieldValue('flock', selected)
|
||||||
}
|
}
|
||||||
@@ -519,7 +537,13 @@ const DashboardProduction = () => {
|
|||||||
) : (
|
) : (
|
||||||
<SelectInputRadio
|
<SelectInputRadio
|
||||||
label='Flock'
|
label='Flock'
|
||||||
value={formik.values.flock as OptionType}
|
value={
|
||||||
|
formik.values.flock as
|
||||||
|
| { value: number; label: string }
|
||||||
|
| { value: number; label: string }[]
|
||||||
|
| null
|
||||||
|
| undefined
|
||||||
|
}
|
||||||
onChange={(selected) =>
|
onChange={(selected) =>
|
||||||
formik.setFieldValue('flock', selected)
|
formik.setFieldValue('flock', selected)
|
||||||
}
|
}
|
||||||
@@ -548,7 +572,13 @@ const DashboardProduction = () => {
|
|||||||
)?.value === 'KANDANG' ? (
|
)?.value === 'KANDANG' ? (
|
||||||
<SelectInputCheckbox
|
<SelectInputCheckbox
|
||||||
label='Kandang'
|
label='Kandang'
|
||||||
value={formik.values.kandang as OptionType[]}
|
value={
|
||||||
|
formik.values.kandang as
|
||||||
|
| { value: number; label: string }
|
||||||
|
| { value: number; label: string }[]
|
||||||
|
| null
|
||||||
|
| undefined
|
||||||
|
}
|
||||||
onChange={(selected) =>
|
onChange={(selected) =>
|
||||||
formik.setFieldValue('kandang', selected)
|
formik.setFieldValue('kandang', selected)
|
||||||
}
|
}
|
||||||
@@ -565,7 +595,13 @@ const DashboardProduction = () => {
|
|||||||
) : (
|
) : (
|
||||||
<SelectInputRadio
|
<SelectInputRadio
|
||||||
label='Kandang'
|
label='Kandang'
|
||||||
value={formik.values.kandang as OptionType}
|
value={
|
||||||
|
formik.values.kandang as
|
||||||
|
| { value: number; label: string }
|
||||||
|
| { value: number; label: string }[]
|
||||||
|
| null
|
||||||
|
| undefined
|
||||||
|
}
|
||||||
onChange={(selected) =>
|
onChange={(selected) =>
|
||||||
formik.setFieldValue('kandang', selected)
|
formik.setFieldValue('kandang', selected)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,9 +54,6 @@ const FormFinanceAdd = ({
|
|||||||
}: FormFinanceAddProps) => {
|
}: FormFinanceAddProps) => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [serverErrorMessage, setServerErrorMessage] = useState('');
|
const [serverErrorMessage, setServerErrorMessage] = useState('');
|
||||||
const [isSupplier, setIsSupplier] = useState(
|
|
||||||
initialValues?.party?.type === 'SUPPLIER'
|
|
||||||
);
|
|
||||||
|
|
||||||
// ===== Formik =====
|
// ===== Formik =====
|
||||||
const formikInitialValues = useMemo((): FinanceFormValues => {
|
const formikInitialValues = useMemo((): FinanceFormValues => {
|
||||||
@@ -215,7 +212,7 @@ const FormFinanceAdd = ({
|
|||||||
? formik.errors.party_type_option
|
? formik.errors.party_type_option
|
||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
isDisabled={type === 'edit' || isSupplier}
|
isDisabled={type === 'edit'}
|
||||||
required
|
required
|
||||||
isClearable
|
isClearable
|
||||||
/>
|
/>
|
||||||
@@ -254,7 +251,7 @@ const FormFinanceAdd = ({
|
|||||||
}
|
}
|
||||||
required
|
required
|
||||||
isClearable
|
isClearable
|
||||||
isDisabled={!formik.values.party_type_option?.value || isSupplier}
|
isDisabled={!formik.values.party_type_option?.value}
|
||||||
/>
|
/>
|
||||||
<DateInput
|
<DateInput
|
||||||
label='Tanggal'
|
label='Tanggal'
|
||||||
@@ -272,7 +269,6 @@ const FormFinanceAdd = ({
|
|||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
required
|
required
|
||||||
disabled={isSupplier}
|
|
||||||
/>
|
/>
|
||||||
<SelectInput
|
<SelectInput
|
||||||
label='Metode Pembayaran'
|
label='Metode Pembayaran'
|
||||||
@@ -294,7 +290,6 @@ const FormFinanceAdd = ({
|
|||||||
}
|
}
|
||||||
required
|
required
|
||||||
isClearable
|
isClearable
|
||||||
isDisabled={isSupplier}
|
|
||||||
/>
|
/>
|
||||||
<SelectInput
|
<SelectInput
|
||||||
label='Bank'
|
label='Bank'
|
||||||
@@ -335,7 +330,6 @@ const FormFinanceAdd = ({
|
|||||||
}
|
}
|
||||||
required
|
required
|
||||||
isClearable
|
isClearable
|
||||||
isDisabled={isSupplier}
|
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
label={`Nomor Rekening ${formik.values.party_type_option?.value ? formatTitleCase(formik.values.party_type_option.value as string) : 'Pihak'}`}
|
label={`Nomor Rekening ${formik.values.party_type_option?.value ? formatTitleCase(formik.values.party_type_option.value as string) : 'Pihak'}`}
|
||||||
@@ -356,7 +350,6 @@ const FormFinanceAdd = ({
|
|||||||
}
|
}
|
||||||
required
|
required
|
||||||
readOnly
|
readOnly
|
||||||
disabled={isSupplier}
|
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
label='Nomor Referensi'
|
label='Nomor Referensi'
|
||||||
@@ -376,7 +369,6 @@ const FormFinanceAdd = ({
|
|||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
required
|
required
|
||||||
disabled={isSupplier}
|
|
||||||
/>
|
/>
|
||||||
<NumberInput
|
<NumberInput
|
||||||
label='Nominal'
|
label='Nominal'
|
||||||
@@ -392,7 +384,6 @@ const FormFinanceAdd = ({
|
|||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
required
|
required
|
||||||
disabled={isSupplier}
|
|
||||||
/>
|
/>
|
||||||
<TextArea
|
<TextArea
|
||||||
label='Catatan'
|
label='Catatan'
|
||||||
@@ -408,7 +399,6 @@ const FormFinanceAdd = ({
|
|||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
required
|
required
|
||||||
disabled={isSupplier}
|
|
||||||
/>
|
/>
|
||||||
<AlertErrorList formErrorList={formErrorList} onClose={close} />
|
<AlertErrorList formErrorList={formErrorList} onClose={close} />
|
||||||
{serverErrorMessage && (
|
{serverErrorMessage && (
|
||||||
|
|||||||
+29
-10
@@ -143,11 +143,13 @@ const DeliveryOrderProductForm = ({
|
|||||||
// ===== SOURCE FIELDS =====
|
// ===== SOURCE FIELDS =====
|
||||||
case 'qty': {
|
case 'qty': {
|
||||||
if (avgWeight > 0) {
|
if (avgWeight > 0) {
|
||||||
formik.setFieldValue('total_weight', roundWeight(qty * avgWeight));
|
const tw = roundWeight(qty * avgWeight);
|
||||||
}
|
formik.setFieldValue('total_weight', tw);
|
||||||
|
|
||||||
if (unitPrice > 0) {
|
// Hitung total_price berdasarkan unit_price × total_weight
|
||||||
formik.setFieldValue('total_price', roundPrice(qty * unitPrice));
|
if (unitPrice > 0) {
|
||||||
|
formik.setFieldValue('total_price', roundPrice(unitPrice * tw));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -157,16 +159,21 @@ const DeliveryOrderProductForm = ({
|
|||||||
const tw = roundWeight(qty * avgWeight);
|
const tw = roundWeight(qty * avgWeight);
|
||||||
formik.setFieldValue('total_weight', tw);
|
formik.setFieldValue('total_weight', tw);
|
||||||
|
|
||||||
|
// Hitung total_price berdasarkan unit_price × total_weight
|
||||||
if (unitPrice > 0) {
|
if (unitPrice > 0) {
|
||||||
formik.setFieldValue('total_price', roundPrice(qty * unitPrice));
|
formik.setFieldValue('total_price', roundPrice(unitPrice * tw));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'unit_price': {
|
case 'unit_price': {
|
||||||
if (unitPrice > 0) {
|
if (unitPrice > 0 && totalWeight > 0) {
|
||||||
formik.setFieldValue('total_price', roundPrice(qty * unitPrice));
|
// Hitung total_price berdasarkan unit_price × total_weight
|
||||||
|
formik.setFieldValue(
|
||||||
|
'total_price',
|
||||||
|
roundPrice(unitPrice * totalWeight)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -175,13 +182,25 @@ const DeliveryOrderProductForm = ({
|
|||||||
case 'total_weight': {
|
case 'total_weight': {
|
||||||
if (totalWeight > 0) {
|
if (totalWeight > 0) {
|
||||||
formik.setFieldValue('avg_weight', roundWeight(totalWeight / qty));
|
formik.setFieldValue('avg_weight', roundWeight(totalWeight / qty));
|
||||||
|
|
||||||
|
// Hitung ulang total_price berdasarkan unit_price × total_weight
|
||||||
|
if (unitPrice > 0) {
|
||||||
|
formik.setFieldValue(
|
||||||
|
'total_price',
|
||||||
|
roundPrice(unitPrice * totalWeight)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'total_price': {
|
case 'total_price': {
|
||||||
if (totalPrice > 0) {
|
if (totalPrice > 0 && totalWeight > 0) {
|
||||||
formik.setFieldValue('unit_price', roundPrice(totalPrice / qty));
|
// Hitung unit_price berdasarkan total_price / total_weight
|
||||||
|
formik.setFieldValue(
|
||||||
|
'unit_price',
|
||||||
|
roundPrice(totalPrice / totalWeight)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -382,7 +401,7 @@ const DeliveryOrderProductForm = ({
|
|||||||
/>
|
/>
|
||||||
<NumberInput
|
<NumberInput
|
||||||
required
|
required
|
||||||
label='Harga Satuan (Rp)'
|
label={`Harga / ${isResponseSuccess(productData) ? productData?.data?.uom?.name : 'Produk'} (Rp)`}
|
||||||
name='unit_price'
|
name='unit_price'
|
||||||
value={formik.values.unit_price}
|
value={formik.values.unit_price}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
|
|||||||
+63
-28
@@ -49,17 +49,6 @@ const SalesOrderProductForm = ({
|
|||||||
const [selectedProductWarehouse, setSelectedProductWarehouse] =
|
const [selectedProductWarehouse, setSelectedProductWarehouse] =
|
||||||
useState<ProductWarehouse | null>(null);
|
useState<ProductWarehouse | null>(null);
|
||||||
|
|
||||||
// ============ Fetch Data ============
|
|
||||||
const { data: productData } = useSWR(
|
|
||||||
selectedProductWarehouse?.product_id
|
|
||||||
? ProductApi.basePath + '/' + selectedProductWarehouse?.product_id
|
|
||||||
: null,
|
|
||||||
() =>
|
|
||||||
selectedProductWarehouse?.product_id
|
|
||||||
? ProductApi.getSingle(selectedProductWarehouse?.product_id)
|
|
||||||
: undefined
|
|
||||||
);
|
|
||||||
|
|
||||||
// ============ Formik ============
|
// ============ Formik ============
|
||||||
const formik = useFormik<SalesOrderProductFormValues>({
|
const formik = useFormik<SalesOrderProductFormValues>({
|
||||||
enableReinitialize: true,
|
enableReinitialize: true,
|
||||||
@@ -174,15 +163,28 @@ const SalesOrderProductForm = ({
|
|||||||
|
|
||||||
if (qty <= 0) return;
|
if (qty <= 0) return;
|
||||||
|
|
||||||
|
// Cek apakah produk memiliki flag OVK atau PAKAN
|
||||||
|
const productFlags = selectedProductWarehouse?.product?.flags || [];
|
||||||
|
const isOvkOrPakan =
|
||||||
|
productFlags.includes('OVK') || productFlags.includes('PAKAN');
|
||||||
|
|
||||||
switch (field) {
|
switch (field) {
|
||||||
// ===== SOURCE FIELDS =====
|
// ===== SOURCE FIELDS =====
|
||||||
case 'qty': {
|
case 'qty': {
|
||||||
if (avgWeight > 0) {
|
if (avgWeight > 0) {
|
||||||
formik.setFieldValue('total_weight', roundWeight(qty * avgWeight));
|
const tw = roundWeight(qty * avgWeight);
|
||||||
}
|
formik.setFieldValue('total_weight', tw);
|
||||||
|
|
||||||
if (unitPrice > 0) {
|
// Hitung total_price berdasarkan flag produk
|
||||||
formik.setFieldValue('total_price', roundPrice(qty * unitPrice));
|
if (unitPrice > 0) {
|
||||||
|
if (isOvkOrPakan) {
|
||||||
|
// Untuk OVK/PAKAN: total_price = qty × unit_price
|
||||||
|
formik.setFieldValue('total_price', roundPrice(qty * unitPrice));
|
||||||
|
} else {
|
||||||
|
// Untuk produk lain: total_price = unit_price × total_weight
|
||||||
|
formik.setFieldValue('total_price', roundPrice(unitPrice * tw));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -192,8 +194,15 @@ const SalesOrderProductForm = ({
|
|||||||
const tw = roundWeight(qty * avgWeight);
|
const tw = roundWeight(qty * avgWeight);
|
||||||
formik.setFieldValue('total_weight', tw);
|
formik.setFieldValue('total_weight', tw);
|
||||||
|
|
||||||
|
// Hitung total_price berdasarkan flag produk
|
||||||
if (unitPrice > 0) {
|
if (unitPrice > 0) {
|
||||||
formik.setFieldValue('total_price', roundPrice(qty * unitPrice));
|
if (isOvkOrPakan) {
|
||||||
|
// Untuk OVK/PAKAN: total_price = qty × unit_price
|
||||||
|
formik.setFieldValue('total_price', roundPrice(qty * unitPrice));
|
||||||
|
} else {
|
||||||
|
// Untuk produk lain: total_price = unit_price × total_weight
|
||||||
|
formik.setFieldValue('total_price', roundPrice(unitPrice * tw));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -201,7 +210,16 @@ const SalesOrderProductForm = ({
|
|||||||
|
|
||||||
case 'unit_price': {
|
case 'unit_price': {
|
||||||
if (unitPrice > 0) {
|
if (unitPrice > 0) {
|
||||||
formik.setFieldValue('total_price', roundPrice(qty * unitPrice));
|
if (isOvkOrPakan) {
|
||||||
|
// Untuk OVK/PAKAN: total_price = qty × unit_price
|
||||||
|
formik.setFieldValue('total_price', roundPrice(qty * unitPrice));
|
||||||
|
} else if (totalWeight > 0) {
|
||||||
|
// Untuk produk lain: total_price = unit_price × total_weight
|
||||||
|
formik.setFieldValue(
|
||||||
|
'total_price',
|
||||||
|
roundPrice(unitPrice * totalWeight)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -210,13 +228,36 @@ const SalesOrderProductForm = ({
|
|||||||
case 'total_weight': {
|
case 'total_weight': {
|
||||||
if (totalWeight > 0) {
|
if (totalWeight > 0) {
|
||||||
formik.setFieldValue('avg_weight', roundWeight(totalWeight / qty));
|
formik.setFieldValue('avg_weight', roundWeight(totalWeight / qty));
|
||||||
|
|
||||||
|
// Hitung ulang total_price berdasarkan flag produk
|
||||||
|
if (unitPrice > 0) {
|
||||||
|
if (isOvkOrPakan) {
|
||||||
|
// Untuk OVK/PAKAN: total_price = qty × unit_price
|
||||||
|
formik.setFieldValue('total_price', roundPrice(qty * unitPrice));
|
||||||
|
} else {
|
||||||
|
// Untuk produk lain: total_price = unit_price × total_weight
|
||||||
|
formik.setFieldValue(
|
||||||
|
'total_price',
|
||||||
|
roundPrice(unitPrice * totalWeight)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'total_price': {
|
case 'total_price': {
|
||||||
if (totalPrice > 0) {
|
if (totalPrice > 0) {
|
||||||
formik.setFieldValue('unit_price', roundPrice(totalPrice / qty));
|
if (isOvkOrPakan && qty > 0) {
|
||||||
|
// Untuk OVK/PAKAN: unit_price = total_price / qty
|
||||||
|
formik.setFieldValue('unit_price', roundPrice(totalPrice / qty));
|
||||||
|
} else if (totalWeight > 0) {
|
||||||
|
// Untuk produk lain: unit_price = total_price / total_weight
|
||||||
|
formik.setFieldValue(
|
||||||
|
'unit_price',
|
||||||
|
roundPrice(totalPrice / totalWeight)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -232,7 +273,7 @@ const SalesOrderProductForm = ({
|
|||||||
handleBlurField(currentInput);
|
handleBlurField(currentInput);
|
||||||
formik.setFieldValue(
|
formik.setFieldValue(
|
||||||
'uom',
|
'uom',
|
||||||
isResponseSuccess(productData) ? productData?.data?.uom.name : ''
|
selectedProductWarehouse?.product?.uom?.name
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -330,9 +371,7 @@ const SalesOrderProductForm = ({
|
|||||||
endAdornment={
|
endAdornment={
|
||||||
<div className='flex items-center gap-2'>
|
<div className='flex items-center gap-2'>
|
||||||
<span className='text-sm text-gray-500'>
|
<span className='text-sm text-gray-500'>
|
||||||
{isResponseSuccess(productData)
|
{selectedProductWarehouse?.product?.uom?.name}
|
||||||
? productData?.data?.uom.name
|
|
||||||
: ''}
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@@ -343,17 +382,13 @@ const SalesOrderProductForm = ({
|
|||||||
warehouseSourceRawData?.data?.find(
|
warehouseSourceRawData?.data?.find(
|
||||||
(item) => item.id === formik.values.product_warehouse_id
|
(item) => item.id === formik.values.product_warehouse_id
|
||||||
)?.quantity ?? 0
|
)?.quantity ?? 0
|
||||||
)} ${
|
)} ${selectedProductWarehouse?.product?.uom?.name}`
|
||||||
isResponseSuccess(productData)
|
|
||||||
? productData?.data?.uom.name
|
|
||||||
: ''
|
|
||||||
}`
|
|
||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<NumberInput
|
<NumberInput
|
||||||
required
|
required
|
||||||
label='Harga Satuan (Rp)'
|
label={`Harga / ${selectedProductWarehouse?.product?.uom?.name ?? 'Produk'} (Rp)`}
|
||||||
name='unit_price'
|
name='unit_price'
|
||||||
value={formik.values.unit_price}
|
value={formik.values.unit_price}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
|
|||||||
@@ -678,7 +678,13 @@ const DebtSupplierTab = () => {
|
|||||||
placeholder='Pilih Supplier'
|
placeholder='Pilih Supplier'
|
||||||
isMulti
|
isMulti
|
||||||
options={supplierOptions}
|
options={supplierOptions}
|
||||||
value={formik.values.supplierIds || []}
|
value={
|
||||||
|
(formik.values.supplierIds as
|
||||||
|
| { value: number; label: string }
|
||||||
|
| { value: number; label: string }[]
|
||||||
|
| null
|
||||||
|
| undefined) || []
|
||||||
|
}
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
formik.setFieldValue(
|
formik.setFieldValue(
|
||||||
'supplierIds',
|
'supplierIds',
|
||||||
@@ -702,7 +708,13 @@ const DebtSupplierTab = () => {
|
|||||||
label='Filter Berdasarkan'
|
label='Filter Berdasarkan'
|
||||||
placeholder='Pilih Filter Berdasarkan'
|
placeholder='Pilih Filter Berdasarkan'
|
||||||
options={dataTypeOptions}
|
options={dataTypeOptions}
|
||||||
value={formik.values.filterBy || null}
|
value={
|
||||||
|
(formik.values.filterBy as
|
||||||
|
| { value: string; label: string }
|
||||||
|
| { value: string; label: string }[]
|
||||||
|
| null
|
||||||
|
| undefined) || null
|
||||||
|
}
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
formik.setFieldValue(
|
formik.setFieldValue(
|
||||||
'filterBy',
|
'filterBy',
|
||||||
|
|||||||
Reference in New Issue
Block a user