Merged in hotfix/2021-08-12 (pull request #178)
hotfix/2021-08-12 Approved-by: Patrick Fic
This commit is contained in:
@@ -117,21 +117,22 @@ export function JobChecklistForm({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (type === "intake" && job.owner && job.owner.id) {
|
||||||
//Updae Owner Allow to Text
|
//Updae Owner Allow to Text
|
||||||
const updateOwnerResult = await updateOwner({
|
const updateOwnerResult = await updateOwner({
|
||||||
variables: {
|
variables: {
|
||||||
ownerId: job.owner.id,
|
ownerId: job.owner.id,
|
||||||
owner: { allow_text_message: values.allow_text_message },
|
owner: { allow_text_message: values.allow_text_message },
|
||||||
},
|
},
|
||||||
});
|
|
||||||
|
|
||||||
if (!!updateOwnerResult.errors) {
|
|
||||||
notification["error"]({
|
|
||||||
message: t("checklist.errors.complete", {
|
|
||||||
error: JSON.stringify(result.errors),
|
|
||||||
}),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!!updateOwnerResult.errors) {
|
||||||
|
notification["error"]({
|
||||||
|
message: t("checklist.errors.complete", {
|
||||||
|
error: JSON.stringify(result.errors),
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
@@ -176,7 +177,7 @@ export function JobChecklistForm({
|
|||||||
initialValues={{
|
initialValues={{
|
||||||
...(type === "intake" && {
|
...(type === "intake" && {
|
||||||
addToProduction: true,
|
addToProduction: true,
|
||||||
allow_text_message: job.owner.allow_text_message,
|
allow_text_message: job.owner && job.owner.allow_text_message,
|
||||||
scheduled_completion:
|
scheduled_completion:
|
||||||
(job && job.scheduled_completion) ||
|
(job && job.scheduled_completion) ||
|
||||||
moment().businessAdd(
|
moment().businessAdd(
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ export default function JobAdminDeleteIntake({ job }) {
|
|||||||
mutation DELETE_DELIVERY($jobId: uuid!) {
|
mutation DELETE_DELIVERY($jobId: uuid!) {
|
||||||
update_jobs_by_pk(
|
update_jobs_by_pk(
|
||||||
pk_columns: { id: $jobId }
|
pk_columns: { id: $jobId }
|
||||||
_set: { deliverychecklist: null }
|
_set: { deliverchecklist: null }
|
||||||
) {
|
) {
|
||||||
id
|
id
|
||||||
deliverychecklist
|
deliverchecklist
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
|
|||||||
@@ -1849,6 +1849,10 @@ export const QUERY_JOB_CHECKLISTS = gql`
|
|||||||
scheduled_delivery
|
scheduled_delivery
|
||||||
actual_delivery
|
actual_delivery
|
||||||
production_vars
|
production_vars
|
||||||
|
owner {
|
||||||
|
id
|
||||||
|
allow_text_message
|
||||||
|
}
|
||||||
bodyshop {
|
bodyshop {
|
||||||
id
|
id
|
||||||
intakechecklist
|
intakechecklist
|
||||||
|
|||||||
Reference in New Issue
Block a user