diff --git a/src/components/Dashboard/Service/Service.tsx b/src/components/Dashboard/Service/Service.tsx index e4fcde5..994a77f 100644 --- a/src/components/Dashboard/Service/Service.tsx +++ b/src/components/Dashboard/Service/Service.tsx @@ -202,7 +202,7 @@ export function StatusTable(props: { }   diff --git a/src/pages/Group/GroupDetail/Service.tsx b/src/pages/Group/GroupDetail/Service.tsx index 69773fc..1a313b3 100644 --- a/src/pages/Group/GroupDetail/Service.tsx +++ b/src/pages/Group/GroupDetail/Service.tsx @@ -77,11 +77,12 @@ export function ChipGet(props: { function RowService(props: { service: ServiceDetailData, + autoMail: Dispatch>, groupID: number, template: TemplateData, reload: Dispatch> }) { - const {service, groupID, template, reload} = props; + const {service, autoMail, groupID, template, reload} = props; const [open, setOpen] = React.useState(false); const classes = useRowStyles(); const serviceCode = groupID + "-" + service.service_template.type + ('000' + service.service_number).slice(-3); @@ -118,6 +119,7 @@ function RowService(props: { !service.pass && >, service: ServiceDetailData reload: Dispatch> }) { - const {id, service, reload} = props; + const {id, autoMail, service, reload} = props; const [open, setOpen] = React.useState(false); const {enqueueSnackbar} = useSnackbar(); @@ -183,6 +186,9 @@ export function ExaminationDialog(props: { console.log(res.error); enqueueSnackbar(String(res.error), {variant: "error"}); } + if (autoMail !== undefined) { + autoMail("pass_service"); + } setOpen(false); reload(true); }) @@ -362,10 +368,11 @@ export function EnableDialog(props: { export default function Service(props: { data: GroupDetailData, + autoMail: Dispatch>, template: TemplateData, reload: Dispatch> }): any { - const {data, template, reload} = props; + const {data, autoMail, template, reload} = props; const classes = useStyles(); if (data.services !== undefined) { @@ -400,6 +407,7 @@ export default function Service(props: {