mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
Merge branch 'fix/list-daily-checklist' into 'development'
[FIX/FE] List Daily Checklist See merge request mbugroup/lti-web-client!355
This commit is contained in:
@@ -136,7 +136,7 @@ export function ListDailyChecklistContent() {
|
|||||||
|
|
||||||
const handleEdit = (item: DailyChecklist) => {
|
const handleEdit = (item: DailyChecklist) => {
|
||||||
const formattedDate = new Date(item.date).toISOString().split('T')[0];
|
const formattedDate = new Date(item.date).toISOString().split('T')[0];
|
||||||
const kandangId = item.kandang.id;
|
const kandangId = item.kandang?.id ?? '';
|
||||||
const category = item.category;
|
const category = item.category;
|
||||||
|
|
||||||
router.push(
|
router.push(
|
||||||
@@ -335,7 +335,7 @@ export function ListDailyChecklistContent() {
|
|||||||
accessorKey: 'kandang',
|
accessorKey: 'kandang',
|
||||||
header: 'Kandang',
|
header: 'Kandang',
|
||||||
enableSorting: false,
|
enableSorting: false,
|
||||||
cell: ({ row }) => row.original.kandang.name,
|
cell: ({ row }) => row.original.kandang?.name ?? '-',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessorKey: 'category',
|
accessorKey: 'category',
|
||||||
@@ -627,7 +627,7 @@ export function ListDailyChecklistContent() {
|
|||||||
<div className='flex justify-between text-sm'>
|
<div className='flex justify-between text-sm'>
|
||||||
<span className='text-gray-600'>Kandang:</span>
|
<span className='text-gray-600'>Kandang:</span>
|
||||||
<span className='font-medium text-gray-900'>
|
<span className='font-medium text-gray-900'>
|
||||||
{selectedItem.kandang.name}
|
{selectedItem.kandang?.name ?? '-'}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className='flex justify-between text-sm'>
|
<div className='flex justify-between text-sm'>
|
||||||
@@ -687,7 +687,7 @@ export function ListDailyChecklistContent() {
|
|||||||
<div className='flex justify-between text-sm'>
|
<div className='flex justify-between text-sm'>
|
||||||
<span className='text-gray-600'>Kandang:</span>
|
<span className='text-gray-600'>Kandang:</span>
|
||||||
<span className='font-medium text-gray-900'>
|
<span className='font-medium text-gray-900'>
|
||||||
{selectedItem.kandang.name}
|
{selectedItem.kandang?.name ?? '-'}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className='flex justify-between text-sm'>
|
<div className='flex justify-between text-sm'>
|
||||||
@@ -760,7 +760,7 @@ export function ListDailyChecklistContent() {
|
|||||||
<div className='flex justify-between text-sm'>
|
<div className='flex justify-between text-sm'>
|
||||||
<span className='text-gray-600'>Kandang:</span>
|
<span className='text-gray-600'>Kandang:</span>
|
||||||
<span className='font-medium text-gray-900'>
|
<span className='font-medium text-gray-900'>
|
||||||
{selectedItem.kandang.name}
|
{selectedItem.kandang?.name ?? '-'}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className='flex justify-between text-sm'>
|
<div className='flex justify-between text-sm'>
|
||||||
|
|||||||
+1
-1
@@ -172,7 +172,7 @@ export function DetailDailyChecklistContent() {
|
|||||||
const checklistData = {
|
const checklistData = {
|
||||||
id: rawDetailChecklist?.id,
|
id: rawDetailChecklist?.id,
|
||||||
date: rawDetailChecklist?.date,
|
date: rawDetailChecklist?.date,
|
||||||
kandang_id: rawDetailChecklist?.kandang.id,
|
kandang_id: rawDetailChecklist?.kandang?.id,
|
||||||
category: rawDetailChecklist?.category,
|
category: rawDetailChecklist?.category,
|
||||||
status: rawDetailChecklist?.status,
|
status: rawDetailChecklist?.status,
|
||||||
reject_reason: rawDetailChecklist?.reject_reason,
|
reject_reason: rawDetailChecklist?.reject_reason,
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ export type BaseDailyChecklist = {
|
|||||||
status: string;
|
status: string;
|
||||||
category: string;
|
category: string;
|
||||||
date: string;
|
date: string;
|
||||||
kandang: Pick<BaseKandang, 'id' | 'name' | 'status' | 'capacity'>;
|
kandang?: Pick<BaseKandang, 'id' | 'name' | 'status' | 'capacity'>;
|
||||||
total_phase: number;
|
total_phase: number;
|
||||||
total_activity: number;
|
total_activity: number;
|
||||||
progress: number;
|
progress: number;
|
||||||
|
|||||||
Reference in New Issue
Block a user