mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-01 20:43:49 +00:00
first eslint corrections
This commit is contained in:
@@ -1,24 +1,28 @@
|
||||
<template>
|
||||
<banner></banner>
|
||||
<sticky-nav></sticky-nav>
|
||||
<banner />
|
||||
<sticky-nav />
|
||||
|
||||
<h1 v-if="accompanyingCourse.step === 'DRAFT'">{{ $t('course.title.draft') }}</h1>
|
||||
<h1 v-else>{{ $t('course.title.active') }}</h1>
|
||||
<h1 v-if="accompanyingCourse.step === 'DRAFT'">
|
||||
{{ $t('course.title.draft') }}
|
||||
</h1>
|
||||
<h1 v-else>
|
||||
{{ $t('course.title.active') }}
|
||||
</h1>
|
||||
|
||||
<persons-associated></persons-associated>
|
||||
<course-location></course-location>
|
||||
<origin-demand></origin-demand>
|
||||
<admin-location></admin-location>
|
||||
<requestor v-bind:isAnonymous="accompanyingCourse.requestorAnonymous"></requestor>
|
||||
<social-issue></social-issue>
|
||||
<scopes></scopes>
|
||||
<referrer></referrer>
|
||||
<resources></resources>
|
||||
<start-date v-if="accompanyingCourse.step.startsWith('CONFIRMED')"></start-date>
|
||||
<comment v-if="accompanyingCourse.step === 'DRAFT'"></comment>
|
||||
<confirm v-if="accompanyingCourse.step === 'DRAFT'"></confirm>
|
||||
<persons-associated />
|
||||
<course-location />
|
||||
<origin-demand />
|
||||
<admin-location />
|
||||
<requestor :is-anonymous="accompanyingCourse.requestorAnonymous" />
|
||||
<social-issue />
|
||||
<scopes />
|
||||
<referrer />
|
||||
<resources />
|
||||
<start-date v-if="accompanyingCourse.step.startsWith('CONFIRMED')" />
|
||||
<comment v-if="accompanyingCourse.step === 'DRAFT'" />
|
||||
<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>
|
||||
<span>{{ error.sta }} {{ error.txt }}</span><br>
|
||||
<span>{{ $t(error.msg) }}</span>
|
||||
|
@@ -1,35 +1,38 @@
|
||||
<template>
|
||||
<div class="vue-component">
|
||||
<h2><a id="section-40"></a>{{ $t('admin_location.title') }}</h2>
|
||||
<div class="vue-component">
|
||||
<h2><a id="section-40" />{{ $t('admin_location.title') }}</h2>
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="selectAdminLocation">
|
||||
{{ $t('admin_location.title') }}
|
||||
</label>
|
||||
<div class="mb-4">
|
||||
<label for="selectAdminLocation">
|
||||
{{ $t('admin_location.title') }}
|
||||
</label>
|
||||
|
||||
<VueMultiselect
|
||||
name="selectAdminLocation"
|
||||
label="text"
|
||||
:custom-label="customLabel"
|
||||
track-by="id"
|
||||
:multiple="false"
|
||||
:searchable="true"
|
||||
:placeholder="$t('admin_location.placeholder')"
|
||||
v-model="value"
|
||||
:options="options"
|
||||
group-values="locations"
|
||||
group-label="locationCategories"
|
||||
:select-label="$t('multiselect.select_label')"
|
||||
:deselect-label="$t('multiselect.deselect_label')"
|
||||
:selected-label="$t('multiselect.selected_label')"
|
||||
@select="updateAdminLocation">
|
||||
</VueMultiselect>
|
||||
</div>
|
||||
<VueMultiselect
|
||||
name="selectAdminLocation"
|
||||
label="text"
|
||||
:custom-label="customLabel"
|
||||
track-by="id"
|
||||
:multiple="false"
|
||||
:searchable="true"
|
||||
:placeholder="$t('admin_location.placeholder')"
|
||||
v-model="value"
|
||||
:options="options"
|
||||
group-values="locations"
|
||||
group-label="locationCategories"
|
||||
:select-label="$t('multiselect.select_label')"
|
||||
:deselect-label="$t('multiselect.deselect_label')"
|
||||
:selected-label="$t('multiselect.selected_label')"
|
||||
@select="updateAdminLocation"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-if="!isAdminLocationValid" class="alert alert-warning to-confirm">
|
||||
{{ $t('admin_location.not_valid') }}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="!isAdminLocationValid"
|
||||
class="alert alert-warning to-confirm"
|
||||
>
|
||||
{{ $t('admin_location.not_valid') }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,73 +1,97 @@
|
||||
<template>
|
||||
<teleport to="#header-accompanying_course-name #banner-flags">
|
||||
<toggle-flags />
|
||||
</teleport>
|
||||
|
||||
<teleport to="#header-accompanying_course-name #banner-flags">
|
||||
<toggle-flags></toggle-flags>
|
||||
</teleport>
|
||||
|
||||
<teleport to="#header-accompanying_course-name #banner-status">
|
||||
<span v-if="accompanyingCourse.step === 'DRAFT'"
|
||||
class="text-md-end d-md-block">
|
||||
<span class="badge bg-secondary">
|
||||
{{ $t('course.step.draft') }}
|
||||
</span>
|
||||
<teleport to="#header-accompanying_course-name #banner-status">
|
||||
<span
|
||||
v-if="accompanyingCourse.step === 'DRAFT'"
|
||||
class="text-md-end d-md-block"
|
||||
>
|
||||
<span class="badge bg-secondary">
|
||||
{{ $t('course.step.draft') }}
|
||||
</span>
|
||||
<span v-else-if="accompanyingCourse.step === 'CONFIRMED' || accompanyingCourse.step === 'CONFIRMED_INACTIVE_SHORT' || accompanyingCourse.step === 'CONFIRMED_INACTIVE_LONG'" class="text-md-end">
|
||||
<span v-if="accompanyingCourse.step === 'CONFIRMED'" class="d-md-block mb-md-3">
|
||||
<span class="badge bg-primary">
|
||||
{{ $t('course.step.active') }}
|
||||
</span>
|
||||
</span>
|
||||
<span v-else-if="accompanyingCourse.step === 'CONFIRMED_INACTIVE_SHORT'" class="d-md-block mb-md-3">
|
||||
<span class="badge bg-chill-yellow text-primary">
|
||||
{{ $t('course.step.inactive_short') }}
|
||||
</span>
|
||||
</span>
|
||||
<span v-else-if="accompanyingCourse.step === 'CONFIRMED_INACTIVE_LONG'" 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>
|
||||
<b>{{ accompanyingCourse.user.text }}</b>
|
||||
<template v-if="accompanyingCourse.user.isAbsent">
|
||||
</span>
|
||||
<span
|
||||
v-else-if="accompanyingCourse.step === 'CONFIRMED' || accompanyingCourse.step === 'CONFIRMED_INACTIVE_SHORT' || accompanyingCourse.step === 'CONFIRMED_INACTIVE_LONG'"
|
||||
class="text-md-end"
|
||||
>
|
||||
<span
|
||||
v-if="accompanyingCourse.step === 'CONFIRMED'"
|
||||
class="d-md-block mb-md-3"
|
||||
>
|
||||
<span class="badge bg-primary">
|
||||
{{ $t('course.step.active') }}
|
||||
</span>
|
||||
</span>
|
||||
<span
|
||||
v-else-if="accompanyingCourse.step === 'CONFIRMED_INACTIVE_SHORT'"
|
||||
class="d-md-block mb-md-3"
|
||||
>
|
||||
<span class="badge bg-chill-yellow text-primary">
|
||||
{{ $t('course.step.inactive_short') }}
|
||||
</span>
|
||||
</span>
|
||||
<span
|
||||
v-else-if="accompanyingCourse.step === 'CONFIRMED_INACTIVE_LONG'"
|
||||
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>
|
||||
<b>{{ accompanyingCourse.user.text }}</b>
|
||||
<template v-if="accompanyingCourse.user.isAbsent">
|
||||
|
||||
<span class="badge bg-danger rounded-pill" title="Absent">A</span>
|
||||
</template>
|
||||
</span>
|
||||
</span>
|
||||
<span
|
||||
class="badge bg-danger rounded-pill"
|
||||
title="Absent"
|
||||
>A</span>
|
||||
</template>
|
||||
</span>
|
||||
</span>
|
||||
<span v-else class="text-md-end d-md-block">
|
||||
<span class="badge bg-danger">
|
||||
{{ $t('course.step.closed') }}
|
||||
</span>
|
||||
<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>
|
||||
<span
|
||||
v-else
|
||||
class="text-md-end d-md-block"
|
||||
>
|
||||
<span class="badge bg-danger">
|
||||
{{ $t('course.step.closed') }}
|
||||
</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">
|
||||
<social-issue
|
||||
v-for="issue in accompanyingCourse.socialIssues"
|
||||
v-bind:key="issue.id"
|
||||
v-bind:issue="issue">
|
||||
</social-issue>
|
||||
</teleport>
|
||||
|
||||
<teleport to="#header-accompanying_course-details #banner-persons-associated">
|
||||
<persons-associated :accompanyingCourse="accompanyingCourse"></persons-associated>
|
||||
</teleport>
|
||||
<teleport to="#header-accompanying_course-details #banner-social-issues">
|
||||
<social-issue
|
||||
v-for="issue in accompanyingCourse.socialIssues"
|
||||
:key="issue.id"
|
||||
:issue="issue"
|
||||
/>
|
||||
</teleport>
|
||||
|
||||
<teleport to="#header-accompanying_course-details #banner-persons-associated">
|
||||
<persons-associated :accompanying-course="accompanyingCourse" />
|
||||
</teleport>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,12 +1,32 @@
|
||||
<template>
|
||||
<span v-for="h in personsByHousehold()" :class="{ 'household': householdExists(h.id), 'no-household': !householdExists(h.id) }" :key="h.id">
|
||||
<a v-if="householdExists(h.id)" :href="householdLink(h.id)">
|
||||
<i class="fa fa-home fa-fw text-light" :title="$t('persons_associated.show_household_number', { id: h.id })"></i>
|
||||
</a>
|
||||
<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>
|
||||
</span>
|
||||
</span>
|
||||
<span
|
||||
v-for="h in personsByHousehold()"
|
||||
:class="{ 'household': householdExists(h.id), 'no-household': !householdExists(h.id) }"
|
||||
:key="h.id"
|
||||
>
|
||||
<a
|
||||
v-if="householdExists(h.id)"
|
||||
: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>
|
||||
|
||||
<script>
|
||||
|
@@ -1,22 +1,36 @@
|
||||
<template>
|
||||
<div class="text-md-end">
|
||||
<span class="d-block d-sm-inline-block mb-md-2">
|
||||
<a @click="toggleIntensity" class="flag-toggle">
|
||||
<span :class="{ 'on': !isRegular }">{{ $t('course.occasional') }}</span>
|
||||
<i class="fa" :class="{ 'fa-toggle-on': isRegular, 'fa-toggle-on fa-flip-horizontal': !isRegular }"></i>
|
||||
<span :class="{ 'on': isRegular }">{{ $t('course.regular') }}</span>
|
||||
</a>
|
||||
</span>
|
||||
<div class="text-md-end">
|
||||
<span class="d-block d-sm-inline-block mb-md-2">
|
||||
<a
|
||||
@click="toggleIntensity"
|
||||
class="flag-toggle"
|
||||
>
|
||||
<span :class="{ 'on': !isRegular }">{{ $t('course.occasional') }}</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">
|
||||
<button class="badge rounded-pill me-1" :class="{ 'bg-danger': isEmergency, 'bg-secondary': !isEmergency }" @click="toggleEmergency">
|
||||
{{ $t('course.emergency') }}
|
||||
</button>
|
||||
<button class="badge rounded-pill" :class="{ 'bg-danger': isConfidential, 'bg-secondary': !isConfidential }" @click="toggleConfidential">
|
||||
{{ $t('course.confidential') }}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
<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"
|
||||
>
|
||||
{{ $t('course.emergency') }}
|
||||
</button>
|
||||
<button
|
||||
class="badge rounded-pill"
|
||||
:class="{ 'bg-danger': isConfidential, 'bg-secondary': !isConfidential }"
|
||||
@click="toggleConfidential"
|
||||
>
|
||||
{{ $t('course.confidential') }}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,28 +1,39 @@
|
||||
<template>
|
||||
<li>
|
||||
<button class="btn btn-sm btn-secondary"
|
||||
@click="modal.showModal = true"
|
||||
:title="$t('courselocation.assign_course_address')">
|
||||
<i class="fa fa-map-marker"></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button
|
||||
class="btn btn-sm btn-secondary"
|
||||
@click="modal.showModal = true"
|
||||
:title="$t('courselocation.assign_course_address')"
|
||||
>
|
||||
<i class="fa fa-map-marker" />
|
||||
</button>
|
||||
</li>
|
||||
|
||||
<teleport to="body">
|
||||
<modal v-if="modal.showModal" :modalDialogClass="modal.modalDialogClass" @close="modal.showModal = false">
|
||||
<template v-slot:header>
|
||||
<h2 class="modal-title">{{ $t('courselocation.sure') }}</h2>
|
||||
</template>
|
||||
<template v-slot:body>
|
||||
<address-render-box :address="person.current_household_address"></address-render-box>
|
||||
<p>{{ $t('courselocation.sure_description') }}</p>
|
||||
</template>
|
||||
<template v-slot:footer>
|
||||
<button class="btn btn-danger" @click="assignAddress">
|
||||
{{ $t('courselocation.ok') }}
|
||||
</button>
|
||||
</template>
|
||||
</modal>
|
||||
</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('courselocation.sure') }}
|
||||
</h2>
|
||||
</template>
|
||||
<template #body>
|
||||
<address-render-box :address="person.current_household_address" />
|
||||
<p>{{ $t('courselocation.sure_description') }}</p>
|
||||
</template>
|
||||
<template #footer>
|
||||
<button
|
||||
class="btn btn-danger"
|
||||
@click="assignAddress"
|
||||
>
|
||||
{{ $t('courselocation.ok') }}
|
||||
</button>
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,53 +1,62 @@
|
||||
<template>
|
||||
<div class="vue-component">
|
||||
<h2><a id="section-100"></a>{{ $t('comment.title') }}</h2>
|
||||
<div class="vue-component">
|
||||
<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] }}
|
||||
TODO fix errors flashbag for app component
|
||||
</div-->
|
||||
|
||||
<div>
|
||||
<form @submit.prevent="submitform">
|
||||
<div>
|
||||
<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
|
||||
name="content"
|
||||
:placeholder="$t('comment.content')"
|
||||
:editor="editor"
|
||||
v-model="content"
|
||||
tag-name="textarea">
|
||||
</ckeditor>
|
||||
<div class="sub-comment">
|
||||
<div
|
||||
v-if="pinnedComment !== null && typeof pinnedComment.creator !== 'undefined'"
|
||||
class="metadata"
|
||||
>
|
||||
{{ $t('comment.created_by', [
|
||||
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 v-if="pinnedComment !== null && typeof pinnedComment.creator !== 'undefined'" class="metadata">
|
||||
{{ $t('comment.created_by', [
|
||||
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')"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<ul class="record_actions">
|
||||
<li v-if="pinnedComment !== null">
|
||||
<a class="btn btn-delete"
|
||||
@click="removeComment">
|
||||
{{ $t('action.delete') }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<ul class="record_actions">
|
||||
<li v-if="pinnedComment !== null">
|
||||
<a
|
||||
class="btn btn-delete"
|
||||
@click="removeComment"
|
||||
>
|
||||
{{ $t('action.delete') }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,100 +1,133 @@
|
||||
<template>
|
||||
<div class="vue-component">
|
||||
<h2><a id="section-110"></a>
|
||||
<div class="vue-component">
|
||||
<h2>
|
||||
<a id="section-110" />
|
||||
{{ $t('confirm.title') }}
|
||||
</h2>
|
||||
<div>
|
||||
<p v-html="$t('confirm.text_draft', [$t('course.step.draft')])"></p>
|
||||
</h2>
|
||||
<div>
|
||||
<p v-html="$t('confirm.text_draft', [$t('course.step.draft')])" />
|
||||
|
||||
<div v-if="!isValidToBeConfirmed">
|
||||
<div class="alert alert-warning">
|
||||
{{ $t('confirm.alert_validation') }}
|
||||
<ul class="mt-2">
|
||||
<li v-for="k in validationKeys" :key=k>
|
||||
{{ $t(notValidMessages[k].msg) }}
|
||||
<a :href="notValidMessages[k].anchor">
|
||||
<i class="fa fa-level-up fa-fw"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button class="btn btn-save" disabled>
|
||||
{{ $t('confirm.ok') }}
|
||||
</button>
|
||||
<div class="alert alert-warning">
|
||||
{{ $t('confirm.alert_validation') }}
|
||||
<ul class="mt-2">
|
||||
<li
|
||||
v-for="k in validationKeys"
|
||||
:key="k"
|
||||
>
|
||||
{{ $t(notValidMessages[k].msg) }}
|
||||
<a :href="notValidMessages[k].anchor">
|
||||
<i class="fa fa-level-up fa-fw" />
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-delete" :href="deleteLink">
|
||||
{{ $t('confirm.delete') }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button
|
||||
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 v-else>
|
||||
<p v-html="$t('confirm.text_active', [$t('course.step.active')])"></p>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button
|
||||
class="btn btn-save"
|
||||
@click="modal.showModal = true">
|
||||
{{ $t('confirm.ok') }}
|
||||
</button>
|
||||
</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') }}
|
||||
<p v-html="$t('confirm.text_active', [$t('course.step.active')])" />
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button
|
||||
class="btn btn-save"
|
||||
@click="modal.showModal = true"
|
||||
>
|
||||
{{ $t('confirm.ok') }}
|
||||
</button>
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
</li>
|
||||
<li>
|
||||
<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>
|
||||
|
||||
<script>
|
||||
|
@@ -1,72 +1,91 @@
|
||||
<template>
|
||||
<div class="vue-component">
|
||||
<h2><a id="section-20"></a>
|
||||
{{ $t('courselocation.title') }}
|
||||
</h2>
|
||||
<div class="vue-component">
|
||||
<h2>
|
||||
<a id="section-20" />
|
||||
{{ $t('courselocation.title') }}
|
||||
</h2>
|
||||
|
||||
<div v-for="error in displayErrors" class="alert alert-danger my-2" :key="error">
|
||||
{{ error }}
|
||||
</div>
|
||||
|
||||
<div v-if="hasNoLocation">
|
||||
<label class="chill-no-data-statement">
|
||||
{{ $t('courselocation.no_address') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="flex-table" v-if="accompanyingCourse.location">
|
||||
<div class="item-bloc">
|
||||
<address-render-box
|
||||
:address="accompanyingCourse.location">
|
||||
</address-render-box>
|
||||
|
||||
<div v-if="isPersonLocation" class="alert alert-secondary separator">
|
||||
<label class="col-form-label">
|
||||
{{ $t('courselocation.person_locator', [ accompanyingCourse.personLocation.text ]) }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div v-if="isTemporaryAddress" class="alert alert-warning separator">
|
||||
<p>
|
||||
{{ $t('courselocation.temporary_address_must_be_changed') }}
|
||||
<i class="fa fa-fw fa-map-marker"></i>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="hasNoPersonLocation" class="alert alert-danger no-person-location">
|
||||
<i class="fa fa-warning fa-2x"></i>
|
||||
<div>
|
||||
<p>
|
||||
{{ $t('courselocation.associate_at_least_one_person_with_one_household_with_address') }}
|
||||
<a href="#section-10">
|
||||
<i class="fa fa-level-up fa-fw"></i>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div
|
||||
v-for="error in displayErrors"
|
||||
class="alert alert-danger my-2"
|
||||
:key="error"
|
||||
>
|
||||
{{ error }}
|
||||
</div>
|
||||
|
||||
<div v-if="hasNoLocation">
|
||||
<label class="chill-no-data-statement">
|
||||
{{ $t('courselocation.no_address') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="flex-table"
|
||||
v-if="accompanyingCourse.location"
|
||||
>
|
||||
<div class="item-bloc">
|
||||
<address-render-box
|
||||
:address="accompanyingCourse.location"
|
||||
/>
|
||||
|
||||
<div
|
||||
v-if="isPersonLocation"
|
||||
class="alert alert-secondary separator"
|
||||
>
|
||||
<label class="col-form-label">
|
||||
{{ $t('courselocation.person_locator', [ accompanyingCourse.personLocation.text ]) }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="isTemporaryAddress"
|
||||
class="alert alert-warning separator"
|
||||
>
|
||||
<p>
|
||||
{{ $t('courselocation.temporary_address_must_be_changed') }}
|
||||
<i class="fa fa-fw fa-map-marker" />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="hasNoPersonLocation"
|
||||
class="alert alert-danger no-person-location"
|
||||
>
|
||||
<i class="fa fa-warning fa-2x" />
|
||||
<div>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<add-address
|
||||
v-if="!isPersonLocation"
|
||||
:key="key"
|
||||
:context="context"
|
||||
:options="options"
|
||||
:addressChangedCallback="submitTemporaryAddress"
|
||||
ref="addAddress">
|
||||
</add-address>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
{{ $t('courselocation.associate_at_least_one_person_with_one_household_with_address') }}
|
||||
<a href="#section-10">
|
||||
<i class="fa fa-level-up fa-fw" />
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="!isLocationValid" class="alert alert-warning to-confirm">
|
||||
{{ $t('courselocation.not_valid') }}
|
||||
</div>
|
||||
<div>
|
||||
<ul class="record_actions">
|
||||
<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>
|
||||
|
||||
<script>
|
||||
|
@@ -1,33 +1,36 @@
|
||||
<template>
|
||||
<div class="vue-component">
|
||||
<h2><a id="section-30"></a>{{ $t('origin.title') }}</h2>
|
||||
<div class="vue-component">
|
||||
<h2><a id="section-30" />{{ $t('origin.title') }}</h2>
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="selectOrigin">
|
||||
{{ $t('origin.title') }}
|
||||
</label>
|
||||
<div class="mb-4">
|
||||
<label for="selectOrigin">
|
||||
{{ $t('origin.title') }}
|
||||
</label>
|
||||
|
||||
<VueMultiselect
|
||||
name="selectOrigin"
|
||||
label="text"
|
||||
:custom-label="transText"
|
||||
track-by="id"
|
||||
:multiple="false"
|
||||
:searchable="true"
|
||||
:placeholder="$t('origin.placeholder')"
|
||||
v-model="value"
|
||||
:options="options"
|
||||
:select-label="$t('multiselect.select_label')"
|
||||
:deselect-label="$t('multiselect.deselect_label')"
|
||||
:selected-label="$t('multiselect.selected_label')"
|
||||
@select="updateOrigin">
|
||||
</VueMultiselect>
|
||||
</div>
|
||||
<VueMultiselect
|
||||
name="selectOrigin"
|
||||
label="text"
|
||||
:custom-label="transText"
|
||||
track-by="id"
|
||||
:multiple="false"
|
||||
:searchable="true"
|
||||
:placeholder="$t('origin.placeholder')"
|
||||
v-model="value"
|
||||
:options="options"
|
||||
:select-label="$t('multiselect.select_label')"
|
||||
:deselect-label="$t('multiselect.deselect_label')"
|
||||
:selected-label="$t('multiselect.selected_label')"
|
||||
@select="updateOrigin"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-if="!isOriginValid" class="alert alert-warning to-confirm">
|
||||
{{ $t('origin.not_valid') }}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="!isOriginValid"
|
||||
class="alert alert-warning to-confirm"
|
||||
>
|
||||
{{ $t('origin.not_valid') }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,78 +1,119 @@
|
||||
<template>
|
||||
<div class="vue-component">
|
||||
<h2><a id="section-10"></a>{{ $t('persons_associated.title')}}</h2>
|
||||
<div class="vue-component">
|
||||
<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>
|
||||
</div>
|
||||
<div v-else>
|
||||
</div>
|
||||
<div v-else>
|
||||
<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">
|
||||
<i class="fa fa-warning fa-2x"></i>
|
||||
<form method="GET" action="/fr/person/household/members/editor">
|
||||
<div class="float-button bottom"><div class="box">
|
||||
<div
|
||||
v-if="participationWithoutHousehold.length > 0"
|
||||
class="alert alert-warning no-household"
|
||||
>
|
||||
<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">
|
||||
<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>
|
||||
<p class="mb-3">{{ $t('persons_associated.person_without_household_warning') }}</p>
|
||||
<div class="form-check" v-for="p in participationWithoutHousehold" :key="p.id">
|
||||
<input type="checkbox"
|
||||
class="form-check-input"
|
||||
name="persons[]"
|
||||
checked="checked"
|
||||
:id="p.person.id"
|
||||
:value="p.person.id"
|
||||
/>
|
||||
<label class="form-check-label">
|
||||
<person-text :person="p.person"></person-text>
|
||||
</label>
|
||||
<p class="mb-3">
|
||||
{{ $t('persons_associated.person_without_household_warning') }}
|
||||
</p>
|
||||
<div
|
||||
class="form-check"
|
||||
v-for="p in participationWithoutHousehold"
|
||||
:key="p.id"
|
||||
>
|
||||
<input
|
||||
type="checkbox"
|
||||
class="form-check-input"
|
||||
name="persons[]"
|
||||
checked="checked"
|
||||
:id="p.person.id"
|
||||
:value="p.person.id"
|
||||
>
|
||||
<label class="form-check-label">
|
||||
<person-text :person="p.person" />
|
||||
</label>
|
||||
</div>
|
||||
<input type="hidden" name="expand_suggestions" value="true">
|
||||
<input type="hidden" name="returnPath" :value="getReturnPath">
|
||||
<input type="hidden" name="accompanying_period_id" :value="courseId">
|
||||
</div></div>
|
||||
<input
|
||||
type="hidden"
|
||||
name="expand_suggestions"
|
||||
value="true"
|
||||
>
|
||||
<input
|
||||
type="hidden"
|
||||
name="returnPath"
|
||||
:value="getReturnPath"
|
||||
>
|
||||
<input
|
||||
type="hidden"
|
||||
name="accompanying_period_id"
|
||||
:value="courseId"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-table mb-3">
|
||||
<div class="flex-table mb-3">
|
||||
<participation-item
|
||||
v-for="participation in currentParticipations"
|
||||
v-bind:participation="participation"
|
||||
v-bind:key="participation.id"
|
||||
@remove="removeParticipation"
|
||||
@close="closeParticipation">
|
||||
</participation-item>
|
||||
</div>
|
||||
v-for="participation in currentParticipations"
|
||||
:participation="participation"
|
||||
:key="participation.id"
|
||||
@remove="removeParticipation"
|
||||
@close="closeParticipation"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-if="suggestedPersons.length > 0">
|
||||
<div v-if="suggestedPersons.length > 0">
|
||||
<ul class="list-suggest add-items inline">
|
||||
<li v-for="p in suggestedPersons" :key="p.id" @click="addSuggestedPerson(p)">
|
||||
<person-text :person="p"></person-text>
|
||||
</li>
|
||||
<li
|
||||
v-for="p in suggestedPersons"
|
||||
:key="p.id"
|
||||
@click="addSuggestedPerson(p)"
|
||||
>
|
||||
<person-text :person="p" />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<ul class="record_actions">
|
||||
<li class="add-persons">
|
||||
<add-persons
|
||||
buttonTitle="persons_associated.add_persons"
|
||||
modalTitle="add_persons.title"
|
||||
v-bind:key="addPersons.key"
|
||||
v-bind:options="addPersons.options"
|
||||
@addNewPersons="addNewPersons"
|
||||
ref="addPersons"> <!-- to cast child method -->
|
||||
</add-persons>
|
||||
</li>
|
||||
<li class="add-persons">
|
||||
<add-persons
|
||||
button-title="persons_associated.add_persons"
|
||||
modal-title="add_persons.title"
|
||||
:key="addPersons.key"
|
||||
:options="addPersons.options"
|
||||
@add-new-persons="addNewPersons"
|
||||
ref="addPersons"
|
||||
>
|
||||
<!-- to cast child method -->
|
||||
</add-persons>
|
||||
</li>
|
||||
</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') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,65 +1,91 @@
|
||||
<template>
|
||||
<person-render-box render="bloc"
|
||||
:options="{
|
||||
addInfo : true,
|
||||
addId : false,
|
||||
addEntity: false,
|
||||
addLink: false,
|
||||
addHouseholdLink: false,
|
||||
addAltNames: true,
|
||||
addAge : true,
|
||||
hLevel : 3,
|
||||
isConfidential : false,
|
||||
isMultiline: true,
|
||||
}"
|
||||
:person="participation.person"
|
||||
:returnPath="getAccompanyingCourseReturnPath">
|
||||
<person-render-box
|
||||
render="bloc"
|
||||
:options="{
|
||||
addInfo : true,
|
||||
addId : false,
|
||||
addEntity: false,
|
||||
addLink: false,
|
||||
addHouseholdLink: false,
|
||||
addAltNames: true,
|
||||
addAge : true,
|
||||
hLevel : 3,
|
||||
isConfidential : false,
|
||||
isMultiline: true,
|
||||
}"
|
||||
: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>
|
||||
</person-render-box>
|
||||
|
||||
|
||||
<teleport to="body">
|
||||
<modal v-if="modal.showModal" :modalDialogClass="modal.modalDialogClass" @close="modal.showModal = false">
|
||||
<template v-slot:header>
|
||||
<h2 class="modal-title">{{ $t('persons_associated.sure') }}</h2>
|
||||
</template>
|
||||
<template v-slot:body>
|
||||
<p>{{ $t('persons_associated.sure_description') }}</p>
|
||||
</template>
|
||||
<template v-slot:footer>
|
||||
<button class="btn btn-danger" @click.prevent="$emit('close', participation)">
|
||||
{{ $t('persons_associated.ok') }}
|
||||
</button>
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
<template #body>
|
||||
<p>{{ $t('persons_associated.sure_description') }}</p>
|
||||
</template>
|
||||
<template #footer>
|
||||
<button
|
||||
class="btn btn-danger"
|
||||
@click.prevent="$emit('close', participation)"
|
||||
>
|
||||
{{ $t('persons_associated.ok') }}
|
||||
</button>
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,77 +1,92 @@
|
||||
<template>
|
||||
<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">
|
||||
<modal v-if="modal.showModal"
|
||||
:modalDialogClass="modal.modalDialogClass"
|
||||
@close="cancelChange">
|
||||
<template v-slot:header>
|
||||
<h3 class="modal-title">{{ $t('confirm.title') }}</h3>
|
||||
<modal
|
||||
v-if="modal.showModal"
|
||||
:modal-dialog-class="modal.modalDialogClass"
|
||||
@close="cancelChange"
|
||||
>
|
||||
<template #header>
|
||||
<h3 class="modal-title">
|
||||
{{ $t('confirm.title') }}
|
||||
</h3>
|
||||
</template>
|
||||
|
||||
<template v-slot:body-head>
|
||||
<template #body-head>
|
||||
<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>
|
||||
</template>
|
||||
|
||||
<template v-slot:footer>
|
||||
<button class="btn btn-save"
|
||||
@click.prevent="this.confirmReferrer">
|
||||
{{ $t('confirm.ok_referrer')}}
|
||||
<template #footer>
|
||||
<button
|
||||
class="btn btn-save"
|
||||
@click.prevent="this.confirmReferrer"
|
||||
>
|
||||
{{ $t('confirm.ok_referrer') }}
|
||||
</button>
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
|
||||
<div>
|
||||
|
||||
<label class="col-form-label" for="selectJob">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="selectJob"
|
||||
>
|
||||
{{ $t('job.label') }}
|
||||
</label>
|
||||
|
||||
<VueMultiselect
|
||||
name="selectJob"
|
||||
label="text"
|
||||
:custom-label="customJobLabel"
|
||||
track-by="id"
|
||||
:multiple="false"
|
||||
:searchable="true"
|
||||
:placeholder="$t('job.placeholder')"
|
||||
v-model="valueJob"
|
||||
:options="jobs"
|
||||
:select-label="$t('multiselect.select_label')"
|
||||
:deselect-label="$t('multiselect.deselect_label')"
|
||||
:selected-label="$t('multiselect.selected_label')"
|
||||
></VueMultiselect>
|
||||
name="selectJob"
|
||||
label="text"
|
||||
:custom-label="customJobLabel"
|
||||
track-by="id"
|
||||
:multiple="false"
|
||||
:searchable="true"
|
||||
:placeholder="$t('job.placeholder')"
|
||||
v-model="valueJob"
|
||||
:options="jobs"
|
||||
:select-label="$t('multiselect.select_label')"
|
||||
:deselect-label="$t('multiselect.deselect_label')"
|
||||
:selected-label="$t('multiselect.selected_label')"
|
||||
/>
|
||||
|
||||
<label class="col-form-label" for="selectReferrer">
|
||||
<label
|
||||
class="col-form-label"
|
||||
for="selectReferrer"
|
||||
>
|
||||
{{ $t('referrer.label') }}
|
||||
</label>
|
||||
|
||||
<VueMultiselect
|
||||
name="selectReferrer"
|
||||
label="text"
|
||||
track-by="id"
|
||||
:multiple="false"
|
||||
:searchable="true"
|
||||
:placeholder="$t('referrer.placeholder')"
|
||||
v-model="value"
|
||||
@select="updateReferrer"
|
||||
@remove="removeReferrer"
|
||||
:options="users"
|
||||
:select-label="$t('multiselect.select_label')"
|
||||
:deselect-label="$t('multiselect.deselect_label')"
|
||||
:selected-label="$t('multiselect.selected_label')"
|
||||
></VueMultiselect>
|
||||
name="selectReferrer"
|
||||
label="text"
|
||||
track-by="id"
|
||||
:multiple="false"
|
||||
:searchable="true"
|
||||
:placeholder="$t('referrer.placeholder')"
|
||||
v-model="value"
|
||||
@select="updateReferrer"
|
||||
@remove="removeReferrer"
|
||||
:options="users"
|
||||
:select-label="$t('multiselect.select_label')"
|
||||
:deselect-label="$t('multiselect.deselect_label')"
|
||||
:selected-label="$t('multiselect.selected_label')"
|
||||
/>
|
||||
|
||||
<template v-if="usersSuggestedFilteredByJob.length > 0">
|
||||
<ul class="list-suggest add-items inline">
|
||||
<li v-for="(u, i) in usersSuggestedFilteredByJob" @click="updateReferrer(u)" :key="`referrer-${i}`">
|
||||
<span>
|
||||
<user-render-box-badge :user="u"></user-render-box-badge>
|
||||
</span>
|
||||
<li
|
||||
v-for="(u, i) in usersSuggestedFilteredByJob"
|
||||
@click="updateReferrer(u)"
|
||||
:key="`referrer-${i}`"
|
||||
>
|
||||
<span>
|
||||
<user-render-box-badge :user="u" />
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
@@ -81,20 +96,23 @@
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button
|
||||
class="btn btn-create"
|
||||
type="button"
|
||||
name="button"
|
||||
@click="assignMe">
|
||||
class="btn btn-create"
|
||||
type="button"
|
||||
name="button"
|
||||
@click="assignMe"
|
||||
>
|
||||
{{ $t('referrer.assign_me') }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</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') }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@@ -1,164 +1,247 @@
|
||||
<template>
|
||||
<div class="vue-component">
|
||||
|
||||
<h2><a id="section-50"></a>{{ $t('requestor.title') }}</h2>
|
||||
|
||||
<div v-if="accompanyingCourse.requestor && isAnonymous" class="flex-table">
|
||||
<div class="vue-component">
|
||||
<h2><a id="section-50" />{{ $t('requestor.title') }}</h2>
|
||||
|
||||
<div
|
||||
v-if="accompanyingCourse.requestor && isAnonymous"
|
||||
class="flex-table"
|
||||
>
|
||||
<label>
|
||||
<input type="checkbox" v-model="requestorIsAnonymous" class="me-2" />
|
||||
{{ $t('requestor.is_anonymous') }}
|
||||
<input
|
||||
type="checkbox"
|
||||
v-model="requestorIsAnonymous"
|
||||
class="me-2"
|
||||
>
|
||||
{{ $t('requestor.is_anonymous') }}
|
||||
</label>
|
||||
<confidential v-if="accompanyingCourse.requestor.type === 'thirdparty'">
|
||||
<template v-slot:confidential-content>
|
||||
<third-party-render-box
|
||||
:thirdparty="accompanyingCourse.requestor"
|
||||
:options="{
|
||||
addLink: false,
|
||||
addId: false,
|
||||
addEntity: true,
|
||||
addInfo: false,
|
||||
hLevel: 3,
|
||||
isMultiline: true,
|
||||
isConfidential: true
|
||||
}"
|
||||
>
|
||||
<template v-slot: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><on-the-fly :type="accompanyingCourse.requestor.type" :id="accompanyingCourse.requestor.id" action="edit" @saveFormOnTheFly="saveFormOnTheFly" ref="onTheFly"></on-the-fly></li>
|
||||
</ul>
|
||||
<template #confidential-content>
|
||||
<third-party-render-box
|
||||
:thirdparty="accompanyingCourse.requestor"
|
||||
:options="{
|
||||
addLink: false,
|
||||
addId: false,
|
||||
addEntity: true,
|
||||
addInfo: false,
|
||||
hLevel: 3,
|
||||
isMultiline: true,
|
||||
isConfidential: true
|
||||
}"
|
||||
>
|
||||
<template #record-actions>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<on-the-fly
|
||||
: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>
|
||||
</third-party-render-box>
|
||||
</template>
|
||||
</third-party-render-box>
|
||||
</template>
|
||||
</confidential>
|
||||
|
||||
<confidential v-else-if="accompanyingCourse.requestor.type === 'person'">
|
||||
<template v-slot:confidential-content>
|
||||
<person-render-box render="bloc"
|
||||
:person="accompanyingCourse.requestor"
|
||||
:options="{
|
||||
addLink: false,
|
||||
addId: false,
|
||||
addAltNames: false,
|
||||
addEntity: true,
|
||||
addInfo: true,
|
||||
hLevel: 3,
|
||||
isMultiline: true,
|
||||
isConfidential: false,
|
||||
addAge: true,
|
||||
}"
|
||||
>
|
||||
<template v-slot: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><on-the-fly :type="accompanyingCourse.requestor.type" :id="accompanyingCourse.requestor.id" action="edit" @saveFormOnTheFly="saveFormOnTheFly" ref="onTheFly"></on-the-fly></li>
|
||||
</ul>
|
||||
</template>
|
||||
</person-render-box>
|
||||
</template>
|
||||
<template #confidential-content>
|
||||
<person-render-box
|
||||
render="bloc"
|
||||
:person="accompanyingCourse.requestor"
|
||||
:options="{
|
||||
addLink: false,
|
||||
addId: false,
|
||||
addAltNames: false,
|
||||
addEntity: true,
|
||||
addInfo: true,
|
||||
hLevel: 3,
|
||||
isMultiline: true,
|
||||
isConfidential: false,
|
||||
addAge: true,
|
||||
}"
|
||||
>
|
||||
<template #record-actions>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<on-the-fly
|
||||
: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>
|
||||
</person-render-box>
|
||||
</template>
|
||||
</confidential>
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button class="btn btn-remove"
|
||||
:title="$t('action.remove')"
|
||||
@click="removeRequestor">
|
||||
{{ $t('action.remove') }}
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button
|
||||
class="btn btn-remove"
|
||||
:title="$t('action.remove')"
|
||||
@click="removeRequestor"
|
||||
>
|
||||
{{ $t('action.remove') }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else-if="accompanyingCourse.requestor && !isAnonymous" class="flex-table">
|
||||
<div
|
||||
v-else-if="accompanyingCourse.requestor && !isAnonymous"
|
||||
class="flex-table"
|
||||
>
|
||||
<label>
|
||||
<input type="checkbox" v-model="requestorIsAnonymous" class="me-2" />
|
||||
{{ $t('requestor.is_anonymous') }}
|
||||
<input
|
||||
type="checkbox"
|
||||
v-model="requestorIsAnonymous"
|
||||
class="me-2"
|
||||
>
|
||||
{{ $t('requestor.is_anonymous') }}
|
||||
</label>
|
||||
|
||||
<third-party-render-box
|
||||
v-if="accompanyingCourse.requestor.type === 'thirdparty'"
|
||||
:thirdparty="accompanyingCourse.requestor"
|
||||
:options="{
|
||||
addLink: false,
|
||||
addId: false,
|
||||
addEntity: true,
|
||||
addInfo: false,
|
||||
hLevel: 3,
|
||||
isMultiline: true,
|
||||
isConfidential: true
|
||||
}"
|
||||
>
|
||||
<template v-slot: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><on-the-fly :type="accompanyingCourse.requestor.type" :id="accompanyingCourse.requestor.id" action="edit" @saveFormOnTheFly="saveFormOnTheFly" ref="onTheFly"></on-the-fly></li>
|
||||
</ul>
|
||||
</template>
|
||||
v-if="accompanyingCourse.requestor.type === 'thirdparty'"
|
||||
:thirdparty="accompanyingCourse.requestor"
|
||||
:options="{
|
||||
addLink: false,
|
||||
addId: false,
|
||||
addEntity: true,
|
||||
addInfo: false,
|
||||
hLevel: 3,
|
||||
isMultiline: true,
|
||||
isConfidential: true
|
||||
}"
|
||||
>
|
||||
<template #record-actions>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<on-the-fly
|
||||
: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>
|
||||
</third-party-render-box>
|
||||
|
||||
<person-render-box render="bloc"
|
||||
v-if="accompanyingCourse.requestor.type === 'person'"
|
||||
:person="accompanyingCourse.requestor"
|
||||
:options="{
|
||||
addLink: false,
|
||||
addId: false,
|
||||
addAltNames: false,
|
||||
addEntity: true,
|
||||
addInfo: true,
|
||||
hLevel: 3,
|
||||
isMultiline: true,
|
||||
isConfidential: false
|
||||
}"
|
||||
<person-render-box
|
||||
render="bloc"
|
||||
v-if="accompanyingCourse.requestor.type === 'person'"
|
||||
:person="accompanyingCourse.requestor"
|
||||
:options="{
|
||||
addLink: false,
|
||||
addId: false,
|
||||
addAltNames: false,
|
||||
addEntity: true,
|
||||
addInfo: true,
|
||||
hLevel: 3,
|
||||
isMultiline: true,
|
||||
isConfidential: false
|
||||
}"
|
||||
>
|
||||
<template v-slot: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><on-the-fly :type="accompanyingCourse.requestor.type" :id="accompanyingCourse.requestor.id" action="edit" @saveFormOnTheFly="saveFormOnTheFly" ref="onTheFly"></on-the-fly></li>
|
||||
</ul>
|
||||
</template>
|
||||
<template #record-actions>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<on-the-fly
|
||||
: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>
|
||||
</person-render-box>
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button class="btn btn-remove"
|
||||
:title="$t('action.remove')"
|
||||
@click="removeRequestor">
|
||||
{{ $t('action.remove') }}
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button
|
||||
class="btn btn-remove"
|
||||
:title="$t('action.remove')"
|
||||
@click="removeRequestor"
|
||||
>
|
||||
{{ $t('action.remove') }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<div v-else>
|
||||
<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">
|
||||
<li v-for="p in suggestedEntities" :key="uniqueId(p)" @click="addSuggestedEntity(p)">
|
||||
<person-text v-if="p.type === 'person'" :person="p"></person-text>
|
||||
<span v-else>{{ p.text }}</span>
|
||||
</li>
|
||||
<li
|
||||
v-for="p in suggestedEntities"
|
||||
:key="uniqueId(p)"
|
||||
@click="addSuggestedEntity(p)"
|
||||
>
|
||||
<person-text
|
||||
v-if="p.type === 'person'"
|
||||
:person="p"
|
||||
/>
|
||||
<span v-else>{{ p.text }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<ul class="record_actions">
|
||||
<li class="add-persons">
|
||||
<add-persons v-if="accompanyingCourse.requestor === null"
|
||||
buttonTitle="requestor.add_requestor"
|
||||
modalTitle="requestor.add_requestor"
|
||||
v-bind:key="addPersons.key"
|
||||
v-bind:options="addPersons.options"
|
||||
@addNewPersons="addNewPersons"
|
||||
ref="addPersons"> <!-- to cast child method -->
|
||||
</add-persons>
|
||||
</li>
|
||||
<li class="add-persons">
|
||||
<add-persons
|
||||
v-if="accompanyingCourse.requestor === null"
|
||||
button-title="requestor.add_requestor"
|
||||
modal-title="requestor.add_requestor"
|
||||
:key="addPersons.key"
|
||||
:options="addPersons.options"
|
||||
@add-new-persons="addNewPersons"
|
||||
ref="addPersons"
|
||||
>
|
||||
<!-- to cast child method -->
|
||||
</add-persons>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,49 +1,56 @@
|
||||
<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>
|
||||
</div>
|
||||
<div v-else>
|
||||
</div>
|
||||
<div v-else>
|
||||
<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
|
||||
v-for="resource in resources"
|
||||
v-bind:resource="resource"
|
||||
v-bind:key="resource.id"
|
||||
@remove="removeResource">
|
||||
</resource-item>
|
||||
</div>
|
||||
v-for="resource in resources"
|
||||
:resource="resource"
|
||||
:key="resource.id"
|
||||
@remove="removeResource"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-if="suggestedEntities.length > 0">
|
||||
<div v-if="suggestedEntities.length > 0">
|
||||
<ul class="list-suggest add-items inline">
|
||||
<li v-for="p in suggestedEntities" :key="uniqueId(p)" @click="addSuggestedEntity(p)">
|
||||
<person-text v-if="p.type === 'person'" :person="p"></person-text>
|
||||
<span v-else>{{ p.text }}</span>
|
||||
</li>
|
||||
<li
|
||||
v-for="p in suggestedEntities"
|
||||
:key="uniqueId(p)"
|
||||
@click="addSuggestedEntity(p)"
|
||||
>
|
||||
<person-text
|
||||
v-if="p.type === 'person'"
|
||||
:person="p"
|
||||
/>
|
||||
<span v-else>{{ p.text }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<ul class="record_actions">
|
||||
<li class="add-persons">
|
||||
<add-persons
|
||||
buttonTitle="resources.add_resources"
|
||||
modalTitle="resources.add_resources"
|
||||
v-bind:key="addPersons.key"
|
||||
v-bind:options="addPersons.options"
|
||||
@addNewPersons="addNewPersons"
|
||||
ref="addPersons"> <!-- to cast child method -->
|
||||
</add-persons>
|
||||
</li>
|
||||
<li class="add-persons">
|
||||
<add-persons
|
||||
button-title="resources.add_resources"
|
||||
modal-title="resources.add_resources"
|
||||
:key="addPersons.key"
|
||||
:options="addPersons.options"
|
||||
@add-new-persons="addNewPersons"
|
||||
ref="addPersons"
|
||||
>
|
||||
<!-- to cast child method -->
|
||||
</add-persons>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,104 +1,107 @@
|
||||
<template>
|
||||
<person-render-box render="bloc"
|
||||
v-if="resource.resource.type === 'person'"
|
||||
:person="resource.resource"
|
||||
:options="{
|
||||
addInfo : true,
|
||||
addId : false,
|
||||
addEntity: true,
|
||||
addLink: false,
|
||||
addAltNames: true,
|
||||
addAge : false,
|
||||
hLevel : 3,
|
||||
isConfidential : true
|
||||
}">
|
||||
<template v-slot:end-bloc>
|
||||
<div class="item-row separator">
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<write-comment
|
||||
:resource="resource"
|
||||
@updateComment="updateComment"
|
||||
></write-comment>
|
||||
</li>
|
||||
<li>
|
||||
<on-the-fly
|
||||
:parent="parent"
|
||||
:type="resource.resource.type"
|
||||
:id="resource.resource.id"
|
||||
action="show">
|
||||
</on-the-fly>
|
||||
</li>
|
||||
<li>
|
||||
<on-the-fly
|
||||
:parent="parent"
|
||||
:type="resource.resource.type"
|
||||
:id="resource.resource.id"
|
||||
action="edit"
|
||||
@saveFormOnTheFly="saveFormOnTheFly"
|
||||
ref="onTheFly">
|
||||
</on-the-fly>
|
||||
</li>
|
||||
<li>
|
||||
<button
|
||||
class="btn btn-sm btn-remove"
|
||||
:title="$t('action.remove')"
|
||||
@click.prevent="$emit('remove', resource)">
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
</person-render-box>
|
||||
<person-render-box
|
||||
render="bloc"
|
||||
v-if="resource.resource.type === 'person'"
|
||||
:person="resource.resource"
|
||||
:options="{
|
||||
addInfo : true,
|
||||
addId : false,
|
||||
addEntity: true,
|
||||
addLink: false,
|
||||
addAltNames: true,
|
||||
addAge : false,
|
||||
hLevel : 3,
|
||||
isConfidential : true
|
||||
}"
|
||||
>
|
||||
<template #end-bloc>
|
||||
<div class="item-row separator">
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<write-comment
|
||||
:resource="resource"
|
||||
@update-comment="updateComment"
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<on-the-fly
|
||||
:parent="parent"
|
||||
:type="resource.resource.type"
|
||||
:id="resource.resource.id"
|
||||
action="show"
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<on-the-fly
|
||||
:parent="parent"
|
||||
:type="resource.resource.type"
|
||||
:id="resource.resource.id"
|
||||
action="edit"
|
||||
@save-form-on-the-fly="saveFormOnTheFly"
|
||||
ref="onTheFly"
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<button
|
||||
class="btn btn-sm btn-remove"
|
||||
:title="$t('action.remove')"
|
||||
@click.prevent="$emit('remove', resource)"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
</person-render-box>
|
||||
|
||||
<third-party-render-box
|
||||
v-if="resource.resource.type === 'thirdparty'"
|
||||
:thirdparty="resource.resource"
|
||||
:options="{
|
||||
addLink : false,
|
||||
addId : false,
|
||||
addEntity: true,
|
||||
addInfo: false,
|
||||
hLevel: 3
|
||||
}">
|
||||
<template v-slot:end-bloc>
|
||||
<div class="item-row separator">
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<write-comment
|
||||
:resource="resource"
|
||||
@updateComment="updateComment"
|
||||
></write-comment>
|
||||
</li>
|
||||
<li>
|
||||
<on-the-fly
|
||||
:parent="parent"
|
||||
:type="resource.resource.type"
|
||||
:id="resource.resource.id"
|
||||
action="show">
|
||||
</on-the-fly>
|
||||
</li>
|
||||
<li>
|
||||
<on-the-fly
|
||||
:parent="parent"
|
||||
:type="resource.resource.type"
|
||||
:id="resource.resource.id"
|
||||
action="edit"
|
||||
@saveFormOnTheFly="saveFormOnTheFly"
|
||||
ref="onTheFly">
|
||||
</on-the-fly>
|
||||
</li>
|
||||
<li>
|
||||
<button
|
||||
class="btn btn-sm btn-remove"
|
||||
:title="$t('action.remove')"
|
||||
@click.prevent="$emit('remove', resource)">
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
</third-party-render-box>
|
||||
<third-party-render-box
|
||||
v-if="resource.resource.type === 'thirdparty'"
|
||||
:thirdparty="resource.resource"
|
||||
:options="{
|
||||
addLink : false,
|
||||
addId : false,
|
||||
addEntity: true,
|
||||
addInfo: false,
|
||||
hLevel: 3
|
||||
}"
|
||||
>
|
||||
<template #end-bloc>
|
||||
<div class="item-row separator">
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<write-comment
|
||||
:resource="resource"
|
||||
@update-comment="updateComment"
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<on-the-fly
|
||||
:parent="parent"
|
||||
:type="resource.resource.type"
|
||||
:id="resource.resource.id"
|
||||
action="show"
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<on-the-fly
|
||||
:parent="parent"
|
||||
:type="resource.resource.type"
|
||||
:id="resource.resource.id"
|
||||
action="edit"
|
||||
@save-form-on-the-fly="saveFormOnTheFly"
|
||||
ref="onTheFly"
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<button
|
||||
class="btn btn-sm btn-remove"
|
||||
:title="$t('action.remove')"
|
||||
@click.prevent="$emit('remove', resource)"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
</third-party-render-box>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,40 +1,41 @@
|
||||
<template>
|
||||
<a class="btn btn-sm btn-misc change-icon"
|
||||
:title="$t('write_comment')"
|
||||
@click="openModal"
|
||||
><i class="fa fa-pencil-square-o"></i>
|
||||
</a>
|
||||
<a
|
||||
class="btn btn-sm btn-misc change-icon"
|
||||
:title="$t('write_comment')"
|
||||
@click="openModal"
|
||||
><i class="fa fa-pencil-square-o" />
|
||||
</a>
|
||||
|
||||
<teleport to="body">
|
||||
<modal v-if="modal.showModal"
|
||||
:modalDialogClass="modal.modalDialogClass"
|
||||
@close="modal.showModal = false">
|
||||
<template v-slot:header>
|
||||
|
||||
<h3 class="modal-title">{{ $t('write_comment_about', { 'r': resource.resource.text }) }}</h3>
|
||||
|
||||
</template>
|
||||
<template v-slot:body>
|
||||
|
||||
<ckeditor
|
||||
name="content"
|
||||
v-bind:placeholder="$t('comment_placeholder')"
|
||||
:editor="editor"
|
||||
v-model="content"
|
||||
tag-name="textarea">
|
||||
</ckeditor>
|
||||
|
||||
</template>
|
||||
<template v-slot:footer>
|
||||
|
||||
<a class="btn btn-save"
|
||||
@click="saveAction">
|
||||
{{ $t('action.save')}}
|
||||
</a>
|
||||
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
<teleport to="body">
|
||||
<modal
|
||||
v-if="modal.showModal"
|
||||
:modal-dialog-class="modal.modalDialogClass"
|
||||
@close="modal.showModal = false"
|
||||
>
|
||||
<template #header>
|
||||
<h3 class="modal-title">
|
||||
{{ $t('write_comment_about', { 'r': resource.resource.text }) }}
|
||||
</h3>
|
||||
</template>
|
||||
<template #body>
|
||||
<ckeditor
|
||||
name="content"
|
||||
:placeholder="$t('comment_placeholder')"
|
||||
:editor="editor"
|
||||
v-model="content"
|
||||
tag-name="textarea"
|
||||
/>
|
||||
</template>
|
||||
<template #footer>
|
||||
<a
|
||||
class="btn btn-save"
|
||||
@click="saveAction"
|
||||
>
|
||||
{{ $t('action.save') }}
|
||||
</a>
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,20 +1,31 @@
|
||||
<template>
|
||||
<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="form-check" v-for="s in scopes" :key="s.id">
|
||||
<input class="form-check-input" type="checkbox" v-model="checkedScopes" :value="s"/>
|
||||
<label class="form-check-label">
|
||||
{{ s.name.fr }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="!isScopeValid" class="alert alert-warning to-confirm">
|
||||
{{ $t('scopes.add_at_least_one') }}
|
||||
<div class="mb-4">
|
||||
<div
|
||||
class="form-check"
|
||||
v-for="s in scopes"
|
||||
:key="s.id"
|
||||
>
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="checkbox"
|
||||
v-model="checkedScopes"
|
||||
:value="s"
|
||||
>
|
||||
<label class="form-check-label">
|
||||
{{ s.name.fr }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="!isScopeValid"
|
||||
class="alert alert-warning to-confirm"
|
||||
>
|
||||
{{ $t('scopes.add_at_least_one') }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@@ -1,30 +1,32 @@
|
||||
<template>
|
||||
<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">
|
||||
<!--label for="field">{{ $t('social_issue.label') }}</label
|
||||
<div class="my-4">
|
||||
<!--label for="field">{{ $t('social_issue.label') }}</label
|
||||
-->
|
||||
<VueMultiselect
|
||||
name="field"
|
||||
:close-on-select="true"
|
||||
:allow-empty="true"
|
||||
:show-labels="false"
|
||||
track-by="id"
|
||||
label="text"
|
||||
:multiple="true"
|
||||
:searchable="true"
|
||||
:placeholder="$t('social_issue.label')"
|
||||
@update:model-value="updateSocialIssues"
|
||||
:model-value="value"
|
||||
:options="options">
|
||||
</VueMultiselect>
|
||||
</div>
|
||||
|
||||
<div v-if="!isSocialIssueValid" class="alert alert-warning to-confirm">
|
||||
{{ $t('social_issue.not_valid') }}
|
||||
</div>
|
||||
<VueMultiselect
|
||||
name="field"
|
||||
:close-on-select="true"
|
||||
:allow-empty="true"
|
||||
:show-labels="false"
|
||||
track-by="id"
|
||||
label="text"
|
||||
:multiple="true"
|
||||
:searchable="true"
|
||||
:placeholder="$t('social_issue.label')"
|
||||
@update:model-value="updateSocialIssues"
|
||||
:model-value="value"
|
||||
:options="options"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="!isSocialIssueValid"
|
||||
class="alert alert-warning to-confirm"
|
||||
>
|
||||
{{ $t('social_issue.not_valid') }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@@ -1,17 +1,22 @@
|
||||
<template>
|
||||
<div class="vue-component">
|
||||
<h2><a id="section-110"></a>
|
||||
{{ $t('startdate.change') }}
|
||||
<div class="vue-component">
|
||||
<h2>
|
||||
<a id="section-110" />
|
||||
{{ $t('startdate.change') }}
|
||||
</h2>
|
||||
<div>
|
||||
<div class="mb-3 row">
|
||||
<div class="col-sm-12 date-update">
|
||||
<input class="form-control" type="date" id="startDate" v-model="startDateInput">
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<div class="col-sm-12 date-update">
|
||||
<input
|
||||
class="form-control"
|
||||
type="date"
|
||||
id="startDate"
|
||||
v-model="startDateInput"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -20,7 +25,7 @@ import { dateToISO, ISOToDatetime} from 'ChillMainAssets/chill/js/date';
|
||||
import { mapState } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'startDate',
|
||||
name: 'StartDate',
|
||||
data() {
|
||||
return {
|
||||
lastRecordedDate: null
|
||||
|
@@ -1,20 +1,23 @@
|
||||
<template>
|
||||
<teleport to="#content">
|
||||
<div id="navmap">
|
||||
<nav>
|
||||
<a class="top" href="#top">
|
||||
<i class="fa fa-fw fa-square"></i>
|
||||
<span>{{ $t('nav.top') }}</span>
|
||||
</a>
|
||||
<item
|
||||
v-for="item of items"
|
||||
:key="item.key"
|
||||
:item="item"
|
||||
:step="step">
|
||||
</item>
|
||||
</nav>
|
||||
</div>
|
||||
</teleport>
|
||||
<teleport to="#content">
|
||||
<div id="navmap">
|
||||
<nav>
|
||||
<a
|
||||
class="top"
|
||||
href="#top"
|
||||
>
|
||||
<i class="fa fa-fw fa-square" />
|
||||
<span>{{ $t('nav.top') }}</span>
|
||||
</a>
|
||||
<item
|
||||
v-for="item of items"
|
||||
:key="item.key"
|
||||
:item="item"
|
||||
:step="step"
|
||||
/>
|
||||
</nav>
|
||||
</div>
|
||||
</teleport>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,20 +1,20 @@
|
||||
<template>
|
||||
<a
|
||||
v-if="item.key <= 8"
|
||||
:href="item.id"
|
||||
:class="{ 'active': isActive }"
|
||||
>
|
||||
<i class="fa fa-fw fa-square"></i>
|
||||
<span>{{ item.key }}</span>
|
||||
</a>
|
||||
<a
|
||||
v-else-if="step === 'DRAFT'"
|
||||
:href="item.id"
|
||||
:class="{ 'active': isActive }"
|
||||
>
|
||||
<i class="fa fa-fw fa-square"></i>
|
||||
<span>{{ item.key }}</span>
|
||||
</a>
|
||||
<a
|
||||
v-if="item.key <= 8"
|
||||
:href="item.id"
|
||||
:class="{ 'active': isActive }"
|
||||
>
|
||||
<i class="fa fa-fw fa-square" />
|
||||
<span>{{ item.key }}</span>
|
||||
</a>
|
||||
<a
|
||||
v-else-if="step === 'DRAFT'"
|
||||
:href="item.id"
|
||||
:class="{ 'active': isActive }"
|
||||
>
|
||||
<i class="fa fa-fw fa-square" />
|
||||
<span>{{ item.key }}</span>
|
||||
</a>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,58 +1,83 @@
|
||||
<template>
|
||||
<div class="vue-component">
|
||||
<h2>Tests</h2>
|
||||
<div class="vue-component">
|
||||
<h2>Tests</h2>
|
||||
|
||||
<!-- Modal -->
|
||||
<ul class="record_actions">
|
||||
<!-- Modal -->
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button class="btn btn-create" @click="modal1.showModal = true">
|
||||
{{ $t('action.show_modal') }}
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-create"
|
||||
@click="modal1.showModal = true"
|
||||
>
|
||||
{{ $t('action.show_modal') }}
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button class="btn btn-create" @click="modal2.showModal = true">
|
||||
Ouvrir une seconde modale
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-create"
|
||||
@click="modal2.showModal = true"
|
||||
>
|
||||
Ouvrir une seconde modale
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<teleport to="body">
|
||||
<modal v-if="modal1.showModal" :modalDialogClass="modal1.modalDialogClass" @close="modal1.showModal = false">
|
||||
<template v-slot:header>
|
||||
<h2 class="modal-title">Le titre de ma modale</h2>
|
||||
</template>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<template v-slot:footer>
|
||||
<button class="btn btn-create" @click="modal1.showModal = false; modal2.showModal = true">
|
||||
{{ $t('action.next')}}</button>
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
<teleport to="body">
|
||||
<modal
|
||||
v-if="modal1.showModal"
|
||||
:modal-dialog-class="modal1.modalDialogClass"
|
||||
@close="modal1.showModal = false"
|
||||
>
|
||||
<template #header>
|
||||
<h2 class="modal-title">
|
||||
Le titre de ma modale
|
||||
</h2>
|
||||
</template>
|
||||
<template #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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<template #footer>
|
||||
<button
|
||||
class="btn btn-create"
|
||||
@click="modal1.showModal = false; modal2.showModal = true"
|
||||
>
|
||||
{{ $t('action.next') }}
|
||||
</button>
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
|
||||
<teleport to="body">
|
||||
<modal v-if="modal2.showModal" :modalDialogClass="modal2.modalDialogClass" @close="modal2.showModal = false">
|
||||
<template v-slot:header>
|
||||
<h2 class="modal-title">Une autre modale</h2>
|
||||
</template>
|
||||
<template v-slot:body>
|
||||
<p>modal 2</p>
|
||||
</template>
|
||||
<template v-slot:footer>
|
||||
<button class="btn btn-create" @click="modal2.showModal = false">
|
||||
{{ $t('action.save')}}</button>
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
<!-- END Modal -->
|
||||
|
||||
</div>
|
||||
<teleport to="body">
|
||||
<modal
|
||||
v-if="modal2.showModal"
|
||||
:modal-dialog-class="modal2.modalDialogClass"
|
||||
@close="modal2.showModal = false"
|
||||
>
|
||||
<template #header>
|
||||
<h2 class="modal-title">
|
||||
Une autre modale
|
||||
</h2>
|
||||
</template>
|
||||
<template #body>
|
||||
<p>modal 2</p>
|
||||
</template>
|
||||
<template #footer>
|
||||
<button
|
||||
class="btn btn-create"
|
||||
@click="modal2.showModal = false"
|
||||
>
|
||||
{{ $t('action.save') }}
|
||||
</button>
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
<!-- END Modal -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,39 +1,51 @@
|
||||
<template>
|
||||
|
||||
<h2>{{ $t('pick_social_issue') }}</h2>
|
||||
|
||||
|
||||
<div id="awc_create_form">
|
||||
|
||||
<div id="picking" class="">
|
||||
<p>{{ $t('pick_social_issue_linked_with_action') }}</p>
|
||||
<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>
|
||||
</div>
|
||||
<div
|
||||
id="picking"
|
||||
class=""
|
||||
>
|
||||
<p>{{ $t('pick_social_issue_linked_with_action') }}</p>
|
||||
<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="col-11">
|
||||
<vue-multiselect
|
||||
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('choose_other_social_issue')"
|
||||
:options="socialIssuesOther"
|
||||
@select="addIssueInList">
|
||||
</vue-multiselect>
|
||||
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('choose_other_social_issue')"
|
||||
:options="socialIssuesOther"
|
||||
@select="addIssueInList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="hasSocialIssuePicked" class="mb-3">
|
||||
<div
|
||||
v-if="hasSocialIssuePicked"
|
||||
class="mb-3"
|
||||
>
|
||||
<h2>{{ $t('pick_an_action') }}</h2>
|
||||
<div class="col-11">
|
||||
<vue-multiselect
|
||||
@@ -44,57 +56,91 @@
|
||||
:close-on-select="true"
|
||||
:show-labels="true"
|
||||
track-by="id"
|
||||
></vue-multiselect>
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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 v-if="hasSocialActionPicked" id="persons" class="mb-5">
|
||||
<div
|
||||
v-if="hasSocialActionPicked"
|
||||
id="persons"
|
||||
class="mb-5"
|
||||
>
|
||||
<h2>{{ $t('persons_involved') }}</h2>
|
||||
|
||||
<ul>
|
||||
<li v-for="p in personsReachables" :key="p.id">
|
||||
<li
|
||||
v-for="p in personsReachables"
|
||||
:key="p.id"
|
||||
>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" :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"></person-text>
|
||||
<input
|
||||
type="checkbox"
|
||||
: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>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- <div v-if="hasSocialActionPicked" id="start_date">
|
||||
<p><label>{{ $t('startDate') }}</label> <input type="date" v-model="startDate" /></p>
|
||||
</div> -->
|
||||
<div class="row">
|
||||
<div v-if="hasSocialActionPicked" id="start_date" 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
|
||||
v-if="hasSocialActionPicked"
|
||||
id="start_date"
|
||||
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 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>
|
||||
</div> -->
|
||||
<div v-if="hasSocialActionPicked" id="end_date" 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
|
||||
v-if="hasSocialActionPicked"
|
||||
id="end_date"
|
||||
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 id="confirm">
|
||||
<div v-if="hasErrors">
|
||||
<p>{{ $t('form_has_errors') }}</p>
|
||||
|
||||
<ul>
|
||||
<li v-for="e in errors" :key="e.id">
|
||||
<li
|
||||
v-for="e in errors"
|
||||
:key="e.id"
|
||||
>
|
||||
{{ e }}
|
||||
</li>
|
||||
</ul>
|
||||
@@ -103,15 +149,26 @@
|
||||
<div>
|
||||
<ul class="record_actions">
|
||||
<li class="cancel">
|
||||
<button class="btn btn-cancel" @click="goToPrevious">
|
||||
<button
|
||||
class="btn btn-cancel"
|
||||
@click="goToPrevious"
|
||||
>
|
||||
{{ $t('action.cancel') }}
|
||||
</button>
|
||||
</li>
|
||||
<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') }}
|
||||
</button>
|
||||
<button class="btn btn-save" v-show="isPostingWork" disabled>
|
||||
<button
|
||||
class="btn btn-save"
|
||||
v-show="isPostingWork"
|
||||
disabled
|
||||
>
|
||||
{{ $t('action.save') }}
|
||||
</button>
|
||||
</li>
|
||||
@@ -119,7 +176,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
|
@@ -1,330 +1,515 @@
|
||||
<template>
|
||||
<div id="workEditor" class="my-4">
|
||||
<div id="title" class="action-row">
|
||||
<div>
|
||||
<p class="wl-item social-issues">
|
||||
<span class="chill-entity entity-social-issue">
|
||||
<span class="badge bg-chill-l-gray text-dark">{{ work.socialAction.issue.text }}</span>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<h2 class="badge-title">
|
||||
<span class="title_label"></span>
|
||||
<span class="title_action">{{ work.socialAction.text }}</span>
|
||||
</h2>
|
||||
<div
|
||||
id="workEditor"
|
||||
class="my-4"
|
||||
>
|
||||
<div
|
||||
id="title"
|
||||
class="action-row"
|
||||
>
|
||||
<div>
|
||||
<p class="wl-item social-issues">
|
||||
<span class="chill-entity entity-social-issue">
|
||||
<span class="badge bg-chill-l-gray text-dark">{{ work.socialAction.issue.text }}</span>
|
||||
</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 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/>
|
||||
<!-- 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
|
||||
:available-results="resultsForAction"
|
||||
destination="action"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="endDate" class="action-row">
|
||||
<label class="col-form-label">{{ $t('endDate') }}</label>
|
||||
<input v-model="endDate" type="date" class="form-control" />
|
||||
<!-- 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"
|
||||
/>
|
||||
</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 id="privateComment" class="action-row">
|
||||
<label class="col-form-label">{{ $t('private_comment') }}</label>
|
||||
<ckeditor
|
||||
v-model="privateComment"
|
||||
:editor="editor"
|
||||
tag-name="textarea"
|
||||
></ckeditor>
|
||||
</div>
|
||||
<!-- list evaluations -->
|
||||
<add-evaluation
|
||||
v-for="e in pickedEvaluations"
|
||||
:key="e.key"
|
||||
:evaluation="e"
|
||||
:doc-anchor-id="this.docAnchorId"
|
||||
/>
|
||||
|
||||
<div id="comment" class="action-row">
|
||||
<label class="col-form-label">{{ $t('comments') }}</label>
|
||||
<ckeditor
|
||||
v-model="note"
|
||||
:editor="editor"
|
||||
tag-name="textarea"
|
||||
></ckeditor>
|
||||
</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>
|
||||
|
||||
<!-- 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>
|
||||
<!-- 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>
|
||||
</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 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 v-else>
|
||||
<ul class="list-suggest remove-items inline">
|
||||
<li v-for="u in referrers" :key="u.id" :title="$t('remove_referrer')" @click="removeReferrer(u)">
|
||||
<span>
|
||||
{{ u.text }}
|
||||
</span>
|
||||
</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 v-else>
|
||||
<ul class="list-suggest remove-items inline">
|
||||
<li
|
||||
v-for="u in referrers"
|
||||
:key="u.id"
|
||||
:title="$t('remove_referrer')"
|
||||
@click="removeReferrer(u)"
|
||||
>
|
||||
<span>
|
||||
{{ u.text }}
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="handlingThirdParty" class="action-row">
|
||||
<h3>{{ $t('handling_thirdparty') }}</h3>
|
||||
<ul class="record_actions">
|
||||
<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">
|
||||
<p class="chill-no-data-statement">
|
||||
{{ $t('no_handling_thirdparty') }}
|
||||
</p>
|
||||
<div
|
||||
id="handlingThirdParty"
|
||||
class="action-row"
|
||||
>
|
||||
<h3>{{ $t('handling_thirdparty') }}</h3>
|
||||
|
||||
<ul class="record_actions">
|
||||
<li class="add-persons">
|
||||
<add-persons
|
||||
ref="handlingThirdPartyPicker"
|
||||
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>
|
||||
<div v-if="!hasHandlingThirdParty">
|
||||
<p class="chill-no-data-statement">
|
||||
{{ $t('no_handling_thirdparty') }}
|
||||
</p>
|
||||
|
||||
<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 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 v-else>
|
||||
<div class="flex-bloc mb-3">
|
||||
<third-party-render-box
|
||||
v-for="thirdparty in thirdParties"
|
||||
:key="thirdparty.id"
|
||||
:thirdparty="thirdparty"
|
||||
:options="{ addLink : false, addId : false, addEntity: true, addInfo: false, hLevel: 3 }"
|
||||
>
|
||||
<template v-slot:record-actions>
|
||||
<ul class="record_actions">
|
||||
<li><on-the-fly :type="thirdparty.type" :id="thirdparty.id" action="show"></on-the-fly></li>
|
||||
<li><on-the-fly :type="thirdparty.type" :id="thirdparty.id" action="edit" @saveFormOnTheFly="saveFormOnTheFly" ref="onTheFly"></on-the-fly></li>
|
||||
<li>
|
||||
<button :title="$t('remove_thirdparty')" class="btn btn-sm btn-remove" @click="removeThirdParty(thirdparty)" />
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
</third-party-render-box>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="record_actions">
|
||||
<li class="add-persons">
|
||||
<add-persons
|
||||
ref="thirdPartyPicker"
|
||||
v-bind:key="thirdPartyPicker.key"
|
||||
v-bind:buttonTitle="$t('add_thirdparties')"
|
||||
v-bind:modalTitle="$t('choose_thirdparties')"
|
||||
v-bind:options="thirdPartyPicker.options"
|
||||
@addNewPersons="addThirdParties"> <!-- to cast child method -->
|
||||
</add-persons>
|
||||
</li>
|
||||
</ul>
|
||||
<div v-else>
|
||||
<div class="flex-bloc mb-3">
|
||||
<third-party-render-box
|
||||
v-for="thirdparty in thirdParties"
|
||||
:key="thirdparty.id"
|
||||
:thirdparty="thirdparty"
|
||||
:options="{ addLink : false, addId : false, addEntity: true, addInfo: false, hLevel: 3 }"
|
||||
>
|
||||
<template #record-actions>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<on-the-fly
|
||||
:type="thirdparty.type"
|
||||
:id="thirdparty.id"
|
||||
action="show"
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<on-the-fly
|
||||
:type="thirdparty.type"
|
||||
:id="thirdparty.id"
|
||||
action="edit"
|
||||
@save-form-on-the-fly="saveFormOnTheFly"
|
||||
ref="onTheFly"
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<button
|
||||
:title="$t('remove_thirdparty')"
|
||||
class="btn btn-sm btn-remove"
|
||||
@click="removeThirdParty(thirdparty)"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
</third-party-render-box>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="errors.length > 0" id="errors" class="alert alert-danger flashbag">
|
||||
<p>{{ $t('fix_these_errors') }}</p>
|
||||
<ul>
|
||||
<li v-for="e in errors" :key="e.id">{{ e }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="record_actions">
|
||||
<li class="add-persons">
|
||||
<add-persons
|
||||
ref="thirdPartyPicker"
|
||||
:key="thirdPartyPicker.key"
|
||||
: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>
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li>
|
||||
<list-workflow-modal
|
||||
:workflows="this.work.workflows"
|
||||
:allowCreate="true"
|
||||
relatedEntityClass="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork"
|
||||
:relatedEntityId="this.work.id"
|
||||
:workflowsAvailables="this.work.workflows_availables"
|
||||
:preventDefaultMoveToGenerate="true"
|
||||
@go-to-generate-workflow="goToGenerateWorkflow"
|
||||
></list-workflow-modal>
|
||||
</li>
|
||||
<div
|
||||
v-if="errors.length > 0"
|
||||
id="errors"
|
||||
class="alert alert-danger flashbag"
|
||||
>
|
||||
<p>{{ $t('fix_these_errors') }}</p>
|
||||
<ul>
|
||||
<li
|
||||
v-for="e in errors"
|
||||
:key="e.id"
|
||||
>
|
||||
{{ e }}
|
||||
</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>
|
||||
<button v-if="AmIRefferer"
|
||||
class="btn btn-notify"
|
||||
@click="goToGenerateNotification(false)"
|
||||
></button>
|
||||
<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"> </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>
|
||||
<button
|
||||
v-if="AmIRefferer"
|
||||
class="btn btn-notify"
|
||||
@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"
|
||||
>
|
||||
|
||||
</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">
|
||||
<button class="btn btn-save" @click="submit">
|
||||
{{ $t('action.save') }}
|
||||
</button>
|
||||
</li>
|
||||
<li v-if="!isPosting">
|
||||
<button
|
||||
class="btn btn-save"
|
||||
@click="submit"
|
||||
>
|
||||
{{ $t('action.save') }}
|
||||
</button>
|
||||
</li>
|
||||
|
||||
<li v-if="isPosting">
|
||||
<button class="btn btn-save" disabled>
|
||||
{{ $t('action.save') }}
|
||||
</button>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<li v-if="isPosting">
|
||||
<button
|
||||
class="btn btn-save"
|
||||
disabled
|
||||
>
|
||||
{{ $t('action.save') }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,53 +1,78 @@
|
||||
<template>
|
||||
<div>
|
||||
<a id="evaluations"></a>
|
||||
<div class="item-title" :title="evaluation.id || 'no id yet'">
|
||||
<span>{{ evaluation.evaluation.title.fr }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<a id="evaluations" />
|
||||
<div
|
||||
class="item-title"
|
||||
: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">
|
||||
<i class="fa fa-link fa-lg"></i>
|
||||
<a :href="evaluation.evaluation.url" target="_blank">{{ evaluation.evaluation.url }}</a>
|
||||
</div>
|
||||
<div
|
||||
class="item-url mt-3 mb-4"
|
||||
v-if="evaluation.evaluation.url"
|
||||
>
|
||||
<i class="fa fa-link fa-lg" />
|
||||
<a
|
||||
:href="evaluation.evaluation.url"
|
||||
target="_blank"
|
||||
>{{ evaluation.evaluation.url }}</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<form-evaluation ref="FormEvaluation" :key="evaluation.key" :evaluation="evaluation" :docAnchorId="docAnchorId"></form-evaluation>
|
||||
<div>
|
||||
<form-evaluation
|
||||
ref="FormEvaluation"
|
||||
:key="evaluation.key"
|
||||
:evaluation="evaluation"
|
||||
:doc-anchor-id="docAnchorId"
|
||||
/>
|
||||
|
||||
<ul class="record_actions">
|
||||
<li v-if="evaluation.workflows_availables.length > 0">
|
||||
<ul class="record_actions">
|
||||
<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
|
||||
:workflows="evaluation.workflows"
|
||||
:allowCreate="true"
|
||||
relatedEntityClass="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation"
|
||||
:relatedEntityId="evaluation.id"
|
||||
:workflowsAvailables="evaluation.workflows_availables"
|
||||
@go-to-generate-workflow="goToGenerateWorkflow"
|
||||
></list-workflow-modal>
|
||||
|
||||
</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>
|
||||
|
||||
<teleport to="body">
|
||||
<modal v-if="modal.showModal" :modalDialogClass="modal.modalDialogClass" @close="modal.showModal = false">
|
||||
<template v-slot:header>
|
||||
<h2 class="modal-title">{{ $t('delete.sure') }}</h2>
|
||||
</template>
|
||||
<template v-slot:body>
|
||||
<p>{{ $t('delete.sure_description') }}</p>
|
||||
</template>
|
||||
<template v-slot:footer>
|
||||
<button class="btn btn-danger" @click="removeEvaluation(evaluation)">
|
||||
{{ $t('delete.ok') }}
|
||||
</button>
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
</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('delete.sure') }}
|
||||
</h2>
|
||||
</template>
|
||||
<template #body>
|
||||
<p>{{ $t('delete.sure_description') }}</p>
|
||||
</template>
|
||||
<template #footer>
|
||||
<button
|
||||
class="btn btn-danger"
|
||||
@click="removeEvaluation(evaluation)"
|
||||
>
|
||||
{{ $t('delete.ok') }}
|
||||
</button>
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,62 +1,87 @@
|
||||
<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">
|
||||
Aucun résultat associé
|
||||
</p>
|
||||
<ul class="list-suggest remove-items">
|
||||
<li
|
||||
v-for="r in pickedResults"
|
||||
@click="removeResult(r)"
|
||||
:key="r.id"
|
||||
>
|
||||
<span>
|
||||
{{ r.title.fr }}
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="list-suggest remove-items">
|
||||
<li v-for="r in pickedResults" @click="removeResult(r)" :key="r.id">
|
||||
<span>
|
||||
{{ r.title.fr }}
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<div
|
||||
class="accordion"
|
||||
id="expandedSuggestions"
|
||||
>
|
||||
<div 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>
|
||||
|
||||
<div class="accordion" id="expandedSuggestions">
|
||||
<div 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">
|
||||
Résultats et orientations 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="r in availableForCheckResults" @click="addResult(r)" :key="r.id">
|
||||
<span>{{ r.title.fr }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
v-else
|
||||
class="accordion-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
aria-expanded="false"
|
||||
@click="toggleSelect"
|
||||
>
|
||||
Résultats et orientations 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="r in availableForCheckResults"
|
||||
@click="addResult(r)"
|
||||
:key="r.id"
|
||||
>
|
||||
<span>{{ r.title.fr }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-if="!hasResult" class="noResult">
|
||||
<div class="chill-no-data-statement">
|
||||
{{ $t('goal_has_no_result') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="!hasResult"
|
||||
class="noResult"
|
||||
>
|
||||
<div class="chill-no-data-statement">
|
||||
{{ $t('goal_has_no_result') }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<!--h2>
|
||||
<div>
|
||||
<!--h2>
|
||||
{{ $t('evaluation_title') }}
|
||||
</h2-->
|
||||
|
||||
<div class="m-md-3">
|
||||
<div class="m-md-3">
|
||||
<!--div class="row mb-3">
|
||||
<label class="col-sm-4 col-form-label">{{ $t('evaluation_status') }}</label>
|
||||
<div class="col-sm-8">
|
||||
@@ -18,178 +18,244 @@
|
||||
</div-->
|
||||
|
||||
<div class="row mb-3">
|
||||
<label class="col-4 col-sm-2 col-md-4 col-lg-2 col-form-label">
|
||||
{{ $t('evaluation_startdate') }}
|
||||
</label>
|
||||
<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"/>
|
||||
</div>
|
||||
<label class="col-4 col-sm-2 col-md-4 col-lg-2 col-form-label">
|
||||
{{ $t('evaluation_startdate') }}
|
||||
</label>
|
||||
<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"
|
||||
>
|
||||
</div>
|
||||
|
||||
<label class="col-4 col-sm-2 col-md-4 col-lg-2 col-form-label">
|
||||
{{ $t('evaluation_enddate') }}
|
||||
</label>
|
||||
<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"/>
|
||||
</div>
|
||||
<label class="col-4 col-sm-2 col-md-4 col-lg-2 col-form-label">
|
||||
{{ $t('evaluation_enddate') }}
|
||||
</label>
|
||||
<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"
|
||||
>
|
||||
</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_maxdate') }}
|
||||
</label>
|
||||
<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"/>
|
||||
</div>
|
||||
<label class="col-4 col-sm-2 col-md-4 col-lg-2 col-form-label">
|
||||
{{ $t('evaluation_maxdate') }}
|
||||
</label>
|
||||
<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"
|
||||
>
|
||||
</div>
|
||||
|
||||
<label class="col-4 col-sm-2 col-md-4 col-lg-2 col-form-label">
|
||||
{{ $t('evaluation_warning_interval') }}
|
||||
</label>
|
||||
<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"/>
|
||||
</div>
|
||||
<label class="col-4 col-sm-2 col-md-4 col-lg-2 col-form-label">
|
||||
{{ $t('evaluation_warning_interval') }}
|
||||
</label>
|
||||
<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"
|
||||
>
|
||||
</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">
|
||||
<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"
|
||||
></ckeditor>
|
||||
</div>
|
||||
<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 v-if="evaluation.documents.length > 0" class="row mb-3">
|
||||
<h5>{{ $t('Documents') }} :</h5>
|
||||
<div class="row mb-3">
|
||||
<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 class="item-bloc" v-for="(d, i) in evaluation.documents" :key="d.id" :class="[parseInt(this.docAnchorId) === d.id ? 'bg-blink' : 'nothing']">
|
||||
<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
|
||||
v-if="evaluation.documents.length > 0"
|
||||
class="row mb-3"
|
||||
>
|
||||
<h5>{{ $t('Documents') }} :</h5>
|
||||
|
||||
<div class="flex-table">
|
||||
<div
|
||||
class="item-bloc"
|
||||
v-for="(d, i) in evaluation.documents"
|
||||
:key="d.id"
|
||||
:class="[parseInt(this.docAnchorId) === d.id ? 'bg-blink' : 'nothing']"
|
||||
>
|
||||
<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 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-col">
|
||||
<ul class="record_actions">
|
||||
<li v-if="d.workflows_availables.length > 0">
|
||||
<list-workflow-modal
|
||||
:workflows="d.workflows"
|
||||
:allowCreate="true"
|
||||
relatedEntityClass="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocument"
|
||||
:relatedEntityId="d.id"
|
||||
:workflowsAvailables="d.workflows_availables"
|
||||
:preventDefaultMoveToGenerate="true"
|
||||
:goToGenerateWorkflowPayload="{doc: d}"
|
||||
@go-to-generate-workflow="goToGenerateWorkflowEvaluationDocument"
|
||||
></list-workflow-modal>
|
||||
</li>
|
||||
<li>
|
||||
<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 class="item-row">
|
||||
<div class="item-col">
|
||||
<ul class="record_actions">
|
||||
<li v-if="d.workflows_availables.length > 0">
|
||||
<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
|
||||
v-if="AmIRefferer"
|
||||
class="btn btn-notify"
|
||||
@click="goToGenerateDocumentNotification(d, false)">
|
||||
id="btnGroupNotifyButtons"
|
||||
type="button"
|
||||
class="btn btn-notify dropdown-toggle"
|
||||
:title="$t('notification_send')"
|
||||
data-bs-toggle="dropdown"
|
||||
aria-expanded="false"
|
||||
>
|
||||
|
||||
</button>
|
||||
<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"> </button>
|
||||
<ul class="dropdown-menu" 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>
|
||||
</ul>
|
||||
</template>
|
||||
</li>
|
||||
<li>
|
||||
<document-action-buttons-group
|
||||
:stored-object="d.storedObject"
|
||||
:filename="d.title"
|
||||
:can-edit="true"
|
||||
:execute-before-leave="submitBeforeLeaveToEditor"
|
||||
:davLink="d.storedObject._links?.dav_link.href"
|
||||
:davLinkExpiration="d.storedObject._links?.dav_link.expiration"
|
||||
@on-stored-object-status-change="onStatusDocumentChanged"
|
||||
></document-action-buttons-group>
|
||||
</li>
|
||||
<li>
|
||||
<add-async-upload
|
||||
:buttonTitle="$t('replace')"
|
||||
:options="asyncUploadOptions"
|
||||
:btnClasses="{'btn': true, 'btn-edit': true}"
|
||||
@addDocument="(arg) => replaceDocument(d, arg)"
|
||||
>
|
||||
</add-async-upload>
|
||||
</li>
|
||||
<li v-if="d.workflows.length === 0">
|
||||
<a class="btn btn-delete" @click="removeDocument(d)">
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<h6>{{ $t('document_add') }} :</h6>
|
||||
<pick-template
|
||||
entityClass="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation"
|
||||
:id="evaluation.id"
|
||||
:templates="getTemplatesAvailables"
|
||||
:preventDefaultMoveToGenerate="true"
|
||||
@go-to-generate-document="submitBeforeGenerate"
|
||||
>
|
||||
<template v-slot: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
|
||||
:buttonTitle="$t('browse')"
|
||||
:options="asyncUploadOptions"
|
||||
@addDocument="addDocument"
|
||||
>
|
||||
</add-async-upload>
|
||||
</li>
|
||||
</ul>
|
||||
<ul
|
||||
class="dropdown-menu"
|
||||
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>
|
||||
</ul>
|
||||
</template>
|
||||
</li>
|
||||
<li>
|
||||
<document-action-buttons-group
|
||||
:stored-object="d.storedObject"
|
||||
:filename="d.title"
|
||||
:can-edit="true"
|
||||
:execute-before-leave="submitBeforeLeaveToEditor"
|
||||
:dav-link="d.storedObject._links?.dav_link.href"
|
||||
:dav-link-expiration="d.storedObject._links?.dav_link.expiration"
|
||||
@on-stored-object-status-change="onStatusDocumentChanged"
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<add-async-upload
|
||||
:button-title="$t('replace')"
|
||||
:options="asyncUploadOptions"
|
||||
:btn-classes="{'btn': true, 'btn-edit': true}"
|
||||
@add-document="(arg) => replaceDocument(d, arg)"
|
||||
/>
|
||||
</li>
|
||||
<li v-if="d.workflows.length === 0">
|
||||
<a
|
||||
class="btn btn-delete"
|
||||
@click="removeDocument(d)"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<h6>{{ $t('document_add') }} :</h6>
|
||||
<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>
|
||||
|
||||
<script>
|
||||
|
@@ -1,72 +1,80 @@
|
||||
<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">
|
||||
<div class="row">
|
||||
<legend class="col-sm-4 col-form-label">{{ $t('action.label')}}</legend>
|
||||
<div class="col-sm-8">
|
||||
<fieldset
|
||||
class="mb-3"
|
||||
id="goal"
|
||||
>
|
||||
<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
|
||||
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"
|
||||
></VueMultiselect>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="mb-3" id="goal">
|
||||
<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"
|
||||
></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>
|
||||
<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"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,38 +1,62 @@
|
||||
<template>
|
||||
<ol class="breadcrumb">
|
||||
<li
|
||||
v-for="s in steps"
|
||||
:key="s"
|
||||
class="breadcrumb-item" :class="{ active: step === s }"
|
||||
v-for="s in steps"
|
||||
:key="s"
|
||||
class="breadcrumb-item"
|
||||
:class="{ active: step === s }"
|
||||
>
|
||||
{{ $t('household_members_editor.app.steps.'+s) }}
|
||||
{{ $t('household_members_editor.app.steps.'+s) }}
|
||||
</li>
|
||||
</ol>
|
||||
<concerned v-if="step === 'concerned'"></concerned>
|
||||
<household v-if="step === 'household'" @ready-to-go="goToNext"></household>
|
||||
<household-address v-if="step === 'household_address'"></household-address>
|
||||
<positioning v-if="step === 'positioning'"></positioning>
|
||||
<dates v-if="step === 'confirm'"></dates>
|
||||
<confirmation v-if="step === 'confirm'"></confirmation>
|
||||
<concerned v-if="step === 'concerned'" />
|
||||
<household
|
||||
v-if="step === 'household'"
|
||||
@ready-to-go="goToNext"
|
||||
/>
|
||||
<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">
|
||||
<li class="cancel" v-if="step !== 'concerned'">
|
||||
<button class="btn btn-cancel" @click="goToPrevious">
|
||||
<li
|
||||
class="cancel"
|
||||
v-if="step !== 'concerned'"
|
||||
>
|
||||
<button
|
||||
class="btn btn-cancel"
|
||||
@click="goToPrevious"
|
||||
>
|
||||
{{ $t('household_members_editor.app.previous') }}
|
||||
</button>
|
||||
</li>
|
||||
<li class="cancel" v-else-if="hasReturnPath">
|
||||
<button class="btn btn-cancel" @click="goToPrevious">
|
||||
<li
|
||||
class="cancel"
|
||||
v-else-if="hasReturnPath"
|
||||
>
|
||||
<button
|
||||
class="btn btn-cancel"
|
||||
@click="goToPrevious"
|
||||
>
|
||||
{{ $t('household_members_editor.app.cancel') }}
|
||||
</button>
|
||||
</li>
|
||||
<li v-if="step !== 'confirm'">
|
||||
<button class="btn btn-action" @click="goToNext" :disabled="!isNextAllowed">
|
||||
{{ $t('household_members_editor.app.next') }} <i class="fa fa-arrow-right"></i>
|
||||
<button
|
||||
class="btn btn-action"
|
||||
@click="goToNext"
|
||||
:disabled="!isNextAllowed"
|
||||
>
|
||||
{{ $t('household_members_editor.app.next') }} <i class="fa fa-arrow-right" />
|
||||
</button>
|
||||
</li>
|
||||
<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') }}
|
||||
</button>
|
||||
</li>
|
||||
|
@@ -1,5 +1,7 @@
|
||||
<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 class="alert alert-info">
|
||||
@@ -10,33 +12,47 @@
|
||||
<p>{{ $t('household_members_editor.concerned.persons_will_be_moved') }} :</p>
|
||||
|
||||
<ul class="list-suggest remove-items inline">
|
||||
<li v-for="c in concerned" :key="c.person.id" @click="removeConcerned(c)">
|
||||
<span><person-text :person="c.person"></person-text></span>
|
||||
<li
|
||||
v-for="c in concerned"
|
||||
:key="c.person.id"
|
||||
@click="removeConcerned(c)"
|
||||
>
|
||||
<span><person-text :person="c.person" /></span>
|
||||
</li>
|
||||
</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>
|
||||
<ul v-for="c in concernedPersonsWithHouseholds" :key="c.person.id">
|
||||
<ul
|
||||
v-for="c in concernedPersonsWithHouseholds"
|
||||
:key="c.person.id"
|
||||
>
|
||||
<li>
|
||||
{{ c.person.text }}
|
||||
{{ $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>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<ul class="record_actions">
|
||||
<li class="add-persons">
|
||||
<add-persons
|
||||
buttonTitle="household_members_editor.concerned.add_persons"
|
||||
modalTitle="household_members_editor.concerned.search"
|
||||
v-bind:key="addPersons.key"
|
||||
v-bind:options="addPersons.options"
|
||||
@addNewPersons="addNewPersons"
|
||||
ref="addPersons"> <!-- to cast child method -->
|
||||
button-title="household_members_editor.concerned.add_persons"
|
||||
modal-title="household_members_editor.concerned.search"
|
||||
:key="addPersons.key"
|
||||
:options="addPersons.options"
|
||||
@add-new-persons="addNewPersons"
|
||||
ref="addPersons"
|
||||
>
|
||||
<!-- to cast child method -->
|
||||
</add-persons>
|
||||
</li>
|
||||
</ul>
|
||||
|
@@ -1,5 +1,8 @@
|
||||
<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') }}
|
||||
</div>
|
||||
|
||||
@@ -8,10 +11,18 @@
|
||||
</p>
|
||||
|
||||
<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) }}
|
||||
</li>
|
||||
<li v-for="(msg, i) in errors" class="error" :key="i">
|
||||
<li
|
||||
v-for="(msg, i) in errors"
|
||||
class="error"
|
||||
:key="i"
|
||||
>
|
||||
{{ msg }}
|
||||
</li>
|
||||
</ul>
|
||||
|
@@ -1,25 +1,31 @@
|
||||
<template>
|
||||
<div class="flex-table mb-5" v-if="hasHousehold">
|
||||
<div
|
||||
class="flex-table mb-5"
|
||||
v-if="hasHousehold"
|
||||
>
|
||||
<div class="item-bloc">
|
||||
<household-render-box :household="fakeHouseholdWithConcerned"></household-render-box>
|
||||
<household-render-box :household="fakeHouseholdWithConcerned" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-table" v-if="isModeLeave">
|
||||
<div
|
||||
class="flex-table"
|
||||
v-if="isModeLeave"
|
||||
>
|
||||
<div class="item-bloc">
|
||||
<section>
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<div class="h4">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-home fa-stack-1x"></i>
|
||||
<i class="fa fa-ban fa-stack-2x text-danger"></i>
|
||||
</span>
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-home fa-stack-1x" />
|
||||
<i class="fa fa-ban fa-stack-2x text-danger" />
|
||||
</span>
|
||||
{{ $t('household_members_editor.household.leave_without_household') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
</section>
|
||||
</div>
|
||||
|
@@ -1,15 +1,21 @@
|
||||
<template>
|
||||
|
||||
<current-household></current-household>
|
||||
<current-household />
|
||||
|
||||
<h2>{{ $t('household_members_editor.dates.dates_title') }}</h2>
|
||||
|
||||
<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') }}
|
||||
</label>
|
||||
<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>
|
||||
|
||||
@@ -18,15 +24,30 @@
|
||||
<div class="mb-3 row">
|
||||
<label class="col-form-label col-sm-4 required">{{ $t('household_members_editor.composition.household_composition') }}</label>
|
||||
<div class="col-sm-8">
|
||||
<select 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
|
||||
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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label class="col-form-label col-sm-4 required">{{ $t('household_members_editor.composition.number_of_children') }}</label>
|
||||
<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>
|
||||
|
@@ -1,49 +1,77 @@
|
||||
<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" v-if="!hasHousehold">
|
||||
<div
|
||||
class="alert alert-info"
|
||||
v-if="!hasHousehold"
|
||||
>
|
||||
{{ $t('household_members_editor.household.no_household_choose_one') }}
|
||||
</div>
|
||||
<template v-else>
|
||||
<current-household></current-household>
|
||||
<current-household />
|
||||
</template>
|
||||
|
||||
<div v-if="hasHouseholdSuggestion" class="householdSuggestions my-5">
|
||||
<div
|
||||
v-if="hasHouseholdSuggestion"
|
||||
class="householdSuggestions my-5"
|
||||
>
|
||||
<h4 class="mb-3">
|
||||
{{ $t('household_members_editor.household.household_suggested') }}
|
||||
</h4>
|
||||
<p>{{ $t('household_members_editor.household.household_suggested_explanation') }}</p>
|
||||
<div class="accordion" id="householdSuggestions">
|
||||
<div
|
||||
class="accordion"
|
||||
id="householdSuggestions"
|
||||
>
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header" id="heading_household_suggestions">
|
||||
<button v-if="!showHouseholdSuggestion"
|
||||
class="accordion-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
aria-expanded="false"
|
||||
@click="toggleHouseholdSuggestion">
|
||||
<h2
|
||||
class="accordion-header"
|
||||
id="heading_household_suggestions"
|
||||
>
|
||||
<button
|
||||
v-if="!showHouseholdSuggestion"
|
||||
class="accordion-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
aria-expanded="false"
|
||||
@click="toggleHouseholdSuggestion"
|
||||
>
|
||||
{{ $tc('household_members_editor.show_household_suggestion', countHouseholdSuggestion) }}
|
||||
</button>
|
||||
<button v-if="showHouseholdSuggestion"
|
||||
class="accordion-button"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
aria-expanded="true"
|
||||
@click="toggleHouseholdSuggestion">
|
||||
<button
|
||||
v-if="showHouseholdSuggestion"
|
||||
class="accordion-button"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
aria-expanded="true"
|
||||
@click="toggleHouseholdSuggestion"
|
||||
>
|
||||
{{ $t('household_members_editor.hide_household_suggestion') }}
|
||||
</button>
|
||||
<!-- disabled bootstrap behaviour: data-bs-target="#collapse_household_suggestions" aria-controls="collapse_household_suggestions" -->
|
||||
</h2>
|
||||
<div class="accordion-collapse" id="collapse_household_suggestions"
|
||||
aria-labelledby="heading_household_suggestions" data-bs-parent="#householdSuggestions">
|
||||
<div
|
||||
class="accordion-collapse"
|
||||
id="collapse_household_suggestions"
|
||||
aria-labelledby="heading_household_suggestions"
|
||||
data-bs-parent="#householdSuggestions"
|
||||
>
|
||||
<div v-if="showHouseholdSuggestion">
|
||||
<div class="flex-table householdSuggestionList">
|
||||
<div v-for="(s, i) in getSuggestions" class="item-bloc" :key="`householdSuggestions-${i}`">
|
||||
<household-render-box :household="s.household"></household-render-box>
|
||||
<div
|
||||
v-for="(s, i) in getSuggestions"
|
||||
class="item-bloc"
|
||||
:key="`householdSuggestions-${i}`"
|
||||
>
|
||||
<household-render-box :household="s.household" />
|
||||
<ul class="record_actions">
|
||||
<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') }}
|
||||
</button>
|
||||
</li>
|
||||
@@ -59,24 +87,42 @@
|
||||
|
||||
<ul class="record_actions">
|
||||
<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 v-if="!hasHousehold" class="add-persons">
|
||||
<li
|
||||
v-if="!hasHousehold"
|
||||
class="add-persons"
|
||||
>
|
||||
<add-persons
|
||||
modalTitle="Chercher un ménage existant"
|
||||
buttonTitle="Chercher un ménage existant"
|
||||
v-bind:key="addPersons.key"
|
||||
v-bind:options="addPersons.options"
|
||||
@addNewPersons="pickHouseholdFound"
|
||||
ref="pickHousehold"> <!-- to cast child method -->
|
||||
modal-title="Chercher un ménage existant"
|
||||
button-title="Chercher un ménage existant"
|
||||
:key="addPersons.key"
|
||||
:options="addPersons.options"
|
||||
@add-new-persons="pickHouseholdFound"
|
||||
ref="pickHousehold"
|
||||
>
|
||||
<!-- to cast child method -->
|
||||
</add-persons>
|
||||
</li>
|
||||
<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 v-if="isModeLeaveAllowed && !hasHousehold">
|
||||
<button @click="setModeLeave" class="btn btn-sm btn-misc">
|
||||
<i class="fa fa-sign-out"></i>
|
||||
<button
|
||||
@click="setModeLeave"
|
||||
class="btn btn-sm btn-misc"
|
||||
>
|
||||
<i class="fa fa-sign-out" />
|
||||
{{ $t('household_members_editor.household.leave') }}
|
||||
</button>
|
||||
</li>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<current-household></current-household>
|
||||
<current-household />
|
||||
|
||||
<ul class="record_actions">
|
||||
<!-- <li v-if="!hasHouseholdAddress && !isHouseholdForceAddress">
|
||||
@@ -9,20 +9,21 @@
|
||||
</li> -->
|
||||
<li v-if="!hasHouseholdAddress">
|
||||
<add-address
|
||||
:context="getAddressContext"
|
||||
:key="addAddress.key"
|
||||
:options="addAddress.options"
|
||||
:addressChangedCallback="addressChanged"
|
||||
></add-address>
|
||||
:context="getAddressContext"
|
||||
:key="addAddress.key"
|
||||
:options="addAddress.options"
|
||||
:address-changed-callback="addressChanged"
|
||||
/>
|
||||
</li>
|
||||
<li v-if="hasHouseholdAddress">
|
||||
<button class="btn btn-remove"
|
||||
@click="removeHouseholdAddress">
|
||||
<button
|
||||
class="btn btn-remove"
|
||||
@click="removeHouseholdAddress"
|
||||
>
|
||||
{{ $t('household_members_editor.household_address.remove_address') }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -3,17 +3,26 @@
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<div>
|
||||
<person-render-box render="badge" :options="{}" :person="conc.person"></person-render-box>
|
||||
<span v-if="isHolder" class="badge bg-primary holder">
|
||||
<person-render-box
|
||||
render="badge"
|
||||
:options="{}"
|
||||
:person="conc.person"
|
||||
/>
|
||||
<span
|
||||
v-if="isHolder"
|
||||
class="badge bg-primary holder"
|
||||
>
|
||||
{{ $t('household_members_editor.holder') }}
|
||||
</span>
|
||||
</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 class="item-col">
|
||||
<ul class="list-content fa-ul">
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -21,24 +30,42 @@
|
||||
</div>
|
||||
|
||||
<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 class="item-row participation-details">
|
||||
<div v-if="conc.position.allowHolder" 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') }}
|
||||
<div
|
||||
v-if="conc.position.allowHolder"
|
||||
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>
|
||||
</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}) }}
|
||||
</button>
|
||||
</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') }}
|
||||
</button>
|
||||
</div>
|
||||
|
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<ckeditor
|
||||
name="content"
|
||||
v-bind:placeholder="$t('household_members_editor.positioning.comment_placeholder')"
|
||||
:editor="editor"
|
||||
v-model="content"
|
||||
tag-name="textarea">
|
||||
</ckeditor>
|
||||
name="content"
|
||||
:placeholder="$t('household_members_editor.positioning.comment_placeholder')"
|
||||
:editor="editor"
|
||||
v-model="content"
|
||||
tag-name="textarea"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,51 +1,51 @@
|
||||
<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
|
||||
v-for="conc in concerned"
|
||||
class="item-bloc"
|
||||
v-bind:key="conc.person.id"
|
||||
>
|
||||
<div class="pick-position item-row">
|
||||
<div class="person">
|
||||
<!-- <h3>{{ conc.person.text }}</h3> -->
|
||||
<h3><person-text :person="conc.person"></person-text></h3>
|
||||
</div>
|
||||
<div class="holder">
|
||||
<button
|
||||
class="btn"
|
||||
:disabled="!allowHolderForConcerned(conc)"
|
||||
:class="{'btn-outline-chill-green': !conc.holder, 'btn-chill-green': conc.holder }"
|
||||
@click="toggleHolder(conc)"
|
||||
>
|
||||
{{ $t('household_members_editor.positioning.holder') }}
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
v-for="(position, i) in positions"
|
||||
:key="`position-${i}`"
|
||||
class="position"
|
||||
>
|
||||
<button
|
||||
class="btn"
|
||||
:class="{ 'btn-primary': conc.position === position, 'btn-outline-primary': conc.position !== position }"
|
||||
@click="moveToPosition(conc.person.id, position.id)"
|
||||
>
|
||||
{{ position.label.fr }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-row">
|
||||
<div>
|
||||
<h6>{{ $t('household_members_editor.positioning.comment') }}</h6>
|
||||
<person-comment :conc="conc"></person-comment>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-household-members flex-table">
|
||||
<div
|
||||
v-for="conc in concerned"
|
||||
class="item-bloc"
|
||||
:key="conc.person.id"
|
||||
>
|
||||
<div class="pick-position item-row">
|
||||
<div class="person">
|
||||
<!-- <h3>{{ conc.person.text }}</h3> -->
|
||||
<h3><person-text :person="conc.person" /></h3>
|
||||
</div>
|
||||
<div class="holder">
|
||||
<button
|
||||
class="btn"
|
||||
:disabled="!allowHolderForConcerned(conc)"
|
||||
:class="{'btn-outline-chill-green': !conc.holder, 'btn-chill-green': conc.holder }"
|
||||
@click="toggleHolder(conc)"
|
||||
>
|
||||
{{ $t('household_members_editor.positioning.holder') }}
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
v-for="(position, i) in positions"
|
||||
:key="`position-${i}`"
|
||||
class="position"
|
||||
>
|
||||
<button
|
||||
class="btn"
|
||||
:class="{ 'btn-primary': conc.position === position, 'btn-outline-primary': conc.position !== position }"
|
||||
@click="moveToPosition(conc.person.id, position.id)"
|
||||
>
|
||||
{{ position.label.fr }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-row">
|
||||
<div>
|
||||
<h6>{{ $t('household_members_editor.positioning.comment') }}</h6>
|
||||
<person-comment :conc="conc" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,127 +1,166 @@
|
||||
<template>
|
||||
<div id="visgraph" />
|
||||
|
||||
<div id="visgraph"></div>
|
||||
|
||||
<teleport to="#visgraph-legend">
|
||||
<div class="post-menu">
|
||||
<div class="list-group mt-4">
|
||||
<button type="button" class="list-group-item list-group-item-action btn btn-misc" @click="createRelationship">
|
||||
<i class="fa fa-plus"></i> {{ $t('visgraph.add_link') }}
|
||||
</button>
|
||||
<a type="button" class="list-group-item list-group-item-action btn btn-misc" id="exportCanvasBtn" @click="exportCanvasAsImage">
|
||||
<i class="fa fa-camera fa-fw"></i> {{ $t('visgraph.screenshot') }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div v-if="displayHelpMessage" class="alert alert-info mt-3">
|
||||
{{ $t('visgraph.create_link_help') }}
|
||||
</div>
|
||||
|
||||
<div class="my-4 legend">
|
||||
<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>
|
||||
<teleport to="#visgraph-legend">
|
||||
<div class="post-menu">
|
||||
<div class="list-group mt-4">
|
||||
<button
|
||||
type="button"
|
||||
class="list-group-item list-group-item-action btn btn-misc"
|
||||
@click="createRelationship"
|
||||
>
|
||||
<i class="fa fa-plus" /> {{ $t('visgraph.add_link') }}
|
||||
</button>
|
||||
<a
|
||||
type="button"
|
||||
class="list-group-item list-group-item-action btn btn-misc"
|
||||
id="exportCanvasBtn"
|
||||
@click="exportCanvasAsImage"
|
||||
>
|
||||
<i class="fa fa-camera fa-fw" /> {{ $t('visgraph.screenshot') }}
|
||||
</a>
|
||||
</div>
|
||||
</teleport>
|
||||
|
||||
<teleport to="body">
|
||||
<modal v-if="modal.showModal" :modalDialogClass="modal.modalDialogClass" @close="modal.showModal = false">
|
||||
<template v-slot:header>
|
||||
<h2 class="modal-title">{{ $t(modal.title) }}</h2>
|
||||
<!-- {{ modal.data.id }} -->
|
||||
</template>
|
||||
<template v-slot:body>
|
||||
<div v-if="modal.action === 'delete'">
|
||||
<p>{{ $t('visgraph.delete_confirmation_text') }}</p>
|
||||
<div
|
||||
v-if="displayHelpMessage"
|
||||
class="alert alert-info mt-3"
|
||||
>
|
||||
{{ $t('visgraph.create_link_help') }}
|
||||
</div>
|
||||
|
||||
<div class="my-4 legend">
|
||||
<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 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 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 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"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:footer>
|
||||
<button class="btn" :class="modal.button.class" @click="submitRelationship">
|
||||
{{ $t(modal.button.text)}}
|
||||
</button>
|
||||
<button class="btn btn-delete" v-if="modal.action === 'edit'" @click="dropRelationship"></button>
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li>
|
||||
<add-persons
|
||||
buttonTitle="visgraph.add_person"
|
||||
modalTitle="visgraph.add_person"
|
||||
v-bind:key="addPersons.key"
|
||||
v-bind:options="addPersons.options"
|
||||
@addNewPersons="addNewPersons"
|
||||
ref="addPersons">
|
||||
</add-persons>
|
||||
</li>
|
||||
</ul>
|
||||
<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>
|
||||
</template>
|
||||
<template #footer>
|
||||
<button
|
||||
class="btn"
|
||||
:class="modal.button.class"
|
||||
@click="submitRelationship"
|
||||
>
|
||||
{{ $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>
|
||||
|
||||
<script>
|
||||
|
@@ -1,7 +1,16 @@
|
||||
<template>
|
||||
<ul class="list-suggest add-items" v-if="suggested.length > 0">
|
||||
<li v-for="(r, i) in suggested" @click="setReferrer(r)" :key="i"><span>{{ r.text }}</span></li>
|
||||
</ul>
|
||||
<ul
|
||||
class="list-suggest add-items"
|
||||
v-if="suggested.length > 0"
|
||||
>
|
||||
<li
|
||||
v-for="(r, i) in suggested"
|
||||
@click="setReferrer(r)"
|
||||
:key="i"
|
||||
>
|
||||
<span>{{ r.text }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,91 +1,114 @@
|
||||
<template>
|
||||
<a class="btn" :class="getClassButton" :title="$t(buttonTitle || '')" @click="openModal">
|
||||
<span v-if="displayTextButton">{{ $t(buttonTitle || '') }}</span>
|
||||
</a>
|
||||
<a
|
||||
class="btn"
|
||||
:class="getClassButton"
|
||||
:title="$t(buttonTitle || '')"
|
||||
@click="openModal"
|
||||
>
|
||||
<span v-if="displayTextButton">{{ $t(buttonTitle || '') }}</span>
|
||||
</a>
|
||||
|
||||
<teleport to="body">
|
||||
<modal v-if="modal.showModal"
|
||||
:modalDialogClass="modal.modalDialogClass"
|
||||
@close="modal.showModal = false">
|
||||
<modal
|
||||
v-if="modal.showModal"
|
||||
:modal-dialog-class="modal.modalDialogClass"
|
||||
@close="modal.showModal = false"
|
||||
>
|
||||
<template #header>
|
||||
<h3 class="modal-title">
|
||||
{{ $t(modalTitle) }}
|
||||
</h3>
|
||||
</template>
|
||||
|
||||
<template v-slot:header>
|
||||
<h3 class="modal-title">{{ $t(modalTitle) }}</h3>
|
||||
</template>
|
||||
<template #body-head>
|
||||
<div class="modal-body">
|
||||
<div class="search">
|
||||
<label
|
||||
class="col-form-label"
|
||||
style="float: right;"
|
||||
>
|
||||
{{ $tc('add_persons.suggested_counter', suggestedCounter) }}
|
||||
</label>
|
||||
|
||||
<template v-slot:body-head>
|
||||
<div class="modal-body">
|
||||
<div class="search">
|
||||
<input
|
||||
id="search-persons"
|
||||
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;">
|
||||
{{ $tc('add_persons.suggested_counter', suggestedCounter) }}
|
||||
</label>
|
||||
<template #body>
|
||||
<div class="results">
|
||||
<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"
|
||||
name="query"
|
||||
v-model="query"
|
||||
:placeholder="$t('add_persons.search_some_persons')"
|
||||
ref="search" />
|
||||
<i class="fa fa-search fa-lg"></i>
|
||||
<i class="fa fa-times" v-if="queryLength >= 3" @click="resetSuggestion"></i>
|
||||
<div class="create-button">
|
||||
<on-the-fly
|
||||
v-if="queryLength >= 3 && (options.type.includes('person') || options.type.includes('thirdparty'))"
|
||||
:button-text="$t('onthefly.create.button', {q: query})"
|
||||
:allowed-types="options.type"
|
||||
:query="query"
|
||||
action="create"
|
||||
@save-form-on-the-fly="saveFormOnTheFly"
|
||||
ref="onTheFly"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</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>
|
||||
|
||||
<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 #footer>
|
||||
<button
|
||||
class="btn btn-create"
|
||||
@click.prevent="$emit('addNewPersons', { selected, modal })"
|
||||
>
|
||||
{{ $t('action.add') }}
|
||||
</button>
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,39 +1,41 @@
|
||||
<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>
|
||||
<div>
|
||||
<input
|
||||
v-bind:type="type"
|
||||
v-model="selected"
|
||||
name="item"
|
||||
v-bind:id="item"
|
||||
v-bind:value="setValueByType(item, type)" />
|
||||
</div>
|
||||
<suggestion-person
|
||||
v-if="item.result.type === 'person'"
|
||||
:item="item"
|
||||
/>
|
||||
|
||||
<suggestion-person
|
||||
v-if="item.result.type === 'person'"
|
||||
v-bind:item="item">
|
||||
</suggestion-person>
|
||||
<suggestion-third-party
|
||||
v-if="item.result.type === 'thirdparty'"
|
||||
@new-prior-suggestion="newPriorSuggestion"
|
||||
:item="item"
|
||||
/>
|
||||
|
||||
<suggestion-third-party
|
||||
v-if="item.result.type === 'thirdparty'"
|
||||
@newPriorSuggestion="newPriorSuggestion"
|
||||
v-bind:item="item">
|
||||
</suggestion-third-party>
|
||||
<suggestion-user
|
||||
v-if="item.result.type === 'user'"
|
||||
:item="item"
|
||||
/>
|
||||
|
||||
<suggestion-user
|
||||
v-if="item.result.type === 'user'"
|
||||
v-bind:item="item">
|
||||
</suggestion-user>
|
||||
|
||||
<suggestion-household
|
||||
v-if="item.result.type === 'household'"
|
||||
v-bind:item="item">
|
||||
</suggestion-household>
|
||||
</label>
|
||||
|
||||
</div>
|
||||
<suggestion-household
|
||||
v-if="item.result.type === 'household'"
|
||||
:item="item"
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,14 +1,17 @@
|
||||
<template>
|
||||
<div class="container household">
|
||||
<household-render-box :household="item.result" :isAddressMultiline="false"></household-render-box>
|
||||
</div>
|
||||
<div class="container household">
|
||||
<household-render-box
|
||||
:household="item.result"
|
||||
:is-address-multiline="false"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="right_actions">
|
||||
<badge-entity
|
||||
:entity="item.result"
|
||||
:options="{ displayLong: true }">
|
||||
</badge-entity>
|
||||
</div>
|
||||
<div class="right_actions">
|
||||
<badge-entity
|
||||
:entity="item.result"
|
||||
:options="{ displayLong: true }"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,28 +1,34 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<span class="name">
|
||||
<person-text :person="item.result"></person-text>
|
||||
</span>
|
||||
<span class="birthday" v-if="hasBirthdate">
|
||||
{{ $d(item.result.birthdate.datetime, 'short') }}
|
||||
</span>
|
||||
<span class="location" v-if="hasAddress">
|
||||
{{ item.result.current_household_address.text }} -
|
||||
{{ item.result.current_household_address.postcode.name }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="container">
|
||||
<span class="name">
|
||||
<person-text :person="item.result" />
|
||||
</span>
|
||||
<span
|
||||
class="birthday"
|
||||
v-if="hasBirthdate"
|
||||
>
|
||||
{{ $d(item.result.birthdate.datetime, 'short') }}
|
||||
</span>
|
||||
<span
|
||||
class="location"
|
||||
v-if="hasAddress"
|
||||
>
|
||||
{{ item.result.current_household_address.text }} -
|
||||
{{ item.result.current_household_address.postcode.name }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="right_actions">
|
||||
<badge-entity
|
||||
:entity="item.result"
|
||||
:options="{ displayLong: true }">
|
||||
</badge-entity>
|
||||
<on-the-fly
|
||||
type="person"
|
||||
v-bind:id="item.result.id"
|
||||
action="show">
|
||||
</on-the-fly>
|
||||
</div>
|
||||
<div class="right_actions">
|
||||
<badge-entity
|
||||
:entity="item.result"
|
||||
:options="{ displayLong: true }"
|
||||
/>
|
||||
<on-the-fly
|
||||
type="person"
|
||||
:id="item.result.id"
|
||||
action="show"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,41 +1,48 @@
|
||||
<template>
|
||||
<div class="container tpartycontainer">
|
||||
<div class="tparty-identification">
|
||||
<span v-if="item.result.profession" class="profession">{{ item.result.profession }}</span>
|
||||
<span class="name">
|
||||
{{ item.result.text }}
|
||||
</span>
|
||||
<span class="location">
|
||||
<template v-if="hasAddress">
|
||||
{{ getAddress.text }} -
|
||||
{{ getAddress.postcode.name }}
|
||||
</template>
|
||||
</span>
|
||||
</div>
|
||||
<div class="tpartyparent" v-if="hasParent">
|
||||
<span class="name">
|
||||
> {{ item.result.parent.text }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="container tpartycontainer">
|
||||
<div class="tparty-identification">
|
||||
<span
|
||||
v-if="item.result.profession"
|
||||
class="profession"
|
||||
>{{ item.result.profession }}</span>
|
||||
<span class="name">
|
||||
{{ item.result.text }}
|
||||
</span>
|
||||
<span class="location">
|
||||
<template v-if="hasAddress">
|
||||
{{ getAddress.text }} -
|
||||
{{ getAddress.postcode.name }}
|
||||
</template>
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="tpartyparent"
|
||||
v-if="hasParent"
|
||||
>
|
||||
<span class="name">
|
||||
> {{ item.result.parent.text }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="right_actions">
|
||||
<badge-entity
|
||||
:entity="item.result"
|
||||
:options="{ displayLong: true }">
|
||||
</badge-entity>
|
||||
<on-the-fly v-if="item.result.kind === 'company'"
|
||||
v-bind:parent="item.result"
|
||||
@saveFormOnTheFly="saveFormOnTheFly"
|
||||
action="addContact"
|
||||
ref="onTheFly"
|
||||
></on-the-fly>
|
||||
<on-the-fly
|
||||
type="thirdparty"
|
||||
v-bind:id="item.result.id"
|
||||
action="show">
|
||||
</on-the-fly>
|
||||
</div>
|
||||
<div class="right_actions">
|
||||
<badge-entity
|
||||
:entity="item.result"
|
||||
:options="{ displayLong: true }"
|
||||
/>
|
||||
<on-the-fly
|
||||
v-if="item.result.kind === 'company'"
|
||||
:parent="item.result"
|
||||
@save-form-on-the-fly="saveFormOnTheFly"
|
||||
action="addContact"
|
||||
ref="onTheFly"
|
||||
/>
|
||||
<on-the-fly
|
||||
type="thirdparty"
|
||||
:id="item.result.id"
|
||||
action="show"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<div class="container usercontainer">
|
||||
<div class="user-identification">
|
||||
<user-render-box-badge :user="item.result"></user-render-box-badge>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right_actions">
|
||||
<badge-entity
|
||||
:entity="item.result"
|
||||
:options="{ displayLong: true }">
|
||||
</badge-entity>
|
||||
<div class="container usercontainer">
|
||||
<div class="user-identification">
|
||||
<user-render-box-badge :user="item.result" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="right_actions">
|
||||
<badge-entity
|
||||
:entity="item.result"
|
||||
:options="{ displayLong: true }"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,53 +1,78 @@
|
||||
<template>
|
||||
<section class="chill-entity entity-household">
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
|
||||
<!-- identifier -->
|
||||
<div v-if="isHouseholdNew()" class="h4">
|
||||
<i class="fa fa-home"></i>
|
||||
{{ $t('new_household') }}
|
||||
</div>
|
||||
<div v-else class="h4">
|
||||
<i class="fa fa-home"></i>
|
||||
{{ $t('household_number', { number: household.id } ) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="item-col">
|
||||
<ul class="list-content">
|
||||
|
||||
<!-- member part -->
|
||||
<li v-if="hasCurrentMembers" class="members" :title="$t('current_members')">
|
||||
<span v-for="m in currentMembers()" :key="m.id" class="m" :class="{ is_new: m.is_new === true}">
|
||||
<person-render-box render="badge"
|
||||
:person="m.person"
|
||||
:options="{
|
||||
isHolder: m.holder,
|
||||
addLink: true
|
||||
}">
|
||||
<template v-slot:post-badge v-if="m.is_new === true">
|
||||
<span class="post-badge is_new"><i class="fa fa-sign-in"></i></span>
|
||||
</template>
|
||||
</person-render-box>
|
||||
</span>
|
||||
</li>
|
||||
<li v-else class="members" :title="$t('current_members')">
|
||||
<p class="chill-no-data-statement">{{ $t('no_members_yet') }}</p>
|
||||
</li>
|
||||
|
||||
<!-- address part -->
|
||||
<li v-if="hasAddress()">
|
||||
<address-render-box :address="household.current_address" :isMultiline="isMultiline"></address-render-box>
|
||||
</li>
|
||||
<li v-else>
|
||||
<span class="chill-no-data-statement">{{ $t('no_current_address') }}</span>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<section class="chill-entity entity-household">
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<!-- identifier -->
|
||||
<div
|
||||
v-if="isHouseholdNew()"
|
||||
class="h4"
|
||||
>
|
||||
<i class="fa fa-home" />
|
||||
{{ $t('new_household') }}
|
||||
</div>
|
||||
<div
|
||||
v-else
|
||||
class="h4"
|
||||
>
|
||||
<i class="fa fa-home" />
|
||||
{{ $t('household_number', { number: household.id } ) }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div class="item-col">
|
||||
<ul class="list-content">
|
||||
<!-- member part -->
|
||||
<li
|
||||
v-if="hasCurrentMembers"
|
||||
class="members"
|
||||
:title="$t('current_members')"
|
||||
>
|
||||
<span
|
||||
v-for="m in currentMembers()"
|
||||
:key="m.id"
|
||||
class="m"
|
||||
:class="{ is_new: m.is_new === true}"
|
||||
>
|
||||
<person-render-box
|
||||
render="badge"
|
||||
:person="m.person"
|
||||
:options="{
|
||||
isHolder: m.holder,
|
||||
addLink: true
|
||||
}"
|
||||
>
|
||||
<template
|
||||
#post-badge
|
||||
v-if="m.is_new === true"
|
||||
>
|
||||
<span class="post-badge is_new"><i class="fa fa-sign-in" /></span>
|
||||
</template>
|
||||
</person-render-box>
|
||||
</span>
|
||||
</li>
|
||||
<li
|
||||
v-else
|
||||
class="members"
|
||||
:title="$t('current_members')"
|
||||
>
|
||||
<p class="chill-no-data-statement">
|
||||
{{ $t('no_members_yet') }}
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<!-- address part -->
|
||||
<li v-if="hasAddress()">
|
||||
<address-render-box
|
||||
:address="household.current_address"
|
||||
:is-multiline="isMultiline"
|
||||
/>
|
||||
</li>
|
||||
<li v-else>
|
||||
<span class="chill-no-data-statement">{{ $t('no_current_address') }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,59 +1,101 @@
|
||||
<template>
|
||||
<div v-if="render === 'bloc'" class="item-bloc">
|
||||
<div
|
||||
v-if="render === 'bloc'"
|
||||
class="item-bloc"
|
||||
>
|
||||
<section class="chill-entity entity-person">
|
||||
<div class="item-row entity-bloc">
|
||||
|
||||
<div class="item-col">
|
||||
<div class="entity-label">
|
||||
|
||||
<div :class="'denomination h' + options.hLevel">
|
||||
|
||||
<a v-if="options.addLink === true" :href="getUrl">
|
||||
<a
|
||||
v-if="options.addLink === true"
|
||||
:href="getUrl"
|
||||
>
|
||||
<!-- use person-text here to avoid code duplication ? TODO -->
|
||||
<span class="firstname">{{ person.firstName }}</span>
|
||||
<span class="lastname">{{ person.lastName }}</span>
|
||||
<span v-if="person.suffixText" class="suffixtext"> {{ person.suffixText }}</span>
|
||||
<span v-if="person.altNames && options.addAltNames == true" class="altnames">
|
||||
<span :class="'altname altname-' + altNameKey">{{ altNameLabel }}</span>
|
||||
</span>
|
||||
<span
|
||||
v-if="person.suffixText"
|
||||
class="suffixtext"
|
||||
> {{ person.suffixText }}</span>
|
||||
<span
|
||||
v-if="person.altNames && options.addAltNames == true"
|
||||
class="altnames"
|
||||
>
|
||||
<span :class="'altname altname-' + altNameKey">{{ altNameLabel }}</span>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<!-- use person-text here to avoid code duplication ? TODO -->
|
||||
<span class="firstname">{{ person.firstName }}</span>
|
||||
<span class="lastname">{{ person.lastName }}</span>
|
||||
<span v-if="person.suffixText" class="suffixtext"> {{ person.suffixText }}</span>
|
||||
<span v-if="person.deathdate" class="deathdate"> (‡)</span>
|
||||
<span v-if="person.altNames && options.addAltNames == true" class="altnames">
|
||||
<span :class="'altname altname-' + altNameKey">{{ altNameLabel }}</span>
|
||||
</span>
|
||||
<span
|
||||
v-if="person.suffixText"
|
||||
class="suffixtext"
|
||||
> {{ person.suffixText }}</span>
|
||||
<span
|
||||
v-if="person.deathdate"
|
||||
class="deathdate"
|
||||
> (‡)</span>
|
||||
<span
|
||||
v-if="person.altNames && options.addAltNames == true"
|
||||
class="altnames"
|
||||
>
|
||||
<span :class="'altname altname-' + altNameKey">{{ altNameLabel }}</span>
|
||||
</span>
|
||||
|
||||
<span v-if="options.addId == true" class="id-number" :title="'n° ' + person.id">{{ person.id }}</span>
|
||||
|
||||
<badge-entity v-if="options.addEntity === true"
|
||||
:entity="person"
|
||||
:options="{ displayLong: options.entityDisplayLong }">
|
||||
</badge-entity>
|
||||
<span
|
||||
v-if="options.addId == true"
|
||||
class="id-number"
|
||||
:title="'n° ' + person.id"
|
||||
>{{ person.id }}</span>
|
||||
|
||||
<badge-entity
|
||||
v-if="options.addEntity === true"
|
||||
:entity="person"
|
||||
:options="{ displayLong: options.entityDisplayLong }"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<p v-if="options.addInfo === true" class="moreinfo">
|
||||
<gender-icon-render-box v-if="person.gender" :gender="person.gender"></gender-icon-render-box>
|
||||
<time v-if="person.birthdate && !person.deathdate" :datetime="person.birthdate" :title="birthdate">
|
||||
<p
|
||||
v-if="options.addInfo === true"
|
||||
class="moreinfo"
|
||||
>
|
||||
<gender-icon-render-box
|
||||
v-if="person.gender"
|
||||
:gender="person.gender"
|
||||
/>
|
||||
<time
|
||||
v-if="person.birthdate && !person.deathdate"
|
||||
:datetime="person.birthdate"
|
||||
:title="birthdate"
|
||||
>
|
||||
{{ $t(person.gender ? `renderbox.birthday.${person.gender.genderTranslation}` : 'renderbox.birthday.neutral') + ' ' + $d(birthdate, 'text') }}
|
||||
</time>
|
||||
|
||||
<time v-else-if="person.birthdate && person.deathdate" :datetime="person.deathdate"
|
||||
:title="person.deathdate">
|
||||
<time
|
||||
v-else-if="person.birthdate && person.deathdate"
|
||||
:datetime="person.deathdate"
|
||||
:title="person.deathdate"
|
||||
>
|
||||
{{ $d(birthdate) }} - {{ $d(deathdate) }}
|
||||
</time>
|
||||
|
||||
<time v-else-if="person.deathdate" :datetime="person.deathdate" :title="person.deathdate">
|
||||
<time
|
||||
v-else-if="person.deathdate"
|
||||
:datetime="person.deathdate"
|
||||
:title="person.deathdate"
|
||||
>
|
||||
{{ $t('renderbox.deathdate') + ' ' + deathdate }}
|
||||
</time>
|
||||
|
||||
<span v-if="options.addAge && person.birthdate" class="age">{{
|
||||
$tc('renderbox.years_old', person.age)
|
||||
}}</span>
|
||||
<span
|
||||
v-if="options.addAge && person.birthdate"
|
||||
class="age"
|
||||
>{{
|
||||
$tc('renderbox.years_old', person.age)
|
||||
}}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -62,118 +104,177 @@
|
||||
<div class="float-button bottom">
|
||||
<div class="box">
|
||||
<div class="action">
|
||||
<slot name="record-actions"></slot>
|
||||
<slot name="record-actions" />
|
||||
</div>
|
||||
<ul class="list-content fa-ul">
|
||||
<li v-if="person.current_household_id">
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
<address-render-box v-if="person.current_household_address" :address="person.current_household_address" :isMultiline="isMultiline"></address-render-box>
|
||||
<p v-else class="chill-no-data-statement">{{ $t('renderbox.household_without_address') }}</p>
|
||||
<a v-if="options.addHouseholdLink === true"
|
||||
:href="getCurrentHouseholdUrl"
|
||||
:title="$t('persons_associated.show_household_number', {id: person.current_household_id})">
|
||||
<span class="badge rounded-pill bg-chill-beige">
|
||||
<i class="fa fa-fw fa-home"></i><!--{{ $t('persons_associated.show_household') }}-->
|
||||
</span>
|
||||
<i class="fa fa-li fa-map-marker" />
|
||||
<address-render-box
|
||||
v-if="person.current_household_address"
|
||||
:address="person.current_household_address"
|
||||
:is-multiline="isMultiline"
|
||||
/>
|
||||
<p
|
||||
v-else
|
||||
class="chill-no-data-statement"
|
||||
>
|
||||
{{ $t('renderbox.household_without_address') }}
|
||||
</p>
|
||||
<a
|
||||
v-if="options.addHouseholdLink === true"
|
||||
:href="getCurrentHouseholdUrl"
|
||||
:title="$t('persons_associated.show_household_number', {id: person.current_household_id})"
|
||||
>
|
||||
<span class="badge rounded-pill bg-chill-beige">
|
||||
<i class="fa fa-fw fa-home" /><!--{{ $t('persons_associated.show_household') }}-->
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li v-else-if="options.addNoData">
|
||||
<i class="fa fa-li fa-map-marker"></i><p class="chill-no-data-statement">{{ $t('renderbox.no_data') }}</p>
|
||||
<i class="fa fa-li fa-map-marker" /><p class="chill-no-data-statement">
|
||||
{{ $t('renderbox.no_data') }}
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<template v-if="this.showResidentialAddresses && (person.current_residential_addresses || []).length > 0">
|
||||
<li v-for="(addr, i) in person.current_residential_addresses" :key="i">
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
<div v-if="addr.address">
|
||||
<span class="item-key">{{ $t('renderbox.residential_address') }}:</span>
|
||||
<div style="margin-top: -1em;">
|
||||
<address-render-box :address="addr.address" :isMultiline="isMultiline"></address-render-box>
|
||||
</div>
|
||||
<li
|
||||
v-for="(addr, i) in person.current_residential_addresses"
|
||||
:key="i"
|
||||
>
|
||||
<i class="fa fa-li fa-map-marker" />
|
||||
<div v-if="addr.address">
|
||||
<span class="item-key">{{ $t('renderbox.residential_address') }}:</span>
|
||||
<div style="margin-top: -1em;">
|
||||
<address-render-box
|
||||
:address="addr.address"
|
||||
:is-multiline="isMultiline"
|
||||
/>
|
||||
</div>
|
||||
<div v-else-if="addr.hostPerson" class="mt-3">
|
||||
<p>{{ $t('renderbox.located_at') }}:</p>
|
||||
<span class="chill-entity entity-person badge-person">
|
||||
<person-text v-if="addr.hostPerson" :person="addr.hostPerson"></person-text>
|
||||
</span>
|
||||
<address-render-box v-if="addr.hostPerson.address" :address="addr.hostPerson.address" :isMultiline="isMultiline"></address-render-box>
|
||||
</div>
|
||||
<div v-else-if="addr.hostThirdParty" class="mt-3">
|
||||
<p>{{ $t('renderbox.located_at') }}:</p>
|
||||
<span class="chill-entity entity-person badge-thirdparty">
|
||||
<third-party-text v-if="addr.hostThirdParty" :thirdparty="addr.hostThirdParty"></third-party-text>
|
||||
</span>
|
||||
<address-render-box v-if="addr.hostThirdParty.address" :address="addr.hostThirdParty.address" :isMultiline="isMultiline"></address-render-box>
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="addr.hostPerson"
|
||||
class="mt-3"
|
||||
>
|
||||
<p>{{ $t('renderbox.located_at') }}:</p>
|
||||
<span class="chill-entity entity-person badge-person">
|
||||
<person-text
|
||||
v-if="addr.hostPerson"
|
||||
:person="addr.hostPerson"
|
||||
/>
|
||||
</span>
|
||||
<address-render-box
|
||||
v-if="addr.hostPerson.address"
|
||||
:address="addr.hostPerson.address"
|
||||
:is-multiline="isMultiline"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="addr.hostThirdParty"
|
||||
class="mt-3"
|
||||
>
|
||||
<p>{{ $t('renderbox.located_at') }}:</p>
|
||||
<span class="chill-entity entity-person badge-thirdparty">
|
||||
<third-party-text
|
||||
v-if="addr.hostThirdParty"
|
||||
:thirdparty="addr.hostThirdParty"
|
||||
/>
|
||||
</span>
|
||||
<address-render-box
|
||||
v-if="addr.hostThirdParty.address"
|
||||
:address="addr.hostThirdParty.address"
|
||||
:is-multiline="isMultiline"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
<li v-if="person.email">
|
||||
<i class="fa fa-li fa-envelope-o"></i>
|
||||
<i class="fa fa-li fa-envelope-o" />
|
||||
<a :href="'mailto: ' + person.email">{{ person.email }}</a>
|
||||
</li>
|
||||
<li v-else-if="options.addNoData">
|
||||
<i class="fa fa-li fa-envelope-o"></i>
|
||||
<p class="chill-no-data-statement">{{ $t('renderbox.no_data') }}</p>
|
||||
<i class="fa fa-li fa-envelope-o" />
|
||||
<p class="chill-no-data-statement">
|
||||
{{ $t('renderbox.no_data') }}
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li v-if="person.mobilenumber">
|
||||
<i class="fa fa-li fa-mobile"></i>
|
||||
<i class="fa fa-li fa-mobile" />
|
||||
<a :href="'tel: ' + person.mobilenumber">{{ person.mobilenumber }}</a>
|
||||
</li>
|
||||
<li v-else-if="options.addNoData">
|
||||
<i class="fa fa-li fa-mobile"></i>
|
||||
<p class="chill-no-data-statement">{{ $t('renderbox.no_data') }}</p>
|
||||
<i class="fa fa-li fa-mobile" />
|
||||
<p class="chill-no-data-statement">
|
||||
{{ $t('renderbox.no_data') }}
|
||||
</p>
|
||||
</li>
|
||||
<li v-if="person.phonenumber">
|
||||
<i class="fa fa-li fa-phone"></i>
|
||||
<i class="fa fa-li fa-phone" />
|
||||
<a :href="'tel: ' + person.phonenumber">{{ person.phonenumber }}</a>
|
||||
</li>
|
||||
<li v-else-if="options.addNoData">
|
||||
<i class="fa fa-li fa-phone"></i>
|
||||
<p class="chill-no-data-statement">{{ $t('renderbox.no_data') }}</p>
|
||||
<i class="fa fa-li fa-phone" />
|
||||
<p class="chill-no-data-statement">
|
||||
{{ $t('renderbox.no_data') }}
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li v-if="person.centers !== undefined && person.centers.length > 0 && options.addCenter">
|
||||
<i class="fa fa-li fa-long-arrow-right"></i>
|
||||
<template v-for="c in person.centers">{{ c.name }}</template>
|
||||
<i class="fa fa-li fa-long-arrow-right" />
|
||||
<template v-for="c in person.centers">
|
||||
{{ c.name }}
|
||||
</template>
|
||||
</li>
|
||||
<li v-else-if="options.addNoData">
|
||||
<i class="fa fa-li fa-long-arrow-right"></i>
|
||||
<p class="chill-no-data-statement">{{ $t('renderbox.no_data') }}</p>
|
||||
<i class="fa fa-li fa-long-arrow-right" />
|
||||
<p class="chill-no-data-statement">
|
||||
{{ $t('renderbox.no_data') }}
|
||||
</p>
|
||||
</li>
|
||||
<slot name="custom-zone"></slot>
|
||||
|
||||
<slot name="custom-zone" />
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<slot name="end-bloc"></slot>
|
||||
|
||||
<slot name="end-bloc" />
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<span v-if="render === 'badge'" class="chill-entity entity-person badge-person">
|
||||
<a v-if="options.addLink === true" :href="getUrl">
|
||||
<span v-if="options.isHolder" class="fa-stack fa-holder" :title="$t('renderbox.holder')">
|
||||
<i class="fa fa-circle fa-stack-1x text-success"></i>
|
||||
<i class="fa fa-stack-1x">T</i>
|
||||
</span>
|
||||
<span
|
||||
v-if="render === 'badge'"
|
||||
class="chill-entity entity-person badge-person"
|
||||
>
|
||||
<a
|
||||
v-if="options.addLink === true"
|
||||
:href="getUrl"
|
||||
>
|
||||
<span
|
||||
v-if="options.isHolder"
|
||||
class="fa-stack fa-holder"
|
||||
:title="$t('renderbox.holder')"
|
||||
>
|
||||
<i class="fa fa-circle fa-stack-1x text-success" />
|
||||
<i class="fa fa-stack-1x">T</i>
|
||||
</span>
|
||||
|
||||
<person-text :person="person"></person-text>
|
||||
<person-text :person="person" />
|
||||
</a>
|
||||
<span v-else>
|
||||
<span v-if="options.isHolder" class="fa-stack fa-holder" :title="$t('renderbox.holder')">
|
||||
<i class="fa fa-circle fa-stack-1x text-success"></i>
|
||||
<i class="fa fa-stack-1x">T</i>
|
||||
</span>
|
||||
<person-text :person="person"></person-text>
|
||||
<span
|
||||
v-if="options.isHolder"
|
||||
class="fa-stack fa-holder"
|
||||
:title="$t('renderbox.holder')"
|
||||
>
|
||||
<i class="fa fa-circle fa-stack-1x text-success" />
|
||||
<i class="fa fa-stack-1x">T</i>
|
||||
</span>
|
||||
<person-text :person="person" />
|
||||
</span>
|
||||
<slot name="post-badge"></slot>
|
||||
</span>
|
||||
|
||||
<slot name="post-badge" />
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,15 +1,27 @@
|
||||
<template>
|
||||
<span v-if="isCut">{{ cutText }}</span>
|
||||
<span v-else class="person-text">
|
||||
<span class="firstname">{{ person.firstName }}</span>
|
||||
<span class="lastname">{{ person.lastName }}</span>
|
||||
<span v-if="person.altNames && person.altNames.length > 0" class="altnames">
|
||||
<span :class="'altname altname-' + altNameKey"> ({{ altNameLabel }})</span>
|
||||
</span>
|
||||
<span v-if="person.suffixText" class="suffixtext"> {{ person.suffixText }}</span>
|
||||
<span class="age" v-if="this.addAge && person.birthdate !== null && person.deathdate === null">{{ $tc('renderbox.years_old', person.age) }}</span>
|
||||
<span v-else-if="this.addAge && person.deathdate !== null"> (‡)</span>
|
||||
<span v-if="isCut">{{ cutText }}</span>
|
||||
<span
|
||||
v-else
|
||||
class="person-text"
|
||||
>
|
||||
<span class="firstname">{{ person.firstName }}</span>
|
||||
<span class="lastname">{{ person.lastName }}</span>
|
||||
<span
|
||||
v-if="person.altNames && person.altNames.length > 0"
|
||||
class="altnames"
|
||||
>
|
||||
<span :class="'altname altname-' + altNameKey"> ({{ altNameLabel }})</span>
|
||||
</span>
|
||||
<span
|
||||
v-if="person.suffixText"
|
||||
class="suffixtext"
|
||||
> {{ person.suffixText }}</span>
|
||||
<span
|
||||
class="age"
|
||||
v-if="this.addAge && person.birthdate !== null && person.deathdate === null"
|
||||
>{{ $tc('renderbox.years_old', person.age) }}</span>
|
||||
<span v-else-if="this.addAge && person.deathdate !== null"> (‡)</span>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,179 +1,258 @@
|
||||
<template>
|
||||
<div v-if="action === 'show'">
|
||||
<div class="flex-table">
|
||||
<person-render-box render="bloc"
|
||||
:person="person"
|
||||
:options="{
|
||||
addInfo: true,
|
||||
addEntity: false,
|
||||
addAltNames: true,
|
||||
addAge: true,
|
||||
addId: true,
|
||||
addLink: false,
|
||||
hLevel: 3,
|
||||
addCenter: true,
|
||||
addNoData: true,
|
||||
isMultiline: true
|
||||
}"
|
||||
:show-residential-addresses="true"
|
||||
></person-render-box>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else-if="action === 'edit' || action === 'create'">
|
||||
|
||||
<div class="form-floating mb-3">
|
||||
<input
|
||||
class="form-control form-control-lg"
|
||||
id="lastname"
|
||||
v-model="lastName"
|
||||
:placeholder="$t('person.lastname')"
|
||||
@change="checkErrors"
|
||||
<div v-if="action === 'show'">
|
||||
<div class="flex-table">
|
||||
<person-render-box
|
||||
render="bloc"
|
||||
:person="person"
|
||||
:options="{
|
||||
addInfo: true,
|
||||
addEntity: false,
|
||||
addAltNames: true,
|
||||
addAge: true,
|
||||
addId: true,
|
||||
addLink: false,
|
||||
hLevel: 3,
|
||||
addCenter: true,
|
||||
addNoData: true,
|
||||
isMultiline: true
|
||||
}"
|
||||
:show-residential-addresses="true"
|
||||
/>
|
||||
<label for="lastname">{{ $t('person.lastname') }}</label>
|
||||
</div>
|
||||
|
||||
<div v-if="queryItems">
|
||||
<ul class="list-suggest add-items inline">
|
||||
<li v-for="(qi, i) in queryItems" :key="i" @click="addQueryItem('lastName', qi)">
|
||||
<span class="person-text">{{ qi }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="form-floating mb-3">
|
||||
<input
|
||||
class="form-control form-control-lg"
|
||||
id="firstname"
|
||||
v-model="firstName"
|
||||
:placeholder="$t('person.firstname')"
|
||||
@change="checkErrors"
|
||||
/>
|
||||
<label for="firstname">{{ $t('person.firstname') }}</label>
|
||||
</div>
|
||||
|
||||
<div v-if="queryItems">
|
||||
<ul class="list-suggest add-items inline">
|
||||
<li v-for="(qi, i) in queryItems" :key="i" @click="addQueryItem('firstName', qi)">
|
||||
<span class="person-text">{{ qi }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div v-for="(a, i) in config.altNames" :key="a.key" class="form-floating mb-3">
|
||||
<input
|
||||
class="form-control form-control-lg"
|
||||
:id="a.key"
|
||||
:value="personAltNamesLabels[i]"
|
||||
@input="onAltNameInput"
|
||||
/>
|
||||
<label :for="a.key">{{ a.labels.fr }}</label>
|
||||
</div>
|
||||
|
||||
<!-- TODO fix placeholder if undefined
|
||||
-->
|
||||
<div class="form-floating mb-3">
|
||||
<select
|
||||
class="form-select form-select-lg"
|
||||
id="gender"
|
||||
v-model="gender"
|
||||
>
|
||||
<option selected disabled >{{ $t('person.gender.placeholder') }}</option>
|
||||
<option v-for="g in config.genders" :value="g.id" :key="g.id">
|
||||
{{ g.label.fr }}
|
||||
</option>
|
||||
</select>
|
||||
<label>{{ $t('person.gender.title') }}</label>
|
||||
</div>
|
||||
|
||||
<div class="form-floating mb-3" v-if="showCenters && config.centers.length > 1">
|
||||
<select
|
||||
class="form-select form-select-lg"
|
||||
id="center"
|
||||
v-model="center"
|
||||
>
|
||||
<option selected disabled>{{ $t('person.center.placeholder') }}</option>
|
||||
<option v-for="c in config.centers" :value="c" :key="c.id" >{{ c.name }}</option>
|
||||
</select>
|
||||
<label>{{ $t('person.center.title') }}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-floating mb-3">
|
||||
<div v-else-if="action === 'edit' || action === 'create'">
|
||||
<div class="form-floating mb-3">
|
||||
<input
|
||||
class="form-control form-control-lg"
|
||||
id="lastname"
|
||||
v-model="lastName"
|
||||
:placeholder="$t('person.lastname')"
|
||||
@change="checkErrors"
|
||||
>
|
||||
<label for="lastname">{{ $t('person.lastname') }}</label>
|
||||
</div>
|
||||
|
||||
<div v-if="queryItems">
|
||||
<ul class="list-suggest add-items inline">
|
||||
<li
|
||||
v-for="(qi, i) in queryItems"
|
||||
:key="i"
|
||||
@click="addQueryItem('lastName', qi)"
|
||||
>
|
||||
<span class="person-text">{{ qi }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="form-floating mb-3">
|
||||
<input
|
||||
class="form-control form-control-lg"
|
||||
id="firstname"
|
||||
v-model="firstName"
|
||||
:placeholder="$t('person.firstname')"
|
||||
@change="checkErrors"
|
||||
>
|
||||
<label for="firstname">{{ $t('person.firstname') }}</label>
|
||||
</div>
|
||||
|
||||
<div v-if="queryItems">
|
||||
<ul class="list-suggest add-items inline">
|
||||
<li
|
||||
v-for="(qi, i) in queryItems"
|
||||
:key="i"
|
||||
@click="addQueryItem('firstName', qi)"
|
||||
>
|
||||
<span class="person-text">{{ qi }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-for="(a, i) in config.altNames"
|
||||
:key="a.key"
|
||||
class="form-floating mb-3"
|
||||
>
|
||||
<input
|
||||
class="form-control form-control-lg"
|
||||
:id="a.key"
|
||||
:value="personAltNamesLabels[i]"
|
||||
@input="onAltNameInput"
|
||||
>
|
||||
<label :for="a.key">{{ a.labels.fr }}</label>
|
||||
</div>
|
||||
|
||||
<!-- TODO fix placeholder if undefined
|
||||
-->
|
||||
<div class="form-floating mb-3">
|
||||
<select
|
||||
class="form-select form-select-lg"
|
||||
id="civility"
|
||||
v-model="civility"
|
||||
>
|
||||
<option selected disabled >{{ $t('person.civility.placeholder') }}</option>
|
||||
<option v-for="c in config.civilities" :value="c.id" :key="c.id">
|
||||
{{ c.name.fr }}
|
||||
</option>
|
||||
class="form-select form-select-lg"
|
||||
id="gender"
|
||||
v-model="gender"
|
||||
>
|
||||
<option
|
||||
selected
|
||||
disabled
|
||||
>
|
||||
{{ $t('person.gender.placeholder') }}
|
||||
</option>
|
||||
<option
|
||||
v-for="g in config.genders"
|
||||
:value="g.id"
|
||||
:key="g.id"
|
||||
>
|
||||
{{ g.label.fr }}
|
||||
</option>
|
||||
</select>
|
||||
<label>{{ $t('person.gender.title') }}</label>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="form-floating mb-3"
|
||||
v-if="showCenters && config.centers.length > 1"
|
||||
>
|
||||
<select
|
||||
class="form-select form-select-lg"
|
||||
id="center"
|
||||
v-model="center"
|
||||
>
|
||||
<option
|
||||
selected
|
||||
disabled
|
||||
>
|
||||
{{ $t('person.center.placeholder') }}
|
||||
</option>
|
||||
<option
|
||||
v-for="c in config.centers"
|
||||
:value="c"
|
||||
:key="c.id"
|
||||
>
|
||||
{{ c.name }}
|
||||
</option>
|
||||
</select>
|
||||
<label>{{ $t('person.center.title') }}</label>
|
||||
</div>
|
||||
|
||||
<div class="form-floating mb-3">
|
||||
<select
|
||||
class="form-select form-select-lg"
|
||||
id="civility"
|
||||
v-model="civility"
|
||||
>
|
||||
<option
|
||||
selected
|
||||
disabled
|
||||
>
|
||||
{{ $t('person.civility.placeholder') }}
|
||||
</option>
|
||||
<option
|
||||
v-for="c in config.civilities"
|
||||
:value="c.id"
|
||||
:key="c.id"
|
||||
>
|
||||
{{ c.name.fr }}
|
||||
</option>
|
||||
</select>
|
||||
<label>{{ $t('person.civility.title') }}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text" id="birthdate"><i class="fa fa-fw fa-birthday-cake"></i></span>
|
||||
<input type="date"
|
||||
class="form-control form-control-lg"
|
||||
id="chill_personbundle_person_birthdate"
|
||||
name="chill_personbundle_person[birthdate]"
|
||||
v-model="birthDate"
|
||||
aria-describedby="birthdate" />
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<span
|
||||
class="input-group-text"
|
||||
id="birthdate"
|
||||
><i class="fa fa-fw fa-birthday-cake" /></span>
|
||||
<input
|
||||
type="date"
|
||||
class="form-control form-control-lg"
|
||||
id="chill_personbundle_person_birthdate"
|
||||
name="chill_personbundle_person[birthdate]"
|
||||
v-model="birthDate"
|
||||
aria-describedby="birthdate"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text" id="phonenumber"><i class="fa fa-fw fa-phone"></i></span>
|
||||
<input class="form-control form-control-lg"
|
||||
v-model="phonenumber"
|
||||
:placeholder="$t('person.phonenumber')"
|
||||
:aria-label="$t('person.phonenumber')"
|
||||
aria-describedby="phonenumber" />
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<span
|
||||
class="input-group-text"
|
||||
id="phonenumber"
|
||||
><i class="fa fa-fw fa-phone" /></span>
|
||||
<input
|
||||
class="form-control form-control-lg"
|
||||
v-model="phonenumber"
|
||||
:placeholder="$t('person.phonenumber')"
|
||||
:aria-label="$t('person.phonenumber')"
|
||||
aria-describedby="phonenumber"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text" id="mobilenumber"><i class="fa fa-fw fa-mobile"></i></span>
|
||||
<input class="form-control form-control-lg"
|
||||
v-model="mobilenumber"
|
||||
:placeholder="$t('person.mobilenumber')"
|
||||
:aria-label="$t('person.mobilenumber')"
|
||||
aria-describedby="mobilenumber" />
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<span
|
||||
class="input-group-text"
|
||||
id="mobilenumber"
|
||||
><i class="fa fa-fw fa-mobile" /></span>
|
||||
<input
|
||||
class="form-control form-control-lg"
|
||||
v-model="mobilenumber"
|
||||
:placeholder="$t('person.mobilenumber')"
|
||||
:aria-label="$t('person.mobilenumber')"
|
||||
aria-describedby="mobilenumber"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text" id="email"><i class="fa fa-fw fa-at"></i></span>
|
||||
<input class="form-control form-control-lg"
|
||||
v-model="email"
|
||||
:placeholder="$t('person.email')"
|
||||
:aria-label="$t('person.email')"
|
||||
aria-describedby="email" />
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<span
|
||||
class="input-group-text"
|
||||
id="email"
|
||||
><i class="fa fa-fw fa-at" /></span>
|
||||
<input
|
||||
class="form-control form-control-lg"
|
||||
v-model="email"
|
||||
:placeholder="$t('person.email')"
|
||||
:aria-label="$t('person.email')"
|
||||
aria-describedby="email"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div v-if="action === 'create'" class="input-group mb-3 form-check">
|
||||
<input class="form-check-input"
|
||||
type='checkbox'
|
||||
v-model="showAddressForm"
|
||||
name='showAddressForm'/>
|
||||
<div
|
||||
v-if="action === 'create'"
|
||||
class="input-group mb-3 form-check"
|
||||
>
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="checkbox"
|
||||
v-model="showAddressForm"
|
||||
name="showAddressForm"
|
||||
>
|
||||
<label class="form-check-label">{{ $t('person.address.show_address_form') }}</label>
|
||||
</div>
|
||||
<div v-if="action === 'create' && showAddressFormValue" class="form-floating mb-3">
|
||||
</div>
|
||||
<div
|
||||
v-if="action === 'create' && showAddressFormValue"
|
||||
class="form-floating mb-3"
|
||||
>
|
||||
<p>{{ $t('person.address.warning') }}</p>
|
||||
<add-address
|
||||
:context="addAddress.context"
|
||||
:options="addAddress.options"
|
||||
:addressChangedCallback="submitNewAddress"
|
||||
ref="addAddress">
|
||||
</add-address>
|
||||
</div>
|
||||
:context="addAddress.context"
|
||||
:options="addAddress.options"
|
||||
:address-changed-callback="submitNewAddress"
|
||||
ref="addAddress"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="alert alert-warning" v-if="errors.length">
|
||||
<div
|
||||
class="alert alert-warning"
|
||||
v-if="errors.length"
|
||||
>
|
||||
<ul>
|
||||
<li v-for="(e, i) in errors" :key="i">{{ e }}</li>
|
||||
<li
|
||||
v-for="(e, i) in errors"
|
||||
:key="i"
|
||||
>
|
||||
{{ e }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
Reference in New Issue
Block a user