Commit 604a6604 authored by janis.streib's avatar janis.streib 🦉
Browse files

FIX: reduce reducers to reducer return types

parent 2c3e7ee6
Pipeline #92700 passed with stages
in 7 minutes and 39 seconds
......@@ -3,20 +3,20 @@
:title="`${object_attribute.descriptionDetail}\n\nName: ${attribute_name}\nReference: ${attribute_reference_name}\nReferencing: ${attribute_referencing}`"
:label="object_attribute.descriptionObjTypeScope">
<b-form-input :value="attribute_preset || ''"
v-if="(input_reducer() === null || input_reducer() instanceof Boolean)&& (object_attribute.dataType == 'text' || object_attribute.dataType=='fqdn')"
:name="attribute_name" :disabled="input_reducer() instanceof Boolean && !input_reducer()"
v-if="(input_reducer === null || input_reducer instanceof Boolean)&& (object_attribute.dataType == 'text' || object_attribute.dataType=='fqdn')"
:name="attribute_name" :disabled="input_reducer instanceof Boolean && !input_reducer"
></b-form-input>
<b-form-input :value="attribute_preset || ''"
v-if="(input_reducer() === null || input_reducer() instanceof Boolean) && (object_attribute.dataType.includes('integer'))" type="number"
:name="attribute_name" :disabled="input_reducer() instanceof Boolean && !input_reducer()"
v-if="(input_reducer === null || input_reducer instanceof Boolean) && (object_attribute.dataType.includes('integer'))" type="number"
:name="attribute_name" :disabled="input_reducer instanceof Boolean && !input_reducer"
></b-form-input>
<b-checkbox :checked="attribute_preset || false" :name="attribute_name"
v-if="object_attribute.dataType=='boolean'" :disabled="input_reducer() instanceof Boolean && !input_reducer()"></b-checkbox>
<b-form-select :name="attribute_name" v-if="input_reducer() instanceof Object" v-model="attribute_preset">
v-if="object_attribute.dataType=='boolean'" :disabled="input_reducer instanceof Boolean && !input_reducer"></b-checkbox>
<b-form-select :name="attribute_name" v-if="input_reducer instanceof Object" v-model="attribute_preset">
<template v-slot:first>
<b-form-select-option :value="null" disabled>-- Auswahl treffen --</b-form-select-option>
</template>
<template v-for="(data,key) in input_reducer()" >
<template v-for="(data,key) in input_reducer" >
<b-form-select-option :key="key" :value="key">{{data.display_name}}</b-form-select-option>
</template>
</b-form-select>
......@@ -35,7 +35,7 @@
attribute_preset: null,
attribute_name: String,
input_reducer: {
type: Function,
type: Object,
default() {
return null
}
......
......@@ -100,9 +100,7 @@
selections[t.name] = {'display_name': t.name}
}
self.create_record_reducer = {
'type': function () {
return selections
}
'type': selections
}
})
}
......
......@@ -102,9 +102,7 @@
selections[t.name] = {'display_name': disp_name}
}
self.create_fqdn_reducer = {
'type': function () {
return selections
}
'type': selections
}
})
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment