diff --git a/public/js/apps/vbform/presets.js b/public/js/apps/vbform/presets.js
deleted file mode 100644
index 3971a4bf9..000000000
--- a/public/js/apps/vbform/presets.js
+++ /dev/null
@@ -1,327 +0,0 @@
-import uuid from '../../helpers/vbform/uuid.js';
-
-export default [
- {
- type: 'preset',
- guioptions: {
- id: 'leer',
- label: 'Leer',
- description: 'Leere Vorlage. Alles muss manuell definiert werden.'
- },
- children: [
- {
- type: 'dv',
- guioptions: {
- },
- children: []
- },
- {
- type: 'vertragsbestandteillist',
- guioptions: {
- title: 'Arbeitszeit',
- vertragsbestandteiltyp: 'vertragsbestandteilstunden'
- },
- children: []
- },
- {
- type: 'vertragsbestandteillist',
- guioptions: {
- title: 'Zeitaufzeichnung',
- vertragsbestandteiltyp: 'vertragsbestandteilzeitaufzeichnung'
- },
- children: []
- },
- {
- type: 'vertragsbestandteillist',
- guioptions: {
- title: 'Kündigungsfrist',
- vertragsbestandteiltyp: 'vertragsbestandteilkuendigungsfrist'
- },
- children: []
- },
- {
- type: 'vertragsbestandteillist',
- guioptions: {
- title: 'Funktionen',
- vertragsbestandteiltyp: 'vertragsbestandteilfunktion'
- },
- children: []
- },
- {
- type: 'vertragsbestandteillist',
- guioptions: {
- title: 'Sonstiges',
- vertragsbestandteiltyp: 'vertragsbestandteilfreitext'
- },
- children: []
- }
- ],
- data: {
- dienstverhaeltnisid: null
- },
- vbs: {}
- },
- {
- type: 'preset',
- guioptions: {
- id: 'echterdv',
- label: 'Echter DV',
- description: 'Standard Vorlage für echte Dienstverträge'
- },
- children: [
- {
- type: 'tabs',
- guioptions: {
-
- },
- children: [
- {
- type: 'tab',
- guioptions: {
- title: 'Allgemein',
- id: 'allgemein'
- },
- children: [
- {
- type: 'dv',
- guioptions: {
- },
- children: []
- },
- {
- type: 'vertragsbestandteillist',
- guioptions: {
- title: 'Kündigungsfrist',
- vertragsbestandteiltyp: 'vertragsbestandteilkuendigungsfrist'
- },
- children: []
- },
- {
- type: 'vertragsbestandteillist',
- guioptions: {
- title: 'Befristung',
- vertragsbestandteiltyp: 'vertragsbestandteilfreitext',
- childdefaults: {
- guioptions: {
- canhavegehaltsbestandteile: false,
- disabled: [
- 'freitexttyp'
- ],
- hidden: [
- 'titel',
- 'freitext'
- ]
- },
- data: {
- freitexttyp: "befristung",
- titel: "Befristung",
- freitext: "befristeter Dienstvertrag"
- }
- }
- },
- children: []
- }
- ]
- },
- {
- type: 'tab',
- guioptions: {
- title: 'Arbeitszeit & Basisgehalt',
- id: 'arbeitszeit'
- },
- children: [
- {
- type: 'vertragsbestandteillist',
- guioptions: {
- title: 'Arbeitszeit',
- vertragsbestandteiltyp: 'vertragsbestandteilstunden',
- errors: [
- 'test1',
- 'test2'
- ],
- infos: []
- },
- children: [
- uuid.get_uuidbyname('test1')
- ]
- },
- {
- type: 'vertragsbestandteillist',
- guioptions: {
- title: 'Zeitaufzeichnung',
- vertragsbestandteiltyp: 'vertragsbestandteilzeitaufzeichnung',
- errors: [],
- infos: []
- },
- children: [
- ]
- }
- ]
- },
- {
- type: 'tab',
- guioptions: {
- title: 'Funktionen',
- id: 'funktionen'
- },
- children: [
- {
- type: 'vertragsbestandteillist',
- guioptions: {
- title: 'Funktion',
- vertragsbestandteiltyp: 'vertragsbestandteilfunktion',
- errors: [],
- infos: []
- },
- children: [
- uuid.get_uuidbyname('test2')
- ]
- }
- ]
- },
- {
- type: 'tab',
- guioptions: {
- title: 'Zusatzvereinbarungen',
- id: 'zusatzvereinbarungen'
- },
- children: [
- {
- type: 'vertragsbestandteillist',
- guioptions: {
- title: 'Zusatzvereinbarungen',
- vertragsbestandteiltyp: 'vertragsbestandteilfreitext'
- },
- children: []
- }
- ]
- },
- {
- type: 'tab',
- guioptions: {
- title: 'Sonstiges',
- id: 'sonstiges'
- },
- children: [
- {
- type: 'vertragsbestandteillist',
- guioptions: {
- title: 'Kündigungsfrist',
- vertragsbestandteiltyp: 'vertragsbestandteilkuendigungsfrist',
- errors: [],
- infos: []
- },
- children: [
- ]
- }
- ]
- }
- ]
- }
- ],
- data: {
- dienstverhaeltnisid: null
- },
- vbs: {
- [uuid.get_uuidbyname('test1')]: {
- type: 'vertragsbestandteilstunden',
- guioptions: {
- id: uuid.get_uuidbyname('test1'),
- infos: [
- 'test info 1',
- 'test info 2'
- ],
- errors: [
- 'test error 1',
- 'test error 2'
- ]
- },
- data: {
- stunden: '38,5'
- },
- gbs: [
- {
- type: 'gehaltsbestandteil',
- guioptions: {
- infos: [
- 'test info 1',
- 'test info 2'
- ],
- errors: [
- 'test error 1',
- 'test error 2'
- ]
- },
- data: {}
- }
- ]
- },
- [uuid.get_uuidbyname('test2')]: {
- type: 'vertragsbestandteilfunktion',
- guioptions: {
- id: uuid.get_uuidbyname('test2')
- },
- data: {
- funktion: 'Leitung',
- oe_kurzbz: 'core'
- },
- gbs: []
- }
- }
- },
- {
- type: 'preset',
- guioptions: {
- id: 'freierdv',
- label: 'Freier DV',
- description: 'freier Dienstvertrag'
- },
- children: [
- {
- type: 'tabs',
- guioptions: {
-
- },
- children: [
- {
- type: 'tab',
- guioptions: {
- title: 'Allgemein',
- id: 'allgemein'
- },
- children: [
- {
- type: 'dv',
- guioptions: {
- },
- children: []
- }
- ]
- },
- {
- type: 'tab',
- guioptions: {
- title: 'Zusatzvereinbarungen',
- id: 'zusatzvereinbarungen'
- },
- children: [
- {
- type: 'vertragsbestandteillist',
- guioptions: {
- title: 'Zusatzvereinbarungen',
- vertragsbestandteiltyp: 'vertragsbestandteilfreitext'
- },
- children: []
- }
- ]
- }
- ]
- }
- ],
- data: {
- dienstverhaeltnisid: null
- },
- vbs: {
- }
- }
-]
diff --git a/public/js/apps/vbform/vbform.js b/public/js/apps/vbform/vbform.js
deleted file mode 100644
index c70e4d06f..000000000
--- a/public/js/apps/vbform/vbform.js
+++ /dev/null
@@ -1,85 +0,0 @@
-import vertragsbestandteillist from '../../components/vbform/vertragsbestandteillist.js';
-import presets from './presets.js';
-import debug_viewer from '../../components/vbform/debug_viewer.js';
-import vbformhelper from '../../components/vbform/vbformhelper.js';
-import store from '../../components/vbform/vbsharedstate.js';
-import presets_chooser from './../../components/vbform/presets_chooser.js';
-
-Vue.createApp({
- template: `
-
-
{{ title }}
-
-
-
-
-
-
- `,
- data: function() {
- return {
- vbhjson: presets,
- "title": "Vertragsbestandteil Form",
- presets: presets,
- preset: presets[1],
- store: store,
- config: [],
- configstunden: [
- {
- type: 'vertragsbestandteilstunden',
- guioptions: {
- removeable: false,
- },
- gbs: [
- {
- type: 'gehaltsbestandteil',
- guioptions: {
- removeable: false
- },
- data: {
- type: 'basis'
- }
- }
- ]
- }
- ]
- };
- },
- components: {
- 'presets_chooser': presets_chooser,
- 'vertragsbestandteillist': vertragsbestandteillist,
- 'debug_viewer': debug_viewer,
- 'vbformhelper': vbformhelper
- },
- created: function() {
- this.presettostore();
- },
- methods: {
- presetselected: function(preset) {
- this.preset = preset;
- this.presettostore();
- },
- presettostore: function() {
- var vbs = JSON.parse(JSON.stringify(this.preset.vbs));
- for( var key in vbs ) {
- this.store.addVB(key, vbs[key]);
- }
- this.store.setDV(JSON.parse(JSON.stringify(this.preset.data)));
- },
- processJSON: function(payload) {
- this.vbhjson = payload;
- }
- },
- computed: {
- }
-}).mount('#main');
diff --git a/public/js/components/vbform/debug_viewer.js b/public/js/components/vbform/debug_viewer.js
deleted file mode 100644
index baf2fa37a..000000000
--- a/public/js/components/vbform/debug_viewer.js
+++ /dev/null
@@ -1,12 +0,0 @@
-export default {
- template: `
-
- `,
- props: [
- "text"
- ]
-}
diff --git a/public/js/components/vbform/dv.js b/public/js/components/vbform/dv.js
deleted file mode 100644
index bb4ebccc8..000000000
--- a/public/js/components/vbform/dv.js
+++ /dev/null
@@ -1,43 +0,0 @@
-import presetable from '../../mixins/vbform/presetable.js';
-import dvneuanlage from './dvneuanlage.js';
-import dvaenderung from './dvaenderung.js';
-import store from './vbsharedstate.js';
-
-export default {
- template:`
-
-
-
-
- `,
- components: {
- 'dvneuanlage': dvneuanlage,
- 'dvaenderung': dvaenderung
- },
- mixins: [
- presetable
- ],
- data: function() {
- return {
- store: store,
- data: {}
- }
- },
- created: function() {
- this.data = this.store.getDV();
- },
- methods: {
- getPayload: function() {
- this.store.setDV(this.$refs.formheader.getPayload());
- return JSON.parse(JSON.stringify(this.preset));
- }
- },
- computed: {
- isaenderung: function() {
- var ret = ((this.data?.dienstverhaeltnisid !== undefined)
- && !isNaN(parseInt(this.data.dienstverhaeltnisid))
- && parseInt(this.data.dienstverhaeltnisid) > 0);
- return ret;
- }
- }
-}
diff --git a/public/js/components/vbform/dvaenderung.js b/public/js/components/vbform/dvaenderung.js
deleted file mode 100644
index 180149887..000000000
--- a/public/js/components/vbform/dvaenderung.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import gueltigkeit from './gueltigkeit.js';
-import configurable from '../../mixins/vbform/configurable.js';
-
-export default {
- template: `
- Aenderung
-
-
- `,
- components: {
- 'gueltigkeit': gueltigkeit
- },
- mixins: [
- configurable
- ],
- methods: {
- getPayload: function() {
- return {
- dienstverhaeltnisid: this.config.dienstverhaeltnisid,
- gueltigkeit: this.$refs.gueltigkeit.getPayload()
- }
- },
-
- }
-}
diff --git a/public/js/components/vbform/dvneuanlage.js b/public/js/components/vbform/dvneuanlage.js
deleted file mode 100644
index c4dddf191..000000000
--- a/public/js/components/vbform/dvneuanlage.js
+++ /dev/null
@@ -1,67 +0,0 @@
-import gueltigkeit from './gueltigkeit.js';
-import configurable from '../../mixins/vbform/configurable.js';
-
-export default {
- template: `
-
-
-
-
-
-
-
-
-
- `,
- data: function() {
- return {
- 'unternehmen': '',
- 'vertragsart_kurzbz': ''
- }
- },
- components: {
- 'gueltigkeit': gueltigkeit
- },
- mixins: [
- configurable
- ],
- watch: {
- config: function() {
- this.setDataFromConfig();
- }
- },
- methods: {
- setDataFromConfig: function() {
- if( this.config?.unternehmen !== undefined ) {
- this.unternehmen = this.config.unternehmen;
- } else {
- this.unternehmen = '';
- }
-
- if( this.config?.vertragsart_kurzbz !== undefined ) {
- this.vertragsart_kurzbz = this.config.vertragsart_kurzbz;
- } else {
- this.vertragsart_kurzbz = '';
- }
- },
- getPayload: function() {
- return {
- dienstverhaeltnisid: null,
- unternehmen: this.unternehmen,
- vertragsart_kurzbz: this.vertragsart_kurzbz,
- gueltigkeit: this.$refs.gueltigkeit.getPayload()
- }
- }
- }
-}
diff --git a/public/js/components/vbform/errors.js b/public/js/components/vbform/errors.js
deleted file mode 100644
index b618f3d75..000000000
--- a/public/js/components/vbform/errors.js
+++ /dev/null
@@ -1,12 +0,0 @@
-export default {
- template: `
-
- `,
- props: [
- 'errors'
- ]
-}
diff --git a/public/js/components/vbform/gehaltsbestandteil.js b/public/js/components/vbform/gehaltsbestandteil.js
deleted file mode 100644
index f6833b0ce..000000000
--- a/public/js/components/vbform/gehaltsbestandteil.js
+++ /dev/null
@@ -1,91 +0,0 @@
-import gueltigkeit from './gueltigkeit.js';
-import configurable from '../../mixins/vbform/configurable.js';
-import errors from './errors.js';
-import infos from './infos.js';
-
-export default {
- template: `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- `,
- data: function() {
- return {
- gehaltstyp : '',
- betrag: '',
- gueltig_ab: '',
- gueltig_bis: '',
- valorisierung: ''
- }
- },
- components: {
- 'gueltigkeit': gueltigkeit,
- 'infos': infos,
- 'errors': errors
- },
- mixins: [
- configurable
- ],
- emits: [
- 'removeGB'
- ],
- created: function() {
- this.setDataFromConfig();
- },
- methods: {
- setDataFromConfig: function() {
- if( typeof this.config?.data?.gehaltstyp !== 'undefined' ) {
- this.gehaltstyp = this.config.data.gehaltstyp;
- }
- if( typeof this.config?.data?.betrag !== 'undefined' ) {
- this.betrag = this.config.data.betrag;
- }
- if( typeof this.config?.data?.valorisierung !== 'undefined' ) {
- this.valorisierung = this.config.data.valorisierung;
- }
- },
- removeGB: function() {
- this.$emit('removeGB', {id: this.config.guioptions.id});
- },
- getPayload: function() {
- return {
- type: this.config.type,
- guioptions: JSON.parse(JSON.stringify(this.config.guioptions)),
- data: {
- gehaltstyp: this.gehaltstyp,
- betrag: this.betrag,
- gueltigkeit: this.$refs.gueltigkeit.getPayload(),
- valorisierung: this.valorisierung
- }
- };
- }
- }
-}
diff --git a/public/js/components/vbform/gehaltsbestandteilhelper.js b/public/js/components/vbform/gehaltsbestandteilhelper.js
deleted file mode 100644
index 6a614d428..000000000
--- a/public/js/components/vbform/gehaltsbestandteilhelper.js
+++ /dev/null
@@ -1,58 +0,0 @@
-import gehaltsbestandteil from './gehaltsbestandteil.js';
-import presetable from '../../mixins/vbform/presetable.js';
-import uuid from '../../helpers/vbform/uuid.js';
-
-export default {
- template: `
-
-
- `,
- data: function() {
- return {
- payload: []
- };
- },
- components: {
- 'gehaltsbestandteil': gehaltsbestandteil,
- },
- mixins: [
- presetable
- ],
- methods: {
- addGB: function(e) {
- e.preventDefault();
- e.stopPropagation();
-
- this.children.push({
- type: 'gehaltsbestandteil',
- guioptions: {
- id: uuid.get_uuid(),
- removeable: true
- }
- });
- },
- removeGB: function(payload) {
- var children = this.children.filter(function(gb) {
- return gb.guioptions.id !== payload.id;
- });
- this.children = children;
- },
- getPayload: function() {
- var payload = [];
-
- for( var i in this.$refs.parts ) {
- payload.push(this.$refs.parts[i].getPayload());
- }
-
- return payload;
- }
- }
-}
diff --git a/public/js/components/vbform/gueltigkeit.js b/public/js/components/vbform/gueltigkeit.js
deleted file mode 100644
index a4e6c6a51..000000000
--- a/public/js/components/vbform/gueltigkeit.js
+++ /dev/null
@@ -1,117 +0,0 @@
-import configurable from '../../mixins/vbform/configurable.js';
-import sharedstate from './vbsharedstate.js';
-
-export default {
- template: `
-
- `,
- props: {
- 'initialsharedstatemode': {
- type: String,
- default: 'reflect',
- validator: function(value) {
- return ['reflect', 'set', 'ignore'].includes(value);
- }
- }
- },
- data: function() {
- return {
- sharedstate: sharedstate,
- sharedstatemode: '',
- gueltig_ab: '',
- gueltig_bis: ''
- }
- },
- components: {},
- mixins: [
- configurable
- ],
- created: function() {
- this.sharedstatemode = this.initialsharedstatemode;
- this.setDataFromSharedSate();
- this.setGUIOptionsFromConfig();
- this.setDataFromConfig();
- },
- watch: {
- 'sharedstate.gueltigkeit.gueltig_ab': function() {
- if( this.sharedstatemode === 'reflect' ) {
- this.gueltig_ab = this.sharedstate.gueltigkeit.gueltig_ab;
- }
- },
- 'sharedstate.gueltigkeit.gueltig_bis': function() {
- if( this.sharedstatemode === 'reflect' ) {
- this.gueltig_bis = this.sharedstate.gueltigkeit.gueltig_bis;
- }
- },
- },
- methods: {
- setDataFromConfig: function() {
- if( typeof this.config === 'undefined' ) {
- return;
- }
-
- if( typeof this.config.data === 'undefined' ) {
- return;
- }
-
- if( typeof this.config.data.gueltig_ab !== 'undefined' ) {
- this.gueltig_ab = this.config.data.gueltig_ab;
- }
- if( typeof this.config.gueltig_bis !== 'undefined' ) {
- this.gueltig_bis = this.config.data.gueltig_bis;
- }
- },
- setDataFromSharedSate: function() {
- if( this.sharedstatemode === 'reflect' ) {
- this.gueltig_ab = this.sharedstate.gueltigkeit.gueltig_ab;
- this.gueltig_bis = this.sharedstate.gueltigkeit.gueltig_bis;
- }
- },
- setGUIOptionsFromConfig: function() {
- if( typeof this.config?.guioptions?.sharedstatemode !== 'undefined' ) {
- this.sharedstatemode = this.config.guioptions.sharedstatemode;
- }
- },
- getPayload: function() {
- return {
- guioptions: {
- sharedstatemode: this.sharedstatemode,
- },
- data: {
- gueltig_ab: this.gueltig_ab,
- gueltig_bis: this.gueltig_bis
- }
- };
- },
- gueltigkeitchanged: function() {
- if( this.sharedstatemode === 'set' ) {
- this.sharedstate.gueltigkeit.gueltig_ab = this.gueltig_ab;
- this.sharedstate.gueltigkeit.gueltig_bis = this.gueltig_bis;
- }
- },
- changesharedstatemode: function(mode) {
- this.sharedstatemode = mode;
- this.setDataFromSharedSate();
- }
- },
- computed: {
- isdisabled: function() {
- return (this.sharedstatemode === 'reflect');
- }
- }
-}
diff --git a/public/js/components/vbform/infos.js b/public/js/components/vbform/infos.js
deleted file mode 100644
index 4f514f99d..000000000
--- a/public/js/components/vbform/infos.js
+++ /dev/null
@@ -1,12 +0,0 @@
-export default {
- template: `
-
- `,
- props: [
- 'infos'
- ]
-}
diff --git a/public/js/components/vbform/presets_chooser.js b/public/js/components/vbform/presets_chooser.js
deleted file mode 100644
index 1d80d7651..000000000
--- a/public/js/components/vbform/presets_chooser.js
+++ /dev/null
@@ -1,39 +0,0 @@
-import store from './vbsharedstate.js';
-
-export default {
- template: `
-
-
-
-
-
-
-
-
- `,
- props:[
- 'presets'
- ],
- data: function() {
- return {
- store: store,
- selectedpresetidx: 1
- }
- },
- emits: [
- "presetselected"
- ],
- methods: {
- selectpreset: function() {
- var preset = this.presets[this.selectedpresetidx];
- this.store.reset();
- this.$emit("presetselected", preset);
- }
- }
-}
diff --git a/public/js/components/vbform/sections.js b/public/js/components/vbform/sections.js
deleted file mode 100644
index 60832818e..000000000
--- a/public/js/components/vbform/sections.js
+++ /dev/null
@@ -1,10 +0,0 @@
-export default {
- props: [
- 'preset'
- ],
- template: `
-
- `
-}
diff --git a/public/js/components/vbform/tab.js b/public/js/components/vbform/tab.js
deleted file mode 100644
index b3e953cef..000000000
--- a/public/js/components/vbform/tab.js
+++ /dev/null
@@ -1,51 +0,0 @@
-import presetable from '../../mixins/vbform/presetable.js';
-import vertragsbestandteillist from '../../components/vbform/vertragsbestandteillist.js';
-import dv from './dv.js';
-
-export default {
- template: `
-
-
-
- `,
- props: [
- 'activetab'
- ],
- data: function() {
- return {
- payload: {
- type: 'tab',
- guioptions: {
- title: '',
- id: ''
- },
- children: []
- }
- };
- },
- components: {
- "dv": dv,
- "vertragsbestandteillist": vertragsbestandteillist
- },
- mixins: [
- presetable
- ],
- methods: {
- getPayload: function() {
- var children = [];
- for( var i in this.$refs.parts ) {
- children.push(this.$refs.parts[i].getPayload());
- }
- var payload = {
- type: 'tab',
- guioptions: JSON.parse(JSON.stringify(this.preset.guioptions)),
- children: children
- };
- return payload;
- }
- }
-}
diff --git a/public/js/components/vbform/tabs.js b/public/js/components/vbform/tabs.js
deleted file mode 100644
index f55e10ace..000000000
--- a/public/js/components/vbform/tabs.js
+++ /dev/null
@@ -1,58 +0,0 @@
-import presetable from '../../mixins/vbform/presetable.js';
-import tab from './tab.js';
-
-export default {
- template: `
-
-
-
-
-
-
-
-
-
- `,
- components: {
- "tab": tab
- },
- mixins: [
- presetable
- ],
- created: function() {
- if( this.children.length > 0 ) {
- this.activetab = this.children[0].guioptions.id;
- }
- },
- data: function() {
- return {
- activetab: ''
- }
- },
- methods: {
- getPayload: function() {
- var children = [];
- for( var i in this.$refs.parts ) {
- children.push(this.$refs.parts[i].getPayload());
- }
- var payload = {
- "type": "tabs",
- "guioptions": JSON.parse(JSON.stringify(this.preset.guioptions)),
- "children": children
- }
- return payload;
- }
- }
-}
diff --git a/public/js/components/vbform/vbformhelper.js b/public/js/components/vbform/vbformhelper.js
deleted file mode 100644
index 386dbfcee..000000000
--- a/public/js/components/vbform/vbformhelper.js
+++ /dev/null
@@ -1,52 +0,0 @@
-import presetable from '../../mixins/vbform/presetable.js';
-import tabs from './tabs.js';
-import vertragsbestandteillist from './vertragsbestandteillist.js';
-import dv from './dv.js';
-import store from './vbsharedstate.js';
-
-export default {
- template: `
-
- `,
- components: {
- "tabs": tabs,
- "dv": dv,
- "vertragsbestandteillist": vertragsbestandteillist
- },
- mixins: [
- presetable
- ],
- data: function() {
- return {
- store: store
- };
- },
- emits: [
- "vbhjsonready"
- ],
- methods: {
- getJSON: function() {
- var children = [];
- for ( var i in this.$refs.parts) {
- children.push(this.$refs.parts[i].getPayload());
- }
- var payload = {
- "type": "formdata",
- "children": children,
- "data": this.store.getDVPayload(),
- "vbs": this.store.getVBsPayload()
- };
- this.$emit('vbhjsonready', JSON.stringify(payload, null, 2));
- }
- }
-}
diff --git a/public/js/components/vbform/vbsharedstate.js b/public/js/components/vbform/vbsharedstate.js
deleted file mode 100644
index 6ca21be26..000000000
--- a/public/js/components/vbform/vbsharedstate.js
+++ /dev/null
@@ -1,41 +0,0 @@
-export default Vue.reactive({
- gueltigkeit: {
- gueltig_ab: '',
- gueltig_bis: ''
- },
- dv: {
-
- },
- vbs: {
-
- },
- getDV: function() {
- return this.dv;
- },
- setDV: function(dv) {
- this.dv = JSON.parse(JSON.stringify(dv));
- },
- getDVPayload: function() {
- return JSON.parse(JSON.stringify(this.dv));
- },
- addVB: function(uuid, vb) {
- this.vbs[uuid] = vb;
- },
- removeVB: function(uuid) {
- delete this.vbs[uuid];
- },
- getVB: function(uuid) {
- return this.vbs[uuid];
- },
- getVBsPayload: function() {
- return JSON.parse(JSON.stringify(this.vbs));
- },
- reset: function() {
- this.gueltigkeit = {
- gueltig_ab: '',
- gueltig_bis: ''
- };
- this.dv = {};
- this.vbs = {};
- }
-});
diff --git a/public/js/components/vbform/vertragsbestandteil_freitext.js b/public/js/components/vbform/vertragsbestandteil_freitext.js
deleted file mode 100644
index f13b11337..000000000
--- a/public/js/components/vbform/vertragsbestandteil_freitext.js
+++ /dev/null
@@ -1,97 +0,0 @@
-import gehaltsbestandteilhelper from './gehaltsbestandteilhelper.js';
-import gueltigkeit from './gueltigkeit.js';
-import configurable from '../../mixins/vbform/configurable.js';
-
-export default {
- template: `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- `,
- components: {
- 'gehaltsbestandteilhelper': gehaltsbestandteilhelper,
- 'gueltigkeit': gueltigkeit
- },
- mixins: [
- configurable
- ],
- emits: {
- removeVB: null
- },
- data: function() {
- return {
- freitexttyp: '',
- titel: '',
- freitext: '',
- kuendigungsrelevant: ''
- }
- },
- created: function() {
- this.setDataFromConfig();
- },
- methods: {
- setDataFromConfig: function() {
- if( typeof this.config.data === 'undefined' ) {
- return;
- }
-
- if( typeof this.config.data.freitexttyp !== 'undefined' ) {
- this.freitexttyp = this.config.data.freitexttyp;
- }
- if( typeof this.config.data.titel !== 'undefined' ) {
- this.titel = this.config.data.titel;
- }
- if( typeof this.config.data.freitexttyp !== 'undefined' ) {
- this.freitext = this.config.data.freitext
- }
- },
- 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',
- guioptions: this.config.guioptions,
- data: {
- freitexttyp: this.freitexttyp,
- titel: this.titel,
- freitext: this.freitext,
- kuendigungsrelevant: this.kuendigungsrelevant,
- gueltigkeit: this.$refs.gueltigkeit.getPayload()
- },
- gbs: this.getGehaltsbestandteilePayload()
- };
- }
- }
-}
diff --git a/public/js/components/vbform/vertragsbestandteil_funktion.js b/public/js/components/vbform/vertragsbestandteil_funktion.js
deleted file mode 100644
index 75555d42c..000000000
--- a/public/js/components/vbform/vertragsbestandteil_funktion.js
+++ /dev/null
@@ -1,71 +0,0 @@
-import gehaltsbestandteilhelper from './gehaltsbestandteilhelper.js'
-import gueltigkeit from './gueltigkeit.js';
-import configurable from '../../mixins/vbform/configurable.js';
-
-export default {
- template: `
-
- `,
- components: {
- 'gehaltsbestandteilhelper': gehaltsbestandteilhelper,
- 'gueltigkeit': gueltigkeit
- },
- mixins: [
- configurable
- ],
- emits: {
- removeVB: null
- },
- data: function () {
- return {
- funktion: '',
- orget: ''
- }
- },
- created: function() {
- this.setDataFromConfig();
- },
- methods: {
- setDataFromConfig: function() {
- if( typeof this.config.data === 'undefined' ) {
- return;
- }
-
- if( typeof this.config.data.funktion !== 'undefined' ) {
- this.funktion = this.config.data.funktion;
- }
- },
- 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,
- guioptions: this.config.guioptions,
- data: {
- funktion: this.funktion,
- orget: this.orget,
- gueltigkeit: this.$refs.gueltigkeit.getPayload()
- },
- gbs: this.getGehaltsbestandteilePayload()
- };
- }
- }
-}
diff --git a/public/js/components/vbform/vertragsbestandteil_kuendigungsfrist.js b/public/js/components/vbform/vertragsbestandteil_kuendigungsfrist.js
deleted file mode 100644
index 8a898a393..000000000
--- a/public/js/components/vbform/vertragsbestandteil_kuendigungsfrist.js
+++ /dev/null
@@ -1,76 +0,0 @@
-import gehaltsbestandteilhelper from './gehaltsbestandteilhelper.js';
-import gueltigkeit from './gueltigkeit.js';
-import configurable from '../../mixins/vbform/configurable.js';
-
-export default {
- template: `
-
- `,
- components: {
- 'gueltigkeit': gueltigkeit
- },
- mixins: [
- configurable
- ],
- emits: {
- removeVB: null
- },
- data: function () {
- return {
- arbeitgeber_frist: '',
- arbeitnehmer_frist: ''
- }
- },
- created: function() {
- this.setDataFromConfig();
- },
- methods: {
- setDataFromConfig: function() {
- if( typeof this.config?.data === 'undefined' ) {
- return;
- }
-
- if( typeof this.config.data.arbeitgeber_frist !== 'undefined' ) {
- this.arbeitgeber_frist = this.config.data.arbeitgeber_frist;
- }
-
- if( typeof this.config.data.arbeitnehmer_frist !== 'undefined' ) {
- this.arbeitnehmer_frist = this.config.data.arbeitnehmer_frist;
- }
- },
- removeVB: function() {
- this.$emit('removeVB', {id: this.config.guioptions.id});
- },
- getPayload: function() {
- return {
- type: this.config.type,
- guioptions: this.config.guioptions,
- data: {
- arbeitgeber_frist: this.arbeitgeber_frist,
- arbeitnehmer_frist: this.arbeitnehmer_frist,
- gueltigkeit: this.$refs.gueltigkeit.getPayload(),
- }
- };
- }
- }
-}
diff --git a/public/js/components/vbform/vertragsbestandteil_stunden.js b/public/js/components/vbform/vertragsbestandteil_stunden.js
deleted file mode 100644
index 7286ea809..000000000
--- a/public/js/components/vbform/vertragsbestandteil_stunden.js
+++ /dev/null
@@ -1,73 +0,0 @@
-import gehaltsbestandteilhelper from './gehaltsbestandteilhelper.js';
-import gueltigkeit from './gueltigkeit.js';
-import configurable from '../../mixins/vbform/configurable.js';
-import errors from './errors.js';
-import infos from './infos.js';
-
-export default {
- template: `
-
- `,
- components: {
- 'gehaltsbestandteilhelper': gehaltsbestandteilhelper,
- 'gueltigkeit': gueltigkeit,
- 'infos': infos,
- 'errors': errors
- },
- mixins: [
- configurable
- ],
- emits: {
- removeVB: null
- },
- data: function () {
- return {
- stunden: ''
- }
- },
- created: function() {
- this.setDataFromConfig();
- },
- methods: {
- setDataFromConfig: function() {
- if( typeof this.config.data === 'undefined' ) {
- return;
- }
-
- if( typeof this.config.data.stunden !== 'undefined' ) {
- this.stunden = this.config.data.stunden;
- }
- },
- removeVB: function() {
- this.$emit('removeVB', {id: this.config.guioptions.id});
- },
- getPayload: function() {
- return {
- type: this.config.type,
- guioptions: this.config.guioptions,
- data: {
- stunden: this.stunden,
- gueltigkeit: this.$refs.gueltigkeit.getPayload(),
- },
- gbs: this.$refs.gbh.getPayload()
- };
- }
- }
-}
diff --git a/public/js/components/vbform/vertragsbestandteil_zeitaufzeichnung.js b/public/js/components/vbform/vertragsbestandteil_zeitaufzeichnung.js
deleted file mode 100644
index 98ed58b64..000000000
--- a/public/js/components/vbform/vertragsbestandteil_zeitaufzeichnung.js
+++ /dev/null
@@ -1,85 +0,0 @@
-import gueltigkeit from './gueltigkeit.js';
-import configurable from '../../mixins/vbform/configurable.js';
-
-export default {
- template: `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- `,
- components: {
- 'gueltigkeit': gueltigkeit
- },
- mixins: [
- configurable
- ],
- emits: {
- removeVB: null
- },
- data: function () {
- return {
- zeitaufzeichnung: '',
- azgrelevant: '',
- homeoffice: ''
- }
- },
- created: function() {
- this.setDataFromConfig();
- },
- methods: {
- setDataFromConfig: function() {
- if( typeof this.config.data === 'undefined' ) {
- return;
- }
-
- if( typeof this.config.data.zeitaufzeichnung !== 'undefined' ) {
- this.zeitaufzeichnung = this.config.data.zeitaufzeichnung;
- }
- if( typeof this.config.data.azgrelevant !== 'undefined' ) {
- this.azgrelevant = this.config.data.azgrelevant;
- }
- if( typeof this.config.data.homeoffice !== 'undefined' ) {
- this.homeoffice = this.config.data.homeoffice
- }
- },
- removeVB: function() {
- this.$emit('removeVB', {id: this.config.guioptions.id});
- },
- getPayload: function() {
- return {
- type: this.config.type,
- guioptions: this.config.guioptions,
- data: {
- zeitaufzeichnung: this.zeitaufzeichnung,
- azgrelevant: this.azgrelevant,
- homeoffice: this.homeoffice,
- gueltigkeit: this.$refs.gueltigkeit.getPayload()
- }
- };
- }
- }
-}
diff --git a/public/js/components/vbform/vertragsbestandteilhelper.js b/public/js/components/vbform/vertragsbestandteilhelper.js
deleted file mode 100644
index f334db02d..000000000
--- a/public/js/components/vbform/vertragsbestandteilhelper.js
+++ /dev/null
@@ -1,118 +0,0 @@
-import vertragsbestandteilstunden from './vertragsbestandteil_stunden.js';
-import vertragsbestandteilzeitaufzeichnung from './vertragsbestandteil_zeitaufzeichnung.js';
-import vertragsbestandteilfunktion from './vertragsbestandteil_funktion.js';
-import vertragsbestandteilfreitext from './vertragsbestandteil_freitext.js';
-import vertragsbestandteilkuendigungsfrist from './vertragsbestandteil_kuendigungsfrist.js';
-import presetable from '../../mixins/vbform/presetable.js';
-import uuid from '../../helpers/vbform/uuid.js';
-import dvneuanlage from './dvneuanlage.js';
-import dvaenderung from './dvaenderung.js';
-import sharedstate from './vbsharedstate.js';
-
-export default {
- template: `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- `,
- props: [
- 'data'
- ],
- data: function() {
- return {
- sharedstate: sharedstate,
- vertragsbestandteiltyp: '',
- payload: {
- type: 'formdata',
- vbs: []
- }
- };
- },
- components: {
- 'vertragsbestandteilstunden': vertragsbestandteilstunden,
- 'vertragsbestandteilzeitaufzeichnung': vertragsbestandteilzeitaufzeichnung,
- 'vertragsbestandteilfunktion': vertragsbestandteilfunktion,
- 'vertragsbestandteilfreitext': vertragsbestandteilfreitext,
- 'vertragsbestandteilkuendigungsfrist': vertragsbestandteilkuendigungsfrist,
- 'dvneuanlage': dvneuanlage,
- 'dvaenderung': dvaenderung
- },
- mixins: [
- presetable
- ],
- emits: {
- vbhjsonready: null
- },
- methods: {
- addVB: function(e) {
- e.preventDefault();
- e.stopPropagation();
-
- if( this.vertragsbestandteiltyp === '') {
- return;
- }
-
- this.children.push({
- type: this.vertragsbestandteiltyp,
- guioptions: {
- id: uuid.get_uuid(),
- removeable: true
- }
- });
- },
- removeVB: function(payload) {
- var children = this.children.filter(function(vb) {
- return vb.guioptions.id !== payload.id;
- });
- this.children = children;
- },
- getJSON: function(e) {
- e.preventDefault();
- e.stopPropagation();
-
- var children = this.children;
- var that = this;
-
- this.payload = {
- type: 'formdata',
- data: this.$refs.formheader.getPayload(),
- vbs: []
- };
- children.forEach(function(vb) {
- that.payload.vbs.push(that.$refs[vb.guioptions.id][0].getPayload());
- });
-
- this.$emit('vbhjsonready', JSON.stringify(this.payload, null, 2));
- },
- },
- computed: {
- isaenderung: function() {
- return ((typeof this.data.dienstverhaeltnisid !== 'undefined')
- && !isNaN(parseInt(this.data.dienstverhaeltnisid))
- && parseInt(this.data.dienstverhaeltnisid) > 0);
- }
- }
-}
diff --git a/public/js/components/vbform/vertragsbestandteillist.js b/public/js/components/vbform/vertragsbestandteillist.js
deleted file mode 100644
index b494e861d..000000000
--- a/public/js/components/vbform/vertragsbestandteillist.js
+++ /dev/null
@@ -1,120 +0,0 @@
-import vertragsbestandteilstunden from './vertragsbestandteil_stunden.js';
-import vertragsbestandteilzeitaufzeichnung from './vertragsbestandteil_zeitaufzeichnung.js';
-import vertragsbestandteilfunktion from './vertragsbestandteil_funktion.js';
-import vertragsbestandteilfreitext from './vertragsbestandteil_freitext.js';
-import vertragsbestandteilkuendigungsfrist from './vertragsbestandteil_kuendigungsfrist.js';
-import presetable from '../../mixins/vbform/presetable.js';
-import uuid from '../../helpers/vbform/uuid.js';
-import store from './vbsharedstate.js';
-
-export default {
- template: `
-
-
-
-
-
-
{{ title }}{{ childcount }}
-
-
-
-
- `,
- props: [
- 'data'
- ],
- data: function() {
- return {
- title: '',
- vertragsbestandteiltyp: '',
- store: store,
- payload: {
- type: 'vertragsbestandteillist',
- guioptions: {
- title: '',
- vertragsbestandteiltyp: '',
- },
- children: []
- }
- };
- },
- components: {
- 'vertragsbestandteilstunden': vertragsbestandteilstunden,
- 'vertragsbestandteilzeitaufzeichnung': vertragsbestandteilzeitaufzeichnung,
- 'vertragsbestandteilfunktion': vertragsbestandteilfunktion,
- 'vertragsbestandteilfreitext': vertragsbestandteilfreitext,
- 'vertragsbestandteilkuendigungsfrist': vertragsbestandteilkuendigungsfrist
- },
- mixins: [
- presetable
- ],
- created: function() {
- this.title = this.preset.guioptions.title;
- this.vertragsbestandteiltyp = this.preset.guioptions.vertragsbestandteiltyp
- },
- methods: {
- addVB: function(e) {
- e.preventDefault();
- e.stopPropagation();
-
- if( this.vertragsbestandteiltyp === '') {
- return;
- }
-
- var vbid = uuid.get_uuid();
- var guioptions = (this.preset.guioptions?.childdefaults?.guioptions !== undefined)
- ? JSON.parse(JSON.stringify(this.preset.guioptions.childdefaults.guioptions))
- : {};
- guioptions.id = vbid;
- guioptions.removeable = true;
- var data = (this.preset.guioptions?.childdefaults?.data !== undefined)
- ? JSON.parse(JSON.stringify(this.preset.guioptions.childdefaults.data))
- : {};
- this.store.addVB(vbid, {
- type: this.vertragsbestandteiltyp,
- guioptions: guioptions,
- data: data
- });
- this.children.push(vbid);
- },
- removeVB: function(payload) {
- this.store.removeVB(payload.id);
- var children = this.children.filter(function(vbid) {
- return vbid !== payload.id;
- });
- this.children = children;
- },
- getPayload: function() {
- this.payload = {
- type: 'vertragsbestandteillist',
- guioptions: JSON.parse(JSON.stringify(this.preset.guioptions)),
- children: JSON.parse(JSON.stringify(this.children))
- };
- this.updateVBsInStore();
- return this.payload;
- },
- updateVBsInStore: function() {
- for( var id in this.$refs.parts) {
- var payload = this.$refs.parts[id].getPayload();
- this.store.addVB(this.$refs.parts[id].config.guioptions.id, payload);
- }
- },
- getChildren: function() {
- var vbs = [];
- var that = this;
-
- for( var i in this.children ) {
- var uuid = this.children[i];
- vbs.push(that.store.getVB(uuid));
- }
-
- return vbs;
- }
- },
- computed: {
- childcount: function() {
- return (this.children.length > 0) ? ' (' + this.children.length + ')' : '';
- }
- }
-}
diff --git a/public/js/helpers/vbform/uuid.js b/public/js/helpers/vbform/uuid.js
deleted file mode 100644
index 8ebc6a882..000000000
--- a/public/js/helpers/vbform/uuid.js
+++ /dev/null
@@ -1,21 +0,0 @@
-export default {
- _uuidsbyname: {},
- get_uuid: function() {
- var uuidValue = "", k, randomValue;
- for (k = 0; k < 32; k++) {
- randomValue = Math.random() * 16 | 0;
-
- if (k == 8 || k == 12 || k == 16 || k == 20) {
- uuidValue += "-"
- }
- uuidValue += (k == 12 ? 4 : (k == 16 ? (randomValue & 3 | 8) : randomValue)).toString(16);
- }
- return uuidValue;
- },
- get_uuidbyname: function(name) {
- if( this._uuidsbyname[name] === undefined ) {
- this._uuidsbyname[name] = this.get_uuid();
- }
- return this._uuidsbyname[name];
- }
-}
diff --git a/public/js/mixins/vbform/configurable.js b/public/js/mixins/vbform/configurable.js
deleted file mode 100644
index 648f61445..000000000
--- a/public/js/mixins/vbform/configurable.js
+++ /dev/null
@@ -1,56 +0,0 @@
-export default {
- props: [
- 'config'
- ],
- methods: {
- isinputdisabled: function(inputname) {
- if( this.config?.guioptions?.disabled === undefined ) {
- 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: {
- isremoveable: function() {
- return (this.config?.guioptions?.removeable === undefined)
- ? false : this.config.guioptions.removeable;
- },
- canhavegehaltsbestandteile: function() {
- return (this.config?.guioptions?.canhavegehaltsbestandteile === undefined)
- ? true : this.config.guioptions.canhavegehaltsbestandteile;
- },
- getgehaltsbestandteile: function() {
- var gbs = (this.config?.gbs !== undefined) ? this.config.gbs : [];
- return { children: gbs };
- },
- getgueltigkeit: function() {
- if( this.config?.gueltigkeit !== undefined ) {
- return this.config.gueltigkeit;
- } else if ( this.config?.data?.gueltigkeit !== undefined ) {
- return this.config.data.gueltigkeit;
- } else {
- return {};
- }
- },
- vbcssclasses: function() {
- var classes = [];
- if( (this.config?.guioptions?.nobottomborder === undefined)
- || ((this.config?.guioptions?.nobottomborder !== undefined)
- && this.config.guioptions.nobottomborder === false) ) {
- classes.push('border-bottom');
- }
- if( (this.config?.guioptions?.nobottommargin === undefined)
- || ((this.config?.guioptions?.nobottommargin !== undefined)
- && this.config.guioptions.nobottommargin === false) ) {
- classes.push('mb-3');
- }
- return classes;
- }
- }
-}
diff --git a/public/js/mixins/vbform/presetable.js b/public/js/mixins/vbform/presetable.js
deleted file mode 100644
index cfad85be3..000000000
--- a/public/js/mixins/vbform/presetable.js
+++ /dev/null
@@ -1,21 +0,0 @@
-export default {
- props: [
- 'preset'
- ],
- data: function() {
- return {
- children: []
- }
- },
- created: function() {
- this.children = JSON.parse(JSON.stringify(this.preset.children));
- },
- watch: {
- preset: function() {
- this.children = [];
- this.$nextTick(function() {
- this.children = JSON.parse(JSON.stringify(this.preset.children));
- });
- }
- }
-}