mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-18 20:49:27 +00:00
remove files moved to FHC-Core-Personalverwaltung Extension
This commit is contained in:
@@ -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: {
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -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: `
|
||||
<div class="container-fluid">
|
||||
<h1>{{ title }}</h1>
|
||||
|
||||
<presets_chooser :presets="presets" @presetselected="presetselected"></presets_chooser>
|
||||
|
||||
<div class="row g-2 py-2">
|
||||
|
||||
<div class="col-8">
|
||||
<vbformhelper ref="vbformhelper" :preset="preset" @vbhjsonready="processJSON"></vbformhelper>
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
<debug_viewer v-bind:text="vbhjson"></debug_viewer>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
`,
|
||||
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');
|
||||
@@ -1,12 +0,0 @@
|
||||
export default {
|
||||
template: `
|
||||
<div>
|
||||
<pre style="background-color: #000; color: #0f0; padding: .5em; height: 90vh;">
|
||||
{{text}}
|
||||
</pre>
|
||||
</div>
|
||||
`,
|
||||
props: [
|
||||
"text"
|
||||
]
|
||||
}
|
||||
@@ -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:`
|
||||
<div class="row g-2 py-2 border-bottom mb-3">
|
||||
<dvaenderung ref="formheader" :config="data" v-if="isaenderung"></dvaenderung>
|
||||
<dvneuanlage ref="formheader" :config="data" v-else=""></dvneuanlage>
|
||||
</div>
|
||||
`,
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
import gueltigkeit from './gueltigkeit.js';
|
||||
import configurable from '../../mixins/vbform/configurable.js';
|
||||
|
||||
export default {
|
||||
template: `
|
||||
<div class="col-7">Aenderung</div>
|
||||
<gueltigkeit ref="gueltigkeit" :initialsharedstatemode="'set'" :config="getgueltigkeit"></gueltigkeit>
|
||||
<div class="col-1"> </div>
|
||||
`,
|
||||
components: {
|
||||
'gueltigkeit': gueltigkeit
|
||||
},
|
||||
mixins: [
|
||||
configurable
|
||||
],
|
||||
methods: {
|
||||
getPayload: function() {
|
||||
return {
|
||||
dienstverhaeltnisid: this.config.dienstverhaeltnisid,
|
||||
gueltigkeit: this.$refs.gueltigkeit.getPayload()
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
import gueltigkeit from './gueltigkeit.js';
|
||||
import configurable from '../../mixins/vbform/configurable.js';
|
||||
|
||||
export default {
|
||||
template: `
|
||||
<div class="col-3">
|
||||
<select v-model="unternehmen" class="form-select form-select-sm" aria-label=".form-select-sm example">
|
||||
<option value="" selected disabled>Unternehmen wählen</option>
|
||||
<option value="gst">FH Technikum Wien</option>
|
||||
<option value="gmbh">Technikum Wien GmbH</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<select v-model="vertragsart_kurzbz" class="form-select form-select-sm" aria-label=".form-select-sm example">
|
||||
<option value="" selected disabled>Vertragsart wählen</option>
|
||||
<option value="echterDV">Echter DV</option>
|
||||
<option value="freierDV">Freier DV</option>
|
||||
<option value="Gastlektor">Gastlektor</option>
|
||||
<option value="Werkvertrag">Werkvertrag</option>
|
||||
<option value="StudHilfskraft">Stud. Hilfskraft</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-1"> </div>
|
||||
<gueltigkeit ref="gueltigkeit" :initialsharedstatemode="'set'" :config="getgueltigkeit"></gueltigkeit>
|
||||
<div class="col-1"> </div>
|
||||
`,
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
export default {
|
||||
template: `
|
||||
<div v-if="errors.length > 0" class="row g-2">
|
||||
<div class="col-12">
|
||||
<div class="alert py-1 alert-danger" v-for="(error, idx) in errors" :key="idx">{{ error }}</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
props: [
|
||||
'errors'
|
||||
]
|
||||
}
|
||||
@@ -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: `
|
||||
<infos :infos="(config?.guioptions?.infos !== undefined) ? config?.guioptions?.infos : []"></infos>
|
||||
<errors :errors="(config?.guioptions?.errors !== undefined) ? config?.guioptions?.errors : []"></errors>
|
||||
<div class="row g-2 py-2">
|
||||
<div class="col-1">
|
||||
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<select v-model="gehaltstyp" class="form-select form-select-sm" aria-label=".form-select-sm example">
|
||||
<option value="" selected disabled>Gehaltstyp wählen</option>
|
||||
<option value="basis">Basisgehalt</option>
|
||||
<option value="grund">Grundgehalt</option>
|
||||
<option value="zulage">Zulage</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="input-group input-group-sm mb-3">
|
||||
<input v-model="betrag" type="text" class="form-control form-control-sm" placeholder="betrag" aria-label="betrag">
|
||||
<span class="input-group-text">€</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2 form-check form-control-sm">
|
||||
<input v-model="valorisierung" class="form-check-input" type="checkbox" value="" id="flexCheckDefault">
|
||||
<label class="form-check-label" for="flexCheckDefault">
|
||||
Valorisierung
|
||||
</label>
|
||||
</div>
|
||||
<gueltigkeit ref="gueltigkeit" :config="getgueltigkeit"></gueltigkeit>
|
||||
<div class="col-1">
|
||||
<button v-if="isremoveable" type="button" class="btn-close btn-sm p-2 float-end" @click="removeGB" aria-label="Close"></button>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
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
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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: `
|
||||
<gehaltsbestandteil ref="parts" v-for="config in children"
|
||||
v-bind:config="config" :key="config.guioptions.id" @removeGB="removeGB"></gehaltsbestandteil>
|
||||
<div class="row">
|
||||
<div class="col-1">
|
||||
|
||||
</div>
|
||||
<div class="col-11">
|
||||
<a class="fs-6 fw-light" href="javascript:void(0);" @click="addGB"><i class="fas fa-plus"></i> Gehaltsbestandteil hinzufuegen</a>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
import configurable from '../../mixins/vbform/configurable.js';
|
||||
import sharedstate from './vbsharedstate.js';
|
||||
|
||||
export default {
|
||||
template: `
|
||||
<div class="col-4">
|
||||
<div class="input-group input-group-sm">
|
||||
<input v-model="gueltig_ab" :disabled="isdisabled" @change="gueltigkeitchanged" type="text" class="form-control form-control-sm" placeholder="gültig ab" aria-label="gueltig ab">
|
||||
<span class="input-group-text">‐</span>
|
||||
<input v-model="gueltig_bis" :disabled="isdisabled" @change="gueltigkeitchanged" type="text" class="form-control form-control-sm" placeholder="gültig bis" aria-label="gueltig bis">
|
||||
<span class="input-group-text" v-if="(this.sharedstatemode === 'reflect')">
|
||||
<i @click="changesharedstatemode('ignore')" class="fas fa-link"></i>
|
||||
</span>
|
||||
<span class="input-group-text" v-else-if="(this.sharedstatemode === 'ignore')">
|
||||
<i @click="changesharedstatemode('reflect')" class="fas fa-unlink"></i>
|
||||
</span>
|
||||
<span class="input-group-text bg-white border-0" v-else-if="(this.sharedstatemode === 'set')">
|
||||
<i class="fas fa-square text-white"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
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');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
export default {
|
||||
template: `
|
||||
<div v-if="infos.length > 0" class="row g-2">
|
||||
<div class="col-12">
|
||||
<div class="alert py-1 alert-info" v-for="(error, idx) in infos" :key="idx">{{ error }}</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
props: [
|
||||
'infos'
|
||||
]
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
import store from './vbsharedstate.js';
|
||||
|
||||
export default {
|
||||
template: `
|
||||
<div class="row g-2 py-2">
|
||||
<div class="col-4">
|
||||
|
||||
<select v-model="selectedpresetidx" @change="selectpreset">
|
||||
<option v-for="(preset, idx) in presets" :key="idx"
|
||||
:value="idx"
|
||||
:selected="idx === selectedpresetidx">
|
||||
{{ preset.guioptions.label }}
|
||||
</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<div class="col-8"> </div>
|
||||
</div>
|
||||
`,
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
export default {
|
||||
props: [
|
||||
'preset'
|
||||
],
|
||||
template: `
|
||||
<div v-for="(id, label) in preset.guioptions.tabs" :key="id" class="sections">
|
||||
<div>{{label}}</div>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
@@ -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: `
|
||||
<div class="tab-pane fade" :class="(activetab === preset.guioptions.id) ? 'active show' : ''"
|
||||
:id="'v-pills-' + preset.guioptions.id"
|
||||
role="tabpanel"
|
||||
:aria-labelledby="'v-pills-' + preset.guioptions.id + '-tab'"
|
||||
tabindex="0">
|
||||
<component ref="parts" v-for="(child, idx) in children" :is="child.type" :key="idx" :preset="child"></component>
|
||||
</div>
|
||||
`,
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
import presetable from '../../mixins/vbform/presetable.js';
|
||||
import tab from './tab.js';
|
||||
|
||||
export default {
|
||||
template: `
|
||||
<div class="d-flex align-items-start">
|
||||
<div class="nav flex-column nav-pills me-3" id="v-pills-tab" role="tablist" aria-orientation="vertical">
|
||||
<button v-for="(child, idx) in children"
|
||||
:key="idx"
|
||||
class="nav-link"
|
||||
:class="(this.activetab === child.guioptions.id) ? 'active' : ''"
|
||||
:id="'v-pills-' + child.guioptions.id + 'tab'"
|
||||
data-bs-toggle="pill"
|
||||
:data-bs-target="'#v-pills-' + child.guioptions.id"
|
||||
type="button"
|
||||
role="tab"
|
||||
:aria-controls="'v-pills-' + child.guioptions.id"
|
||||
:aria-selected="(this.activetab === child.guioptions.id) ? 'true' : 'false'">
|
||||
{{ child.guioptions.title }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="tab-content w-100" id="v-pills-tabContent">
|
||||
<component ref="parts" v-for="(child, idx) in children" :is="child.type" :key="idx" :preset="child" :activetab="activetab"></component>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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: `
|
||||
<div class="vbformhelper">
|
||||
<div class="border-bottom py-2 mb-3">
|
||||
<div class="row g-2 py-2">
|
||||
<div class="col-11"> </div>
|
||||
<div class="col-1">
|
||||
<button class="btn btn-secondary btn-sm float-end" @click="getJSON">get JSON</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<component ref="parts" v-for="(child, idx) in children" :key="idx" :is="child.type" :preset="child"></component>
|
||||
</div>
|
||||
`,
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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 = {};
|
||||
}
|
||||
});
|
||||
@@ -1,97 +0,0 @@
|
||||
import gehaltsbestandteilhelper from './gehaltsbestandteilhelper.js';
|
||||
import gueltigkeit from './gueltigkeit.js';
|
||||
import configurable from '../../mixins/vbform/configurable.js';
|
||||
|
||||
export default {
|
||||
template: `
|
||||
<div class="border-bottom py-2 mb-3">
|
||||
<div class="row g-2 py-2">
|
||||
<div class="col-7">
|
||||
<select v-model="freitexttyp" :disabled="isinputdisabled('freitexttyp')" class="form-select form-select-sm" aria-label=".form-select-sm example">
|
||||
<option value="" selected>Freitexttyp wählen</option>
|
||||
<option value="allin">AllIn</option>
|
||||
<option value="ersatzkraft">Ersatzarbeitskraft</option>
|
||||
<option value="zusatzvbg">Zusatzvereinbarung</option>
|
||||
<option value="befristung">Befristung</option>
|
||||
<option value="sonstiges">Sonstiges</option>
|
||||
</select>
|
||||
</div>
|
||||
<gueltigkeit ref="gueltigkeit" :config="getgueltigkeit"></gueltigkeit>
|
||||
<div class="col-1">
|
||||
<button v-if="isremoveable" type="button" class="btn-close btn-sm p-2 float-end" @click="removeVB" aria-label="Close"></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-2 py-2" v-show="showinput('titel')">
|
||||
<div class="col-11">
|
||||
<input v-model="titel" type="text" class="form-control form-control-sm" placeholder="Titel" aria-label="Titel">
|
||||
</div>
|
||||
<div class="col-1"> </div>
|
||||
</div>
|
||||
<div class="row g-2 py-2" v-show="showinput('freitext')">
|
||||
<div class="col-11">
|
||||
<textarea v-model="freitext" rows="5" class="form-control form-control-sm" placeholder="Freitext" aria-label="Freitext"></textarea>
|
||||
</div>
|
||||
<div class="col-1"> </div>
|
||||
</div>
|
||||
<gehaltsbestandteilhelper ref="gbh" v-if="canhavegehaltsbestandteile" v-bind:preset="getgehaltsbestandteile"></gehaltsbestandteilhelper>
|
||||
</div>
|
||||
`,
|
||||
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()
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
import gehaltsbestandteilhelper from './gehaltsbestandteilhelper.js'
|
||||
import gueltigkeit from './gueltigkeit.js';
|
||||
import configurable from '../../mixins/vbform/configurable.js';
|
||||
|
||||
export default {
|
||||
template: `
|
||||
<div class="py-2" :class="vbcssclasses">
|
||||
<div class="row g-2">
|
||||
<div class="col">
|
||||
<input v-model="funktion" :disabled="isinputdisabled('funktion')" type="text" class="form-control form-control-sm" placeholder="Funktion" aria-label="funktion">
|
||||
</div>
|
||||
<div class="col">
|
||||
<input v-model="orget" type="text" class="form-control form-control-sm" placeholder="Organisations-Einheit" aria-label="orget">
|
||||
</div>
|
||||
<gueltigkeit ref="gueltigkeit" :config="getgueltigkeit"></gueltigkeit>
|
||||
<div class="col-1">
|
||||
<button v-if="isremoveable" type="button" class="btn-close btn-sm p-2 float-end" @click="removeVB" aria-label="Close"></button>
|
||||
</div>
|
||||
</div>
|
||||
<gehaltsbestandteilhelper v-if="canhavegehaltsbestandteile" ref="gbh" v-bind:preset="getgehaltsbestandteile"></gehaltsbestandteilhelper>
|
||||
</div>
|
||||
`,
|
||||
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()
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
import gehaltsbestandteilhelper from './gehaltsbestandteilhelper.js';
|
||||
import gueltigkeit from './gueltigkeit.js';
|
||||
import configurable from '../../mixins/vbform/configurable.js';
|
||||
|
||||
export default {
|
||||
template: `
|
||||
<div class="border-bottom py-2 mb-3">
|
||||
<div class="row g-2">
|
||||
<div class="col-3">
|
||||
<div class="input-group input-group-sm mb-3">
|
||||
<input v-model="arbeitgeber_frist" type="text" class="form-control form-control-sm" placeholder="Arbeitgeber Frist" aria-label="arbeitgeber_frist">
|
||||
<span class="input-group-text">Wochen</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<div class="input-group input-group-sm mb-3">
|
||||
<input v-model="arbeitnehmer_frist" type="text" class="form-control form-control-sm" placeholder="Arbeitnehmer Frist" aria-label="arbeitnehmer_frist">
|
||||
<span class="input-group-text">Wochen</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-1"> </div>
|
||||
<gueltigkeit ref="gueltigkeit" :config="getgueltigkeit"></gueltigkeit>
|
||||
<div class="col-1">
|
||||
<button v-if="isremoveable" type="button" class="btn-close btn-sm p-2 float-end" @click="removeVB" aria-label="Close"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
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(),
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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: `
|
||||
<div class="border-bottom py-2 mb-3">
|
||||
<infos :infos="(config?.guioptions?.infos !== undefined) ? config?.guioptions?.infos : []"></infos>
|
||||
<errors :errors="(config?.guioptions?.errors !== undefined) ? config?.guioptions?.errors : []"></errors>
|
||||
<div class="row g-2">
|
||||
<div class="col-3">
|
||||
<div class="input-group input-group-sm mb-3">
|
||||
<input v-model="stunden" type="text" class="form-control form-control-sm" placeholder="Stunden" aria-label="stunden">
|
||||
<span class="input-group-text">Std/Woche</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4"> </div>
|
||||
<gueltigkeit ref="gueltigkeit" :config="getgueltigkeit"></gueltigkeit>
|
||||
<div class="col-1">
|
||||
<button v-if="isremoveable" type="button" class="btn-close btn-sm p-2 float-end" @click="removeVB" aria-label="Close"></button>
|
||||
</div>
|
||||
</div>
|
||||
<gehaltsbestandteilhelper ref="gbh" v-bind:preset="getgehaltsbestandteile"></gehaltsbestandteilhelper>
|
||||
</div>
|
||||
`,
|
||||
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()
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
import gueltigkeit from './gueltigkeit.js';
|
||||
import configurable from '../../mixins/vbform/configurable.js';
|
||||
|
||||
export default {
|
||||
template: `
|
||||
<div class="border-bottom py-2 mb-3">
|
||||
<div class="row g-2">
|
||||
<div class="col-2 form-check form-control-sm">
|
||||
<input v-model="zeitaufzeichnung" class="form-check-input" type="checkbox" value="" id="flexCheckDefault">
|
||||
<label class="form-check-label" for="flexCheckDefault">
|
||||
Zeitaufzeichnung
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-2 form-check form-control-sm">
|
||||
<input v-model="azgrelevant" class="form-check-input" type="checkbox" value="" id="flexCheckDefault">
|
||||
<label class="form-check-label" for="flexCheckDefault">
|
||||
AZG-relevant
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-2 form-check form-control-sm">
|
||||
<input v-model="homeoffice" class="form-check-input" type="checkbox" value="" id="flexCheckDefault">
|
||||
<label class="form-check-label" for="flexCheckDefault">
|
||||
Home-Office
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-1 form-check form-control-sm"> </div>
|
||||
<gueltigkeit ref="gueltigkeit" :config="getgueltigkeit"></gueltigkeit>
|
||||
<div class="col-1">
|
||||
<button v-if="isremoveable" type="button" class="btn-close btn-sm p-2 float-end" @click="removeVB" aria-label="Close"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
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()
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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: `
|
||||
<div>
|
||||
<div class="row g-2 py-2 border-bottom mb-3">
|
||||
<dvaenderung ref="formheader" :config="data" v-if="isaenderung"></dvaenderung>
|
||||
<dvneuanlage ref="formheader" :config="data" v-else=""></dvneuanlage>
|
||||
</div>
|
||||
<component v-bind:ref="config.guioptions.id" v-bind:is="config.type" v-for="config in children"
|
||||
v-bind:config="config" :key="config.guioptions.id" @removeVB="removeVB"></component>
|
||||
<div class="row py-2 border-bottom mb-3">
|
||||
<div class="col">
|
||||
<select v-model="vertragsbestandteiltyp" class="form-select form-select-sm" aria-label=".form-select-sm example">
|
||||
<option value="" selected disabled>Vertragsbestandteil wählen</option>
|
||||
<option value="vertragsbestandteilstunden">Vertragsbestandteil Stunden</option>
|
||||
<option value="vertragsbestandteilzeitaufzeichnung">Vertragsbestandteil Zeitaufzeichnung</option>
|
||||
<option value="vertragsbestandteilfunktion">Vertragsbestandteil Funktion</option>
|
||||
<option value="vertragsbestandteilfreitext">Vertragsbestandteil Freitext</option>
|
||||
<option value="vertragsbestandteilkuendigungsfrist">Vertragsbestandteil Kündigungsfrist</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="btn btn-primary btn-sm" @click="addVB" v-bind:disabled="(this.vertragsbestandteiltyp === '')">Vertragsbestandteil hinzufuegen</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="btn btn-secondary btn-sm float-end" @click="getJSON">get JSON</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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: `
|
||||
<div>
|
||||
<div class="row g-2 py-2 border-bottom mb-3">
|
||||
<div class="col">
|
||||
<a class="fs-6 fw-light" href="javascript:void(0);" @click="addVB"><i class="fas fa-plus-square"></i></a>
|
||||
|
||||
<em>{{ title }}{{ childcount }}</em>
|
||||
</div>
|
||||
</div>
|
||||
<component ref="parts" v-bind:is="config.type" v-for="config in getChildren()"
|
||||
v-bind:config="config" :key="config.guioptions.id" @removeVB="removeVB"></component>
|
||||
</div>
|
||||
`,
|
||||
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 + ')' : '';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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];
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user