mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE): Use formatTitleCase for category text in StatusBadge
This commit is contained in:
@@ -10,7 +10,7 @@ import React, {
|
||||
import useSWR from 'swr';
|
||||
import { Icon } from '@iconify/react';
|
||||
import { SortingState, CellContext, ColumnDef } from '@tanstack/react-table';
|
||||
import { cn, formatDate, formatNumber } from '@/lib/helper';
|
||||
import { cn, formatDate, formatNumber, formatTitleCase } from '@/lib/helper';
|
||||
import RequirePermission from '@/components/helper/RequirePermission';
|
||||
import Modal, { useModal } from '@/components/Modal';
|
||||
import Button from '@/components/Button';
|
||||
@@ -790,11 +790,7 @@ const RecordingTable = () => {
|
||||
props.row.original.project_flock?.project_flock_category;
|
||||
if (!category) return '-';
|
||||
const color = category === 'LAYING' ? 'info' : 'warning';
|
||||
return (
|
||||
<Badge variant='soft' color={color}>
|
||||
{category}
|
||||
</Badge>
|
||||
);
|
||||
return <StatusBadge color={color} text={formatTitleCase(category)} />;
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user