mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 23:42:17 +00:00
add form as first param
This commit is contained in:
@@ -14,19 +14,19 @@ export default {
|
||||
|
||||
return config;
|
||||
},
|
||||
checkDoubles(data) {
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/konto/checkDoubles', data, {
|
||||
checkDoubles(form, data) {
|
||||
return this.$fhcApi.post(form, 'api/frontend/v1/stv/konto/checkDoubles', data, {
|
||||
confirmErrorHandler: error => true
|
||||
});
|
||||
},
|
||||
insert(data) {
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/konto/insert', data);
|
||||
insert(form, data) {
|
||||
return this.$fhcApi.post(form, 'api/frontend/v1/stv/konto/insert', data);
|
||||
},
|
||||
counter(data) {
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/konto/counter', data);
|
||||
},
|
||||
edit(data) {
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/konto/update', data);
|
||||
edit(form, data) {
|
||||
return this.$fhcApi.post(form, 'api/frontend/v1/stv/konto/update', data);
|
||||
},
|
||||
delete(buchungsnr) {
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/konto/delete', {buchungsnr});
|
||||
|
||||
@@ -33,8 +33,8 @@ export default {
|
||||
this.$refs.form.clearValidation();
|
||||
this.loading = true;
|
||||
|
||||
this.$refs.form
|
||||
.factory.stv.konto.edit(this.data)
|
||||
this.$fhcApi
|
||||
.factory.stv.konto.edit(this.$refs.form, this.data)
|
||||
.then(result => {
|
||||
this.$emit('saved', result.data);
|
||||
this.loading = false;
|
||||
|
||||
@@ -58,8 +58,8 @@ export default {
|
||||
studiengang_kz: this.stgKz
|
||||
}, ...this.data};
|
||||
|
||||
this.$refs.form
|
||||
.factory.stv.konto.checkDoubles(data)
|
||||
this.$fhcApi
|
||||
.factory.stv.konto.checkDoubles(this.$refs.form, data)
|
||||
.then(result => result.data
|
||||
? Promise.all(
|
||||
result.errors
|
||||
@@ -68,7 +68,7 @@ export default {
|
||||
)
|
||||
: Promise.resolve())
|
||||
.then(() => data)
|
||||
.then(this.$refs.form.factory.stv.konto.insert)
|
||||
.then(this.$fhcApi.factory.stv.konto.insert(this.$refs.form))
|
||||
.then(result => {
|
||||
this.$emit('saved', result.data);
|
||||
this.loading = false;
|
||||
|
||||
Reference in New Issue
Block a user