added translation of dialogContext
This commit is contained in:
committed by
Adam Saghy
parent
6e068189be
commit
927562a872
@@ -9,6 +9,7 @@ import { OrganizationService } from 'app/organization/organization.service';
|
||||
/** Custom Components. */
|
||||
import { ConfirmationDialogComponent } from '../../../shared/confirmation-dialog/confirmation-dialog.component';
|
||||
import { DeleteDialogComponent } from '../../../shared/delete-dialog/delete-dialog.component';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
/**
|
||||
* View Holidays component.
|
||||
@@ -30,6 +31,7 @@ export class ViewHolidaysComponent {
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private dialog: MatDialog,
|
||||
private translateService: TranslateService,
|
||||
private organizationService: OrganizationService) {
|
||||
this.route.data.subscribe((data: { holidays: any }) => {
|
||||
this.holidayData = data.holidays;
|
||||
@@ -58,7 +60,7 @@ export class ViewHolidaysComponent {
|
||||
*/
|
||||
activateHoliday() {
|
||||
const unAssignStaffDialogRef = this.dialog.open(ConfirmationDialogComponent, {
|
||||
data: { heading: 'Holiday', dialogContext: `Are you sure you want to activate ${this.holidayData.name} holiday` }
|
||||
data: { heading: 'Holiday', dialogContext: this.translateService.instant('labels.dialogContext.Are you sure you want to activate') + ` ${this.holidayData.name} ` + this.translateService.instant('labels.dialogContext.holiday') }
|
||||
});
|
||||
unAssignStaffDialogRef.afterClosed().subscribe((response: { confirm: any }) => {
|
||||
if (response.confirm) {
|
||||
|
||||
Reference in New Issue
Block a user