Skip to content

Commit

Permalink
Merge remote-tracking branch 'main' into feature/remove-template-fields
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianjoel committed Aug 10, 2023
2 parents c6be4bc + 74fd9bf commit 9a3fbdd
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 17 deletions.
3 changes: 2 additions & 1 deletion client/src/app/gateways/repositories/agenda/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export function createAgendaItem(model: any): any {
agenda_duration: parseInt(model.agenda_duration, 10) || undefined,
agenda_parent_id: model.agenda_parent_id,
agenda_type: model.agenda_type,
agenda_weight: model.agenda_weight
agenda_weight: model.agenda_weight,
agenda_tag_ids: model.tag_ids
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ export class TopicRepositoryService extends BaseAgendaItemAndListOfSpeakersConte
agenda_parent_id: topicAgendaItem.parent_id,
agenda_weight: topicAgendaItem.weight,
agenda_comment: topicAgendaItem.comment,
agenda_duration: topicAgendaItem.duration
agenda_duration: topicAgendaItem.duration,
tag_ids: topicAgendaItem.tag_ids
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ export class AgendaItemListComponent extends BaseMeetingListViewComponent<ViewAg
this.modelRequestService
.fetch(getTopicDuplicateSubscriptionConfig(...filteredItems.map(el => el.content_object.id)))
.then(() => {
this.topicRepo.duplicateTopics(...filteredItems);
this.topicRepo.duplicateTopics(...filteredItems.map(item => this.repo.getViewModel(item.id)));
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,8 @@ export class AssignmentDetailComponent extends BaseMeetingComponent implements O
*/
public async onDeleteAssignmentButton(): Promise<void> {
const title = this.translate.instant(`Are you sure you want to delete this election?`);
if (await this.promptService.open(title, this.assignment.getTitle())) {
const content = this.assignment.getTitle();
if (await this.promptService.open(title, content)) {
this.assignmentRepo
.delete(this.assignment)
.then(() => this.router.navigate([this.activeMeetingId, `assignments`]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ export class ChatGroupDetailComponent extends BaseMeetingComponent implements On

public async clearChatGroup(chatGroup: ViewChatGroup): Promise<void> {
const title = this.translate.instant(`Are you sure you want to clear all messages in this chat?`);
if (await this.promptService.open(title, chatGroup.name)) {
const content = chatGroup.name;
if (await this.promptService.open(title, content)) {
await this.repo.clear(chatGroup).catch(this.raiseError);
this.triggerUpdateView();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,14 +534,13 @@ Note: Does not affect the visibility of change recommendations.`
return (<any>state)[perm.selector];
}

private deleteWorkflowState(state: ViewMotionState): void {
const content = this.translate.instant(`Delete`) + ` ${state.name}?`;
private async deleteWorkflowState(state: ViewMotionState): Promise<void> {
const title = this.translate.instant(`Are you sure you want to delete this state?`);
const content = `${state.name}`;

this.promptService.open(`Are you sure`, content).then(promptResult => {
if (promptResult) {
this.handleRequest(this.stateRepo.delete(state));
}
});
if (await this.promptService.open(title, content)) {
this.handleRequest(this.stateRepo.delete(state));
}
}

private updateWorkflowStateName(name: string, state: ViewMotionState): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ export class ProjectorDetailComponent extends BaseMeetingComponent implements On
*/
public async onDeleteProjectorButton(): Promise<void> {
const title = this.translate.instant(`Are you sure you want to delete this projector?`);
if (this.projector && (await this.promptService.open(title, this.projector.name))) {
const content = this.projector.name;
if (this.projector && (await this.promptService.open(title, content))) {
this.repo.delete(this.projector);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ export class ProjectorListEntryComponent {
*/
public async onDeleteButton(): Promise<void> {
const title = this.translate.instant(`Are you sure you want to delete this projector?`);
if (await this.promptService.open(title, this.projector.name)) {
const content = this.projector.name;
if (await this.promptService.open(title, content)) {
this.repo.delete(this.projector);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ export class OrganizationTagListComponent extends BaseListViewComponent<ViewOrga
}

public async deleteOrganizationTags(...orgaTags: ViewOrganizationTag[]): Promise<void> {
const dialogTitle =
const title =
orgaTags.length === 1
? this.translate.instant(`Are you sure you want to delete this tag?`)
: this.translate.instant(`Are you sure you want to delete all selected tags?`);
const dialogSubtitle = orgaTags.length === 1 ? orgaTags[0].name : ``;
if (await this.promptService.open(dialogTitle, dialogSubtitle)) {
const content = orgaTags.length === 1 ? orgaTags[0].name : ``;
if (await this.promptService.open(title, content)) {
await this.repo.delete(...orgaTags);
}
}
Expand Down

0 comments on commit 9a3fbdd

Please sign in to comment.