From c7015b3c573d0bc7ff800390819fb7bda4816f77 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Tue, 18 Sep 2018 16:11:06 +0530 Subject: [PATCH] daybook validation --- Apollo/assets/js/controllers/daybookCtrl.js | 13 +++++++++- .../assets/js/controllers/daybookadminCtrl.js | 12 ++++++++- .../js/controllers/daybooksuperadminCtrl.js | 26 ++++++++++++++----- 3 files changed, 43 insertions(+), 8 deletions(-) diff --git a/Apollo/assets/js/controllers/daybookCtrl.js b/Apollo/assets/js/controllers/daybookCtrl.js index 754ba119..5ba72834 100755 --- a/Apollo/assets/js/controllers/daybookCtrl.js +++ b/Apollo/assets/js/controllers/daybookCtrl.js @@ -511,7 +511,18 @@ $scope.dayBookApprovalAccess = ''; var id=id; var reason=prompt("Reason For Deletion!",""); - $scope.deleteFeePayableEntry(reason,id); + + if(reason !=null) + { + $scope.deleteFeePayableEntry(reason, id); + } + + else + { + //alert('check') + } + + ///$scope.deleteFeePayableEntry(reason,id); } //delete the income entry From the fees payable $scope.deleteFeePayableEntry = function (reason, id) { diff --git a/Apollo/assets/js/controllers/daybookadminCtrl.js b/Apollo/assets/js/controllers/daybookadminCtrl.js index f74162a7..e970fad7 100755 --- a/Apollo/assets/js/controllers/daybookadminCtrl.js +++ b/Apollo/assets/js/controllers/daybookadminCtrl.js @@ -502,7 +502,17 @@ $scope.dayBookApprovalAccess = ''; var id=id; var reason=prompt("Reason For Deletion!",""); - $scope.deleteFeePayableEntry(reason,id); + + if(reason !=null) + { + $scope.deleteFeePayableEntry(reason, id); + } + + else + { + //alert('check') + } + // $scope.deleteFeePayableEntry(reason,id); } //delete the income entry From the fees payable diff --git a/Apollo/assets/js/controllers/daybooksuperadminCtrl.js b/Apollo/assets/js/controllers/daybooksuperadminCtrl.js index d90d8968..6aac0f48 100755 --- a/Apollo/assets/js/controllers/daybooksuperadminCtrl.js +++ b/Apollo/assets/js/controllers/daybooksuperadminCtrl.js @@ -629,8 +629,16 @@ $scope.loadStaring = true; $scope.deleted1 = function (id) { var id = id; var reason = prompt("Reason For Deletion!", ""); - $scope.deleteFeePayableEntry(reason, id); + if(reason !=null) + { + $scope.deleteFeePayableEntry(reason, id); + } + + else + { + //alert('check') + } //console.log($scope.deleteFeePayableEntry) @@ -644,15 +652,17 @@ $scope.loadStaring = true; type: "warning", showCancelButton: true, confirmButtonColor: "#007aff", - confirmButtonText: "Yes!" + confirmButtonText: "Yes!", + cancelButtonText: "No", + closeOnConfirm: false, + closeOnCancel: false }, function (res) { - //console.log(res); + console.log(res); + //return false; if (res === true) { - // alert(reason); - //alert(stuId); -// + if(reason == '') { @@ -689,6 +699,10 @@ $scope.loadStaring = true; } } + // else + // { + // alert('close') + // } }); }