mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 07:15:44 +00:00
refactor(FE-170): replace FormHeader with custom header in GradingForm and RecordingForm for improved layout and navigation
This commit is contained in:
@@ -11,7 +11,6 @@ import NumberInput from '@/components/input/NumberInput';
|
|||||||
import SelectInput, { OptionType } from '@/components/input/SelectInput';
|
import SelectInput, { OptionType } from '@/components/input/SelectInput';
|
||||||
import CheckboxInput from '@/components/input/CheckboxInput';
|
import CheckboxInput from '@/components/input/CheckboxInput';
|
||||||
import ConfirmationModal from '@/components/modal/ConfirmationModal';
|
import ConfirmationModal from '@/components/modal/ConfirmationModal';
|
||||||
import { FormHeader } from '@/components/helper/form/FormHeader';
|
|
||||||
import { RecordingApi } from '@/services/api/production';
|
import { RecordingApi } from '@/services/api/production';
|
||||||
import {
|
import {
|
||||||
CreateGrowingRecordingPayload,
|
CreateGrowingRecordingPayload,
|
||||||
@@ -1058,12 +1057,21 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<section className='w-full'>
|
<section className='w-full'>
|
||||||
<FormHeader
|
<header className='flex flex-col gap-4'>
|
||||||
type={type}
|
<Button
|
||||||
title='Recording'
|
href='/production/recording'
|
||||||
backUrl='/production/recording'
|
variant='link'
|
||||||
/>
|
className='w-fit p-0 text-primary'
|
||||||
|
>
|
||||||
|
<Icon icon='uil:arrow-left' width={24} height={24} />
|
||||||
|
Kembali
|
||||||
|
</Button>
|
||||||
|
<h1 className='text-2xl font-bold text-center'>
|
||||||
|
{type === 'add' && 'Tambah Recording'}
|
||||||
|
{type === 'edit' && 'Edit Recording'}
|
||||||
|
{type === 'detail' && 'Detail Recording'}
|
||||||
|
</h1>
|
||||||
|
</header>
|
||||||
{/* Project Flock Info Card */}
|
{/* Project Flock Info Card */}
|
||||||
{projectFlockKandangLookup && (
|
{projectFlockKandangLookup && (
|
||||||
<div className='flex items-center gap-2 mb-4'>
|
<div className='flex items-center gap-2 mb-4'>
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import NumberInput from '@/components/input/NumberInput';
|
|||||||
import SelectInput, { OptionType } from '@/components/input/SelectInput';
|
import SelectInput, { OptionType } from '@/components/input/SelectInput';
|
||||||
import CheckboxInput from '@/components/input/CheckboxInput';
|
import CheckboxInput from '@/components/input/CheckboxInput';
|
||||||
import ConfirmationModal from '@/components/modal/ConfirmationModal';
|
import ConfirmationModal from '@/components/modal/ConfirmationModal';
|
||||||
import { FormHeader } from '@/components/helper/form/FormHeader';
|
|
||||||
import {
|
import {
|
||||||
CreateGradingPayload,
|
CreateGradingPayload,
|
||||||
UpdateGradingPayload,
|
UpdateGradingPayload,
|
||||||
@@ -298,12 +297,21 @@ const GradingForm = ({ type = 'add', initialValues }: GradingFormProps) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<section className='w-full'>
|
<section className='w-full'>
|
||||||
<FormHeader
|
<header className='flex flex-col gap-4'>
|
||||||
type={type}
|
<Button
|
||||||
title='Grading Telur'
|
href='/production/recording'
|
||||||
backUrl='/production/recording'
|
variant='link'
|
||||||
/>
|
className='w-fit p-0 text-primary'
|
||||||
|
>
|
||||||
|
<Icon icon='uil:arrow-left' width={24} height={24} />
|
||||||
|
Kembali
|
||||||
|
</Button>
|
||||||
|
<h1 className='text-2xl font-bold text-center'>
|
||||||
|
{type === 'add' && 'Tambah Grading'}
|
||||||
|
{type === 'edit' && 'Edit Grading'}
|
||||||
|
{type === 'detail' && 'Detail Grading'}
|
||||||
|
</h1>
|
||||||
|
</header>
|
||||||
{/* Project Flock Info Card */}
|
{/* Project Flock Info Card */}
|
||||||
<div className='flex items-center gap-2 mb-4'>
|
<div className='flex items-center gap-2 mb-4'>
|
||||||
{/* Form Steps */}
|
{/* Form Steps */}
|
||||||
|
|||||||
Reference in New Issue
Block a user