Commit 0e4c72a7 authored by Tobinsk's avatar Tobinsk
Browse files

Add validation checks

parent 765dd125
Pipeline #8630 passed with stage
in 4 minutes and 35 seconds
......@@ -51,11 +51,13 @@
<script>
import {mapGetters, mapActions, mapMutations} from 'vuex';
import PersonInfoRow from "@/components/PersonInfoRow";
import checks from "@/plugins/checks";
export default {
name: "ProposalList",
components: {PersonInfoRow},
computed: {
...mapGetters('proposal', ['list']),
...mapGetters('concordance', ['editList']),
proposals() {
return this.list.map((p) => {
p.base.match = true;
......@@ -77,6 +79,18 @@
for (const c of matches) {
this.edit(c)
}
if (checks.hasError(checks.run(this.editList))) {
this.$bvModal.msgBoxOk('Validation error. Check the input for errors', {
title: 'Can\'t save concordance',
okVariant: 'warning',
headerClass: 'p-2',
footerClass: 'p-2',
centered: true
});
// don't update
return;
}
this.merge()
}
// save all refused
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment