mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
requestor, just display datas
This commit is contained in:
parent
a887326611
commit
226f71ab2b
@ -106,6 +106,11 @@ class AccompanyingCourseController extends Controller
|
||||
])
|
||||
);
|
||||
|
||||
//$accompanyingCourse->getRequestorPerson();
|
||||
//$accompanyingCourse->getRequestorThirdParty();
|
||||
//$accompanyingCourse->isRequestorAnonymous();
|
||||
//dump($accompanyingCourse); die;
|
||||
|
||||
switch ($_format) {
|
||||
case 'json':
|
||||
return $this->json($accompanyingCourse);
|
||||
|
@ -4,14 +4,22 @@
|
||||
<dl>
|
||||
<dt>{{ $t('course.id') }}</dt>
|
||||
<dd>{{ accompanyingCourse.id }}</dd>
|
||||
<dt>{{ $t('course.step') }}</dt>
|
||||
<dd>{{ accompanyingCourse.step }}</dd>
|
||||
<dt>{{ $t('course.emergency') }}</dt>
|
||||
<dd>{{ accompanyingCourse.emergency }}</dd>
|
||||
<dt>{{ $t('course.confidential') }}</dt>
|
||||
<dd>{{ accompanyingCourse.confidential }}</dd>
|
||||
<dt>{{ $t('course.opening_date') }}</dt>
|
||||
<dd>{{ $d(accompanyingCourse.openingDate.datetime, 'short') }}</dd>
|
||||
<dt>{{ $t('course.closing_date') }}</dt>
|
||||
<dd>{{ $d(accompanyingCourse.closingDate.datetime, 'short') }}</dd>
|
||||
<dd v-if="accompanyingCourse.closingDate">{{ $d(accompanyingCourse.closingDate.datetime, 'short') }}</dd>
|
||||
<dt>{{ $t('course.remark') }}</dt>
|
||||
<dd>{{ accompanyingCourse.remark }}</dd>
|
||||
<dt>{{ $t('course.closing_motive') }}</dt>
|
||||
<dd>{{ accompanyingCourse.closing_motive }}</dd>
|
||||
<dd v-if="accompanyingCourse.closingMotive">{{ accompanyingCourse.closingMotive.name.fr }}</dd>
|
||||
<dt>{{ $t('course.user') }}</dt>
|
||||
<dd v-if="accompanyingCourse.user">{{ accompanyingCourse.user.username }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -22,14 +22,9 @@
|
||||
</person-item>
|
||||
</tbody>
|
||||
</table>
|
||||
<add-persons></add-persons>
|
||||
<ul class="record_actions">
|
||||
<!--li>
|
||||
<button class="sc-button orange" @click="savePersons">
|
||||
{{ $t('action.save') }}
|
||||
</button>
|
||||
</li-->
|
||||
</ul>
|
||||
|
||||
<add-persons buttonTitle="persons_associated.add_persons"></add-persons>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -55,12 +50,7 @@ export default {
|
||||
closeParticipation(item) {
|
||||
console.log('@@ CLICK close participation: item', item);
|
||||
this.$store.dispatch('closeParticipation', item)
|
||||
},
|
||||
/*
|
||||
savePersons() {
|
||||
console.log('[wip] saving persons');
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -1,27 +1,58 @@
|
||||
<template>
|
||||
<div class="vue-component">
|
||||
<h3>{{ $t('requestor.title') }}</h3>
|
||||
{{ accompanyingCourse.id }}
|
||||
{{ accompanyingCourse.remark }}<br><br>
|
||||
|
||||
<h3>{{ $t('requestor.title') }}</h3>
|
||||
|
||||
<div v-if="accompanyingCourse.requestor">
|
||||
<dt>{{ $t('requestor.person_id') }}</dt>
|
||||
<dd>{{ accompanyingCourse.requestor.person_id }}</dd>
|
||||
<dt>{{ $t('requestor.type') }}</dt>
|
||||
<dd>{{ accompanyingCourse.requestor.type }}</dd>
|
||||
<dt>{{ $t('requestor.text') }}</dt>
|
||||
<dd>{{ accompanyingCourse.requestor.text }}</dd>
|
||||
<dt>{{ $t('requestor.firstName') }}</dt>
|
||||
<dd>{{ accompanyingCourse.requestor.firstName }}</dd>
|
||||
<dt>{{ $t('requestor.lastName') }}</dt>
|
||||
<dd>{{ accompanyingCourse.requestor.lastName }}</dd>
|
||||
<dt>{{ $t('requestor.phonenumber') }}</dt>
|
||||
<dd>{{ accompanyingCourse.requestor.phonenumber }}</dd>
|
||||
<dt>{{ $t('requestor.mobilenumber') }}</dt>
|
||||
<dd>{{ accompanyingCourse.requestor.mobilenumber }}</dd>
|
||||
<dt>{{ $t('requestor.altNames') }}</dt>
|
||||
<dd>{{ accompanyingCourse.requestor.altNames }}</dd>
|
||||
<dt>{{ $t('requestor.anonymous') }}</dt>
|
||||
<dd>{{ accompanyingCourse.requestorAnonymous }}</dd>
|
||||
|
||||
<div v-if="accompanyingCourse.requestor.type === 'person'">
|
||||
<dt>{{ $t('requestor.birthdate') }}</dt>
|
||||
<dd>{{ $d(accompanyingCourse.requestor.birthdate.datetime, 'short') }}</dd>
|
||||
<dt>{{ $t('requestor.center') }}</dt>
|
||||
<dd>{{ accompanyingCourse.requestor.center.name }}</dd>
|
||||
</div>
|
||||
|
||||
<div 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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<add-persons buttonTitle="requestor.add_requestor"></add-persons>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Modal from 'ChillMainAssets/vuejs/_components/Modal'
|
||||
import AddPersons from 'ChillPersonAssets/vuejs/_components/AddPersons.vue'
|
||||
|
||||
export default {
|
||||
name: 'Requestor',
|
||||
components: {
|
||||
Modal,
|
||||
AddPersons,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
modal: {
|
||||
showModal: false,
|
||||
modalDialogClass: "modal-dialog-scrollable modal-xl" // modal-lg modal-md modal-sm
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -9,6 +9,10 @@ const appMessages = {
|
||||
closing_date: "Date de clôture",
|
||||
remark: "Commentaire",
|
||||
closing_motive: "Motif de clôture",
|
||||
user: "TMS",
|
||||
step: "Statut",
|
||||
emergency: "urgent",
|
||||
confidential: "confidentiel",
|
||||
},
|
||||
persons_associated: {
|
||||
title: "Usagers concernés",
|
||||
@ -17,10 +21,25 @@ const appMessages = {
|
||||
lastname: "Nom",
|
||||
startdate: "Date d'entrée",
|
||||
enddate: "Date de sortie",
|
||||
addPerson: "Ajouter un usager",
|
||||
add_persons: "Ajouter des usagers",
|
||||
},
|
||||
requestor: {
|
||||
title: "Demandeur",
|
||||
add_requestor: "Ajouter un demandeur",
|
||||
//requestor: "Demandeur",
|
||||
anonymous: "Anonyme",
|
||||
type: "Type",
|
||||
person_id: "id",
|
||||
text: "Dénomination",
|
||||
firstName: "Prénom",
|
||||
lastName: "Nom",
|
||||
birthdate: "Date de naissance",
|
||||
center: "Centre",
|
||||
phonenumber: "Téléphone",
|
||||
mobilenumber: "Mobile",
|
||||
altNames: "Autres noms",
|
||||
address: "Adresse",
|
||||
location: "Localité",
|
||||
},
|
||||
}
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<button class="sc-button bt-create centered mt-4" @click="openModal">
|
||||
{{ $t('add_persons.search_add_others_persons') }}
|
||||
{{ $t(buttonTitle) }}
|
||||
</button>
|
||||
|
||||
<teleport to="body">
|
||||
@ -71,6 +71,7 @@ import PersonSuggestion from 'ChillPersonAssets/vuejs/_components/PersonSuggesti
|
||||
|
||||
export default {
|
||||
name: 'AddPersons',
|
||||
props: ['buttonTitle'],
|
||||
components: {
|
||||
Modal,
|
||||
PersonSuggestion,
|
||||
@ -80,7 +81,8 @@ export default {
|
||||
modal: {
|
||||
showModal: false,
|
||||
modalDialogClass: "modal-dialog-scrollable modal-xl"
|
||||
}
|
||||
},
|
||||
//button: this.buttonTitle
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -1,7 +1,6 @@
|
||||
const personMessages = {
|
||||
fr: {
|
||||
add_persons: {
|
||||
search_add_others_persons: "Rechercher et ajouter d'autres usagers",
|
||||
title: "Ajouter des usagers",
|
||||
suggested_counter: "Pas de résultats | 1 résultat | {count} résultats",
|
||||
selected_counter: " 1 sélectionné | {count} sélectionnés",
|
||||
@ -9,9 +8,9 @@ const personMessages = {
|
||||
},
|
||||
item: {
|
||||
type_person: "Usager",
|
||||
type_tms: "TMS",
|
||||
type_user: "TMS",
|
||||
type_3rdparty: "Tiers",
|
||||
type_menage: "Ménage"
|
||||
type_household: "Ménage"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -38,6 +38,8 @@ class AccompanyingPeriodNormalizer implements NormalizerInterface, NormalizerAwa
|
||||
'remark' => $period->getRemark(),
|
||||
'participations' => $this->normalizer->normalize($period->getParticipations(), $format),
|
||||
'closingMotive' => $this->normalizer->normalize($period->getClosingMotive(), $format),
|
||||
'requestor' => $this->normalizer->normalize($period->getRequestor(), $format),
|
||||
'requestorAnonymous' => $this->normalizer->normalize($period->isRequestorAnonymous(), $format),
|
||||
'user' => $this->normalizer->normalize($period->getUser(), $format),
|
||||
'step' => $period->getStep(),
|
||||
'origin' => $this->normalizer->normalize($period->getOrigin(), $format),
|
||||
|
Loading…
x
Reference in New Issue
Block a user