mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 07:45:47 +00:00
fix(FE): fix export report expense & fix report closing table view & fix project flock form set disable inofrmasi umum on edit
This commit is contained in:
@@ -68,7 +68,7 @@ const ProjectFlockDetail = ({
|
||||
latestApproval: projectFlock?.approval,
|
||||
approvalLines: PROJECT_FLOCK_APPROVAL_LINE,
|
||||
moduleName: 'PROJECT_FLOCKS',
|
||||
moduleId: projectFlock?.id.toString() ?? '',
|
||||
moduleId: projectFlock?.id?.toString() ?? '',
|
||||
});
|
||||
|
||||
const { approvals: kandangApprovals, isLoading: kandangApprovalsLoading } =
|
||||
|
||||
@@ -47,9 +47,7 @@ import Card from '@/components/Card';
|
||||
import ProjectFlockKandangTable from '@/components/pages/production/project-flock/form/ProjectFlockKandangTable';
|
||||
import { Nonstock } from '@/types/api/master-data/nonstock';
|
||||
import { useUiStore } from '@/stores/ui/ui.store';
|
||||
import Link from 'next/link';
|
||||
import DrawerHeader from '@/components/helper/drawer/DrawerHeader';
|
||||
import { formatDate } from '@/lib/helper';
|
||||
|
||||
interface ProjectFlockFormProps {
|
||||
formType?: 'add' | 'edit' | 'detail';
|
||||
@@ -260,7 +258,9 @@ const ProjectFlockForm = ({
|
||||
const categoryChangeHandler = (val: OptionType | OptionType[] | null) => {
|
||||
formik.setFieldValue('category', (val as OptionType)?.value);
|
||||
formik.setFieldValue('category_option', val);
|
||||
formik.setFieldTouched('category', true);
|
||||
if (val == null) {
|
||||
formik.setFieldTouched('category', true);
|
||||
}
|
||||
};
|
||||
|
||||
// Submit Handler
|
||||
@@ -788,7 +788,7 @@ const ProjectFlockForm = ({
|
||||
}
|
||||
errorMessage={formik.errors.area_id as string}
|
||||
isClearable
|
||||
isDisabled={formType === 'detail'}
|
||||
isDisabled={formType != 'add'}
|
||||
/>
|
||||
<SelectInput
|
||||
required
|
||||
@@ -807,7 +807,7 @@ const ProjectFlockForm = ({
|
||||
}
|
||||
errorMessage={formik.errors.location_id as string}
|
||||
isClearable
|
||||
isDisabled={formType === 'detail' || disabledLocation}
|
||||
isDisabled={formType != 'add' || disabledLocation}
|
||||
/>
|
||||
<SelectInput
|
||||
required
|
||||
@@ -837,7 +837,7 @@ const ProjectFlockForm = ({
|
||||
}
|
||||
errorMessage={formik.errors.flock_name as string}
|
||||
isClearable
|
||||
isDisabled={formType === 'detail'}
|
||||
isDisabled={formType != 'add'}
|
||||
/>
|
||||
<SelectInput
|
||||
required
|
||||
@@ -851,7 +851,7 @@ const ProjectFlockForm = ({
|
||||
isError={formik.touched.fcr_id && Boolean(formik.errors.fcr_id)}
|
||||
errorMessage={formik.errors.fcr_id as string}
|
||||
isClearable
|
||||
isDisabled={formType === 'detail'}
|
||||
isDisabled={formType != 'add'}
|
||||
/>
|
||||
<SelectInput
|
||||
required
|
||||
@@ -864,7 +864,7 @@ const ProjectFlockForm = ({
|
||||
}
|
||||
errorMessage={formik.errors.category as string}
|
||||
isClearable
|
||||
isDisabled={formType === 'detail'}
|
||||
isDisabled={formType != 'add'}
|
||||
/>
|
||||
<NumberInput
|
||||
name='period'
|
||||
|
||||
Reference in New Issue
Block a user