admin-institution-delete.dialog.ts 1.84 KB
Newer Older
1
2
import {adminInstitutionActionNameSpace} from "@admin/institution/stores/admin-institution.action";
import {AdminInstitutionStateModel} from "@admin/institution/stores/admin-institution.state";
3
4
5
6
7
8
9
10
11
import {
  ChangeDetectionStrategy,
  Component,
  Inject,
} from "@angular/core";
import {
  MAT_DIALOG_DATA,
  MatDialogRef,
} from "@angular/material";
12
import {Institution} from "@app/generated-api";
13
import {Store} from "@ngxs/store";
14
15
16
import {SharedAbstractDeleteDialog} from "@shared/components/dialogs/shared-abstract-delete/shared-abstract-delete.dialog";
import {LocalStateEnum} from "@shared/enums/local-state.enum";
import {DeleteDialog} from "@shared/models/delete-dialog.model";
Nicolas.Rod's avatar
Nicolas.Rod committed
17
18
19
20
import {TRANSLATE} from "solidify-frontend";

@Component({
  selector: "dlcm-institution-delete-dialog",
21
22
  templateUrl: "../../../../../../shared/components/dialogs/shared-abstract-delete/shared-abstract-delete.dialog.html",
  styleUrls: ["../../../../../../shared/components/dialogs/shared-abstract-delete/shared-abstract-delete.dialog.scss"],
Nicolas.Rod's avatar
Nicolas.Rod committed
23
24
  changeDetection: ChangeDetectionStrategy.OnPush,
})
25
export class AdminInstitutionDeleteDialog extends SharedAbstractDeleteDialog<Institution, AdminInstitutionStateModel> {
Nicolas.Rod's avatar
Nicolas.Rod committed
26
27
28
29
30
31
32
33
34
35
36
  public readonly KEY_TITLE: string = TRANSLATE("admin.institution.dialog.delete.title");
  public readonly KEY_MESSAGE: string = TRANSLATE("admin.institution.dialog.delete.message");
  public readonly KEY_CONFIRM_BUTTON: string = TRANSLATE("admin.institution.dialog.delete.confirm");
  public readonly KEY_CANCEL_BUTTON: string = TRANSLATE("admin.institution.dialog.delete.cancel");

  constructor(protected store: Store,
              protected dialogRef: MatDialogRef<AdminInstitutionDeleteDialog>,
              @Inject(MAT_DIALOG_DATA) public data: DeleteDialog) {
    super(store, dialogRef, data, LocalStateEnum.admin_institution, adminInstitutionActionNameSpace);
  }
}