Feature/amiriis qr for factor
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
"react-leaflet": "^4.2.1",
|
"react-leaflet": "^4.2.1",
|
||||||
"react-leaflet-draw": "^0.20.4",
|
"react-leaflet-draw": "^0.20.4",
|
||||||
"react-leaflet-markercluster": "^4.2.1",
|
"react-leaflet-markercluster": "^4.2.1",
|
||||||
|
"react-qr-code": "^2.0.18",
|
||||||
"react-toastify": "^10.0.5",
|
"react-toastify": "^10.0.5",
|
||||||
"sass": "^1.75.0",
|
"sass": "^1.75.0",
|
||||||
"sharp": "^0.33.4",
|
"sharp": "^0.33.4",
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import {
|
|||||||
Typography,
|
Typography,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { useReducer, useState } from "react";
|
import { useReducer, useState } from "react";
|
||||||
|
import QRCode from "react-qr-code";
|
||||||
|
|
||||||
const initialState = {
|
const initialState = {
|
||||||
submittingCreateFactor: false,
|
submittingCreateFactor: false,
|
||||||
@@ -147,15 +148,53 @@ const CreateFactorContent = ({ row, mutate, rowId, setOpenCreateFactorDialog })
|
|||||||
ریال
|
ریال
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
{!factorCreated && (
|
{factorCreated ? (
|
||||||
|
<Grid item xs={12}>
|
||||||
|
<Stack
|
||||||
|
direction={"row"}
|
||||||
|
alignItems={"center"}
|
||||||
|
justifyContent={"space-between"}
|
||||||
|
sx={{
|
||||||
|
bgcolor: "rgb(229, 246, 253)",
|
||||||
|
color: "rgb(1, 67, 97)",
|
||||||
|
p: 2,
|
||||||
|
borderRadius: 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Stack spacing={1}>
|
||||||
|
{row.original.is_foreign ? (
|
||||||
|
<>
|
||||||
|
<Typography fontWeight={"bold"}>
|
||||||
|
میتوانید برای پرداخت، بارکد را اسکن کنید
|
||||||
|
</Typography>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<Typography variant="body2">
|
||||||
|
لینک پرداخت به شماره همراه مورد نظر ارسال شد
|
||||||
|
</Typography>
|
||||||
|
<Typography fontWeight={"bold"}>
|
||||||
|
همچنین میتوانید برای پرداخت، بارکد را اسکن کنید
|
||||||
|
</Typography>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</Stack>
|
||||||
|
<Box sx={{ p: 1, bgcolor: "background.default", borderRadius: 0.5 }}>
|
||||||
|
<QRCode value={row.original?.link || ""} size={60} />
|
||||||
|
</Box>
|
||||||
|
</Stack>
|
||||||
|
</Grid>
|
||||||
|
) : (
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<Stack spacing={1}>
|
<Stack spacing={1}>
|
||||||
<Alert severity="warning">
|
<Alert severity="warning">
|
||||||
پس از صدور فاکتور، امکان ویرایش مبالغ بیمه و داغی وجود نخواهد داشت
|
پس از صدور فاکتور، امکان ویرایش مبالغ بیمه و داغی وجود نخواهد داشت
|
||||||
</Alert>
|
</Alert>
|
||||||
<Alert severity="info">
|
{!row.original.is_foreign && (
|
||||||
لینک پرداخت فاکتور به شماره {row.original?.driver_phone_number} ارسال می شود.
|
<Alert severity="info">
|
||||||
</Alert>
|
لینک پرداخت فاکتور به شماره {row.original?.driver_phone_number} ارسال می شود.
|
||||||
|
</Alert>
|
||||||
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
</Grid>
|
</Grid>
|
||||||
)}
|
)}
|
||||||
@@ -172,15 +211,17 @@ const CreateFactorContent = ({ row, mutate, rowId, setOpenCreateFactorDialog })
|
|||||||
>
|
>
|
||||||
بستن
|
بستن
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
{!row.original.is_foreign && (
|
||||||
key={"submittingSms"}
|
<Button
|
||||||
onClick={handleSendSMS}
|
key={"submittingSms"}
|
||||||
variant="outlined"
|
onClick={handleSendSMS}
|
||||||
color="warning"
|
variant="outlined"
|
||||||
disabled={state.submittingSms}
|
color="warning"
|
||||||
>
|
disabled={state.submittingSms}
|
||||||
{state.submittingSms ? "درحال ارسال مجدد پیام پرداخت..." : "ارسال مجدد پیام پرداخت"}
|
>
|
||||||
</Button>
|
{state.submittingSms ? "درحال ارسال مجدد پیام پرداخت..." : "ارسال مجدد پیام پرداخت"}
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
<Button
|
<Button
|
||||||
key={"submittingCheckFactor"}
|
key={"submittingCheckFactor"}
|
||||||
onClick={handleCheckPaymentStatus}
|
onClick={handleCheckPaymentStatus}
|
||||||
|
|||||||
@@ -10,19 +10,20 @@ const HeaderBottom = () => {
|
|||||||
direction="row"
|
direction="row"
|
||||||
justifyContent={"space-between"}
|
justifyContent={"space-between"}
|
||||||
sx={{
|
sx={{
|
||||||
px: 2,
|
pl: 2,
|
||||||
py: 1,
|
|
||||||
background: (theme) => theme.palette.primary2.main,
|
background: (theme) => theme.palette.primary2.main,
|
||||||
}}
|
}}
|
||||||
spacing={2}
|
spacing={2}
|
||||||
>
|
>
|
||||||
<Stack spacing={4} alignItems={"center"} direction={"row"}>
|
<Stack sx={{ py: 0.5 }} spacing={4} alignItems={"center"} direction={"row"}>
|
||||||
<Image alt="" priority src={RmsLogo.src} width={50} height={54} />
|
<Image alt="" priority src={RmsLogo.src} width={40} height={43} />
|
||||||
<Stack alignItems={"center"} spacing={1}>
|
<Stack alignItems={"center"} spacing={0.5}>
|
||||||
<Typography variant="h6" sx={{ color: (theme) => theme.palette.primary2.contrastText }}>
|
<Typography sx={{ color: (theme) => theme.palette.primary2.contrastText }}>
|
||||||
سامانه جامع راهداری
|
سامانه جامع راهداری
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography sx={{ color: (theme) => theme.palette.primary2.contrastText }}>rms.rmto.ir</Typography>
|
<Typography variant="caption" sx={{ color: (theme) => theme.palette.primary2.contrastText }}>
|
||||||
|
rms.rmto.ir
|
||||||
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack sx={{ display: { xs: "none", sm: "flex" } }}>
|
<Stack sx={{ display: { xs: "none", sm: "flex" } }}>
|
||||||
@@ -30,13 +31,11 @@ const HeaderBottom = () => {
|
|||||||
sx={{
|
sx={{
|
||||||
p: 1,
|
p: 1,
|
||||||
background: "#fff",
|
background: "#fff",
|
||||||
border: 2,
|
borderTopLeftRadius: 8,
|
||||||
borderColor: (theme) => theme.palette.primary.main,
|
borderBottomLeftRadius: 8,
|
||||||
borderRadius: 2,
|
|
||||||
borderStyle: "dashed",
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Image alt="" priority src={HeaderLogo.src} width={140} height={32} />
|
<Image alt="" priority src={HeaderLogo.src} width={117} height={27} />
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import moment from "jalali-moment";
|
|||||||
import { headerMenu } from "@/core/utils/headerMenu";
|
import { headerMenu } from "@/core/utils/headerMenu";
|
||||||
import SidebarMenu from "./Sidebar/SidebarMenu";
|
import SidebarMenu from "./Sidebar/SidebarMenu";
|
||||||
|
|
||||||
const drawerWidth = 300;
|
const drawerWidth = 275;
|
||||||
const headersHeight = 72;
|
const headersHeight = 51;
|
||||||
|
|
||||||
const Main = styled(Stack, { shouldForwardProp: (prop) => prop !== "open" })(({ theme, open }) => ({
|
const Main = styled(Stack, { shouldForwardProp: (prop) => prop !== "open" })(({ theme, open }) => ({
|
||||||
flexGrow: 1,
|
flexGrow: 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user