mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-09 13:48:23 +00:00
first eslint corrections
This commit is contained in:
@@ -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