mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
firstname added to onthefly for child or contact
This commit is contained in:
parent
f44f9d356b
commit
09e6872724
@ -65,7 +65,7 @@
|
||||
</div>
|
||||
|
||||
<div v-if="thirdparty.kind === 'child' || thirdparty.kind === 'contact'">
|
||||
<div id="child-info">
|
||||
<div class="child-info">
|
||||
<div class="input-group mb-3">
|
||||
<select class="form-select form-select-lg" id="profession"
|
||||
v-model="thirdparty.civility">
|
||||
@ -81,9 +81,19 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="child-info">
|
||||
<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 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>
|
||||
</div>
|
||||
|
||||
<div class="form-floating mb-3">
|
||||
<div class="form-floating mb-3" v-if="thirdparty.kind === 'company'">
|
||||
<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>
|
||||
@ -307,7 +317,7 @@ dl {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
#child-info {
|
||||
.child-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
div {
|
||||
|
@ -1,6 +1,8 @@
|
||||
const thirdpartyMessages = {
|
||||
fr: {
|
||||
thirdparty: {
|
||||
firstname: "Prénom",
|
||||
lastname: "Nom",
|
||||
name: "Dénomination",
|
||||
email: "Courriel",
|
||||
phonenumber: "Téléphone",
|
||||
|
@ -43,6 +43,7 @@ class ThirdPartyNormalizer implements NormalizerAwareInterface, NormalizerInterf
|
||||
{
|
||||
return [
|
||||
'type' => 'thirdparty',
|
||||
'firstname' => $thirdParty->getFirstname(),
|
||||
'name' => $thirdParty->getName(),
|
||||
'text' => $this->thirdPartyRender->renderString($thirdParty, []),
|
||||
'id' => $thirdParty->getId(),
|
||||
|
@ -77,7 +77,9 @@ class ThirdPartyRender extends AbstractChillEntityRender
|
||||
$acronym = '';
|
||||
}
|
||||
|
||||
return $civility . $entity->getName() . $acronym;
|
||||
$firstname = empty($entity->getFirstname()) ? '' : $entity->getFirstname();
|
||||
|
||||
return $civility . $firstname . ' ' . $entity->getName() . $acronym;
|
||||
}
|
||||
|
||||
public function supports($entity, array $options): bool
|
||||
|
@ -20,6 +20,8 @@ components:
|
||||
type: string
|
||||
enum:
|
||||
- "thirdparty"
|
||||
firstname:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
email:
|
||||
|
Loading…
x
Reference in New Issue
Block a user