first eslint corrections

This commit is contained in:
Julie Lenaerts 2024-10-31 17:28:02 +01:00
parent f90f1c7ef8
commit 27ecae4486
109 changed files with 6903 additions and 4637 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<concerned-groups v-if="hasPerson"></concerned-groups> <concerned-groups v-if="hasPerson" />
<social-issues-acc v-if="hasSocialIssues"></social-issues-acc> <social-issues-acc v-if="hasSocialIssues" />
<location v-if="hasLocation"></location> <location v-if="hasLocation" />
</template> </template>
<script> <script>

View File

@ -1,38 +1,49 @@
<template> <template>
<teleport to="#add-persons" v-if="isComponentVisible"> <teleport
to="#add-persons"
<div class="flex-bloc concerned-groups" :class="getContext"> v-if="isComponentVisible"
<persons-bloc >
v-for="bloc in contextPersonsBlocs" <div
v-bind:key="bloc.key" class="flex-bloc concerned-groups"
v-bind:bloc="bloc" :class="getContext"
v-bind:blocWidth="getBlocWidth" >
v-bind:setPersonsInBloc="setPersonsInBloc"> <persons-bloc
</persons-bloc> v-for="bloc in contextPersonsBlocs"
</div> :key="bloc.key"
<div v-if="getContext === 'accompanyingCourse' && suggestedEntities.length > 0"> :bloc="bloc"
<ul class="list-suggest add-items inline"> :bloc-width="getBlocWidth"
<li v-for="(p, i) in suggestedEntities" @click="addSuggestedEntity(p)" :key="`suggestedEntities-${i}`"> :set-persons-in-bloc="setPersonsInBloc"
<person-text v-if="p.type === 'person'" :person="p"></person-text> />
<span v-else>{{ p.text }}</span> </div>
</li> <div v-if="getContext === 'accompanyingCourse' && suggestedEntities.length > 0">
</ul> <ul class="list-suggest add-items inline">
</div> <li
v-for="(p, i) in suggestedEntities"
<ul class="record_actions"> @click="addSuggestedEntity(p)"
<li class="add-persons"> :key="`suggestedEntities-${i}`"
<add-persons >
buttonTitle="activity.add_persons" <person-text
modalTitle="activity.add_persons" v-if="p.type === 'person'"
v-bind:key="addPersons.key" :person="p"
v-bind:options="addPersonsOptions" />
@addNewPersons="addNewPersons" <span v-else>{{ p.text }}</span>
ref="addPersons"> </li>
</add-persons>
</li>
</ul> </ul>
</div>
</teleport> <ul class="record_actions">
<li class="add-persons">
<add-persons
button-title="activity.add_persons"
modal-title="activity.add_persons"
:key="addPersons.key"
:options="addPersonsOptions"
@add-new-persons="addNewPersons"
ref="addPersons"
/>
</li>
</ul>
</teleport>
</template> </template>
<script> <script>

View File

@ -1,11 +1,17 @@
<template> <template>
<li> <li>
<span :title="person.text" @click.prevent="$emit('remove', person)"> <span
<span class="chill_denomination"> :title="person.text"
<person-text :person="person" :isCut="true"></person-text> @click.prevent="$emit('remove', person)"
</span> >
<span class="chill_denomination">
<person-text
:person="person"
:is-cut="true"
/>
</span> </span>
</li> </span>
</li>
</template> </template>
<script> <script>

View File

@ -1,21 +1,24 @@
<template> <template>
<div class="item-bloc" :style="{ 'flex-basis': blocWidth }"> <div
<div class="item-row"> class="item-bloc"
<div class="item-col"> :style="{ 'flex-basis': blocWidth }"
<h4>{{ $t(bloc.title) }}</h4> >
</div> <div class="item-row">
<div class="item-col"> <div class="item-col">
<ul class="list-suggest remove-items"> <h4>{{ $t(bloc.title) }}</h4>
<person-badge
v-for="person in bloc.persons"
v-bind:key="person.id"
v-bind:person="person"
@remove="removePerson">
</person-badge>
</ul>
</div>
</div> </div>
</div> <div class="item-col">
<ul class="list-suggest remove-items">
<person-badge
v-for="person in bloc.persons"
:key="person.id"
:person="person"
@remove="removePerson"
/>
</ul>
</div>
</div>
</div>
</template> </template>
<script> <script>

View File

@ -1,33 +1,32 @@
<template> <template>
<teleport to="#location"> <teleport to="#location">
<div class="mb-3 row"> <div class="mb-3 row">
<label :class="locationClassList"> <label :class="locationClassList">
{{ $t("activity.location") }} {{ $t("activity.location") }}
</label> </label>
<div class="col-sm-8"> <div class="col-sm-8">
<VueMultiselect <VueMultiselect
name="selectLocation" name="selectLocation"
id="selectLocation" id="selectLocation"
label="name" label="name"
track-by="id" track-by="id"
open-direction="top" open-direction="top"
:multiple="false" :multiple="false"
:searchable="true" :searchable="true"
:placeholder="$t('activity.choose_location')" :placeholder="$t('activity.choose_location')"
:custom-label="customLabel" :custom-label="customLabel"
:select-label="$t('multiselect.select_label')" :select-label="$t('multiselect.select_label')"
:deselect-label="$t('multiselect.deselect_label')" :deselect-label="$t('multiselect.deselect_label')"
:selected-label="$t('multiselect.selected_label')" :selected-label="$t('multiselect.selected_label')"
:options="availableLocations" :options="availableLocations"
group-values="locations" group-values="locations"
group-label="locationGroup" group-label="locationGroup"
v-model="location" v-model="location"
> />
</VueMultiselect> <new-location :available-locations="availableLocations" />
<new-location v-bind:availableLocations="availableLocations"></new-location> </div>
</div> </div>
</div> </teleport>
</teleport>
</template> </template>
<script> <script>

View File

@ -1,78 +1,135 @@
<template> <template>
<div> <div>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a class="btn btn-sm btn-create" @click="openModal"> <a
{{ $t('activity.create_new_location') }} class="btn btn-sm btn-create"
</a> @click="openModal"
</li> >
</ul> {{ $t('activity.create_new_location') }}
</a>
</li>
</ul>
<teleport to="body"> <teleport to="body">
<modal v-if="modal.showModal" <modal
:modalDialogClass="modal.modalDialogClass" v-if="modal.showModal"
@close="modal.showModal = false"> :modal-dialog-class="modal.modalDialogClass"
@close="modal.showModal = false"
>
<template #header>
<h3 class="modal-title">
{{ $t('activity.create_new_location') }}
</h3>
</template>
<template #body>
<form>
<div
class="alert alert-warning"
v-if="errors.length"
>
<ul>
<li
v-for="(e, i) in errors"
:key="i"
>
{{ e }}
</li>
</ul>
</div>
<template v-slot:header> <div class="form-floating mb-3">
<h3 class="modal-title">{{ $t('activity.create_new_location') }}</h3> <select
</template> class="form-select form-select-lg"
<template v-slot:body> id="type"
<form> required
<div class="alert alert-warning" v-if="errors.length"> v-model="selectType"
<ul> >
<li v-for="(e, i) in errors" :key="i">{{ e }}</li> <option
</ul> selected
</div> disabled
value=""
>
{{ $t('activity.choose_location_type') }}
</option>
<option
v-for="t in locationTypes"
:value="t"
:key="t.id"
>
{{ t.title.fr }}
</option>
</select>
<label>{{ $t('activity.location_fields.type') }}</label>
</div>
<div class="form-floating mb-3"> <div class="form-floating mb-3">
<select class="form-select form-select-lg" id="type" required v-model="selectType"> <input
<option selected disabled value="">{{ $t('activity.choose_location_type') }}</option> class="form-control form-control-lg"
<option v-for="t in locationTypes" :value="t" :key="t.id"> id="name"
{{ t.title.fr }} v-model="inputName"
</option> placeholder
</select> >
<label>{{ $t('activity.location_fields.type') }}</label> <label for="name">{{ $t('activity.location_fields.name') }}</label>
</div> </div>
<div class="form-floating mb-3"> <add-address
<input class="form-control form-control-lg" id="name" v-model="inputName" placeholder /> :context="addAddress.context"
<label for="name">{{ $t('activity.location_fields.name') }}</label> :options="addAddress.options"
</div> :address-changed-callback="submitNewAddress"
v-if="showAddAddress"
ref="addAddress"
/>
<add-address <div
:context="addAddress.context" class="form-floating mb-3"
:options="addAddress.options" v-if="showContactData"
:addressChangedCallback="submitNewAddress" >
v-if="showAddAddress" <input
ref="addAddress"> class="form-control form-control-lg"
</add-address> id="phonenumber1"
v-model="inputPhonenumber1"
<div class="form-floating mb-3" v-if="showContactData"> placeholder
<input class="form-control form-control-lg" id="phonenumber1" v-model="inputPhonenumber1" placeholder /> >
<label for="phonenumber1">{{ $t('activity.location_fields.phonenumber1') }}</label> <label for="phonenumber1">{{ $t('activity.location_fields.phonenumber1') }}</label>
</div> </div>
<div class="form-floating mb-3" v-if="hasPhonenumber1"> <div
<input class="form-control form-control-lg" id="phonenumber2" v-model="inputPhonenumber2" placeholder /> class="form-floating mb-3"
<label for="phonenumber2">{{ $t('activity.location_fields.phonenumber2') }}</label> v-if="hasPhonenumber1"
</div> >
<div class="form-floating mb-3" v-if="showContactData"> <input
<input class="form-control form-control-lg" id="email" v-model="inputEmail" placeholder /> class="form-control form-control-lg"
<label for="email">{{ $t('activity.location_fields.email') }}</label> id="phonenumber2"
</div> v-model="inputPhonenumber2"
placeholder
</form> >
</template> <label for="phonenumber2">{{ $t('activity.location_fields.phonenumber2') }}</label>
<template v-slot:footer> </div>
<button class="btn btn-save" <div
@click.prevent="saveNewLocation" class="form-floating mb-3"
> v-if="showContactData"
{{ $t('action.save') }} >
</button> <input
</template> class="form-control form-control-lg"
id="email"
</modal> v-model="inputEmail"
</teleport> placeholder
</div> >
<label for="email">{{ $t('activity.location_fields.email') }}</label>
</div>
</form>
</template>
<template #footer>
<button
class="btn btn-save"
@click.prevent="saveNewLocation"
>
{{ $t('action.save') }}
</button>
</template>
</modal>
</teleport>
</div>
</template> </template>
<script> <script>

View File

@ -1,79 +1,78 @@
<template> <template>
<teleport to="#social-issues-acc"> <teleport to="#social-issues-acc">
<div class="mb-3 row">
<div class="mb-3 row"> <div class="col-4">
<div class="col-4"> <label :class="socialIssuesClassList">{{ $t('activity.social_issues') }}</label>
<label :class="socialIssuesClassList">{{ $t('activity.social_issues') }}</label>
</div>
<div class="col-8">
<check-social-issue
v-for="issue in socialIssuesList"
:key="issue.id"
:issue="issue"
:selection="socialIssuesSelected"
@updateSelected="updateIssuesSelected">
</check-social-issue>
<div class="my-3">
<VueMultiselect
name="otherIssues"
label="text"
track-by="id"
open-direction="bottom"
:close-on-select="true"
:preserve-search="false"
:reset-after="true"
:hide-selected="true"
:taggable="false"
:multiple="false"
:searchable="true"
:allow-empty="true"
:show-labels="false"
:loading="issueIsLoading"
:placeholder="$t('activity.choose_other_social_issue')"
:options="socialIssuesOther"
@select="addIssueInList">
</VueMultiselect>
</div>
</div>
</div> </div>
<div class="col-8">
<check-social-issue
v-for="issue in socialIssuesList"
:key="issue.id"
:issue="issue"
:selection="socialIssuesSelected"
@update-selected="updateIssuesSelected"
/>
<div class="mb-3 row"> <div class="my-3">
<div class="col-4"> <VueMultiselect
<label :class="socialActionsClassList">{{ $t('activity.social_actions') }}</label> name="otherIssues"
</div> label="text"
<div class="col-8"> track-by="id"
open-direction="bottom"
<div v-if="actionIsLoading === true"> :close-on-select="true"
<i class="chill-green fa fa-circle-o-notch fa-spin fa-lg"></i> :preserve-search="false"
</div> :reset-after="true"
:hide-selected="true"
<span v-else-if="socialIssuesSelected.length === 0" class="inline-choice chill-no-data-statement mt-3"> :taggable="false"
{{ $t('activity.select_first_a_social_issue') }} :multiple="false"
</span> :searchable="true"
:allow-empty="true"
<template v-else-if="socialActionsList.length > 0"> :show-labels="false"
<check-social-action :loading="issueIsLoading"
v-if="socialIssuesSelected.length || socialActionsSelected.length" :placeholder="$t('activity.choose_other_social_issue')"
v-for="action in socialActionsList" :options="socialIssuesOther"
:key="action.id" @select="addIssueInList"
:action="action" />
:selection="socialActionsSelected" </div>
@updateSelected="updateActionsSelected">
</check-social-action>
</template>
<span v-else-if="actionAreLoaded && socialActionsList.length === 0" class="inline-choice chill-no-data-statement mt-3">
{{ $t('activity.social_action_list_empty') }}
</span>
</div>
</div> </div>
</div>
</teleport> <div class="mb-3 row">
<div class="col-4">
<label :class="socialActionsClassList">{{ $t('activity.social_actions') }}</label>
</div>
<div class="col-8">
<div v-if="actionIsLoading === true">
<i class="chill-green fa fa-circle-o-notch fa-spin fa-lg" />
</div>
<span
v-else-if="socialIssuesSelected.length === 0"
class="inline-choice chill-no-data-statement mt-3"
>
{{ $t('activity.select_first_a_social_issue') }}
</span>
<template v-else-if="socialActionsList.length > 0">
<check-social-action
v-if="socialIssuesSelected.length || socialActionsSelected.length"
v-for="action in socialActionsList"
:key="action.id"
:action="action"
:selection="socialActionsSelected"
@update-selected="updateActionsSelected"
/>
</template>
<span
v-else-if="actionAreLoaded && socialActionsList.length === 0"
class="inline-choice chill-no-data-statement mt-3"
>
{{ $t('activity.social_action_list_empty') }}
</span>
</div>
</div>
</teleport>
</template> </template>
<script> <script>

View File

@ -1,20 +1,24 @@
<template> <template>
<span class="inline-choice"> <span class="inline-choice">
<div class="form-check"> <div class="form-check">
<input class="form-check-input" <input
type="checkbox" class="form-check-input"
v-model="selected" type="checkbox"
name="action" v-model="selected"
v-bind:id="action.id" name="action"
v-bind:value="action" :id="action.id"
/> :value="action"
<label class="form-check-label" v-bind:for="action.id"> >
<span class="badge bg-light text-dark">{{ action.text }}</span> <label
</label> class="form-check-label"
:for="action.id"
>
<span class="badge bg-light text-dark">{{ action.text }}</span>
</label>
</div> </div>
</span> </span>
</template> </template>
<script> <script>

View File

@ -1,20 +1,24 @@
<template> <template>
<span class="inline-choice"> <span class="inline-choice">
<div class="form-check"> <div class="form-check">
<input class="form-check-input" <input
type="checkbox" class="form-check-input"
v-model="selected" type="checkbox"
name="issue" v-model="selected"
v-bind:id="issue.id" name="issue"
v-bind:value="issue" :id="issue.id"
/> :value="issue"
<label class="form-check-label" v-bind:for="issue.id"> >
<span class="badge bg-chill-l-gray text-dark">{{ issue.text }}</span> <label
</label> class="form-check-label"
:for="issue.id"
>
<span class="badge bg-chill-l-gray text-dark">{{ issue.text }}</span>
</label>
</div> </div>
</span> </span>
</template> </template>
<script> <script>

View File

@ -1,32 +1,35 @@
<template> <template>
<teleport to="#mainUser"> <teleport to="#mainUser">
<h2 class="chill-red">
<h2 class="chill-red">Utilisateur principal</h2> Utilisateur principal
</h2>
<div> <div>
<div> <div>
<div v-if="null !== this.$store.getters.getMainUser"> <div v-if="null !== this.$store.getters.getMainUser">
<calendar-active :user="this.$store.getters.getMainUser" ></calendar-active> <calendar-active :user="this.$store.getters.getMainUser" />
</div> </div>
<pick-entity <pick-entity
:multiple="false" :multiple="false"
:types="['user']" :types="['user']"
:uniqid="'main_user_calendar'" :uniqid="'main_user_calendar'"
:picked="null !== this.$store.getters.getMainUser ? [this.$store.getters.getMainUser] : []" :picked="null !== this.$store.getters.getMainUser ? [this.$store.getters.getMainUser] : []"
:removableIfSet="false" :removable-if-set="false"
:displayPicked="false" :display-picked="false"
:suggested="this.suggestedUsers" :suggested="this.suggestedUsers"
:label="'main_user'" :label="'main_user'"
@addNewEntity="setMainUser" @add-new-entity="setMainUser"
></pick-entity> />
</div> </div>
</div> </div>
</teleport> </teleport>
<concerned-groups></concerned-groups> <concerned-groups />
<teleport to="#schedule"> <teleport to="#schedule">
<div class="row mb-3" v-if="activity.startDate !== null"> <div
class="row mb-3"
v-if="activity.startDate !== null"
>
<label class="col-form-label col-sm-4">Date</label> <label class="col-form-label col-sm-4">Date</label>
<div class="col-sm-8"> <div class="col-sm-8">
{{ $d(activity.startDate, 'long') }} - {{ $d(activity.endDate, 'hoursOnly') }} {{ $d(activity.startDate, 'long') }} - {{ $d(activity.endDate, 'hoursOnly') }}
@ -36,83 +39,185 @@
</div> </div>
</teleport> </teleport>
<location></location> <location />
<teleport to="#fullCalendar"> <teleport to="#fullCalendar">
<div class="calendar-actives"> <div class="calendar-actives">
<template class="" v-for="u in getActiveUsers" :key="u.id"> <template
<calendar-active :user="u" :invite="this.$store.getters.getInviteForUser(u)"></calendar-active> class=""
</template> v-for="u in getActiveUsers"
</div> :key="u.id"
<div class="display-options row justify-content-between" style="margin-top: 1rem;"> >
<div class="col-sm-9 col-xs-12"> <calendar-active
<div class="input-group mb-3"> :user="u"
<label class="input-group-text" for="slotDuration">Durée des créneaux</label> :invite="this.$store.getters.getInviteForUser(u)"
<select v-model="slotDuration" id="slotDuration" class="form-select"> />
<option value="00:05:00">5 minutes</option> </template>
<option value="00:10:00">10 minutes</option> </div>
<option value="00:15:00">15 minutes</option> <div
<option value="00:30:00">30 minutes</option> class="display-options row justify-content-between"
</select> style="margin-top: 1rem;"
<label class="input-group-text" for="slotMinTime">De</label> >
<select v-model="slotMinTime" id="slotMinTime" class="form-select"> <div class="col-sm-9 col-xs-12">
<option value="00:00:00">0h</option> <div class="input-group mb-3">
<option value="01:00:00">1h</option> <label
<option value="02:00:00">2h</option> class="input-group-text"
<option value="03:00:00">3h</option> for="slotDuration"
<option value="04:00:00">4h</option> >Durée des créneaux</label>
<option value="05:00:00">5h</option> <select
<option value="06:00:00">6h</option> v-model="slotDuration"
<option value="07:00:00">7h</option> id="slotDuration"
<option value="08:00:00">8h</option> class="form-select"
<option value="09:00:00">9h</option> >
<option value="10:00:00">10h</option> <option value="00:05:00">
<option value="11:00:00">11h</option> 5 minutes
<option value="12:00:00">12h</option> </option>
</select> <option value="00:10:00">
<label class="input-group-text" for="slotMaxTime">À</label> 10 minutes
<select v-model="slotMaxTime" id="slotMaxTime" class="form-select"> </option>
<option value="12:00:00">12h</option> <option value="00:15:00">
<option value="13:00:00">13h</option> 15 minutes
<option value="14:00:00">14h</option> </option>
<option value="15:00:00">15h</option> <option value="00:30:00">
<option value="16:00:00">16h</option> 30 minutes
<option value="17:00:00">17h</option> </option>
<option value="18:00:00">18h</option> </select>
<option value="19:00:00">19h</option> <label
<option value="20:00:00">20h</option> class="input-group-text"
<option value="21:00:00">21h</option> for="slotMinTime"
<option value="22:00:00">22h</option> >De</label>
<option value="23:00:00">23h</option> <select
<option value="23:59:59">24h</option> v-model="slotMinTime"
</select> id="slotMinTime"
</div> class="form-select"
>
<option value="00:00:00">
0h
</option>
<option value="01:00:00">
1h
</option>
<option value="02:00:00">
2h
</option>
<option value="03:00:00">
3h
</option>
<option value="04:00:00">
4h
</option>
<option value="05:00:00">
5h
</option>
<option value="06:00:00">
6h
</option>
<option value="07:00:00">
7h
</option>
<option value="08:00:00">
8h
</option>
<option value="09:00:00">
9h
</option>
<option value="10:00:00">
10h
</option>
<option value="11:00:00">
11h
</option>
<option value="12:00:00">
12h
</option>
</select>
<label
class="input-group-text"
for="slotMaxTime"
>À</label>
<select
v-model="slotMaxTime"
id="slotMaxTime"
class="form-select"
>
<option value="12:00:00">
12h
</option>
<option value="13:00:00">
13h
</option>
<option value="14:00:00">
14h
</option>
<option value="15:00:00">
15h
</option>
<option value="16:00:00">
16h
</option>
<option value="17:00:00">
17h
</option>
<option value="18:00:00">
18h
</option>
<option value="19:00:00">
19h
</option>
<option value="20:00:00">
20h
</option>
<option value="21:00:00">
21h
</option>
<option value="22:00:00">
22h
</option>
<option value="23:00:00">
23h
</option>
<option value="23:59:59">
24h
</option>
</select>
</div> </div>
<div class="col-sm-3 col-xs-12"> </div>
<div class="float-end"> <div class="col-sm-3 col-xs-12">
<div class="form-check input-group"> <div class="float-end">
<span class="input-group-text"> <div class="form-check input-group">
<input id="showHideWE" class="mt-0" type="checkbox" v-model="hideWeekends"> <span class="input-group-text">
</span> <input
<label for="showHideWE" class="form-check-label input-group-text">Week-ends</label> id="showHideWE"
</div> class="mt-0"
type="checkbox"
v-model="hideWeekends"
>
</span>
<label
for="showHideWE"
class="form-check-label input-group-text"
>Week-ends</label>
</div> </div>
</div> </div>
</div> </div>
<FullCalendar ref="fullCalendar" :options="calendarOptions"> </div>
<template v-slot:eventContent='arg'> <FullCalendar
<span> ref="fullCalendar"
<b v-if="arg.event.extendedProps.is === 'remote'">{{ arg.event.title}}</b> :options="calendarOptions"
<b v-else-if="arg.event.extendedProps.is === 'range'">{{ arg.timeText }} {{ arg.event.extendedProps.locationName }} <small>{{ arg.event.extendedProps.userLabel }}</small></b> >
<b v-else-if="arg.event.extendedProps.is === 'current'">{{ arg.timeText }} {{ $t('current_selected')}} </b> <template #eventContent="arg">
<b v-else-if="arg.event.extendedProps.is === 'local'">{{ arg.event.title}}</b> <span>
<b v-else>{{ arg.timeText }} {{ $t('current_selected')}} </b> <b v-if="arg.event.extendedProps.is === 'remote'">{{ arg.event.title }}</b>
</span> <b v-else-if="arg.event.extendedProps.is === 'range'">{{ arg.timeText }} {{ arg.event.extendedProps.locationName }} <small>{{ arg.event.extendedProps.userLabel }}</small></b>
</template> <b v-else-if="arg.event.extendedProps.is === 'current'">{{ arg.timeText }} {{ $t('current_selected') }} </b>
</FullCalendar> <b v-else-if="arg.event.extendedProps.is === 'local'">{{ arg.event.title }}</b>
</teleport> <b v-else>{{ arg.timeText }} {{ $t('current_selected') }} </b>
</span>
</template>
</FullCalendar>
</teleport>
</template> </template>
<script> <script>

View File

@ -1,22 +1,55 @@
<template> <template>
<div :style="style" class="calendar-active"> <div
:style="style"
class="calendar-active"
>
<span class="badge-user"> <span class="badge-user">
{{ user.text }} {{ user.text }}
<template v-if="invite !== null"> <template v-if="invite !== null">
<i v-if="invite.status === 'accepted'" class="fa fa-check"></i> <i
<i v-else-if="invite.status === 'declined'" class="fa fa-times"></i> v-if="invite.status === 'accepted'"
<i v-else-if="invite.status === 'pending'" class="fa fa-question-o"></i> class="fa fa-check"
<i v-else-if="invite.status === 'tentative'" class="fa fa-question"></i> />
<i
v-else-if="invite.status === 'declined'"
class="fa fa-times"
/>
<i
v-else-if="invite.status === 'pending'"
class="fa fa-question-o"
/>
<i
v-else-if="invite.status === 'tentative'"
class="fa fa-question"
/>
<span v-else="">{{ invite.status }}</span> <span v-else="">{{ invite.status }}</span>
</template> </template>
</span> </span>
<span class="form-check-inline form-switch"> <span class="form-check-inline form-switch">
<input class="form-check-input" type="checkbox" id="flexSwitchCheckDefault" v-model="rangeShow"> <input
&nbsp;<label class="form-check-label" for="flexSwitchCheckDefault" title="Disponibilités"><i class="fa fa-calendar-check-o"></i></label> class="form-check-input"
type="checkbox"
id="flexSwitchCheckDefault"
v-model="rangeShow"
>
&nbsp;<label
class="form-check-label"
for="flexSwitchCheckDefault"
title="Disponibilités"
><i class="fa fa-calendar-check-o" /></label>
</span> </span>
<span class="form-check-inline form-switch"> <span class="form-check-inline form-switch">
<input class="form-check-input" type="checkbox" id="flexSwitchCheckDefault" v-model="remoteShow"> <input
&nbsp;<label class="form-check-label" for="flexSwitchCheckDefault" title="Agenda"><i class="fa fa-calendar"></i></label> class="form-check-input"
type="checkbox"
id="flexSwitchCheckDefault"
v-model="remoteShow"
>
&nbsp;<label
class="form-check-label"
for="flexSwitchCheckDefault"
title="Agenda"
><i class="fa fa-calendar" /></label>
</span> </span>
</div> </div>
</template> </template>

View File

@ -1,36 +1,53 @@
<template> <template>
<div> <div>
<h2 class="chill-red">{{ $t('choose_your_calendar_user') }}</h2> <h2 class="chill-red">
{{ $t('choose_your_calendar_user') }}
</h2>
<VueMultiselect <VueMultiselect
name="field" name="field"
id="calendarUserSelector" id="calendarUserSelector"
v-model="value" v-model="value"
track-by="id" track-by="id"
label="value" label="value"
:custom-label="transName" :custom-label="transName"
:placeholder="$t('select_user')" :placeholder="$t('select_user')"
:multiple="true" :multiple="true"
:close-on-select="false" :close-on-select="false"
:allow-empty="true" :allow-empty="true"
:model-value="value" :model-value="value"
:select-label="$t('multiselect.select_label')" :select-label="$t('multiselect.select_label')"
:deselect-label="$t('multiselect.deselect_label')" :deselect-label="$t('multiselect.deselect_label')"
:selected-label="$t('multiselect.selected_label')" :selected-label="$t('multiselect.selected_label')"
@select="selectUsers" @select="selectUsers"
@remove="unSelectUsers" @remove="unSelectUsers"
@close="coloriseSelectedValues" @close="coloriseSelectedValues"
:options="options"> :options="options"
</VueMultiselect> />
</div> </div>
<div class="form-check"> <div class="form-check">
<input type="checkbox" id="myCalendar" class="form-check-input" v-model="showMyCalendarWidget" /> <input
<label class="form-check-label" for="myCalendar">{{ $t('show_my_calendar') }}</label> type="checkbox"
id="myCalendar"
class="form-check-input"
v-model="showMyCalendarWidget"
>
<label
class="form-check-label"
for="myCalendar"
>{{ $t('show_my_calendar') }}</label>
</div> </div>
<div class="form-check"> <div class="form-check">
<input type="checkbox" id="weekends" class="form-check-input" @click="toggleWeekends" /> <input
<label class="form-check-label" for="weekends">{{ $t('show_weekends') }}</label> type="checkbox"
id="weekends"
class="form-check-input"
@click="toggleWeekends"
>
<label
class="form-check-label"
for="weekends"
>{{ $t('show_weekends') }}</label>
</div> </div>
</template> </template>
<script> <script>

View File

@ -1,40 +1,65 @@
<template> <template>
<div> <div>
<template v-if="templates.length > 0"> <template v-if="templates.length > 0">
<slot name="title"> <slot name="title">
<h2>{{ $t('generate_document')}}</h2> <h2>{{ $t('generate_document') }}</h2>
</slot>
<div class="container">
<div class="row">
<div class="col-md-4">
<slot name="label">
<label>{{ $t('select_a_template') }}</label>
</slot> </slot>
</div>
<div class="container"> <div class="col-md-8">
<div class="row"> <div class="input-group mb-3">
<div class="col-md-4"> <select
<slot name="label"> class="form-select"
<label>{{ $t('select_a_template') }}</label> v-model="template"
</slot> >
</div> <option
<div class="col-md-8"> disabled
<div class="input-group mb-3"> selected
<select class="form-select" v-model="template"> value=""
<option disabled selected value="">{{ $t('choose_a_template') }}</option> >
<template v-for="t in templates" :key="t.id"> {{ $t('choose_a_template') }}
<option :value="t.id" >{{ t.name.fr || 'Aucun nom défini' }}</option> </option>
</template> <template
</select> v-for="t in templates"
<a v-if="canGenerate" class="btn btn-update btn-sm change-icon" :href="buildUrlGenerate" @click.prevent="clickGenerate($event, buildUrlGenerate)"><i class="fa fa-fw fa-cog"></i></a> :key="t.id"
<a v-else class="btn btn-update btn-sm change-icon" href="#" disabled ><i class="fa fa-fw fa-cog"></i></a> >
</div> <option :value="t.id">
</div> {{ t.name.fr || 'Aucun nom défini' }}
</div> </option>
<div class="row" v-if="hasDescription"> </template>
<div class="col-md-8 align-self-end"> </select>
<p>{{ getDescription }}</p> <a
</div> v-if="canGenerate"
</div> class="btn btn-update btn-sm change-icon"
:href="buildUrlGenerate"
@click.prevent="clickGenerate($event, buildUrlGenerate)"
><i class="fa fa-fw fa-cog" /></a>
<a
v-else
class="btn btn-update btn-sm change-icon"
href="#"
disabled
><i class="fa fa-fw fa-cog" /></a>
</div> </div>
</template> </div>
</div> </div>
<div
class="row"
v-if="hasDescription"
>
<div class="col-md-8 align-self-end">
<p>{{ getDescription }}</p>
</div>
</div>
</div>
</template>
</div>
</template> </template>
<script> <script>

View File

@ -1,69 +1,79 @@
<template> <template>
<a :class="btnClasses" :title="$t(buttonTitle)" @click="openModal"> <a
<span>{{ $t(buttonTitle) }}</span> :class="btnClasses"
</a> :title="$t(buttonTitle)"
<teleport to="body"> @click="openModal"
<div> >
<modal v-if="modal.showModal" <span>{{ $t(buttonTitle) }}</span>
:modalDialogClass="modal.modalDialogClass" </a>
@close="modal.showModal = false"> <teleport to="body">
<div>
<modal
v-if="modal.showModal"
:modal-dialog-class="modal.modalDialogClass"
@close="modal.showModal = false"
>
<template #header>
{{ $t('upload_a_document') }}
</template>
<template v-slot:header> <template #body>
{{ $t('upload_a_document') }} <div
</template> id="dropZoneWrapper"
ref="dropZoneWrapper"
>
<div
data-stored-object="data-stored-object"
:data-label-preparing="$t('data_label_preparing')"
:data-label-quiet-button="$t('data_label_quiet_button')"
:data-label-ready="$t('data_label_ready')"
:data-dict-file-too-big="$t('data_dict_file_too_big')"
:data-dict-default-message="$t('data_dict_default_message')"
:data-dict-remove-file="$t('data_dict_remove_file')"
:data-dict-max-files-exceeded="$t('data_dict_max_files_exceeded')"
:data-dict-cancel-upload="$t('data_dict_cancel_upload')"
:data-dict-cancel-upload-confirm="$t('data_dict_cancel_upload_confirm')"
:data-dict-upload-canceled="$t('data_dict_upload_canceled')"
:data-dict-remove="$t('data_dict_remove')"
:data-allow-remove="!options.required"
data-temp-url-generator="/asyncupload/temp_url/generate/GET"
>
<input
type="hidden"
data-async-file-upload="data-async-file-upload"
data-generate-temp-url-post="/asyncupload/temp_url/generate/post?expires_delay=180&amp;submit_delay=3600"
data-temp-url-get="/asyncupload/temp_url/generate/GET"
:data-max-files="options.maxFiles"
:data-max-post-size="options.maxPostSize"
:v-model="dataAsyncFileUpload"
>
<input
type="hidden"
data-stored-object-key="1"
>
<input
type="hidden"
data-stored-object-iv="1"
>
<input
type="hidden"
data-async-file-type="1"
>
</div>
</div>
</template>
<template v-slot:body> <template #footer>
<div id="dropZoneWrapper" ref="dropZoneWrapper"> <button
<div class="btn btn-create"
data-stored-object="data-stored-object" @click.prevent="saveDocument"
:data-label-preparing="$t('data_label_preparing')" >
:data-label-quiet-button="$t('data_label_quiet_button')" {{ $t('action.add') }}
:data-label-ready="$t('data_label_ready')" </button>
:data-dict-file-too-big="$t('data_dict_file_too_big')" </template>
:data-dict-default-message="$t('data_dict_default_message')" </modal>
:data-dict-remove-file="$t('data_dict_remove_file')" </div>
:data-dict-max-files-exceeded="$t('data_dict_max_files_exceeded')" </teleport>
:data-dict-cancel-upload="$t('data_dict_cancel_upload')"
:data-dict-cancel-upload-confirm="$t('data_dict_cancel_upload_confirm')"
:data-dict-upload-canceled="$t('data_dict_upload_canceled')"
:data-dict-remove="$t('data_dict_remove')"
:data-allow-remove="!options.required"
data-temp-url-generator="/asyncupload/temp_url/generate/GET">
<input
type="hidden"
data-async-file-upload="data-async-file-upload"
data-generate-temp-url-post="/asyncupload/temp_url/generate/post?expires_delay=180&amp;submit_delay=3600"
data-temp-url-get="/asyncupload/temp_url/generate/GET"
:data-max-files="options.maxFiles"
:data-max-post-size="options.maxPostSize"
:v-model="dataAsyncFileUpload"
>
<input
type="hidden"
data-stored-object-key="1"
>
<input
type="hidden"
data-stored-object-iv="1"
>
<input
type="hidden"
data-async-file-type="1"
>
</div>
</div>
</template>
<template v-slot:footer>
<button class="btn btn-create"
@click.prevent="saveDocument">
{{ $t('action.add')}}
</button>
</template>
</modal>
</div>
</teleport>
</template> </template>
<script> <script>

View File

@ -2,14 +2,14 @@
<a <a
class="btn btn-download" class="btn btn-download"
:title="$t(buttonTitle)" :title="$t(buttonTitle)"
:data-key=JSON.stringify(storedObject.keyInfos) :data-key="JSON.stringify(storedObject.keyInfos)"
:data-iv=JSON.stringify(storedObject.iv) :data-iv="JSON.stringify(storedObject.iv)"
:data-mime-type=storedObject.type :data-mime-type="storedObject.type"
:data-label-preparing="$t('dataLabelPreparing')" :data-label-preparing="$t('dataLabelPreparing')"
:data-label-ready="$t('dataLabelReady')" :data-label-ready="$t('dataLabelReady')"
:data-temp-url-get-generator="url" :data-temp-url-get-generator="url"
@click.once="downloadDocument"> @click.once="downloadDocument"
</a> />
</template> </template>
<script> <script>

View File

@ -1,11 +1,11 @@
<template> <template>
<add-address <add-address
v-bind:key="key" :key="key"
v-bind:context="context" :context="context"
v-bind:options="options" :options="options"
v-bind:addressChangedCallback="submitAddress" :address-changed-callback="submitAddress"
ref="addAddress"> ref="addAddress"
</add-address> />
</template> </template>
<script> <script>

View File

@ -1,18 +1,26 @@
<template> <template>
<ul class="record_actions" v-if="!options.onlyButton" <ul
:class="{ 'sticky-form-buttons': isStickyForm }"> class="record_actions"
v-if="!options.onlyButton"
<li v-if="isStickyForm" class="cancel"> :class="{ 'sticky-form-buttons': isStickyForm }"
<slot name="before"></slot> >
</li> <li
<li> v-if="isStickyForm"
<slot name="action"></slot> class="cancel"
</li> >
<li v-if="isStickyForm"> <slot name="before" />
<slot name="after"></slot> </li>
</li> <li>
</ul> <slot name="action" />
<slot v-else name="action"></slot> </li>
<li v-if="isStickyForm">
<slot name="after" />
</li>
</ul>
<slot
v-else
name="action"
/>
</template> </template>
<script> <script>

View File

@ -1,230 +1,295 @@
<template> <template>
<!-- step0 -->
<show-pane
v-if="flag.showPane"
:context="this.context"
:options="this.options"
:defaultz="this.defaultz"
:entity="this.entity"
:flag="this.flag"
:use-date-pane="this.useDatePane"
@open-edit-pane="openEditPane"
ref="showAddress"
/>
<!-- step0 --> <!-- step 1 -->
<show-pane v-if="flag.showPane" <teleport
v-bind:context="this.context" to="body"
v-bind:options="this.options" v-if="inModal"
v-bind:defaultz="this.defaultz" >
v-bind:entity="this.entity" <modal
v-bind:flag="this.flag" v-if="flag.suggestPane"
v-bind:useDatePane="this.useDatePane" modal-dialog-class="modal-dialog-scrollable modal-xl"
@openEditPane="openEditPane" @close="resetPane"
ref="showAddress"> >
</show-pane> <template #header>
<h2 class="modal-title">
{{ $t(getTextTitle) }}
<span
v-if="flag.loading"
class="loading"
>
<i class="fa fa-circle-o-notch fa-spin fa-fw" />
<span class="sr-only">{{ $t('loading') }}</span>
</span>
</h2>
</template>
<!-- step 1 --> <template #body>
<teleport to="body" v-if="inModal"> <suggest-pane
<modal v-if="flag.suggestPane" :context="this.context"
modalDialogClass="modal-dialog-scrollable modal-xl" :options="this.options"
@close="resetPane"> :defaultz="this.defaultz"
:entity="this.entity"
:flag="this.flag"
@pick-address="this.pickAddress"
ref="suggestAddress"
/>
</template>
<template v-slot:header> <template #footer>
<h2 class="modal-title">{{ $t(getTextTitle) }} <button
<span v-if="flag.loading" class="loading"> @click="openEditPane"
<i class="fa fa-circle-o-notch fa-spin fa-fw"></i> class="btn btn-create"
<span class="sr-only">{{ $t('loading') }}</span> >
</span> {{ $t('create_a_new_address') }}
</h2> </button>
</template> </template>
</modal>
<template v-slot:body> </teleport>
<suggest-pane <template v-else>
v-bind:context="this.context" <div
v-bind:options="this.options" v-if="flag.suggestPane"
v-bind:defaultz="this.defaultz" class="mt-4 flex-grow-1"
v-bind:entity="this.entity" >
v-bind:flag="this.flag" <suggest-pane
@pick-address="this.pickAddress" :context="this.context"
ref="suggestAddress"> :options="this.options"
</suggest-pane> :defaultz="this.defaultz"
</template> :entity="this.entity"
:flag="this.flag"
<template v-slot:footer> :inside-modal="false"
<button @click="openEditPane" @pick-address="this.pickAddress"
class="btn btn-create"> ref="suggestAddress"
{{ $t('create_a_new_address')}} >
<template
#before
v-if="!bypassFirstStep"
>
<a
class="btn btn-cancel"
@click="resetPane"
>
{{ $t('action.cancel') }}
</a>
</template>
<template #action>
<li>
<button
@click="openEditPane"
class="btn btn-create"
>
{{ $t('create_a_new_address') }}
</button> </button>
</template> </li>
</template>
</suggest-pane>
</div>
</template>
</modal> <!-- step 2 -->
</teleport> <teleport
<template v-else> to="body"
<div v-if="flag.suggestPane" class="mt-4 flex-grow-1"> v-if="inModal"
<suggest-pane >
v-bind:context="this.context" <modal
v-bind:options="this.options" v-if="flag.editPane"
v-bind:defaultz="this.defaultz" modal-dialog-class="modal-dialog-scrollable modal-xl"
v-bind:entity="this.entity" @close="resetPane"
v-bind:flag="this.flag" >
v-bind:insideModal="false" <template #header>
@pick-address="this.pickAddress" <h2 class="modal-title">
ref="suggestAddress"> {{ $t(getTextTitle) }}
<span
v-if="flag.loading"
class="loading"
>
<i class="fa fa-circle-o-notch fa-spin fa-fw" />
<span class="sr-only">{{ $t('loading') }}</span>
</span>
</h2>
</template>
<template v-slot:before v-if="!bypassFirstStep"> <template #body>
<a class="btn btn-cancel" @click="resetPane"> <edit-pane
{{ $t('action.cancel') }} :context="this.context"
</a> :options="this.options"
</template> :defaultz="this.defaultz"
<template v-slot:action> :entity="this.entity"
<li> :flag="this.flag"
<button @click="openEditPane" :errors="this.errors"
class="btn btn-create"> :check-errors="this.checkErrors"
{{ $t('create_a_new_address')}} @get-cities="getCities"
</button> @get-reference-addresses="getReferenceAddresses"
</li> />
</template> </template>
</suggest-pane> <template #footer>
</div> <!--<button class="btn btn-cancel change-icon" @click="resetPane">{{ $t('action.cancel') }}</button>-->
</template> <button
v-if="!this.context.edit && this.useDatePane"
<!-- step 2 --> class="btn btn-update change-icon"
<teleport to="body" v-if="inModal"> @click="closeEditPane"
<modal v-if="flag.editPane" >
modalDialogClass="modal-dialog-scrollable modal-xl" {{ $t('nav.next') }}
@close="resetPane"> <i class="fa fa-fw fa-arrow-right" />
</button>
<template v-slot:header> <button
<h2 class="modal-title">{{ $t(getTextTitle) }} v-else
<span v-if="flag.loading" class="loading"> class="btn btn-save"
<i class="fa fa-circle-o-notch fa-spin fa-fw"></i> @click="closeEditPane"
<span class="sr-only">{{ $t('loading') }}</span> >
</span> {{ $t('action.save') }}
</h2> </button>
</template> </template>
</modal>
<template v-slot:body> </teleport>
<edit-pane <template v-else>
v-bind:context="this.context" <div
v-bind:options="this.options" v-if="flag.editPane"
v-bind:defaultz="this.defaultz" class="mt-4 flex-grow-1"
v-bind:entity="this.entity" >
v-bind:flag="this.flag" <edit-pane
v-bind:errors="this.errors" :context="this.context"
v-bind:checkErrors="this.checkErrors" :options="this.options"
@getCities="getCities" :defaultz="this.defaultz"
@getReferenceAddresses="getReferenceAddresses"> :entity="this.entity"
</edit-pane> :flag="this.flag"
</template> :errors="this.errors"
:check-errors="this.checkErrors"
<template v-slot:footer> :inside-modal="false"
<!--<button class="btn btn-cancel change-icon" @click="resetPane">{{ $t('action.cancel') }}</button>--> @get-cities="getCities"
<button v-if="!this.context.edit && this.useDatePane" class="btn btn-update change-icon" @click="closeEditPane"> @get-reference-addresses="getReferenceAddresses"
{{ $t('nav.next')}} >
<i class="fa fa-fw fa-arrow-right"></i> <template #before>
<a
class="btn btn-cancel"
@click="resetPane"
>
{{ $t('action.cancel') }}
</a>
</template>
<template #action>
<li v-if="!this.context.edit && this.useDatePane">
<button
class="btn btn-update change-icon"
@click="closeEditPane"
>
{{ $t('nav.next') }}
<i class="fa fa-fw fa-arrow-right" />
</button> </button>
<button v-else class="btn btn-save" @click="closeEditPane"> </li>
{{ $t('action.save')}} <li v-else>
<button
class="btn btn-save"
@click="closeEditPane"
>
{{ $t('action.save') }}
</button> </button>
</template> </li>
</template>
</edit-pane>
</div>
</template>
</modal> <!-- step 3 -->
</teleport> <teleport
<template v-else> to="body"
<div v-if="flag.editPane" class="mt-4 flex-grow-1"> v-if="inModal"
<edit-pane >
v-bind:context="this.context" <modal
v-bind:options="this.options" v-if="flag.datePane"
v-bind:defaultz="this.defaultz" modal-dialog-class="modal-dialog-scrollable modal-xl"
v-bind:entity="this.entity" @close="resetPane"
v-bind:flag="this.flag" >
v-bind:errors="this.errors" <template #header>
v-bind:checkErrors="this.checkErrors" <h2 class="modal-title">
v-bind:insideModal="false" {{ $t(getTextTitle) }}
@getCities="getCities" <span
@getReferenceAddresses="getReferenceAddresses"> v-if="flag.loading"
class="loading"
>
<i class="fa fa-circle-o-notch fa-spin fa-fw" />
<span class="sr-only">{{ $t('loading') }}</span>
</span>
</h2>
</template>
<template v-slot:before> <template #body>
<a class="btn btn-cancel" @click="resetPane"> <date-pane
{{ $t('action.cancel') }} :context="this.context"
</a> :options="this.options"
</template> :defaultz="this.defaultz"
<template v-slot:action> :entity="this.entity"
<li v-if="!this.context.edit && this.useDatePane"> :flag="this.flag"
<button class="btn btn-update change-icon" @click="closeEditPane"> ref="dateAddress"
{{ $t('nav.next')}} />
<i class="fa fa-fw fa-arrow-right"></i> </template>
</button>
</li>
<li v-else>
<button class="btn btn-save" @click="closeEditPane">
{{ $t('action.save')}}
</button>
</li>
</template>
</edit-pane> <template #footer>
</div> <button
</template> class="btn btn-misc"
@click="openEditPane"
<!-- step 3 --> >
<teleport to="body" v-if="inModal"> <i class="fa fa-fw fa-arrow-left" />
<modal v-if="flag.datePane" {{ $t('nav.previous') }}
modalDialogClass="modal-dialog-scrollable modal-xl" </button>
@close="resetPane"> <button
class="btn btn-save"
<template v-slot:header> @click="closeDatePane"
<h2 class="modal-title">{{ $t(getTextTitle) }} >
<span v-if="flag.loading" class="loading"> {{ $t('action.save') }}
<i class="fa fa-circle-o-notch fa-spin fa-fw"></i> </button>
<span class="sr-only">{{ $t('loading') }}</span> <!-- -->
</span> </template>
</h2> </modal>
</template> </teleport>
<template v-else>
<template v-slot:body> <div
<date-pane v-if="flag.datePane"
v-bind:context="this.context" class="mt-4 flex-grow-1"
v-bind:options="this.options" >
v-bind:defaultz="this.defaultz" <date-pane
v-bind:entity="this.entity" :context="this.context"
v-bind:flag="this.flag" :options="this.options"
ref="dateAddress"> :defaultz="this.defaultz"
</date-pane> :entity="this.entity"
</template> :flag="this.flag"
:inside-modal="false"
<template v-slot:footer> ref="dateAddress"
<button class="btn btn-misc" @click="openEditPane"> >
<i class="fa fa-fw fa-arrow-left"></i> <template #before>
{{ $t('nav.previous')}} <button
class="btn btn-misc"
@click="openEditPane"
>
<i class="fa fa-fw fa-arrow-left" />
{{ $t('nav.previous') }}
</button>
</template>
<template #action>
<li>
<button
class="btn btn-save"
@click="closeDatePane"
>
{{ $t('action.save') }}
</button> </button>
<button class="btn btn-save" @click="closeDatePane"> </li>
{{ $t('action.save')}} </template>
</button> </date-pane>
<!-- --> </div>
</template> </template>
</modal>
</teleport>
<template v-else>
<div v-if="flag.datePane" class="mt-4 flex-grow-1">
<date-pane
v-bind:context="this.context"
v-bind:options="this.options"
v-bind:defaultz="this.defaultz"
v-bind:entity="this.entity"
v-bind:flag="this.flag"
v-bind:insideModal="false"
ref="dateAddress">
<template v-slot:before>
<button class="btn btn-misc" @click="openEditPane">
<i class="fa fa-fw fa-arrow-left"></i>
{{ $t('nav.previous')}}
</button>
</template>
<template v-slot:action>
<li>
<button class="btn btn-save" @click="closeDatePane">
{{ $t('action.save')}}
</button>
</li>
</template>
</date-pane>
</div>
</template>
</template> </template>
<script> <script>

View File

@ -1,5 +1,5 @@
<template> <template>
<div id="address_map"></div> <div id="address_map" />
</template> </template>
<script> <script>

View File

@ -1,70 +1,95 @@
<template> <template>
<h4 class="h3">{{ $t('fill_an_address') }}</h4> <h4 class="h3">
<div class="row my-3"> {{ $t('fill_an_address') }}
<div class="col-lg-6" v-if="!isNoAddress"> </h4>
<div class="form-floating my-1"> <div class="row my-3">
<input class="form-control" <div
type="text" class="col-lg-6"
name="floor" v-if="!isNoAddress"
:placeholder="$t('floor')" >
v-model="floor"/> <div class="form-floating my-1">
<label for="floor">{{ $t('floor') }}</label> <input
</div> class="form-control"
<div class="form-floating my-1"> type="text"
<input class="form-control" name="floor"
type="text" :placeholder="$t('floor')"
name="corridor" v-model="floor"
:placeholder="$t('corridor')" >
v-model="corridor"/> <label for="floor">{{ $t('floor') }}</label>
<label for="corridor">{{ $t('corridor') }}</label>
</div>
<div class="form-floating my-1">
<input class="form-control"
type="text"
name="steps"
:placeholder="$t('steps')"
v-model="steps"/>
<label for="steps">{{ $t('steps') }}</label>
</div>
<div class="form-floating my-1">
<input class="form-control"
type="text"
name="flat"
:placeholder="$t('flat')"
v-model="flat"/>
<label for="flat">{{ $t('flat') }}</label>
</div>
</div> </div>
<div :class="isNoAddress ? 'col-lg-12' : 'col-lg-6'"> <div class="form-floating my-1">
<div class="form-floating my-1" v-if="!isNoAddress"> <input
<input class="form-control" class="form-control"
type="text" type="text"
name="buildingName" name="corridor"
maxlength=255 :placeholder="$t('corridor')"
:placeholder="$t('buildingName')" v-model="corridor"
v-model="buildingName"/> >
<label for="buildingName">{{ $t('buildingName') }}</label> <label for="corridor">{{ $t('corridor') }}</label>
</div>
<div class="form-floating my-1">
<input class="form-control"
type="text"
name="extra"
maxlength=255
:placeholder="$t('extra')"
v-model="extra"/>
<label for="extra">{{ $t('extra') }}</label>
</div>
<div class="form-floating my-1" v-if="!isNoAddress">
<input class="form-control"
type="text"
name="distribution"
maxlength=255
:placeholder="$t('distribution')"
v-model="distribution"/>
<label for="distribution">{{ $t('distribution') }}</label>
</div>
</div> </div>
</div> <div class="form-floating my-1">
<input
class="form-control"
type="text"
name="steps"
:placeholder="$t('steps')"
v-model="steps"
>
<label for="steps">{{ $t('steps') }}</label>
</div>
<div class="form-floating my-1">
<input
class="form-control"
type="text"
name="flat"
:placeholder="$t('flat')"
v-model="flat"
>
<label for="flat">{{ $t('flat') }}</label>
</div>
</div>
<div :class="isNoAddress ? 'col-lg-12' : 'col-lg-6'">
<div
class="form-floating my-1"
v-if="!isNoAddress"
>
<input
class="form-control"
type="text"
name="buildingName"
maxlength="255"
:placeholder="$t('buildingName')"
v-model="buildingName"
>
<label for="buildingName">{{ $t('buildingName') }}</label>
</div>
<div class="form-floating my-1">
<input
class="form-control"
type="text"
name="extra"
maxlength="255"
:placeholder="$t('extra')"
v-model="extra"
>
<label for="extra">{{ $t('extra') }}</label>
</div>
<div
class="form-floating my-1"
v-if="!isNoAddress"
>
<input
class="form-control"
type="text"
name="distribution"
maxlength="255"
:placeholder="$t('distribution')"
v-model="distribution"
>
<label for="distribution">{{ $t('distribution') }}</label>
</div>
</div>
</div>
</template> </template>
<script> <script>

View File

@ -1,53 +1,63 @@
<template> <template>
<div class="my-1"> <div class="my-1">
<label class="col-form-label" for="addressSelector">{{ $t('address') }}</label> <label
<VueMultiselect class="col-form-label"
id="addressSelector" for="addressSelector"
v-model="value" >{{ $t('address') }}</label>
:placeholder="$t('select_address')" <VueMultiselect
:tag-placeholder="$t('create_address')" id="addressSelector"
:select-label="$t('multiselect.select_label')" v-model="value"
:deselect-label="$t('create_address')" :placeholder="$t('select_address')"
:selected-label="$t('multiselect.selected_label')" :tag-placeholder="$t('create_address')"
@search-change="listenInputSearch" :select-label="$t('multiselect.select_label')"
:internal-search="false" :deselect-label="$t('create_address')"
ref="addressSelector" :selected-label="$t('multiselect.selected_label')"
@select="selectAddress" @search-change="listenInputSearch"
@remove="remove" :internal-search="false"
name="field" ref="addressSelector"
track-by="id" @select="selectAddress"
label="value" @remove="remove"
:custom-label="transName" name="field"
:taggable="true" track-by="id"
:multiple="false" label="value"
@tag="addAddress" :custom-label="transName"
:loading="isLoading" :taggable="true"
:options="addresses"> :multiple="false"
</VueMultiselect> @tag="addAddress"
</div> :loading="isLoading"
:options="addresses"
/>
</div>
<div class="custom-address row g-1" v-if="writeNewAddress || writeNewPostalCode || (isEnteredCustomAddress && !isAddressSelectorOpen)"> <div
<div class="col-10"> class="custom-address row g-1"
<div class="form-floating"> v-if="writeNewAddress || writeNewPostalCode || (isEnteredCustomAddress && !isAddressSelectorOpen)"
<input class="form-control" >
type="text" <div class="col-10">
name="street" <div class="form-floating">
:placeholder="$t('street')" <input
v-model="street"/> class="form-control"
<label for="street">{{ $t('street') }}</label> type="text"
</div> name="street"
:placeholder="$t('street')"
v-model="street"
>
<label for="street">{{ $t('street') }}</label>
</div> </div>
<div class="col-2"> </div>
<div class="form-floating"> <div class="col-2">
<input class="form-control" <div class="form-floating">
type="text" <input
name="streetNumber" class="form-control"
:placeholder="$t('streetNumber')" type="text"
v-model="streetNumber"/> name="streetNumber"
<label for="streetNumber">{{ $t('streetNumber') }}</label> :placeholder="$t('streetNumber')"
</div> v-model="streetNumber"
>
<label for="streetNumber">{{ $t('streetNumber') }}</label>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>

View File

@ -1,53 +1,60 @@
<template> <template>
<div class="my-1"> <div class="my-1">
<label class="col-form-label">{{ $t('city') }}</label> <label class="col-form-label">{{ $t('city') }}</label>
<VueMultiselect <VueMultiselect
id="citySelector" id="citySelector"
v-model="value" v-model="value"
@search-change="listenInputSearch" @search-change="listenInputSearch"
ref="citySelector" ref="citySelector"
@select="selectCity" @select="selectCity"
@remove="remove" @remove="remove"
name="field" name="field"
track-by="id" track-by="id"
label="value" label="value"
:custom-label="transName" :custom-label="transName"
:placeholder="$t('select_city')" :placeholder="$t('select_city')"
:select-label="$t('multiselect.select_label')" :select-label="$t('multiselect.select_label')"
:deselect-label="$t('create_postal_code')" :deselect-label="$t('create_postal_code')"
:selected-label="$t('multiselect.selected_label')" :selected-label="$t('multiselect.selected_label')"
:taggable="true" :taggable="true"
:multiple="false" :multiple="false"
:internal-search="false" :internal-search="false"
@tag="addPostcode" @tag="addPostcode"
:tagPlaceholder="$t('create_postal_code')" :tag-placeholder="$t('create_postal_code')"
:loading="isLoading" :loading="isLoading"
:options="cities"> :options="cities"
</VueMultiselect> />
</div> </div>
<div class="custom-postcode row g-1" v-if="writeNewPostcode || (isEnteredCustomCity && !isCitySelectorOpen)"> <div
<div class="col-4"> class="custom-postcode row g-1"
<div class="form-floating"> v-if="writeNewPostcode || (isEnteredCustomCity && !isCitySelectorOpen)"
<input class="form-control" >
type="text" <div class="col-4">
id="code" <div class="form-floating">
:placeholder="$t('postalCode_code')" <input
v-model="code"/> class="form-control"
<label for="code">{{ $t('postalCode_code') }}</label> type="text"
</div> id="code"
:placeholder="$t('postalCode_code')"
v-model="code"
>
<label for="code">{{ $t('postalCode_code') }}</label>
</div> </div>
<div class="col-8"> </div>
<div class="form-floating"> <div class="col-8">
<input class="form-control" <div class="form-floating">
type="text" <input
id="name" class="form-control"
:placeholder="$t('postalCode_name')" type="text"
v-model="name"/> id="name"
<label for="name">{{ $t('postalCode_name') }}</label> :placeholder="$t('postalCode_name')"
</div> v-model="name"
>
<label for="name">{{ $t('postalCode_name') }}</label>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>

View File

@ -1,22 +1,24 @@
<template> <template>
<div class="my-1"> <div class="my-1">
<label class="col-form-label" for="countrySelect">{{ $t('country') }}</label> <label
<VueMultiselect class="col-form-label"
id="countrySelect" for="countrySelect"
label="name" >{{ $t('country') }}</label>
track-by="id" <VueMultiselect
:custom-label="transName" id="countrySelect"
:placeholder="$t('select_country')" label="name"
:options="sortedCountries" track-by="id"
v-model="value" :custom-label="transName"
:select-label="$t('multiselect.select_label')" :placeholder="$t('select_country')"
:deselect-label="$t('multiselect.deselect_label')" :options="sortedCountries"
:selected-label="$t('multiselect.selected_label')" v-model="value"
@select="selectCountry" :select-label="$t('multiselect.select_label')"
@remove="remove" :deselect-label="$t('multiselect.deselect_label')"
> :selected-label="$t('multiselect.selected_label')"
</VueMultiselect> @select="selectCountry"
</div> @remove="remove"
/>
</div>
</template> </template>
<script> <script>

View File

@ -1,56 +1,83 @@
<template> <template>
<div
v-if="insideModal === false"
class="loading"
>
<i
v-if="flag.loading"
class="fa fa-circle-o-notch fa-spin fa-2x fa-fw"
/>
<span class="sr-only">{{ $t('loading') }}</span>
</div>
<div v-if="insideModal === false" class="loading"> <div
<i v-if="flag.loading" class="fa fa-circle-o-notch fa-spin fa-2x fa-fw"></i> v-if="errorMsg && errorMsg.length > 0"
<span class="sr-only">{{ $t('loading') }}</span> class="alert alert-danger"
</div> >
{{ errorMsg }}
</div>
<div v-if="errorMsg && errorMsg.length > 0" class="alert alert-danger"> <address-render-box :address="selectedAddress" />
{{ errorMsg }}
</div>
<address-render-box :address="selectedAddress"></address-render-box> <div class="row">
<div
<div class="row"> v-if="showDateFrom"
<div v-if="showDateFrom" class='col-lg-6 address-valid date-since'> class="col-lg-6 address-valid date-since"
<h3>{{ $t(getValidFromDateText) }}</h3> >
<div class="input-group mb-3"> <h3>{{ $t(getValidFromDateText) }}</h3>
<span class="input-group-text" id="validFrom"><i class="fa fa-fw fa-calendar"></i></span> <div class="input-group mb-3">
<input type="date" class="form-control form-control-lg" name="validFrom" <span
v-bind:placeholder="$t(getValidFromDateText)" class="input-group-text"
v-model="validFrom" id="validFrom"
aria-describedby="validFrom" ><i class="fa fa-fw fa-calendar" /></span>
/> <input
</div> type="date"
class="form-control form-control-lg"
name="validFrom"
:placeholder="$t(getValidFromDateText)"
v-model="validFrom"
aria-describedby="validFrom"
>
</div> </div>
</div>
<div v-if="showDateTo" class='col-lg-6 address-valid date-until'> <div
<h3>{{ $t(getValidToDateText) }}</h3> v-if="showDateTo"
<div class="input-group mb-3"> class="col-lg-6 address-valid date-until"
<span class="input-group-text" id="validTo"><i class="fa fa-fw fa-calendar"></i></span> >
<input type="date" class="form-control form-control-lg" name="validTo" <h3>{{ $t(getValidToDateText) }}</h3>
v-bind:placeholder="$t(getValidToDateText)" <div class="input-group mb-3">
v-model="validTo" <span
aria-describedby="validTo" class="input-group-text"
/> id="validTo"
</div> ><i class="fa fa-fw fa-calendar" /></span>
<input
type="date"
class="form-control form-control-lg"
name="validTo"
:placeholder="$t(getValidToDateText)"
v-model="validTo"
aria-describedby="validTo"
>
</div> </div>
</div> </div>
</div>
<action-buttons v-if="insideModal === false"
:options="this.options"
:defaultz="this.defaultz">
<template v-slot:before>
<slot name="before"></slot>
</template>
<template v-slot:action>
<slot name="action"></slot>
</template>
<template v-slot:after>
<slot name="after"></slot>
</template>
</action-buttons>
<action-buttons
v-if="insideModal === false"
:options="this.options"
:defaultz="this.defaultz"
>
<template #before>
<slot name="before" />
</template>
<template #action>
<slot name="action" />
</template>
<template #after>
<slot name="after" />
</template>
</action-buttons>
</template> </template>
<script> <script>

View File

@ -1,100 +1,123 @@
<template> <template>
<div class="address-form"> <div class="address-form">
<!-- Not display in modal -->
<div
v-if="insideModal === false"
class="loading"
>
<i
v-if="flag.loading"
class="fa fa-circle-o-notch fa-spin fa-2x fa-fw"
/>
<span class="sr-only">Loading...</span>
</div>
<!-- Not display in modal --> <div
<div v-if="insideModal === false" class="loading"> v-if="errors.length"
<i v-if="flag.loading" class="fa fa-circle-o-notch fa-spin fa-2x fa-fw"></i> class="alert alert-warning"
<span class="sr-only">Loading...</span> >
<ul>
<li
v-for="(e, i) in errors"
:key="i"
>
{{ e }}
</li>
</ul>
</div>
<h4 class="h3">
{{ $t('select_an_address_title') }}
</h4>
<div class="row my-3">
<div class="col-lg-6">
<div class="form-check">
<input
type="checkbox"
class="form-check-input"
id="isConfidential"
v-model="isConfidential"
:value="valueConfidential"
>
<label
class="form-check-label"
for="isConfidential"
>
{{ $t('isConfidential') }}
</label>
</div>
<div class="form-check">
<input
type="checkbox"
class="form-check-input"
id="isNoAddress"
v-model="isNoAddress"
:value="value"
>
<label
class="form-check-label"
for="isNoAddress"
>
{{ $t('isNoAddress') }}
</label>
</div>
<country-selection
:context="context"
:entity="entity"
:flag="flag"
:check-errors="checkErrors"
@get-cities="$emit('getCities', selected.country)"
/>
<city-selection
:entity="entity"
:context="context"
:focus-on-address="focusOnAddress"
:update-map-center="updateMapCenter"
:flag="flag"
:check-errors="checkErrors"
@get-reference-addresses="$emit('getReferenceAddresses', selected.city)"
/>
<address-selection
v-if="!isNoAddress"
:entity="entity"
:context="context"
:update-map-center="updateMapCenter"
:flag="flag"
:check-errors="checkErrors"
/>
</div> </div>
<div class="col-lg-6 mt-3 mt-lg-0">
<div v-if="errors.length" class="alert alert-warning" > <address-map
<ul> :entity="entity"
<li v-for="(e, i) in errors" :key="i">{{ e }}</li> ref="addressMap"
</ul> />
</div> </div>
</div>
<h4 class="h3">{{ $t('select_an_address_title') }}</h4> <address-more
<div class="row my-3"> :entity="entity"
<div class="col-lg-6"> :is-no-address="isNoAddress"
/>
<div class="form-check"> <action-buttons
<input type="checkbox" v-if="insideModal === false"
class="form-check-input" :options="this.options"
id="isConfidential" :defaultz="this.defaultz"
v-model="isConfidential" >
:value="valueConfidential" /> <template #before>
<label class="form-check-label" for="isConfidential"> <slot name="before" />
{{ $t('isConfidential') }} </template>
</label> <template #action>
</div> <slot name="action" />
<div class="form-check"> </template>
<input type="checkbox" <template #after>
class="form-check-input" <slot name="after" />
id="isNoAddress" </template>
v-model="isNoAddress" </action-buttons>
:value="value" /> </div>
<label class="form-check-label" for="isNoAddress">
{{ $t('isNoAddress') }}
</label>
</div>
<country-selection
v-bind:context="context"
v-bind:entity="entity"
v-bind:flag="flag"
v-bind:checkErrors="checkErrors"
@getCities="$emit('getCities', selected.country)">
</country-selection>
<city-selection
v-bind:entity="entity"
v-bind:context="context"
v-bind:focusOnAddress="focusOnAddress"
v-bind:updateMapCenter="updateMapCenter"
v-bind:flag="flag"
v-bind:checkErrors="checkErrors"
@getReferenceAddresses="$emit('getReferenceAddresses', selected.city)">
</city-selection>
<address-selection v-if="!isNoAddress"
v-bind:entity="entity"
v-bind:context="context"
v-bind:updateMapCenter="updateMapCenter"
v-bind:flag="flag"
v-bind:checkErrors="checkErrors">
</address-selection>
</div>
<div class="col-lg-6 mt-3 mt-lg-0">
<address-map
v-bind:entity="entity"
ref="addressMap">
</address-map>
</div>
</div>
<address-more
v-bind:entity="entity"
v-bind:isNoAddress="isNoAddress">
</address-more>
<action-buttons v-if="insideModal === false"
:options="this.options"
:defaultz="this.defaultz">
<template v-slot:before>
<slot name="before"></slot>
</template>
<template v-slot:action>
<slot name="action"></slot>
</template>
<template v-slot:after>
<slot name="after"></slot>
</template>
</action-buttons>
</div>
</template> </template>
<script> <script>

View File

@ -1,75 +1,112 @@
<template> <template>
<div
v-if="!onlyButton"
class="mt-4 flex-grow-1"
>
<div class="loading">
<i
v-if="flag.loading"
class="fa fa-circle-o-notch fa-spin fa-2x fa-fw"
/>
<span class="sr-only">{{ $t('loading') }}</span>
</div>
<div v-if="!onlyButton" class="mt-4 flex-grow-1"> <div
<div class="loading"> v-if="errorMsg && errorMsg.length > 0"
<i v-if="flag.loading" class="fa fa-circle-o-notch fa-spin fa-2x fa-fw"></i> class="alert alert-danger"
<span class="sr-only">{{ $t('loading') }}</span> >
</div> {{ errorMsg }}
</div>
<div v-if="errorMsg && errorMsg.length > 0" class="alert alert-danger"> <div
{{ errorMsg }} v-if="flag.success"
</div> class="alert alert-success"
>
{{ $t(getSuccessText) }}
<span v-if="forceRedirect">{{ $t('wait_redirection') }}</span>
</div>
<div v-if="flag.success" class="alert alert-success"> <div
{{ $t(getSuccessText) }} v-if="(!this.context.edit && !this.flag.success && this.context.target.name !== 'household')"
<span v-if="forceRedirect">{{ $t('wait_redirection') }}</span> class="mt-5"
</div> >
<div class="no-address-yet">
<i
class="fa fa-map-marker"
aria-hidden="true"
/>
<p class="chill-no-data-statement">
{{ $t('not_yet_address') }}
</p>
<div v-if="(!this.context.edit && !this.flag.success && this.context.target.name !== 'household')" class="mt-5"> <action-buttons
<div class="no-address-yet"> :options="this.options"
<i class="fa fa-map-marker" aria-hidden="true"></i> :defaultz="this.defaultz"
<p class="chill-no-data-statement"> class="add-address-btn"
{{ $t('not_yet_address') }} >
</p> <template #action>
<button
<action-buttons @click.prevent="$emit('openEditPane')"
:options="this.options" class="btn"
:defaultz="this.defaultz" :class="getClassButton"
class="add-address-btn"> type="button"
<template v-slot:action> name="button"
<button @click.prevent="$emit('openEditPane')" :title="$t(getTextButton)"
class="btn" :class="getClassButton" >
type="button" name="button" :title="$t(getTextButton)"> <span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
<span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
</button>
</template>
</action-buttons>
</div>
</div>
<address-render-box :address="address" :isMultiline="false" :useDatePane="useDatePane"></address-render-box>
<div v-if="this.context.target.name === 'household' || this.context.edit">
<action-buttons
:options="this.options"
:defaultz="this.defaultz">
<template v-slot:action>
<button @click.prevent="$emit('openEditPane')"
class="btn" :class="getClassButton"
type="button" name="button" :title="$t(getTextButton)">
<span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
</button>
</template>
</action-buttons>
</div>
</div>
<div v-if="onlyButton">
<action-buttons
:options="this.options"
:defaultz="this.defaultz"
class="add-address-btn">
<template v-slot:action>
<button @click.prevent="$emit('openEditPane')"
class="btn" :class="getClassButton"
type="button" name="button" :title="$t(getTextButton)">
<span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
</button> </button>
</template> </template>
</action-buttons> </action-buttons>
</div> </div>
</div>
<address-render-box
:address="address"
:is-multiline="false"
:use-date-pane="useDatePane"
/>
<div v-if="this.context.target.name === 'household' || this.context.edit">
<action-buttons
:options="this.options"
:defaultz="this.defaultz"
>
<template #action>
<button
@click.prevent="$emit('openEditPane')"
class="btn"
:class="getClassButton"
type="button"
name="button"
:title="$t(getTextButton)"
>
<span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
</button>
</template>
</action-buttons>
</div>
</div>
<div v-if="onlyButton">
<action-buttons
:options="this.options"
:defaultz="this.defaultz"
class="add-address-btn"
>
<template #action>
<button
@click.prevent="$emit('openEditPane')"
class="btn"
:class="getClassButton"
type="button"
name="button"
:title="$t(getTextButton)"
>
<span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
</button>
</template>
</action-buttons>
</div>
</template> </template>
<script> <script>

View File

@ -1,53 +1,73 @@
<template> <template>
<div
v-if="insideModal === false"
class="loading"
>
<i
v-if="flag.loading"
class="fa fa-circle-o-notch fa-spin fa-2x fa-fw"
/>
<span class="sr-only">{{ $t('loading') }}</span>
</div>
<div v-if="insideModal === false" class="loading"> <div
<i v-if="flag.loading" class="fa fa-circle-o-notch fa-spin fa-2x fa-fw"></i> v-if="errorMsg && errorMsg.length > 0"
<span class="sr-only">{{ $t('loading') }}</span> class="alert alert-danger"
</div> >
{{ errorMsg }}
</div>
<div v-if="errorMsg && errorMsg.length > 0" class="alert alert-danger">{{ errorMsg }}</div> <h4 class="h3">
{{ $t('address_suggestions') }}
</h4>
<h4 class="h3">{{ $t('address_suggestions') }}</h4> <div class="flex-table AddressSuggestionList">
<div
<div class="flex-table AddressSuggestionList"> v-for="(a, i) in context.suggestions"
<div v-for="(a, i) in context.suggestions" class="item-bloc" :key="`suggestions-${i}`"> class="item-bloc"
<div class="float-button bottom"> :key="`suggestions-${i}`"
<div class="box"> >
<div class="action"> <div class="float-button bottom">
<!-- QUESTION normal que ça vienne avant l'adresse ? pourquoi pas après avoir affiché le address-render-box ? --> <div class="box">
<ul class="record_actions"> <div class="action">
<li> <!-- QUESTION normal que ça vienne avant l'adresse ? pourquoi pas après avoir affiché le address-render-box ? -->
<button class="btn btn-sm btn-choose" @click="this.pickAddress(a)"> <ul class="record_actions">
{{ $t('use_this_address') }} <li>
</button> <button
</li> class="btn btn-sm btn-choose"
</ul> @click="this.pickAddress(a)"
</div> >
<ul class="list-content fa-ul"> {{ $t('use_this_address') }}
<li> </button>
<i class="fa fa-li fa-map-marker"></i> </li>
<address-render-box :address="a"></address-render-box> </ul>
</li> </div>
</ul> <ul class="list-content fa-ul">
</div> <li>
</div> <i class="fa fa-li fa-map-marker" />
<address-render-box :address="a" />
</li>
</ul>
</div>
</div> </div>
</div> </div>
</div>
<action-buttons v-if="insideModal === false"
:options="this.options"
:defaultz="this.defaultz">
<template v-slot:before>
<slot name="before"></slot>
</template>
<template v-slot:action>
<slot name="action"></slot>
</template>
<template v-slot:after>
<slot name="after"></slot>
</template>
</action-buttons>
<action-buttons
v-if="insideModal === false"
:options="this.options"
:defaultz="this.defaultz"
>
<template #before>
<slot name="before" />
</template>
<template #action>
<slot name="action" />
</template>
<template #after>
<slot name="after" />
</template>
</action-buttons>
</template> </template>
<script> <script>

View File

@ -1,31 +1,36 @@
<template> <template>
<h2>{{ $t('main_title') }}</h2>
<h2>{{ $t('main_title') }}</h2> <ul class="nav nav-tabs">
<li class="nav-item">
<ul class="nav nav-tabs"> <a
<li class="nav-item"> class="nav-link"
<a class="nav-link" :class="{'active': activeTab === 'MyCustoms'}"
:class="{'active': activeTab === 'MyCustoms'}" @click="selectTab('MyCustoms')"
@click="selectTab('MyCustoms')"> >
<i class="fa fa-dashboard"></i> <i class="fa fa-dashboard" />
</a> </a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" <a
:class="{'active': activeTab === 'MyNotifications'}" class="nav-link"
@click="selectTab('MyNotifications')"> :class="{'active': activeTab === 'MyNotifications'}"
{{ $t('my_notifications.tab') }} @click="selectTab('MyNotifications')"
<tab-counter :count="state.notifications.count"></tab-counter> >
</a> {{ $t('my_notifications.tab') }}
</li> <tab-counter :count="state.notifications.count" />
<li class="nav-item"> </a>
<a class="nav-link" </li>
:class="{'active': activeTab === 'MyAccompanyingCourses'}" <li class="nav-item">
@click="selectTab('MyAccompanyingCourses')"> <a
{{ $t('my_accompanying_courses.tab') }} class="nav-link"
</a> :class="{'active': activeTab === 'MyAccompanyingCourses'}"
</li> @click="selectTab('MyAccompanyingCourses')"
<!-- <li class="nav-item"> >
{{ $t('my_accompanying_courses.tab') }}
</a>
</li>
<!-- <li class="nav-item">
<a class="nav-link" <a class="nav-link"
:class="{'active': activeTab === 'MyWorks'}" :class="{'active': activeTab === 'MyWorks'}"
@click="selectTab('MyWorks')"> @click="selectTab('MyWorks')">
@ -33,58 +38,70 @@
<tab-counter :count="state.works.count"></tab-counter> <tab-counter :count="state.works.count"></tab-counter>
</a> </a>
</li> --> </li> -->
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" <a
:class="{'active': activeTab === 'MyEvaluations'}" class="nav-link"
@click="selectTab('MyEvaluations')"> :class="{'active': activeTab === 'MyEvaluations'}"
{{ $t('my_evaluations.tab') }} @click="selectTab('MyEvaluations')"
<tab-counter :count="state.evaluations.count"></tab-counter> >
</a> {{ $t('my_evaluations.tab') }}
</li> <tab-counter :count="state.evaluations.count" />
<li class="nav-item"> </a>
<a class="nav-link" </li>
:class="{'active': activeTab === 'MyTasks'}" <li class="nav-item">
@click="selectTab('MyTasks')"> <a
{{ $t('my_tasks.tab') }} class="nav-link"
<tab-counter :count="state.tasks.warning.count + state.tasks.alert.count"></tab-counter> :class="{'active': activeTab === 'MyTasks'}"
</a> @click="selectTab('MyTasks')"
</li> >
<li class="nav-item"> {{ $t('my_tasks.tab') }}
<a class="nav-link" <tab-counter :count="state.tasks.warning.count + state.tasks.alert.count" />
:class="{'active': activeTab === 'MyWorkflows'}" </a>
@click="selectTab('MyWorkflows')"> </li>
{{ $t('my_workflows.tab') }} <li class="nav-item">
<tab-counter :count="state.workflows.count + state.workflowsCc.count"></tab-counter> <a
</a> class="nav-link"
</li> :class="{'active': activeTab === 'MyWorkflows'}"
<li class="nav-item loading ms-auto py-2" v-if="loading"> @click="selectTab('MyWorkflows')"
<i class="fa fa-circle-o-notch fa-spin fa-lg text-chill-gray" :title="$t('loading')"></i> >
</li> {{ $t('my_workflows.tab') }}
</ul> <tab-counter :count="state.workflows.count + state.workflowsCc.count" />
</a>
</li>
<li
class="nav-item loading ms-auto py-2"
v-if="loading"
>
<i
class="fa fa-circle-o-notch fa-spin fa-lg text-chill-gray"
:title="$t('loading')"
/>
</li>
</ul>
<div class="my-4"> <div class="my-4">
<my-customs <my-customs
v-if="activeTab === 'MyCustoms'"> v-if="activeTab === 'MyCustoms'"
</my-customs> />
<my-works <my-works
v-else-if="activeTab === 'MyWorks'"> v-else-if="activeTab === 'MyWorks'"
</my-works> />
<my-evaluations <my-evaluations
v-else-if="activeTab === 'MyEvaluations'"> v-else-if="activeTab === 'MyEvaluations'"
</my-evaluations> />
<my-tasks <my-tasks
v-else-if="activeTab === 'MyTasks'"> v-else-if="activeTab === 'MyTasks'"
</my-tasks> />
<my-accompanying-courses <my-accompanying-courses
v-else-if="activeTab === 'MyAccompanyingCourses'"> v-else-if="activeTab === 'MyAccompanyingCourses'"
</my-accompanying-courses> />
<my-notifications <my-notifications
v-else-if="activeTab === 'MyNotifications'"> v-else-if="activeTab === 'MyNotifications'"
</my-notifications> />
<my-workflows <my-workflows
v-else-if="activeTab === 'MyWorkflows'"> v-else-if="activeTab === 'MyWorkflows'"
</my-workflows> />
</div> </div>
</template> </template>
<script> <script>

View File

@ -1,48 +1,77 @@
<template> <template>
<div class="alert alert-light">{{ $t('my_accompanying_courses.description') }}</div> <div class="alert alert-light">
<span v-if="noResults" class="chill-no-data-statement">{{ $t('no_data') }}</span> {{ $t('my_accompanying_courses.description') }}
<tab-table v-else> </div>
<template v-slot:thead> <span
<th scope="col">{{ $t('opening_date') }}</th> v-if="noResults"
<th scope="col">{{ $t('social_issues') }}</th> class="chill-no-data-statement"
<th scope="col">{{ $t('concerned_persons') }}</th> >{{ $t('no_data') }}</span>
<th scope="col"></th> <tab-table v-else>
<th scope="col"></th> <template #thead>
</template> <th scope="col">
<template v-slot:tbody> {{ $t('opening_date') }}
<tr v-for="(c, i) in accompanyingCourses.results" :key="`course-${i}`"> </th>
<td>{{ $d(c.openingDate.datetime, 'short') }}</td> <th scope="col">
<td> {{ $t('social_issues') }}
<span v-for="i in c.socialIssues" </th>
class="chill-entity entity-social-issue"> <th scope="col">
<span class="badge bg-chill-l-gray text-dark"> {{ $t('concerned_persons') }}
{{ i.title.fr }} </th>
</span> <th scope="col" />
</span> <th scope="col" />
</td> </template>
<td> <template #tbody>
<span v-for="p in c.participations" class="me-1" :key="p.person.id"> <tr
<on-the-fly v-for="(c, i) in accompanyingCourses.results"
:type="p.person.type" :key="`course-${i}`"
:id="p.person.id" >
:buttonText="p.person.textAge" <td>{{ $d(c.openingDate.datetime, 'short') }}</td>
:displayBadge="'true' === 'true'" <td>
action="show"> <span
</on-the-fly> v-for="i in c.socialIssues"
</span> class="chill-entity entity-social-issue"
</td> >
<td> <span class="badge bg-chill-l-gray text-dark">
<span v-if="c.emergency" class="badge rounded-pill bg-danger me-1">{{ $t('emergency') }}</span> {{ i.title.fr }}
<span v-if="c.confidential" class="badge rounded-pill bg-danger">{{ $t('confidential') }}</span> </span>
</td> </span>
<td> </td>
<a class="btn btn-sm btn-show" :href="getUrl(c)"> <td>
{{ $t('show_entity', { entity: $t('the_course') }) }} <span
</a> v-for="p in c.participations"
</td> class="me-1"
</tr> :key="p.person.id"
</template> >
</tab-table> <on-the-fly
:type="p.person.type"
:id="p.person.id"
:button-text="p.person.textAge"
:display-badge="'true' === 'true'"
action="show"
/>
</span>
</td>
<td>
<span
v-if="c.emergency"
class="badge rounded-pill bg-danger me-1"
>{{ $t('emergency') }}</span>
<span
v-if="c.confidential"
class="badge rounded-pill bg-danger"
>{{ $t('confidential') }}</span>
</td>
<td>
<a
class="btn btn-sm btn-show"
:href="getUrl(c)"
>
{{ $t('show_entity', { entity: $t('the_course') }) }}
</a>
</td>
</tr>
</template>
</tab-table>
</template> </template>
<script> <script>

View File

@ -1,54 +1,105 @@
<template> <template>
<span v-if="noResults" class="chill-no-data-statement">{{ $t('no_dashboard') }}</span> <span
<div v-else id="dashboards" class="container g-3"> v-if="noResults"
<div class="row"> class="chill-no-data-statement"
<div class="mbloc col-xs-12 col-sm-4"> >{{ $t('no_dashboard') }}</span>
<div class="custom1"> <div
<ul class="list-unstyled"> v-else
<li v-if="counter.notifications > 0"> id="dashboards"
<i18n-t keypath="counter.unread_notifications" tag="span" :class="counterClass" :plural="counter.notifications"> class="container g-3"
<template v-slot:n><span>{{ counter.notifications }}</span></template> >
</i18n-t> <div class="row">
</li> <div class="mbloc col-xs-12 col-sm-4">
<li v-if="counter.accompanyingCourses > 0"> <div class="custom1">
<i18n-t keypath="counter.assignated_courses" tag="span" :class="counterClass" :plural="counter.accompanyingCourses"> <ul class="list-unstyled">
<template v-slot:n><span>{{ counter.accompanyingCourses }}</span></template> <li v-if="counter.notifications > 0">
</i18n-t> <i18n-t
</li> keypath="counter.unread_notifications"
<li v-if="counter.works > 0"> tag="span"
<i18n-t keypath="counter.assignated_actions" tag="span" :class="counterClass" :plural="counter.works"> :class="counterClass"
<template v-slot:n><span>{{ counter.works }}</span></template> :plural="counter.notifications"
</i18n-t> >
</li> <template #n>
<li v-if="counter.evaluations > 0"> <span>{{ counter.notifications }}</span>
<i18n-t keypath="counter.assignated_evaluations" tag="span" :class="counterClass" :plural="counter.evaluations"> </template>
<template v-slot:n><span>{{ counter.evaluations }}</span></template> </i18n-t>
</i18n-t> </li>
</li> <li v-if="counter.accompanyingCourses > 0">
<li v-if="counter.tasksAlert > 0"> <i18n-t
<i18n-t keypath="counter.alert_tasks" tag="span" :class="counterClass" :plural="counter.tasksAlert"> keypath="counter.assignated_courses"
<template v-slot:n><span>{{ counter.tasksAlert }}</span></template> tag="span"
</i18n-t> :class="counterClass"
</li> :plural="counter.accompanyingCourses"
<li v-if="counter.tasksWarning > 0"> >
<i18n-t keypath="counter.warning_tasks" tag="span" :class="counterClass" :plural="counter.tasksWarning"> <template #n>
<template v-slot:n><span>{{ counter.tasksWarning }}</span></template> <span>{{ counter.accompanyingCourses }}</span>
</i18n-t> </template>
</li> </i18n-t>
</ul> </li>
</div> <li v-if="counter.works > 0">
</div> <i18n-t
keypath="counter.assignated_actions"
tag="span"
:class="counterClass"
:plural="counter.works"
>
<template #n>
<span>{{ counter.works }}</span>
</template>
</i18n-t>
</li>
<li v-if="counter.evaluations > 0">
<i18n-t
keypath="counter.assignated_evaluations"
tag="span"
:class="counterClass"
:plural="counter.evaluations"
>
<template #n>
<span>{{ counter.evaluations }}</span>
</template>
</i18n-t>
</li>
<li v-if="counter.tasksAlert > 0">
<i18n-t
keypath="counter.alert_tasks"
tag="span"
:class="counterClass"
:plural="counter.tasksAlert"
>
<template #n>
<span>{{ counter.tasksAlert }}</span>
</template>
</i18n-t>
</li>
<li v-if="counter.tasksWarning > 0">
<i18n-t
keypath="counter.warning_tasks"
tag="span"
:class="counterClass"
:plural="counter.tasksWarning"
>
<template #n>
<span>{{ counter.tasksWarning }}</span>
</template>
</i18n-t>
</li>
</ul>
</div>
</div>
<template v-if="this.hasDashboardItems"> <template v-if="this.hasDashboardItems">
<template v-for="dashboardItem in this.dashboardItems"> <template v-for="dashboardItem in this.dashboardItems">
<div class="mbloc col-xs-12 col-sm-8 news" v-if="dashboardItem.type === 'news'"> <div
<News /> class="mbloc col-xs-12 col-sm-8 news"
</div> v-if="dashboardItem.type === 'news'"
</template> >
</template> <News />
</div>
</div> </template>
</div> </template>
</div>
</div>
</template> </template>
<script> <script>

View File

@ -1,56 +1,84 @@
<template> <template>
<div class="accompanying-course-work"> <div class="accompanying-course-work">
<div class="alert alert-light">{{ $t('my_evaluations.description') }}</div> <div class="alert alert-light">
<span v-if="noResults" class="chill-no-data-statement">{{ $t('no_data') }}</span> {{ $t('my_evaluations.description') }}
<tab-table v-else> </div>
<template v-slot:thead> <span
<th scope="col">{{ $t('max_date') }}</th> v-if="noResults"
<th scope="col">{{ $t('evaluation') }}</th> class="chill-no-data-statement"
<th scope="col">{{ $t('SocialAction') }}</th> >{{ $t('no_data') }}</span>
<th scope="col"></th> <tab-table v-else>
<template #thead>
<th scope="col">
{{ $t('max_date') }}
</th>
<th scope="col">
{{ $t('evaluation') }}
</th>
<th scope="col">
{{ $t('SocialAction') }}
</th>
<th scope="col" />
</template> </template>
<template v-slot:tbody> <template #tbody>
<tr v-for="(e, i) in evaluations.results" :key="`evaluation-${i}`"> <tr
<td>{{ $d(e.maxDate.datetime, 'short') }}</td> v-for="(e, i) in evaluations.results"
<td> :key="`evaluation-${i}`"
{{ e.evaluation.title.fr }} >
</td> <td>{{ $d(e.maxDate.datetime, 'short') }}</td>
<td> <td>
<span class="chill-entity entity-social-issue"> {{ e.evaluation.title.fr }}
<span class="badge bg-chill-l-gray text-dark"> </td>
{{ e.accompanyingPeriodWork.socialAction.issue.text }} <td>
</span> <span class="chill-entity entity-social-issue">
</span> <span class="badge bg-chill-l-gray text-dark">
<h4 class="badge-title"> {{ e.accompanyingPeriodWork.socialAction.issue.text }}
<span class="title_label"></span> </span>
<span class="title_action"> </span>
{{ e.accompanyingPeriodWork.socialAction.text }} <h4 class="badge-title">
</span> <span class="title_label" />
</h4> <span class="title_action">
<span v-for="person in e.accompanyingPeriodWork.persons" class="me-1" :key="person.id"> {{ e.accompanyingPeriodWork.socialAction.text }}
<on-the-fly </span>
:type="person.type" </h4>
:id="person.id" <span
:buttonText="person.textAge" v-for="person in e.accompanyingPeriodWork.persons"
:displayBadge="'true' === 'true'" class="me-1"
action="show"> :key="person.id"
</on-the-fly> >
</span> <on-the-fly
</td> :type="person.type"
<td> :id="person.id"
<div class="btn-group-vertical" role="group" aria-label="Actions"> :button-text="person.textAge"
<a class="btn btn-sm btn-show" :href="getUrl(e)"> :display-badge="'true' === 'true'"
{{ $t('show_entity', { entity: $t('the_evaluation') }) }} action="show"
</a> />
<a class="btn btn-sm btn-show" :href="getUrl(e.accompanyingPeriodWork.accompanyingPeriod)"> </span>
{{ $t('show_entity', { entity: $t('the_course') }) }} </td>
</a> <td>
</div> <div
</td> class="btn-group-vertical"
</tr> role="group"
aria-label="Actions"
>
<a
class="btn btn-sm btn-show"
:href="getUrl(e)"
>
{{ $t('show_entity', { entity: $t('the_evaluation') }) }}
</a>
<a
class="btn btn-sm btn-show"
:href="getUrl(e.accompanyingPeriodWork.accompanyingPeriod)"
>
{{ $t('show_entity', { entity: $t('the_course') }) }}
</a>
</div>
</td>
</tr>
</template> </template>
</tab-table> </tab-table>
</div> </div>
</template> </template>
<script> <script>

View File

@ -1,33 +1,53 @@
<template> <template>
<div class="alert alert-light">{{ $t('my_notifications.description') }}</div> <div class="alert alert-light">
<span v-if="noResults" class="chill-no-data-statement">{{ $t('no_data') }}</span> {{ $t('my_notifications.description') }}
<tab-table v-else> </div>
<template v-slot:thead> <span
<th scope="col">{{ $t('Date') }}</th> v-if="noResults"
<th scope="col">{{ $t('Subject') }}</th> class="chill-no-data-statement"
<th scope="col">{{ $t('From') }}</th> >{{ $t('no_data') }}</span>
<th scope="col"></th> <tab-table v-else>
</template> <template #thead>
<template v-slot:tbody> <th scope="col">
<tr v-for="(n, i) in notifications.results" :key="`notify-${i}`"> {{ $t('Date') }}
<td>{{ $d(n.date.datetime, 'long') }}</td> </th>
<td> <th scope="col">
<span class="unread"> {{ $t('Subject') }}
<i class="fa fa-envelope-o"></i> </th>
<a :href="getNotificationUrl(n)">{{ n.title }}</a> <th scope="col">
</span> {{ $t('From') }}
</td> </th>
<td v-if="n.sender != null">{{ n.sender.text }}</td> <th scope="col" />
<td v-else>{{ $t('automatic_notification')}}</td> </template>
<td> <template #tbody>
<a class="btn btn-sm btn-show" <tr
:href="getEntityUrl(n)"> v-for="(n, i) in notifications.results"
{{ $t('show_entity', { entity: getEntityName(n) }) }} :key="`notify-${i}`"
</a> >
</td> <td>{{ $d(n.date.datetime, 'long') }}</td>
</tr> <td>
</template> <span class="unread">
</tab-table> <i class="fa fa-envelope-o" />
<a :href="getNotificationUrl(n)">{{ n.title }}</a>
</span>
</td>
<td v-if="n.sender != null">
{{ n.sender.text }}
</td>
<td v-else>
{{ $t('automatic_notification') }}
</td>
<td>
<a
class="btn btn-sm btn-show"
:href="getEntityUrl(n)"
>
{{ $t('show_entity', { entity: getEntityName(n) }) }}
</a>
</td>
</tr>
</template>
</tab-table>
</template> </template>
<script> <script>

View File

@ -1,56 +1,90 @@
<template> <template>
<div class="alert alert-light">
{{ $t('my_tasks.description_warning') }}
</div>
<span
v-if="noResultsAlert"
class="chill-no-data-statement"
>{{ $t('no_data') }}</span>
<tab-table v-else>
<template #thead>
<th scope="col">
{{ $t('warning_date') }}
</th>
<th scope="col">
{{ $t('max_date') }}
</th>
<th scope="col">
{{ $t('task') }}
</th>
<th scope="col" />
</template>
<template #tbody>
<tr
v-for="(t, i) in tasks.alert.results"
:key="`task-alert-${i}`"
>
<td v-if="null !== t.warningDate">
{{ $d(t.warningDate.datetime, 'short') }}
</td>
<td v-else />
<td>
<span class="outdated">{{ $d(t.endDate.datetime, 'short') }}</span>
</td>
<td>{{ t.title }}</td>
<td>
<a
class="btn btn-sm btn-show"
:href="getUrl(t)"
>
{{ $t('show_entity', { entity: $t('the_task') }) }}
</a>
</td>
</tr>
</template>
</tab-table>
<div class="alert alert-light">{{ $t('my_tasks.description_warning') }}</div> <div class="alert alert-light">
<span v-if="noResultsAlert" class="chill-no-data-statement">{{ $t('no_data') }}</span> {{ $t('my_tasks.description_alert') }}
<tab-table v-else> </div>
<template v-slot:thead> <span
<th scope="col">{{ $t('warning_date') }}</th> v-if="noResultsWarning"
<th scope="col">{{ $t('max_date') }}</th> class="chill-no-data-statement"
<th scope="col">{{ $t('task') }}</th> >{{ $t('no_data') }}</span>
<th scope="col"></th> <tab-table v-else>
</template> <template #thead>
<template v-slot:tbody> <th scope="col">
<tr v-for="(t, i) in tasks.alert.results" :key="`task-alert-${i}`"> {{ $t('warning_date') }}
<td v-if="null !== t.warningDate">{{ $d(t.warningDate.datetime, 'short') }}</td> </th>
<td v-else></td> <th scope="col">
<td> {{ $t('max_date') }}
<span class="outdated">{{ $d(t.endDate.datetime, 'short') }}</span> </th>
</td> <th scope="col">
<td>{{ t.title }}</td> {{ $t('task') }}
<td> </th>
<a class="btn btn-sm btn-show" :href="getUrl(t)"> <th scope="col" />
{{ $t('show_entity', { entity: $t('the_task') }) }} </template>
</a> <template #tbody>
</td> <tr
</tr> v-for="(t, i) in tasks.warning.results"
</template> :key="`task-warning-${i}`"
</tab-table> >
<td>
<div class="alert alert-light">{{ $t('my_tasks.description_alert') }}</div> <span class="outdated">{{ $d(t.warningDate.datetime, 'short') }}</span>
<span v-if="noResultsWarning" class="chill-no-data-statement">{{ $t('no_data') }}</span> </td>
<tab-table v-else> <td>{{ $d(t.endDate.datetime, 'short') }}</td>
<template v-slot:thead> <td>{{ t.title }}</td>
<th scope="col">{{ $t('warning_date') }}</th> <td>
<th scope="col">{{ $t('max_date') }}</th> <a
<th scope="col">{{ $t('task') }}</th> class="btn btn-sm btn-show"
<th scope="col"></th> :href="getUrl(t)"
</template> >
<template v-slot:tbody> {{ $t('show_entity', { entity: $t('the_task') }) }}
<tr v-for="(t, i) in tasks.warning.results" :key="`task-warning-${i}`"> </a>
<td> </td>
<span class="outdated">{{ $d(t.warningDate.datetime, 'short') }}</span> </tr>
</td> </template>
<td>{{ $d(t.endDate.datetime, 'short') }}</td> </tab-table>
<td>{{ t.title }}</td>
<td>
<a class="btn btn-sm btn-show" :href="getUrl(t)">
{{ $t('show_entity', { entity: $t('the_task') }) }}
</a>
</td>
</tr>
</template>
</tab-table>
</template> </template>
<script> <script>

View File

@ -1,9 +1,13 @@
<template> <template>
<div class="alert alert-light">{{ $t('my_workflows.description') }}</div> <div class="alert alert-light">
<my-workflows-table :workflows="workflows" /> {{ $t('my_workflows.description') }}
</div>
<my-workflows-table :workflows="workflows" />
<div class="alert alert-light">{{ $t('my_workflows.description_cc') }}</div> <div class="alert alert-light">
<my-workflows-table :workflows="workflowsCc" /> {{ $t('my_workflows.description_cc') }}
</div>
<my-workflows-table :workflows="workflowsCc" />
</template> </template>
<script> <script>

View File

@ -1,42 +1,61 @@
<template> <template>
<span v-if="hasNoResults(workflows)" class="chill-no-data-statement">{{ $t('no_data') }}</span> <span
<tab-table v-else> v-if="hasNoResults(workflows)"
<template v-slot:thead> class="chill-no-data-statement"
<th scope="col">{{ $t('Object_workflow') }}</th> >{{ $t('no_data') }}</span>
<th scope="col">{{ $t('Step') }}</th> <tab-table v-else>
<th scope="col">{{ $t('concerned_users') }}</th> <template #thead>
<th scope="col"></th> <th scope="col">
</template> {{ $t('Object_workflow') }}
<template v-slot:tbody> </th>
<tr v-for="(w, i) in workflows.results" :key="`workflow-${i}`"> <th scope="col">
<td>{{ w.title }}</td> {{ $t('Step') }}
<td> </th>
<div class="workflow"> <th scope="col">
<div class="breadcrumb"> {{ $t('concerned_users') }}
<i class="fa fa-circle me-1 text-chill-yellow mx-2"></i> </th>
<span class="mx-2">{{ getStep(w) }}</span> <th scope="col" />
</div> </template>
</div> <template #tbody>
</td> <tr
<td v-if="w.datas.persons !== null"> v-for="(w, i) in workflows.results"
<span v-for="p in w.datas.persons" class="me-1" :key="p.id"> :key="`workflow-${i}`"
<on-the-fly >
:type="p.type" <td>{{ w.title }}</td>
:id="p.id" <td>
:buttonText="p.textAge" <div class="workflow">
:displayBadge="'true' === 'true'" <div class="breadcrumb">
action="show"> <i class="fa fa-circle me-1 text-chill-yellow mx-2" />
</on-the-fly> <span class="mx-2">{{ getStep(w) }}</span>
</span> </div>
</td> </div>
<td> </td>
<a class="btn btn-sm btn-show" :href="getUrl(w)"> <td v-if="w.datas.persons !== null">
{{ $t('show_entity', { entity: $t('the_workflow') }) }} <span
</a> v-for="p in w.datas.persons"
</td> class="me-1"
</tr> :key="p.id"
</template> >
</tab-table> <on-the-fly
:type="p.type"
:id="p.id"
:button-text="p.textAge"
:display-badge="'true' === 'true'"
action="show"
/>
</span>
</td>
<td>
<a
class="btn btn-sm btn-show"
:href="getUrl(w)"
>
{{ $t('show_entity', { entity: $t('the_workflow') }) }}
</a>
</td>
</tr>
</template>
</tab-table>
</template> </template>
<script> <script>

View File

@ -1,56 +1,84 @@
// CURRENTLY NOT IN USE // CURRENTLY NOT IN USE
<template> <template>
<div class="accompanying-course-work"> <div class="accompanying-course-work">
<div class="alert alert-light">{{ $t('my_works.description') }}</div> <div class="alert alert-light">
<span v-if="noResults" class="chill-no-data-statement">{{ $t('no_data') }}</span> {{ $t('my_works.description') }}
<tab-table v-else> </div>
<template v-slot:thead> <span
<th scope="col">{{ $t('StartDate') }}</th> v-if="noResults"
<th scope="col">{{ $t('SocialAction') }}</th> class="chill-no-data-statement"
<th scope="col">{{ $t('concerned_persons') }}</th> >{{ $t('no_data') }}</span>
<th scope="col"></th> <tab-table v-else>
<template #thead>
<th scope="col">
{{ $t('StartDate') }}
</th>
<th scope="col">
{{ $t('SocialAction') }}
</th>
<th scope="col">
{{ $t('concerned_persons') }}
</th>
<th scope="col" />
</template> </template>
<template v-slot:tbody> <template #tbody>
<tr v-for="(w, i) in works.results" :key="`works-${i}`"> <tr
<td>{{ $d(w.startDate.datetime, 'short') }}</td> v-for="(w, i) in works.results"
<td> :key="`works-${i}`"
<span class="chill-entity entity-social-issue"> >
<span class="badge bg-chill-l-gray text-dark"> <td>{{ $d(w.startDate.datetime, 'short') }}</td>
{{ w.socialAction.issue.text }} <td>
</span> <span class="chill-entity entity-social-issue">
</span> <span class="badge bg-chill-l-gray text-dark">
<h4 class="badge-title"> {{ w.socialAction.issue.text }}
<span class="title_label"></span> </span>
<span class="title_action"> </span>
{{ w.socialAction.text }} <h4 class="badge-title">
</span> <span class="title_label" />
</h4> <span class="title_action">
</td> {{ w.socialAction.text }}
<td> </span>
<span v-for="person in w.persons" class="me-1" :key="person.id"> </h4>
<on-the-fly </td>
:type="person.type" <td>
:id="person.id" <span
:buttonText="person.textAge" v-for="person in w.persons"
:displayBadge="'true' === 'true'" class="me-1"
action="show"> :key="person.id"
</on-the-fly> >
</span> <on-the-fly
</td> :type="person.type"
<td> :id="person.id"
<div class="btn-group-vertical" role="group" aria-label="Actions"> :button-text="person.textAge"
<a class="btn btn-sm btn-update" :href="getUrl(w)"> :display-badge="'true' === 'true'"
{{ $t('show_entity', { entity: $t('the_action') }) }} action="show"
</a> />
<a class="btn btn-sm btn-show" :href="getUrl(w.accompanyingPeriod)"> </span>
{{ $t('show_entity', { entity: $t('the_course') }) }} </td>
</a> <td>
</div> <div
</td> class="btn-group-vertical"
</tr> role="group"
aria-label="Actions"
>
<a
class="btn btn-sm btn-update"
:href="getUrl(w)"
>
{{ $t('show_entity', { entity: $t('the_action') }) }}
</a>
<a
class="btn btn-sm btn-show"
:href="getUrl(w.accompanyingPeriod)"
>
{{ $t('show_entity', { entity: $t('the_course') }) }}
</a>
</div>
</td>
</tr>
</template> </template>
</tab-table> </tab-table>
</div> </div>
</template> </template>
<script> <script>

View File

@ -1,8 +1,10 @@
<template> <template>
<span v-if="isCounterAvailable" <span
class="badge rounded-pill bg-danger"> v-if="isCounterAvailable"
{{ count }} class="badge rounded-pill bg-danger"
</span> >
{{ count }}
</span>
</template> </template>
<script> <script>

View File

@ -1,14 +1,14 @@
<template> <template>
<table class="table table-striped table-hover"> <table class="table table-striped table-hover">
<thead> <thead>
<tr> <tr>
<slot name="thead"></slot> <slot name="thead" />
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<slot name="tbody"></slot> <slot name="tbody" />
</tbody> </tbody>
</table> </table>
</template> </template>
<script> <script>

View File

@ -1,14 +1,14 @@
<template> <template>
<on-the-fly <on-the-fly
:type="context.type" :type="context.type"
:id="context.id" :id="context.id"
:action="context.action" :action="context.action"
:buttonText="options.buttonText" :button-text="options.buttonText"
:displayBadge="options.displayBadge === 'true'" :display-badge="options.displayBadge === 'true'"
:isDead="options.isDead" :is-dead="options.isDead"
:parent="options.parent" :parent="options.parent"
@saveFormOnTheFly="saveFormOnTheFly"> @save-form-on-the-fly="saveFormOnTheFly"
</on-the-fly> />
</template> </template>
<script> <script>

View File

@ -1,40 +1,62 @@
<template> <template>
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li v-if="allowedTypes.includes('person')" class="nav-item"> <li
<a class="nav-link" :class="{ active: isActive('person') }"> v-if="allowedTypes.includes('person')"
<label for="person"> class="nav-item"
<input type="radio" name="person" id="person" v-model="radioType" value="person"> >
{{ $t('onthefly.create.person') }} <a
</label> class="nav-link"
</a> :class="{ active: isActive('person') }"
</li>
<li v-if="allowedTypes.includes('thirdparty')" class="nav-item">
<a class="nav-link" :class="{ active: isActive('thirdparty') }">
<label for="thirdparty">
<input type="radio" name="thirdparty" id="thirdparty" v-model="radioType" value="thirdparty">
{{ $t('onthefly.create.thirdparty') }}
</label>
</a>
</li>
</ul>
<div class="my-4">
<on-the-fly-person
v-if="type === 'person'"
:action="action"
:query="query"
ref="castPerson"
> >
</on-the-fly-person> <label for="person">
<input
<on-the-fly-thirdparty type="radio"
v-if="type === 'thirdparty'" name="person"
:action="action" id="person"
:query="query" v-model="radioType"
ref="castThirdparty" value="person"
>
{{ $t('onthefly.create.person') }}
</label>
</a>
</li>
<li
v-if="allowedTypes.includes('thirdparty')"
class="nav-item"
>
<a
class="nav-link"
:class="{ active: isActive('thirdparty') }"
> >
</on-the-fly-thirdparty> <label for="thirdparty">
</div> <input
type="radio"
name="thirdparty"
id="thirdparty"
v-model="radioType"
value="thirdparty"
>
{{ $t('onthefly.create.thirdparty') }}
</label>
</a>
</li>
</ul>
<div class="my-4">
<on-the-fly-person
v-if="type === 'person'"
:action="action"
:query="query"
ref="castPerson"
/>
<on-the-fly-thirdparty
v-if="type === 'thirdparty'"
:action="action"
:query="query"
ref="castThirdparty"
/>
</div>
</template> </template>
<script> <script>

View File

@ -1,91 +1,125 @@
<template> <template>
<a
<a v-if="isDisplayBadge" @click="openModal"> v-if="isDisplayBadge"
<span class="chill-entity" :class="badgeType"> @click="openModal"
{{ buttonText }}<span v-if="isDead"> ()</span> >
</span> <span
</a> class="chill-entity"
<a v-else class="btn btn-sm" target="_blank" :class="badgeType"
:class="classAction" >
:title="$t(titleAction)"
@click="openModal">
{{ buttonText }}<span v-if="isDead"> ()</span> {{ buttonText }}<span v-if="isDead"> ()</span>
</a> </span>
</a>
<a
v-else
class="btn btn-sm"
target="_blank"
:class="classAction"
:title="$t(titleAction)"
@click="openModal"
>
{{ buttonText }}<span v-if="isDead"> ()</span>
</a>
<teleport to="body"> <teleport to="body">
<modal v-if="modal.showModal" <modal
:modalDialogClass="modal.modalDialogClass" v-if="modal.showModal"
@close="modal.showModal = false"> :modal-dialog-class="modal.modalDialogClass"
@close="modal.showModal = false"
>
<template #header>
<h3
v-if="parent"
class="modal-title"
>
{{ $t(titleModal, {q: parent.text}) }}
</h3>
<h3
v-else
class="modal-title"
>
{{ $t(titleModal) }}
</h3>
</template>
<template v-slot:header> <template
<h3 v-if="parent" class="modal-title">{{ $t(titleModal, {q: parent.text}) }}</h3> #body
<h3 v-else class="modal-title">{{ $t(titleModal) }}</h3> v-if="type === 'person'"
</template> >
<on-the-fly-person
:id="id"
:type="type"
:action="action"
ref="castPerson"
/>
<div v-if="hasResourceComment">
<h3>{{ $t('onthefly.resource_comment_title') }}</h3>
<blockquote class="chill-user-quote">
{{ parent.comment }}
</blockquote>
</div>
</template>
<template v-slot:body v-if="type === 'person'"> <template
<on-the-fly-person #body
:id="id" v-else-if="type === 'thirdparty'"
:type="type" >
:action="action" <on-the-fly-thirdparty
ref="castPerson"> :id="id"
</on-the-fly-person> :type="type"
<div v-if="hasResourceComment"> :action="action"
<h3>{{ $t('onthefly.resource_comment_title') }}</h3> ref="castThirdparty"
<blockquote class="chill-user-quote"> />
{{ parent.comment }} <div v-if="hasResourceComment">
</blockquote> <h3>{{ $t('onthefly.resource_comment_title') }}</h3>
</div> <blockquote class="chill-user-quote">
</template> {{ parent.comment }}
</blockquote>
</div>
</template>
<template v-slot:body v-else-if="type === 'thirdparty'"> <template
<on-the-fly-thirdparty #body
:id="id" v-else-if="parent"
:type="type" >
:action="action" <on-the-fly-thirdparty
ref="castThirdparty"> :parent="parent"
</on-the-fly-thirdparty> :action="action"
<div v-if="hasResourceComment"> type="thirdparty"
<h3>{{ $t('onthefly.resource_comment_title') }}</h3> ref="castThirdparty"
<blockquote class="chill-user-quote"> />
{{ parent.comment }} </template>
</blockquote>
</div>
</template>
<template v-slot:body v-else-if="parent"> <template
<on-the-fly-thirdparty #body
:parent="parent" v-else
:action="action" >
type="thirdparty" <on-the-fly-create
ref="castThirdparty"> :action="action"
</on-the-fly-thirdparty> :allowed-types="allowedTypes"
</template> :query="query"
ref="castNew"
<template v-slot:body v-else> />
<on-the-fly-create </template>
:action="action"
:allowedTypes="allowedTypes"
:query="query"
ref="castNew">
</on-the-fly-create>
</template>
<template v-slot:footer>
<a v-if="action === 'show'"
:href="buildLocation(id, type)"
:title="$t(titleMessage)"
class="btn btn-show">{{ $t(buttonMessage) }}
</a>
<a v-else
class="btn btn-save"
@click="saveAction">
{{ $t('action.save')}}
</a>
</template>
</modal>
</teleport>
<template #footer>
<a
v-if="action === 'show'"
:href="buildLocation(id, type)"
:title="$t(titleMessage)"
class="btn btn-show"
>{{ $t(buttonMessage) }}
</a>
<a
v-else
class="btn btn-save"
@click="saveAction"
>
{{ $t('action.save') }}
</a>
</template>
</modal>
</teleport>
</template> </template>
<script> <script>

View File

@ -1,25 +1,37 @@
<template> <template>
<ul :class="listClasses" v-if="picked.length && displayPicked"> <ul
<li v-for="p in picked" @click="removeEntity(p)" :key="p.type+p.id"> :class="listClasses"
<span class="chill_denomination">{{ p.text }}</span> v-if="picked.length && displayPicked"
</li> >
</ul> <li
<ul class="record_actions"> v-for="p in picked"
<li class="add-persons"> @click="removeEntity(p)"
<add-persons :key="p.type+p.id"
:options="addPersonsOptions" >
:key="uniqid" <span class="chill_denomination">{{ p.text }}</span>
:buttonTitle="translatedListOfTypes" </li>
:modalTitle="translatedListOfTypes" </ul>
ref="addPersons" <ul class="record_actions">
@addNewPersons="addNewEntity" <li class="add-persons">
> <add-persons
</add-persons> :options="addPersonsOptions"
</li> :key="uniqid"
</ul> :button-title="translatedListOfTypes"
<ul class="list-suggest add-items inline"> :modal-title="translatedListOfTypes"
<li v-for="s in suggested" :key="s.id" @click="addNewSuggested(s)"><span>{{ s.text }}</span></li> ref="addPersons"
</ul> @add-new-persons="addNewEntity"
/>
</li>
</ul>
<ul class="list-suggest add-items inline">
<li
v-for="s in suggested"
:key="s.id"
@click="addNewSuggested(s)"
>
<span>{{ s.text }}</span>
</li>
</ul>
</template> </template>
<script> <script>

View File

@ -1,26 +1,27 @@
<template> <template>
<div class="PickPostalCode"> <div class="PickPostalCode">
<vue-multiselect <vue-multiselect
id="citySelector" id="citySelector"
@search-change="listenInputSearch" @search-change="listenInputSearch"
ref="citySelector" ref="citySelector"
v-model="internalPicked" v-model="internalPicked"
@select="selectCity" @select="selectCity"
@remove="remove" @remove="remove"
name="" name=""
track-by="id" track-by="id"
label="value" label="value"
:custom-label="transName" :custom-label="transName"
:placeholder="$t('select_city')" :placeholder="$t('select_city')"
:select-label="$t('multiselect.select_label')" :select-label="$t('multiselect.select_label')"
:deselect-label="$t('multiselect.deselect_label')" :deselect-label="$t('multiselect.deselect_label')"
:selected-label="$t('multiselect.selected_label')" :selected-label="$t('multiselect.selected_label')"
:taggable="true" :taggable="true"
:multiple="false" :multiple="false"
:internal-search="false" :internal-search="false"
:loading="isLoading" :loading="isLoading"
:options="cities"></vue-multiselect> :options="cities"
</div> />
</div>
</template> </template>
<script lang="js"> <script lang="js">

View File

@ -1,34 +1,52 @@
<template> <template>
<span
v-if="entity.type === 'person'"
class="badge rounded-pill bg-person"
>
{{ $t('person') }}
</span>
<span v-if="entity.type === 'person'" class="badge rounded-pill bg-person"> <span
{{ $t('person') }} v-if="entity.type === 'thirdparty'"
</span> class="badge rounded-pill bg-thirdparty"
>
<template v-if="options.displayLong !== true">
{{ $t('thirdparty.thirdparty') }}
</template>
<span v-if="entity.type === 'thirdparty'" class="badge rounded-pill bg-thirdparty"> <i
<template v-if="options.displayLong !== true"> class="fa fa-fw fa-user"
{{ $t('thirdparty.thirdparty')}} v-if="entity.kind === 'child'"
</template> />
<i
class="fa fa-fw fa-hospital-o"
v-else-if="entity.kind === 'company'"
/>
<i
class="fa fa-fw fa-user-md"
v-else
/>
<i class="fa fa-fw fa-user" v-if="entity.kind === 'child'"></i> <template v-if="options.displayLong === true">
<i class="fa fa-fw fa-hospital-o" v-else-if="entity.kind === 'company'"></i> <span v-if="entity.kind === 'child'">{{ $t('thirdparty.child') }}</span>
<i class="fa fa-fw fa-user-md" v-else></i> <span v-else-if="entity.kind === 'company'">{{ $t('thirdparty.company') }}</span>
<span v-else>{{ $t('thirdparty.contact') }}</span>
<template v-if="options.displayLong === true"> </template>
<span v-if="entity.kind === 'child'">{{ $t('thirdparty.child')}}</span> </span>
<span v-else-if="entity.kind === 'company'">{{ $t('thirdparty.company')}}</span>
<span v-else>{{ $t('thirdparty.contact')}}</span>
</template>
</span>
<span v-if="entity.type === 'user'" class="badge rounded-pill bg-user">
{{ $t('user')}}
</span>
<span v-if="entity.type === 'household'" class="badge rounded-pill bg-user">
{{ $t('household')}}
</span>
<span
v-if="entity.type === 'user'"
class="badge rounded-pill bg-user"
>
{{ $t('user') }}
</span>
<span
v-if="entity.type === 'household'"
class="badge rounded-pill bg-user"
>
{{ $t('household') }}
</span>
</template> </template>
<script> <script>

View File

@ -1,12 +1,17 @@
<template> <template>
<div class="confidential"> <div class="confidential">
<div :class="{ 'blur': isBlurred }"> <div :class="{ 'blur': isBlurred }">
<slot name="confidential-content"></slot> <slot name="confidential-content" />
</div>
<div class="toggle-container">
<i class="fa toggle" :class="toggleIcon" aria-hidden="true" @click="toggleBlur"></i>
</div>
</div> </div>
<div class="toggle-container">
<i
class="fa toggle"
:class="toggleIcon"
aria-hidden="true"
@click="toggleBlur"
/>
</div>
</div>
</template> </template>
<script> <script>

View File

@ -1,67 +1,101 @@
<template> <template>
<component
<component :is="component" class="chill-entity entity-address"> :is="component"
class="chill-entity entity-address"
<component :is="component" class="address" :class="multiline"> >
<component
<div v-if="isConfidential"> :is="component"
<confidential :positionBtnFar="true"> class="address"
<template v-slot:confidential-content> :class="multiline"
<div v-if="isMultiline === true"> >
<p v-for="(l, i) in address.lines" :key="`line-${i}`"> <div v-if="isConfidential">
{{ l }} <confidential :position-btn-far="true">
</p> <template #confidential-content>
<p v-if="showButtonDetails"><address-details-button :address_id="address.address_id" :address_ref_status="address.refStatus"></address-details-button></p>
</div>
<div v-else>
<p v-if="'' !== address.text"
class="street">
{{ address.text }}
</p>
<p v-if="null !== address.postcode"
class="postcode">
{{ address.postcode.code }} {{ address.postcode.name }}
</p>
<p v-if="null !== address.country"
class="country">
{{ address.country.name.fr }}
</p>
</div>
</template>
</confidential>
</div>
<div v-if="!isConfidential">
<div v-if="isMultiline === true"> <div v-if="isMultiline === true">
<p v-for="(l, i) in address.lines" :key="`line-${i}`"> <p
{{ l }} v-for="(l, i) in address.lines"
</p> :key="`line-${i}`"
<p v-if="showButtonDetails"><address-details-button :address_id="address.address_id" :address_ref_status="address.refStatus"></address-details-button></p> >
{{ l }}
</p>
<p v-if="showButtonDetails">
<address-details-button
:address_id="address.address_id"
:address_ref_status="address.refStatus"
/>
</p>
</div> </div>
<div v-else> <div v-else>
<p v-if="address.text" <p
class="street"> v-if="'' !== address.text"
{{ address.text }} <template v-if="showButtonDetails"><address-details-button :address_id="address.address_id" :address_ref_status="address.refStatus"></address-details-button></template> class="street"
</p> >
{{ address.text }}
</p>
<p
v-if="null !== address.postcode"
class="postcode"
>
{{ address.postcode.code }} {{ address.postcode.name }}
</p>
<p
v-if="null !== address.country"
class="country"
>
{{ address.country.name.fr }}
</p>
</div> </div>
</div> </template>
</confidential>
</component>
<div v-if="useDatePane === true" class="address-more">
<div v-if="address.validFrom">
<span class="validFrom">
<b>{{ $t('validFrom') }}</b>: {{ $d(address.validFrom.date) }}
</span>
</div>
<div v-if="address.validTo">
<span class="validTo">
<b>{{ $t('validTo') }}</b>: {{ $d(address.validTo.date) }}
</span>
</div>
</div> </div>
</component> <div v-if="!isConfidential">
<div v-if="isMultiline === true">
<p
v-for="(l, i) in address.lines"
:key="`line-${i}`"
>
{{ l }}
</p>
<p v-if="showButtonDetails">
<address-details-button
:address_id="address.address_id"
:address_ref_status="address.refStatus"
/>
</p>
</div>
<div v-else>
<p
v-if="address.text"
class="street"
>
{{ address.text }} <template v-if="showButtonDetails">
<address-details-button
:address_id="address.address_id"
:address_ref_status="address.refStatus"
/>
</template>
</p>
</div>
</div>
</component>
<div
v-if="useDatePane === true"
class="address-more"
>
<div v-if="address.validFrom">
<span class="validFrom">
<b>{{ $t('validFrom') }}</b>: {{ $d(address.validFrom.date) }}
</span>
</div>
<div v-if="address.validTo">
<span class="validTo">
<b>{{ $t('validTo') }}</b>: {{ $d(address.validTo.date) }}
</span>
</div>
</div>
</component>
</template> </template>
<script> <script>

View File

@ -1,5 +1,5 @@
<template> <template>
<i :class="gender.icon"></i> <i :class="gender.icon" />
</template> </template>
<script setup> <script setup>

View File

@ -1,8 +1,18 @@
<template> <template>
<span class="chill-entity entity-user"> <span class="chill-entity entity-user">
{{ user.label }} {{ user.label }}
<span class="user-job" v-if="user.user_job !== null">({{ user.user_job.label.fr }})</span> <span class="main-scope" v-if="user.main_scope !== null">({{ user.main_scope.name.fr }})</span> <span v-if="user.isAbsent" class="badge bg-danger rounded-pill" :title="Absent">A</span> <span
</span> class="user-job"
v-if="user.user_job !== null"
>({{ user.user_job.label.fr }})</span> <span
class="main-scope"
v-if="user.main_scope !== null"
>({{ user.main_scope.name.fr }})</span> <span
v-if="user.isAbsent"
class="badge bg-danger rounded-pill"
:title="Absent"
>A</span>
</span>
</template> </template>
<script> <script>

View File

@ -1,22 +1,42 @@
<template> <template>
<div class="d-grid gap-2 my-3"> <div class="d-grid gap-2 my-3">
<button class="btn btn-misc" type="button" v-if="!subscriberFinal" @click="subscribeTo('subscribe', 'final')"> <button
<i class="fa fa-check fa-fw"></i> class="btn btn-misc"
{{ $t('subscribe_final') }} type="button"
</button> v-if="!subscriberFinal"
<button class="btn btn-misc" type="button" v-if="subscriberFinal" @click="subscribeTo('unsubscribe', 'final')"> @click="subscribeTo('subscribe', 'final')"
<i class="fa fa-times fa-fw"></i> >
{{ $t('unsubscribe_final') }} <i class="fa fa-check fa-fw" />
</button> {{ $t('subscribe_final') }}
<button class="btn btn-misc" type="button" v-if="!subscriberStep" @click="subscribeTo('subscribe', 'step')"> </button>
<i class="fa fa-check fa-fw"></i> <button
{{ $t('subscribe_all_steps') }} class="btn btn-misc"
</button> type="button"
<button class="btn btn-misc" type="button" v-if="subscriberStep" @click="subscribeTo('unsubscribe', 'step')"> v-if="subscriberFinal"
<i class="fa fa-times fa-fw"></i> @click="subscribeTo('unsubscribe', 'final')"
{{ $t('unsubscribe_all_steps') }} >
</button> <i class="fa fa-times fa-fw" />
</div> {{ $t('unsubscribe_final') }}
</button>
<button
class="btn btn-misc"
type="button"
v-if="!subscriberStep"
@click="subscribeTo('subscribe', 'step')"
>
<i class="fa fa-check fa-fw" />
{{ $t('subscribe_all_steps') }}
</button>
<button
class="btn btn-misc"
type="button"
v-if="subscriberStep"
@click="subscribeTo('unsubscribe', 'step')"
>
<i class="fa fa-times fa-fw" />
{{ $t('unsubscribe_all_steps') }}
</button>
</div>
</template> </template>
<script> <script>

View File

@ -1,67 +1,82 @@
<template> <template>
<div class="flex-table workflow" id="workflow-list"> <div
<div v-for="(w, i) in workflows" :key="`workflow-${i}`" class="flex-table workflow"
class="item-bloc"> id="workflow-list"
>
<div> <div
<div class="item-row col"> v-for="(w, i) in workflows"
<h2>{{ w.title }}</h2> :key="`workflow-${i}`"
<div class="flex-grow-1 ms-3 h3"> class="item-bloc"
<div class="visually-hidden"> >
{{ w.relatedEntityClass }} <div>
{{ w.relatedEntityId }} <div class="item-row col">
</div> <h2>{{ w.title }}</h2>
</div> <div class="flex-grow-1 ms-3 h3">
<div class="visually-hidden">
{{ w.relatedEntityClass }}
{{ w.relatedEntityId }}
</div> </div>
</div>
</div>
<div class="breadcrumb"> <div class="breadcrumb">
<template v-for="(step, j) in w.steps" :key="`step-${j}`"> <template
<span class="mx-2" v-for="(step, j) in w.steps"
tabindex="0" :key="`step-${j}`"
data-bs-trigger="focus hover" >
data-bs-toggle="popover" <span
data-bs-placement="bottom" class="mx-2"
data-bs-custom-class="workflow-transition" tabindex="0"
:title="getPopTitle(step)" data-bs-trigger="focus hover"
:data-bs-content="getPopContent(step)"> data-bs-toggle="popover"
data-bs-placement="bottom"
<i v-if="step.currentStep.name === 'initial'" data-bs-custom-class="workflow-transition"
class="fa fa-circle me-1 text-chill-yellow"> :title="getPopTitle(step)"
</i> :data-bs-content="getPopContent(step)"
<i v-if="step.isFreezed" >
class="fa fa-snowflake-o fa-sm me-1">
</i>
{{ step.currentStep.text }}
</span>
<span v-if="j !== Object.keys(w.steps).length - 1">
</span>
</template>
</div>
</div>
<div class="item-row">
<div class="item-col flex-grow-1">
<p v-if="isUserSubscribedToStep(w)">
<i class="fa fa-check fa-fw"></i>
{{ $t('you_subscribed_to_all_steps') }}
</p>
<p v-if="isUserSubscribedToFinal(w)">
<i class="fa fa-check fa-fw"></i>
{{ $t('you_subscribed_to_final_step') }}
</p>
</div>
<div class="item-col">
<ul class="record_actions">
<li>
<a :href="goToUrl(w)" class="btn btn-sm btn-show" :title="$t('action.show')"></a>
</li>
</ul>
</div>
</div>
<i
v-if="step.currentStep.name === 'initial'"
class="fa fa-circle me-1 text-chill-yellow"
/>
<i
v-if="step.isFreezed"
class="fa fa-snowflake-o fa-sm me-1"
/>
{{ step.currentStep.text }}
</span>
<span v-if="j !== Object.keys(w.steps).length - 1">
</span>
</template>
</div>
</div> </div>
</div>
<div class="item-row">
<div class="item-col flex-grow-1">
<p v-if="isUserSubscribedToStep(w)">
<i class="fa fa-check fa-fw" />
{{ $t('you_subscribed_to_all_steps') }}
</p>
<p v-if="isUserSubscribedToFinal(w)">
<i class="fa fa-check fa-fw" />
{{ $t('you_subscribed_to_final_step') }}
</p>
</div>
<div class="item-col">
<ul class="record_actions">
<li>
<a
:href="goToUrl(w)"
class="btn btn-sm btn-show"
:title="$t('action.show')"
/>
</li>
</ul>
</div>
</div>
</div>
</div>
</template> </template>
<script> <script>

View File

@ -1,50 +1,59 @@
<template> <template>
<button
v-if="hasWorkflow"
class="btn btn-primary"
@click="openModal"
>
<b>{{ countWorkflows }}</b>
<template v-if="countWorkflows > 1">
{{ $t('workflows') }}
</template>
<template v-else>
{{ $t('workflow') }}
</template>
</button>
<button v-if="hasWorkflow" <pick-workflow
class="btn btn-primary" v-else-if="allowCreate"
@click="openModal"> :related-entity-class="this.relatedEntityClass"
<b>{{ countWorkflows }}</b> :related-entity-id="this.relatedEntityId"
<template v-if="countWorkflows > 1">{{ $t('workflows') }}</template> :workflows-availables="workflowsAvailables"
<template v-else>{{ $t('workflow') }}</template> :prevent-default-move-to-generate="this.$props.preventDefaultMoveToGenerate"
</button> :go-to-generate-workflow-payload="this.goToGenerateWorkflowPayload"
@go-to-generate-workflow="goToGenerateWorkflow"
/>
<pick-workflow v-else-if="allowCreate" <teleport to="body">
:relatedEntityClass="this.relatedEntityClass" <modal
:relatedEntityId="this.relatedEntityId" v-if="modal.showModal"
:workflowsAvailables="workflowsAvailables" :modal-dialog-class="modal.modalDialogClass"
:preventDefaultMoveToGenerate="this.$props.preventDefaultMoveToGenerate" @close="modal.showModal = false"
:goToGenerateWorkflowPayload="this.goToGenerateWorkflowPayload" >
@go-to-generate-workflow="goToGenerateWorkflow" <template #header>
></pick-workflow> <h2 class="modal-title">
{{ $t('workflow_list') }}
</h2>
</template>
<teleport to="body"> <template #body>
<modal v-if="modal.showModal" <list-workflow-vue
:modalDialogClass="modal.modalDialogClass" :workflows="workflows"
@close="modal.showModal = false"> />
</template>
<template v-slot:header> <template #footer>
<h2 class="modal-title">{{ $t('workflow_list') }}</h2> <pick-workflow
</template> v-if="allowCreate"
:related-entity-class="this.relatedEntityClass"
<template v-slot:body> :related-entity-id="this.relatedEntityId"
<list-workflow-vue :workflows-availables="workflowsAvailables"
:workflows="workflows" :prevent-default-move-to-generate="this.$props.preventDefaultMoveToGenerate"
></list-workflow-vue> :go-to-generate-workflow-payload="this.goToGenerateWorkflowPayload"
</template> @go-to-generate-workflow="this.goToGenerateWorkflow"
/>
<template v-slot:footer> </template>
<pick-workflow v-if="allowCreate" </modal>
:relatedEntityClass="this.relatedEntityClass" </teleport>
:relatedEntityId="this.relatedEntityId"
:workflowsAvailables="workflowsAvailables"
:preventDefaultMoveToGenerate="this.$props.preventDefaultMoveToGenerate"
:goToGenerateWorkflowPayload="this.goToGenerateWorkflowPayload"
@go-to-generate-workflow="this.goToGenerateWorkflow"
></pick-workflow>
</template>
</modal>
</teleport>
</template> </template>
<script> <script>

View File

@ -1,16 +1,32 @@
<template> <template>
<template v-if="workflowsAvailables.length >= 1"> <template v-if="workflowsAvailables.length >= 1">
<div class="dropdown d-grid gap-2"> <div class="dropdown d-grid gap-2">
<button class="btn btn-primary dropdown-toggle" type="button" id="createWorkflowButton" data-bs-toggle="dropdown" aria-expanded="false"> <button
Créer un workflow class="btn btn-primary dropdown-toggle"
</button> type="button"
<ul class="dropdown-menu" aria-labelledby="createWorkflowButton"> id="createWorkflowButton"
<li v-for="w in workflowsAvailables" :key="w.name"> data-bs-toggle="dropdown"
<a class="dropdown-item" :href="makeLink(w.name)" @click.prevent="goToGenerateWorkflow($event, w.name)">{{ w.text }}</a> aria-expanded="false"
</li> >
</ul> Créer un workflow
</div> </button>
</template> <ul
class="dropdown-menu"
aria-labelledby="createWorkflowButton"
>
<li
v-for="w in workflowsAvailables"
:key="w.name"
>
<a
class="dropdown-item"
:href="makeLink(w.name)"
@click.prevent="goToGenerateWorkflow($event, w.name)"
>{{ w.text }}</a>
</li>
</ul>
</div>
</template>
</template> </template>
<script> <script>

View File

@ -1,31 +1,54 @@
<template> <template>
<transition name="modal"> <transition name="modal">
<div class="modal-mask"> <div class="modal-mask">
<!-- :: styles bootstrap :: --> <!-- :: styles bootstrap :: -->
<div class="modal fade show" style="display: block" aria-modal="true" role="dialog"> <div
<div class="modal-dialog" :class="modalDialogClass"> class="modal fade show"
<div class="modal-content"> style="display: block"
<div class="modal-header"> aria-modal="true"
<slot name="header"></slot> role="dialog"
<button class="close btn" @click="$emit('close')"> >
<i class="fa fa-times" aria-hidden="true"></i></button> <div
</div> class="modal-dialog"
<div class="modal-body"> :class="modalDialogClass"
<div class="body-head"> >
<slot name="body-head"></slot> <div class="modal-content">
</div> <div class="modal-header">
<slot name="body"></slot> <slot name="header" />
</div> <button
<div class="modal-footer" v-if="!hideFooter"> class="close btn"
<button class="btn btn-cancel" @click="$emit('close')">{{ $t('action.close') }}</button> @click="$emit('close')"
<slot name="footer"></slot> >
<i
class="fa fa-times"
aria-hidden="true"
/>
</button>
</div>
<div class="modal-body">
<div class="body-head">
<slot name="body-head" />
</div> </div>
<slot name="body" />
</div>
<div
class="modal-footer"
v-if="!hideFooter"
>
<button
class="btn btn-cancel"
@click="$emit('close')"
>
{{ $t('action.close') }}
</button>
<slot name="footer" />
</div> </div>
</div> </div>
</div> </div>
<!-- :: end styles bootstrap :: -->
</div> </div>
</transition> <!-- :: end styles bootstrap :: -->
</div>
</transition>
</template> </template>
<script lang="ts"> <script lang="ts">

View File

@ -1,62 +1,71 @@
<template> <template>
<div <div
:class="{ 'btn-group btn-group-sm float-end': isButtonGroup }" :class="{ 'btn-group btn-group-sm float-end': isButtonGroup }"
role="group" role="group"
aria-label="Notification actions" aria-label="Notification actions"
>
<button
v-if="isRead"
class="btn"
:class="overrideClass"
type="button"
:title="$t('markAsUnread')"
@click="markAsUnread"
> >
<button <i class="fa fa-sm fa-envelope-o" />
v-if="isRead" <span
class="btn" v-if="!buttonNoText"
:class="overrideClass" class="ps-2"
type="button" >
:title="$t('markAsUnread')" {{ $t("markAsUnread") }}
@click="markAsUnread" </span>
> </button>
<i class="fa fa-sm fa-envelope-o"></i>
<span v-if="!buttonNoText" class="ps-2">
{{ $t("markAsUnread") }}
</span>
</button>
<button <button
v-if="!isRead" v-if="!isRead"
class="btn" class="btn"
:class="overrideClass" :class="overrideClass"
type="button" type="button"
:title="$t('markAsRead')" :title="$t('markAsRead')"
@click="markAsRead" @click="markAsRead"
> >
<i class="fa fa-sm fa-envelope-open-o"></i> <i class="fa fa-sm fa-envelope-open-o" />
<span v-if="!buttonNoText" class="ps-2"> <span
{{ $t("markAsRead") }} v-if="!buttonNoText"
</span> class="ps-2"
</button> >
{{ $t("markAsRead") }}
</span>
</button>
<a <a
v-if="isButtonGroup" v-if="isButtonGroup"
type="button" type="button"
class="btn btn-outline-primary" class="btn btn-outline-primary"
:href="showUrl" :href="showUrl"
:title="$t('action.show')" :title="$t('action.show')"
> >
<i class="fa fa-sm fa-comment-o"></i> <i class="fa fa-sm fa-comment-o" />
</a> </a>
<!-- "Mark All Read" button --> <!-- "Mark All Read" button -->
<button <button
v-if="showMarkAllButton" v-if="showMarkAllButton"
class="btn" class="btn"
:class="overrideClass" :class="overrideClass"
type="button" type="button"
:title="$t('markAllRead')" :title="$t('markAllRead')"
@click="markAllRead" @click="markAllRead"
> >
<i class="fa fa-sm fa-envelope-o"></i> <i class="fa fa-sm fa-envelope-o" />
<span v-if="!buttonNoText" class="ps-2"> <span
{{ $t("markAllRead") }} v-if="!buttonNoText"
</span> class="ps-2"
</button> >
</div> {{ $t("markAllRead") }}
</span>
</button>
</div>
</template> </template>
<script> <script>

View File

@ -1,64 +1,86 @@
<template> <template>
<a v-if="isOpenDocument" <a
class="btn" :class="[ v-if="isOpenDocument"
isChangeIcon ? 'change-icon' : '', class="btn"
isChangeClass ? options.changeClass : 'btn-wopilink' ]" :class="[
@click="openModal"> isChangeIcon ? 'change-icon' : '',
isChangeClass ? options.changeClass : 'btn-wopilink' ]"
@click="openModal"
>
<i v-if="isChangeIcon" class="fa me-2" :class="options.changeIcon"></i> <i
v-if="isChangeIcon"
class="fa me-2"
:class="options.changeIcon"
/>
<span v-if="!noText"> <span v-if="!noText">
{{ $t('online_edit_document') }} {{ $t('online_edit_document') }}
</span> </span>
</a> </a>
<teleport to="body"> <teleport to="body">
<div class="wopi-frame" v-if="isOpenDocument"> <div
<modal v-if="modal.showModal" class="wopi-frame"
:modalDialogClass="modal.modalDialogClass" v-if="isOpenDocument"
:hideFooter=true >
@close="modal.showModal = false"> <modal
v-if="modal.showModal"
<template v-slot:header> :modal-dialog-class="modal.modalDialogClass"
<img class="logo" :src="logo" height="45"/> :hide-footer="true"
<span class="ms-auto me-3"> @close="modal.showModal = false"
<span v-if="options.title">{{ options.title }}</span> >
</span> <template #header>
<!-- <img
class="logo"
:src="logo"
height="45"
>
<span class="ms-auto me-3">
<span v-if="options.title">{{ options.title }}</span>
</span>
<!--
<a class="btn btn-outline-light"> <a class="btn btn-outline-light">
<i class="fa fa-save fa-fw"></i> <i class="fa fa-save fa-fw"></i>
{{ $t('save_and_quit') }} {{ $t('save_and_quit') }}
</a> </a>
--> -->
</template> </template>
<template v-slot:body> <template #body>
<div v-if="loading" class="loading"> <div
<i class="fa fa-circle-o-notch fa-spin fa-3x" :title="$t('loading')"></i> v-if="loading"
</div> class="loading"
<iframe >
:src="this.wopiUrl" <i
@load="loaded" class="fa fa-circle-o-notch fa-spin fa-3x"
></iframe> :title="$t('loading')"
</template> />
</div>
</modal> <iframe
</div> :src="this.wopiUrl"
<div v-else> @load="loaded"
<modal v-if="modal.showModal" />
modalDialogClass="modal-sm" </template>
@close="modal.showModal = false"> </modal>
</div>
<template v-slot:header> <div v-else>
<h3>{{ $t('invalid_title') }}</h3> <modal
</template> v-if="modal.showModal"
<template v-slot:body> modal-dialog-class="modal-sm"
<div class="alert alert-warning">{{ $t('invalid_message') }}</div> @close="modal.showModal = false"
</template> >
<template #header>
</modal> <h3>{{ $t('invalid_title') }}</h3>
</div> </template>
</teleport> <template #body>
<div class="alert alert-warning">
{{ $t('invalid_message') }}
</div>
</template>
</modal>
</div>
</teleport>
</template> </template>
<script> <script>

View File

@ -1,24 +1,28 @@
<template> <template>
<banner></banner> <banner />
<sticky-nav></sticky-nav> <sticky-nav />
<h1 v-if="accompanyingCourse.step === 'DRAFT'">{{ $t('course.title.draft') }}</h1> <h1 v-if="accompanyingCourse.step === 'DRAFT'">
<h1 v-else>{{ $t('course.title.active') }}</h1> {{ $t('course.title.draft') }}
</h1>
<h1 v-else>
{{ $t('course.title.active') }}
</h1>
<persons-associated></persons-associated> <persons-associated />
<course-location></course-location> <course-location />
<origin-demand></origin-demand> <origin-demand />
<admin-location></admin-location> <admin-location />
<requestor v-bind:isAnonymous="accompanyingCourse.requestorAnonymous"></requestor> <requestor :is-anonymous="accompanyingCourse.requestorAnonymous" />
<social-issue></social-issue> <social-issue />
<scopes></scopes> <scopes />
<referrer></referrer> <referrer />
<resources></resources> <resources />
<start-date v-if="accompanyingCourse.step.startsWith('CONFIRMED')"></start-date> <start-date v-if="accompanyingCourse.step.startsWith('CONFIRMED')" />
<comment v-if="accompanyingCourse.step === 'DRAFT'"></comment> <comment v-if="accompanyingCourse.step === 'DRAFT'" />
<confirm v-if="accompanyingCourse.step === 'DRAFT'"></confirm> <confirm v-if="accompanyingCourse.step === 'DRAFT'" />
<!-- <div v-for="error in errorMsg" v-bind:key="error.id" class="vue-component errors alert alert-danger"> <!-- <div v-for="error in errorMsg" v-bind:key="error.id" class="vue-component errors alert alert-danger">
<p> <p>
<span>{{ error.sta }} {{ error.txt }}</span><br> <span>{{ error.sta }} {{ error.txt }}</span><br>
<span>{{ $t(error.msg) }}</span> <span>{{ $t(error.msg) }}</span>

View File

@ -1,35 +1,38 @@
<template> <template>
<div class="vue-component"> <div class="vue-component">
<h2><a id="section-40"></a>{{ $t('admin_location.title') }}</h2> <h2><a id="section-40" />{{ $t('admin_location.title') }}</h2>
<div class="mb-4"> <div class="mb-4">
<label for="selectAdminLocation"> <label for="selectAdminLocation">
{{ $t('admin_location.title') }} {{ $t('admin_location.title') }}
</label> </label>
<VueMultiselect <VueMultiselect
name="selectAdminLocation" name="selectAdminLocation"
label="text" label="text"
:custom-label="customLabel" :custom-label="customLabel"
track-by="id" track-by="id"
:multiple="false" :multiple="false"
:searchable="true" :searchable="true"
:placeholder="$t('admin_location.placeholder')" :placeholder="$t('admin_location.placeholder')"
v-model="value" v-model="value"
:options="options" :options="options"
group-values="locations" group-values="locations"
group-label="locationCategories" group-label="locationCategories"
:select-label="$t('multiselect.select_label')" :select-label="$t('multiselect.select_label')"
:deselect-label="$t('multiselect.deselect_label')" :deselect-label="$t('multiselect.deselect_label')"
:selected-label="$t('multiselect.selected_label')" :selected-label="$t('multiselect.selected_label')"
@select="updateAdminLocation"> @select="updateAdminLocation"
</VueMultiselect> />
</div> </div>
<div v-if="!isAdminLocationValid" class="alert alert-warning to-confirm"> <div
{{ $t('admin_location.not_valid') }} v-if="!isAdminLocationValid"
</div> class="alert alert-warning to-confirm"
</div> >
{{ $t('admin_location.not_valid') }}
</div>
</div>
</template> </template>
<script> <script>

View File

@ -1,73 +1,97 @@
<template> <template>
<teleport to="#header-accompanying_course-name #banner-flags">
<toggle-flags />
</teleport>
<teleport to="#header-accompanying_course-name #banner-flags"> <teleport to="#header-accompanying_course-name #banner-status">
<toggle-flags></toggle-flags> <span
</teleport> v-if="accompanyingCourse.step === 'DRAFT'"
class="text-md-end d-md-block"
<teleport to="#header-accompanying_course-name #banner-status"> >
<span v-if="accompanyingCourse.step === 'DRAFT'" <span class="badge bg-secondary">
class="text-md-end d-md-block"> {{ $t('course.step.draft') }}
<span class="badge bg-secondary">
{{ $t('course.step.draft') }}
</span>
</span> </span>
<span v-else-if="accompanyingCourse.step === 'CONFIRMED' || accompanyingCourse.step === 'CONFIRMED_INACTIVE_SHORT' || accompanyingCourse.step === 'CONFIRMED_INACTIVE_LONG'" class="text-md-end"> </span>
<span v-if="accompanyingCourse.step === 'CONFIRMED'" class="d-md-block mb-md-3"> <span
<span class="badge bg-primary"> v-else-if="accompanyingCourse.step === 'CONFIRMED' || accompanyingCourse.step === 'CONFIRMED_INACTIVE_SHORT' || accompanyingCourse.step === 'CONFIRMED_INACTIVE_LONG'"
{{ $t('course.step.active') }} class="text-md-end"
</span> >
</span> <span
<span v-else-if="accompanyingCourse.step === 'CONFIRMED_INACTIVE_SHORT'" class="d-md-block mb-md-3"> v-if="accompanyingCourse.step === 'CONFIRMED'"
<span class="badge bg-chill-yellow text-primary"> class="d-md-block mb-md-3"
{{ $t('course.step.inactive_short') }} >
</span> <span class="badge bg-primary">
</span> {{ $t('course.step.active') }}
<span v-else-if="accompanyingCourse.step === 'CONFIRMED_INACTIVE_LONG'" class="d-md-block mb-md-3"> </span>
<span class="badge bg-chill-pink"> </span>
{{ $t('course.step.inactive_long') }} <span
</span> v-else-if="accompanyingCourse.step === 'CONFIRMED_INACTIVE_SHORT'"
</span> class="d-md-block mb-md-3"
<span class="d-md-block"> >
<span class="d-md-block ms-3 ms-md-0"> <span class="badge bg-chill-yellow text-primary">
<i>{{ $t('course.open_at') }}{{ $d(accompanyingCourse.openingDate.datetime, 'text') }}</i> {{ $t('course.step.inactive_short') }}
</span> </span>
<span v-if="accompanyingCourse.user" class="d-md-block ms-3 ms-md-0"> </span>
<span class="item-key">{{ $t('course.referrer') }}:</span>&nbsp; <span
<b>{{ accompanyingCourse.user.text }}</b> v-else-if="accompanyingCourse.step === 'CONFIRMED_INACTIVE_LONG'"
<template v-if="accompanyingCourse.user.isAbsent"> class="d-md-block mb-md-3"
>
<span class="badge bg-chill-pink">
{{ $t('course.step.inactive_long') }}
</span>
</span>
<span class="d-md-block">
<span class="d-md-block ms-3 ms-md-0">
<i>{{ $t('course.open_at') }}{{ $d(accompanyingCourse.openingDate.datetime, 'text') }}</i>
</span>
<span
v-if="accompanyingCourse.user"
class="d-md-block ms-3 ms-md-0"
>
<span class="item-key">{{ $t('course.referrer') }}:</span>&nbsp;
<b>{{ accompanyingCourse.user.text }}</b>
<template v-if="accompanyingCourse.user.isAbsent">
&nbsp; &nbsp;
<span class="badge bg-danger rounded-pill" title="Absent">A</span> <span
</template> class="badge bg-danger rounded-pill"
</span> title="Absent"
</span> >A</span>
</template>
</span>
</span> </span>
<span v-else class="text-md-end d-md-block"> </span>
<span class="badge bg-danger"> <span
{{ $t('course.step.closed') }} v-else
</span> class="text-md-end d-md-block"
<span class="d-md-block"> >
<span class="d-md-block ms-3 ms-md-0"> <span class="badge bg-danger">
<i>{{ $d(accompanyingCourse.openingDate.datetime, 'text') }} - {{ $d(accompanyingCourse.closingDate.datetime, 'text') }}</i> {{ $t('course.step.closed') }}
</span>
<span v-if="accompanyingCourse.user" class="d-md-block ms-3 ms-md-0">
<span class="item-key">{{ $t('course.referrer') }}:</span> <b>{{ accompanyingCourse.user.text }}</b>
</span>
</span>
</span> </span>
</teleport> <span class="d-md-block">
<span class="d-md-block ms-3 ms-md-0">
<i>{{ $d(accompanyingCourse.openingDate.datetime, 'text') }} - {{ $d(accompanyingCourse.closingDate.datetime, 'text') }}</i>
</span>
<span
v-if="accompanyingCourse.user"
class="d-md-block ms-3 ms-md-0"
>
<span class="item-key">{{ $t('course.referrer') }}:</span> <b>{{ accompanyingCourse.user.text }}</b>
</span>
</span>
</span>
</teleport>
<teleport to="#header-accompanying_course-details #banner-social-issues"> <teleport to="#header-accompanying_course-details #banner-social-issues">
<social-issue <social-issue
v-for="issue in accompanyingCourse.socialIssues" v-for="issue in accompanyingCourse.socialIssues"
v-bind:key="issue.id" :key="issue.id"
v-bind:issue="issue"> :issue="issue"
</social-issue> />
</teleport> </teleport>
<teleport to="#header-accompanying_course-details #banner-persons-associated">
<persons-associated :accompanyingCourse="accompanyingCourse"></persons-associated>
</teleport>
<teleport to="#header-accompanying_course-details #banner-persons-associated">
<persons-associated :accompanying-course="accompanyingCourse" />
</teleport>
</template> </template>
<script> <script>

View File

@ -1,12 +1,32 @@
<template> <template>
<span v-for="h in personsByHousehold()" :class="{ 'household': householdExists(h.id), 'no-household': !householdExists(h.id) }" :key="h.id"> <span
<a v-if="householdExists(h.id)" :href="householdLink(h.id)"> v-for="h in personsByHousehold()"
<i class="fa fa-home fa-fw text-light" :title="$t('persons_associated.show_household_number', { id: h.id })"></i> :class="{ 'household': householdExists(h.id), 'no-household': !householdExists(h.id) }"
</a> :key="h.id"
<span v-for="person in h.persons" class="me-1" :key="person.id"> >
<on-the-fly :type="person.type" :id="person.id" :buttonText="person.textAge" :displayBadge="'true' === 'true'" action="show"></on-the-fly> <a
</span> v-if="householdExists(h.id)"
</span> :href="householdLink(h.id)"
>
<i
class="fa fa-home fa-fw text-light"
:title="$t('persons_associated.show_household_number', { id: h.id })"
/>
</a>
<span
v-for="person in h.persons"
class="me-1"
:key="person.id"
>
<on-the-fly
:type="person.type"
:id="person.id"
:button-text="person.textAge"
:display-badge="'true' === 'true'"
action="show"
/>
</span>
</span>
</template> </template>
<script> <script>

View File

@ -1,22 +1,36 @@
<template> <template>
<div class="text-md-end"> <div class="text-md-end">
<span class="d-block d-sm-inline-block mb-md-2"> <span class="d-block d-sm-inline-block mb-md-2">
<a @click="toggleIntensity" class="flag-toggle"> <a
<span :class="{ 'on': !isRegular }">{{ $t('course.occasional') }}</span> @click="toggleIntensity"
<i class="fa" :class="{ 'fa-toggle-on': isRegular, 'fa-toggle-on fa-flip-horizontal': !isRegular }"></i> class="flag-toggle"
<span :class="{ 'on': isRegular }">{{ $t('course.regular') }}</span> >
</a> <span :class="{ 'on': !isRegular }">{{ $t('course.occasional') }}</span>
</span> <i
class="fa"
:class="{ 'fa-toggle-on': isRegular, 'fa-toggle-on fa-flip-horizontal': !isRegular }"
/>
<span :class="{ 'on': isRegular }">{{ $t('course.regular') }}</span>
</a>
</span>
<span class="d-block d-sm-inline-block ms-sm-3 ms-md-0"> <span class="d-block d-sm-inline-block ms-sm-3 ms-md-0">
<button class="badge rounded-pill me-1" :class="{ 'bg-danger': isEmergency, 'bg-secondary': !isEmergency }" @click="toggleEmergency"> <button
{{ $t('course.emergency') }} class="badge rounded-pill me-1"
</button> :class="{ 'bg-danger': isEmergency, 'bg-secondary': !isEmergency }"
<button class="badge rounded-pill" :class="{ 'bg-danger': isConfidential, 'bg-secondary': !isConfidential }" @click="toggleConfidential"> @click="toggleEmergency"
{{ $t('course.confidential') }} >
</button> {{ $t('course.emergency') }}
</span> </button>
</div> <button
class="badge rounded-pill"
:class="{ 'bg-danger': isConfidential, 'bg-secondary': !isConfidential }"
@click="toggleConfidential"
>
{{ $t('course.confidential') }}
</button>
</span>
</div>
</template> </template>
<script> <script>

View File

@ -1,28 +1,39 @@
<template> <template>
<li> <li>
<button class="btn btn-sm btn-secondary" <button
@click="modal.showModal = true" class="btn btn-sm btn-secondary"
:title="$t('courselocation.assign_course_address')"> @click="modal.showModal = true"
<i class="fa fa-map-marker"></i> :title="$t('courselocation.assign_course_address')"
</button> >
</li> <i class="fa fa-map-marker" />
</button>
</li>
<teleport to="body"> <teleport to="body">
<modal v-if="modal.showModal" :modalDialogClass="modal.modalDialogClass" @close="modal.showModal = false"> <modal
<template v-slot:header> v-if="modal.showModal"
<h2 class="modal-title">{{ $t('courselocation.sure') }}</h2> :modal-dialog-class="modal.modalDialogClass"
</template> @close="modal.showModal = false"
<template v-slot:body> >
<address-render-box :address="person.current_household_address"></address-render-box> <template #header>
<p>{{ $t('courselocation.sure_description') }}</p> <h2 class="modal-title">
</template> {{ $t('courselocation.sure') }}
<template v-slot:footer> </h2>
<button class="btn btn-danger" @click="assignAddress"> </template>
{{ $t('courselocation.ok') }} <template #body>
</button> <address-render-box :address="person.current_household_address" />
</template> <p>{{ $t('courselocation.sure_description') }}</p>
</modal> </template>
</teleport> <template #footer>
<button
class="btn btn-danger"
@click="assignAddress"
>
{{ $t('courselocation.ok') }}
</button>
</template>
</modal>
</teleport>
</template> </template>
<script> <script>

View File

@ -1,53 +1,62 @@
<template> <template>
<div class="vue-component"> <div class="vue-component">
<h2><a id="section-100"></a>{{ $t('comment.title') }}</h2> <h2><a id="section-100" />{{ $t('comment.title') }}</h2>
<!--div class="error flash_message" v-if="errors.length > 0"> <!--div class="error flash_message" v-if="errors.length > 0">
{{ errors[0] }} {{ errors[0] }}
TODO fix errors flashbag for app component TODO fix errors flashbag for app component
</div--> </div-->
<div> <div>
<form @submit.prevent="submitform"> <form @submit.prevent="submitform">
<label
class="col-form-label"
for="content"
>{{ $t('comment.label') }}</label>
<label class="col-form-label" for="content">{{ $t('comment.label') }}</label> <ckeditor
name="content"
:placeholder="$t('comment.content')"
:editor="editor"
v-model="content"
tag-name="textarea"
/>
<ckeditor <div class="sub-comment">
name="content" <div
:placeholder="$t('comment.content')" v-if="pinnedComment !== null && typeof pinnedComment.creator !== 'undefined'"
:editor="editor" class="metadata"
v-model="content" >
tag-name="textarea"> {{ $t('comment.created_by', [
</ckeditor> pinnedComment.creator.text,
$d(pinnedComment.updatedAt.datetime, 'long')
])
}}
</div>
<div class="loading">
<i
v-if="loading"
class="fa fa-circle-o-notch fa-spin"
:title="$t('loading')"
/>
</div>
</div>
<div class="sub-comment"> <div>
<div v-if="pinnedComment !== null && typeof pinnedComment.creator !== 'undefined'" class="metadata"> <ul class="record_actions">
{{ $t('comment.created_by', [ <li v-if="pinnedComment !== null">
pinnedComment.creator.text, <a
$d(pinnedComment.updatedAt.datetime, 'long') class="btn btn-delete"
]) @click="removeComment"
}} >
</div> {{ $t('action.delete') }}
<div class="loading"> </a>
<i v-if="loading" class="fa fa-circle-o-notch fa-spin" :title="$t('loading')"></i> </li>
</div> </ul>
</div> </div>
</form>
<div> </div>
<ul class="record_actions"> </div>
<li v-if="pinnedComment !== null">
<a class="btn btn-delete"
@click="removeComment">
{{ $t('action.delete') }}
</a>
</li>
</ul>
</div>
</form>
</div>
</div>
</template> </template>
<script> <script>

View File

@ -1,100 +1,133 @@
<template> <template>
<div class="vue-component"> <div class="vue-component">
<h2><a id="section-110"></a> <h2>
<a id="section-110" />
{{ $t('confirm.title') }} {{ $t('confirm.title') }}
</h2> </h2>
<div> <div>
<p v-html="$t('confirm.text_draft', [$t('course.step.draft')])"></p> <p v-html="$t('confirm.text_draft', [$t('course.step.draft')])" />
<div v-if="!isValidToBeConfirmed"> <div v-if="!isValidToBeConfirmed">
<div class="alert alert-warning"> <div class="alert alert-warning">
{{ $t('confirm.alert_validation') }} {{ $t('confirm.alert_validation') }}
<ul class="mt-2"> <ul class="mt-2">
<li v-for="k in validationKeys" :key=k> <li
{{ $t(notValidMessages[k].msg) }} v-for="k in validationKeys"
<a :href="notValidMessages[k].anchor"> :key="k"
<i class="fa fa-level-up fa-fw"></i> >
</a> {{ $t(notValidMessages[k].msg) }}
</li> <a :href="notValidMessages[k].anchor">
</ul> <i class="fa fa-level-up fa-fw" />
</div> </a>
<ul class="record_actions">
<li>
<button class="btn btn-save" disabled>
{{ $t('confirm.ok') }}
</button>
</li> </li>
<li> </ul>
<a class="btn btn-delete" :href="deleteLink"> </div>
{{ $t('confirm.delete') }} <ul class="record_actions">
</a> <li>
</li> <button
</ul> class="btn btn-save"
disabled
>
{{ $t('confirm.ok') }}
</button>
</li>
<li>
<a
class="btn btn-delete"
:href="deleteLink"
>
{{ $t('confirm.delete') }}
</a>
</li>
</ul>
</div> </div>
<div v-else> <div v-else>
<p v-html="$t('confirm.text_active', [$t('course.step.active')])"></p> <p v-html="$t('confirm.text_active', [$t('course.step.active')])" />
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<button <button
class="btn btn-save" class="btn btn-save"
@click="modal.showModal = true"> @click="modal.showModal = true"
{{ $t('confirm.ok') }} >
</button> {{ $t('confirm.ok') }}
</li>
<li>
<a class="btn btn-delete" :href="deleteLink">
{{ $t('confirm.delete') }}
</a>
</li>
</ul>
</div>
</div>
<teleport to="body">
<modal v-if="modal.showModal" :modalDialogClass="modal.modalDialogClass" @close="modal.showModal = false">
<template v-slot:header>
<h2 class="modal-title">{{ $t('confirm.sure') }}</h2>
</template>
<template v-slot:body>
<p>{{ $t('confirm.sure_description') }}</p>
<div v-if="accompanyingCourse.user === null">
<div v-if="usersSuggestedFilteredByJob.length === 0">
<p class="alert alert-warning">{{ $t('confirm.no_suggested_referrer') }}</p>
</div>
<div v-if="usersSuggestedFilteredByJob.length === 1" class="alert alert-info">
<p>{{ $t('confirm.one_suggested_referrer') }}:</p>
<ul class="list-suggest add-items inline">
<li>
<user-render-box-badge :user="usersSuggestedFilteredByJob[0]"></user-render-box-badge>
</li>
</ul>
<p>{{ $t('confirm.choose_suggested_referrer') }}</p>
<ul class="record_actions">
<li>
<button class="btn btn-save mr-5" @click="chooseSuggestedReferrer">
{{ $t('confirm.choose_button') }}
</button>
</li>
<li>
<button class="btn btn-secondary" @click="doNotChooseSuggestedReferrer">
{{ $t('confirm.do_not_choose_button') }}
</button>
</li>
</ul>
</div>
</div>
</template>
<template v-slot:footer>
<button class="btn btn-danger" :disabled="disableConfirm" @click="confirmCourse">
{{ $t('confirm.ok') }}
</button> </button>
</template> </li>
</modal> <li>
</teleport> <a
class="btn btn-delete"
:href="deleteLink"
>
{{ $t('confirm.delete') }}
</a>
</li>
</ul>
</div>
</div>
</div> <teleport to="body">
<modal
v-if="modal.showModal"
:modal-dialog-class="modal.modalDialogClass"
@close="modal.showModal = false"
>
<template #header>
<h2 class="modal-title">
{{ $t('confirm.sure') }}
</h2>
</template>
<template #body>
<p>{{ $t('confirm.sure_description') }}</p>
<div v-if="accompanyingCourse.user === null">
<div v-if="usersSuggestedFilteredByJob.length === 0">
<p class="alert alert-warning">
{{ $t('confirm.no_suggested_referrer') }}
</p>
</div>
<div
v-if="usersSuggestedFilteredByJob.length === 1"
class="alert alert-info"
>
<p>{{ $t('confirm.one_suggested_referrer') }}:</p>
<ul class="list-suggest add-items inline">
<li>
<user-render-box-badge :user="usersSuggestedFilteredByJob[0]" />
</li>
</ul>
<p>{{ $t('confirm.choose_suggested_referrer') }}</p>
<ul class="record_actions">
<li>
<button
class="btn btn-save mr-5"
@click="chooseSuggestedReferrer"
>
{{ $t('confirm.choose_button') }}
</button>
</li>
<li>
<button
class="btn btn-secondary"
@click="doNotChooseSuggestedReferrer"
>
{{ $t('confirm.do_not_choose_button') }}
</button>
</li>
</ul>
</div>
</div>
</template>
<template #footer>
<button
class="btn btn-danger"
:disabled="disableConfirm"
@click="confirmCourse"
>
{{ $t('confirm.ok') }}
</button>
</template>
</modal>
</teleport>
</div>
</template> </template>
<script> <script>

View File

@ -1,72 +1,91 @@
<template> <template>
<div class="vue-component"> <div class="vue-component">
<h2><a id="section-20"></a> <h2>
{{ $t('courselocation.title') }} <a id="section-20" />
</h2> {{ $t('courselocation.title') }}
</h2>
<div v-for="error in displayErrors" class="alert alert-danger my-2" :key="error"> <div
{{ error }} v-for="error in displayErrors"
</div> class="alert alert-danger my-2"
:key="error"
<div v-if="hasNoLocation"> >
<label class="chill-no-data-statement"> {{ error }}
{{ $t('courselocation.no_address') }} </div>
</label>
</div> <div v-if="hasNoLocation">
<label class="chill-no-data-statement">
<div class="flex-table" v-if="accompanyingCourse.location"> {{ $t('courselocation.no_address') }}
<div class="item-bloc"> </label>
<address-render-box </div>
:address="accompanyingCourse.location">
</address-render-box> <div
class="flex-table"
<div v-if="isPersonLocation" class="alert alert-secondary separator"> v-if="accompanyingCourse.location"
<label class="col-form-label"> >
{{ $t('courselocation.person_locator', [ accompanyingCourse.personLocation.text ]) }} <div class="item-bloc">
</label> <address-render-box
</div> :address="accompanyingCourse.location"
/>
<div v-if="isTemporaryAddress" class="alert alert-warning separator">
<p> <div
{{ $t('courselocation.temporary_address_must_be_changed') }} v-if="isPersonLocation"
<i class="fa fa-fw fa-map-marker"></i> class="alert alert-secondary separator"
</p> >
</div> <label class="col-form-label">
</div> {{ $t('courselocation.person_locator', [ accompanyingCourse.personLocation.text ]) }}
</div> </label>
</div>
<div v-if="hasNoPersonLocation" class="alert alert-danger no-person-location">
<i class="fa fa-warning fa-2x"></i> <div
<div> v-if="isTemporaryAddress"
<p> class="alert alert-warning separator"
{{ $t('courselocation.associate_at_least_one_person_with_one_household_with_address') }} >
<a href="#section-10"> <p>
<i class="fa fa-level-up fa-fw"></i> {{ $t('courselocation.temporary_address_must_be_changed') }}
</a> <i class="fa fa-fw fa-map-marker" />
</p> </p>
</div> </div>
</div> </div>
</div>
<div
v-if="hasNoPersonLocation"
class="alert alert-danger no-person-location"
>
<i class="fa fa-warning fa-2x" />
<div> <div>
<ul class="record_actions"> <p>
<li> {{ $t('courselocation.associate_at_least_one_person_with_one_household_with_address') }}
<add-address <a href="#section-10">
v-if="!isPersonLocation" <i class="fa fa-level-up fa-fw" />
:key="key" </a>
:context="context" </p>
:options="options"
:addressChangedCallback="submitTemporaryAddress"
ref="addAddress">
</add-address>
</li>
</ul>
</div> </div>
</div>
<div v-if="!isLocationValid" class="alert alert-warning to-confirm"> <div>
{{ $t('courselocation.not_valid') }} <ul class="record_actions">
</div> <li>
<add-address
v-if="!isPersonLocation"
:key="key"
:context="context"
:options="options"
:address-changed-callback="submitTemporaryAddress"
ref="addAddress"
/>
</li>
</ul>
</div>
</div> <div
v-if="!isLocationValid"
class="alert alert-warning to-confirm"
>
{{ $t('courselocation.not_valid') }}
</div>
</div>
</template> </template>
<script> <script>

View File

@ -1,33 +1,36 @@
<template> <template>
<div class="vue-component"> <div class="vue-component">
<h2><a id="section-30"></a>{{ $t('origin.title') }}</h2> <h2><a id="section-30" />{{ $t('origin.title') }}</h2>
<div class="mb-4"> <div class="mb-4">
<label for="selectOrigin"> <label for="selectOrigin">
{{ $t('origin.title') }} {{ $t('origin.title') }}
</label> </label>
<VueMultiselect <VueMultiselect
name="selectOrigin" name="selectOrigin"
label="text" label="text"
:custom-label="transText" :custom-label="transText"
track-by="id" track-by="id"
:multiple="false" :multiple="false"
:searchable="true" :searchable="true"
:placeholder="$t('origin.placeholder')" :placeholder="$t('origin.placeholder')"
v-model="value" v-model="value"
:options="options" :options="options"
:select-label="$t('multiselect.select_label')" :select-label="$t('multiselect.select_label')"
:deselect-label="$t('multiselect.deselect_label')" :deselect-label="$t('multiselect.deselect_label')"
:selected-label="$t('multiselect.selected_label')" :selected-label="$t('multiselect.selected_label')"
@select="updateOrigin"> @select="updateOrigin"
</VueMultiselect> />
</div> </div>
<div v-if="!isOriginValid" class="alert alert-warning to-confirm"> <div
{{ $t('origin.not_valid') }} v-if="!isOriginValid"
</div> class="alert alert-warning to-confirm"
</div> >
{{ $t('origin.not_valid') }}
</div>
</div>
</template> </template>
<script> <script>

View File

@ -1,78 +1,119 @@
<template> <template>
<div class="vue-component"> <div class="vue-component">
<h2><a id="section-10"></a>{{ $t('persons_associated.title')}}</h2> <h2><a id="section-10" />{{ $t('persons_associated.title') }}</h2>
<div v-if="currentParticipations.length > 0"> <div v-if="currentParticipations.length > 0">
<label class="col-form-label">{{ $tc('persons_associated.counter', counter) }}</label> <label class="col-form-label">{{ $tc('persons_associated.counter', counter) }}</label>
</div> </div>
<div v-else> <div v-else>
<label class="chill-no-data-statement">{{ $tc('persons_associated.counter', counter) }}</label> <label class="chill-no-data-statement">{{ $tc('persons_associated.counter', counter) }}</label>
</div> </div>
<div v-if="participationWithoutHousehold.length > 0" class="alert alert-warning no-household"> <div
<i class="fa fa-warning fa-2x"></i> v-if="participationWithoutHousehold.length > 0"
<form method="GET" action="/fr/person/household/members/editor"> class="alert alert-warning no-household"
<div class="float-button bottom"><div class="box"> >
<i class="fa fa-warning fa-2x" />
<form
method="GET"
action="/fr/person/household/members/editor"
>
<div class="float-button bottom">
<div class="box">
<div class="action"> <div class="action">
<button class="btn btn-update" type="submit">{{ $t('persons_associated.update_household') }}</button> <button
class="btn btn-update"
type="submit"
>
{{ $t('persons_associated.update_household') }}
</button>
</div> </div>
<p class="mb-3">{{ $t('persons_associated.person_without_household_warning') }}</p> <p class="mb-3">
<div class="form-check" v-for="p in participationWithoutHousehold" :key="p.id"> {{ $t('persons_associated.person_without_household_warning') }}
<input type="checkbox" </p>
class="form-check-input" <div
name="persons[]" class="form-check"
checked="checked" v-for="p in participationWithoutHousehold"
:id="p.person.id" :key="p.id"
:value="p.person.id" >
/> <input
<label class="form-check-label"> type="checkbox"
<person-text :person="p.person"></person-text> class="form-check-input"
</label> name="persons[]"
checked="checked"
:id="p.person.id"
:value="p.person.id"
>
<label class="form-check-label">
<person-text :person="p.person" />
</label>
</div> </div>
<input type="hidden" name="expand_suggestions" value="true"> <input
<input type="hidden" name="returnPath" :value="getReturnPath"> type="hidden"
<input type="hidden" name="accompanying_period_id" :value="courseId"> name="expand_suggestions"
</div></div> value="true"
>
<input
type="hidden"
name="returnPath"
:value="getReturnPath"
>
<input
type="hidden"
name="accompanying_period_id"
:value="courseId"
>
</div>
</div>
</form> </form>
</div> </div>
<div class="flex-table mb-3"> <div class="flex-table mb-3">
<participation-item <participation-item
v-for="participation in currentParticipations" v-for="participation in currentParticipations"
v-bind:participation="participation" :participation="participation"
v-bind:key="participation.id" :key="participation.id"
@remove="removeParticipation" @remove="removeParticipation"
@close="closeParticipation"> @close="closeParticipation"
</participation-item> />
</div> </div>
<div v-if="suggestedPersons.length > 0"> <div v-if="suggestedPersons.length > 0">
<ul class="list-suggest add-items inline"> <ul class="list-suggest add-items inline">
<li v-for="p in suggestedPersons" :key="p.id" @click="addSuggestedPerson(p)"> <li
<person-text :person="p"></person-text> v-for="p in suggestedPersons"
</li> :key="p.id"
@click="addSuggestedPerson(p)"
>
<person-text :person="p" />
</li>
</ul> </ul>
</div> </div>
<div> <div>
<ul class="record_actions"> <ul class="record_actions">
<li class="add-persons"> <li class="add-persons">
<add-persons <add-persons
buttonTitle="persons_associated.add_persons" button-title="persons_associated.add_persons"
modalTitle="add_persons.title" modal-title="add_persons.title"
v-bind:key="addPersons.key" :key="addPersons.key"
v-bind:options="addPersons.options" :options="addPersons.options"
@addNewPersons="addNewPersons" @add-new-persons="addNewPersons"
ref="addPersons"> <!-- to cast child method --> ref="addPersons"
</add-persons> >
</li> <!-- to cast child method -->
</add-persons>
</li>
</ul> </ul>
</div> </div>
<div v-if="!isParticipationValid" class="alert alert-warning to-confirm"> <div
v-if="!isParticipationValid"
class="alert alert-warning to-confirm"
>
{{ $t('persons_associated.participation_not_valid') }} {{ $t('persons_associated.participation_not_valid') }}
</div> </div>
</div> </div>
</template> </template>
<script> <script>

View File

@ -1,65 +1,91 @@
<template> <template>
<person-render-box render="bloc" <person-render-box
:options="{ render="bloc"
addInfo : true, :options="{
addId : false, addInfo : true,
addEntity: false, addId : false,
addLink: false, addEntity: false,
addHouseholdLink: false, addLink: false,
addAltNames: true, addHouseholdLink: false,
addAge : true, addAltNames: true,
hLevel : 3, addAge : true,
isConfidential : false, hLevel : 3,
isMultiline: true, isConfidential : false,
}" isMultiline: true,
:person="participation.person" }"
:returnPath="getAccompanyingCourseReturnPath"> :person="participation.person"
:return-path="getAccompanyingCourseReturnPath"
>
<template #end-bloc>
<div class="item-row separator">
<ul class="record_actions">
<button-location
v-if="hasCurrentHouseholdAddress && !isPersonLocatingCourse(participation.person)"
:person="participation.person"
/>
<li v-if="participation.person.current_household_id">
<a
class="btn btn-sm btn-chill-beige"
:href="getCurrentHouseholdUrl"
:title="$t('persons_associated.show_household_number', { id: participation.person.current_household_id })"
>
<i class="fa fa-fw fa-home" />
</a>
</li>
<li>
<on-the-fly
:type="participation.person.type"
:id="participation.person.id"
action="show"
/>
</li>
<li>
<on-the-fly
:type="participation.person.type"
:id="participation.person.id"
action="edit"
@save-form-on-the-fly="saveFormOnTheFly"
ref="onTheFly"
/>
</li>
<li>
<button
v-if="!participation.endDate"
class="btn btn-sm btn-remove"
:title="$t('persons_associated.leave_course')"
@click="modal.showModal = true"
/>
</li>
</ul>
</div>
</template>
</person-render-box>
<template v-slot:end-bloc>
<div class="item-row separator">
<ul class="record_actions">
<button-location
v-if="hasCurrentHouseholdAddress && !isPersonLocatingCourse(participation.person)"
v-bind:person="participation.person">
</button-location>
<li v-if="participation.person.current_household_id">
<a class="btn btn-sm btn-chill-beige"
:href="getCurrentHouseholdUrl"
:title="$t('persons_associated.show_household_number', { id: participation.person.current_household_id })">
<i class="fa fa-fw fa-home"></i>
</a>
</li>
<li><on-the-fly :type="participation.person.type" :id="participation.person.id" action="show"></on-the-fly></li>
<li><on-the-fly :type="participation.person.type" :id="participation.person.id" action="edit" @saveFormOnTheFly="saveFormOnTheFly" ref="onTheFly"></on-the-fly></li>
<li>
<button v-if="!participation.endDate"
class="btn btn-sm btn-remove"
v-bind:title="$t('persons_associated.leave_course')"
@click="modal.showModal = true">
</button>
</li>
</ul>
</div>
<teleport to="body">
<modal
v-if="modal.showModal"
:modal-dialog-class="modal.modalDialogClass"
@close="modal.showModal = false"
>
<template #header>
<h2 class="modal-title">
{{ $t('persons_associated.sure') }}
</h2>
</template> </template>
</person-render-box> <template #body>
<p>{{ $t('persons_associated.sure_description') }}</p>
</template>
<teleport to="body"> <template #footer>
<modal v-if="modal.showModal" :modalDialogClass="modal.modalDialogClass" @close="modal.showModal = false"> <button
<template v-slot:header> class="btn btn-danger"
<h2 class="modal-title">{{ $t('persons_associated.sure') }}</h2> @click.prevent="$emit('close', participation)"
</template> >
<template v-slot:body> {{ $t('persons_associated.ok') }}
<p>{{ $t('persons_associated.sure_description') }}</p> </button>
</template> </template>
<template v-slot:footer> </modal>
<button class="btn btn-danger" @click.prevent="$emit('close', participation)"> </teleport>
{{ $t('persons_associated.ok') }}
</button>
</template>
</modal>
</teleport>
</template> </template>
<script> <script>

View File

@ -1,77 +1,92 @@
<template> <template>
<div class="vue-component"> <div class="vue-component">
<h2><a id="section-80"></a>{{ $t('referrer.title') }}</h2> <h2><a id="section-80" />{{ $t('referrer.title') }}</h2>
<teleport to="body"> <teleport to="body">
<modal v-if="modal.showModal" <modal
:modalDialogClass="modal.modalDialogClass" v-if="modal.showModal"
@close="cancelChange"> :modal-dialog-class="modal.modalDialogClass"
<template v-slot:header> @close="cancelChange"
<h3 class="modal-title">{{ $t('confirm.title') }}</h3> >
<template #header>
<h3 class="modal-title">
{{ $t('confirm.title') }}
</h3>
</template> </template>
<template v-slot:body-head> <template #body-head>
<div class="modal-body"> <div class="modal-body">
<p v-html="$t('confirm.sure_referrer', { referrer: this.value.text })"></p> <p v-html="$t('confirm.sure_referrer', { referrer: this.value.text })" />
</div> </div>
</template> </template>
<template v-slot:footer> <template #footer>
<button class="btn btn-save" <button
@click.prevent="this.confirmReferrer"> class="btn btn-save"
{{ $t('confirm.ok_referrer')}} @click.prevent="this.confirmReferrer"
>
{{ $t('confirm.ok_referrer') }}
</button> </button>
</template> </template>
</modal> </modal>
</teleport> </teleport>
<div> <div>
<label
<label class="col-form-label" for="selectJob"> class="col-form-label"
for="selectJob"
>
{{ $t('job.label') }} {{ $t('job.label') }}
</label> </label>
<VueMultiselect <VueMultiselect
name="selectJob" name="selectJob"
label="text" label="text"
:custom-label="customJobLabel" :custom-label="customJobLabel"
track-by="id" track-by="id"
:multiple="false" :multiple="false"
:searchable="true" :searchable="true"
:placeholder="$t('job.placeholder')" :placeholder="$t('job.placeholder')"
v-model="valueJob" v-model="valueJob"
:options="jobs" :options="jobs"
:select-label="$t('multiselect.select_label')" :select-label="$t('multiselect.select_label')"
:deselect-label="$t('multiselect.deselect_label')" :deselect-label="$t('multiselect.deselect_label')"
:selected-label="$t('multiselect.selected_label')" :selected-label="$t('multiselect.selected_label')"
></VueMultiselect> />
<label class="col-form-label" for="selectReferrer"> <label
class="col-form-label"
for="selectReferrer"
>
{{ $t('referrer.label') }} {{ $t('referrer.label') }}
</label> </label>
<VueMultiselect <VueMultiselect
name="selectReferrer" name="selectReferrer"
label="text" label="text"
track-by="id" track-by="id"
:multiple="false" :multiple="false"
:searchable="true" :searchable="true"
:placeholder="$t('referrer.placeholder')" :placeholder="$t('referrer.placeholder')"
v-model="value" v-model="value"
@select="updateReferrer" @select="updateReferrer"
@remove="removeReferrer" @remove="removeReferrer"
:options="users" :options="users"
:select-label="$t('multiselect.select_label')" :select-label="$t('multiselect.select_label')"
:deselect-label="$t('multiselect.deselect_label')" :deselect-label="$t('multiselect.deselect_label')"
:selected-label="$t('multiselect.selected_label')" :selected-label="$t('multiselect.selected_label')"
></VueMultiselect> />
<template v-if="usersSuggestedFilteredByJob.length > 0"> <template v-if="usersSuggestedFilteredByJob.length > 0">
<ul class="list-suggest add-items inline"> <ul class="list-suggest add-items inline">
<li v-for="(u, i) in usersSuggestedFilteredByJob" @click="updateReferrer(u)" :key="`referrer-${i}`"> <li
<span> v-for="(u, i) in usersSuggestedFilteredByJob"
<user-render-box-badge :user="u"></user-render-box-badge> @click="updateReferrer(u)"
</span> :key="`referrer-${i}`"
>
<span>
<user-render-box-badge :user="u" />
</span>
</li> </li>
</ul> </ul>
</template> </template>
@ -81,20 +96,23 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<button <button
class="btn btn-create" class="btn btn-create"
type="button" type="button"
name="button" name="button"
@click="assignMe"> @click="assignMe"
>
{{ $t('referrer.assign_me') }} {{ $t('referrer.assign_me') }}
</button> </button>
</li> </li>
</ul> </ul>
</div> </div>
<div v-if="!isJobValid" class="alert alert-warning to-confirm"> <div
v-if="!isJobValid"
class="alert alert-warning to-confirm"
>
{{ $t('job.not_valid') }} {{ $t('job.not_valid') }}
</div> </div>
</div> </div>
</template> </template>

View File

@ -1,164 +1,247 @@
<template> <template>
<div class="vue-component"> <div class="vue-component">
<h2><a id="section-50" />{{ $t('requestor.title') }}</h2>
<h2><a id="section-50"></a>{{ $t('requestor.title') }}</h2>
<div v-if="accompanyingCourse.requestor && isAnonymous" class="flex-table">
<div
v-if="accompanyingCourse.requestor && isAnonymous"
class="flex-table"
>
<label> <label>
<input type="checkbox" v-model="requestorIsAnonymous" class="me-2" /> <input
{{ $t('requestor.is_anonymous') }} type="checkbox"
v-model="requestorIsAnonymous"
class="me-2"
>
{{ $t('requestor.is_anonymous') }}
</label> </label>
<confidential v-if="accompanyingCourse.requestor.type === 'thirdparty'"> <confidential v-if="accompanyingCourse.requestor.type === 'thirdparty'">
<template v-slot:confidential-content> <template #confidential-content>
<third-party-render-box <third-party-render-box
:thirdparty="accompanyingCourse.requestor" :thirdparty="accompanyingCourse.requestor"
:options="{ :options="{
addLink: false, addLink: false,
addId: false, addId: false,
addEntity: true, addEntity: true,
addInfo: false, addInfo: false,
hLevel: 3, hLevel: 3,
isMultiline: true, isMultiline: true,
isConfidential: true isConfidential: true
}" }"
> >
<template v-slot:record-actions> <template #record-actions>
<ul class="record_actions"> <ul class="record_actions">
<li><on-the-fly :type="accompanyingCourse.requestor.type" :id="accompanyingCourse.requestor.id" action="show"></on-the-fly></li> <li>
<li><on-the-fly :type="accompanyingCourse.requestor.type" :id="accompanyingCourse.requestor.id" action="edit" @saveFormOnTheFly="saveFormOnTheFly" ref="onTheFly"></on-the-fly></li> <on-the-fly
</ul> :type="accompanyingCourse.requestor.type"
:id="accompanyingCourse.requestor.id"
action="show"
/>
</li>
<li>
<on-the-fly
:type="accompanyingCourse.requestor.type"
:id="accompanyingCourse.requestor.id"
action="edit"
@save-form-on-the-fly="saveFormOnTheFly"
ref="onTheFly"
/>
</li>
</ul>
</template> </template>
</third-party-render-box> </third-party-render-box>
</template> </template>
</confidential> </confidential>
<confidential v-else-if="accompanyingCourse.requestor.type === 'person'"> <confidential v-else-if="accompanyingCourse.requestor.type === 'person'">
<template v-slot:confidential-content> <template #confidential-content>
<person-render-box render="bloc" <person-render-box
:person="accompanyingCourse.requestor" render="bloc"
:options="{ :person="accompanyingCourse.requestor"
addLink: false, :options="{
addId: false, addLink: false,
addAltNames: false, addId: false,
addEntity: true, addAltNames: false,
addInfo: true, addEntity: true,
hLevel: 3, addInfo: true,
isMultiline: true, hLevel: 3,
isConfidential: false, isMultiline: true,
addAge: true, isConfidential: false,
}" addAge: true,
> }"
<template v-slot:record-actions> >
<ul class="record_actions"> <template #record-actions>
<li><on-the-fly :type="accompanyingCourse.requestor.type" :id="accompanyingCourse.requestor.id" action="show"></on-the-fly></li> <ul class="record_actions">
<li><on-the-fly :type="accompanyingCourse.requestor.type" :id="accompanyingCourse.requestor.id" action="edit" @saveFormOnTheFly="saveFormOnTheFly" ref="onTheFly"></on-the-fly></li> <li>
</ul> <on-the-fly
</template> :type="accompanyingCourse.requestor.type"
</person-render-box> :id="accompanyingCourse.requestor.id"
</template> action="show"
/>
</li>
<li>
<on-the-fly
:type="accompanyingCourse.requestor.type"
:id="accompanyingCourse.requestor.id"
action="edit"
@save-form-on-the-fly="saveFormOnTheFly"
ref="onTheFly"
/>
</li>
</ul>
</template>
</person-render-box>
</template>
</confidential> </confidential>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<button class="btn btn-remove" <button
:title="$t('action.remove')" class="btn btn-remove"
@click="removeRequestor"> :title="$t('action.remove')"
{{ $t('action.remove') }} @click="removeRequestor"
</button> >
</li> {{ $t('action.remove') }}
</button>
</li>
</ul> </ul>
</div> </div>
<div v-else-if="accompanyingCourse.requestor && !isAnonymous" class="flex-table"> <div
v-else-if="accompanyingCourse.requestor && !isAnonymous"
class="flex-table"
>
<label> <label>
<input type="checkbox" v-model="requestorIsAnonymous" class="me-2" /> <input
{{ $t('requestor.is_anonymous') }} type="checkbox"
v-model="requestorIsAnonymous"
class="me-2"
>
{{ $t('requestor.is_anonymous') }}
</label> </label>
<third-party-render-box <third-party-render-box
v-if="accompanyingCourse.requestor.type === 'thirdparty'" v-if="accompanyingCourse.requestor.type === 'thirdparty'"
:thirdparty="accompanyingCourse.requestor" :thirdparty="accompanyingCourse.requestor"
:options="{ :options="{
addLink: false, addLink: false,
addId: false, addId: false,
addEntity: true, addEntity: true,
addInfo: false, addInfo: false,
hLevel: 3, hLevel: 3,
isMultiline: true, isMultiline: true,
isConfidential: true isConfidential: true
}" }"
> >
<template v-slot:record-actions> <template #record-actions>
<ul class="record_actions"> <ul class="record_actions">
<li><on-the-fly :type="accompanyingCourse.requestor.type" :id="accompanyingCourse.requestor.id" action="show"></on-the-fly></li> <li>
<li><on-the-fly :type="accompanyingCourse.requestor.type" :id="accompanyingCourse.requestor.id" action="edit" @saveFormOnTheFly="saveFormOnTheFly" ref="onTheFly"></on-the-fly></li> <on-the-fly
</ul> :type="accompanyingCourse.requestor.type"
</template> :id="accompanyingCourse.requestor.id"
action="show"
/>
</li>
<li>
<on-the-fly
:type="accompanyingCourse.requestor.type"
:id="accompanyingCourse.requestor.id"
action="edit"
@save-form-on-the-fly="saveFormOnTheFly"
ref="onTheFly"
/>
</li>
</ul>
</template>
</third-party-render-box> </third-party-render-box>
<person-render-box render="bloc" <person-render-box
v-if="accompanyingCourse.requestor.type === 'person'" render="bloc"
:person="accompanyingCourse.requestor" v-if="accompanyingCourse.requestor.type === 'person'"
:options="{ :person="accompanyingCourse.requestor"
addLink: false, :options="{
addId: false, addLink: false,
addAltNames: false, addId: false,
addEntity: true, addAltNames: false,
addInfo: true, addEntity: true,
hLevel: 3, addInfo: true,
isMultiline: true, hLevel: 3,
isConfidential: false isMultiline: true,
}" isConfidential: false
}"
> >
<template v-slot:record-actions> <template #record-actions>
<ul class="record_actions"> <ul class="record_actions">
<li><on-the-fly :type="accompanyingCourse.requestor.type" :id="accompanyingCourse.requestor.id" action="show"></on-the-fly></li> <li>
<li><on-the-fly :type="accompanyingCourse.requestor.type" :id="accompanyingCourse.requestor.id" action="edit" @saveFormOnTheFly="saveFormOnTheFly" ref="onTheFly"></on-the-fly></li> <on-the-fly
</ul> :type="accompanyingCourse.requestor.type"
</template> :id="accompanyingCourse.requestor.id"
action="show"
/>
</li>
<li>
<on-the-fly
:type="accompanyingCourse.requestor.type"
:id="accompanyingCourse.requestor.id"
action="edit"
@save-form-on-the-fly="saveFormOnTheFly"
ref="onTheFly"
/>
</li>
</ul>
</template>
</person-render-box> </person-render-box>
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<button class="btn btn-remove" <button
:title="$t('action.remove')" class="btn btn-remove"
@click="removeRequestor"> :title="$t('action.remove')"
{{ $t('action.remove') }} @click="removeRequestor"
</button> >
</li> {{ $t('action.remove') }}
</button>
</li>
</ul> </ul>
</div> </div>
<div v-else> <div v-else>
<label class="chill-no-data-statement">{{ $t('requestor.counter') }}</label> <label class="chill-no-data-statement">{{ $t('requestor.counter') }}</label>
</div> </div>
<div v-if="accompanyingCourse.requestor === null && suggestedEntities.length > 0"> <div v-if="accompanyingCourse.requestor === null && suggestedEntities.length > 0">
<ul class="list-suggest add-items inline"> <ul class="list-suggest add-items inline">
<li v-for="p in suggestedEntities" :key="uniqueId(p)" @click="addSuggestedEntity(p)"> <li
<person-text v-if="p.type === 'person'" :person="p"></person-text> v-for="p in suggestedEntities"
<span v-else>{{ p.text }}</span> :key="uniqueId(p)"
</li> @click="addSuggestedEntity(p)"
>
<person-text
v-if="p.type === 'person'"
:person="p"
/>
<span v-else>{{ p.text }}</span>
</li>
</ul> </ul>
</div> </div>
<div> <div>
<ul class="record_actions"> <ul class="record_actions">
<li class="add-persons"> <li class="add-persons">
<add-persons v-if="accompanyingCourse.requestor === null" <add-persons
buttonTitle="requestor.add_requestor" v-if="accompanyingCourse.requestor === null"
modalTitle="requestor.add_requestor" button-title="requestor.add_requestor"
v-bind:key="addPersons.key" modal-title="requestor.add_requestor"
v-bind:options="addPersons.options" :key="addPersons.key"
@addNewPersons="addNewPersons" :options="addPersons.options"
ref="addPersons"> <!-- to cast child method --> @add-new-persons="addNewPersons"
</add-persons> ref="addPersons"
</li> >
<!-- to cast child method -->
</add-persons>
</li>
</ul> </ul>
</div> </div>
</div>
</div>
</template> </template>
<script> <script>

View File

@ -1,49 +1,56 @@
<template> <template>
<div class="vue-component"> <div class="vue-component">
<h2><a id="section-90" />{{ $t('resources.title') }}</h2>
<h2><a id="section-90"></a>{{ $t('resources.title')}}</h2> <div v-if="resources.length > 0">
<div v-if="resources.length > 0">
<label class="col-form-label">{{ $tc('resources.counter', counter) }}</label> <label class="col-form-label">{{ $tc('resources.counter', counter) }}</label>
</div> </div>
<div v-else> <div v-else>
<label class="chill-no-data-statement">{{ $tc('resources.counter', counter) }}</label> <label class="chill-no-data-statement">{{ $tc('resources.counter', counter) }}</label>
</div> </div>
<div class="flex-table mb-3"> <div class="flex-table mb-3">
<resource-item <resource-item
v-for="resource in resources" v-for="resource in resources"
v-bind:resource="resource" :resource="resource"
v-bind:key="resource.id" :key="resource.id"
@remove="removeResource"> @remove="removeResource"
</resource-item> />
</div> </div>
<div v-if="suggestedEntities.length > 0"> <div v-if="suggestedEntities.length > 0">
<ul class="list-suggest add-items inline"> <ul class="list-suggest add-items inline">
<li v-for="p in suggestedEntities" :key="uniqueId(p)" @click="addSuggestedEntity(p)"> <li
<person-text v-if="p.type === 'person'" :person="p"></person-text> v-for="p in suggestedEntities"
<span v-else>{{ p.text }}</span> :key="uniqueId(p)"
</li> @click="addSuggestedEntity(p)"
>
<person-text
v-if="p.type === 'person'"
:person="p"
/>
<span v-else>{{ p.text }}</span>
</li>
</ul> </ul>
</div> </div>
<div> <div>
<ul class="record_actions"> <ul class="record_actions">
<li class="add-persons"> <li class="add-persons">
<add-persons <add-persons
buttonTitle="resources.add_resources" button-title="resources.add_resources"
modalTitle="resources.add_resources" modal-title="resources.add_resources"
v-bind:key="addPersons.key" :key="addPersons.key"
v-bind:options="addPersons.options" :options="addPersons.options"
@addNewPersons="addNewPersons" @add-new-persons="addNewPersons"
ref="addPersons"> <!-- to cast child method --> ref="addPersons"
</add-persons> >
</li> <!-- to cast child method -->
</add-persons>
</li>
</ul> </ul>
</div> </div>
</div>
</div>
</template> </template>
<script> <script>

View File

@ -1,104 +1,107 @@
<template> <template>
<person-render-box render="bloc" <person-render-box
v-if="resource.resource.type === 'person'" render="bloc"
:person="resource.resource" v-if="resource.resource.type === 'person'"
:options="{ :person="resource.resource"
addInfo : true, :options="{
addId : false, addInfo : true,
addEntity: true, addId : false,
addLink: false, addEntity: true,
addAltNames: true, addLink: false,
addAge : false, addAltNames: true,
hLevel : 3, addAge : false,
isConfidential : true hLevel : 3,
}"> isConfidential : true
<template v-slot:end-bloc> }"
<div class="item-row separator"> >
<ul class="record_actions"> <template #end-bloc>
<li> <div class="item-row separator">
<write-comment <ul class="record_actions">
:resource="resource" <li>
@updateComment="updateComment" <write-comment
></write-comment> :resource="resource"
</li> @update-comment="updateComment"
<li> />
<on-the-fly </li>
:parent="parent" <li>
:type="resource.resource.type" <on-the-fly
:id="resource.resource.id" :parent="parent"
action="show"> :type="resource.resource.type"
</on-the-fly> :id="resource.resource.id"
</li> action="show"
<li> />
<on-the-fly </li>
:parent="parent" <li>
:type="resource.resource.type" <on-the-fly
:id="resource.resource.id" :parent="parent"
action="edit" :type="resource.resource.type"
@saveFormOnTheFly="saveFormOnTheFly" :id="resource.resource.id"
ref="onTheFly"> action="edit"
</on-the-fly> @save-form-on-the-fly="saveFormOnTheFly"
</li> ref="onTheFly"
<li> />
<button </li>
class="btn btn-sm btn-remove" <li>
:title="$t('action.remove')" <button
@click.prevent="$emit('remove', resource)"> class="btn btn-sm btn-remove"
</button> :title="$t('action.remove')"
</li> @click.prevent="$emit('remove', resource)"
</ul> />
</div> </li>
</template> </ul>
</person-render-box> </div>
</template>
</person-render-box>
<third-party-render-box <third-party-render-box
v-if="resource.resource.type === 'thirdparty'" v-if="resource.resource.type === 'thirdparty'"
:thirdparty="resource.resource" :thirdparty="resource.resource"
:options="{ :options="{
addLink : false, addLink : false,
addId : false, addId : false,
addEntity: true, addEntity: true,
addInfo: false, addInfo: false,
hLevel: 3 hLevel: 3
}"> }"
<template v-slot:end-bloc> >
<div class="item-row separator"> <template #end-bloc>
<ul class="record_actions"> <div class="item-row separator">
<li> <ul class="record_actions">
<write-comment <li>
:resource="resource" <write-comment
@updateComment="updateComment" :resource="resource"
></write-comment> @update-comment="updateComment"
</li> />
<li> </li>
<on-the-fly <li>
:parent="parent" <on-the-fly
:type="resource.resource.type" :parent="parent"
:id="resource.resource.id" :type="resource.resource.type"
action="show"> :id="resource.resource.id"
</on-the-fly> action="show"
</li> />
<li> </li>
<on-the-fly <li>
:parent="parent" <on-the-fly
:type="resource.resource.type" :parent="parent"
:id="resource.resource.id" :type="resource.resource.type"
action="edit" :id="resource.resource.id"
@saveFormOnTheFly="saveFormOnTheFly" action="edit"
ref="onTheFly"> @save-form-on-the-fly="saveFormOnTheFly"
</on-the-fly> ref="onTheFly"
</li> />
<li> </li>
<button <li>
class="btn btn-sm btn-remove" <button
:title="$t('action.remove')" class="btn btn-sm btn-remove"
@click.prevent="$emit('remove', resource)"> :title="$t('action.remove')"
</button> @click.prevent="$emit('remove', resource)"
</li> />
</ul> </li>
</div> </ul>
</template> </div>
</third-party-render-box> </template>
</third-party-render-box>
</template> </template>
<script> <script>

View File

@ -1,40 +1,41 @@
<template> <template>
<a class="btn btn-sm btn-misc change-icon" <a
:title="$t('write_comment')" class="btn btn-sm btn-misc change-icon"
@click="openModal" :title="$t('write_comment')"
><i class="fa fa-pencil-square-o"></i> @click="openModal"
</a> ><i class="fa fa-pencil-square-o" />
</a>
<teleport to="body"> <teleport to="body">
<modal v-if="modal.showModal" <modal
:modalDialogClass="modal.modalDialogClass" v-if="modal.showModal"
@close="modal.showModal = false"> :modal-dialog-class="modal.modalDialogClass"
<template v-slot:header> @close="modal.showModal = false"
>
<h3 class="modal-title">{{ $t('write_comment_about', { 'r': resource.resource.text }) }}</h3> <template #header>
<h3 class="modal-title">
</template> {{ $t('write_comment_about', { 'r': resource.resource.text }) }}
<template v-slot:body> </h3>
</template>
<ckeditor <template #body>
name="content" <ckeditor
v-bind:placeholder="$t('comment_placeholder')" name="content"
:editor="editor" :placeholder="$t('comment_placeholder')"
v-model="content" :editor="editor"
tag-name="textarea"> v-model="content"
</ckeditor> tag-name="textarea"
/>
</template> </template>
<template v-slot:footer> <template #footer>
<a
<a class="btn btn-save" class="btn btn-save"
@click="saveAction"> @click="saveAction"
{{ $t('action.save')}} >
</a> {{ $t('action.save') }}
</a>
</template> </template>
</modal> </modal>
</teleport> </teleport>
</template> </template>
<script> <script>

View File

@ -1,20 +1,31 @@
<template> <template>
<div class="vue-component"> <div class="vue-component">
<h2><a id="section-70"></a>{{ $t('scopes.title') }}</h2> <h2><a id="section-70" />{{ $t('scopes.title') }}</h2>
<div class="mb-4"> <div class="mb-4">
<div class="form-check" v-for="s in scopes" :key="s.id"> <div
<input class="form-check-input" type="checkbox" v-model="checkedScopes" :value="s"/> class="form-check"
<label class="form-check-label"> v-for="s in scopes"
{{ s.name.fr }} :key="s.id"
</label> >
</div> <input
</div> class="form-check-input"
type="checkbox"
<div v-if="!isScopeValid" class="alert alert-warning to-confirm"> v-model="checkedScopes"
{{ $t('scopes.add_at_least_one') }} :value="s"
>
<label class="form-check-label">
{{ s.name.fr }}
</label>
</div>
</div> </div>
<div
v-if="!isScopeValid"
class="alert alert-warning to-confirm"
>
{{ $t('scopes.add_at_least_one') }}
</div>
</div> </div>
</template> </template>

View File

@ -1,30 +1,32 @@
<template> <template>
<div class="vue-component"> <div class="vue-component">
<h2><a id="section-60"></a>{{ $t('social_issue.title') }}</h2> <h2><a id="section-60" />{{ $t('social_issue.title') }}</h2>
<div class="my-4"> <div class="my-4">
<!--label for="field">{{ $t('social_issue.label') }}</label <!--label for="field">{{ $t('social_issue.label') }}</label
--> -->
<VueMultiselect <VueMultiselect
name="field" name="field"
:close-on-select="true" :close-on-select="true"
:allow-empty="true" :allow-empty="true"
:show-labels="false" :show-labels="false"
track-by="id" track-by="id"
label="text" label="text"
:multiple="true" :multiple="true"
:searchable="true" :searchable="true"
:placeholder="$t('social_issue.label')" :placeholder="$t('social_issue.label')"
@update:model-value="updateSocialIssues" @update:model-value="updateSocialIssues"
:model-value="value" :model-value="value"
:options="options"> :options="options"
</VueMultiselect> />
</div> </div>
<div v-if="!isSocialIssueValid" class="alert alert-warning to-confirm">
{{ $t('social_issue.not_valid') }}
</div>
<div
v-if="!isSocialIssueValid"
class="alert alert-warning to-confirm"
>
{{ $t('social_issue.not_valid') }}
</div>
</div> </div>
</template> </template>

View File

@ -1,17 +1,22 @@
<template> <template>
<div class="vue-component"> <div class="vue-component">
<h2><a id="section-110"></a> <h2>
{{ $t('startdate.change') }} <a id="section-110" />
{{ $t('startdate.change') }}
</h2> </h2>
<div> <div>
<div class="mb-3 row"> <div class="mb-3 row">
<div class="col-sm-12 date-update"> <div class="col-sm-12 date-update">
<input class="form-control" type="date" id="startDate" v-model="startDateInput"> <input
</div> class="form-control"
type="date"
id="startDate"
v-model="startDateInput"
>
</div> </div>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
@ -20,7 +25,7 @@ import { dateToISO, ISOToDatetime} from 'ChillMainAssets/chill/js/date';
import { mapState } from 'vuex'; import { mapState } from 'vuex';
export default { export default {
name: 'startDate', name: 'StartDate',
data() { data() {
return { return {
lastRecordedDate: null lastRecordedDate: null

View File

@ -1,20 +1,23 @@
<template> <template>
<teleport to="#content"> <teleport to="#content">
<div id="navmap"> <div id="navmap">
<nav> <nav>
<a class="top" href="#top"> <a
<i class="fa fa-fw fa-square"></i> class="top"
<span>{{ $t('nav.top') }}</span> href="#top"
</a> >
<item <i class="fa fa-fw fa-square" />
v-for="item of items" <span>{{ $t('nav.top') }}</span>
:key="item.key" </a>
:item="item" <item
:step="step"> v-for="item of items"
</item> :key="item.key"
</nav> :item="item"
</div> :step="step"
</teleport> />
</nav>
</div>
</teleport>
</template> </template>
<script> <script>

View File

@ -1,20 +1,20 @@
<template> <template>
<a <a
v-if="item.key <= 8" v-if="item.key <= 8"
:href="item.id" :href="item.id"
:class="{ 'active': isActive }" :class="{ 'active': isActive }"
> >
<i class="fa fa-fw fa-square"></i> <i class="fa fa-fw fa-square" />
<span>{{ item.key }}</span> <span>{{ item.key }}</span>
</a> </a>
<a <a
v-else-if="step === 'DRAFT'" v-else-if="step === 'DRAFT'"
:href="item.id" :href="item.id"
:class="{ 'active': isActive }" :class="{ 'active': isActive }"
> >
<i class="fa fa-fw fa-square"></i> <i class="fa fa-fw fa-square" />
<span>{{ item.key }}</span> <span>{{ item.key }}</span>
</a> </a>
</template> </template>
<script> <script>

View File

@ -1,58 +1,83 @@
<template> <template>
<div class="vue-component"> <div class="vue-component">
<h2>Tests</h2> <h2>Tests</h2>
<!-- Modal --> <!-- Modal -->
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<button class="btn btn-create" @click="modal1.showModal = true"> <button
{{ $t('action.show_modal') }} class="btn btn-create"
</button> @click="modal1.showModal = true"
>
{{ $t('action.show_modal') }}
</button>
</li> </li>
<li> <li>
<button class="btn btn-create" @click="modal2.showModal = true"> <button
Ouvrir une seconde modale class="btn btn-create"
</button> @click="modal2.showModal = true"
>
Ouvrir une seconde modale
</button>
</li> </li>
</ul> </ul>
<teleport to="body"> <teleport to="body">
<modal v-if="modal1.showModal" :modalDialogClass="modal1.modalDialogClass" @close="modal1.showModal = false"> <modal
<template v-slot:header> v-if="modal1.showModal"
<h2 class="modal-title">Le titre de ma modale</h2> :modal-dialog-class="modal1.modalDialogClass"
</template> @close="modal1.showModal = false"
<template v-slot:body> >
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus luctus facilisis suscipit. Cras pulvinar, purus sagittis pulvinar porta, enim ex posuere lacus, in pulvinar lectus magna in odio. Nullam iaculis congue lorem ac suscipit. Proin ut rutrum augue. Ut vehicula risus nec hendrerit ullamcorper. Ut volutpat eu mi eget viverra. Morbi dictum placerat suscipit. </p> <template #header>
<p>Quisque non erat tincidunt, lacinia justo ut, pulvinar nisl. Nunc id enim ut sem pretium interdum consectetur eu quam. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Etiam posuere erat eget augue finibus luctus. Maecenas auctor, tortor non luctus ultrices, neque neque porttitor ex, nec lacinia lorem ligula et elit. Sed tempor nulla vitae lorem sollicitudin dictum. Vestibulum nec arcu eget elit pulvinar pretium. Phasellus facilisis metus sed diam luctus, feugiat scelerisque velit dignissim.</p> <h2 class="modal-title">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus luctus facilisis suscipit. Cras pulvinar, purus sagittis pulvinar porta, enim ex posuere lacus, in pulvinar lectus magna in odio. Nullam iaculis congue lorem ac suscipit. Proin ut rutrum augue. Ut vehicula risus nec hendrerit ullamcorper. Ut volutpat eu mi eget viverra. Morbi dictum placerat suscipit. </p> Le titre de ma modale
<p>Quisque non erat tincidunt, lacinia justo ut, pulvinar nisl. Nunc id enim ut sem pretium interdum consectetur eu quam. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Etiam posuere erat eget augue finibus luctus. Maecenas auctor, tortor non luctus ultrices, neque neque porttitor ex, nec lacinia lorem ligula et elit. Sed tempor nulla vitae lorem sollicitudin dictum. Vestibulum nec arcu eget elit pulvinar pretium. Phasellus facilisis metus sed diam luctus, feugiat scelerisque velit dignissim.</p> </h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus luctus facilisis suscipit. Cras pulvinar, purus sagittis pulvinar porta, enim ex posuere lacus, in pulvinar lectus magna in odio. Nullam iaculis congue lorem ac suscipit. Proin ut rutrum augue. Ut vehicula risus nec hendrerit ullamcorper. Ut volutpat eu mi eget viverra. Morbi dictum placerat suscipit. </p> </template>
<p>Quisque non erat tincidunt, lacinia justo ut, pulvinar nisl. Nunc id enim ut sem pretium interdum consectetur eu quam. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Etiam posuere erat eget augue finibus luctus. Maecenas auctor, tortor non luctus ultrices, neque neque porttitor ex, nec lacinia lorem ligula et elit. Sed tempor nulla vitae lorem sollicitudin dictum. Vestibulum nec arcu eget elit pulvinar pretium. Phasellus facilisis metus sed diam luctus, feugiat scelerisque velit dignissim.</p> <template #body>
</template> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus luctus facilisis suscipit. Cras pulvinar, purus sagittis pulvinar porta, enim ex posuere lacus, in pulvinar lectus magna in odio. Nullam iaculis congue lorem ac suscipit. Proin ut rutrum augue. Ut vehicula risus nec hendrerit ullamcorper. Ut volutpat eu mi eget viverra. Morbi dictum placerat suscipit. </p>
<template v-slot:footer> <p>Quisque non erat tincidunt, lacinia justo ut, pulvinar nisl. Nunc id enim ut sem pretium interdum consectetur eu quam. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Etiam posuere erat eget augue finibus luctus. Maecenas auctor, tortor non luctus ultrices, neque neque porttitor ex, nec lacinia lorem ligula et elit. Sed tempor nulla vitae lorem sollicitudin dictum. Vestibulum nec arcu eget elit pulvinar pretium. Phasellus facilisis metus sed diam luctus, feugiat scelerisque velit dignissim.</p>
<button class="btn btn-create" @click="modal1.showModal = false; modal2.showModal = true"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus luctus facilisis suscipit. Cras pulvinar, purus sagittis pulvinar porta, enim ex posuere lacus, in pulvinar lectus magna in odio. Nullam iaculis congue lorem ac suscipit. Proin ut rutrum augue. Ut vehicula risus nec hendrerit ullamcorper. Ut volutpat eu mi eget viverra. Morbi dictum placerat suscipit. </p>
{{ $t('action.next')}}</button> <p>Quisque non erat tincidunt, lacinia justo ut, pulvinar nisl. Nunc id enim ut sem pretium interdum consectetur eu quam. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Etiam posuere erat eget augue finibus luctus. Maecenas auctor, tortor non luctus ultrices, neque neque porttitor ex, nec lacinia lorem ligula et elit. Sed tempor nulla vitae lorem sollicitudin dictum. Vestibulum nec arcu eget elit pulvinar pretium. Phasellus facilisis metus sed diam luctus, feugiat scelerisque velit dignissim.</p>
</template> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus luctus facilisis suscipit. Cras pulvinar, purus sagittis pulvinar porta, enim ex posuere lacus, in pulvinar lectus magna in odio. Nullam iaculis congue lorem ac suscipit. Proin ut rutrum augue. Ut vehicula risus nec hendrerit ullamcorper. Ut volutpat eu mi eget viverra. Morbi dictum placerat suscipit. </p>
</modal> <p>Quisque non erat tincidunt, lacinia justo ut, pulvinar nisl. Nunc id enim ut sem pretium interdum consectetur eu quam. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Etiam posuere erat eget augue finibus luctus. Maecenas auctor, tortor non luctus ultrices, neque neque porttitor ex, nec lacinia lorem ligula et elit. Sed tempor nulla vitae lorem sollicitudin dictum. Vestibulum nec arcu eget elit pulvinar pretium. Phasellus facilisis metus sed diam luctus, feugiat scelerisque velit dignissim.</p>
</teleport> </template>
<template #footer>
<button
class="btn btn-create"
@click="modal1.showModal = false; modal2.showModal = true"
>
{{ $t('action.next') }}
</button>
</template>
</modal>
</teleport>
<teleport to="body"> <teleport to="body">
<modal v-if="modal2.showModal" :modalDialogClass="modal2.modalDialogClass" @close="modal2.showModal = false"> <modal
<template v-slot:header> v-if="modal2.showModal"
<h2 class="modal-title">Une autre modale</h2> :modal-dialog-class="modal2.modalDialogClass"
</template> @close="modal2.showModal = false"
<template v-slot:body> >
<p>modal 2</p> <template #header>
</template> <h2 class="modal-title">
<template v-slot:footer> Une autre modale
<button class="btn btn-create" @click="modal2.showModal = false"> </h2>
{{ $t('action.save')}}</button> </template>
</template> <template #body>
</modal> <p>modal 2</p>
</teleport> </template>
<!-- END Modal --> <template #footer>
<button
</div> class="btn btn-create"
@click="modal2.showModal = false"
>
{{ $t('action.save') }}
</button>
</template>
</modal>
</teleport>
<!-- END Modal -->
</div>
</template> </template>
<script> <script>

View File

@ -1,39 +1,51 @@
<template> <template>
<h2>{{ $t('pick_social_issue') }}</h2> <h2>{{ $t('pick_social_issue') }}</h2>
<div id="awc_create_form"> <div id="awc_create_form">
<div
<div id="picking" class=""> id="picking"
<p>{{ $t('pick_social_issue_linked_with_action') }}</p> class=""
<div v-for="si in socialIssues" :key="si.id"> >
<input type="radio" v-bind:value="si.id" name="socialIssue" v-model="socialIssuePicked"><span class="badge bg-chill-l-gray text-dark">{{ si.text }}</span> <p>{{ $t('pick_social_issue_linked_with_action') }}</p>
</div> <div
v-for="si in socialIssues"
:key="si.id"
>
<input
type="radio"
:value="si.id"
name="socialIssue"
v-model="socialIssuePicked"
><span class="badge bg-chill-l-gray text-dark">{{ si.text }}</span>
</div>
<div class="my-3"> <div class="my-3">
<div class="col-11"> <div class="col-11">
<vue-multiselect <vue-multiselect
name="otherIssues" name="otherIssues"
label="text" label="text"
track-by="id" track-by="id"
open-direction="bottom" open-direction="bottom"
:close-on-select="true" :close-on-select="true"
:preserve-search="false" :preserve-search="false"
:reset-after="true" :reset-after="true"
:hide-selected="true" :hide-selected="true"
:taggable="false" :taggable="false"
:multiple="false" :multiple="false"
:searchable="true" :searchable="true"
:allow-empty="true" :allow-empty="true"
:show-labels="false" :show-labels="false"
:loading="issueIsLoading" :loading="issueIsLoading"
:placeholder="$t('choose_other_social_issue')" :placeholder="$t('choose_other_social_issue')"
:options="socialIssuesOther" :options="socialIssuesOther"
@select="addIssueInList"> @select="addIssueInList"
</vue-multiselect> />
</div> </div>
</div> </div>
<div v-if="hasSocialIssuePicked" class="mb-3"> <div
v-if="hasSocialIssuePicked"
class="mb-3"
>
<h2>{{ $t('pick_an_action') }}</h2> <h2>{{ $t('pick_an_action') }}</h2>
<div class="col-11"> <div class="col-11">
<vue-multiselect <vue-multiselect
@ -44,57 +56,91 @@
:close-on-select="true" :close-on-select="true"
:show-labels="true" :show-labels="true"
track-by="id" track-by="id"
></vue-multiselect> />
</div> </div>
</div> </div>
<div v-if="isLoadingSocialActions"> <div v-if="isLoadingSocialActions">
<i class="fa fa-circle-o-notch fa-spin fa-fw"></i> <i class="fa fa-circle-o-notch fa-spin fa-fw" />
</div> </div>
<div v-if="hasSocialActionPicked" id="persons" class="mb-5"> <div
v-if="hasSocialActionPicked"
id="persons"
class="mb-5"
>
<h2>{{ $t('persons_involved') }}</h2> <h2>{{ $t('persons_involved') }}</h2>
<ul> <ul>
<li v-for="p in personsReachables" :key="p.id"> <li
v-for="p in personsReachables"
:key="p.id"
>
<div class="form-check"> <div class="form-check">
<input type="checkbox" :value="p.id" v-model="personsPicked" class="form-check-input" :id="'person_check'+p.id"> <input
<label class="form-check-label" :for="'person_check' + p.id"> type="checkbox"
<person-text :person="p"></person-text> :value="p.id"
v-model="personsPicked"
class="form-check-input"
:id="'person_check'+p.id"
>
<label
class="form-check-label"
:for="'person_check' + p.id"
>
<person-text :person="p" />
</label> </label>
</div> </div>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
<!-- <div v-if="hasSocialActionPicked" id="start_date"> <!-- <div v-if="hasSocialActionPicked" id="start_date">
<p><label>{{ $t('startDate') }}</label> <input type="date" v-model="startDate" /></p> <p><label>{{ $t('startDate') }}</label> <input type="date" v-model="startDate" /></p>
</div> --> </div> -->
<div class="row"> <div class="row">
<div v-if="hasSocialActionPicked" id="start_date" class="mb-3 row"> <div
<label class="col-form-label col-sm-4">{{ $t('startDate') }}</label> v-if="hasSocialActionPicked"
<div class="col-sm-8"> id="start_date"
<input class="form-control" type="date" v-model="startDate"/> class="mb-3 row"
>
<label class="col-form-label col-sm-4">{{ $t('startDate') }}</label>
<div class="col-sm-8">
<input
class="form-control"
type="date"
v-model="startDate"
>
</div>
</div> </div>
</div>
<!-- <div v-if="hasSocialActionPicked" id="end_date"> <!-- <div v-if="hasSocialActionPicked" id="end_date">
<p><label>{{ $t('endDate') }}</label> <input type="date" v-model="endDate" /></p> <p><label>{{ $t('endDate') }}</label> <input type="date" v-model="endDate" /></p>
</div> --> </div> -->
<div v-if="hasSocialActionPicked" id="end_date" class="mb-3 row"> <div
<label class="col-form-label col-sm-4">{{ $t('endDate') }}</label> v-if="hasSocialActionPicked"
<div class="col-sm-8"> id="end_date"
<input class="form-control" type="date" v-model="endDate"/> class="mb-3 row"
>
<label class="col-form-label col-sm-4">{{ $t('endDate') }}</label>
<div class="col-sm-8">
<input
class="form-control"
type="date"
v-model="endDate"
>
</div>
</div> </div>
</div> </div>
</div>
<div id="confirm"> <div id="confirm">
<div v-if="hasErrors"> <div v-if="hasErrors">
<p>{{ $t('form_has_errors') }}</p> <p>{{ $t('form_has_errors') }}</p>
<ul> <ul>
<li v-for="e in errors" :key="e.id"> <li
v-for="e in errors"
:key="e.id"
>
{{ e }} {{ e }}
</li> </li>
</ul> </ul>
@ -103,15 +149,26 @@
<div> <div>
<ul class="record_actions"> <ul class="record_actions">
<li class="cancel"> <li class="cancel">
<button class="btn btn-cancel" @click="goToPrevious"> <button
class="btn btn-cancel"
@click="goToPrevious"
>
{{ $t('action.cancel') }} {{ $t('action.cancel') }}
</button> </button>
</li> </li>
<li v-if="hasSocialActionPicked"> <li v-if="hasSocialActionPicked">
<button class="btn btn-save" v-show="!isPostingWork" @click="submit"> <button
class="btn btn-save"
v-show="!isPostingWork"
@click="submit"
>
{{ $t('action.save') }} {{ $t('action.save') }}
</button> </button>
<button class="btn btn-save" v-show="isPostingWork" disabled> <button
class="btn btn-save"
v-show="isPostingWork"
disabled
>
{{ $t('action.save') }} {{ $t('action.save') }}
</button> </button>
</li> </li>
@ -119,7 +176,6 @@
</div> </div>
</div> </div>
</div> </div>
</template> </template>

View File

@ -1,330 +1,515 @@
<template> <template>
<div id="workEditor" class="my-4"> <div
<div id="title" class="action-row"> id="workEditor"
<div> class="my-4"
<p class="wl-item social-issues"> >
<span class="chill-entity entity-social-issue"> <div
<span class="badge bg-chill-l-gray text-dark">{{ work.socialAction.issue.text }}</span> id="title"
</span> class="action-row"
</p> >
</div> <div>
<h2 class="badge-title"> <p class="wl-item social-issues">
<span class="title_label"></span> <span class="chill-entity entity-social-issue">
<span class="title_action">{{ work.socialAction.text }}</span> <span class="badge bg-chill-l-gray text-dark">{{ work.socialAction.issue.text }}</span>
</h2> </span>
</p>
</div>
<h2 class="badge-title">
<span class="title_label" />
<span class="title_action">{{ work.socialAction.text }}</span>
</h2>
</div>
<div
id="startDate"
class="action-row"
>
<label class="col-form-label">{{ $t('startDate') }}</label>
<input
v-model="startDate"
type="date"
required="true"
class="form-control"
v-once
>
</div>
<div
id="endDate"
class="action-row"
>
<label class="col-form-label">{{ $t('endDate') }}</label>
<input
v-model="endDate"
type="date"
class="form-control"
>
</div>
<div
id="privateComment"
class="action-row"
>
<label class="col-form-label">{{ $t('private_comment') }}</label>
<ckeditor
v-model="privateComment"
:editor="editor"
tag-name="textarea"
/>
</div>
<div
id="comment"
class="action-row"
>
<label class="col-form-label">{{ $t('comments') }}</label>
<ckeditor
v-model="note"
:editor="editor"
tag-name="textarea"
/>
</div>
<div
id="objectives"
class="action-row"
>
<div
aria="hidden"
class="title"
>
<div><h3>{{ $t('goals_title') }}</h3></div>
<div><h3>{{ $t('results_title') }}</h3></div>
</div> </div>
<div id="startDate" class="action-row"> <!-- results which are not attached to an objective -->
<label class="col-form-label">{{ $t('startDate') }}</label> <div v-if="hasResultsForAction">
<input v-model="startDate" type="date" required="true" class="form-control" v-once/> <div class="results_without_objective">
{{ $t('results_without_objective') }}
</div>
<div>
<add-result
:available-results="resultsForAction"
destination="action"
/>
</div>
</div> </div>
<div id="endDate" class="action-row"> <!-- results which **are** attached to an objective -->
<label class="col-form-label">{{ $t('endDate') }}</label> <div
<input v-model="endDate" type="date" class="form-control" /> v-for="g in goalsPicked"
:key="g.goal.id"
>
<div
class="item-title"
@click="removeGoal(g)"
>
<span class="removable">{{ g.goal.title.fr }}</span>
</div>
<div>
<add-result
:goal="g.goal"
destination="goal"
/>
</div>
</div>
<div
class="accordion"
id="expandedSuggestions"
>
<div
v-if="availableForCheckGoal.length > 0"
class="accordion-item"
>
<h2
class="accordion-header"
id="heading_expanded_suggestions"
>
<button
v-if="isExpanded"
class="accordion-button"
type="button"
data-bs-toggle="collapse"
aria-expanded="true"
@click="toggleSelect"
>
Masquer
</button>
<button
v-else
class="accordion-button collapsed"
type="button"
data-bs-toggle="collapse"
aria-expanded="false"
@click="toggleSelect"
>
Motifs, objectifs et dispositfs disponibles
</button>
</h2>
<div
class="accordion-collapse"
id="collapse_expanded_suggestions"
aria-labelledby="heading_expanded_suggestions"
data-bs-parent="#expandedSuggestions"
>
<template v-if="isExpanded">
<ul class="list-suggest add-items">
<li
v-for="g in availableForCheckGoal"
@click="addGoal(g)"
:key="g.id"
>
<span>{{ g.title.fr }}</span>
</li>
</ul>
</template>
</div>
<p
v-if="goalsPicked.length ===0"
class="chill-no-data-statement"
>
Aucun objectif associé
</p>
</div>
<div v-else>
<span class="chill-no-data-statement">{{ $t('no_goals_available') }}</span>
</div>
</div>
</div>
<div
id="evaluations"
class="action-row"
>
<div
aria="hidden"
class="title"
>
<div><h3>{{ $t('Evaluations') }} - {{ $t('Forms') }} - {{ $t('Post') }}</h3></div>
</div> </div>
<div id="privateComment" class="action-row"> <!-- list evaluations -->
<label class="col-form-label">{{ $t('private_comment') }}</label> <add-evaluation
<ckeditor v-for="e in pickedEvaluations"
v-model="privateComment" :key="e.key"
:editor="editor" :evaluation="e"
tag-name="textarea" :doc-anchor-id="this.docAnchorId"
></ckeditor> />
</div>
<div id="comment" class="action-row"> <!-- box to add new evaluation -->
<label class="col-form-label">{{ $t('comments') }}</label> <div class="add_evaluation">
<ckeditor <div v-if="showAddEvaluation">
v-model="note" <p>{{ $t('available_evaluations_text') }}</p>
:editor="editor" <ul class="list-suggest add-items">
tag-name="textarea" <li
></ckeditor> v-for="e in evaluationsForAction"
</div> @click="addEvaluation(e)"
:key="e.id"
>
<div id="objectives" class="action-row"> <span>{{ e.title.fr }}</span>
<div aria="hidden" class="title">
<div><h3>{{ $t('goals_title') }}</h3></div>
<div><h3>{{ $t('results_title') }}</h3></div>
</div>
<!-- results which are not attached to an objective -->
<div v-if="hasResultsForAction">
<div class="results_without_objective">
{{ $t('results_without_objective') }}
</div>
<div>
<add-result :availableResults="resultsForAction" destination="action"></add-result>
</div>
</div>
<!-- results which **are** attached to an objective -->
<div v-for="g in goalsPicked" :key="g.goal.id">
<div class="item-title" @click="removeGoal(g)">
<span class="removable">{{ g.goal.title.fr }}</span>
</div>
<div>
<add-result :goal="g.goal" destination="goal"></add-result>
</div>
</div>
<div class="accordion" id="expandedSuggestions">
<div v-if="availableForCheckGoal.length > 0" class="accordion-item">
<h2 class="accordion-header" id="heading_expanded_suggestions">
<button v-if="isExpanded"
class="accordion-button"
type="button"
data-bs-toggle="collapse"
aria-expanded="true"
@click="toggleSelect">
Masquer
</button>
<button v-else
class="accordion-button collapsed"
type="button"
data-bs-toggle="collapse"
aria-expanded="false"
@click="toggleSelect">
Motifs, objectifs et dispositfs disponibles
</button>
</h2>
<div class="accordion-collapse" id="collapse_expanded_suggestions"
aria-labelledby="heading_expanded_suggestions" data-bs-parent="#expandedSuggestions">
<template v-if="isExpanded">
<ul class="list-suggest add-items">
<li v-for="g in availableForCheckGoal" @click="addGoal(g)" :key="g.id">
<span>{{ g.title.fr }}</span>
</li>
</ul>
</template>
</div>
<p v-if="goalsPicked.length ===0" class="chill-no-data-statement">
Aucun objectif associé
</p>
</div>
<div v-else>
<span class="chill-no-data-statement">{{ $t('no_goals_available') }}</span>
</div>
</div>
</div>
<div id="evaluations" class="action-row">
<div aria="hidden" class="title">
<div><h3>{{ $t('Evaluations') }} - {{ $t('Forms') }} - {{ $t('Post') }}</h3></div>
</div>
<!-- list evaluations -->
<add-evaluation
v-for="e in pickedEvaluations"
v-bind:key="e.key"
v-bind:evaluation="e"
v-bind:docAnchorId="this.docAnchorId">
</add-evaluation>
<!-- box to add new evaluation -->
<div class="add_evaluation">
<div v-if="showAddEvaluation">
<p>{{ $t('available_evaluations_text') }}</p>
<ul class="list-suggest add-items">
<li v-for="e in evaluationsForAction" @click="addEvaluation(e)" :key="e.id">
<span>{{ e.title.fr }}</span>
</li>
</ul>
</div>
<ul class="record_actions" v-if="evaluationsForAction.length > 0">
<li>
<button :title="$t('add_an_evaluation')" class="btn btn-create" @click="toggleAddEvaluation">{{ $t('add_an_evaluation') }}</button>
</li>
</ul>
<div v-else>
<span class="chill-no-data-statement">{{ $t('no_evaluations_available') }}</span>
</div>
</div>
</div>
<div id="persons" class="action-row">
<h3 class="mb-3">{{ $t('persons_involved') }}</h3>
<ul class="list-unstyled">
<li v-for="p in personsReachables" :key="p.id">
<div class="form-check">
<input v-model="personsPicked" :value="p.id" type="checkbox" class="me-2 form-check-input" :id="'person_check'+p.id">
<label :for="'person_check'+p.id" class="form-check-label">
<person-text :person="p"></person-text>
</label>
</div>
</li> </li>
</ul> </ul>
</div>
<ul
class="record_actions"
v-if="evaluationsForAction.length > 0"
>
<li>
<button
:title="$t('add_an_evaluation')"
class="btn btn-create"
@click="toggleAddEvaluation"
>
{{ $t('add_an_evaluation') }}
</button>
</li>
</ul>
<div v-else>
<span class="chill-no-data-statement">{{ $t('no_evaluations_available') }}</span>
</div>
</div>
</div>
<div
id="persons"
class="action-row"
>
<h3 class="mb-3">
{{ $t('persons_involved') }}
</h3>
<ul class="list-unstyled">
<li
v-for="p in personsReachables"
:key="p.id"
>
<div class="form-check">
<input
v-model="personsPicked"
:value="p.id"
type="checkbox"
class="me-2 form-check-input"
:id="'person_check'+p.id"
>
<label
:for="'person_check'+p.id"
class="form-check-label"
>
<person-text :person="p" />
</label>
</div>
</li>
</ul>
</div>
<div
id="referrers"
class="action-row"
>
<h3>{{ $t('referrers') }}</h3>
<div v-if="!hasReferrers">
<p class="chill-no-data-statement">
{{ $t('no_referrers') }}
</p>
</div> </div>
<div id="referrers" class="action-row"> <div v-else>
<h3>{{ $t('referrers') }}</h3> <ul class="list-suggest remove-items inline">
<li
<div v-if="!hasReferrers"> v-for="u in referrers"
<p class="chill-no-data-statement">{{ $t('no_referrers') }}</p> :key="u.id"
</div> :title="$t('remove_referrer')"
@click="removeReferrer(u)"
<div v-else> >
<ul class="list-suggest remove-items inline"> <span>
<li v-for="u in referrers" :key="u.id" :title="$t('remove_referrer')" @click="removeReferrer(u)"> {{ u.text }}
<span> </span>
{{ u.text }} </li>
</span> </ul>
</li>
</ul>
</div>
<ul class="record_actions">
<li class="add-persons">
<add-persons
ref="referrerPicker"
:key="referrerPicker.key"
:buttonTitle="$t('add_referrers')"
:modalTitle="$t('choose_referrers')"
:options="referrerPicker.options"
@addNewPersons="addReferrers">
</add-persons>
</li>
</ul>
</div> </div>
<div id="handlingThirdParty" class="action-row"> <ul class="record_actions">
<h3>{{ $t('handling_thirdparty') }}</h3> <li class="add-persons">
<add-persons
ref="referrerPicker"
:key="referrerPicker.key"
:button-title="$t('add_referrers')"
:modal-title="$t('choose_referrers')"
:options="referrerPicker.options"
@add-new-persons="addReferrers"
/>
</li>
</ul>
</div>
<div v-if="!hasHandlingThirdParty"> <div
<p class="chill-no-data-statement"> id="handlingThirdParty"
{{ $t('no_handling_thirdparty') }} class="action-row"
</p> >
<h3>{{ $t('handling_thirdparty') }}</h3>
<ul class="record_actions"> <div v-if="!hasHandlingThirdParty">
<li class="add-persons"> <p class="chill-no-data-statement">
<add-persons {{ $t('no_handling_thirdparty') }}
ref="handlingThirdPartyPicker" </p>
v-bind:key="handlingThirdPartyPicker.key"
v-bind:buttonTitle="$t('precise_handling_thirdparty')"
v-bind:modalTitle="$t('choose_a_thirdparty')"
v-bind:options="handlingThirdPartyPicker.options"
@addNewPersons="setHandlingThirdParty"> <!-- to cast child method -->
</add-persons>
</li>
</ul>
</div>
<div v-else class="flex-table">
<third-party-render-box
:thirdparty="handlingThirdParty"
:options="{
addLink: false,
addId: false,
addEntity: true,
addInfo: false,
hLevel: 3,
isMultiline: true,
isConfidential: false
}"></third-party-render-box>
<ul class="record_actions">
<li>
<button :title="$t('remove_handling_thirdparty')" class="btn btn-remove" @click="removeHandlingThirdParty"/>
</li>
</ul>
</div>
<ul class="record_actions">
<li class="add-persons">
<add-persons
ref="handlingThirdPartyPicker"
:key="handlingThirdPartyPicker.key"
:button-title="$t('precise_handling_thirdparty')"
:modal-title="$t('choose_a_thirdparty')"
:options="handlingThirdPartyPicker.options"
@add-new-persons="setHandlingThirdParty"
>
<!-- to cast child method -->
</add-persons>
</li>
</ul>
</div>
<div
v-else
class="flex-table"
>
<third-party-render-box
:thirdparty="handlingThirdParty"
:options="{
addLink: false,
addId: false,
addEntity: true,
addInfo: false,
hLevel: 3,
isMultiline: true,
isConfidential: false
}"
/>
<ul class="record_actions">
<li>
<button
:title="$t('remove_handling_thirdparty')"
class="btn btn-remove"
@click="removeHandlingThirdParty"
/>
</li>
</ul>
</div>
</div>
<div
id="thirdParties"
class="action-row"
>
<h3>{{ $t('thirdparty_intervener') }}</h3>
<div v-if="!hasThirdParties">
<p class="chill-no-data-statement">
{{ $t('no_thirdparty_intervener') }}
</p>
</div> </div>
<div id="thirdParties" class="action-row"> <div v-else>
<h3>{{ $t('thirdparty_intervener') }}</h3> <div class="flex-bloc mb-3">
<third-party-render-box
<div v-if="!hasThirdParties"> v-for="thirdparty in thirdParties"
<p class="chill-no-data-statement">{{ $t('no_thirdparty_intervener') }}</p> :key="thirdparty.id"
</div> :thirdparty="thirdparty"
:options="{ addLink : false, addId : false, addEntity: true, addInfo: false, hLevel: 3 }"
<div v-else> >
<div class="flex-bloc mb-3"> <template #record-actions>
<third-party-render-box <ul class="record_actions">
v-for="thirdparty in thirdParties" <li>
:key="thirdparty.id" <on-the-fly
:thirdparty="thirdparty" :type="thirdparty.type"
:options="{ addLink : false, addId : false, addEntity: true, addInfo: false, hLevel: 3 }" :id="thirdparty.id"
> action="show"
<template v-slot:record-actions> />
<ul class="record_actions"> </li>
<li><on-the-fly :type="thirdparty.type" :id="thirdparty.id" action="show"></on-the-fly></li> <li>
<li><on-the-fly :type="thirdparty.type" :id="thirdparty.id" action="edit" @saveFormOnTheFly="saveFormOnTheFly" ref="onTheFly"></on-the-fly></li> <on-the-fly
<li> :type="thirdparty.type"
<button :title="$t('remove_thirdparty')" class="btn btn-sm btn-remove" @click="removeThirdParty(thirdparty)" /> :id="thirdparty.id"
</li> action="edit"
</ul> @save-form-on-the-fly="saveFormOnTheFly"
</template> ref="onTheFly"
</third-party-render-box> />
</div> </li>
</div> <li>
<button
<ul class="record_actions"> :title="$t('remove_thirdparty')"
<li class="add-persons"> class="btn btn-sm btn-remove"
<add-persons @click="removeThirdParty(thirdparty)"
ref="thirdPartyPicker" />
v-bind:key="thirdPartyPicker.key" </li>
v-bind:buttonTitle="$t('add_thirdparties')" </ul>
v-bind:modalTitle="$t('choose_thirdparties')" </template>
v-bind:options="thirdPartyPicker.options" </third-party-render-box>
@addNewPersons="addThirdParties"> <!-- to cast child method --> </div>
</add-persons>
</li>
</ul>
</div> </div>
<div v-if="errors.length > 0" id="errors" class="alert alert-danger flashbag"> <ul class="record_actions">
<p>{{ $t('fix_these_errors') }}</p> <li class="add-persons">
<ul> <add-persons
<li v-for="e in errors" :key="e.id">{{ e }}</li> ref="thirdPartyPicker"
</ul> :key="thirdPartyPicker.key"
</div> :button-title="$t('add_thirdparties')"
:modal-title="$t('choose_thirdparties')"
:options="thirdPartyPicker.options"
@add-new-persons="addThirdParties"
>
<!-- to cast child method -->
</add-persons>
</li>
</ul>
</div>
</div> <div
<ul class="record_actions sticky-form-buttons"> v-if="errors.length > 0"
<li> id="errors"
<list-workflow-modal class="alert alert-danger flashbag"
:workflows="this.work.workflows" >
:allowCreate="true" <p>{{ $t('fix_these_errors') }}</p>
relatedEntityClass="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork" <ul>
:relatedEntityId="this.work.id" <li
:workflowsAvailables="this.work.workflows_availables" v-for="e in errors"
:preventDefaultMoveToGenerate="true" :key="e.id"
@go-to-generate-workflow="goToGenerateWorkflow" >
></list-workflow-modal> {{ e }}
</li> </li>
</ul>
</div>
</div>
<ul class="record_actions sticky-form-buttons">
<li>
<list-workflow-modal
:workflows="this.work.workflows"
:allow-create="true"
related-entity-class="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork"
:related-entity-id="this.work.id"
:workflows-availables="this.work.workflows_availables"
:prevent-default-move-to-generate="true"
@go-to-generate-workflow="goToGenerateWorkflow"
/>
</li>
<li> <li>
<button v-if="AmIRefferer" <button
class="btn btn-notify" v-if="AmIRefferer"
@click="goToGenerateNotification(false)" class="btn btn-notify"
></button> @click="goToGenerateNotification(false)"
<template v-else> />
<button id="btnGroupNotifyButtons" type="button" class="btn btn-notify dropdown-toggle" :title="$t('notification_send')" data-bs-toggle="dropdown" aria-expanded="false">&nbsp;</button> <template v-else>
<ul class="dropdown-menu" aria-labelledby="btnGroupNotifyButtons"> <button
<li><a class="dropdown-item" @click="goToGenerateNotification(true)">{{ $t('notification_notify_referrer') }}</a></li> id="btnGroupNotifyButtons"
<li><a class="dropdown-item" @click="goToGenerateNotification(false)">{{ $t('notification_notify_any') }}</a></li> type="button"
</ul> class="btn btn-notify dropdown-toggle"
</template> :title="$t('notification_send')"
</li> data-bs-toggle="dropdown"
aria-expanded="false"
>
&nbsp;
</button>
<ul
class="dropdown-menu"
aria-labelledby="btnGroupNotifyButtons"
>
<li>
<a
class="dropdown-item"
@click="goToGenerateNotification(true)"
>{{ $t('notification_notify_referrer') }}</a>
</li>
<li>
<a
class="dropdown-item"
@click="goToGenerateNotification(false)"
>{{ $t('notification_notify_any') }}</a>
</li>
</ul>
</template>
</li>
<li v-if="!isPosting"> <li v-if="!isPosting">
<button class="btn btn-save" @click="submit"> <button
{{ $t('action.save') }} class="btn btn-save"
</button> @click="submit"
</li> >
{{ $t('action.save') }}
</button>
</li>
<li v-if="isPosting"> <li v-if="isPosting">
<button class="btn btn-save" disabled> <button
{{ $t('action.save') }} class="btn btn-save"
</button> disabled
</li> >
{{ $t('action.save') }}
</ul> </button>
</li>
</ul>
</template> </template>
<script> <script>

View File

@ -1,53 +1,78 @@
<template> <template>
<div> <div>
<a id="evaluations"></a> <a id="evaluations" />
<div class="item-title" :title="evaluation.id || 'no id yet'"> <div
<span>{{ evaluation.evaluation.title.fr }}</span> class="item-title"
</div> :title="evaluation.id || 'no id yet'"
>
<span>{{ evaluation.evaluation.title.fr }}</span>
</div>
<div class="item-url mt-3 mb-4" v-if="evaluation.evaluation.url"> <div
<i class="fa fa-link fa-lg"></i> class="item-url mt-3 mb-4"
<a :href="evaluation.evaluation.url" target="_blank">{{ evaluation.evaluation.url }}</a> v-if="evaluation.evaluation.url"
</div> >
<i class="fa fa-link fa-lg" />
<a
:href="evaluation.evaluation.url"
target="_blank"
>{{ evaluation.evaluation.url }}</a>
</div>
<div> <div>
<form-evaluation ref="FormEvaluation" :key="evaluation.key" :evaluation="evaluation" :docAnchorId="docAnchorId"></form-evaluation> <form-evaluation
ref="FormEvaluation"
:key="evaluation.key"
:evaluation="evaluation"
:doc-anchor-id="docAnchorId"
/>
<ul class="record_actions"> <ul class="record_actions">
<li v-if="evaluation.workflows_availables.length > 0"> <li v-if="evaluation.workflows_availables.length > 0">
<list-workflow-modal
:workflows="evaluation.workflows"
:allow-create="true"
related-entity-class="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation"
:related-entity-id="evaluation.id"
:workflows-availables="evaluation.workflows_availables"
@go-to-generate-workflow="goToGenerateWorkflow"
/>
</li>
<li v-if="canDelete">
<a
class="btn btn-delete"
@click="modal.showModal = true"
:title="$t('action.delete')"
>{{ $t('delete_evaluation') }}</a>
</li>
</ul>
</div>
<list-workflow-modal <teleport to="body">
:workflows="evaluation.workflows" <modal
:allowCreate="true" v-if="modal.showModal"
relatedEntityClass="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation" :modal-dialog-class="modal.modalDialogClass"
:relatedEntityId="evaluation.id" @close="modal.showModal = false"
:workflowsAvailables="evaluation.workflows_availables" >
@go-to-generate-workflow="goToGenerateWorkflow" <template #header>
></list-workflow-modal> <h2 class="modal-title">
{{ $t('delete.sure') }}
</li> </h2>
<li v-if="canDelete"> </template>
<a class="btn btn-delete" @click="modal.showModal = true" :title="$t('action.delete')">{{ $t('delete_evaluation')}}</a> <template #body>
</li> <p>{{ $t('delete.sure_description') }}</p>
</ul> </template>
</div> <template #footer>
<button
<teleport to="body"> class="btn btn-danger"
<modal v-if="modal.showModal" :modalDialogClass="modal.modalDialogClass" @close="modal.showModal = false"> @click="removeEvaluation(evaluation)"
<template v-slot:header> >
<h2 class="modal-title">{{ $t('delete.sure') }}</h2> {{ $t('delete.ok') }}
</template> </button>
<template v-slot:body> </template>
<p>{{ $t('delete.sure_description') }}</p> </modal>
</template> </teleport>
<template v-slot:footer> </div>
<button class="btn btn-danger" @click="removeEvaluation(evaluation)">
{{ $t('delete.ok') }}
</button>
</template>
</modal>
</teleport>
</div>
</template> </template>
<script> <script>

View File

@ -1,62 +1,87 @@
<template> <template>
<div v-if="hasResult" class="addResult"> <div
v-if="hasResult"
class="addResult"
>
<p
v-if="pickedResults.length ===0"
class="chill-no-data-statement"
>
Aucun résultat associé
</p>
<p v-if="pickedResults.length ===0" class="chill-no-data-statement"> <ul class="list-suggest remove-items">
Aucun résultat associé <li
</p> v-for="r in pickedResults"
@click="removeResult(r)"
:key="r.id"
>
<span>
{{ r.title.fr }}
</span>
</li>
</ul>
<ul class="list-suggest remove-items"> <div
<li v-for="r in pickedResults" @click="removeResult(r)" :key="r.id"> class="accordion"
<span> id="expandedSuggestions"
{{ r.title.fr }} >
</span> <div class="accordion-item">
</li> <h2
</ul> class="accordion-header"
id="heading_expanded_suggestions"
>
<button
v-if="isExpanded"
class="accordion-button"
type="button"
data-bs-toggle="collapse"
aria-expanded="true"
@click="toggleSelect"
>
Masquer
</button>
<div class="accordion" id="expandedSuggestions"> <button
<div class="accordion-item"> v-else
<h2 class="accordion-header" id="heading_expanded_suggestions"> class="accordion-button collapsed"
type="button"
<button v-if="isExpanded" data-bs-toggle="collapse"
class="accordion-button" aria-expanded="false"
type="button" @click="toggleSelect"
data-bs-toggle="collapse" >
aria-expanded="true" Résultats et orientations disponibles
@click="toggleSelect"> </button>
Masquer </h2>
</button> <div
class="accordion-collapse"
<button v-else id="collapse_expanded_suggestions"
class="accordion-button collapsed" aria-labelledby="heading_expanded_suggestions"
type="button" data-bs-parent="#expandedSuggestions"
data-bs-toggle="collapse" >
aria-expanded="false" <template v-if="isExpanded">
@click="toggleSelect"> <ul class="list-suggest add-items">
Résultats et orientations disponibles <li
</button> v-for="r in availableForCheckResults"
@click="addResult(r)"
</h2> :key="r.id"
<div class="accordion-collapse" id="collapse_expanded_suggestions" >
aria-labelledby="heading_expanded_suggestions" data-bs-parent="#expandedSuggestions"> <span>{{ r.title.fr }}</span>
</li>
<template v-if="isExpanded"> </ul>
<ul class="list-suggest add-items"> </template>
<li v-for="r in availableForCheckResults" @click="addResult(r)" :key="r.id"> </div>
<span>{{ r.title.fr }}</span>
</li>
</ul>
</template>
</div>
</div>
</div> </div>
</div>
</div> </div>
<div v-if="!hasResult" class="noResult"> <div
<div class="chill-no-data-statement"> v-if="!hasResult"
{{ $t('goal_has_no_result') }} class="noResult"
</div> >
</div> <div class="chill-no-data-statement">
{{ $t('goal_has_no_result') }}
</div>
</div>
</template> </template>
<script> <script>

View File

@ -1,10 +1,10 @@
<template> <template>
<div> <div>
<!--h2> <!--h2>
{{ $t('evaluation_title') }} {{ $t('evaluation_title') }}
</h2--> </h2-->
<div class="m-md-3"> <div class="m-md-3">
<!--div class="row mb-3"> <!--div class="row mb-3">
<label class="col-sm-4 col-form-label">{{ $t('evaluation_status') }}</label> <label class="col-sm-4 col-form-label">{{ $t('evaluation_status') }}</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -18,178 +18,244 @@
</div--> </div-->
<div class="row mb-3"> <div class="row mb-3">
<label class="col-4 col-sm-2 col-md-4 col-lg-2 col-form-label"> <label class="col-4 col-sm-2 col-md-4 col-lg-2 col-form-label">
{{ $t('evaluation_startdate') }} {{ $t('evaluation_startdate') }}
</label> </label>
<div class="col-8 col-sm-4 col-md-8 col-lg-4"> <div class="col-8 col-sm-4 col-md-8 col-lg-4">
<input class="form-control form-control-sm" type="date" v-model="startDate"/> <input
</div> class="form-control form-control-sm"
type="date"
v-model="startDate"
>
</div>
<label class="col-4 col-sm-2 col-md-4 col-lg-2 col-form-label"> <label class="col-4 col-sm-2 col-md-4 col-lg-2 col-form-label">
{{ $t('evaluation_enddate') }} {{ $t('evaluation_enddate') }}
</label> </label>
<div class="col-8 col-sm-4 col-md-8 col-lg-4"> <div class="col-8 col-sm-4 col-md-8 col-lg-4">
<input class="form-control form-control-sm" type="date" v-model="endDate"/> <input
</div> class="form-control form-control-sm"
type="date"
v-model="endDate"
>
</div>
</div> </div>
<div class="row mb-3"> <div class="row mb-3">
<label class="col-4 col-sm-2 col-md-4 col-lg-2 col-form-label"> <label class="col-4 col-sm-2 col-md-4 col-lg-2 col-form-label">
{{ $t('evaluation_maxdate') }} {{ $t('evaluation_maxdate') }}
</label> </label>
<div class="col-8 col-sm-4 col-md-8 col-lg-4"> <div class="col-8 col-sm-4 col-md-8 col-lg-4">
<input class="form-control form-control-sm" type="date" v-model="maxDate"/> <input
</div> class="form-control form-control-sm"
type="date"
v-model="maxDate"
>
</div>
<label class="col-4 col-sm-2 col-md-4 col-lg-2 col-form-label"> <label class="col-4 col-sm-2 col-md-4 col-lg-2 col-form-label">
{{ $t('evaluation_warning_interval') }} {{ $t('evaluation_warning_interval') }}
</label> </label>
<div class="col-8 col-sm-4 col-md-8 col-lg-4"> <div class="col-8 col-sm-4 col-md-8 col-lg-4">
<input class="form-control form-control-sm" type="number" v-model.number="warningInterval"/> <input
</div> class="form-control form-control-sm"
type="number"
v-model.number="warningInterval"
>
</div>
</div> </div>
<div class="row mb-3">
<label class="col-4 col-sm-2 col-md-4 col-lg-2 col-form-label">
{{ $t('evaluation_time_spent') }}
</label>
<div class="col-8 col-sm-4 col-md-8 col-lg-4">
<select class="form-control form-control-sm" type="time" v-model="timeSpent">
<option disabled value="">{{ $t('select_time_spent') }}</option>
<option v-for="time in timeSpentChoices" :value="time.value">
{{ time.text }}
</option>
</select>
</div>
</div>
<div class="row mb-3"> <div class="row mb-3">
<label class="col-sm-4 col-form-label visually-hidden">{{ $t('evaluation_public_comment') }}</label> <label class="col-4 col-sm-2 col-md-4 col-lg-2 col-form-label">
<div class="col-sm-12"> {{ $t('evaluation_time_spent') }}
<ckeditor </label>
:editor="editor" <div class="col-8 col-sm-4 col-md-8 col-lg-4">
:placeholder="$t('evaluation_comment_placeholder')" <select
v-model="comment" class="form-control form-control-sm"
tag-name="textarea" type="time"
></ckeditor> v-model="timeSpent"
</div> >
<option
disabled
value=""
>
{{ $t('select_time_spent') }}
</option>
<option
v-for="time in timeSpentChoices"
:value="time.value"
>
{{ time.text }}
</option>
</select>
</div>
</div> </div>
<div v-if="evaluation.documents.length > 0" class="row mb-3"> <div class="row mb-3">
<h5>{{ $t('Documents') }} :</h5> <label class="col-sm-4 col-form-label visually-hidden">{{ $t('evaluation_public_comment') }}</label>
<div class="col-sm-12">
<ckeditor
:editor="editor"
:placeholder="$t('evaluation_comment_placeholder')"
v-model="comment"
tag-name="textarea"
/>
</div>
</div>
<div class="flex-table"> <div
<div class="item-bloc" v-for="(d, i) in evaluation.documents" :key="d.id" :class="[parseInt(this.docAnchorId) === d.id ? 'bg-blink' : 'nothing']"> v-if="evaluation.documents.length > 0"
<div :id="`document_${d.id}`" class="item-row"> class="row mb-3"
<div class="input-group input-group-lg mb-3 row"> >
<label class="col-sm-3 col-form-label">Titre du document:</label> <h5>{{ $t('Documents') }} :</h5>
<div class="col-sm-9">
<input <div class="flex-table">
class="form-control document-title" <div
type="text" class="item-bloc"
:value="d.title" v-for="(d, i) in evaluation.documents"
:id="d.id" :key="d.id"
:data-key="i" :class="[parseInt(this.docAnchorId) === d.id ? 'bg-blink' : 'nothing']"
@input="onInputDocumentTitle"/> >
<div
:id="`document_${d.id}`"
class="item-row"
>
<div class="input-group input-group-lg mb-3 row">
<label class="col-sm-3 col-form-label">Titre du document:</label>
<div class="col-sm-9">
<input
class="form-control document-title"
type="text"
:value="d.title"
:id="d.id"
:data-key="i"
@input="onInputDocumentTitle"
>
</div> </div>
</div> </div>
</div>
<div class="item-row">
<div class="item-col item-meta">
<p v-if="d.createdBy" class="createdBy">Créé par {{ d.createdBy.text }}<br/>
Le {{ $d(ISOToDatetime(d.createdAt.datetime), 'long') }}</p>
</div>
</div> </div>
<div class="item-row"> <div class="item-row">
<div class="item-col"> <div class="item-col item-meta">
<ul class="record_actions"> <p
<li v-if="d.workflows_availables.length > 0"> v-if="d.createdBy"
<list-workflow-modal class="createdBy"
:workflows="d.workflows" >
:allowCreate="true" Créé par {{ d.createdBy.text }}<br>
relatedEntityClass="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocument" Le {{ $d(ISOToDatetime(d.createdAt.datetime), 'long') }}
:relatedEntityId="d.id" </p>
:workflowsAvailables="d.workflows_availables" </div>
:preventDefaultMoveToGenerate="true" </div>
:goToGenerateWorkflowPayload="{doc: d}" <div class="item-row">
@go-to-generate-workflow="goToGenerateWorkflowEvaluationDocument" <div class="item-col">
></list-workflow-modal> <ul class="record_actions">
</li> <li v-if="d.workflows_availables.length > 0">
<li> <list-workflow-modal
:workflows="d.workflows"
:allow-create="true"
related-entity-class="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocument"
:related-entity-id="d.id"
:workflows-availables="d.workflows_availables"
:prevent-default-move-to-generate="true"
:go-to-generate-workflow-payload="{doc: d}"
@go-to-generate-workflow="goToGenerateWorkflowEvaluationDocument"
/>
</li>
<li>
<button
v-if="AmIRefferer"
class="btn btn-notify"
@click="goToGenerateDocumentNotification(d, false)"
/>
<template v-else>
<button <button
v-if="AmIRefferer" id="btnGroupNotifyButtons"
class="btn btn-notify" type="button"
@click="goToGenerateDocumentNotification(d, false)"> class="btn btn-notify dropdown-toggle"
:title="$t('notification_send')"
data-bs-toggle="dropdown"
aria-expanded="false"
>
&nbsp;
</button> </button>
<template v-else> <ul
<button id="btnGroupNotifyButtons" type="button" class="btn btn-notify dropdown-toggle" :title="$t('notification_send')" data-bs-toggle="dropdown" aria-expanded="false">&nbsp;</button> class="dropdown-menu"
<ul class="dropdown-menu" aria-labelledby="btnGroupNotifyButtons"> aria-labelledby="btnGroupNotifyButtons"
<li><a class="dropdown-item" @click="goToGenerateDocumentNotification(d, true)">{{ $t('notification_notify_referrer') }}</a></li> >
<li><a class="dropdown-item" @click="goToGenerateDocumentNotification(d, false)">{{ $t('notification_notify_any') }}</a></li> <li>
</ul> <a
</template> class="dropdown-item"
</li> @click="goToGenerateDocumentNotification(d, true)"
<li> >{{ $t('notification_notify_referrer') }}</a>
<document-action-buttons-group </li>
:stored-object="d.storedObject" <li>
:filename="d.title" <a
:can-edit="true" class="dropdown-item"
:execute-before-leave="submitBeforeLeaveToEditor" @click="goToGenerateDocumentNotification(d, false)"
:davLink="d.storedObject._links?.dav_link.href" >{{ $t('notification_notify_any') }}</a>
:davLinkExpiration="d.storedObject._links?.dav_link.expiration" </li>
@on-stored-object-status-change="onStatusDocumentChanged" </ul>
></document-action-buttons-group> </template>
</li> </li>
<li> <li>
<add-async-upload <document-action-buttons-group
:buttonTitle="$t('replace')" :stored-object="d.storedObject"
:options="asyncUploadOptions" :filename="d.title"
:btnClasses="{'btn': true, 'btn-edit': true}" :can-edit="true"
@addDocument="(arg) => replaceDocument(d, arg)" :execute-before-leave="submitBeforeLeaveToEditor"
> :dav-link="d.storedObject._links?.dav_link.href"
</add-async-upload> :dav-link-expiration="d.storedObject._links?.dav_link.expiration"
</li> @on-stored-object-status-change="onStatusDocumentChanged"
<li v-if="d.workflows.length === 0"> />
<a class="btn btn-delete" @click="removeDocument(d)"> </li>
</a> <li>
</li> <add-async-upload
</ul> :button-title="$t('replace')"
</div> :options="asyncUploadOptions"
</div> :btn-classes="{'btn': true, 'btn-edit': true}"
</div> @add-document="(arg) => replaceDocument(d, arg)"
</div> />
</div> </li>
<li v-if="d.workflows.length === 0">
<div class="row mb-3"> <a
<h6>{{ $t('document_add') }} :</h6> class="btn btn-delete"
<pick-template @click="removeDocument(d)"
entityClass="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation" />
:id="evaluation.id" </li>
:templates="getTemplatesAvailables" </ul>
:preventDefaultMoveToGenerate="true" </div>
@go-to-generate-document="submitBeforeGenerate" </div>
> </div>
<template v-slot:title> </div>
<label class="col-form-label">{{ $t('evaluation_generate_a_document') }}</label>
</template>
</pick-template>
<div>
<label class="col-form-label">{{ $t('document_upload') }}</label>
<ul class="record_actions document-upload">
<li>
<add-async-upload
:buttonTitle="$t('browse')"
:options="asyncUploadOptions"
@addDocument="addDocument"
>
</add-async-upload>
</li>
</ul>
</div> </div>
</div> <div class="row mb-3">
</div> <h6>{{ $t('document_add') }} :</h6>
</div> <pick-template
entity-class="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation"
:id="evaluation.id"
:templates="getTemplatesAvailables"
:prevent-default-move-to-generate="true"
@go-to-generate-document="submitBeforeGenerate"
>
<template #title>
<label class="col-form-label">{{ $t('evaluation_generate_a_document') }}</label>
</template>
</pick-template>
<div>
<label class="col-form-label">{{ $t('document_upload') }}</label>
<ul class="record_actions document-upload">
<li>
<add-async-upload
:button-title="$t('browse')"
:options="asyncUploadOptions"
@add-document="addDocument"
/>
</li>
</ul>
</div>
</div>
</div>
</div>
</template> </template>
<script> <script>

View File

@ -1,72 +1,80 @@
<template> <template>
<fieldset
class="mb-3"
id="actionType"
>
<div class="row">
<legend class="col-sm-4 col-form-label">
{{ $t('action.label') }}
</legend>
<div class="col-sm-8">
<VueMultiselect
v-model="action"
:options="actions.options"
@select="selectAction"
@remove="unselectAction"
:multiple="true"
:close-on-select="false"
:placeholder="$t('action.placeholder')"
:custom-label="formatSocialAction"
track-by="id"
:searchable="true"
/>
</div>
</div>
</fieldset>
<fieldset class="mb-3" id="actionType"> <fieldset
<div class="row"> class="mb-3"
<legend class="col-sm-4 col-form-label">{{ $t('action.label')}}</legend> id="goal"
<div class="col-sm-8"> >
<div class="row">
<legend class="col-sm-4 col-form-label">
{{ $t('goal.label') }}
</legend>
<div class="col-sm-8">
<VueMultiselect
v-model="goal"
:options="goals.options"
@select="selectGoal"
@remove="unselectGoal"
:multiple="true"
:close-on-select="false"
:placeholder="$t('goal.placeholder')"
label="title"
:custom-label="transTitle"
track-by="id"
:searchable="true"
/>
</div>
</div>
</fieldset>
<VueMultiselect <fieldset
v-model="action" class="mb-3"
:options="actions.options" id="result"
@select="selectAction" >
@remove="unselectAction" <div class="row">
:multiple="true" <legend class="col-sm-4 col-form-label">
:close-on-select="false" {{ $t('result.label') }}
:placeholder="$t('action.placeholder')" </legend>
:custom-label="formatSocialAction" <div class="col-sm-8">
track-by="id" <VueMultiselect
:searchable="true" v-model="result"
></VueMultiselect> :options="results.options"
@select="selectResult"
</div> @remove="unselectResult"
</div> :multiple="true"
</fieldset> :close-on-select="false"
:placeholder="$t('result.placeholder')"
<fieldset class="mb-3" id="goal"> label="title"
<div class="row"> :custom-label="transTitle"
<legend class="col-sm-4 col-form-label">{{ $t('goal.label')}}</legend> track-by="id"
<div class="col-sm-8"> :searchable="true"
/>
<VueMultiselect </div>
v-model="goal" </div>
:options="goals.options" </fieldset>
@select="selectGoal"
@remove="unselectGoal"
:multiple="true"
:close-on-select="false"
:placeholder="$t('goal.placeholder')"
label="title"
:custom-label="transTitle"
track-by="id"
:searchable="true"
></VueMultiselect>
</div>
</div>
</fieldset>
<fieldset class="mb-3" id="result">
<div class="row">
<legend class="col-sm-4 col-form-label">{{ $t('result.label')}}</legend>
<div class="col-sm-8">
<VueMultiselect
v-model="result"
:options="results.options"
@select="selectResult"
@remove="unselectResult"
:multiple="true"
:close-on-select="false"
:placeholder="$t('result.placeholder')"
label="title"
:custom-label="transTitle"
track-by="id"
:searchable="true"
></VueMultiselect>
</div>
</div>
</fieldset>
</template> </template>
<script> <script>

View File

@ -1,38 +1,62 @@
<template> <template>
<ol class="breadcrumb"> <ol class="breadcrumb">
<li <li
v-for="s in steps" v-for="s in steps"
:key="s" :key="s"
class="breadcrumb-item" :class="{ active: step === s }" class="breadcrumb-item"
:class="{ active: step === s }"
> >
{{ $t('household_members_editor.app.steps.'+s) }} {{ $t('household_members_editor.app.steps.'+s) }}
</li> </li>
</ol> </ol>
<concerned v-if="step === 'concerned'"></concerned> <concerned v-if="step === 'concerned'" />
<household v-if="step === 'household'" @ready-to-go="goToNext"></household> <household
<household-address v-if="step === 'household_address'"></household-address> v-if="step === 'household'"
<positioning v-if="step === 'positioning'"></positioning> @ready-to-go="goToNext"
<dates v-if="step === 'confirm'"></dates> />
<confirmation v-if="step === 'confirm'"></confirmation> <household-address v-if="step === 'household_address'" />
<positioning v-if="step === 'positioning'" />
<dates v-if="step === 'confirm'" />
<confirmation v-if="step === 'confirm'" />
<ul class="record_actions sticky-form-buttons"> <ul class="record_actions sticky-form-buttons">
<li class="cancel" v-if="step !== 'concerned'"> <li
<button class="btn btn-cancel" @click="goToPrevious"> class="cancel"
v-if="step !== 'concerned'"
>
<button
class="btn btn-cancel"
@click="goToPrevious"
>
{{ $t('household_members_editor.app.previous') }} {{ $t('household_members_editor.app.previous') }}
</button> </button>
</li> </li>
<li class="cancel" v-else-if="hasReturnPath"> <li
<button class="btn btn-cancel" @click="goToPrevious"> class="cancel"
v-else-if="hasReturnPath"
>
<button
class="btn btn-cancel"
@click="goToPrevious"
>
{{ $t('household_members_editor.app.cancel') }} {{ $t('household_members_editor.app.cancel') }}
</button> </button>
</li> </li>
<li v-if="step !== 'confirm'"> <li v-if="step !== 'confirm'">
<button class="btn btn-action" @click="goToNext" :disabled="!isNextAllowed"> <button
{{ $t('household_members_editor.app.next') }}&nbsp;<i class="fa fa-arrow-right"></i> class="btn btn-action"
@click="goToNext"
:disabled="!isNextAllowed"
>
{{ $t('household_members_editor.app.next') }}&nbsp;<i class="fa fa-arrow-right" />
</button> </button>
</li> </li>
<li v-else> <li v-else>
<button class="btn btn-save" @click="confirm" :disabled="hasWarnings || !lastStepIsSaveAllowed"> <button
class="btn btn-save"
@click="confirm"
:disabled="hasWarnings || !lastStepIsSaveAllowed"
>
{{ $t('household_members_editor.app.save') }} {{ $t('household_members_editor.app.save') }}
</button> </button>
</li> </li>

View File

@ -1,5 +1,7 @@
<template> <template>
<h2 class="mt-4">{{ $t('household_members_editor.concerned.title') }}</h2> <h2 class="mt-4">
{{ $t('household_members_editor.concerned.title') }}
</h2>
<div v-if="noPerson"> <div v-if="noPerson">
<div class="alert alert-info"> <div class="alert alert-info">
@ -10,33 +12,47 @@
<p>{{ $t('household_members_editor.concerned.persons_will_be_moved') }}&nbsp;:</p> <p>{{ $t('household_members_editor.concerned.persons_will_be_moved') }}&nbsp;:</p>
<ul class="list-suggest remove-items inline"> <ul class="list-suggest remove-items inline">
<li v-for="c in concerned" :key="c.person.id" @click="removeConcerned(c)"> <li
<span><person-text :person="c.person"></person-text></span> v-for="c in concerned"
:key="c.person.id"
@click="removeConcerned(c)"
>
<span><person-text :person="c.person" /></span>
</li> </li>
</ul> </ul>
<div class="alert alert-info" v-if="concernedPersonsWithHouseholds.length > 0"> <div
class="alert alert-info"
v-if="concernedPersonsWithHouseholds.length > 0"
>
<p>{{ $t('household_members_editor.concerned.persons_with_household') }}</p> <p>{{ $t('household_members_editor.concerned.persons_with_household') }}</p>
<ul v-for="c in concernedPersonsWithHouseholds" :key="c.person.id"> <ul
v-for="c in concernedPersonsWithHouseholds"
:key="c.person.id"
>
<li> <li>
{{ c.person.text }} {{ c.person.text }}
{{ $t('household_members_editor.concerned.already_belongs_to_household') }} {{ $t('household_members_editor.concerned.already_belongs_to_household') }}
<a target="_blank" :href="this.makeHouseholdLink(c.person.current_household_id)">{{c.person.current_household_id}}</a>. <a
target="_blank"
:href="this.makeHouseholdLink(c.person.current_household_id)"
>{{ c.person.current_household_id }}</a>.
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
<ul class="record_actions"> <ul class="record_actions">
<li class="add-persons"> <li class="add-persons">
<add-persons <add-persons
buttonTitle="household_members_editor.concerned.add_persons" button-title="household_members_editor.concerned.add_persons"
modalTitle="household_members_editor.concerned.search" modal-title="household_members_editor.concerned.search"
v-bind:key="addPersons.key" :key="addPersons.key"
v-bind:options="addPersons.options" :options="addPersons.options"
@addNewPersons="addNewPersons" @add-new-persons="addNewPersons"
ref="addPersons"> <!-- to cast child method --> ref="addPersons"
>
<!-- to cast child method -->
</add-persons> </add-persons>
</li> </li>
</ul> </ul>

View File

@ -1,5 +1,8 @@
<template> <template>
<div v-if="hasWarning" class="alert alert-warning"> <div
v-if="hasWarning"
class="alert alert-warning"
>
{{ $t('household_members_editor.confirmation.there_are_warnings') }} {{ $t('household_members_editor.confirmation.there_are_warnings') }}
</div> </div>
@ -8,10 +11,18 @@
</p> </p>
<ul> <ul>
<li v-for="(msg, i) in warnings" class="warning" :key="i"> <li
v-for="(msg, i) in warnings"
class="warning"
:key="i"
>
{{ $t(msg.m, msg.a) }} {{ $t(msg.m, msg.a) }}
</li> </li>
<li v-for="(msg, i) in errors" class="error" :key="i"> <li
v-for="(msg, i) in errors"
class="error"
:key="i"
>
{{ msg }} {{ msg }}
</li> </li>
</ul> </ul>

View File

@ -1,25 +1,31 @@
<template> <template>
<div class="flex-table mb-5" v-if="hasHousehold"> <div
class="flex-table mb-5"
v-if="hasHousehold"
>
<div class="item-bloc"> <div class="item-bloc">
<household-render-box :household="fakeHouseholdWithConcerned"></household-render-box> <household-render-box :household="fakeHouseholdWithConcerned" />
</div> </div>
</div> </div>
<div class="flex-table" v-if="isModeLeave"> <div
class="flex-table"
v-if="isModeLeave"
>
<div class="item-bloc"> <div class="item-bloc">
<section> <section>
<div class="item-row"> <div class="item-row">
<div class="item-col"> <div class="item-col">
<div class="h4"> <div class="h4">
<span class="fa-stack fa-lg"> <span class="fa-stack fa-lg">
<i class="fa fa-home fa-stack-1x"></i> <i class="fa fa-home fa-stack-1x" />
<i class="fa fa-ban fa-stack-2x text-danger"></i> <i class="fa fa-ban fa-stack-2x text-danger" />
</span> </span>
{{ $t('household_members_editor.household.leave_without_household') }} {{ $t('household_members_editor.household.leave_without_household') }}
</div> </div>
</div> </div>
</div> </div>
<div class="item-row"> <div class="item-row">
{{ $t('household_members_editor.household.will_leave_any_household_explanation')}} {{ $t('household_members_editor.household.will_leave_any_household_explanation') }}
</div> </div>
</section> </section>
</div> </div>

View File

@ -1,15 +1,21 @@
<template> <template>
<current-household />
<current-household></current-household>
<h2>{{ $t('household_members_editor.dates.dates_title') }}</h2> <h2>{{ $t('household_members_editor.dates.dates_title') }}</h2>
<div class="mb-3 row"> <div class="mb-3 row">
<label for="start_date" class="col-form-label col-sm-4 required"> <label
for="start_date"
class="col-form-label col-sm-4 required"
>
{{ $t('household_members_editor.dates.start_date') }} {{ $t('household_members_editor.dates.start_date') }}
</label> </label>
<div class="col-sm-8"> <div class="col-sm-8">
<input type="date" v-model="startDate" class="form-control" /> <input
type="date"
v-model="startDate"
class="form-control"
>
</div> </div>
</div> </div>
@ -18,15 +24,30 @@
<div class="mb-3 row"> <div class="mb-3 row">
<label class="col-form-label col-sm-4 required">{{ $t('household_members_editor.composition.household_composition') }}</label> <label class="col-form-label col-sm-4 required">{{ $t('household_members_editor.composition.household_composition') }}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select v-model="householdCompositionType" class="form-select form-control"> <select
<option v-for="t in householdCompositionTypes" :key="t.id" :value="t.id">{{ t.label.fr }}</option> v-model="householdCompositionType"
class="form-select form-control"
>
<option
v-for="t in householdCompositionTypes"
:key="t.id"
:value="t.id"
>
{{ t.label.fr }}
</option>
</select> </select>
</div> </div>
</div> </div>
<div class="mb-3 row"> <div class="mb-3 row">
<label class="col-form-label col-sm-4 required">{{ $t('household_members_editor.composition.number_of_children') }}</label> <label class="col-form-label col-sm-4 required">{{ $t('household_members_editor.composition.number_of_children') }}</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input type="number" v-model="numberOfChildren" min="0" max="30" class="form-control"/> <input
type="number"
v-model="numberOfChildren"
min="0"
max="30"
class="form-control"
>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,49 +1,77 @@
<template> <template>
<h2 class="mt-4">
{{ $t('household_members_editor.household_part') }}
</h2>
<h2 class="mt-4">{{ $t('household_members_editor.household_part') }}</h2> <div
class="alert alert-info"
<div class="alert alert-info" v-if="!hasHousehold"> v-if="!hasHousehold"
>
{{ $t('household_members_editor.household.no_household_choose_one') }} {{ $t('household_members_editor.household.no_household_choose_one') }}
</div> </div>
<template v-else> <template v-else>
<current-household></current-household> <current-household />
</template> </template>
<div v-if="hasHouseholdSuggestion" class="householdSuggestions my-5"> <div
v-if="hasHouseholdSuggestion"
class="householdSuggestions my-5"
>
<h4 class="mb-3"> <h4 class="mb-3">
{{ $t('household_members_editor.household.household_suggested') }} {{ $t('household_members_editor.household.household_suggested') }}
</h4> </h4>
<p>{{ $t('household_members_editor.household.household_suggested_explanation') }}</p> <p>{{ $t('household_members_editor.household.household_suggested_explanation') }}</p>
<div class="accordion" id="householdSuggestions"> <div
class="accordion"
id="householdSuggestions"
>
<div class="accordion-item"> <div class="accordion-item">
<h2 class="accordion-header" id="heading_household_suggestions"> <h2
<button v-if="!showHouseholdSuggestion" class="accordion-header"
class="accordion-button collapsed" id="heading_household_suggestions"
type="button" >
data-bs-toggle="collapse" <button
aria-expanded="false" v-if="!showHouseholdSuggestion"
@click="toggleHouseholdSuggestion"> class="accordion-button collapsed"
type="button"
data-bs-toggle="collapse"
aria-expanded="false"
@click="toggleHouseholdSuggestion"
>
{{ $tc('household_members_editor.show_household_suggestion', countHouseholdSuggestion) }} {{ $tc('household_members_editor.show_household_suggestion', countHouseholdSuggestion) }}
</button> </button>
<button v-if="showHouseholdSuggestion" <button
class="accordion-button" v-if="showHouseholdSuggestion"
type="button" class="accordion-button"
data-bs-toggle="collapse" type="button"
aria-expanded="true" data-bs-toggle="collapse"
@click="toggleHouseholdSuggestion"> aria-expanded="true"
@click="toggleHouseholdSuggestion"
>
{{ $t('household_members_editor.hide_household_suggestion') }} {{ $t('household_members_editor.hide_household_suggestion') }}
</button> </button>
<!-- disabled bootstrap behaviour: data-bs-target="#collapse_household_suggestions" aria-controls="collapse_household_suggestions" --> <!-- disabled bootstrap behaviour: data-bs-target="#collapse_household_suggestions" aria-controls="collapse_household_suggestions" -->
</h2> </h2>
<div class="accordion-collapse" id="collapse_household_suggestions" <div
aria-labelledby="heading_household_suggestions" data-bs-parent="#householdSuggestions"> class="accordion-collapse"
id="collapse_household_suggestions"
aria-labelledby="heading_household_suggestions"
data-bs-parent="#householdSuggestions"
>
<div v-if="showHouseholdSuggestion"> <div v-if="showHouseholdSuggestion">
<div class="flex-table householdSuggestionList"> <div class="flex-table householdSuggestionList">
<div v-for="(s, i) in getSuggestions" class="item-bloc" :key="`householdSuggestions-${i}`"> <div
<household-render-box :household="s.household"></household-render-box> v-for="(s, i) in getSuggestions"
class="item-bloc"
:key="`householdSuggestions-${i}`"
>
<household-render-box :household="s.household" />
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<button class="btn btn-sm btn-choose" @click="selectHousehold(s.household)"> <button
class="btn btn-sm btn-choose"
@click="selectHousehold(s.household)"
>
{{ $t('household_members_editor.select_household') }} {{ $t('household_members_editor.select_household') }}
</button> </button>
</li> </li>
@ -59,24 +87,42 @@
<ul class="record_actions"> <ul class="record_actions">
<li v-if="hasHousehold"> <li v-if="hasHousehold">
<button @click="resetMode" class="btn btn-sm btn-misc">{{ $t('household_members_editor.household.reset_mode')}}</button> <button
@click="resetMode"
class="btn btn-sm btn-misc"
>
{{ $t('household_members_editor.household.reset_mode') }}
</button>
</li> </li>
<li v-if="!hasHousehold" class="add-persons"> <li
v-if="!hasHousehold"
class="add-persons"
>
<add-persons <add-persons
modalTitle="Chercher un ménage existant" modal-title="Chercher un ménage existant"
buttonTitle="Chercher un ménage existant" button-title="Chercher un ménage existant"
v-bind:key="addPersons.key" :key="addPersons.key"
v-bind:options="addPersons.options" :options="addPersons.options"
@addNewPersons="pickHouseholdFound" @add-new-persons="pickHouseholdFound"
ref="pickHousehold"> <!-- to cast child method --> ref="pickHousehold"
>
<!-- to cast child method -->
</add-persons> </add-persons>
</li> </li>
<li v-if="!hasHousehold"> <li v-if="!hasHousehold">
<button @click="setModeNew" class="btn btn-sm btn-create">{{ $t('household_members_editor.household.create_household') }}</button> <button
@click="setModeNew"
class="btn btn-sm btn-create"
>
{{ $t('household_members_editor.household.create_household') }}
</button>
</li> </li>
<li v-if="isModeLeaveAllowed && !hasHousehold"> <li v-if="isModeLeaveAllowed && !hasHousehold">
<button @click="setModeLeave" class="btn btn-sm btn-misc"> <button
<i class="fa fa-sign-out"></i> @click="setModeLeave"
class="btn btn-sm btn-misc"
>
<i class="fa fa-sign-out" />
{{ $t('household_members_editor.household.leave') }} {{ $t('household_members_editor.household.leave') }}
</button> </button>
</li> </li>

View File

@ -1,5 +1,5 @@
<template> <template>
<current-household></current-household> <current-household />
<ul class="record_actions"> <ul class="record_actions">
<!-- <li v-if="!hasHouseholdAddress && !isHouseholdForceAddress"> <!-- <li v-if="!hasHouseholdAddress && !isHouseholdForceAddress">
@ -9,20 +9,21 @@
</li> --> </li> -->
<li v-if="!hasHouseholdAddress"> <li v-if="!hasHouseholdAddress">
<add-address <add-address
:context="getAddressContext" :context="getAddressContext"
:key="addAddress.key" :key="addAddress.key"
:options="addAddress.options" :options="addAddress.options"
:addressChangedCallback="addressChanged" :address-changed-callback="addressChanged"
></add-address> />
</li> </li>
<li v-if="hasHouseholdAddress"> <li v-if="hasHouseholdAddress">
<button class="btn btn-remove" <button
@click="removeHouseholdAddress"> class="btn btn-remove"
@click="removeHouseholdAddress"
>
{{ $t('household_members_editor.household_address.remove_address') }} {{ $t('household_members_editor.household_address.remove_address') }}
</button> </button>
</li> </li>
</ul> </ul>
</template> </template>
<script> <script>

View File

@ -3,17 +3,26 @@
<div class="item-row"> <div class="item-row">
<div class="item-col"> <div class="item-col">
<div> <div>
<person-render-box render="badge" :options="{}" :person="conc.person"></person-render-box> <person-render-box
<span v-if="isHolder" class="badge bg-primary holder"> render="badge"
:options="{}"
:person="conc.person"
/>
<span
v-if="isHolder"
class="badge bg-primary holder"
>
{{ $t('household_members_editor.holder') }} {{ $t('household_members_editor.holder') }}
</span> </span>
</div> </div>
<div v-if="conc.person.birthdate !== null">{{ $t('person.born', {'gender': conc.person.gender.genderTranslation} ) }}</div> <div v-if="conc.person.birthdate !== null">
{{ $t('person.born', {'gender': conc.person.gender.genderTranslation} ) }}
</div>
</div> </div>
<div class="item-col"> <div class="item-col">
<ul class="list-content fa-ul"> <ul class="list-content fa-ul">
<li> <li>
<i class="fa fa-li fa-map-marker"></i> <i class="fa fa-li fa-map-marker" />
<span class="chill-no-data-statement">Sans adresse</span> <span class="chill-no-data-statement">Sans adresse</span>
</li> </li>
</ul> </ul>
@ -21,24 +30,42 @@
</div> </div>
<div class="item-row comment"> <div class="item-row comment">
<ckeditor :editor="editor" v-model="comment" tag-name="textarea"></ckeditor> <ckeditor
:editor="editor"
v-model="comment"
tag-name="textarea"
/>
</div> </div>
<div class="item-row participation-details"> <div class="item-row participation-details">
<div v-if="conc.position.allowHolder" class="action"> <div
<button class="btn" :class="{ 'btn-primary': isHolder, 'btn-secondary': !isHolder}" @click="toggleHolder"> v-if="conc.position.allowHolder"
{{ $t(isHolder ? 'household_members_editor.is_holder' : 'household_members_editor.is_not_holder') }} class="action"
>
<button
class="btn"
:class="{ 'btn-primary': isHolder, 'btn-secondary': !isHolder}"
@click="toggleHolder"
>
{{ $t(isHolder ? 'household_members_editor.is_holder' : 'household_members_editor.is_not_holder') }}
</button> </button>
</div> </div>
<div> <div>
<button @click="removePosition" class="btn btn-outline-primary"> <button
@click="removePosition"
class="btn btn-outline-primary"
>
{{ $t('household_members_editor.remove_position', {position: conc.position.label.fr}) }} {{ $t('household_members_editor.remove_position', {position: conc.position.label.fr}) }}
</button> </button>
</div> </div>
<div> <div>
<button v-if="conc.allowRemove" @click="removeConcerned" class="btn btn-primary"> <button
v-if="conc.allowRemove"
@click="removeConcerned"
class="btn btn-primary"
>
{{ $t('household_members_editor.remove_concerned') }} {{ $t('household_members_editor.remove_concerned') }}
</button> </button>
</div> </div>

View File

@ -1,11 +1,11 @@
<template> <template>
<ckeditor <ckeditor
name="content" name="content"
v-bind:placeholder="$t('household_members_editor.positioning.comment_placeholder')" :placeholder="$t('household_members_editor.positioning.comment_placeholder')"
:editor="editor" :editor="editor"
v-model="content" v-model="content"
tag-name="textarea"> tag-name="textarea"
</ckeditor> />
</template> </template>
<script> <script>

View File

@ -1,51 +1,51 @@
<template> <template>
<current-household></current-household> <current-household />
<h2>{{ $t('household_members_editor.positioning.persons_to_positionnate')}}</h2> <h2>{{ $t('household_members_editor.positioning.persons_to_positionnate') }}</h2>
<div class="list-household-members flex-table"> <div class="list-household-members flex-table">
<div <div
v-for="conc in concerned" v-for="conc in concerned"
class="item-bloc" class="item-bloc"
v-bind:key="conc.person.id" :key="conc.person.id"
> >
<div class="pick-position item-row"> <div class="pick-position item-row">
<div class="person"> <div class="person">
<!-- <h3>{{ conc.person.text }}</h3> --> <!-- <h3>{{ conc.person.text }}</h3> -->
<h3><person-text :person="conc.person"></person-text></h3> <h3><person-text :person="conc.person" /></h3>
</div> </div>
<div class="holder"> <div class="holder">
<button <button
class="btn" class="btn"
:disabled="!allowHolderForConcerned(conc)" :disabled="!allowHolderForConcerned(conc)"
:class="{'btn-outline-chill-green': !conc.holder, 'btn-chill-green': conc.holder }" :class="{'btn-outline-chill-green': !conc.holder, 'btn-chill-green': conc.holder }"
@click="toggleHolder(conc)" @click="toggleHolder(conc)"
> >
{{ $t('household_members_editor.positioning.holder') }} {{ $t('household_members_editor.positioning.holder') }}
</button> </button>
</div> </div>
<div <div
v-for="(position, i) in positions" v-for="(position, i) in positions"
:key="`position-${i}`" :key="`position-${i}`"
class="position" class="position"
> >
<button <button
class="btn" class="btn"
:class="{ 'btn-primary': conc.position === position, 'btn-outline-primary': conc.position !== position }" :class="{ 'btn-primary': conc.position === position, 'btn-outline-primary': conc.position !== position }"
@click="moveToPosition(conc.person.id, position.id)" @click="moveToPosition(conc.person.id, position.id)"
> >
{{ position.label.fr }} {{ position.label.fr }}
</button> </button>
</div> </div>
</div> </div>
<div class="item-row"> <div class="item-row">
<div> <div>
<h6>{{ $t('household_members_editor.positioning.comment') }}</h6> <h6>{{ $t('household_members_editor.positioning.comment') }}</h6>
<person-comment :conc="conc"></person-comment> <person-comment :conc="conc" />
</div> </div>
</div>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>

View File

@ -1,127 +1,166 @@
<template> <template>
<div id="visgraph" />
<div id="visgraph"></div> <teleport to="#visgraph-legend">
<div class="post-menu">
<teleport to="#visgraph-legend"> <div class="list-group mt-4">
<div class="post-menu"> <button
<div class="list-group mt-4"> type="button"
<button type="button" class="list-group-item list-group-item-action btn btn-misc" @click="createRelationship"> class="list-group-item list-group-item-action btn btn-misc"
<i class="fa fa-plus"></i> {{ $t('visgraph.add_link') }} @click="createRelationship"
</button> >
<a type="button" class="list-group-item list-group-item-action btn btn-misc" id="exportCanvasBtn" @click="exportCanvasAsImage"> <i class="fa fa-plus" /> {{ $t('visgraph.add_link') }}
<i class="fa fa-camera fa-fw"></i> {{ $t('visgraph.screenshot') }} </button>
</a> <a
</div> type="button"
class="list-group-item list-group-item-action btn btn-misc"
<div v-if="displayHelpMessage" class="alert alert-info mt-3"> id="exportCanvasBtn"
{{ $t('visgraph.create_link_help') }} @click="exportCanvasAsImage"
</div> >
<i class="fa fa-camera fa-fw" /> {{ $t('visgraph.screenshot') }}
<div class="my-4 legend"> </a>
<h3>{{ $t('visgraph.Legend') }}</h3>
<div class="list-group">
<label class="list-group-item" v-for="(layer, i) in legendLayers" :key="`layer-${i}`">
<input
class="form-check-input me-1"
type="checkbox"
:value="layer.id"
v-model="checkedLayers"
@change="toggleLayer"
/>
{{ layer.label }}
</label>
</div>
</div>
</div> </div>
</teleport>
<teleport to="body"> <div
<modal v-if="modal.showModal" :modalDialogClass="modal.modalDialogClass" @close="modal.showModal = false"> v-if="displayHelpMessage"
<template v-slot:header> class="alert alert-info mt-3"
<h2 class="modal-title">{{ $t(modal.title) }}</h2> >
<!-- {{ modal.data.id }} --> {{ $t('visgraph.create_link_help') }}
</template> </div>
<template v-slot:body>
<div v-if="modal.action === 'delete'"> <div class="my-4 legend">
<p>{{ $t('visgraph.delete_confirmation_text') }}</p> <h3>{{ $t('visgraph.Legend') }}</h3>
<div class="list-group">
<label
class="list-group-item"
v-for="(layer, i) in legendLayers"
:key="`layer-${i}`"
>
<input
class="form-check-input me-1"
type="checkbox"
:value="layer.id"
v-model="checkedLayers"
@change="toggleLayer"
>
{{ layer.label }}
</label>
</div>
</div>
</div>
</teleport>
<teleport to="body">
<modal
v-if="modal.showModal"
:modal-dialog-class="modal.modalDialogClass"
@close="modal.showModal = false"
>
<template #header>
<h2 class="modal-title">
{{ $t(modal.title) }}
</h2>
<!-- {{ modal.data.id }} -->
</template>
<template #body>
<div v-if="modal.action === 'delete'">
<p>{{ $t('visgraph.delete_confirmation_text') }}</p>
</div>
<div v-else>
<form>
<div class="row">
<div class="col-12 text-center">
{{ $t('visgraph.between') }}<br>{{ $t('visgraph.and') }}
</div>
<div class="col">
<small>{{ getPersonAge(modal.data.from) }}</small>
<h4>{{ getPerson(modal.data.from).text }}</h4>
<p
class="text-start"
v-if="relation && relation.title"
>
<span v-if="reverse">
{{ $t('visgraph.relation_from_to_like', [ getPerson(modal.data.from).text, getPerson(modal.data.to).text, relation.reverseTitle.fr.toLowerCase() ]) }}
</span>
<span v-else>
{{ $t('visgraph.relation_from_to_like', [ getPerson(modal.data.from).text, getPerson(modal.data.to).text, relation.title.fr.toLowerCase() ]) }}
</span>
</p>
</div>
<div class="col text-end">
<small>{{ getPersonAge(modal.data.to) }}</small>
<h4>{{ getPerson(modal.data.to).text }}</h4>
<p
class="text-end"
v-if="relation && relation.title"
>
<span v-if="reverse">
{{ $t('visgraph.relation_from_to_like', [ getPerson(modal.data.to).text, getPerson(modal.data.from).text, relation.title.fr.toLowerCase() ]) }}
</span>
<span v-else>
{{ $t('visgraph.relation_from_to_like', [ getPerson(modal.data.to).text, getPerson(modal.data.from).text, relation.reverseTitle.fr.toLowerCase() ]) }}
</span>
</p>
</div>
</div> </div>
<div v-else> <div class="my-3">
<form> <VueMultiselect
<div class="row"> id="relation"
<div class="col-12 text-center">{{ $t('visgraph.between') }}<br>{{ $t('visgraph.and') }}</div> label="title"
<div class="col"> track-by="id"
<small>{{ getPersonAge(modal.data.from) }}</small> :custom-label="customLabel"
<h4>{{ getPerson(modal.data.from).text }}</h4> :placeholder="$t('visgraph.choose_relation')"
<p class="text-start" v-if="relation && relation.title"> :close-on-select="true"
<span v-if="reverse"> :multiple="false"
{{ $t('visgraph.relation_from_to_like', [ getPerson(modal.data.from).text, getPerson(modal.data.to).text, relation.reverseTitle.fr.toLowerCase() ])}} :searchable="true"
</span> :options="relations"
<span v-else> v-model="relation"
{{ $t('visgraph.relation_from_to_like', [ getPerson(modal.data.from).text, getPerson(modal.data.to).text, relation.title.fr.toLowerCase() ])}} :value="relation"
</span> />
</p>
</div>
<div class="col text-end">
<small>{{ getPersonAge(modal.data.to) }}</small>
<h4>{{ getPerson(modal.data.to).text }}</h4>
<p class="text-end" v-if="relation && relation.title">
<span v-if="reverse">
{{ $t('visgraph.relation_from_to_like', [ getPerson(modal.data.to).text, getPerson(modal.data.from).text, relation.title.fr.toLowerCase() ])}}
</span>
<span v-else>
{{ $t('visgraph.relation_from_to_like', [ getPerson(modal.data.to).text, getPerson(modal.data.from).text, relation.reverseTitle.fr.toLowerCase() ])}}
</span>
</p>
</div>
</div>
<div class="my-3">
<VueMultiselect
id="relation"
label="title"
track-by="id"
:custom-label="customLabel"
:placeholder="$t('visgraph.choose_relation')"
:close-on-select="true"
:multiple="false"
:searchable="true"
:options="relations"
v-model="relation"
:value="relation"
>
</VueMultiselect>
</div>
<div class="form-check form-switch">
<input
class="form-check-input"
type="checkbox"
id="reverse"
v-model="reverse"
>
<label class="form-check-label" for="reverse">{{ $t('visgraph.reverse_relation') }}</label>
</div>
</form>
</div> </div>
</template> <div class="form-check form-switch">
<template v-slot:footer> <input
<button class="btn" :class="modal.button.class" @click="submitRelationship"> class="form-check-input"
{{ $t(modal.button.text)}} type="checkbox"
</button> id="reverse"
<button class="btn btn-delete" v-if="modal.action === 'edit'" @click="dropRelationship"></button> v-model="reverse"
</template> >
</modal> <label
</teleport> class="form-check-label"
<ul class="record_actions sticky-form-buttons"> for="reverse"
<li> >{{ $t('visgraph.reverse_relation') }}</label>
<add-persons </div>
buttonTitle="visgraph.add_person" </form>
modalTitle="visgraph.add_person" </div>
v-bind:key="addPersons.key" </template>
v-bind:options="addPersons.options" <template #footer>
@addNewPersons="addNewPersons" <button
ref="addPersons"> class="btn"
</add-persons> :class="modal.button.class"
</li> @click="submitRelationship"
</ul> >
{{ $t(modal.button.text) }}
</button>
<button
class="btn btn-delete"
v-if="modal.action === 'edit'"
@click="dropRelationship"
/>
</template>
</modal>
</teleport>
<ul class="record_actions sticky-form-buttons">
<li>
<add-persons
button-title="visgraph.add_person"
modal-title="visgraph.add_person"
:key="addPersons.key"
:options="addPersons.options"
@add-new-persons="addNewPersons"
ref="addPersons"
/>
</li>
</ul>
</template> </template>
<script> <script>

View File

@ -1,7 +1,16 @@
<template> <template>
<ul class="list-suggest add-items" v-if="suggested.length > 0"> <ul
<li v-for="(r, i) in suggested" @click="setReferrer(r)" :key="i"><span>{{ r.text }}</span></li> class="list-suggest add-items"
</ul> v-if="suggested.length > 0"
>
<li
v-for="(r, i) in suggested"
@click="setReferrer(r)"
:key="i"
>
<span>{{ r.text }}</span>
</li>
</ul>
</template> </template>
<script> <script>

View File

@ -1,91 +1,114 @@
<template> <template>
<a class="btn" :class="getClassButton" :title="$t(buttonTitle || '')" @click="openModal"> <a
<span v-if="displayTextButton">{{ $t(buttonTitle || '') }}</span> class="btn"
</a> :class="getClassButton"
:title="$t(buttonTitle || '')"
@click="openModal"
>
<span v-if="displayTextButton">{{ $t(buttonTitle || '') }}</span>
</a>
<teleport to="body"> <teleport to="body">
<modal v-if="modal.showModal" <modal
:modalDialogClass="modal.modalDialogClass" v-if="modal.showModal"
@close="modal.showModal = false"> :modal-dialog-class="modal.modalDialogClass"
@close="modal.showModal = false"
>
<template #header>
<h3 class="modal-title">
{{ $t(modalTitle) }}
</h3>
</template>
<template v-slot:header> <template #body-head>
<h3 class="modal-title">{{ $t(modalTitle) }}</h3> <div class="modal-body">
</template> <div class="search">
<label
class="col-form-label"
style="float: right;"
>
{{ $tc('add_persons.suggested_counter', suggestedCounter) }}
</label>
<template v-slot:body-head> <input
<div class="modal-body"> id="search-persons"
<div class="search"> name="query"
v-model="query"
:placeholder="$t('add_persons.search_some_persons')"
ref="search"
>
<i class="fa fa-search fa-lg" />
<i
class="fa fa-times"
v-if="queryLength >= 3"
@click="resetSuggestion"
/>
</div>
</div>
<div
class="modal-body"
v-if="checkUniq === 'checkbox'"
>
<div class="count">
<span>
<a
v-if="suggestedCounter > 2"
@click="selectAll"
>
{{ $t('action.check_all') }}
</a>
<a
v-if="selectedCounter > 0"
@click="resetSelection"
>
<i v-if="suggestedCounter > 2"> </i>
{{ $t('action.reset') }}
</a>
</span>
<span v-if="selectedCounter > 0">
{{ $tc('add_persons.selected_counter', selectedCounter) }}
</span>
</div>
</div>
</template>
<label class="col-form-label" style="float: right;"> <template #body>
{{ $tc('add_persons.suggested_counter', suggestedCounter) }} <div class="results">
</label> <person-suggestion
v-for="item in this.selectedAndSuggested.slice().reverse()"
:key="itemKey(item)"
:item="item"
:search="search"
:type="checkUniq"
@save-form-on-the-fly="saveFormOnTheFly"
@new-prior-suggestion="newPriorSuggestion"
@update-selected="updateSelected"
/>
<input id="search-persons" <div class="create-button">
name="query" <on-the-fly
v-model="query" v-if="queryLength >= 3 && (options.type.includes('person') || options.type.includes('thirdparty'))"
:placeholder="$t('add_persons.search_some_persons')" :button-text="$t('onthefly.create.button', {q: query})"
ref="search" /> :allowed-types="options.type"
<i class="fa fa-search fa-lg"></i> :query="query"
<i class="fa fa-times" v-if="queryLength >= 3" @click="resetSuggestion"></i> action="create"
@save-form-on-the-fly="saveFormOnTheFly"
ref="onTheFly"
/>
</div>
</div>
</template>
</div> <template #footer>
</div> <button
<div class="modal-body" v-if="checkUniq === 'checkbox'"> class="btn btn-create"
<div class="count"> @click.prevent="$emit('addNewPersons', { selected, modal })"
<span> >
<a v-if="suggestedCounter > 2" @click="selectAll"> {{ $t('action.add') }}
{{ $t('action.check_all')}} </button>
</a> </template>
<a v-if="selectedCounter > 0" @click="resetSelection"> </modal>
<i v-if="suggestedCounter > 2"> </i> </teleport>
{{ $t('action.reset')}}
</a>
</span>
<span v-if="selectedCounter > 0">
{{ $tc('add_persons.selected_counter', selectedCounter) }}
</span>
</div>
</div>
</template>
<template v-slot:body>
<div class="results">
<person-suggestion
v-for="item in this.selectedAndSuggested.slice().reverse()"
v-bind:key="itemKey(item)"
v-bind:item="item"
v-bind:search="search"
v-bind:type="checkUniq"
@saveFormOnTheFly="saveFormOnTheFly"
@newPriorSuggestion="newPriorSuggestion"
@updateSelected="updateSelected">
</person-suggestion>
<div class="create-button">
<on-the-fly
v-if="queryLength >= 3 && (options.type.includes('person') || options.type.includes('thirdparty'))"
:buttonText="$t('onthefly.create.button', {q: query})"
:allowedTypes="options.type"
:query="query"
action="create"
@saveFormOnTheFly="saveFormOnTheFly"
ref="onTheFly">
</on-the-fly>
</div>
</div>
</template>
<template v-slot:footer>
<button class="btn btn-create"
@click.prevent="$emit('addNewPersons', { selected, modal })">
{{ $t('action.add')}}
</button>
</template>
</modal>
</teleport>
</template> </template>
<script> <script>

View File

@ -1,39 +1,41 @@
<template> <template>
<div class="list-item" :class="{ checked: isChecked }"> <div
class="list-item"
:class="{ checked: isChecked }"
>
<label>
<div>
<input
:type="type"
v-model="selected"
name="item"
:id="item"
:value="setValueByType(item, type)"
>
</div>
<label> <suggestion-person
<div> v-if="item.result.type === 'person'"
<input :item="item"
v-bind:type="type" />
v-model="selected"
name="item"
v-bind:id="item"
v-bind:value="setValueByType(item, type)" />
</div>
<suggestion-person <suggestion-third-party
v-if="item.result.type === 'person'" v-if="item.result.type === 'thirdparty'"
v-bind:item="item"> @new-prior-suggestion="newPriorSuggestion"
</suggestion-person> :item="item"
/>
<suggestion-third-party <suggestion-user
v-if="item.result.type === 'thirdparty'" v-if="item.result.type === 'user'"
@newPriorSuggestion="newPriorSuggestion" :item="item"
v-bind:item="item"> />
</suggestion-third-party>
<suggestion-user <suggestion-household
v-if="item.result.type === 'user'" v-if="item.result.type === 'household'"
v-bind:item="item"> :item="item"
</suggestion-user> />
</label>
<suggestion-household </div>
v-if="item.result.type === 'household'"
v-bind:item="item">
</suggestion-household>
</label>
</div>
</template> </template>
<script> <script>

View File

@ -1,14 +1,17 @@
<template> <template>
<div class="container household"> <div class="container household">
<household-render-box :household="item.result" :isAddressMultiline="false"></household-render-box> <household-render-box
</div> :household="item.result"
:is-address-multiline="false"
/>
</div>
<div class="right_actions"> <div class="right_actions">
<badge-entity <badge-entity
:entity="item.result" :entity="item.result"
:options="{ displayLong: true }"> :options="{ displayLong: true }"
</badge-entity> />
</div> </div>
</template> </template>
<script> <script>

View File

@ -1,28 +1,34 @@
<template> <template>
<div class="container"> <div class="container">
<span class="name"> <span class="name">
<person-text :person="item.result"></person-text> <person-text :person="item.result" />
</span> </span>
<span class="birthday" v-if="hasBirthdate"> <span
{{ $d(item.result.birthdate.datetime, 'short') }} class="birthday"
</span> v-if="hasBirthdate"
<span class="location" v-if="hasAddress"> >
{{ item.result.current_household_address.text }} - {{ $d(item.result.birthdate.datetime, 'short') }}
{{ item.result.current_household_address.postcode.name }} </span>
</span> <span
</div> class="location"
v-if="hasAddress"
>
{{ item.result.current_household_address.text }} -
{{ item.result.current_household_address.postcode.name }}
</span>
</div>
<div class="right_actions"> <div class="right_actions">
<badge-entity <badge-entity
:entity="item.result" :entity="item.result"
:options="{ displayLong: true }"> :options="{ displayLong: true }"
</badge-entity> />
<on-the-fly <on-the-fly
type="person" type="person"
v-bind:id="item.result.id" :id="item.result.id"
action="show"> action="show"
</on-the-fly> />
</div> </div>
</template> </template>
<script> <script>

Some files were not shown because too many files have changed in this diff Show More