mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Address: pass useDatePane option in showPane addressRenderBox, display dates in showPane
This commit is contained in:
parent
e7676c5c2e
commit
1c568a75ec
@ -7,6 +7,7 @@
|
|||||||
v-bind:defaultz="this.defaultz"
|
v-bind:defaultz="this.defaultz"
|
||||||
v-bind:entity="this.entity"
|
v-bind:entity="this.entity"
|
||||||
v-bind:flag="this.flag"
|
v-bind:flag="this.flag"
|
||||||
|
v-bind:useDatePane="this.useDatePane"
|
||||||
@openEditPane="openEditPane"
|
@openEditPane="openEditPane"
|
||||||
ref="showAddress">
|
ref="showAddress">
|
||||||
</show-pane>
|
</show-pane>
|
||||||
@ -334,11 +335,6 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
//console.log('options displayText', this.options.button.displayText);
|
|
||||||
//console.log('options bindModal.step1', this.options.bindModal.step1);
|
|
||||||
//console.log('options bindModal.step2', this.options.bindModal.step2);
|
|
||||||
//console.log('options useDate.validFrom', this.options.useDate.validFrom);
|
|
||||||
//console.log('options useDate.validTo', this.options.useDate.validTo);
|
|
||||||
console.log('useDatePane', this.useDatePane);
|
console.log('useDatePane', this.useDatePane);
|
||||||
|
|
||||||
console.log('Mounted now !');
|
console.log('Mounted now !');
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<address-render-box :address="address"></address-render-box>
|
<address-render-box :address="address" :useDatePane="useDatePane"></address-render-box>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<action-buttons
|
<action-buttons
|
||||||
@ -56,7 +56,8 @@ export default {
|
|||||||
'defaultz',
|
'defaultz',
|
||||||
'flag',
|
'flag',
|
||||||
'entity',
|
'entity',
|
||||||
'errorMsg'
|
'errorMsg',
|
||||||
|
'useDatePane'
|
||||||
],
|
],
|
||||||
emits: ['openEditPane'],
|
emits: ['openEditPane'],
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -54,6 +54,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div v-if="useDatePane === true" class="address-more">
|
||||||
|
<div v-if="address.validFrom">
|
||||||
|
<span class="validFrom">
|
||||||
|
<b>{{ $t('validFrom') }}</b>: {{ $d(address.validFrom.date) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="address.validTo">
|
||||||
|
<span class="validTo">
|
||||||
|
<b>{{ $t('validTo') }}</b>: {{ $d(address.validTo.date) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -67,6 +80,10 @@ export default {
|
|||||||
isMultiline: {
|
isMultiline: {
|
||||||
default: true,
|
default: true,
|
||||||
type: Boolean
|
type: Boolean
|
||||||
|
},
|
||||||
|
useDatePane: {
|
||||||
|
default: false,
|
||||||
|
type: Boolean
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -13,6 +13,7 @@ class AddressNormalizer implements NormalizerAwareInterface, NormalizerInterface
|
|||||||
|
|
||||||
public function normalize($address, string $format = null, array $context = [])
|
public function normalize($address, string $format = null, array $context = [])
|
||||||
{
|
{
|
||||||
|
/** @var Address $address */
|
||||||
$data['address_id'] = $address->getId();
|
$data['address_id'] = $address->getId();
|
||||||
$data['text'] = $address->isNoAddress() ? '' : $address->getStreetNumber().', '.$address->getStreet();
|
$data['text'] = $address->isNoAddress() ? '' : $address->getStreetNumber().', '.$address->getStreet();
|
||||||
$data['street'] = $address->getStreet();
|
$data['street'] = $address->getStreet();
|
||||||
@ -30,6 +31,8 @@ class AddressNormalizer implements NormalizerAwareInterface, NormalizerInterface
|
|||||||
$data['buildingName'] = $address->getBuildingName();
|
$data['buildingName'] = $address->getBuildingName();
|
||||||
$data['distribution'] = $address->getDistribution();
|
$data['distribution'] = $address->getDistribution();
|
||||||
$data['extra'] = $address->getExtra();
|
$data['extra'] = $address->getExtra();
|
||||||
|
$data['validFrom'] = $address->getValidFrom();
|
||||||
|
$data['validTo'] = $address->getValidTo();
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
@ -30,9 +30,10 @@
|
|||||||
{% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
|
{% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
|
||||||
targetEntity: { name: 'person', id: person.id },
|
targetEntity: { name: 'person', id: person.id },
|
||||||
stickyActions: true,
|
stickyActions: true,
|
||||||
useValidFrom: true, useValidTo: true,
|
useValidFrom: true,
|
||||||
} %}
|
} %}
|
||||||
{#
|
{#
|
||||||
|
useValidTo: true,
|
||||||
backUrl: path('chill_person_address_list', { 'person_id': person.id }),
|
backUrl: path('chill_person_address_list', { 'person_id': person.id }),
|
||||||
openPanesInModal: false,
|
openPanesInModal: false,
|
||||||
#}
|
#}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user