mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
automatic IDE clean code
This commit is contained in:
parent
714d8b841c
commit
ad55cc0477
@ -6,16 +6,16 @@
|
||||
@click="openModal">
|
||||
{{ buttonText }}
|
||||
</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(titleModal) }}</h3>
|
||||
</template>
|
||||
|
||||
|
||||
<template v-slot:body v-if="type === 'person'">
|
||||
<on-the-fly-person
|
||||
v-bind:id="id"
|
||||
@ -24,7 +24,7 @@
|
||||
ref="castPerson">
|
||||
</on-the-fly-person>
|
||||
</template>
|
||||
|
||||
|
||||
<template v-slot:body v-else-if="type === 'thirdparty'">
|
||||
<on-the-fly-thirdparty
|
||||
v-bind:id="id"
|
||||
@ -33,14 +33,14 @@
|
||||
ref="castThirdparty">
|
||||
</on-the-fly-thirdparty>
|
||||
</template>
|
||||
|
||||
|
||||
<template v-slot:body v-else>
|
||||
<on-the-fly-create
|
||||
v-bind:action="action"
|
||||
ref="castNew">
|
||||
</on-the-fly-create>
|
||||
</template>
|
||||
|
||||
|
||||
<template v-slot:footer>
|
||||
<button v-if="action === 'show'"
|
||||
@click="changeActionTo('edit')"
|
||||
@ -52,10 +52,10 @@
|
||||
{{ $t('action.save')}}
|
||||
</button>
|
||||
</template>
|
||||
|
||||
|
||||
</modal>
|
||||
</teleport>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -126,7 +126,7 @@ export default {
|
||||
},
|
||||
changeActionTo(action) {
|
||||
// [BUG] clic first on show item button; in modal clic edit button; close modal; clic again on show item button
|
||||
this.$data.action = action;
|
||||
this.$data.action = action;
|
||||
},
|
||||
saveAction() {
|
||||
console.log('saveAction');
|
||||
|
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<banner></banner>
|
||||
<sticky-nav></sticky-nav>
|
||||
|
||||
|
||||
<div class="row justify-content-end">
|
||||
<div class="col-md-11">
|
||||
|
||||
|
||||
<h1 v-if="accompanyingCourse.step === 'DRAFT'">{{ $t('course.title.draft') }}</h1>
|
||||
<h1 v-else>{{ $t('course.title.active') }}</h1>
|
||||
|
||||
|
||||
<persons-associated></persons-associated>
|
||||
<origin-demand></origin-demand>
|
||||
<requestor></requestor>
|
||||
@ -17,7 +17,7 @@
|
||||
<resources></resources>
|
||||
<comment v-if="accompanyingCourse.step === 'DRAFT'"></comment>
|
||||
<confirm v-if="accompanyingCourse.step === 'DRAFT'"></confirm>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -38,11 +38,11 @@ import Confirm from './components/Confirm.vue';
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
components: {
|
||||
Banner,
|
||||
StickyNav,
|
||||
OriginDemand,
|
||||
PersonsAssociated,
|
||||
PersonsAssociated,
|
||||
Requestor,
|
||||
SocialIssue,
|
||||
CourseLocation,
|
||||
@ -81,12 +81,12 @@ export default {
|
||||
}
|
||||
padding: 0em 0em;
|
||||
margin: 1em 0;
|
||||
border: 1px dotted #718596ab;
|
||||
border: 1px dotted #718596ab;
|
||||
border-radius: 5px;
|
||||
border-left: 1px dotted #718596ab;
|
||||
border-right: 1px dotted #718596ab;
|
||||
dd {
|
||||
margin-left: 1em;
|
||||
dd {
|
||||
margin-left: 1em;
|
||||
}
|
||||
& > div {
|
||||
margin: 1em 3em 0;
|
||||
@ -94,6 +94,6 @@ export default {
|
||||
table {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
|
@ -31,7 +31,7 @@
|
||||
</li>
|
||||
<!--li>
|
||||
<button class="btn btn-delete"
|
||||
:title="$t('action.delete')"
|
||||
:title="$t('action.delete')"
|
||||
@click.prevent="$emit('remove', participation)">
|
||||
</button>
|
||||
</li-->
|
||||
|
@ -1,40 +1,40 @@
|
||||
<template>
|
||||
<div class="vue-component">
|
||||
|
||||
|
||||
<h2><a name="section-20"></a>{{ $t('requestor.title') }}</h2>
|
||||
|
||||
|
||||
<div v-if="accompanyingCourse.requestor" class="flex-table">
|
||||
|
||||
|
||||
<label>
|
||||
<input type="checkbox" v-model="isAnonymous" class="me-2" /><!-- :value="value" -->
|
||||
{{ $t('requestor.is_anonymous') }}
|
||||
</label>
|
||||
|
||||
|
||||
<div class="item-bloc">
|
||||
<h4>
|
||||
<span class="badge rounded-pill bg-secondary">{{ accompanyingCourse.requestor.type }}</span>
|
||||
{{ accompanyingCourse.requestor.text }}
|
||||
</h4>
|
||||
|
||||
</h4>
|
||||
|
||||
<dl class="content-bloc" v-if="accompanyingCourse.requestor.type === 'person'">
|
||||
|
||||
<dt>{{ $t('requestor.birthdate') }}</dt>
|
||||
|
||||
<dt>{{ $t('requestor.birthdate') }}</dt>
|
||||
<dd>{{ $d(accompanyingCourse.requestor.birthdate.datetime, 'short') }}</dd>
|
||||
|
||||
<dt>{{ $t('requestor.center') }}</dt>
|
||||
|
||||
<dt>{{ $t('requestor.center') }}</dt>
|
||||
<dd>{{ accompanyingCourse.requestor.center.name }}</dd>
|
||||
|
||||
<dt>{{ $t('requestor.phonenumber') }}</dt>
|
||||
|
||||
<dt>{{ $t('requestor.phonenumber') }}</dt>
|
||||
<dd>{{ accompanyingCourse.requestor.phonenumber }}</dd>
|
||||
<dt>{{ $t('requestor.mobilenumber') }}</dt>
|
||||
<dt>{{ $t('requestor.mobilenumber') }}</dt>
|
||||
<dd>{{ accompanyingCourse.requestor.mobilenumber }}</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<dl class="content-bloc" v-if="accompanyingCourse.requestor.type === 'thirdparty'">
|
||||
|
||||
|
||||
<dt>{{ $t('requestor.address') }}</dt>
|
||||
<dd>{{ accompanyingCourse.requestor.address.text }}</dd>
|
||||
|
||||
|
||||
<dt>{{ $t('requestor.location') }}</dt>
|
||||
<dd>{{ accompanyingCourse.requestor.address.postcode.name }}</dd>
|
||||
</dl>
|
||||
@ -59,17 +59,17 @@
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button class="btn btn-remove"
|
||||
:title="$t('action.remove')"
|
||||
:title="$t('action.remove')"
|
||||
@click="removeRequestor">
|
||||
{{ $t('action.remove') }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<label>{{ $t('requestor.counter') }}</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<add-persons v-if="accompanyingCourse.requestor === null"
|
||||
buttonTitle="requestor.add_requestor"
|
||||
@ -139,7 +139,7 @@ export default {
|
||||
|
||||
div.flex-table {
|
||||
margin: 1em 0 0 !important;
|
||||
& > label,
|
||||
& > label,
|
||||
& > ul.record_actions {
|
||||
margin: 1em 3em 0 !important;
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<tr>
|
||||
|
||||
|
||||
<td>
|
||||
<span class="badge rounded-pill bg-secondary"
|
||||
<span class="badge rounded-pill bg-secondary"
|
||||
v-bind:title="resource.resource.id">
|
||||
<span v-if="resource.resource.type === 'person'" >{{ $t('item.type_person') }}</span>
|
||||
<span v-if="resource.resource.type === 'thirdparty'" >{{ $t('item.type_thirdparty') }}</span>
|
||||
</span>
|
||||
{{ resource.resource.text }}
|
||||
</td>
|
||||
|
||||
|
||||
<td v-if="resource.resource.type === 'person'">
|
||||
{{ $tc('person.born') }}{{ $d(resource.resource.birthdate.datetime, 'short') }}
|
||||
</td>
|
||||
@ -17,7 +17,7 @@
|
||||
{{ resource.resource.address.text }}<br>
|
||||
{{ resource.resource.address.postcode.name }}
|
||||
</td>
|
||||
|
||||
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<button-location
|
||||
|
@ -20,7 +20,7 @@ const appMessages = {
|
||||
active: "En file active"
|
||||
},
|
||||
open_at: "ouvert le ",
|
||||
by: "par ",
|
||||
by: "par ",
|
||||
emergency: "urgent",
|
||||
confidential: "confidentiel",
|
||||
regular: "régulier",
|
||||
@ -86,7 +86,7 @@ const appMessages = {
|
||||
title: "Observations",
|
||||
label: "Ajout d'une note",
|
||||
content: "Rédigez une première note…",
|
||||
created_by: "créé par {0}, le {1}"
|
||||
created_by: "créé par {0}, le {1}"
|
||||
},
|
||||
confirm: {
|
||||
title: "Confirmation",
|
||||
|
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div v-if="action === 'show'">
|
||||
|
||||
|
||||
<div class="flex-table">
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<h3 :title="person.id">{{ person.text }}</h3>
|
||||
<p>
|
||||
<i class="fa fa-fw"
|
||||
<i class="fa fa-fw"
|
||||
:class="genderClass">
|
||||
<!--
|
||||
:title="$t(genderTranslation)"
|
||||
@ -20,27 +20,27 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="item-col">
|
||||
<dl class="list-content">
|
||||
<dl class="list-content">
|
||||
<dt>{{ $t('person.firstname') }}</dt>
|
||||
<dd>{{ person.firstName }}</dd>
|
||||
|
||||
|
||||
<dt>{{ $t('person.lastname') }}</dt>
|
||||
<dd>{{ person.lastName }}</dd>
|
||||
|
||||
|
||||
<dt>{{ $t('person.altnames') }}</dt>
|
||||
<dd>{{ person.altNames }}</dd>
|
||||
|
||||
|
||||
<span v-if="person.center">
|
||||
<dt>{{ $t('person.center_name') }}</dt>
|
||||
<dd :title="person.center.id">{{ person.center.name }}</dd>
|
||||
</span>
|
||||
|
||||
|
||||
<dt>{{ $t('person.phonenumber') }}</dt>
|
||||
<dd>{{ person.phonenumber }}</dd>
|
||||
|
||||
|
||||
<dt>{{ $t('person.mobilenumber') }}</dt>
|
||||
<dd>{{ person.mobilenumber }}</dd>
|
||||
|
||||
|
||||
<dt>{{ $t('person.gender.title') }}</dt>
|
||||
<!--
|
||||
<dd>{{ $t(genderTranslation) }}</dd>
|
||||
@ -49,61 +49,61 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else-if="action === 'edit' || action === 'create'">
|
||||
|
||||
|
||||
<div class="form-floating mb-3">
|
||||
<input class="form-control form-control-lg" id="firstname" v-model="firstName" v-bind:placeholder="$t('person.firstname')" />
|
||||
<label for="firstname">{{ $t('person.firstname') }}</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-floating mb-3">
|
||||
<input class="form-control form-control-lg" id="lastname" v-model="lastName" v-bind:placeholder="$t('person.lastname')" />
|
||||
<label for="lastname">{{ $t('person.lastname') }}</label>
|
||||
</div>
|
||||
|
||||
<!-- TODO fix placeholder if undefined
|
||||
|
||||
<!-- 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 selected disabled >{{ $t('person.gender.placeholder') }}</option>
|
||||
<option value="woman">{{ $t('person.gender.woman') }}</option>
|
||||
<option value="man">{{ $t('person.gender.man') }}</option>
|
||||
<option value="neuter">{{ $t('person.gender.neuter') }}</option>
|
||||
<option value="neuter">{{ $t('person.gender.neuter') }}</option>
|
||||
</select>
|
||||
<label for="gender">{{ $t('person.gender.title') }}</label>
|
||||
</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]"
|
||||
<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"
|
||||
v-bind:placeholder="$t('person.phonenumber')"
|
||||
v-bind:aria-label="$t('person.phonenumber')"
|
||||
<input class="form-control form-control-lg"
|
||||
v-model="phonenumber"
|
||||
v-bind:placeholder="$t('person.phonenumber')"
|
||||
v-bind: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"
|
||||
<input class="form-control form-control-lg"
|
||||
v-model="mobilenumber"
|
||||
v-bind:placeholder="$t('person.mobilenumber')"
|
||||
v-bind:aria-label="$t('person.mobilenumber')"
|
||||
v-bind:aria-label="$t('person.mobilenumber')"
|
||||
aria-describedby="mobilenumber" />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -131,19 +131,19 @@ export default {
|
||||
},
|
||||
gender: {
|
||||
set(value) { this.person.gender = value; },
|
||||
get() { return this.person.gender; }
|
||||
get() { return this.person.gender; }
|
||||
},
|
||||
birthDate: {
|
||||
set(value) {
|
||||
set(value) {
|
||||
if (this.person.birthdate) {
|
||||
this.person.birthdate.datetime = value + "T00:00:00+0100";
|
||||
this.person.birthdate.datetime = value + "T00:00:00+0100";
|
||||
} else {
|
||||
this.person.birthdate = { datetime: value + "T00:00:00+0100"};
|
||||
}
|
||||
},
|
||||
get() {
|
||||
return (this.person.birthdate) ? this.person.birthdate.datetime.split('T')[0] : '';
|
||||
}
|
||||
get() {
|
||||
return (this.person.birthdate) ? this.person.birthdate.datetime.split('T')[0] : '';
|
||||
}
|
||||
},
|
||||
phonenumber: {
|
||||
set(value) { this.person.phonenumber = value; },
|
||||
@ -174,7 +174,7 @@ export default {
|
||||
}
|
||||
},
|
||||
feminized() {
|
||||
return (this.person.gender === 'woman')? 'e' : '';
|
||||
return (this.person.gender === 'woman')? 'e' : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user