Merged in hotfix/2021-08-12 (pull request #179)

Merged in hotfix/2021-08-12 (pull request #178)

Approved-by: Patrick Fic
This commit is contained in:
Patrick Fic
2021-08-12 21:30:32 +00:00
3 changed files with 21 additions and 16 deletions

View File

@@ -117,21 +117,22 @@ export function JobChecklistForm({
});
}
}
//Updae Owner Allow to Text
const updateOwnerResult = await updateOwner({
variables: {
ownerId: job.owner.id,
owner: { allow_text_message: values.allow_text_message },
},
});
if (!!updateOwnerResult.errors) {
notification["error"]({
message: t("checklist.errors.complete", {
error: JSON.stringify(result.errors),
}),
if (type === "intake" && job.owner && job.owner.id) {
//Updae Owner Allow to Text
const updateOwnerResult = await updateOwner({
variables: {
ownerId: job.owner.id,
owner: { allow_text_message: values.allow_text_message },
},
});
if (!!updateOwnerResult.errors) {
notification["error"]({
message: t("checklist.errors.complete", {
error: JSON.stringify(result.errors),
}),
});
}
}
setLoading(false);
@@ -176,7 +177,7 @@ export function JobChecklistForm({
initialValues={{
...(type === "intake" && {
addToProduction: true,
allow_text_message: job.owner.allow_text_message,
allow_text_message: job.owner && job.owner.allow_text_message,
scheduled_completion:
(job && job.scheduled_completion) ||
moment().businessAdd(

View File

@@ -25,7 +25,7 @@ export default function JobAdminDeleteIntake({ job }) {
_set: { deliverchecklist: null }
) {
id
deliverychecklist
deliverchecklist
}
}
`);

View File

@@ -1849,6 +1849,10 @@ export const QUERY_JOB_CHECKLISTS = gql`
scheduled_delivery
actual_delivery
production_vars
owner {
id
allow_text_message
}
bodyshop {
id
intakechecklist