diff --git a/apps/workflowengine/src/components/Check.vue b/apps/workflowengine/src/components/Check.vue index 8cfe5a8902..86005dae26 100644 --- a/apps/workflowengine/src/components/Check.vue +++ b/apps/workflowengine/src/components/Check.vue @@ -48,7 +48,7 @@ this.currentOption = Checks[this.check.class] this.currentOperator = this.operators.find((operator) => operator.operator === this.check.operator) this.$nextTick(() => { - this.$refs.checkSelector.$el.focus() + //this.$refs.checkSelector.$el.focus() }) }, computed: { diff --git a/apps/workflowengine/src/components/Event.vue b/apps/workflowengine/src/components/Event.vue index caf5c7631b..7b39ea571f 100644 --- a/apps/workflowengine/src/components/Event.vue +++ b/apps/workflowengine/src/components/Event.vue @@ -28,12 +28,15 @@ required: true } }, + mounted() { + this.updateEvent(this.currentEvent) + }, computed: { currentEvent() { - if (typeof this.rule.event === 'undefined') { + if (!this.rule.event) { return this.allEvents.length > 0 ? this.allEvents[0] : null } - return this.allEvents.find(event => event.id === this.rule.event) + return this.allEvents.find(event => event.entity === this.rule.entity && event.event === this.rule.event) }, allEvents() { return this.operation.events.map((entityEventName) => { @@ -45,7 +48,7 @@ return { entity: entityId, id: entityEventName, - event: eventName, + events: eventName, name: Event.displayName, icon: Entity.icon, checks: Entity.checks, @@ -58,8 +61,11 @@ }, methods: { updateEvent(event) { - this.$set(this.rule, 'event', event.id) - this.$emit('update', this.rule) + if (this.rule.entity !== event.entity || this.rule.events !== '["' + event.event + '"]') { + this.$set(this.rule, 'entity', event.entity) + this.$set(this.rule, 'event', event.event) + this.$emit('update', this.rule) + } } } } diff --git a/apps/workflowengine/src/components/Operation.vue b/apps/workflowengine/src/components/Operation.vue index 3e5de3198c..30f26eb6ec 100644 --- a/apps/workflowengine/src/components/Operation.vue +++ b/apps/workflowengine/src/components/Operation.vue @@ -71,6 +71,12 @@ } } + .actions__item:not(.colored) { + .icon { + filter: invert(1); + } + } + /* TODO: those should be provided by the backend, remove once ready */ .icon-block { background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8' standalone='no'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' height='32' width='32' version='1.1' viewBox='0 0 32 32'%3E%3Cpath fill='%23fff' d='m10.203 2-8.203 8.203v11.594l8.203 8.203h11.594l8.203-8.203v-11.594l-8.203-8.203h-11.594zm11.097 5.3092 3.345 3.3448-5.346 5.346 5.346 5.346-3.299 3.299-5.346-5.346-5.346 5.346-3.2992-3.299 5.3462-5.346-5.3462-5.346 3.2992-3.2992 5.346 5.3462 5.3-5.3918z'/%3E%3C/svg%3E"); diff --git a/apps/workflowengine/src/components/Rule.vue b/apps/workflowengine/src/components/Rule.vue index 59d66e4309..d1f5a088f5 100644 --- a/apps/workflowengine/src/components/Rule.vue +++ b/apps/workflowengine/src/components/Rule.vue @@ -1,5 +1,5 @@