diff --git a/src/app/components/dashboard-company-deletion/dashboard-company-deletion.coffee b/src/app/components/dashboard-company-deletion/dashboard-company-deletion.coffee new file mode 100644 index 00000000..64a72299 --- /dev/null +++ b/src/app/components/dashboard-company-deletion/dashboard-company-deletion.coffee @@ -0,0 +1,21 @@ +angular.module 'mnoEnterpriseAngular' + .component('dashboardCompanyDeletion', { + restrict: 'EA' + templateUrl: 'app/components/dashboard-company-deletion/dashboard-company-deletion.html', + controllerAs: "DashboardCompanyDeletionCtrl" + controller: ($uibModal, MnoeCurrentUser, MnoeOrganizations, MnoeAppInstances, MnoConfirm) -> + vm = this + vm.isDeletionOpen = false + + vm.proceed = (reason, password) -> + MnoeOrganizations.freeze(reason, password) + + vm.requestDeletion = () -> + modalInstance = $uibModal.open( + component: "dashboardDeletionConfirm", + size: "lg", + resolve: + actionCb: () -> vm.proceed + ) + return + }) diff --git a/src/app/components/dashboard-company-deletion/dashboard-company-deletion.html b/src/app/components/dashboard-company-deletion/dashboard-company-deletion.html new file mode 100644 index 00000000..5f7cf69d --- /dev/null +++ b/src/app/components/dashboard-company-deletion/dashboard-company-deletion.html @@ -0,0 +1,11 @@ +