1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 09:43:23 +00:00

[AC-2268] - migrate toast to CL service for admin-console (#10663)

* migrate toast to CL service for admin-console

* fix spec

* add missing dep for toastService

* fix toastService args

* fix toastService args

* fix toastService args
This commit is contained in:
Jordan Aasen
2024-08-30 11:16:06 -07:00
committed by GitHub
parent d9ff8b0944
commit 2882fa3077
33 changed files with 381 additions and 255 deletions

View File

@@ -12,7 +12,7 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
import { DialogService, TableDataSource } from "@bitwarden/components";
import { DialogService, TableDataSource, ToastService } from "@bitwarden/components";
import { EventService } from "../../../core";
import { SharedModule } from "../../../shared";
@@ -63,6 +63,7 @@ export class EntityEventsComponent implements OnInit {
private organizationUserService: OrganizationUserService,
private formBuilder: FormBuilder,
private validationService: ValidationService,
private toastService: ToastService,
) {}
async ngOnInit() {
@@ -109,11 +110,11 @@ export class EntityEventsComponent implements OnInit {
this.filterFormGroup.value.end,
);
} catch (e) {
this.platformUtilsService.showToast(
"error",
this.i18nService.t("errorOccurred"),
this.i18nService.t("invalidDateRange"),
);
this.toastService.showToast({
variant: "error",
title: this.i18nService.t("errorOccurred"),
message: this.i18nService.t("invalidDateRange"),
});
return;
}