mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE): Refine Uniformity table headers and layout
This commit is contained in:
@@ -150,12 +150,18 @@ const UniformityDetail: React.FC<UniformityDetailProps> = ({
|
||||
() => [
|
||||
{
|
||||
accessorKey: 'label',
|
||||
header: 'Label',
|
||||
enableSorting: false,
|
||||
header: () => (
|
||||
<span className='font-medium text-sm leading-[150%]'>Label</span>
|
||||
),
|
||||
cell: (props) => props.row.original.label,
|
||||
},
|
||||
{
|
||||
accessorKey: 'value',
|
||||
header: 'Value',
|
||||
enableSorting: false,
|
||||
header: () => (
|
||||
<span className='font-medium text-sm leading-[150%]'>Value</span>
|
||||
),
|
||||
cell: (props) => {
|
||||
const id = props.row.original.id;
|
||||
const { info_umum, latest_approval } = initialValues!;
|
||||
@@ -258,12 +264,18 @@ const UniformityDetail: React.FC<UniformityDetailProps> = ({
|
||||
() => [
|
||||
{
|
||||
accessorKey: 'label',
|
||||
header: 'Label',
|
||||
enableSorting: false,
|
||||
header: () => (
|
||||
<span className='font-medium text-sm leading-[150%]'>Label</span>
|
||||
),
|
||||
cell: (props) => props.row.original.label,
|
||||
},
|
||||
{
|
||||
accessorKey: 'value',
|
||||
header: 'Value',
|
||||
enableSorting: false,
|
||||
header: () => (
|
||||
<span className='font-medium text-sm leading-[150%]'>Value</span>
|
||||
),
|
||||
cell: (props) => <span>{props.row.original.value}</span>,
|
||||
},
|
||||
],
|
||||
@@ -301,12 +313,18 @@ const UniformityDetail: React.FC<UniformityDetailProps> = ({
|
||||
() => [
|
||||
{
|
||||
accessorKey: 'label',
|
||||
header: 'Label',
|
||||
enableSorting: false,
|
||||
header: () => (
|
||||
<span className='font-medium text-sm leading-[150%]'>Label</span>
|
||||
),
|
||||
cell: (props) => props.row.original.label,
|
||||
},
|
||||
{
|
||||
accessorKey: 'value',
|
||||
header: 'Value',
|
||||
enableSorting: false,
|
||||
header: () => (
|
||||
<span className='font-medium text-sm leading-[150%]'>Value</span>
|
||||
),
|
||||
cell: (props) => <span>{props.row.original.value}</span>,
|
||||
},
|
||||
],
|
||||
@@ -326,10 +344,10 @@ const UniformityDetail: React.FC<UniformityDetailProps> = ({
|
||||
{/* Form Section */}
|
||||
<section className='w-full p-4'>
|
||||
{initialValues ? (
|
||||
<div className='flex flex-col gap-4'>
|
||||
<div className='flex flex-col gap-3'>
|
||||
{/* Info Umum */}
|
||||
<div className=''>
|
||||
<h2 className='text-base font-medium text-base-content/50 font-roboto mb-5'>
|
||||
<h2 className='text-base font-medium text-base-content/50 font-roboto leading-6 tracking-[0.15px] mb-1.5'>
|
||||
Informasi Umum
|
||||
</h2>
|
||||
<Table<DetailOptionType>
|
||||
@@ -346,7 +364,7 @@ const UniformityDetail: React.FC<UniformityDetailProps> = ({
|
||||
{/* Sampling and Range */}
|
||||
{initialValues.sampling && (
|
||||
<div className=''>
|
||||
<h2 className='text-base font-medium text-base-content/50 font-roboto mb-5'>
|
||||
<h2 className='text-base font-medium text-base-content/50 font-roboto leading-6 tracking-[0.15px] mb-1.5'>
|
||||
Sampling and Range
|
||||
</h2>
|
||||
<Table<DetailOptionType>
|
||||
@@ -364,7 +382,7 @@ const UniformityDetail: React.FC<UniformityDetailProps> = ({
|
||||
{/* Result */}
|
||||
{initialValues.result && (
|
||||
<div className=''>
|
||||
<h2 className='text-base font-medium text-base-content/50 font-roboto mb-5'>
|
||||
<h2 className='text-base font-medium text-base-content/50 font-roboto leading-6 tracking-[0.15px] mb-1.5'>
|
||||
Result
|
||||
</h2>
|
||||
<Table<DetailOptionType>
|
||||
|
||||
@@ -97,10 +97,10 @@ const UniformityDetailsPreview = ({
|
||||
{/* Form Section */}
|
||||
<section className='w-full p-4'>
|
||||
{info_umum ? (
|
||||
<div className='flex flex-col gap-4'>
|
||||
<div className='flex flex-col gap-3'>
|
||||
{/* Body Weight Details */}
|
||||
{uniformity_details && uniformity_details.length > 0 ? (
|
||||
<div className='mt-4'>
|
||||
<div className=''>
|
||||
<Table<BodyWeightData>
|
||||
data={tableData}
|
||||
columns={columnsUniformity}
|
||||
|
||||
@@ -124,6 +124,7 @@ const UniformityResultForm = () => {
|
||||
<span className='font-medium text-sm leading-[150%]'>Label</span>
|
||||
),
|
||||
cell: (props) => props.row.original.label,
|
||||
enableSorting: false,
|
||||
},
|
||||
{
|
||||
accessorKey: 'value',
|
||||
@@ -131,6 +132,7 @@ const UniformityResultForm = () => {
|
||||
<span className='font-medium text-sm leading-[150%]'>Value</span>
|
||||
),
|
||||
cell: (props) => <span>{props.row.original.value}</span>,
|
||||
enableSorting: false,
|
||||
},
|
||||
],
|
||||
[]
|
||||
@@ -168,6 +170,7 @@ const UniformityResultForm = () => {
|
||||
<span className='font-medium text-sm leading-[150%]'>Label</span>
|
||||
),
|
||||
cell: (props) => props.row.original.label,
|
||||
enableSorting: false,
|
||||
},
|
||||
{
|
||||
accessorKey: 'value',
|
||||
@@ -175,6 +178,7 @@ const UniformityResultForm = () => {
|
||||
<span className='font-medium text-sm leading-[150%]'>Value</span>
|
||||
),
|
||||
cell: (props) => <span>{props.row.original.value}</span>,
|
||||
enableSorting: false,
|
||||
},
|
||||
],
|
||||
[]
|
||||
@@ -197,23 +201,17 @@ const UniformityResultForm = () => {
|
||||
() => [
|
||||
{
|
||||
accessorKey: 'number',
|
||||
header: () => (
|
||||
<span className='font-medium text-sm leading-[150%]'>Number</span>
|
||||
),
|
||||
header: 'Number',
|
||||
cell: (props) => props.row.original.number,
|
||||
},
|
||||
{
|
||||
accessorKey: 'weight',
|
||||
header: () => (
|
||||
<span className='font-medium text-sm leading-[150%]'>Weight (g)</span>
|
||||
),
|
||||
header: 'Weight (g)',
|
||||
cell: (props) => <span>{props.row.original.weight}</span>,
|
||||
},
|
||||
{
|
||||
accessorKey: 'status',
|
||||
header: () => (
|
||||
<span className='font-medium text-sm leading-[150%]'>Status</span>
|
||||
),
|
||||
header: 'Status',
|
||||
cell: (props) => {
|
||||
const status = props.row.original.status;
|
||||
return status ? (
|
||||
@@ -251,7 +249,7 @@ const UniformityResultForm = () => {
|
||||
{verifyUniformityResult ? (
|
||||
<div className='flex flex-col gap-3'>
|
||||
<div className=''>
|
||||
<h2 className='text-base font-medium text-base-content/50 font-roboto mb-1.5'>
|
||||
<h2 className='text-base font-medium text-base-content/50 font-roboto leading-6 tracking-[0.15px] mb-1.5'>
|
||||
Sampling and Range
|
||||
</h2>
|
||||
<Table<DetailOptionType>
|
||||
@@ -266,7 +264,7 @@ const UniformityResultForm = () => {
|
||||
</div>
|
||||
|
||||
<div className=''>
|
||||
<h2 className='text-base font-medium text-base-content/50 font-roboto mb-1.5'>
|
||||
<h2 className='text-base font-medium text-base-content/50 font-roboto leading-6 tracking-[0.15px] mb-1.5'>
|
||||
Result
|
||||
</h2>
|
||||
<Table<DetailOptionType>
|
||||
|
||||
Reference in New Issue
Block a user