mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-12-18 08:05:41 +00:00
commit 977863c2dd56d5c835f2a710cad7f7d3ba42da68 Merge: 5c37b419d3eb7ffed1Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Sun Dec 12 14:45:21 2021 +0100 Merge remote-tracking branch 'origin/master' into docgen/improve-normalizer commit 5c37b419ddf0b32b9950c33042396bba1860da84 Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Sun Dec 12 14:37:05 2021 +0100 fix normalization for user and type in null value commit 4469d46cdb19051fedec86bbb84e2351e6fcb72e Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Sun Dec 12 13:24:23 2021 +0100 add civility to person commit 6cf92fbbde8f4d9f2f4763ec4ee88216257040f7 Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Sun Dec 12 13:19:36 2021 +0100 fix person normalization: add a isNull on not null person commit ed6087ff8fd47b80ea5e9526756fe5d032d478e3 Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Sun Dec 12 13:08:46 2021 +0100 fix stan and cs issues commit 8429c334c33b3545835cbde034fccaa529c134a7 Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Sun Dec 12 13:08:36 2021 +0100 fix id type commit 39ae00d172a9f29320a97abb8518b2ea48d89d9b Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Sun Dec 12 12:52:41 2021 +0100 fix test and fix null or not-null value have same keys commit 312fcc44c07affa7aa60f6c5fce58f9d1c564cc3 Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Sat Dec 11 03:27:30 2021 +0100 improve normalization wip commit f91a29635827005fc58617dc1c9d210091372be5 Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Sat Dec 11 01:15:32 2021 +0100 improve normalization commit 56060e5e6a2191ef441039fdc91a01fb4653a553 Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Sat Dec 11 00:41:09 2021 +0100 handle changelog with translatable string commit9004686a13Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Fri Dec 10 01:10:55 2021 +0100 improve docgen wip commite266fa0e5dAuthor: Julien Fastré <julien.fastre@champs-libres.coop> Date: Thu Dec 9 21:50:56 2021 +0100 show errors from relatorio driver commit75ba56fa09Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Thu Dec 9 21:14:12 2021 +0100 add verification tool for admin commit12d6829b98Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Thu Dec 9 14:17:42 2021 +0100 fix type with phonenumber helper commit7b5e96771fMerge:8a9024de18a4748dc2Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Thu Dec 9 14:11:14 2021 +0100 Merge remote-tracking branch 'origin/master' into docgen/improve-normalizer commit8a9024de13Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Thu Dec 9 13:51:36 2021 +0100 add docgen:normalization for relation commit24a404964bAuthor: Julien Fastré <julien.fastre@champs-libres.coop> Date: Thu Dec 9 12:44:41 2021 +0100 docgen normalization for relation commit5d24bd4d11Merge:70ab23214455b225f4Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Wed Dec 8 21:08:30 2021 +0100 Merge branch 'master' into docgen/improve-normalizer commit70ab232149Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Wed Dec 8 13:58:49 2021 +0100 improve docgen, trnslations, admin commit027c01fc58Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Wed Dec 8 12:23:24 2021 +0100 fix css block commitfdc5127c74Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Wed Dec 8 11:57:16 2021 +0100 fix some error in test (wip) commitb8d48f04aeAuthor: Julien Fastré <julien.fastre@champs-libres.coop> Date: Wed Dec 8 11:47:50 2021 +0100 fix tests (wip) commitf1b1771d6bAuthor: Julien Fastré <julien.fastre@champs-libres.coop> Date: Wed Dec 8 11:35:00 2021 +0100 fix tests (wip) commit62dabbe1e7Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Wed Dec 8 11:14:46 2021 +0100 fix code style commit4101392190Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Wed Dec 8 11:13:49 2021 +0100 fix tests and type hinting commit3f1bed0b1cAuthor: Julien Fastré <julien.fastre@champs-libres.coop> Date: Wed Dec 8 11:05:41 2021 +0100 fix tests (wip) commit79fbdcdee4Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Wed Dec 8 11:05:29 2021 +0100 type hint User class commit3d8d79323eAuthor: Julien Fastré <julien.fastre@champs-libres.coop> Date: Wed Dec 8 10:56:30 2021 +0100 remove error messages commit32178e22feAuthor: Julien Fastré <julien.fastre@champs-libres.coop> Date: Wed Dec 8 10:51:30 2021 +0100 fix tests (wip) commit60a8c20896Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Wed Dec 8 10:29:54 2021 +0100 update app commit9d8011da61Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Wed Dec 8 10:06:35 2021 +0100 fix loading origin commit789eeadb40Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Wed Dec 8 09:52:51 2021 +0100 fix loading fixtures for doc generator template commitf206fdb08cAuthor: Julien Fastré <julien.fastre@champs-libres.coop> Date: Wed Dec 8 09:52:35 2021 +0100 fix code style commit9d5409d8d9Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Wed Dec 8 09:52:06 2021 +0100 fix casting commite297d82533Author: Julien Fastré <julien.fastre@champs-libres.coop> Date: Wed Dec 8 09:26:13 2021 +0100 fixes on tests [WIP]
90 lines
2.3 KiB
Vue
90 lines
2.3 KiB
Vue
<template>
|
|
<div class="vue-component">
|
|
<h2><a id="section-30"></a>{{ $t('origin.title') }}</h2>
|
|
|
|
<div class="mb-4">
|
|
<label for="selectOrigin">
|
|
{{ $t('origin.label.fr') }}
|
|
</label>
|
|
|
|
<VueMultiselect
|
|
name="selectOrigin"
|
|
label="text"
|
|
:custom-label="transText"
|
|
track-by="id"
|
|
:multiple="false"
|
|
:searchable="true"
|
|
:placeholder="$t('origin.placeholder')"
|
|
v-model="value"
|
|
:options="options"
|
|
@select="updateOrigin">
|
|
</VueMultiselect>
|
|
</div>
|
|
|
|
<div v-if="!isOriginValid" class="alert alert-warning to-confirm">
|
|
{{ $t('origin.not_valid') }}
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import VueMultiselect from 'vue-multiselect';
|
|
import { makeFetch } from 'ChillMainAssets/lib/api/apiMethods';
|
|
import { mapState, mapGetters } from 'vuex';
|
|
|
|
export default {
|
|
name: 'OriginDemand',
|
|
components: { VueMultiselect },
|
|
data() {
|
|
return {
|
|
options: []
|
|
}
|
|
},
|
|
computed: {
|
|
...mapState({
|
|
value: state => state.accompanyingCourse.origin,
|
|
}),
|
|
...mapGetters([
|
|
'isOriginValid'
|
|
])
|
|
},
|
|
mounted() {
|
|
this.getOptions();
|
|
},
|
|
methods: {
|
|
getOptions() {
|
|
const url = `/api/1.0/person/accompanying-period/origin.json`;
|
|
makeFetch('GET', url)
|
|
.then(response => {
|
|
this.options = response.results;
|
|
return response;
|
|
})
|
|
.catch((error) => {
|
|
commit('catchError', error);
|
|
this.$toast.open({message: error.txt})
|
|
})
|
|
},
|
|
updateOrigin(value) {
|
|
this.$store.dispatch('updateOrigin', value)
|
|
.catch(({name, violations}) => {
|
|
if (name === 'ValidationException' || name === 'AccessException') {
|
|
violations.forEach((violation) => this.$toast.open({message: violation}));
|
|
} else {
|
|
this.$toast.open({message: 'An error occurred'})
|
|
}
|
|
});
|
|
},
|
|
transText ({ text }) {
|
|
return text.fr;
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style src="vue-multiselect/dist/vue-multiselect.css"></style>
|
|
<style lang="css" scoped>
|
|
label {
|
|
display: none;
|
|
}
|
|
</style>
|