date disable enable based on role

This commit is contained in:
gayathri1990 2018-07-10 18:22:53 +05:30
parent 029f0c4fe8
commit e29541ec74
4 changed files with 21 additions and 8 deletions

View File

@ -338,15 +338,11 @@ $scope.dayBookApprovalAccess = '';
$scope.deleted = function (id) {
// swal({
// title: "Enter Reason For Delete",
var id=id;
var a=prompt("Enter for the Delete Reason!","");
$scope.deleEditEntry(a,id);
// html: true,
// text: "Reason:<input type='text' id='reason' value=''>"
// });
}

View File

@ -14,6 +14,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
$scope.futureDate=new Date();
// end
$rootScope.userType = JSON.parse(localStorage.getItem('localObj')).localType;
$rootScope.financeType = JSON.parse(localStorage.getItem('localObj')).is_DayBookApproval_Access;
/*
* updateModel default value
@ -93,11 +94,13 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
$scope.init = function () {
$scope.isTrainee = false;
var localUserType = JSON.parse(localStorage.getItem('localObj')).localType;
if(localUserType === 'R005')
{
$scope.isTrainee = true;
}
var getUniv = {
method: 'POST',
url: apiPoint.url + 'getUniversityCourseForFees/',
@ -110,6 +113,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
}
};
$http(getUniv).then(function (response) {
if (response.data.status==200 && response.data.universityStatus) {
$scope.university=response.data.univerSityDetails;
@ -170,6 +174,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
$http(getStudent).then(function (response) {
if (response.data.status==200 && response.data.studentStatus) {
$scope.studentInfo=response.data.details;
console.log($scope.studentInfo);
} else {
$scope.studentInfo="";
@ -189,7 +194,16 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
$scope.viewId=-1
$scope.getStudentFeesStructure(p.ID,p.CourseID,p.StudentID);
$scope.editId=p.ID;
var localUserType = JSON.parse(localStorage.getItem('localObj')).localType;
if(localUserType === 'R004' || localUserType === 'R003' )
{
$scope.show = true;
}
else
{
$scope.show = false;
}
}
@ -762,6 +776,7 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n
$http(getFees).then(function (response) {
if (response.data.status==200 && response.data.feesStatus) {
$scope.studentFeesInfo=response.data.feesDetails;
//console.log( $scope.studentFeesInfo);
$scope.existStudentFeesDetails = response.data.getExistStudentFeesDetails;
$scope.getFeesUpdateStatus = response.data.getFeesUpdateStatus;

View File

@ -9,6 +9,7 @@
</section>
<!-- end: PAGE TITLE -->
<!-- start: DAY BOOK -->
<div class="container-fluid container-fullw bg-white">
<div ng-controller="daybooksuperadminCtrl" ng-init="init()" >
<div>

View File

@ -231,7 +231,7 @@
<span class="error text-small block"
ng-if="Form.feesTypeBill.$dirty && Form.feesTypeBill.$invalid">Sem/Year is required</span>
</div>
<div data-ng-controller="DatepickerDemoCtrl">
<div data-ng-controller="DatepickerDemoCtrl" ng-show ="{{show}}">
<div class="col-md-3 form-group"
ng-class="{'has-error':Form.date.$dirty && Form.date.$invalid, 'has-success':Form.date.$valid}">
<label>
@ -252,6 +252,7 @@
max-date="futureDate"
close-text="Close" required="required" ng-readonly="true"/>
<span class="error text-small block"
ng-if="user.groups.admin && group.title == 'Home Pages'"
ng-if="Form.date.$dirty && Form.date.$error.required">Date is required.</span>
<!--<span class="success text-small block"-->
<!--ng-if="Form.date.$valid ">Thank You</span>-->