Commit 3b98b426 authored by nakavaram-nisum-com's avatar nakavaram-nisum-com Committed by rbonthala-nisum-com

Error or warning message in manage projects view screen (#101)

parent c3ac2705
...@@ -1001,7 +1001,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -1001,7 +1001,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
else if(action =="Add" && ($scope.newBillingStartDate > $scope.endDate)){ else if(action =="Add" && ($scope.newBillingStartDate > $scope.endDate)){
$scope.alertMsg = "Assignment End Date should be less than New Billability Start Date "; $scope.alertMsg = "Assignment End Date should be less than New Billability Start Date ";
} }
else if(action == "Update" && ($scope.endDate < $scope.startDate < $scope.newBillingStartDate)){ else if (action == "Update" && (($scope.endDate < $scope.startDate) && ($scope.startDate <= $scope.newBillingStartDate) && ($scope.endDate < $scope.newBillingStartDate))) {
$scope.alertMsg = "EndDate should be greater than StartDate and new BillingStartDate "; $scope.alertMsg = "EndDate should be greater than StartDate and new BillingStartDate ";
} }
else if(employeeModel != undefined && projectModel != undefined && action == "Add" else if(employeeModel != undefined && projectModel != undefined && action == "Add"
...@@ -1174,8 +1174,24 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS ...@@ -1174,8 +1174,24 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$mdDialog.hide('Cancelled'); $mdDialog.hide('Cancelled');
}; };
$scope.cancelTab = function() { $scope.cancelTab = function () {
if (dataToPass.action == "View") {
if ($scope.myForm.$dirty) {
$mdDialog.show($mdDialog.confirm({
skipHide: true,
textContent: 'Are you sure you want to cancel this?',
ok: 'ok',
cancel: 'cancel'
})).then(function () {
removeTab("cancel"); removeTab("cancel");
$scope.myForm.$setPristine();
})
}
else {
removeTab("cancel")
}
}
}; };
$scope.getEmployeeSelected = function(){ $scope.getEmployeeSelected = function(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment