Implemented jobline upsert modal. Updated allocations display on jobline edit to include removal.

This commit is contained in:
Patrick Fic
2020-02-24 13:49:39 -08:00
parent c21f3c0098
commit 13faf47044
16 changed files with 495 additions and 49 deletions

View File

@@ -20,13 +20,19 @@ export default function AllocationsAssignmentContainer({
const [insertAllocation] = useMutation(INSERT_ALLOCATION);
const handleAssignment = () => {
insertAllocation({ variables: { alloc: { ...assignment } } }).then(r => {
notification["success"]({
message: t("employees.successes.save")
insertAllocation({ variables: { alloc: { ...assignment } } })
.then(r => {
notification["success"]({
message: t("allocations.successes.save")
});
visibilityState[1](false);
if (refetch) refetch();
})
.catch(error => {
notification["error"]({
message: t("employees.errors.saving", { message: error.message })
});
});
visibilityState[1](false);
if (refetch) refetch();
});
};
return (