Merged in feature/IO-2297-datetime-improvement (pull request #798)
IO-2297 added optimistic response and click outside function Approved-by: Patrick Fic
This commit is contained in:
@@ -25,6 +25,7 @@ export default function ProductionListDate({
|
||||
// }
|
||||
|
||||
//e.stopPropagation();
|
||||
|
||||
updateAlert({
|
||||
variables: {
|
||||
jobId: record.id,
|
||||
@@ -32,6 +33,11 @@ export default function ProductionListDate({
|
||||
[field]: date,
|
||||
},
|
||||
},
|
||||
optimisticResponse: {
|
||||
update_jobs: {
|
||||
[field]: date,
|
||||
},
|
||||
},
|
||||
}).then(() => {
|
||||
if (record.refetch) record.refetch();
|
||||
if (!time) {
|
||||
@@ -49,9 +55,11 @@ export default function ProductionListDate({
|
||||
(moment().add(1, "day").isSame(moment(record[field]), "day") &&
|
||||
"production-completion-soon"));
|
||||
}
|
||||
|
||||
return (
|
||||
<Dropdown
|
||||
//trigger={["click"]}
|
||||
trigger={["click"]}
|
||||
onVisibleChange={(v) => setVisible(v)}
|
||||
visible={visible}
|
||||
style={{
|
||||
height: "19px",
|
||||
|
||||
@@ -1075,6 +1075,9 @@ export const UPDATE_JOB = gql`
|
||||
lbr_adjustments
|
||||
suspended
|
||||
queued_for_parts
|
||||
scheduled_completion
|
||||
actual_in
|
||||
date_repairstarted
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
11
yarn.lock
11
yarn.lock
@@ -4312,14 +4312,9 @@ tslib@^1.11.1:
|
||||
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
|
||||
|
||||
tslib@^2.0.1, tslib@^2.1.0:
|
||||
|
||||
tslib@^2.3.1, tslib@^2.5.0:
|
||||
version "2.5.0"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf"
|
||||
integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==
|
||||
version "2.5.0"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf"
|
||||
integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==
|
||||
version "2.5.2"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.2.tgz#1b6f07185c881557b0ffa84b111a0106989e8338"
|
||||
integrity sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA==
|
||||
|
||||
tslib@^2.3.1, tslib@^2.5.0:
|
||||
version "2.5.0"
|
||||
|
||||
Reference in New Issue
Block a user