Untitled
unknown
plain_text
3 years ago
2.8 kB
12
Indexable
<mat-form-field appearance="fill">
<mat-label>Note type</mat-label>
<mat-select formControlName=DocIDTypes">
<mat-option
*ngFor="let type of DocIDTypes"
[value]="type.value"
>{{ type.text }}</mat-option
>
</mat-select>
</mat-form-field>
DocIDTypes = Doc_ID_Types;
showDoc_ID_Types(value: any): boolean {
let DocIDTypes = [...this.DocIDTypes];
if (
DocIDTypes.filter((note) => note.value.includes(value.toLowerCase()))
.length > 0
) {
return true;
}
return false;
}
if (d === 'FpfaNotes') {
if (
requestObject.new.FpfaNotes &&
requestObject.new.FpfaNotes.length > 0
) {
requestObject.new.FpfaNotes.forEach((note: any) => {
if (
this.DocIDTypes.filter(
(DocIDType) => DocIDType.value === note.notes_type
).length > 0
) {
note.notes_type = this.DocIDTypes.filter(
(DocIDType) => DocIDType.value === note.notes_type
)[0].text;
}
});
}
}
Object.keys(this.oldValues).find((element) => {
if (element == key) {
requestObject.old[element] = this.oldValues[element];
if (element === 'FpfaAddress') {
if (
requestObject.old.FpfaAddress &&
requestObject.old.FpfaAddress.length > 0
) {
requestObject.old.FpfaAddress.forEach((address: any) => {
if (address.address_type) {
address.address_type =
address.address_type.charAt(0).toUpperCase() +
address.address_type.slice(1);
}
});
}
}
if (element === 'FpfaNotes') {
if (
requestObject.old.FpfaNotes &&
requestObject.old.FpfaNotes.length > 0
) {
requestObject.old.FpfaNotes.forEach((note: any) => {
if (
this.DocIDTypes.filter(
(DocIDType) =>DocIDType.value === note.notes_type
).length > 0
) {
note.notes_type = this.DocIDTypes.filter(
(DocIDType) => DocIDType.value === note.notes_type
)[0].text;
}
});
}
}
}
});
}Editor is loading...