From 9754d19f879678ec2b2bb80f4514f605ee437868 Mon Sep 17 00:00:00 2001 From: AminGhasempoor Date: Mon, 8 Jan 2024 11:15:50 +0330 Subject: [PATCH] restructured plate number column in data table --- .../dashboard/loan-history/index.jsx | 22 +++++++++++++++++-- .../dashboard/machinary-office/index.jsx | 22 +++++++++++++++++-- .../navgan-loan-management/index.jsx | 22 +++++++++++++++++-- .../navgan-province-manager/index.jsx | 22 +++++++++++++++++-- .../dashboard/passenger-boss/index.jsx | 22 +++++++++++++++++-- .../transportation-assistance/index.jsx | 22 +++++++++++++++++-- 6 files changed, 120 insertions(+), 12 deletions(-) diff --git a/src/components/dashboard/loan-history/index.jsx b/src/components/dashboard/loan-history/index.jsx index 0d8bee8..8fe4bed 100644 --- a/src/components/dashboard/loan-history/index.jsx +++ b/src/components/dashboard/loan-history/index.jsx @@ -1,4 +1,4 @@ -import {Box, Typography} from "@mui/material"; +import {Box, Stack, Typography} from "@mui/material"; import {useMemo} from "react"; import {GET_LOAN_HISTORY} from "@/core/data/apiRoutes"; import {useTranslations} from "next-intl"; @@ -267,7 +267,25 @@ function DashboardLoanHistoryComponent() { filterFn: "contains", columnFilterModeOptions: ["contains", "equals", "notEquals"], Cell: ({renderedCellValue}) => ( - {renderedCellValue} + + + {renderedCellValue.split('-')[3]} + + + {renderedCellValue.split('-')[2]} + {renderedCellValue.split('-')[1]} + {renderedCellValue.split('-')[0]} + + ), }, { diff --git a/src/components/dashboard/machinary-office/index.jsx b/src/components/dashboard/machinary-office/index.jsx index 256ca87..dbf72f0 100644 --- a/src/components/dashboard/machinary-office/index.jsx +++ b/src/components/dashboard/machinary-office/index.jsx @@ -1,4 +1,4 @@ -import {Box, Typography} from "@mui/material"; +import {Box, Stack, Typography} from "@mui/material"; import {useMemo} from "react"; import {GET_MACHINARY_OFFICE} from "@/core/data/apiRoutes"; import {useTranslations} from "next-intl"; @@ -267,7 +267,25 @@ function DashboardMachinaryOfficeComponent() { filterFn: "contains", columnFilterModeOptions: ["contains", "equals", "notEquals"], Cell: ({renderedCellValue}) => ( - {renderedCellValue} + + + {renderedCellValue.split('-')[3]} + + + {renderedCellValue.split('-')[2]} + {renderedCellValue.split('-')[1]} + {renderedCellValue.split('-')[0]} + + ), }, { diff --git a/src/components/dashboard/navgan-loan-management/index.jsx b/src/components/dashboard/navgan-loan-management/index.jsx index d049e01..6c4b8f6 100644 --- a/src/components/dashboard/navgan-loan-management/index.jsx +++ b/src/components/dashboard/navgan-loan-management/index.jsx @@ -1,4 +1,4 @@ -import {Box, Typography} from "@mui/material"; +import {Box, Stack, Typography} from "@mui/material"; import {useMemo} from "react"; import {GET_LOAN_MANAGEMENT_NAVGAN} from "@/core/data/apiRoutes"; import {useTranslations} from "next-intl"; @@ -268,7 +268,25 @@ function DashboardNavganLoanManagementComponent() { filterFn: "contains", columnFilterModeOptions: ["contains", "equals", "notEquals"], Cell: ({renderedCellValue}) => ( - {renderedCellValue} + + + {renderedCellValue.split('-')[3]} + + + {renderedCellValue.split('-')[2]} + {renderedCellValue.split('-')[1]} + {renderedCellValue.split('-')[0]} + + ), }, { diff --git a/src/components/dashboard/navgan-province-manager/index.jsx b/src/components/dashboard/navgan-province-manager/index.jsx index fc8fcef..ea4a568 100644 --- a/src/components/dashboard/navgan-province-manager/index.jsx +++ b/src/components/dashboard/navgan-province-manager/index.jsx @@ -1,4 +1,4 @@ -import {Box, Typography} from "@mui/material"; +import {Box, Stack, Typography} from "@mui/material"; import {useMemo} from "react"; import {GET_NAVGAN_PROVINCE_MANAGER} from "@/core/data/apiRoutes"; import {useTranslations} from "next-intl"; @@ -211,7 +211,25 @@ function DashboardNavganProvinceManagerComponent() { filterFn: "contains", columnFilterModeOptions: ["contains", "equals", "notEquals"], Cell: ({renderedCellValue}) => ( - {renderedCellValue} + + + {renderedCellValue.split('-')[3]} + + + {renderedCellValue.split('-')[2]} + {renderedCellValue.split('-')[1]} + {renderedCellValue.split('-')[0]} + + ), }, { diff --git a/src/components/dashboard/passenger-boss/index.jsx b/src/components/dashboard/passenger-boss/index.jsx index 0da7cc0..8932e19 100644 --- a/src/components/dashboard/passenger-boss/index.jsx +++ b/src/components/dashboard/passenger-boss/index.jsx @@ -1,4 +1,4 @@ -import {Box, Typography} from "@mui/material"; +import {Box, Stack, Typography} from "@mui/material"; import {useMemo} from "react"; import {GET_PASSENGER_BOSS} from "@/core/data/apiRoutes"; import {useTranslations} from "next-intl"; @@ -268,7 +268,25 @@ function DashboardPassengerOfficeComponent() { filterFn: "contains", columnFilterModeOptions: ["contains", "equals", "notEquals"], Cell: ({renderedCellValue}) => ( - {renderedCellValue} + + + {renderedCellValue.split('-')[3]} + + + {renderedCellValue.split('-')[2]} + {renderedCellValue.split('-')[1]} + {renderedCellValue.split('-')[0]} + + ), }, { diff --git a/src/components/dashboard/transportation-assistance/index.jsx b/src/components/dashboard/transportation-assistance/index.jsx index 46ad2b6..2890c68 100644 --- a/src/components/dashboard/transportation-assistance/index.jsx +++ b/src/components/dashboard/transportation-assistance/index.jsx @@ -1,4 +1,4 @@ -import {Box, Typography} from "@mui/material"; +import {Box, Stack, Typography} from "@mui/material"; import {useMemo} from "react"; import {GET_TRANSPORTATION_ASSISTANCE} from "@/core/data/apiRoutes"; import {useTranslations} from "next-intl"; @@ -211,7 +211,25 @@ function DashboardTransportationAssistanceComponent() { filterFn: "contains", columnFilterModeOptions: ["contains", "equals", "notEquals"], Cell: ({renderedCellValue}) => ( - {renderedCellValue} + + + {renderedCellValue.split('-')[3]} + + + {renderedCellValue.split('-')[2]} + {renderedCellValue.split('-')[1]} + {renderedCellValue.split('-')[0]} + + ), }, {