DX: [Address] fix inconsistencies between doctrine mapping and sql schema

DX: [Address] fix inconsistencies between doctrine mapping and sql schema

Fixed: Address vue module do now set empty value to empty string instead of null

DX: fixed AddressReferenceBaseImporterTest
This commit is contained in:
2023-03-06 16:18:15 +01:00
parent 8e0d144dd1
commit c9fe5a393f
8 changed files with 305 additions and 157 deletions

View File

@@ -59,7 +59,7 @@
v-bind:insideModal="false"
@pick-address="this.pickAddress"
ref="suggestAddress">
<template v-slot:before v-if="!bypassFirstStep">
<a class="btn btn-cancel" @click="resetPane">
{{ $t('action.cancel') }}
@@ -73,7 +73,7 @@
</button>
</li>
</template>
</suggest-pane>
</div>
</template>
@@ -133,7 +133,7 @@
v-bind:insideModal="false"
@getCities="getCities"
@getReferenceAddresses="getReferenceAddresses">
<template v-slot:before>
<a class="btn btn-cancel" @click="resetPane">
{{ $t('action.cancel') }}
@@ -152,7 +152,7 @@
</button>
</li>
</template>
</edit-pane>
</div>
</template>
@@ -206,7 +206,7 @@
v-bind:flag="this.flag"
v-bind:insideModal="false"
ref="dateAddress">
<template v-slot:before>
<button class="btn btn-misc" @click="openEditPane">
<i class="fa fa-fw fa-arrow-left"></i>
@@ -220,7 +220,7 @@
</button>
</li>
</template>
</date-pane>
</div>
</template>
@@ -580,15 +580,15 @@ export default {
this.entity.selected.city = this.context.edit ? this.entity.address.postcode : {};
this.entity.selected.address = {};
this.entity.selected.address.street = this.context.edit ? this.entity.address.street: null;
this.entity.selected.address.streetNumber = this.context.edit ? this.entity.address.streetNumber: null;
this.entity.selected.address.floor = this.context.edit ? this.entity.address.floor: null;
this.entity.selected.address.corridor = this.context.edit ? this.entity.address.corridor: null;
this.entity.selected.address.steps = this.context.edit ? this.entity.address.steps: null;
this.entity.selected.address.flat = this.context.edit ? this.entity.address.flat: null;
this.entity.selected.address.buildingName = this.context.edit ? this.entity.address.buildingName: null;
this.entity.selected.address.distribution = this.context.edit ? this.entity.address.distribution: null;
this.entity.selected.address.extra = this.context.edit ? this.entity.address.extra: null;
this.entity.selected.address.street = this.context.edit ? this.entity.address.street: '';
this.entity.selected.address.streetNumber = this.context.edit ? this.entity.address.streetNumber: '';
this.entity.selected.address.floor = this.context.edit ? this.entity.address.floor: '';
this.entity.selected.address.corridor = this.context.edit ? this.entity.address.corridor: '';
this.entity.selected.address.steps = this.context.edit ? this.entity.address.steps: '';
this.entity.selected.address.flat = this.context.edit ? this.entity.address.flat: '';
this.entity.selected.address.buildingName = this.context.edit ? this.entity.address.buildingName: '';
this.entity.selected.address.distribution = this.context.edit ? this.entity.address.distribution: '';
this.entity.selected.address.extra = this.context.edit ? this.entity.address.extra: '';
this.entity.selected.writeNew.address = this.context.edit && this.entity.address.addressReference === null && this.entity.address.street.length > 0
this.entity.selected.writeNew.postcode = false // NB: this used to be this.context.edit, but think it was erroneous;