mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 23:35:45 +00:00
refactor(FE-438): Fix Uniformity component sample data and imports
This commit is contained in:
@@ -22,71 +22,71 @@ interface GaugeChartData {
|
|||||||
const UniformityChart = () => {
|
const UniformityChart = () => {
|
||||||
// TODO: Replace with actual API call
|
// TODO: Replace with actual API call
|
||||||
const barChartData: BarChartData[] = [
|
const barChartData: BarChartData[] = [
|
||||||
// {
|
{
|
||||||
// name: '48-52',
|
name: '48-52',
|
||||||
// uv: 80,
|
uv: 80,
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// name: '52-56',
|
name: '52-56',
|
||||||
// uv: 120,
|
uv: 120,
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// name: '56-60',
|
name: '56-60',
|
||||||
// uv: 160,
|
uv: 160,
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// name: '60-64',
|
name: '60-64',
|
||||||
// uv: 200,
|
uv: 200,
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// name: '64-68',
|
name: '64-68',
|
||||||
// uv: 160,
|
uv: 160,
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// name: '68-72',
|
name: '68-72',
|
||||||
// uv: 120,
|
uv: 120,
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// name: '72-76',
|
name: '72-76',
|
||||||
// uv: 80,
|
uv: 80,
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// name: '76-80',
|
name: '76-80',
|
||||||
// uv: 120,
|
uv: 120,
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// name: '84-88',
|
name: '84-88',
|
||||||
// uv: 160,
|
uv: 160,
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// name: '88-92',
|
name: '88-92',
|
||||||
// uv: 200,
|
uv: 200,
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// name: '92-96',
|
name: '92-96',
|
||||||
// uv: 160,
|
uv: 160,
|
||||||
// },
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
// TODO: Replace with actual API call
|
// TODO: Replace with actual API call
|
||||||
const gaugeChartData: GaugeChartData = {
|
|
||||||
value: 0,
|
|
||||||
label: '',
|
|
||||||
kandang: 'Kandang Cirangga',
|
|
||||||
week: 'Week 2',
|
|
||||||
currentValue: 512,
|
|
||||||
totalValue: 1024,
|
|
||||||
};
|
|
||||||
|
|
||||||
// const gaugeChartData: GaugeChartData = {
|
// const gaugeChartData: GaugeChartData = {
|
||||||
// value: 52,
|
// value: 0,
|
||||||
// label: 'Uniformity',
|
// label: '',
|
||||||
// kandang: 'Kandang Cirangga',
|
// kandang: 'Kandang Cirangga',
|
||||||
// week: 'Week 2',
|
// week: 'Week 2',
|
||||||
// currentValue: 512,
|
// currentValue: 512,
|
||||||
// totalValue: 1024,
|
// totalValue: 1024,
|
||||||
// };
|
// };
|
||||||
|
|
||||||
|
const gaugeChartData: GaugeChartData = {
|
||||||
|
value: 52,
|
||||||
|
label: 'Uniformity',
|
||||||
|
kandang: 'Kandang Cirangga',
|
||||||
|
week: 'Week 2',
|
||||||
|
currentValue: 512,
|
||||||
|
totalValue: 1024,
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className='w-full grid grid-cols-1 xl:grid-cols-2 2xl:grid-cols-4 gap-4'>
|
<section className='w-full grid grid-cols-1 xl:grid-cols-2 2xl:grid-cols-4 gap-4'>
|
||||||
<Card
|
<Card
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { ColumnDef, SortingState } from '@tanstack/react-table';
|
|||||||
import { cn, formatDate } from '@/lib/helper';
|
import { cn, formatDate } from '@/lib/helper';
|
||||||
import Button from '@/components/Button';
|
import Button from '@/components/Button';
|
||||||
import UniformityChart from '@/components/pages/uniformity/UniformityChart';
|
import UniformityChart from '@/components/pages/uniformity/UniformityChart';
|
||||||
// import UniformityStat from '@/components/pages/uniformity/chart/UniformityStat';
|
|
||||||
import { useTableFilter } from '@/services/hooks/useTableFilter';
|
import { useTableFilter } from '@/services/hooks/useTableFilter';
|
||||||
import { UniformityApi } from '@/services/api/uniformity';
|
import { UniformityApi } from '@/services/api/uniformity';
|
||||||
import { type Uniformity } from '@/types/api/uniformity/uniformity';
|
import { type Uniformity } from '@/types/api/uniformity/uniformity';
|
||||||
@@ -20,7 +19,7 @@ import { useModal } from '@/components/Modal';
|
|||||||
import ConfirmationModal from '@/components/modal/ConfirmationModal';
|
import ConfirmationModal from '@/components/modal/ConfirmationModal';
|
||||||
import toast from 'react-hot-toast';
|
import toast from 'react-hot-toast';
|
||||||
import Card from '@/components/Card';
|
import Card from '@/components/Card';
|
||||||
import UniformityTableSkeleton from './skeleton/UniformityTableSkeleton';
|
import UniformityTableSkeleton from '@/components/pages/uniformity/skeleton/UniformityTableSkeleton';
|
||||||
import RequirePermission from '@/components/helper/RequirePermission';
|
import RequirePermission from '@/components/helper/RequirePermission';
|
||||||
import { useUniformityStore } from '@/stores/uniformity/uniformity.store';
|
import { useUniformityStore } from '@/stores/uniformity/uniformity.store';
|
||||||
import FloatingActionsButton from '@/components/FloatingActionsButton';
|
import FloatingActionsButton from '@/components/FloatingActionsButton';
|
||||||
@@ -423,12 +422,6 @@ const UniformityTable = ({ refresh }: { refresh?: () => void }) => {
|
|||||||
|
|
||||||
<div className='my-4 divider'></div>
|
<div className='my-4 divider'></div>
|
||||||
|
|
||||||
{/*<section>
|
|
||||||
<UniformityStat />
|
|
||||||
</section>*/}
|
|
||||||
|
|
||||||
<div className='my-4'></div>
|
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<UniformityChart />
|
<UniformityChart />
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import RequirePermission from '@/components/helper/RequirePermission';
|
|||||||
import { UniformityDetail as UniformityDetailType } from '@/types/api/uniformity/uniformity';
|
import { UniformityDetail as UniformityDetailType } from '@/types/api/uniformity/uniformity';
|
||||||
import { formatDate } from '@/lib/helper';
|
import { formatDate } from '@/lib/helper';
|
||||||
import { useUiStore } from '@/stores/ui/ui.store';
|
import { useUiStore } from '@/stores/ui/ui.store';
|
||||||
import UniformityDetailsPreview from './UniformityDetailsPreview';
|
import UniformityDetailsPreview from '@/components/pages/uniformity/detail/UniformityDetailsPreview';
|
||||||
import {
|
import {
|
||||||
getStatusColor,
|
getStatusColor,
|
||||||
getStatusIndicatorColor,
|
getStatusIndicatorColor,
|
||||||
|
|||||||
Reference in New Issue
Block a user