refer reason
This commit is contained in:
@@ -7,14 +7,13 @@ import Link from "next/link";
|
|||||||
|
|
||||||
const PrintHistory = ({attachment}) => {
|
const PrintHistory = ({attachment}) => {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
color="primary"
|
color="primary"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
size="small"
|
size="small"
|
||||||
component={Link}
|
component={Link}
|
||||||
href={attachment.file}
|
href={attachment.file || ""}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
sx={{ textTransform: "unset", alignSelf: "center", mx: 0.25 }}
|
sx={{ textTransform: "unset", alignSelf: "center", mx: 0.25 }}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ import {useEffect, useState} from "react";
|
|||||||
const action_name = {
|
const action_name = {
|
||||||
"confirm" : "تایید",
|
"confirm" : "تایید",
|
||||||
"reject":"عدم تایید",
|
"reject":"عدم تایید",
|
||||||
"refer":"ارجاع"
|
"refer":"ارجاع",
|
||||||
|
"reserve" : "رزرو"
|
||||||
}
|
}
|
||||||
|
|
||||||
const TableContent = ({rowId}) => {
|
const TableContent = ({rowId}) => {
|
||||||
|
|||||||
@@ -271,17 +271,20 @@ function DashboardPassengerOfficeComponent() {
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessorFn: (row) => row.latest_history.expert_description,
|
accessorFn: (row) => row.latest_history ? row.latest_history.expert_description : null,
|
||||||
id: "latest_history.expert_description",
|
id: "latest_history.expert_description",
|
||||||
header: t("PassengerBoss.refer_reason"),
|
header: t("PassengerBoss.refer_reason"),
|
||||||
enableColumnFilter: false,
|
enableColumnFilter: false,
|
||||||
datatype: "text",
|
datatype: "text",
|
||||||
filterFn: "contains",
|
filterFn: "contains",
|
||||||
columnFilterModeOptions: ["contains", "equals", "notEquals"],
|
columnFilterModeOptions: ["contains", "equals", "notEquals"],
|
||||||
Cell: ({row}) => {
|
Cell: ({ row }) => {
|
||||||
|
const latestHistory = row.original.latest_history;
|
||||||
return (
|
return (
|
||||||
<Typography variant="body2">{row.original.latest_history.action === 'refer'? row.original.latest_history.expert_description : null}</Typography>
|
<Typography variant="body2">
|
||||||
)
|
{latestHistory && latestHistory.action === 'refer' ? latestHistory.expert_description : null}
|
||||||
|
</Typography>
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -413,17 +413,20 @@ function DashboardTransportationAssistanceComponent() {
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessorFn: (row) => row.latest_history.expert_description,
|
accessorFn: (row) => row.latest_history ? row.latest_history.expert_description : null,
|
||||||
id: "latest_history.expert_description",
|
id: "latest_history.expert_description",
|
||||||
header: t("TransportationAssistance.refer_reason"),
|
header: t("TransportationAssistance.refer_reason"),
|
||||||
enableColumnFilter: false,
|
enableColumnFilter: false,
|
||||||
datatype: "text",
|
datatype: "text",
|
||||||
filterFn: "contains",
|
filterFn: "contains",
|
||||||
columnFilterModeOptions: ["contains", "equals", "notEquals"],
|
columnFilterModeOptions: ["contains", "equals", "notEquals"],
|
||||||
Cell: ({row}) => {
|
Cell: ({ row }) => {
|
||||||
|
const latestHistory = row.original.latest_history;
|
||||||
return (
|
return (
|
||||||
<Typography variant="body2">{row.original.latest_history.action === 'refer'? row.original.latest_history.expert_description : null}</Typography>
|
<Typography variant="body2">
|
||||||
)
|
{latestHistory && latestHistory.action === 'refer' ? latestHistory.expert_description : null}
|
||||||
|
</Typography>
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user