Commit c4908b41 authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FEAT #14753 TIME 0:40 hide sector field if no sector was found for selected address

parent 2b224ef8
......@@ -15,6 +15,6 @@
<img src="assets/spinner.gif"/>
</div>
</app-root>
<script src="runtime-es2015.94857ed5d4e94e394ba2.js" type="module"></script><script src="runtime-es5.94857ed5d4e94e394ba2.js" nomodule defer></script><script src="polyfills-es5.c174c1516561194600a5.js" nomodule defer></script><script src="polyfills-es2015.b86be9c6fde12488a69f.js" type="module"></script><script src="scripts.b9f328a06b6423d59d32.js" defer></script><script src="main-es2015.8d5a3bfeac14d6350293.js" type="module"></script><script src="main-es5.8d5a3bfeac14d6350293.js" nomodule defer></script></body>
<script src="runtime-es2015.94857ed5d4e94e394ba2.js" type="module"></script><script src="runtime-es5.94857ed5d4e94e394ba2.js" nomodule defer></script><script src="polyfills-es5.c174c1516561194600a5.js" nomodule defer></script><script src="polyfills-es2015.b86be9c6fde12488a69f.js" type="module"></script><script src="scripts.b9f328a06b6423d59d32.js" defer></script><script src="main-es2015.1598fc460b74cccb3eea.js" type="module"></script><script src="main-es5.1598fc460b74cccb3eea.js" nomodule defer></script></body>
</html>
\ No newline at end of file
......@@ -262,7 +262,7 @@ export class ContactsFormComponent implements OnInit {
type: 'string',
control: new FormControl({value: '', disabled: true}),
required: false,
display: true,
display: false,
filling: false,
values: []
},
......@@ -814,12 +814,19 @@ export class ContactsFormComponent implements OnInit {
this.checkFilling();
this.http.get('../rest/contacts/sector', {params: {'addressNumber': contact['addressNumber'], 'addressStreet': contact['addressStreet'], 'addressPostcode': contact['addressPostcode'], 'addressTown': contact['addressTown']}}).pipe(
tap((data: any) => {
const sectorIndex = this.contactForm.findIndex(element => element.id === 'sector');
if (data.sector !== null) {
const sectorIndex = this.contactForm.findIndex(element => element.id === 'sector');
this.contactForm[sectorIndex].control.setValue(data.sector.label);
this.contactForm[sectorIndex].display = true;
} else {
this.contactForm[sectorIndex].control.setValue('');
this.contactForm[sectorIndex].display = false;
}
}),
catchError((err: any) => {
this.notify.handleErrors(err);
return of(false);
})
).subscribe();
this.addressBANMode = disableBan ? false : true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment