IO-2710 Job Assignment
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
This commit is contained in:
@@ -78,7 +78,7 @@ export function JobEmployeeAssignments({
|
|||||||
setVisibility(false);
|
setVisibility(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Assign
|
{t("allocations.actions.assign")}
|
||||||
</Button>
|
</Button>
|
||||||
<Button onClick={() => setVisibility(false)}>Close</Button>
|
<Button onClick={() => setVisibility(false)}>Close</Button>
|
||||||
</Space>
|
</Space>
|
||||||
|
|||||||
@@ -43,13 +43,13 @@ export function JobEmployeeAssignmentsContainer({
|
|||||||
});
|
});
|
||||||
if (refetch) refetch();
|
if (refetch) refetch();
|
||||||
|
|
||||||
insertAuditTrail({
|
if (!!!result.errors) {
|
||||||
jobid: job.id,
|
insertAuditTrail({
|
||||||
operation: AuditTrailMapping.jobassignmentchange(operation, name),
|
jobid: job.id,
|
||||||
type: "jobassignmentchange",
|
operation: AuditTrailMapping.jobassignmentchange(operation, name),
|
||||||
});
|
type: "jobassignmentchange",
|
||||||
|
});
|
||||||
if (!!result.errors) {
|
} else {
|
||||||
notification["error"]({
|
notification["error"]({
|
||||||
message: t("jobs.errors.assigning", {
|
message: t("jobs.errors.assigning", {
|
||||||
message: JSON.stringify(result.errors),
|
message: JSON.stringify(result.errors),
|
||||||
@@ -67,18 +67,19 @@ export function JobEmployeeAssignmentsContainer({
|
|||||||
variables: { jobId: job.id, job: { [empAssignment]: null } },
|
variables: { jobId: job.id, job: { [empAssignment]: null } },
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!!result.errors) {
|
if (!!!result.errors) {
|
||||||
|
insertAuditTrail({
|
||||||
|
jobid: job.id,
|
||||||
|
operation: AuditTrailMapping.jobassignmentremoved(operation),
|
||||||
|
type: "jobassignmentremoved",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
notification["error"]({
|
notification["error"]({
|
||||||
message: t("jobs.errors.assigning", {
|
message: t("jobs.errors.assigning", {
|
||||||
message: JSON.stringify(result.errors),
|
message: JSON.stringify(result.errors),
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
insertAuditTrail({
|
|
||||||
jobid: job.id,
|
|
||||||
operation: AuditTrailMapping.jobassignmentremoved(operation),
|
|
||||||
type: "jobassignmentremoved",
|
|
||||||
});
|
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user