From 552781b5c61a8a3c657450cf5b6a787861cb72a4 Mon Sep 17 00:00:00 2001 From: tanshu Date: Fri, 18 May 2018 12:19:40 +0530 Subject: [PATCH] Fix: Delete confirmation was borked for all except Journal. --- brewman/static/app/account/account.controller.ts | 1 + brewman/static/app/client/client.controller.ts | 1 + brewman/static/app/employee/employee.controller.ts | 1 + brewman/static/app/incentive/incentive.controller.ts | 1 + brewman/static/app/issue/issue.controller.ts | 1 + brewman/static/app/journal/journal-modal.controller.ts | 2 +- brewman/static/app/payment/payment.controller.ts | 1 + .../static/app/purchase-return/purchase-return.controller.ts | 1 + brewman/static/app/purchase/purchase.controller.ts | 1 + brewman/static/app/receipt/receipt.controller.ts | 1 + .../static/app/salary-deduction/salary-deduction.controller.ts | 1 + 11 files changed, 11 insertions(+), 1 deletion(-) diff --git a/brewman/static/app/account/account.controller.ts b/brewman/static/app/account/account.controller.ts index 64fd5145..ec93be41 100644 --- a/brewman/static/app/account/account.controller.ts +++ b/brewman/static/app/account/account.controller.ts @@ -34,6 +34,7 @@ let modalInstance = this.$modal.open({ backdrop: true, templateUrl: '/template/modal/confirm.html', + controllerAs: 'vmModal', controller: ['$uibModalInstance', class { title: any; body: any; diff --git a/brewman/static/app/client/client.controller.ts b/brewman/static/app/client/client.controller.ts index fe0d081b..6c5f4dca 100644 --- a/brewman/static/app/client/client.controller.ts +++ b/brewman/static/app/client/client.controller.ts @@ -30,6 +30,7 @@ export class ClientController { const modalInstance = this.$modal.open({ backdrop: true, templateUrl: '/template/modal/confirm.html', + controllerAs: 'vmModal', controller: ['$uibModalInstance', class { title: any; body: any; diff --git a/brewman/static/app/employee/employee.controller.ts b/brewman/static/app/employee/employee.controller.ts index 19d53545..b79e1525 100644 --- a/brewman/static/app/employee/employee.controller.ts +++ b/brewman/static/app/employee/employee.controller.ts @@ -52,6 +52,7 @@ export class EmployeeController { const modalInstance = this.$modal.open({ backdrop: true, templateUrl: '/template/modal/confirm.html', + controllerAs: 'vmModal', controller: ['$uibModalInstance', class { title: any; body: any; diff --git a/brewman/static/app/incentive/incentive.controller.ts b/brewman/static/app/incentive/incentive.controller.ts index 4a2aa80f..9606c749 100644 --- a/brewman/static/app/incentive/incentive.controller.ts +++ b/brewman/static/app/incentive/incentive.controller.ts @@ -99,6 +99,7 @@ export class IncentiveController { const modalInstance = this.$modal.open({ backdrop: true, templateUrl: '/template/modal/confirm.html', + controllerAs: 'vmModal', controller: ['$uibModalInstance', class { title: any; body: any; diff --git a/brewman/static/app/issue/issue.controller.ts b/brewman/static/app/issue/issue.controller.ts index 3b53129a..c04f0a47 100644 --- a/brewman/static/app/issue/issue.controller.ts +++ b/brewman/static/app/issue/issue.controller.ts @@ -250,6 +250,7 @@ export class IssueController { const modalInstance = this.$modal.open({ backdrop: true, templateUrl: '/template/modal/confirm.html', + controllerAs: 'vmModal', controller: ['$uibModalInstance', class { title: any; body: any; diff --git a/brewman/static/app/journal/journal-modal.controller.ts b/brewman/static/app/journal/journal-modal.controller.ts index 4470edf6..95d1a0a5 100644 --- a/brewman/static/app/journal/journal-modal.controller.ts +++ b/brewman/static/app/journal/journal-modal.controller.ts @@ -1,6 +1,6 @@ export class JournalModalController { static $inject = ['$scope', '$uibModalInstance', 'MathSolver', 'Account']; - edit:any; + edit: any; constructor(public $scope, public $modalInstance, public MathSolver, public Account) { this.edit = $scope.$resolve.edit; diff --git a/brewman/static/app/payment/payment.controller.ts b/brewman/static/app/payment/payment.controller.ts index 6a9b0b1b..2517ea17 100644 --- a/brewman/static/app/payment/payment.controller.ts +++ b/brewman/static/app/payment/payment.controller.ts @@ -191,6 +191,7 @@ export class PaymentController { const modalInstance = this.$modal.open({ backdrop: true, templateUrl: '/template/modal/confirm.html', + controllerAs: 'vmModal', controller: ['$uibModalInstance', class { title: any; body: any; diff --git a/brewman/static/app/purchase-return/purchase-return.controller.ts b/brewman/static/app/purchase-return/purchase-return.controller.ts index 5026f661..86abc39d 100644 --- a/brewman/static/app/purchase-return/purchase-return.controller.ts +++ b/brewman/static/app/purchase-return/purchase-return.controller.ts @@ -184,6 +184,7 @@ export class PurchaseReturnController { const modalInstance = this.$modal.open({ backdrop: true, templateUrl: '/template/modal/confirm.html', + controllerAs: 'vmModal', controller: ['$uibModalInstance', class { title: any; body: any; diff --git a/brewman/static/app/purchase/purchase.controller.ts b/brewman/static/app/purchase/purchase.controller.ts index 06964b2f..b2f2b644 100644 --- a/brewman/static/app/purchase/purchase.controller.ts +++ b/brewman/static/app/purchase/purchase.controller.ts @@ -187,6 +187,7 @@ export class PurchaseController { const modalInstance = this.$modal.open({ backdrop: true, templateUrl: '/template/modal/confirm.html', + controllerAs: 'vmModal', controller: ['$uibModalInstance', class { title: any; body: any; diff --git a/brewman/static/app/receipt/receipt.controller.ts b/brewman/static/app/receipt/receipt.controller.ts index a3270b74..f036107f 100644 --- a/brewman/static/app/receipt/receipt.controller.ts +++ b/brewman/static/app/receipt/receipt.controller.ts @@ -191,6 +191,7 @@ export class ReceiptController { const modalInstance = this.$modal.open({ backdrop: true, templateUrl: '/template/modal/confirm.html', + controllerAs: 'vmModal', controller: ['$uibModalInstance', class { title: any; body: any; diff --git a/brewman/static/app/salary-deduction/salary-deduction.controller.ts b/brewman/static/app/salary-deduction/salary-deduction.controller.ts index 0589097b..2db9898f 100644 --- a/brewman/static/app/salary-deduction/salary-deduction.controller.ts +++ b/brewman/static/app/salary-deduction/salary-deduction.controller.ts @@ -150,6 +150,7 @@ export class SalaryDeductionController { const modalInstance = this.$modal.open({ backdrop: true, templateUrl: '/template/modal/confirm.html', + controllerAs: 'vmModal', controller: ['$uibModalInstance', class { title: any; body: any;