mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 15:25:46 +00:00
refactor(FE): Show additional flock info in recording form
This commit is contained in:
@@ -1658,6 +1658,54 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
|||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Additional Information Fields */}
|
||||||
|
{(projectFlockKandangLookup || projectFlockKandangDetail) && (
|
||||||
|
<div
|
||||||
|
className={
|
||||||
|
'grid grid-cols-4 gap-4 pt-4 border-t border-gray-200'
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<span className='text-sm text-gray-600'>Gudang</span>
|
||||||
|
<p className='font-semibold'>
|
||||||
|
{projectFlockKandangLookup?.warehouse?.name ||
|
||||||
|
initialValues?.warehouse?.name ||
|
||||||
|
'-'}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span className='text-sm text-gray-600'>Umur</span>
|
||||||
|
<p className='font-semibold'>
|
||||||
|
{nextDayRecording
|
||||||
|
? `Hari ke-${nextDayRecording.next_day} (Minggu ke-${Math.ceil(nextDayRecording.next_day / 7)})`
|
||||||
|
: initialValues?.day
|
||||||
|
? `Hari ke-${initialValues.day} (Minggu ke-${Math.ceil(initialValues.day / 7)})`
|
||||||
|
: '-'}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span className='text-sm text-gray-600'>Standard FCR</span>
|
||||||
|
<p className='font-semibold'>
|
||||||
|
{projectFlockKandangLookup?.project_flock?.fcr?.name ||
|
||||||
|
initialValues?.project_flock?.fcr?.name ||
|
||||||
|
'-'}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span className='text-sm text-gray-600'>
|
||||||
|
Standard Produksi
|
||||||
|
</span>
|
||||||
|
<p className='font-semibold'>
|
||||||
|
{projectFlockKandangLookup?.project_flock
|
||||||
|
?.production_standard_id
|
||||||
|
? `ID: ${projectFlockKandangLookup.project_flock.production_standard_id}`
|
||||||
|
: initialValues?.project_flock?.production_standart
|
||||||
|
?.name || '-'}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</Card>
|
</Card>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
+2
@@ -6,6 +6,7 @@ import { Location } from '@/types/api/master-data/location';
|
|||||||
import { BaseApproval, BaseMetadata } from '@/types/api/api-general';
|
import { BaseApproval, BaseMetadata } from '@/types/api/api-general';
|
||||||
import { Nonstock } from '@/types/api/master-data/nonstock';
|
import { Nonstock } from '@/types/api/master-data/nonstock';
|
||||||
import { ProductionStandard } from '@/types/api/master-data/production-standard';
|
import { ProductionStandard } from '@/types/api/master-data/production-standard';
|
||||||
|
import { Warehouse } from '@/types/api/master-data/warehouse';
|
||||||
|
|
||||||
export type BaseProjectFlock = {
|
export type BaseProjectFlock = {
|
||||||
id: number;
|
id: number;
|
||||||
@@ -71,6 +72,7 @@ export type ProjectFlockKandangLookup = {
|
|||||||
kandang_id: number;
|
kandang_id: number;
|
||||||
kandang: Kandang;
|
kandang: Kandang;
|
||||||
project_flock: ProjectFlock;
|
project_flock: ProjectFlock;
|
||||||
|
warehouse: Warehouse;
|
||||||
quantity: number;
|
quantity: number;
|
||||||
available_quantity?: number;
|
available_quantity?: number;
|
||||||
population: number;
|
population: number;
|
||||||
|
|||||||
Reference in New Issue
Block a user