mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
problem with switching presets and problem with vanishing gehaltsbestandteile solved
This commit is contained in:
@@ -59,9 +59,7 @@ export default [
|
||||
data: {
|
||||
dienstverhaeltnisid: null
|
||||
},
|
||||
vbs: {
|
||||
|
||||
}
|
||||
vbs: {}
|
||||
},
|
||||
{
|
||||
type: 'preset',
|
||||
|
||||
@@ -62,15 +62,19 @@ Vue.createApp({
|
||||
'vbformhelper': vbformhelper
|
||||
},
|
||||
created: 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)));
|
||||
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;
|
||||
|
||||
@@ -62,17 +62,13 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
setDataFromConfig: function() {
|
||||
if( typeof this.config.data === 'undefined' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if( typeof this.config.data.gehaltstyp !== 'undefined' ) {
|
||||
if( typeof this.config?.data?.gehaltstyp !== 'undefined' ) {
|
||||
this.gehaltstyp = this.config.data.gehaltstyp;
|
||||
}
|
||||
if( typeof this.config.data.betrag !== 'undefined' ) {
|
||||
if( typeof this.config?.data?.betrag !== 'undefined' ) {
|
||||
this.betrag = this.config.data.betrag;
|
||||
}
|
||||
if( typeof this.config.data.valorisierung !== 'undefined' ) {
|
||||
if( typeof this.config?.data?.valorisierung !== 'undefined' ) {
|
||||
this.valorisierung = this.config.data.valorisierung;
|
||||
}
|
||||
},
|
||||
@@ -82,7 +78,7 @@ export default {
|
||||
getPayload: function() {
|
||||
return {
|
||||
type: this.config.type,
|
||||
guioptions: this.config.guioptions,
|
||||
guioptions: JSON.parse(JSON.stringify(this.config.guioptions)),
|
||||
data: {
|
||||
gehaltstyp: this.gehaltstyp,
|
||||
betrag: this.betrag,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import store from './vbsharedstate.js';
|
||||
|
||||
export default {
|
||||
template: `
|
||||
<div class="row g-2 py-2">
|
||||
@@ -20,6 +22,7 @@ export default {
|
||||
],
|
||||
data: function() {
|
||||
return {
|
||||
store: store,
|
||||
selectedpresetidx: 1
|
||||
}
|
||||
},
|
||||
@@ -29,6 +32,7 @@ export default {
|
||||
methods: {
|
||||
selectpreset: function() {
|
||||
var preset = this.presets[this.selectedpresetidx];
|
||||
this.store.reset();
|
||||
this.$emit("presetselected", preset);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,5 +29,13 @@ export default Vue.reactive({
|
||||
},
|
||||
getVBsPayload: function() {
|
||||
return JSON.parse(JSON.stringify(this.vbs));
|
||||
},
|
||||
reset: function() {
|
||||
this.gueltigkeit = {
|
||||
gueltig_ab: '',
|
||||
gueltig_bis: ''
|
||||
};
|
||||
this.dv = {};
|
||||
this.vbs = {};
|
||||
}
|
||||
});
|
||||
|
||||
@@ -77,7 +77,7 @@ export default {
|
||||
this.$emit('removeVB', {id: this.config.guioptions.id});
|
||||
},
|
||||
getGehaltsbestandteilePayload: function() {
|
||||
return (!this.$refs?.gbh === undefined) ? this.$refs.gbh.getPayload() : [];
|
||||
return (this.$refs?.gbh !== undefined) ? this.$refs.gbh.getPayload() : [];
|
||||
},
|
||||
getPayload: function() {
|
||||
return {
|
||||
|
||||
@@ -53,7 +53,7 @@ export default {
|
||||
this.$emit('removeVB', {id: this.config.guioptions.id});
|
||||
},
|
||||
getGehaltsbestandteilePayload: function() {
|
||||
return (!this.$refs?.gbh === undefined) ? this.$refs.gbh.getPayload() : [];
|
||||
return (this.$refs?.gbh !== undefined) ? this.$refs.gbh.getPayload() : [];
|
||||
},
|
||||
getPayload: function() {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user