1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 11:13:46 +00:00

migrate toast to CL service (#10644)

This commit is contained in:
Jordan Aasen
2024-08-21 09:19:55 -07:00
committed by GitHub
parent 1fe6631c82
commit 0873f03932
16 changed files with 153 additions and 89 deletions

View File

@@ -5,7 +5,7 @@ import { FormBuilder, Validators } from "@angular/forms";
import { BillingApiServiceAbstraction as BillingApiService } from "@bitwarden/common/billing/abstractions/billilng-api.service.abstraction";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { DialogService } from "@bitwarden/components";
import { DialogService, ToastService } from "@bitwarden/components";
type UserOffboardingParams = {
type: "User";
@@ -88,6 +88,7 @@ export class OffboardingSurveyComponent {
private billingApiService: BillingApiService,
private i18nService: I18nService,
private platformUtilsService: PlatformUtilsService,
private toastService: ToastService,
) {}
submit = async () => {
@@ -106,11 +107,11 @@ export class OffboardingSurveyComponent {
? await this.billingApiService.cancelOrganizationSubscription(this.dialogParams.id, request)
: await this.billingApiService.cancelPremiumUserSubscription(request);
this.platformUtilsService.showToast(
"success",
null,
this.i18nService.t("canceledSubscription"),
);
this.toastService.showToast({
variant: "success",
title: null,
message: this.i18nService.t("canceledSubscription"),
});
this.dialogRef.close(this.ResultType.Submitted);
};