Skip to content

Commit

Permalink
Update backend attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianjoel committed Jun 5, 2024
1 parent 687cee1 commit ca5ca2e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ export class ProjectorRepositoryService extends BaseMeetingRelatedRepository<Vie
descriptor: ProjectionBuildDescriptor,
projectors: ViewProjector[],
options: object | null,
mode?: 'DEFAULT' | 'UPDATE_ONLY_SELECTED'
keepActiveProjections?: boolean
): Promise<void> {
const payload = this.createProjectPayload(descriptor, projectors, options);
if (mode) {
payload.mode = mode;
if (keepActiveProjections) {
payload.keep_active_projections = keepActiveProjections;
}

return await this.sendActionToBackend(ProjectorAction.PROJECT, payload);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export class ProjectionDialogComponent implements OnInit, OnDestroy {
resultDescriptor: this.descriptor,
projectors: this.selectedProjectors.map(id => this.projectors.find(p => p.id === id)).filter(p => p),
options: this.optionValues,
mode: this.projectorSelectable ? `DEFAULT` : `UPDATE_ONLY_SELECTED`
keepActiveProjections: !this.projectorSelectable
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export interface ProjectionDialogReturnType {
resultDescriptor: ProjectionBuildDescriptor;
projectors: ViewProjector[];
options: object | null;
mode?: 'DEFAULT' | 'UPDATE_ONLY_SELECTED';
keepActiveProjections?: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ export class ProjectionDialogService {
const response = await firstValueFrom(dialogRef.afterClosed());
console.log(response);
if (response) {
const { action, resultDescriptor, projectors, options, mode }: ProjectionDialogReturnType = response;
const { action, resultDescriptor, projectors, options, keepActiveProjections }: ProjectionDialogReturnType =
response;
if (action === `project`) {
await this.projectorRepo.project(resultDescriptor, projectors, options, mode);
await this.projectorRepo.project(resultDescriptor, projectors, options, keepActiveProjections);
} else if (action === `addToPreview`) {
await this.projectorRepo.addToPreview(resultDescriptor, projectors, options);
} else if (action === `hide`) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ export class ProjectorControllerService extends BaseMeetingControllerService<Vie
descriptor: ProjectionBuildDescriptor,
projectors: ViewProjector[],
options: any = null,
mode?: 'DEFAULT' | 'UPDATE_ONLY_SELECTED'
keepActiveProjections?: boolean
): Promise<void> {
return this.repo.project(descriptor, projectors, options, mode);
return this.repo.project(descriptor, projectors, options, keepActiveProjections);
}

public addToPreview(
Expand Down

0 comments on commit ca5ca2e

Please sign in to comment.