feat(core): block workflow update on interim change (#4397)

*  Add `updatedAt` to store

*  Set `updatedAt` in store

* 👕 Update FE types

* 👕 Update BE types

*  Set `updatedAt` on workflow open

*  Add endpoint check

*  Add first update check

* 🔥 Remove log

*  Simplify check

*  Make `makeWorkflow` more flexible

* 🗃️ Make `updatedAt` default consistent

* 🧪 Adjust tests checking for `updatedAt`

* 🧪 Add tests for interim changes block

* ✏️ Remove unneeded quotes

*  Simplify without using `-1`

* 👕 Simplify interfaces

* 🐛 Fix calls to `setWorkflowUpdatedAt` setter

* :track: Move update to API call

*  Restrict check to multiple users only

* 🧪 Add more tests

* 🐛 Account for activation outside of canvas

* ✏️ Add warning comment

* 🔥 Remove unneeded check

*  Revert to `new Date()` for `-1`

* 🐛 Fix display for never updated
This commit is contained in:
Iván Ovejero
2022-10-25 09:08:06 +02:00
committed by GitHub
parent 77233f2370
commit cddd012a2f
11 changed files with 208 additions and 10 deletions

View File

@@ -519,7 +519,8 @@ export default mixins(
this.isLoading = true;
try {
await this.restApi().updateWorkflow(this.$route.params.name, data);
const workflow = await this.restApi().updateWorkflow(this.$route.params.name, data);
this.$store.commit('setWorkflowUpdatedAt', workflow.updatedAt);
} catch (error) {
this.$showError(
error,