mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
loader roleout on backoffice
This commit is contained in:
@@ -30,6 +30,7 @@ import {
|
|||||||
AdvancedTable,
|
AdvancedTable,
|
||||||
useServerTable,
|
useServerTable,
|
||||||
ModalFooter,
|
ModalFooter,
|
||||||
|
PageLoader,
|
||||||
} from "@ema-platform/ui";
|
} from "@ema-platform/ui";
|
||||||
import { LocationPage } from "../../../location/pages/LocationPage";
|
import { LocationPage } from "../../../location/pages/LocationPage";
|
||||||
import { CertificationPage } from "../../../certification/pages/CertificationPage";
|
import { CertificationPage } from "../../../certification/pages/CertificationPage";
|
||||||
@@ -292,11 +293,7 @@ function ProfessionTab() {
|
|||||||
];
|
];
|
||||||
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return (
|
return <PageLoader label="Loading Configuration…" height={400} />;
|
||||||
<Center py="xl">
|
|
||||||
<Loader />
|
|
||||||
</Center>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isError) {
|
if (isError) {
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import { useGetLocationsQuery } from '../api/location-api';
|
|||||||
import type { Location } from '../types/location';
|
import type { Location } from '../types/location';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useLocalized } from '@ema-platform/api';
|
import { useLocalized } from '@ema-platform/api';
|
||||||
|
import { PageLoader } from '@ema-platform/ui';
|
||||||
|
|
||||||
interface LocationTreeProps {
|
interface LocationTreeProps {
|
||||||
selectedId: string | null;
|
selectedId: string | null;
|
||||||
@@ -207,11 +208,7 @@ export function LocationTree({
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return (
|
return <PageLoader label="Loading Locations…" height={300} />;
|
||||||
<Center py="xl">
|
|
||||||
<Loader />
|
|
||||||
</Center>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import {
|
|||||||
import { useDisclosure } from '@mantine/hooks';
|
import { useDisclosure } from '@mantine/hooks';
|
||||||
import { IconSettings, IconMap, IconInfoCircle, IconPlus } from '@tabler/icons-react';
|
import { IconSettings, IconMap, IconInfoCircle, IconPlus } from '@tabler/icons-react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { notify, useErrorHandler, ModalFooter } from '@ema-platform/ui';
|
import { notify, useErrorHandler, ModalFooter, PageLoader } from '@ema-platform/ui';
|
||||||
import { LocationTree } from '../components/LocationTree';
|
import { LocationTree } from '../components/LocationTree';
|
||||||
import { LocationDetail } from '../components/LocationDetail';
|
import { LocationDetail } from '../components/LocationDetail';
|
||||||
import { LocationForm } from '../components/LocationForm';
|
import { LocationForm } from '../components/LocationForm';
|
||||||
@@ -103,11 +103,7 @@ export function LocationPage() {
|
|||||||
}, [selectedLocation, deleteLocation, closeDeleteModal, handleError]);
|
}, [selectedLocation, deleteLocation, closeDeleteModal, handleError]);
|
||||||
|
|
||||||
if (typesLoading) {
|
if (typesLoading) {
|
||||||
return (
|
return <PageLoader label="Loading Location Types…" height={400} />;
|
||||||
<Center py="xl">
|
|
||||||
<Loader />
|
|
||||||
</Center>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import {
|
|||||||
Title,
|
Title,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
import { IconChevronRight } from '@tabler/icons-react';
|
import { IconChevronRight } from '@tabler/icons-react';
|
||||||
import { AdvancedTable, useServerTable } from '@ema-platform/ui';
|
import { AdvancedTable, useServerTable, PageLoader } from '@ema-platform/ui';
|
||||||
import {
|
import {
|
||||||
STATUS_COLORS,
|
STATUS_COLORS,
|
||||||
STATUS_LABELS,
|
STATUS_LABELS,
|
||||||
@@ -37,11 +37,7 @@ export function LogisticsHeadDashboardPage() {
|
|||||||
const table = useServerTable();
|
const table = useServerTable();
|
||||||
|
|
||||||
if (queue.isLoading || mine.isLoading) {
|
if (queue.isLoading || mine.isLoading) {
|
||||||
return (
|
return <PageLoader label="Loading Dashboard…" height={400} />;
|
||||||
<Center h={300}>
|
|
||||||
<Loader />
|
|
||||||
</Center>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const unclaimed = queue.data?.items ?? [];
|
const unclaimed = queue.data?.items ?? [];
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import {
|
|||||||
AdvancedTable,
|
AdvancedTable,
|
||||||
useServerTable,
|
useServerTable,
|
||||||
type AdvancedColumn,
|
type AdvancedColumn,
|
||||||
|
PageLoader,
|
||||||
} from '@ema-platform/ui';
|
} from '@ema-platform/ui';
|
||||||
import {
|
import {
|
||||||
extractErrorMessage,
|
extractErrorMessage,
|
||||||
@@ -63,11 +64,7 @@ export function PaymentConfigPage() {
|
|||||||
const { setPageIndex, pageSize, setPageSize, paginate } = useServerTable();
|
const { setPageIndex, pageSize, setPageSize, paginate } = useServerTable();
|
||||||
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return (
|
return <PageLoader label="Loading Payment Configuration…" height={400} />;
|
||||||
<Center h={300}>
|
|
||||||
<Loader />
|
|
||||||
</Center>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import {
|
|||||||
Title,
|
Title,
|
||||||
} from '@mantine/core';
|
} from '@mantine/core';
|
||||||
import { IconInfoCircle } from '@tabler/icons-react';
|
import { IconInfoCircle } from '@tabler/icons-react';
|
||||||
import { AdvancedTable, notify, useServerTable } from '@ema-platform/ui';
|
import { AdvancedTable, notify, useServerTable, PageLoader } from '@ema-platform/ui';
|
||||||
import { useDateDisplayer } from '@ema-platform/shared';
|
import { useDateDisplayer } from '@ema-platform/shared';
|
||||||
import { extractErrorMessage } from '@ema-platform/api';
|
import { extractErrorMessage } from '@ema-platform/api';
|
||||||
import {
|
import {
|
||||||
@@ -61,11 +61,7 @@ export function ExamAppealsPage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return (
|
return <PageLoader label="Loading Exam Appeals…" height={400} />;
|
||||||
<Center py="xl">
|
|
||||||
<Loader />
|
|
||||||
</Center>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
if (isError) {
|
if (isError) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user