From f77ce869f8c641479aa4d2959176d07b93e22e4d Mon Sep 17 00:00:00 2001 From: FrancescoMolinaro Date: Thu, 30 Jan 2025 12:14:07 +0100 Subject: [PATCH] [DURACOM-304] remove control flow --- .../models/list/dynamic-list.component.ts | 2 +- ...mission-section-cc-licenses.component.html | 25 ++++++++++--------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.ts index 2dcc1cb023..59e07a1fb2 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.ts @@ -17,7 +17,7 @@ import { getFirstSucceededRemoteDataPayload } from '../../../../../../core/share import { PaginatedList } from '../../../../../../core/data/paginated-list.model'; import { VocabularyEntry } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry.model'; import { PageInfo } from '../../../../../../core/shared/page-info.model'; -import { EMPTY, expand, reduce } from "rxjs"; +import { BehaviorSubject, EMPTY, expand, map, reduce, tap } from "rxjs"; export interface ListItem { id: string; diff --git a/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.html b/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.html index 2332615d98..e3e11c258a 100644 --- a/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.html +++ b/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.html @@ -1,4 +1,4 @@ -@if (submissionCcLicenses) { +
- - @if(submissionCcLicenses?.length === 0) { + - } @else { - @for(license of submissionCcLicenses; track license.id) { - - } - } +
+
- -} +
+ + + + + +