diff --git a/api/api-iam/iam-internal/src/main/java/fr/gouv/vitamui/iam/internal/server/owner/converter/OwnerConverter.java b/api/api-iam/iam-internal/src/main/java/fr/gouv/vitamui/iam/internal/server/owner/converter/OwnerConverter.java index 0bd0c1a8ade8e60bd9c1a9bd9c9bf207a66c2f1c..fc72fbf0fc5d14662dd8842a888922072480c4ef 100644 --- a/api/api-iam/iam-internal/src/main/java/fr/gouv/vitamui/iam/internal/server/owner/converter/OwnerConverter.java +++ b/api/api-iam/iam-internal/src/main/java/fr/gouv/vitamui/iam/internal/server/owner/converter/OwnerConverter.java @@ -56,8 +56,6 @@ public class OwnerConverter implements Converter<OwnerDto, Owner> { public static final String COMPANY_NAME_KEY = "Raison sociale"; - public static final String ADDRESS_TYPE_KEY = "Type d'adresse"; - public static final String INTERNAL_CODE_KEY = "Code interne"; private final AddressConverter addressConverter; @@ -72,7 +70,6 @@ public class OwnerConverter implements Converter<OwnerDto, Owner> { ownerLogbookData.put(CODE_KEY, LogbookUtils.getValue(owner.getCode())); ownerLogbookData.put(NAME_KEY, LogbookUtils.getValue(owner.getName())); ownerLogbookData.put(COMPANY_NAME_KEY, LogbookUtils.getValue(owner.getCompanyName())); - ownerLogbookData.put(ADDRESS_TYPE_KEY, LogbookUtils.getValue(owner.getAddressType())); ownerLogbookData.put(INTERNAL_CODE_KEY, LogbookUtils.getValue(owner.getInternalCode())); AddressDto address = owner.getAddress() != null ? owner.getAddress() : new AddressDto(); addressConverter.addAddress(address, ownerLogbookData); diff --git a/api/api-iam/iam-internal/src/main/java/fr/gouv/vitamui/iam/internal/server/owner/domain/Owner.java b/api/api-iam/iam-internal/src/main/java/fr/gouv/vitamui/iam/internal/server/owner/domain/Owner.java index 9c6c00fda071efb8a7c6fe8fb922e8a2d90f334c..79b677cd2b7a7832a34c50c18a87311c9165a706 100644 --- a/api/api-iam/iam-internal/src/main/java/fr/gouv/vitamui/iam/internal/server/owner/domain/Owner.java +++ b/api/api-iam/iam-internal/src/main/java/fr/gouv/vitamui/iam/internal/server/owner/domain/Owner.java @@ -38,7 +38,6 @@ package fr.gouv.vitamui.iam.internal.server.owner.domain; import javax.validation.constraints.NotNull; -import fr.gouv.vitamui.commons.api.enums.AddressType; import org.hibernate.validator.constraints.Length; import org.springframework.data.annotation.TypeAlias; import org.springframework.data.mongodb.core.index.Indexed; @@ -86,8 +85,5 @@ public class Owner extends CustomerIdDocument { private String internalCode; - @NotNull - private AddressType addressType; - private boolean readonly; } diff --git a/api/api-iam/iam-internal/src/main/java/fr/gouv/vitamui/iam/internal/server/owner/service/OwnerInternalService.java b/api/api-iam/iam-internal/src/main/java/fr/gouv/vitamui/iam/internal/server/owner/service/OwnerInternalService.java index 85f1c1f72ac7eeade342e98feccc9ab444001756..a23e5e2053626cfe92ac8dcd7460e3650d3d3400 100644 --- a/api/api-iam/iam-internal/src/main/java/fr/gouv/vitamui/iam/internal/server/owner/service/OwnerInternalService.java +++ b/api/api-iam/iam-internal/src/main/java/fr/gouv/vitamui/iam/internal/server/owner/service/OwnerInternalService.java @@ -44,7 +44,6 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Optional; -import fr.gouv.vitamui.commons.api.enums.AddressType; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.mongodb.core.query.Criteria; @@ -215,10 +214,6 @@ public class OwnerInternalService extends VitamUICrudService<OwnerDto, Owner> { logbooks.add(new EventDiffDto(OwnerConverter.COMPANY_NAME_KEY, owner.getCompanyName(), entry.getValue())); owner.setCompanyName(CastUtils.toString(entry.getValue())); break; - case "addressType" : - logbooks.add(new EventDiffDto(OwnerConverter.ADDRESS_TYPE_KEY, owner.getAddressType(), entry.getValue())); - owner.setAddressType((AddressType) entry.getValue()); - break; case "internalCode" : logbooks.add(new EventDiffDto(OwnerConverter.INTERNAL_CODE_KEY, owner.getInternalCode(), entry.getValue())); owner.setInternalCode(CastUtils.toString(entry.getValue())); diff --git a/commons/commons-api/src/main/java/fr/gouv/vitamui/commons/api/domain/OwnerDto.java b/commons/commons-api/src/main/java/fr/gouv/vitamui/commons/api/domain/OwnerDto.java index 6089a8f9133f5cf4a25c0dbdecf53ec7a206f425..c543695585b511060073b86def67e88ccaff96ed 100644 --- a/commons/commons-api/src/main/java/fr/gouv/vitamui/commons/api/domain/OwnerDto.java +++ b/commons/commons-api/src/main/java/fr/gouv/vitamui/commons/api/domain/OwnerDto.java @@ -38,7 +38,6 @@ package fr.gouv.vitamui.commons.api.domain; import javax.validation.constraints.NotNull; -import fr.gouv.vitamui.commons.api.enums.AddressType; import org.hibernate.validator.constraints.Length; import lombok.EqualsAndHashCode; @@ -73,9 +72,6 @@ public class OwnerDto extends CustomerIdDto { private String internalCode; - @NotNull - private AddressType addressType; - private boolean readonly; // no validations for identifier. Because during the creation step, the identifier is set by the backend. diff --git a/ui/ui-frontend-common/src/app/modules/models/customer/owner.interface.ts b/ui/ui-frontend-common/src/app/modules/models/customer/owner.interface.ts index bd0f7f140e9b8b5b4e2b41d8c29596b0e20b1177..871f685ff4c96ea97fe74baa57dba7ec22f7cce8 100644 --- a/ui/ui-frontend-common/src/app/modules/models/customer/owner.interface.ts +++ b/ui/ui-frontend-common/src/app/modules/models/customer/owner.interface.ts @@ -35,7 +35,6 @@ * knowledge of the CeCILL-C license and that you accept its terms. */ import { Id } from '../id.interface'; -import { AddressType } from './address-type.enum'; import { Address } from './address.interface'; export interface Owner extends Id { @@ -45,7 +44,6 @@ export interface Owner extends Id { companyName: string; address: Address; internalCode?: string; - addressType: AddressType; customerId: string; readonly: boolean; } diff --git a/ui/ui-frontend/projects/identity/src/app/core/customer.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/core/customer.service.spec.ts index 614d521bc4230ad0b215f5c5e7a0d76a83fef1f6..a7d29330fd768e20c7b3d73850e9870bf40fcea8 100644 --- a/ui/ui-frontend/projects/identity/src/app/core/customer.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/core/customer.service.spec.ts @@ -186,7 +186,6 @@ const expectedCustomer: Customer = { code: '666666', name: 'Alice Vans', companyName: 'Vans', - addressType: AddressType.POSTAL, address: { street: 'street2', zipCode: '43121', diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-create/customer-create.component.html b/ui/ui-frontend/projects/identity/src/app/customer/customer-create/customer-create.component.html index 1efe4678b20ad2b0906d8a35a821484bac3bc7f8..060f9ec8dca49a4536251dd11d77ff10f15fc250 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-create/customer-create.component.html +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-create/customer-create.component.html @@ -258,7 +258,7 @@ <h2 i18n="Create evidence owner title@@customerCreateTitle3">Création du propriétaire des éléments de preuve </h2> <div class="form-group"> - <app-owner-form [formControl]="form.get(['owners', 0])" [customerInfo]="customerInfo"></app-owner-form> + <app-owner-form [formControl]="form.get(['owners', 0])" [customerInfo]="customerInfo" [addressType]="form.get('addressType').value"></app-owner-form> <p class="hint" i18n="the evidence tenant is automatically created with the owner@@customerCreateHint">Le coffre des éléments de preuve est créé automatiquement avec son propriétaire</p> </div> diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-create/customer-create.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/customer-create/customer-create.component.spec.ts index 5dc2481b099265653ee05a180b8e2472e466fad1..a7d9b1a993b559493e545e4f1683d66509acb314 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-create/customer-create.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-create/customer-create.component.spec.ts @@ -35,6 +35,7 @@ * knowledge of the CeCILL-C license and that you accept its terms. */ import { EMPTY, of } from 'rxjs'; +import { AddressType } from 'ui-frontend-common'; import { ConfirmDialogService, OtpState } from 'ui-frontend-common'; import { VitamUICommonTestModule } from 'ui-frontend-common/testing'; @@ -99,12 +100,14 @@ const expectedCustomer = { hasCustomGraphicIdentity: false, passwordRevocationDelay: 3, otp: OtpState.OPTIONAL, + addressType: AddressType.POSTAL, address: { street: 'street', zipCode: '12345', city: 'New York', country: 'US', }, + internalCode: '1', language: 'en', emailDomains: ['test.com', 'toto.co.uk'], defaultEmailDomain: 'test.com', diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-list/customer-list.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/customer-list/customer-list.component.spec.ts index 2811763eea3fff2a907b39fffe4f1d3ce31d257f..6a679bda405a9a0f15d2f354b5e5f2aceaf4470d 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-list/customer-list.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-list/customer-list.component.spec.ts @@ -367,7 +367,6 @@ describe('CustomerListComponent', () => { customerId: customers[0].id, name: 'Toto', companyName: 'Toto & Co', - addressType: AddressType.POSTAL, address: { street: null, zipCode: null, diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-list/customer-list.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/customer-list/customer-list.service.spec.ts index 425dbd15612cee853005a38a43ce6d5bc7324921..4dac747ac6997153cfa70842b9587729bee1a509 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-list/customer-list.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-list/customer-list.service.spec.ts @@ -69,7 +69,6 @@ const expectedCustomersPage: { values: Customer[], pageNum: number, pageSize: nu name: 'Emmanuel Deviller', code: '002345', companyName: 'vitamui', - addressType: AddressType.POSTAL, address: { street: '73 rue du Faubourg Poissonnière ', zipCode: '75009', @@ -85,7 +84,6 @@ const expectedCustomersPage: { values: Customer[], pageNum: number, pageSize: nu name: 'Julien Cornille', code: '002345', companyName: 'vitamui', - addressType: AddressType.POSTAL, address: { street: '73 rue du Faubourg Poissonnière ', zipCode: '75009', @@ -128,7 +126,6 @@ const expectedCustomersPage: { values: Customer[], pageNum: number, pageSize: nu name: 'Mr Président', code: '022345', companyName: 'Electricité de france', - addressType: AddressType.POSTAL, address: { street: '22-30 Avenue de WAGRAM', zipCode: '75008', @@ -144,7 +141,6 @@ const expectedCustomersPage: { values: Customer[], pageNum: number, pageSize: nu name: 'Jean Dupond', code: '025000', companyName: 'Electricité de france', - addressType: AddressType.POSTAL, address: { street: '22-30 Avenue de WAGRAM', zipCode: '75008', @@ -195,7 +191,6 @@ const customersPage: { values: Customer[], pageNum: number, pageSize: number, ha name: 'Emmanuel Deviller', code: '002345', companyName: 'vitamui', - addressType: AddressType.POSTAL, address: { street: '73 rue du Faubourg Poissonnière ', zipCode: '75009', @@ -211,7 +206,6 @@ const customersPage: { values: Customer[], pageNum: number, pageSize: number, ha name: 'Julien Cornille', code: '002345', companyName: 'vitamui', - addressType: AddressType.POSTAL, address: { street: '73 rue du Faubourg Poissonnière ', zipCode: '75009', @@ -254,7 +248,6 @@ const customersPage: { values: Customer[], pageNum: number, pageSize: number, ha name: 'Mr Président', code: '022345', companyName: 'Electricité de france', - addressType: AddressType.POSTAL, address: { street: '22-30 Avenue de WAGRAM', zipCode: '75008', @@ -270,7 +263,6 @@ const customersPage: { values: Customer[], pageNum: number, pageSize: number, ha name: 'Jean Dupond', code: '025000', companyName: 'Electricité de france', - addressType: AddressType.POSTAL, address: { street: '22-30 Avenue de WAGRAM', zipCode: '75008', diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-list/owner-list/owner-list.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/customer-list/owner-list/owner-list.component.spec.ts index e61c59a82aa3b171a7766c97e7ed7279bcb0ab21..3e455787ca0cb75f41e0df96bb43f7c95d44dbb8 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-list/owner-list/owner-list.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-list/owner-list/owner-list.component.spec.ts @@ -42,7 +42,7 @@ import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { Router } from '@angular/router'; import { of , Subject } from 'rxjs'; -import { AddressType, OtpState, Owner, Tenant } from 'ui-frontend-common'; +import { OtpState, Owner, Tenant } from 'ui-frontend-common'; import { extend } from 'underscore'; import { CustomerDataService } from '../../customer.data.service'; import { OwnerCreateComponent } from '../../owner-create/owner-create.component'; @@ -265,7 +265,6 @@ describe('OwnerListComponent', () => { customerId: testhost.customer.id, name: 'Toto', companyName: 'Toto & Co', - addressType: AddressType.POSTAL, address: { street: null, zipCode: null, diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/graphic-identity-tab/graphic-identity-tab.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/graphic-identity-tab/graphic-identity-tab.component.spec.ts index d188fe12f681bd02c7e578ca3030b04472adf42a..ffd21301b4fbca80ffe1b87b1e22ebb8a55e31a7 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/graphic-identity-tab/graphic-identity-tab.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/graphic-identity-tab/graphic-identity-tab.component.spec.ts @@ -75,7 +75,6 @@ let expectedCustomer: Customer = { code: '254791', name: 'owner name', companyName: 'company name', - addressType: AddressType.POSTAL, address: { street: '85 rue des bois', zipCode: '75013', @@ -138,7 +137,6 @@ describe('GraphicIdentityTabComponent', () => { code: '254791', name: 'owner name', companyName: 'company name', - addressType: AddressType.POSTAL, address: { street: '85 rue des bois', zipCode: '75013', diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/graphic-identity-tab/graphic-identity-update/graphic-identity-update.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/graphic-identity-tab/graphic-identity-update/graphic-identity-update.component.spec.ts index 3e24ed5edd53eab0bc10a45f67164de6bda30323..ce075c4d069f31e4b75a63f55954bea3cd703239 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/graphic-identity-tab/graphic-identity-update/graphic-identity-update.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/graphic-identity-tab/graphic-identity-update/graphic-identity-update.component.spec.ts @@ -40,7 +40,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; import { ReactiveFormsModule } from '@angular/forms'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; -import { ENVIRONMENT } from 'ui-frontend-common'; +import { AddressType, ENVIRONMENT } from 'ui-frontend-common'; import { BASE_URL, Customer, InjectorModule, LoggerModule, OtpState } from 'ui-frontend-common'; import { VitamUICommonTestModule } from 'ui-frontend-common/testing'; import { environment } from './../../../../../environments/environment'; @@ -61,6 +61,7 @@ const expectedCustomer: Customer = { passwordRevocationDelay: 6, otp: OtpState.DEACTIVATED, idp: true, + addressType: AddressType.POSTAL, address: { street: '85 rue des bois', zipCode: '75013', diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-resolver.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/customer-resolver.service.spec.ts index 52ebeee63a3a166f714c809198b19f23a633fd40..05cc3927d497ac4cc29be8f4afe16559c071c2a4 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-resolver.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-resolver.service.spec.ts @@ -40,7 +40,7 @@ import { inject, TestBed } from '@angular/core/testing'; import { ActivatedRouteSnapshot, Router } from '@angular/router'; import { of } from 'rxjs'; -import { Customer, OtpState } from 'ui-frontend-common'; +import { AddressType, Customer, OtpState } from 'ui-frontend-common'; import { CustomerService } from '../core/customer.service'; import { CustomerResolver } from './customer-resolver.service'; @@ -61,6 +61,7 @@ const expectedCustomer: Customer = { 'kouygues.com', ], defaultEmailDomain: 'kouygues.com', + addressType: AddressType.POSTAL, address: { street: '13 rue faubourg', zipCode: '75009', diff --git a/ui/ui-frontend/projects/identity/src/app/customer/owner-create/owner-create.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/owner-create/owner-create.component.spec.ts index 126f037bab67f1edd3009c9a455ee098aba70a92..369bf8caee1431af48989687017acd3f5a5a0365 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/owner-create/owner-create.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/owner-create/owner-create.component.spec.ts @@ -35,7 +35,7 @@ * knowledge of the CeCILL-C license and that you accept its terms. */ import { EMPTY, of } from 'rxjs'; -import { AddressType, ConfirmDialogService, Owner } from 'ui-frontend-common'; +import { ConfirmDialogService, Owner } from 'ui-frontend-common'; import { VitamUICommonTestModule } from 'ui-frontend-common/testing'; /* tslint:disable:max-classes-per-file directive-selector */ @@ -82,7 +82,6 @@ describe('OwnerCreateComponent', () => { name: 'Mr Président', code: '02234512', companyName: 'Electricité de france', - addressType: AddressType.POSTAL, address: { street: '22-30 Avenue de WAGRAM', zipCode: '75008', diff --git a/ui/ui-frontend/projects/identity/src/app/customer/owner-form/owner-form.component.html b/ui/ui-frontend/projects/identity/src/app/customer/owner-form/owner-form.component.html index 62756a5fcbb9960fb4a829eb7b9a4da29a34d197..1d401e7356ea94f76242e2132159afc34bf7c168 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/owner-form/owner-form.component.html +++ b/ui/ui-frontend/projects/identity/src/app/customer/owner-form/owner-form.component.html @@ -17,12 +17,12 @@ </vitamui-common-input> </div> - <div *ngIf="form.get('addressType').value === ADDRESS_TYPE.INTERNAL_CODE"> + <div *ngIf="addressType === ADDRESS_TYPE.INTERNAL_CODE"> <vitamui-common-input class="field-street" formControlName="internalCode" maxlength="20" placeholder="Code interne" i18n-placeholder="Internal code@@OwnerInternalCodePlaceholder"></vitamui-common-input> </div> - <ng-container formGroupName="address" *ngIf="form.get('addressType').value === ADDRESS_TYPE.POSTAL"> + <ng-container formGroupName="address" *ngIf="addressType === ADDRESS_TYPE.POSTAL"> <div> <vitamui-common-input class="field-street" formControlName="street" maxlength="250" placeholder="N° et nom de la rue" i18n-placeholder="Owner street input placeholder@@ownerFormStreetInputPlaceholder"></vitamui-common-input> </div> diff --git a/ui/ui-frontend/projects/identity/src/app/customer/owner-form/owner-form.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/owner-form/owner-form.component.spec.ts index 6c7dd2d9f72e7128d31b67fbfe76624785678aa4..33727e20fea5dd145937d3663729d017379188db 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/owner-form/owner-form.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/owner-form/owner-form.component.spec.ts @@ -44,7 +44,7 @@ import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { of , timer } from 'rxjs'; import { map } from 'rxjs/operators'; -import { AddressType, Owner } from 'ui-frontend-common'; +import { Owner } from 'ui-frontend-common'; import { VitamUICommonTestModule } from 'ui-frontend-common/testing'; import { OwnerService } from '../owner.service'; import { OwnerFormComponent } from './owner-form.component'; @@ -106,13 +106,13 @@ describe('OwnerFormComponent', () => { code: '43214345345', name: 'Toto', companyName: 'Toto & Co.', - addressType: AddressType.POSTAL, address: { street: 'Street name', zipCode: '2134', city: 'Paris', country: 'FR' }, + internalCode: null, readonly : false }; @@ -135,7 +135,6 @@ describe('OwnerFormComponent', () => { code: 'invalid-code', name: 'Toto', companyName: 'Toto & Co.', - addressType: AddressType.POSTAL, address: { street: 'Street name', zipCode: '2134', @@ -169,13 +168,13 @@ describe('OwnerFormComponent', () => { code: '43214345345', name: 'Toto', companyName: 'Toto & Co.', - addressType: AddressType.POSTAL, address: { street: 'Street name', zipCode: '2134', city: 'Paris', country: 'FR' }, + internalCode: null, readonly : false }; diff --git a/ui/ui-frontend/projects/identity/src/app/customer/owner-form/owner-form.component.ts b/ui/ui-frontend/projects/identity/src/app/customer/owner-form/owner-form.component.ts index 2c5185a90404cf411354a7d8a8ed49b61433b5ee..6ec1c7affbec2fc0fe92dea89e46047162498beb 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/owner-form/owner-form.component.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/owner-form/owner-form.component.ts @@ -58,6 +58,8 @@ export const OWNER_FORM_VALUE_ACCESSOR: any = { }) export class OwnerFormComponent implements ControlValueAccessor, OnDestroy, OnInit { + @Input() addressType: AddressType; + form: FormGroup; private sub: any; @@ -113,7 +115,6 @@ export class OwnerFormComponent implements ControlValueAccessor, OnDestroy, OnIn name: [null, Validators.required], companyName: [null, Validators.required], internalCode: [null], - addressType: [this.customerInfo.addressType], address: this.formBuilder.group({ street: null, zipCode: null, @@ -141,7 +142,6 @@ export class OwnerFormComponent implements ControlValueAccessor, OnDestroy, OnIn name: null, companyName: null, internalCode: null, - addressType: this.customerInfo.addressType, address: { street: null, zipCode: null, diff --git a/ui/ui-frontend/projects/identity/src/app/customer/owner-resolver.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/owner-resolver.service.spec.ts index 9036dafb68822ddc8315a70ae7f7dfe266a28b2b..a960aec16687f5981dcdbc875f9603fdb76d5f5e 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/owner-resolver.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/owner-resolver.service.spec.ts @@ -39,7 +39,7 @@ import { inject, TestBed } from '@angular/core/testing'; import { ActivatedRouteSnapshot, Router } from '@angular/router'; import { of } from 'rxjs'; -import { AddressType, Owner } from 'ui-frontend-common'; +import { Owner } from 'ui-frontend-common'; import { OwnerResolver } from './owner-resolver.service'; import { OwnerService } from './owner.service'; @@ -50,7 +50,6 @@ const expectedOwner: Owner = { name: 'Julien Cornille', code: '10234665', companyName: 'vitamui', - addressType: AddressType.POSTAL, address: { street: '73 rue du Faubourg Poissonnière ', zipCode: '75009', diff --git a/ui/ui-frontend/projects/identity/src/app/customer/owner.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/owner.service.spec.ts index edde01f4799b3bd3215d00c4bd5b0a38f346dcd6..0d2a3407a547fd75280763ad6412f47d63ed0c30 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/owner.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/owner.service.spec.ts @@ -39,7 +39,7 @@ import { inject, TestBed } from '@angular/core/testing'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { Type } from '@angular/core'; -import { AddressType, BASE_URL, Owner } from 'ui-frontend-common'; +import { BASE_URL, Owner } from 'ui-frontend-common'; import { VitamUISnackBar, VitamUISnackBarComponent } from '../shared/vitamui-snack-bar'; import { OwnerService } from './owner.service'; @@ -50,7 +50,6 @@ const expectedOwner: Owner = { name: 'Julien Cornille', code: '10234665', companyName: 'vitamui', - addressType: AddressType.POSTAL, address: { street: '73 rue du Faubourg Poissonnière ', zipCode: '75009', diff --git a/ui/ui-frontend/projects/identity/src/app/customer/tenant.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/tenant.service.spec.ts index 84f03c1a52398ac3d73155a5eaaa958e83840d6e..ce10ba657f13b1f4ba9c879052ebcad416754b44 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/tenant.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/tenant.service.spec.ts @@ -34,7 +34,7 @@ * The fact that you are presently reading this means that you have had * knowledge of the CeCILL-C license and that you accept its terms. */ -import { AddressType, BASE_URL, Operators, Owner, SearchQuery, Tenant } from 'ui-frontend-common'; +import { BASE_URL, Operators, Owner, SearchQuery, Tenant } from 'ui-frontend-common'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { inject, TestBed } from '@angular/core/testing'; @@ -66,7 +66,6 @@ const expectedOwner: Owner = { code: '10234501', companyName: 'vitamui', readonly: false, - addressType: AddressType.POSTAL, address: { street: '73 rue du Faubourg Poissonnière ', zipCode: '75009', diff --git a/ui/ui-frontend/projects/identity/src/app/user/user-preview/user-information-tab/user-information-tab.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/user/user-preview/user-information-tab/user-information-tab.component.spec.ts index 27ff5195be224d35b896f760b274e521f848e3aa..2e6c470cb62133264660d4bd5faada3b744e02bd 100644 --- a/ui/ui-frontend/projects/identity/src/app/user/user-preview/user-information-tab/user-information-tab.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/user/user-preview/user-information-tab/user-information-tab.component.spec.ts @@ -108,7 +108,6 @@ let expectedCustomer: Customer = { code: '254791', name: 'owner name', companyName: 'company name', - addressType: AddressType.POSTAL, address: { street: '85 rue des bois', zipCode: '75013', @@ -218,7 +217,6 @@ describe('UserInfoTabComponent', () => { code: '254791', name: 'owner name', companyName: 'company name', - addressType: AddressType.POSTAL, address: { street: '85 rue des bois', zipCode: '75013',