Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(workflowengine): use adapted mixin again in FileMimeType
Signed-off-by: Arthur Schiwon <[email protected]>
  • Loading branch information
blizzz committed Apr 3, 2025
commit 355b2ffda6804e79dbb582a498ee62739a883ed9
16 changes: 2 additions & 14 deletions apps/workflowengine/src/components/Checks/FileMimeType.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default {
NcSelect,
},
mixins: [
valueMixin
],

emits: ['update:model-value'],
Expand Down Expand Up @@ -79,7 +80,6 @@ export default {
id: 'application/pdf',
},
],
newValue: [],
}
},
props: {
Expand All @@ -88,9 +88,6 @@ export default {
default: '',
},
},
beforeMount() {
this.updateInternalValue()
},
computed: {
options() {
return [...this.predefinedTypes, this.customValue]
Expand Down Expand Up @@ -121,12 +118,7 @@ export default {
}
},
},
watch: {
modelValue() {
console.error("DEBUG: watch modelValue fileSystemTag")
this.updateInternalValue()
},
},

methods: {
validateRegex(string) {
const regexRegex = /^\/(.*)\/([gui]{0,3})$/
Expand All @@ -143,10 +135,6 @@ export default {
this.newValue = event.target.value || event.detail[0]
this.$emit('update:model-value', this.newValue)
},
updateInternalValue() {
console.error("DEBUG: updateInternalValue filemimetype " + this.modelValue)
this.newValue = this.modelValue
},
},
}
</script>
Expand Down
23 changes: 5 additions & 18 deletions apps/workflowengine/src/mixins/valueMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,19 @@
*/

const valueMixin = {
props: {
value: {
type: String,
default: '',
},
check: {
type: Object,
default: () => { return {} },
},
},
data() {
return {
newValue: '',
newValue: [],
}
},
watch: {
value: {
immediate: true,
handler(value) {
this.updateInternalValue(value)
},
modelValue() {
this.updateInternalValue()
},
},
methods: {
updateInternalValue(value) {
this.newValue = value
updateInternalValue() {
this.newValue = this.modelValue
},
},
}
Expand Down