translation of manage hooks

This commit is contained in:
Omar-Nabil
2024-06-15 07:54:53 -06:00
committed by Jose Alberto Hernandez
parent 52da1f5e3d
commit 11bee25179
20 changed files with 478 additions and 97 deletions
@@ -1,12 +1,13 @@
/** Angular Imports */
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
/** Custom Components */
import { DeleteDialogComponent } from '../../../shared/delete-dialog/delete-dialog.component';
/** Custom Services */
import { TranslateService } from '@ngx-translate/core';
import { SystemService } from '../../system.service';
/**
@@ -28,11 +29,13 @@ export class ViewHookComponent implements OnInit {
* @param {MatDialog} dialog Dialog Reference.
* @param {SystemService} systemService System Service.
* @param {Router} router Router for navigation.
* @param {TranslateService} translateService Translate Service.
*/
constructor(private route: ActivatedRoute,
private dialog: MatDialog,
private systemService: SystemService,
private router: Router) {
private router: Router,
private translateService:TranslateService) {
this.route.data.subscribe((data: { hook: any }) => {
this.hookData = data.hook;
});
@@ -46,7 +49,7 @@ export class ViewHookComponent implements OnInit {
*/
delete() {
const deleteHookDialogRef = this.dialog.open(DeleteDialogComponent, {
data: { deleteContext: `hook ${this.hookData.id}` }
data: { deleteContext: this.translateService.instant('labels.inputs.hook') +' ' + this.hookData.id }
});
deleteHookDialogRef.afterClosed().subscribe((response: any) => {
if (response.delete) {