diff --git a/public/js/apps/vbform/presets.js b/public/js/apps/vbform/presets.js index 00f2ab34f..70f23809f 100644 --- a/public/js/apps/vbform/presets.js +++ b/public/js/apps/vbform/presets.js @@ -102,7 +102,24 @@ export default [ type: 'vertragsbestandteillist', guioptions: { title: 'Befristung', - vertragsbestandteiltyp: 'vertragsbestandteilfreitext' + vertragsbestandteiltyp: 'vertragsbestandteilfreitext', + childdefaults: { + guioptions: { + canhavegehaltsbestandteile: false, + disabled: [ + 'freitexttyp' + ], + hidden: [ + 'titel', + 'freitext' + ] + }, + data: { + freitexttyp: "befristung", + titel: "Befristung", + freitext: "befristeter Dienstvertrag" + } + } }, children: [] } diff --git a/public/js/components/vbform/vertragsbestandteil_freitext.js b/public/js/components/vbform/vertragsbestandteil_freitext.js index cd61b836a..f4742a4ab 100644 --- a/public/js/components/vbform/vertragsbestandteil_freitext.js +++ b/public/js/components/vbform/vertragsbestandteil_freitext.js @@ -7,7 +7,7 @@ export default {
- @@ -21,19 +21,19 @@ export default {
-
+
 
-
+
 
- +
`, components: { @@ -76,6 +76,9 @@ export default { removeVB: function() { this.$emit('removeVB', {id: this.config.guioptions.id}); }, + getGehaltsbestandteilePayload: function() { + return (!this.$refs?.gbh === undefined) ? this.$refs.gbh.getPayload() : []; + }, getPayload: function() { return { type: 'vertragsbestandteilfreitext', @@ -87,7 +90,7 @@ export default { kuendigungsrelevant: this.kuendigungsrelevant, gueltigkeit: this.$refs.gueltigkeit.getPayload() }, - gbs: this.$refs.gbh.getPayload() + gbs: this.getGehaltsbestandteilePayload() }; } } diff --git a/public/js/components/vbform/vertragsbestandteillist.js b/public/js/components/vbform/vertragsbestandteillist.js index 3d2cd952f..b494e861d 100644 --- a/public/js/components/vbform/vertragsbestandteillist.js +++ b/public/js/components/vbform/vertragsbestandteillist.js @@ -14,7 +14,7 @@ export default {
  - {{ title }} + {{ title }}{{ childcount }}
0) ? ' (' + this.children.length + ')' : ''; + } } } diff --git a/public/js/mixins/vbform/configurable.js b/public/js/mixins/vbform/configurable.js index 3e69ae90e..648f61445 100644 --- a/public/js/mixins/vbform/configurable.js +++ b/public/js/mixins/vbform/configurable.js @@ -8,6 +8,12 @@ export default { return false; } return this.config.guioptions.disabled.includes(inputname); + }, + showinput: function(inputname) { + if( this.config?.guioptions?.hidden === undefined ) { + return true; + } + return !this.config.guioptions.hidden.includes(inputname); } }, computed: {