fix issue where combining entities and authority control in the same field wouldn't work

This commit is contained in:
Art Lowel
2020-09-01 14:25:50 +02:00
parent 92207cf66d
commit f167d5a629
8 changed files with 76 additions and 58 deletions

View File

@@ -160,7 +160,7 @@ export class SubmissionSectionformComponent extends SectionModelComponent {
tap((config: SubmissionFormsModel) => this.formConfig = config),
flatMap(() =>
observableCombineLatest(
this.sectionService.getSectionData(this.submissionId, this.sectionData.id),
this.sectionService.getSectionData(this.submissionId, this.sectionData.id, this.sectionData.sectionType),
this.submissionObjectService.getHrefByID(this.submissionId).pipe(take(1)).pipe(
switchMap((href: string) => {
this.objectCache.remove(href);
@@ -318,7 +318,7 @@ export class SubmissionSectionformComponent extends SectionModelComponent {
/**
* Subscribe to section state
*/
this.sectionService.getSectionState(this.submissionId, this.sectionData.id).pipe(
this.sectionService.getSectionState(this.submissionId, this.sectionData.id, this.sectionData.sectionType).pipe(
filter((sectionState: SubmissionSectionObject) => {
return isNotEmpty(sectionState) && (isNotEmpty(sectionState.data) || isNotEmpty(sectionState.errors))
}),