@nettyapps/ntybase 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,7 +13,6 @@ import { DatePipe, Location, DecimalPipe, CommonModule, TitleCasePipe } from '@a
|
|
|
13
13
|
import * as i3$1 from '@ngx-translate/core';
|
|
14
14
|
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
15
15
|
import { Buffer } from 'buffer';
|
|
16
|
-
import { marker } from '@biesbjerg/ngx-translate-extract-marker';
|
|
17
16
|
import * as i1 from '@angular/material/dialog';
|
|
18
17
|
import { MAT_DIALOG_DATA, MatDialogModule, MatDialog, MatDialogRef, MatDialogConfig } from '@angular/material/dialog';
|
|
19
18
|
import * as i3 from '@angular/material/divider';
|
|
@@ -501,6 +500,7 @@ class CommonService {
|
|
|
501
500
|
datePipe = inject(DatePipe);
|
|
502
501
|
decimalPipe = inject(DecimalPipe);
|
|
503
502
|
alertService = inject(AlertService);
|
|
503
|
+
translate = inject(TranslateService);
|
|
504
504
|
dialog = inject(MatDialog);
|
|
505
505
|
// Right sidenav
|
|
506
506
|
rightSidenavOpen = signal(false, ...(ngDevMode ? [{ debugName: "rightSidenavOpen" }] : []));
|
|
@@ -710,27 +710,24 @@ class CommonService {
|
|
|
710
710
|
/** User is not allowed to access the page
|
|
711
711
|
*
|
|
712
712
|
*/
|
|
713
|
+
translateService = inject(TranslateService);
|
|
713
714
|
async userNotAllowedToRead(title = '', message = '') {
|
|
714
715
|
if (title == '') {
|
|
715
|
-
title =
|
|
716
|
+
title = this.translateService.instant('@AccessLimitation');
|
|
716
717
|
}
|
|
717
|
-
// else {title = this.nettyAlertService.GetMessageText(title);}
|
|
718
718
|
if (message == '') {
|
|
719
|
-
message =
|
|
719
|
+
message = this.translateService.instant('@userCannotAccessThisScreen');
|
|
720
720
|
}
|
|
721
|
-
// else {message = this.nettyAlertService.GetMessageText(message);}
|
|
722
721
|
await this.alertService.showAlert(title, message);
|
|
723
722
|
this.goBack();
|
|
724
723
|
}
|
|
725
724
|
async userNotAllowedToAdd(title = '', message = '') {
|
|
726
725
|
if (title == '') {
|
|
727
|
-
title =
|
|
726
|
+
title = this.translateService.instant('@AccessLimitation');
|
|
728
727
|
}
|
|
729
|
-
// else { title = this.nettyAlertService.GetMessageText(title); }
|
|
730
728
|
if (message == '') {
|
|
731
|
-
message =
|
|
729
|
+
message = this.translateService.instant('@userCannotAddNewRecord');
|
|
732
730
|
}
|
|
733
|
-
// else { message = this.nettyAlertService.GetMessageText(message); }
|
|
734
731
|
await this.alertService.showAlert(title, message);
|
|
735
732
|
this.goBack();
|
|
736
733
|
}
|