mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 07:45:47 +00:00
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:
@@ -2,7 +2,7 @@ import RecordingTable from '@/components/pages/production/recording/RecordingTab
|
|||||||
|
|
||||||
const Recording = () => {
|
const Recording = () => {
|
||||||
return (
|
return (
|
||||||
<section className='w-full p-4 sm:p-0'>
|
<section className='w-full overflow-x-hidden'>
|
||||||
<RecordingTable />
|
<RecordingTable />
|
||||||
</section>
|
</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
|
const kandangOpts = selectedProjectFlockData.kandangs
|
||||||
.filter((kandang: Kandang) => {
|
.filter((kandang: Kandang) => {
|
||||||
if (formType === 'add') {
|
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) => ({
|
.map((kandang: Kandang) => ({
|
||||||
value: kandang.id,
|
value: kandang.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user