diff --git a/src/app/organizations/settings/delete-organization.component.html b/src/app/organizations/settings/delete-organization.component.html
index 17af9539be..2c3cae47a3 100644
--- a/src/app/organizations/settings/delete-organization.component.html
+++ b/src/app/organizations/settings/delete-organization.component.html
@@ -6,6 +6,7 @@
(ngSubmit)="submit()"
[appApiAction]="formPromise"
ngNativeValidate
+ *ngIf="loaded"
>
-
{{ descriptionKey | i18n }}
-
{{ "deleteOrganizationWarning" | i18n }}
+
{{
+ "deletingOrganizationIsPermanentWarning" | i18n: organizationName
+ }}
+
+
+ {{ "orgCreatedSponsorshipInvalid" | i18n }}
+
+
+ 0">
+ {{ "deletingOrganizationContentWarning" | i18n: organizationName }}
+
+ -
+ {{ type.count }} {{ type.localizationKey | i18n }}
+
+
+ {{ "deletingOrganizationActiveUserAccountsWarning" | i18n }}
+
+
+
diff --git a/src/app/organizations/settings/delete-organization.component.ts b/src/app/organizations/settings/delete-organization.component.ts
index 6bdb6fbb76..799d916a8b 100644
--- a/src/app/organizations/settings/delete-organization.component.ts
+++ b/src/app/organizations/settings/delete-organization.component.ts
@@ -1,19 +1,58 @@
-import { Component, EventEmitter, Output } from "@angular/core";
+import { Component, EventEmitter, OnInit, Output } from "@angular/core";
import { ApiService } from "jslib-common/abstractions/api.service";
+import { CipherService } from "jslib-common/abstractions/cipher.service";
import { I18nService } from "jslib-common/abstractions/i18n.service";
import { LogService } from "jslib-common/abstractions/log.service";
+import { OrganizationService } from "jslib-common/abstractions/organization.service";
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
import { UserVerificationService } from "jslib-common/abstractions/userVerification.service";
+import { CipherType } from "jslib-common/enums/cipherType";
+import { Utils } from "jslib-common/misc/utils";
+import { CipherView } from "jslib-common/models/view/cipherView";
import { Verification } from "jslib-common/types/verification";
+class CountBasedLocalizationKey {
+ singular: string;
+ plural: string;
+
+ getKey(count: number) {
+ return count == 1 ? this.singular : this.plural;
+ }
+
+ constructor(singular: string, plural: string) {
+ this.singular = singular;
+ this.plural = plural;
+ }
+}
+
+class OrganizationContentSummaryItem {
+ count: number;
+ get localizationKey(): string {
+ return this.localizationKeyOptions.getKey(this.count);
+ }
+ private localizationKeyOptions: CountBasedLocalizationKey;
+ constructor(count: number, localizationKeyOptions: CountBasedLocalizationKey) {
+ this.count = count;
+ this.localizationKeyOptions = localizationKeyOptions;
+ }
+}
+
+class OrganizationContentSummary {
+ totalItemCount = 0;
+ itemCountByType: OrganizationContentSummaryItem[] = [];
+}
+
@Component({
selector: "app-delete-organization",
templateUrl: "delete-organization.component.html",
})
-export class DeleteOrganizationComponent {
+export class DeleteOrganizationComponent implements OnInit {
organizationId: string;
- descriptionKey = "deleteOrganizationDesc";
+ loaded: boolean;
+ deleteOrganizationRequestType: "InvalidFamiliesForEnterprise" | "RegularDelete" = "RegularDelete";
+ organizationName: string;
+ organizationContentSummary: OrganizationContentSummary = new OrganizationContentSummary();
@Output() onSuccess: EventEmitter