Production release January 2024 #29

Merged
konstantina.galouni merged 16 commits from develop into master 2024-02-01 20:07:59 +01:00
1 changed files with 36 additions and 15 deletions
Showing only changes of commit c06d020cdc - Show all commits

View File

@ -143,28 +143,49 @@ export class ISVocabulariesService {
parseFOS(data: any): AutoCompleteValue[] {
let array: AutoCompleteValue[] = []
for (let fos of data) {
let children = data.reverse();
while(children && children.length > 0) {
let fos = children.pop();
let value: AutoCompleteValue = new AutoCompleteValue();
value.id = fos.id;//data[i].code;
value.label = fos.label;
array.push(value);
if(fos.children) {
for (let fos2 of fos.children) {
let value: AutoCompleteValue = new AutoCompleteValue();
value.id = fos2.id;//data[i].code;
value.label = fos2.label;
array.push(value);
if(fos2.children) {
for (let fos3 of fos2.children) {
let value: AutoCompleteValue = new AutoCompleteValue();
value.id = fos3.id;//data[i].code;
value.label = fos3.label;
array.push(value);
}
}
if(fos.children && fos.children.length > 0) {
for (let i=fos.children.length-1; i>=0; i--) {
children.push(fos.children[i]);
}
}
}
// for (let fos of data) {
// let value: AutoCompleteValue = new AutoCompleteValue();
// value.id = fos.id;//data[i].code;
// value.label = fos.label;
// array.push(value);
// if(fos.children) {
// for (let fos2 of fos.children) {
// let value: AutoCompleteValue = new AutoCompleteValue();
// value.id = fos2.id;//data[i].code;
// value.label = fos2.label;
// array.push(value);
// if(fos2.children) {
// for (let fos3 of fos2.children) {
// let value: AutoCompleteValue = new AutoCompleteValue();
// value.id = fos3.id;//data[i].code;
// value.label = fos3.label;
// array.push(value);
// // if(fos3.children) {
// // for (let fos4 of fos3.children) {
// // let value: AutoCompleteValue = new AutoCompleteValue();
// // value.id = fos4.id;//data[i].code;
// // value.label = fos4.label;
// // array.push(value);
// // }
// // }
// }
// }
// }
// }
// }
return array;
}