Merge branch 'fix/adjustment-production-module' into 'development'

[FIX/FE] Adjustment Production Module (Recording & Uniformity)

See merge request mbugroup/lti-web-client!333
This commit is contained in:
Rivaldi A N S
2026-02-25 02:32:21 +00:00
5 changed files with 1194 additions and 672 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ import RecordingTable from '@/components/pages/production/recording/RecordingTab
const Recording = () => {
return (
<section className='w-full p-4 sm:p-0'>
<section className='w-full overflow-x-hidden'>
<RecordingTable />
</section>
);
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,15 @@
import { string, object } from 'yup';
export const RecordingFilterSchema = object().shape({
area_id: string().nullable(),
location_id: string().nullable(),
kandang_id: string().nullable(),
project_flock_kandang_id: string().nullable(),
});
export type RecordingFilterType = {
area_id: string | null;
location_id: string | null;
kandang_id: string | null;
project_flock_kandang_id: string | null;
};
@@ -0,0 +1,37 @@
import DataStateSkeleton from '@/components/helper/skeleton/DataStateSkeleton';
import Table from '@/components/Table';
import { Recording } from '@/types/api/production/recording';
import { ColumnDef } from '@tanstack/react-table';
const RecordingTableSkeleton = ({
columns,
icon,
title = 'Data Recording Belum Tersedia',
subtitle = 'Tidak ada data recording untuk saat ini.',
}: {
columns: ColumnDef<Recording>[];
icon: React.ReactNode;
title?: string;
subtitle?: string;
}) => {
return (
<div className='relative size-full'>
<Table
data={[]}
columns={columns}
isLoading={true}
className={{
skeletonCellClassName: 'animate-none w-full h-5 bg-base-content/4',
headerColumnClassName: 'whitespace-nowrap',
containerClassName: 'mb-0 overflow-hidden p-3',
tableWrapperClassName: 'overflow-hidden',
}}
/>
<div className='absolute inset-0 flex items-center justify-center'>
<DataStateSkeleton icon={icon} title={title} description={subtitle} />
</div>
</div>
);
};
export default RecordingTableSkeleton;
@@ -155,9 +155,12 @@ const UniformityForm = ({
const kandangOpts = selectedProjectFlockData.kandangs
.filter((kandang: Kandang) => {
if (formType === 'add') {
return approvedKandangIds.includes(kandang.id);
return (
approvedKandangIds.includes(kandang.id) &&
kandang.status === 'ACTIVE'
);
}
return true;
return kandang.status === 'ACTIVE';
})
.map((kandang: Kandang) => ({
value: kandang.id,