confirm navgan province manager show tanafos and sakht period
This commit is contained in:
@@ -155,14 +155,9 @@ function DashboardMachinaryOfficeComponent() {
|
||||
],
|
||||
[]
|
||||
);
|
||||
const data = [{
|
||||
id: 1,
|
||||
vehicle_type: "مینی بوس"
|
||||
}]
|
||||
return (
|
||||
<Box sx={{px: 3}}>
|
||||
<DataTable
|
||||
data={data}
|
||||
tableUrl={GET_MACHINARY_OFFICE}
|
||||
columns={columns}
|
||||
selectableRow={false}
|
||||
|
||||
@@ -2,7 +2,6 @@ import UploadSystem from "@/core/components/UploadSystem";
|
||||
import useNotification from "@/lib/app/hooks/useNotification";
|
||||
import useRequest from "@/lib/app/hooks/useRequest";
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
DialogActions,
|
||||
DialogContent,
|
||||
@@ -20,6 +19,7 @@ import {useEffect, useState} from "react";
|
||||
import * as Yup from "yup";
|
||||
import CustomAccordion from "@/core/components/CustomAccordion";
|
||||
import ImageContent from "@/core/components/ImageContent";
|
||||
import NumberShowBox from "@/core/components/NumberShowBox";
|
||||
|
||||
const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog, handleSizeChangeClick}) => {
|
||||
const t = useTranslations();
|
||||
@@ -137,35 +137,6 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog, handleSizeChangeCl
|
||||
return null;
|
||||
};
|
||||
|
||||
const numberShowBox = () => {
|
||||
return (
|
||||
<>
|
||||
<Box sx={{border: '1px solid #ccc', p: 2, mb: 2, borderRadius: '8px'}}>
|
||||
<Typography
|
||||
sx={{color: "primary.main", fontWeight: 500}}>{t("ConfirmDialog.proposed_amount")}</Typography>
|
||||
<Typography pt={1}>
|
||||
{isNaN((detailsList?.data?.proposed_amount) / 10)
|
||||
? ""
|
||||
: ((detailsList?.data?.proposed_amount) / 10).toLocaleString()}{" "}
|
||||
{t("ConfirmDialog.unit")}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box sx={{border: '1px solid #ccc', p: 2, mb: 2, borderRadius: '8px'}}>
|
||||
<Typography sx={{
|
||||
color: "primary.main",
|
||||
fontWeight: 500
|
||||
}}>{t("ConfirmDialog.approved_amount")} {t("secondary.passenger-boss")}</Typography>
|
||||
<Typography pt={1}>
|
||||
{isNaN((detailsList?.data?.approved_amount) / 10)
|
||||
? ""
|
||||
: ((detailsList?.data?.approved_amount) / 10).toLocaleString()}{" "}
|
||||
{t("ConfirmDialog.unit")}
|
||||
</Typography>
|
||||
</Box>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<DialogContent>
|
||||
@@ -173,7 +144,26 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog, handleSizeChangeCl
|
||||
<Grid item xs={hasImageShown ? 6 : 12}>
|
||||
{loading ? <LinearProgress/> :
|
||||
<>
|
||||
{numberShowBox()}
|
||||
<NumberShowBox
|
||||
showNumber={(detailsList?.data?.proposed_amount) / 10}
|
||||
headerTitle={t("ConfirmDialog.proposed_amount")}
|
||||
unitTitle={t("ConfirmDialog.unit")}
|
||||
/>
|
||||
<NumberShowBox
|
||||
showNumber={(detailsList?.data?.approved_amount) / 10}
|
||||
headerTitle={t("ConfirmDialog.approved_amount_title")}
|
||||
unitTitle={t("ConfirmDialog.unit")}
|
||||
/>
|
||||
<NumberShowBox
|
||||
showNumber={detailsList?.data?.sakht_amount}
|
||||
headerTitle={t("ConfirmDialog.sakht_amount")}
|
||||
unitTitle={t("ConfirmDialog.sakht_amount_day")}
|
||||
/>
|
||||
<NumberShowBox
|
||||
showNumber={detailsList?.data?.tanafos_amount}
|
||||
headerTitle={t("ConfirmDialog.tanafos_amount")}
|
||||
unitTitle={t("ConfirmDialog.tanafos_amount_month")}
|
||||
/>
|
||||
{renderCustomAccordions()}
|
||||
</>
|
||||
}
|
||||
|
||||
@@ -175,14 +175,9 @@ function DashboardPassengerOfficeComponent() {
|
||||
],
|
||||
[]
|
||||
);
|
||||
const data = [{
|
||||
id: 1,
|
||||
vehicle_type: "مینی بوس"
|
||||
}]
|
||||
return (
|
||||
<Box sx={{px: 3}}>
|
||||
<DataTable
|
||||
data={data}
|
||||
tableUrl={GET_PASSENGER_BOSS}
|
||||
columns={columns}
|
||||
selectableRow={false}
|
||||
|
||||
@@ -194,14 +194,9 @@ function DashboardTransportationAssistanceComponent() {
|
||||
],
|
||||
[]
|
||||
);
|
||||
const data = [{
|
||||
id: 1,
|
||||
vehicle_type: "مینی بوس"
|
||||
}]
|
||||
return (
|
||||
<Box sx={{px: 3}}>
|
||||
<DataTable
|
||||
data={data}
|
||||
tableUrl={GET_TRANSPORTATION_ASSISTANCE}
|
||||
columns={columns}
|
||||
selectableRow={false}
|
||||
|
||||
Reference in New Issue
Block a user