From 220617f14fef284e4535819222187a57468b30f7 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Tue, 28 Feb 2023 10:50:40 +0100 Subject: [PATCH] enhance guioptions to be able to disable selected fields and hide gehaltsbestandteile add link --- public/js/apps/vbform/presets.js | 41 ++++++++++++++++++- .../components/vbform/gehaltsbestandteil.js | 5 ++- .../vbform/gehaltsbestandteilhelper.js | 17 ++++---- .../vbform/vertragsbestandteil_freitext.js | 1 + .../vbform/vertragsbestandteil_funktion.js | 11 +++-- .../vbform/vertragsbestandteilhelper.js | 12 +++--- public/js/mixins/vbform/configurable.js | 26 ++++++++++++ 7 files changed, 93 insertions(+), 20 deletions(-) diff --git a/public/js/apps/vbform/presets.js b/public/js/apps/vbform/presets.js index 1aab6b9c7..323c6c3c3 100644 --- a/public/js/apps/vbform/presets.js +++ b/public/js/apps/vbform/presets.js @@ -73,7 +73,46 @@ export default [ type: 'vertragsbestandteilfunktion', guioptions: { id: uuid.get_uuid(), - removable: false + removable: false, + canhavegehaltsbestandteile: false, + nobottomborder: true, + nobottommargin: true, + disabled: [ + 'funktion' + ] + }, + data: { + funktion: 'Standardkostenstelle' + } + }, + { + type: 'vertragsbestandteilfunktion', + guioptions: { + id: uuid.get_uuid(), + removable: false, + canhavegehaltsbestandteile: false, + nobottomborder: true, + nobottommargin: true, + disabled: [ + 'funktion' + ] + }, + data: { + funktion: 'Diszpl-Zuordnung' + } + }, + { + type: 'vertragsbestandteilfunktion', + guioptions: { + id: uuid.get_uuid(), + removable: false, + canhavegehaltsbestandteile: false, + disabled: [ + 'funktion' + ] + }, + data: { + funktion: 'Fachliche-Zuordnung' } } ] diff --git a/public/js/components/vbform/gehaltsbestandteil.js b/public/js/components/vbform/gehaltsbestandteil.js index 0fe22b1f8..b81f12beb 100644 --- a/public/js/components/vbform/gehaltsbestandteil.js +++ b/public/js/components/vbform/gehaltsbestandteil.js @@ -4,7 +4,10 @@ import configurable from '../../mixins/vbform/configurable.js'; export default { template: `
-
+
+   +
+
diff --git a/public/js/components/vbform/vertragsbestandteil_funktion.js b/public/js/components/vbform/vertragsbestandteil_funktion.js index 7385b178d..3b0020907 100644 --- a/public/js/components/vbform/vertragsbestandteil_funktion.js +++ b/public/js/components/vbform/vertragsbestandteil_funktion.js @@ -4,10 +4,10 @@ import configurable from '../../mixins/vbform/configurable.js'; export default { template: ` -
+
- +
@@ -17,7 +17,7 @@ export default {
- +
`, components: { @@ -52,6 +52,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: this.config.type, @@ -61,7 +64,7 @@ export default { orget: this.orget, gueltigkeit: this.$refs.gueltigkeit.getPayload() }, - gbs: this.$refs.gbh.getPayload() + gbs: this.getGehaltsbestandteilePayload() }; } } diff --git a/public/js/components/vbform/vertragsbestandteilhelper.js b/public/js/components/vbform/vertragsbestandteilhelper.js index b4c583ddc..f334db02d 100644 --- a/public/js/components/vbform/vertragsbestandteilhelper.js +++ b/public/js/components/vbform/vertragsbestandteilhelper.js @@ -12,10 +12,12 @@ import sharedstate from './vbsharedstate.js'; export default { template: `
-
+
+