mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
job in accompanying course: validation
This commit is contained in:
parent
216c035bac
commit
74e94637b9
@ -204,6 +204,7 @@ class AccompanyingPeriod implements
|
||||
* targetEntity=UserJob::class
|
||||
* )
|
||||
* @Groups({"read", "write"})
|
||||
* @Assert\NotBlank(groups={AccompanyingPeriod::STEP_CONFIRMED})
|
||||
*/
|
||||
private ?UserJob $job = null;
|
||||
|
||||
|
@ -110,7 +110,11 @@ export default {
|
||||
scopes: {
|
||||
msg: 'confirm.set_a_scope',
|
||||
anchor: '#section-70'
|
||||
}
|
||||
},
|
||||
job: {
|
||||
msg: 'confirm.job_not_valid',
|
||||
anchor: '#section-80'
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -124,6 +128,7 @@ export default {
|
||||
'isOriginValid',
|
||||
'isAdminLocationValid',
|
||||
'isLocationValid',
|
||||
'isJobValid',
|
||||
'validationKeys',
|
||||
'isValidToBeConfirmed'
|
||||
]),
|
||||
|
@ -67,13 +67,17 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div v-if="!isJobValid" class="alert alert-warning to-confirm">
|
||||
{{ $t('job.not_valid') }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import VueMultiselect from 'vue-multiselect';
|
||||
import { makeFetch } from 'ChillMainAssets/lib/api/apiMethods';
|
||||
import { mapState } from 'vuex';
|
||||
import { mapState, mapGetters } from 'vuex';
|
||||
import UserRenderBoxBadge from "ChillMainAssets/vuejs/_components/Entity/UserRenderBoxBadge";
|
||||
|
||||
export default {
|
||||
@ -101,11 +105,12 @@ export default {
|
||||
})
|
||||
},
|
||||
}),
|
||||
...mapGetters([
|
||||
'isJobValid'
|
||||
])
|
||||
},
|
||||
mounted() {
|
||||
this.getJobs();
|
||||
console.log(this.users)
|
||||
console.log(this.jobs)
|
||||
},
|
||||
methods: {
|
||||
updateReferrer(value) {
|
||||
@ -130,7 +135,6 @@ export default {
|
||||
})
|
||||
},
|
||||
updateJob(value) {
|
||||
console.log(value)
|
||||
this.$store.dispatch('updateJob', value)
|
||||
.catch(({name, violations}) => {
|
||||
if (name === 'ValidationException' || name === 'AccessException') {
|
||||
|
@ -134,6 +134,7 @@ const appMessages = {
|
||||
location_not_valid: "indiquez au minimum une localisation temporaire du parcours",
|
||||
origin_not_valid: "Indiquez une origine à la demande",
|
||||
adminLocation_not_valid: "Indiquez une localisation administrative à la demande",
|
||||
job_not_valid: "Indiquez un métier du référent",
|
||||
set_a_scope: "indiquez au moins un service",
|
||||
sure: "Êtes-vous sûr ?",
|
||||
sure_description: "Une fois le changement confirmé, il ne sera plus possible de le remettre à l'état de brouillon !",
|
||||
@ -142,7 +143,8 @@ const appMessages = {
|
||||
},
|
||||
job: {
|
||||
label: "Métier",
|
||||
placeholder: "Choisir un métier"
|
||||
placeholder: "Choisir un métier",
|
||||
not_valid: "Sélectionnez un métier du référent"
|
||||
},
|
||||
// catch errors
|
||||
'Error while updating AccompanyingPeriod Course.': "Erreur du serveur lors de la mise à jour du parcours d'accompagnement.",
|
||||
|
@ -55,6 +55,9 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
|
||||
isLocationValid(state) {
|
||||
return state.accompanyingCourse.location !== null;
|
||||
},
|
||||
isJobValid(state) {
|
||||
return state.accompanyingCourse.job !== null;
|
||||
},
|
||||
isScopeValid(state) {
|
||||
//console.log('is scope valid', state.accompanyingCourse.scopes.length > 0);
|
||||
return state.accompanyingCourse.scopes.length > 0;
|
||||
@ -63,6 +66,7 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
|
||||
let keys = [];
|
||||
if (!getters.isParticipationValid) { keys.push('participation'); }
|
||||
if (!getters.isLocationValid) { keys.push('location'); }
|
||||
if (!getters.isJobValid) { keys.push('job'); }
|
||||
if (!getters.isSocialIssueValid) { keys.push('socialIssue'); }
|
||||
if (!getters.isOriginValid) { keys.push('origin'); }
|
||||
if (!getters.isAdminLocationValid) { keys.push('adminLocation'); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user