formatting

This commit is contained in:
Adnan Zahir
2026-04-04 09:57:01 +07:00
parent c6d8533190
commit 107d412c10
@@ -990,7 +990,9 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
const items: Array<ProductWarehouse | null | undefined> = []; const items: Array<ProductWarehouse | null | undefined> = [];
if (isResponseSuccess(stockProducts)) { if (isResponseSuccess(stockProducts)) {
items.push(...((stockProducts.data as unknown as ProductWarehouse[]) ?? [])); items.push(
...((stockProducts.data as unknown as ProductWarehouse[]) ?? [])
);
} }
if (isResponseSuccess(depletionProductsData)) { if (isResponseSuccess(depletionProductsData)) {
@@ -1000,11 +1002,15 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
} }
if (isResponseSuccess(eggProductsData)) { if (isResponseSuccess(eggProductsData)) {
items.push(...((eggProductsData.data as unknown as ProductWarehouse[]) ?? [])); items.push(
...((eggProductsData.data as unknown as ProductWarehouse[]) ?? [])
);
} }
initialValues?.stocks?.forEach((stock) => { initialValues?.stocks?.forEach((stock) => {
items.push((stock.product_warehouse as ProductWarehouse | undefined) ?? null); items.push(
(stock.product_warehouse as ProductWarehouse | undefined) ?? null
);
}); });
initialValues?.depletions?.forEach((depletion) => { initialValues?.depletions?.forEach((depletion) => {
items.push( items.push(
@@ -1012,7 +1018,9 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
); );
}); });
initialValues?.eggs?.forEach((egg) => { initialValues?.eggs?.forEach((egg) => {
items.push((egg.product_warehouse as ProductWarehouse | undefined) ?? null); items.push(
(egg.product_warehouse as ProductWarehouse | undefined) ?? null
);
}); });
mergeKnownProductWarehouses(items); mergeKnownProductWarehouses(items);