Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2556 wrong dialog text #2572

Merged
merged 2 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,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