mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE-435): Allow realizations without kandang
This commit is contained in:
@@ -122,7 +122,7 @@ const ExpenseRequestForm = ({
|
||||
})),
|
||||
};
|
||||
|
||||
return expenseNonstock.kandang_id !== null
|
||||
return expenseNonstock.kandang_id
|
||||
? { ...basePayload, kandang_id: expenseNonstock.kandang_id }
|
||||
: basePayload;
|
||||
}),
|
||||
@@ -151,7 +151,7 @@ const ExpenseRequestForm = ({
|
||||
})),
|
||||
};
|
||||
|
||||
return expenseNonstock.kandang_id !== null
|
||||
return expenseNonstock.kandang_id
|
||||
? { ...basePayload, kandang_id: expenseNonstock.kandang_id }
|
||||
: basePayload;
|
||||
}
|
||||
@@ -199,7 +199,6 @@ const ExpenseRequestForm = ({
|
||||
// Auto-create expense item for location (without kandang)
|
||||
formik.setFieldValue('expense_nonstocks', [
|
||||
{
|
||||
kandang_id: null,
|
||||
cost_items: [
|
||||
{
|
||||
nonstock: undefined,
|
||||
@@ -222,7 +221,6 @@ const ExpenseRequestForm = ({
|
||||
if (kandangs.length === 0) {
|
||||
formik.setFieldValue('expense_nonstocks', [
|
||||
{
|
||||
kandang_id: null,
|
||||
cost_items: [
|
||||
{
|
||||
nonstock: undefined,
|
||||
|
||||
Reference in New Issue
Block a user