mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 21:41:57 +00:00
refactor(FE-316, 438): Move uniformity types into shared types file
This commit is contained in:
@@ -9,7 +9,6 @@ import DrawerHeader from '@/components/helper/drawer/DrawerHeader';
|
||||
import Table from '@/components/Table';
|
||||
import Badge from '@/components/Badge';
|
||||
import Tooltip from '@/components/Tooltip';
|
||||
import { type OptionType } from '@/components/input/SelectInput';
|
||||
import RequirePermission from '@/components/helper/RequirePermission';
|
||||
import { UniformityDetail as UniformityDetailType } from '@/types/api/uniformity/uniformity';
|
||||
import { formatDate } from '@/lib/helper';
|
||||
@@ -20,10 +19,7 @@ import {
|
||||
getStatusIndicatorColor,
|
||||
getStatusText,
|
||||
} from '@/components/pages/uniformity/uniformity-utils';
|
||||
|
||||
export type DetailOptionType = OptionType & {
|
||||
id: string;
|
||||
};
|
||||
import { DetailOptionType } from '@/types/api/uniformity/uniformity';
|
||||
|
||||
interface UniformityDetailProps {
|
||||
initialValues: UniformityDetailType;
|
||||
|
||||
@@ -14,19 +14,13 @@ import {
|
||||
import Table from '@/components/Table';
|
||||
import Badge from '@/components/Badge';
|
||||
import { formatNumber } from '@/lib/helper';
|
||||
import { DetailOptionType } from '@/components/pages/uniformity/detail/UniformityDetail';
|
||||
import { DetailOptionType } from '@/types/api/uniformity/uniformity';
|
||||
import {
|
||||
getWeightStatusColor,
|
||||
getWeightStatusIndicatorColor,
|
||||
getWeightStatusText,
|
||||
} from '@/components/pages/uniformity/uniformity-utils';
|
||||
|
||||
type BodyWeightData = {
|
||||
id: string;
|
||||
number: number;
|
||||
weight: number;
|
||||
status?: 'ideal' | 'outside';
|
||||
};
|
||||
import { BodyWeightData } from '@/types/api/uniformity/uniformity';
|
||||
|
||||
interface UniformityDetailsPreviewProps {
|
||||
info_umum: UniformityInfoUmum;
|
||||
|
||||
@@ -10,12 +10,7 @@ import { useUiStore } from '@/stores/ui/ui.store';
|
||||
import { useUniformityStore } from '@/stores/uniformity/uniformity.store';
|
||||
import RequirePermission from '@/components/helper/RequirePermission';
|
||||
import Table from '@/components/Table';
|
||||
|
||||
type BodyWeightData = {
|
||||
id: string;
|
||||
number: number;
|
||||
weight: number;
|
||||
};
|
||||
import { BodyWeightData } from '@/types/api/uniformity/uniformity';
|
||||
|
||||
const UniformityPreviewForm = () => {
|
||||
const setExpandedDrawerOpen = useUiStore((s) => s.setExpandedDrawerOpen);
|
||||
|
||||
@@ -21,14 +21,8 @@ import {
|
||||
getWeightStatusIndicatorColor,
|
||||
getWeightStatusText,
|
||||
} from '@/components/pages/uniformity/uniformity-utils';
|
||||
import { DetailOptionType } from '@/components/pages/uniformity/detail/UniformityDetail';
|
||||
|
||||
type BodyWeightData = {
|
||||
id: string;
|
||||
number: number;
|
||||
weight: number;
|
||||
status?: 'ideal' | 'outside';
|
||||
};
|
||||
import { DetailOptionType } from '@/types/api/uniformity/uniformity';
|
||||
import { BodyWeightData } from '@/types/api/uniformity/uniformity';
|
||||
|
||||
const UniformityResultForm = () => {
|
||||
const router = useRouter();
|
||||
|
||||
+12
@@ -87,3 +87,15 @@ export type VerifyUniformityPayload = {
|
||||
file: File;
|
||||
week: number;
|
||||
};
|
||||
|
||||
// ==================== OTHER TYPES ====================
|
||||
export type BodyWeightData = {
|
||||
id: string;
|
||||
number: number;
|
||||
weight: number;
|
||||
status?: 'ideal' | 'outside';
|
||||
};
|
||||
|
||||
export type DetailOptionType = OptionType & {
|
||||
id: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user