mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-27 01:53:49 +00:00
first eslint corrections
This commit is contained in:
@@ -2,28 +2,39 @@
|
||||
<div class="item-bloc col">
|
||||
<section class="chill-entity entity-thirdparty">
|
||||
<div class="item-row entity-bloc">
|
||||
|
||||
<div class="item-col">
|
||||
<div class="entity-label">
|
||||
<div :class="'denomination h' + options.hLevel">
|
||||
|
||||
<a v-if="this.options.addLink === true" href="#">
|
||||
<a
|
||||
v-if="this.options.addLink === true"
|
||||
href="#"
|
||||
>
|
||||
<span class="name">{{ thirdparty.text }}</span>
|
||||
</a>
|
||||
<span class="name" v-else>{{ thirdparty.text }}</span>
|
||||
<span
|
||||
class="name"
|
||||
v-else
|
||||
>{{ thirdparty.text }}</span>
|
||||
|
||||
<span v-if="options.addId === true" class="id-number" :title="'n° ' + thirdparty.id">
|
||||
{{ thirdparty.id }}
|
||||
</span>
|
||||
<span
|
||||
v-if="options.addId === true"
|
||||
class="id-number"
|
||||
:title="'n° ' + thirdparty.id"
|
||||
>
|
||||
{{ thirdparty.id }}
|
||||
</span>
|
||||
|
||||
<badge-entity v-if="options.addEntity === true"
|
||||
:entity="thirdparty"
|
||||
:options="{ displayLong: options.entityDisplayLong }">
|
||||
</badge-entity>
|
||||
<badge-entity
|
||||
v-if="options.addEntity === true"
|
||||
:entity="thirdparty"
|
||||
:options="{ displayLong: options.entityDisplayLong }"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<p v-if="this.options.addInfo === true" class="moreinfo">
|
||||
</p>
|
||||
<p
|
||||
v-if="this.options.addInfo === true"
|
||||
class="moreinfo"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -31,60 +42,68 @@
|
||||
<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="getProfession.length > 0">
|
||||
<i class="fa fa-li fa-id-card"></i>
|
||||
<i class="fa fa-li fa-id-card" />
|
||||
<p><span>{{ getProfession[0] }}</span></p>
|
||||
</li>
|
||||
<li v-if="hasParent">
|
||||
<i class="fa fa-li fa-hand-o-right"></i>
|
||||
<i class="fa fa-li fa-hand-o-right" />
|
||||
<b class="me-2">{{ $t('child_of') }}</b>
|
||||
<on-the-fly
|
||||
:type="thirdparty.parent.type"
|
||||
:id="thirdparty.parent.id"
|
||||
:buttonText="thirdparty.parent.text"
|
||||
:displayBadge="'true' === 'true'"
|
||||
action="show">
|
||||
</on-the-fly>
|
||||
:button-text="thirdparty.parent.text"
|
||||
:display-badge="'true' === 'true'"
|
||||
action="show"
|
||||
/>
|
||||
</li>
|
||||
<!-- TODO hasChildren
|
||||
NB: we cannot call on-the-fly from RenderBox. See error message in previous version of this file.
|
||||
-->
|
||||
</ul>
|
||||
<div v-if="thirdparty.contactDataAnonymous">
|
||||
<confidential :positionBtnFar="false">
|
||||
<template v-slot:confidential-content>
|
||||
<confidential :position-btn-far="false">
|
||||
<template #confidential-content>
|
||||
<ul class="list-content fa-ul">
|
||||
<li v-if="thirdparty.address">
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
<address-render-box :address="thirdparty.address"
|
||||
:isMultiline="isMultiline"></address-render-box>
|
||||
<i class="fa fa-li fa-map-marker" />
|
||||
<address-render-box
|
||||
:address="thirdparty.address"
|
||||
:is-multiline="isMultiline"
|
||||
/>
|
||||
</li>
|
||||
<li v-if="thirdparty.telephone">
|
||||
<i class="fa fa-li fa-mobile"></i>
|
||||
<i class="fa fa-li fa-mobile" />
|
||||
<a :href="'tel: ' + thirdparty.telephone">{{ thirdparty.telephone }}</a>
|
||||
</li>
|
||||
<li v-if="thirdparty.email">
|
||||
<i class="fa fa-li fa-envelope-o"></i>
|
||||
<i class="fa fa-li fa-envelope-o" />
|
||||
<a :href="'mailto: ' + thirdparty.email">{{ thirdparty.email }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
</confidential>
|
||||
</div>
|
||||
<ul v-else class="list-content fa-ul">
|
||||
<ul
|
||||
v-else
|
||||
class="list-content fa-ul"
|
||||
>
|
||||
<li v-if="thirdparty.address">
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
<address-render-box :address="thirdparty.address" :isMultiline="isMultiline"></address-render-box>
|
||||
<i class="fa fa-li fa-map-marker" />
|
||||
<address-render-box
|
||||
:address="thirdparty.address"
|
||||
:is-multiline="isMultiline"
|
||||
/>
|
||||
</li>
|
||||
<li v-if="thirdparty.telephone">
|
||||
<i class="fa fa-li fa-mobile"></i>
|
||||
<i class="fa fa-li fa-mobile" />
|
||||
<a :href="'tel: ' + thirdparty.telephone">{{ thirdparty.telephone }}</a>
|
||||
</li>
|
||||
<li v-if="thirdparty.email">
|
||||
<i class="fa fa-li fa-envelope-o"></i>
|
||||
<i class="fa fa-li fa-envelope-o" />
|
||||
<a :href="'mailto: ' + thirdparty.email">{{ thirdparty.email }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -92,10 +111,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<slot name="end-bloc"></slot>
|
||||
<slot name="end-bloc" />
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,8 +1,11 @@
|
||||
<template>
|
||||
<span v-if="isCut">{{ cutText }}</span>
|
||||
<span v-else class="thirdparty-text">
|
||||
<span class="firstname">{{ thirdparty.text }}</span>
|
||||
</span>
|
||||
<span v-if="isCut">{{ cutText }}</span>
|
||||
<span
|
||||
v-else
|
||||
class="thirdparty-text"
|
||||
>
|
||||
<span class="firstname">{{ thirdparty.text }}</span>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,169 +1,247 @@
|
||||
<template>
|
||||
<div v-if="action === 'show'">
|
||||
<div class="flex-table">
|
||||
<third-party-render-box
|
||||
:thirdparty="thirdparty"
|
||||
:options="{
|
||||
addInfo: true,
|
||||
addEntity: true,
|
||||
entityDisplayLong: true,
|
||||
addAltNames: true,
|
||||
addId: true,
|
||||
addLink: false,
|
||||
addAge: false,
|
||||
hLevel: 3,
|
||||
addCenter: true,
|
||||
addNoData: true,
|
||||
isMultiline: true
|
||||
}"
|
||||
></third-party-render-box>
|
||||
<div v-if="action === 'show'">
|
||||
<div class="flex-table">
|
||||
<third-party-render-box
|
||||
:thirdparty="thirdparty"
|
||||
:options="{
|
||||
addInfo: true,
|
||||
addEntity: true,
|
||||
entityDisplayLong: true,
|
||||
addAltNames: true,
|
||||
addId: true,
|
||||
addLink: false,
|
||||
addAge: false,
|
||||
hLevel: 3,
|
||||
addCenter: true,
|
||||
addNoData: true,
|
||||
isMultiline: true
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="action === 'edit' || action === 'create' || action === 'addContact'">
|
||||
<div v-if="parent">
|
||||
<div class="parent-info">
|
||||
<i class="fa fa-li fa-hand-o-right" />
|
||||
<b class="me-2">{{ $t('child_of') }}</b>
|
||||
<span class="chill-entity badge-thirdparty">{{ parent.text }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="action === 'edit' || action === 'create' || action === 'addContact'">
|
||||
<div v-if="parent">
|
||||
<div class="parent-info">
|
||||
<i class="fa fa-li fa-hand-o-right"></i>
|
||||
<b class="me-2">{{ $t('child_of') }}</b>
|
||||
<span class="chill-entity badge-thirdparty">{{ parent.text }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="form-floating mb-3"
|
||||
v-else-if="kind !== 'child'"
|
||||
>
|
||||
<div class="form-check">
|
||||
<input
|
||||
class="form-check-input mt-0"
|
||||
type="radio"
|
||||
v-model="kind"
|
||||
value="company"
|
||||
id="tpartyKindInstitution"
|
||||
>
|
||||
<label
|
||||
for="tpartyKindInstitution"
|
||||
class="required"
|
||||
>
|
||||
<badge-entity
|
||||
:entity="{ type: 'thirdparty', kind: 'company' }"
|
||||
:options="{ displayLong: true }"
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-floating mb-3" v-else-if="kind !== 'child'">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input mt-0" type="radio" v-model="kind" value="company" id="tpartyKindInstitution">
|
||||
<label for="tpartyKindInstitution" class="required">
|
||||
<badge-entity
|
||||
:entity="{ type: 'thirdparty', kind: 'company' }"
|
||||
:options="{ displayLong: true }">
|
||||
</badge-entity>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input mt-0" type="radio" v-model="kind" value="contact" id="tpartyKindContact">
|
||||
<label for="tpartyKindContact" class="required">
|
||||
<badge-entity
|
||||
:entity="{ type: 'thirdparty', kind: 'contact' }"
|
||||
:options="{ displayLong: true }">
|
||||
</badge-entity>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<p>Contact de :</p>
|
||||
<third-party-render-box :thirdparty="thirdparty.parent"
|
||||
:options="{
|
||||
addInfo: true,
|
||||
addEntity: false,
|
||||
addAltNames: true,
|
||||
addId: false,
|
||||
addLink: false,
|
||||
addAge: false,
|
||||
hLevel: 4,
|
||||
addCenter: false,
|
||||
addNoData: true,
|
||||
isMultiline: false
|
||||
}"></third-party-render-box>
|
||||
<div class="form-check">
|
||||
<input
|
||||
class="form-check-input mt-0"
|
||||
type="radio"
|
||||
v-model="kind"
|
||||
value="contact"
|
||||
id="tpartyKindContact"
|
||||
>
|
||||
<label
|
||||
for="tpartyKindContact"
|
||||
class="required"
|
||||
>
|
||||
<badge-entity
|
||||
:entity="{ type: 'thirdparty', kind: 'contact' }"
|
||||
:options="{ displayLong: true }"
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<p>Contact de :</p>
|
||||
<third-party-render-box
|
||||
:thirdparty="thirdparty.parent"
|
||||
:options="{
|
||||
addInfo: true,
|
||||
addEntity: false,
|
||||
addAltNames: true,
|
||||
addId: false,
|
||||
addLink: false,
|
||||
addAge: false,
|
||||
hLevel: 4,
|
||||
addCenter: false,
|
||||
addNoData: true,
|
||||
isMultiline: false
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-if="thirdparty.kind === 'child' || thirdparty.kind === 'contact'">
|
||||
<div class="child-info">
|
||||
<div class="input-group mb-3 input-section">
|
||||
<select class="form-select form-select-lg" id="civility"
|
||||
v-model="thirdparty.civility">
|
||||
<option selected disabled :value="null" >{{ $t('thirdparty.civility') }}</option>
|
||||
<option v-for="civility in civilities" :key="civility.id" :value="civility">{{ civility.name.fr }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-3 input-section">
|
||||
<input class="form-control form-control-lg"
|
||||
v-model="thirdparty.profession"
|
||||
v-bind:placeholder="$t('thirdparty.profession')"
|
||||
v-bind:aria-label="$t('thirdparty.profession')"
|
||||
aria-describedby="profession" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="child-info">
|
||||
<div class="input-section">
|
||||
<div class="form-floating mb-3">
|
||||
<input class="form-control form-control-lg" id="firstname" v-model="thirdparty.firstname" v-bind:placeholder="$t('thirdparty.firstname')" />
|
||||
<label for="firstname">{{ $t('thirdparty.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>
|
||||
<div class="input-section">
|
||||
<div class="form-floating mb-3">
|
||||
<input class="form-control form-control-lg" id="name" v-model="thirdparty.name" v-bind:placeholder="$t('thirdparty.lastname')" />
|
||||
<label for="name">{{ $t('thirdparty.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('name', qi)">
|
||||
<span class="person-text">{{ qi }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="thirdparty.kind === 'child' || thirdparty.kind === 'contact'">
|
||||
<div class="child-info">
|
||||
<div class="input-group mb-3 input-section">
|
||||
<select
|
||||
class="form-select form-select-lg"
|
||||
id="civility"
|
||||
v-model="thirdparty.civility"
|
||||
>
|
||||
<option
|
||||
selected
|
||||
disabled
|
||||
:value="null"
|
||||
>
|
||||
{{ $t('thirdparty.civility') }}
|
||||
</option>
|
||||
<option
|
||||
v-for="civility in civilities"
|
||||
:key="civility.id"
|
||||
:value="civility"
|
||||
>
|
||||
{{ civility.name.fr }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group mb-3 input-section">
|
||||
<input
|
||||
class="form-control form-control-lg"
|
||||
v-model="thirdparty.profession"
|
||||
:placeholder="$t('thirdparty.profession')"
|
||||
:aria-label="$t('thirdparty.profession')"
|
||||
aria-describedby="profession"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="thirdparty.kind === 'company'">
|
||||
<div class="form-floating mb-3">
|
||||
<input class="form-control form-control-lg" id="name" v-model="thirdparty.name" v-bind:placeholder="$t('thirdparty.name')" />
|
||||
<label for="name">{{ $t('thirdparty.name') }}</label>
|
||||
</div>
|
||||
<div v-if="query">
|
||||
<div class="child-info">
|
||||
<div class="input-section">
|
||||
<div class="form-floating mb-3">
|
||||
<input
|
||||
class="form-control form-control-lg"
|
||||
id="firstname"
|
||||
v-model="thirdparty.firstname"
|
||||
:placeholder="$t('thirdparty.firstname')"
|
||||
>
|
||||
<label for="firstname">{{ $t('thirdparty.firstname') }}</label>
|
||||
</div>
|
||||
<div v-if="queryItems">
|
||||
<ul class="list-suggest add-items inline">
|
||||
<li @click="addQuery(query)">
|
||||
<span class="person-text">{{ query }}</span>
|
||||
</li>
|
||||
<li
|
||||
v-for="(qi, i) in queryItems"
|
||||
:key="i"
|
||||
@click="addQueryItem('firstName', qi)"
|
||||
>
|
||||
<span class="person-text">{{ qi }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-section">
|
||||
<div class="form-floating mb-3">
|
||||
<input
|
||||
class="form-control form-control-lg"
|
||||
id="name"
|
||||
v-model="thirdparty.name"
|
||||
:placeholder="$t('thirdparty.lastname')"
|
||||
>
|
||||
<label for="name">{{ $t('thirdparty.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('name', qi)"
|
||||
>
|
||||
<span class="person-text">{{ qi }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template
|
||||
v-if="thirdparty.kind !== 'child'">
|
||||
<add-address
|
||||
key="thirdparty"
|
||||
:context="context"
|
||||
:options="addAddress.options"
|
||||
:address-changed-callback="submitAddress"
|
||||
ref="addAddress">
|
||||
</add-address>
|
||||
</template>
|
||||
<div v-if="thirdparty.kind === 'company'">
|
||||
<div class="form-floating mb-3">
|
||||
<input
|
||||
class="form-control form-control-lg"
|
||||
id="name"
|
||||
v-model="thirdparty.name"
|
||||
:placeholder="$t('thirdparty.name')"
|
||||
>
|
||||
<label for="name">{{ $t('thirdparty.name') }}</label>
|
||||
</div>
|
||||
<div v-if="query">
|
||||
<ul class="list-suggest add-items inline">
|
||||
<li @click="addQuery(query)">
|
||||
<span class="person-text">{{ query }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template
|
||||
v-if="thirdparty.kind !== 'child'"
|
||||
>
|
||||
<add-address
|
||||
key="thirdparty"
|
||||
:context="context"
|
||||
:options="addAddress.options"
|
||||
:address-changed-callback="submitAddress"
|
||||
ref="addAddress"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<div class="input-group mb-3">
|
||||
<span
|
||||
class="input-group-text"
|
||||
id="email"
|
||||
><i class="fa fa-fw fa-envelope" /></span>
|
||||
<input
|
||||
class="form-control form-control-lg"
|
||||
v-model="thirdparty.email"
|
||||
:placeholder="$t('thirdparty.email')"
|
||||
:aria-label="$t('thirdparty.email')"
|
||||
aria-describedby="email"
|
||||
>
|
||||
</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="thirdparty.telephone"
|
||||
:placeholder="$t('thirdparty.phonenumber')"
|
||||
:aria-label="$t('thirdparty.phonenumber')"
|
||||
aria-describedby="phonenumber"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div v-if="parent">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text" id="email"><i class="fa fa-fw fa-envelope"></i></span>
|
||||
<input class="form-control form-control-lg"
|
||||
v-model="thirdparty.email"
|
||||
v-bind:placeholder="$t('thirdparty.email')"
|
||||
v-bind:aria-label="$t('thirdparty.email')"
|
||||
aria-describedby="email" />
|
||||
<span
|
||||
class="input-group-text"
|
||||
id="comment"
|
||||
><i class="fa fa-fw fa-pencil" /></span>
|
||||
<textarea
|
||||
class="form-control form-control-lg"
|
||||
:placeholder="$t('thirdparty.comment')"
|
||||
v-model="thirdparty.comment"
|
||||
/>
|
||||
</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="thirdparty.telephone"
|
||||
v-bind:placeholder="$t('thirdparty.phonenumber')"
|
||||
v-bind:aria-label="$t('thirdparty.phonenumber')"
|
||||
aria-describedby="phonenumber" />
|
||||
</div>
|
||||
|
||||
<div v-if="parent">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text" id="comment"><i class="fa fa-fw fa-pencil"></i></span>
|
||||
<textarea class="form-control form-control-lg"
|
||||
v-bind:placeholder="$t('thirdparty.comment')"
|
||||
v-model="thirdparty.comment"
|
||||
></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
Reference in New Issue
Block a user