day book super admin updates: kdk

This commit is contained in:
resicovenba 2018-03-16 11:27:14 +05:30
parent 696973b7fc
commit f4babc90a5
7 changed files with 766 additions and 8 deletions

View File

@ -154,6 +154,7 @@ app.constant('JS_REQUIRES', {
'daybooksuperadminCtrl': 'assets/js/controllers/daybooksuperadminCtrl.js',
'daybookapprovalCtrl': 'assets/js/controllers/daybookapprovalCtrl.js',
'daybookadminapprovalCtrl': 'assets/js/controllers/daybookadminapprovalCtrl.js',
'daybooksuperadminapprovalCtrl': 'assets/js/controllers/daybooksuperadminapprovalCtrl.js',
'studentStatusUpdateCtrl':'assets/js/controllers/studentStatusUpdateCtrl.js',
'studentViewCtrl':'assets/js/controllers/studentViewCtrl.js',

View File

@ -438,16 +438,41 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
ncyBreadcrumb: {
label: 'Approve expense'
}
})
.state('app.daybooksuperadmin', {
}).state('app.daybooksuperadmin', {
url: '/daybooksuperadmin',
templateUrl: "assets/views/daybook/daybooksuperadmin.html",
template: '<div ui-view class="fade-in-up"> <div style="margin: auto; width: 50%;padding: 10px;"> STUDENT STATUS UPDATE </div> </div>',
title: 'Income/Expense',
resolve: loadSequence('spin', 'ladda', 'angular-ladda', 'daybooksuperadminCtrl','ngTable'),
ncyBreadcrumb: {
label: 'Income/Expense'
}
}).state('app.daybooksuperadmin.details', {
url: '/daybooksuperadmindetails',
templateUrl: "assets/views/daybook/daybooksuperadmin.html",
title: 'Income/Expense',
resolve: loadSequence('spin', 'ladda', 'angular-ladda', 'daybooksuperadminCtrl','ngTable'),
ncyBreadcrumb: {
label: 'Income/Expense'
}
})
.state('app.daybooksuperadmin.approval', {
url: '/daybooksuperadminApproval',
templateUrl: "assets/views/daybook/daybooksuperAdminApproval.html",
title: 'Approve expense',
resolve: loadSequence('spin', 'ladda', 'angular-ladda', 'daybooksuperadminapprovalCtrl','ngTable'),
ncyBreadcrumb: {
label: 'Approve expense'
}
}).state('app.broadCast', {
})
// .state('app.daybooksuperadmin', {
// url: '/daybooksuperadmin',
// templateUrl: "assets/views/daybook/daybooksuperadmin.html",
// title: 'Income/Expense',
// resolve: loadSequence('spin', 'ladda', 'angular-ladda', 'daybooksuperadminCtrl','ngTable'),
// ncyBreadcrumb: {
// label: 'Income/Expense'
// }
// })
.state('app.broadCast', {
url: '/broadcast',
template: '<div ui-view class="fade-in-up"> <div style="margin: auto; width: 50%;padding: 10px;"> BROADCAST DETAILS </div> </div>',
title: 'Broadcast',

View File

@ -0,0 +1,353 @@
'use strict';
/**
* daybook details capturing
*
*/
app.controller('daybooksuperadminapprovalCtrl', ["$scope", "$rootScope", "toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", 'ipCookie', '$window', function ($scope, $rootScope, toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state, ipCookie, $window) {
// get local client details
var localDetail = JSON.parse(localStorage.getItem('localObj'));
var localDetails = ipCookie('cookiechk');
$scope.disableAddButton = false;
$scope.disableEditButton = false;
$scope.searchData = {
"date": "",
"dateTo": ""
}
$scope.viewStudentDetailsPage = false;
// load when html page load
$scope.init = function () {
if (localDetail != null) {
if (localDetails.localType === 'R004') {
$scope.getBranchList();
} else {
ipCookie.remove('cookiechk');
$window.localStorage.clear();
$state.go('login.signin');
}
} else {
}
}
$scope.getBranchList = function () {
$scope.loader = true;
var empListreq = {
method: 'POST',
url: apiPoint.url + 'getBranchListDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
data: localDetails
}
};
$http(empListreq).then(function (response) {
if (response.data.branDetailstatus) {
$scope.loader = false;
$scope.branchList_data = response.data.branch_details;
} else {
}
});
}
$scope.changeBranch = function () {
$scope.viewStudentDetailsPage = false;
localDetails.localBranchID = $scope.localBranchDetails;
localDetail.localBranchID = $scope.localBranchDetails;
getDetails()
}
function getDetails() {
const LOCALTYPE = localDetail.localType;
if(LOCALTYPE === 'R004') {
$scope.currentDate = new Date();
var d = new Date();
$scope.oneMonthBefore = d.setMonth(d.getMonth()-1);
// alert($scope.oneMonthBefore);
var formate = "dd-MM-yyyy";
$scope.searchData.date = $filter('date')(new Date($scope.oneMonthBefore), formate);
$scope.searchData.dateTo = $filter('date')(new Date($scope.currentDate), formate);
$scope.getDayBookList();
$scope.getIncomeExpenseType_Status();
$scope.viewStudentDetailsPage = true;
}else {
ipCookie.remove('cookiechk');
$window.localStorage.clear();
$state.go('login.signin');
}
}
$scope.dayBookApprovalAccess = '';
// Finance module access control
function getFinanceModuleAccess() {
var getFinacnceModuleAcccessCtrl = {
method: 'POST',
url: apiPoint.url + 'empDayBookModuleAccessChk/',
headers: {
'Content-Type': 'application/json'
},
data: {
localReqDetails: localDetails
}
};
$http(getFinacnceModuleAcccessCtrl).then(function (response) {
if (response.data.dayBkAccessChkStatus) {
$scope.dayBookApprovalAccess = response.data.dayBkAccessChk_Value;
$scope.showTheRefValue = undefined;
$scope.localTypeViewAdmin = true;
$scope.currentDate = new Date();
var formate = "dd-MM-yyyy";
$scope.searchData.date = $filter('date')(new Date($scope.currentDate), formate);
$scope.searchData.dateTo = $filter('date')(new Date($scope.currentDate), formate);
$scope.getIncomeExpenseType_Status();
$scope.getDayBookList();
return true;
} else {
return true;
}
});
}
// change from date, update and call search functionality
$scope.changeDate = function () {
if($scope.searchData.date !== undefined) {
var formate = "dd-MM-yyyy";
$scope.searchData.date = $filter('date')(new Date($scope.searchData.date), formate);
$scope.getDayBookList();
} else {
$scope.searchData.date = '';
$scope.getDayBookList();
}
}
// change to date, update and call search functionality
$scope.changeToDate = function () {
if($scope.searchData.dateTo !== undefined) {
var formate = "dd-MM-yyyy";
$scope.searchData.dateTo = $filter('date')(new Date($scope.searchData.dateTo), formate);
$scope.getDayBookList();
} else {
$scope.searchData.dateTo = '';
$scope.getDayBookList();
}
}
// sorting function for table params
$scope.sort = function (keyname) {
// alert();
$scope.sortKey = keyname; //set the sortKey to the param passed
$scope.reverse = !$scope.reverse; //if true make it false and vice versa
}
// income expense type status list
$scope.getIncomeExpenseType_Status = function () {
var getIncomeExpenseType = {
method: 'POST',
url: apiPoint.url + 'getIncomeExpenseTypeState/',
headers: {
'Content-Type': 'application/json'
},
data: {
localReqDetails: localDetails
}
};
$http(getIncomeExpenseType).then(function (response) {
if (response.data.typeNameStatus) {
$scope.incomeExpenseName = response.data.typeList;
$scope.incomeExpenseType = response.data.typeNameList;
} else {
}
});
}
$scope.loadingsearch = false;
$scope.noRecordFound = true;
$scope.noRecordFoundSearch = false;
$scope.dataLengthIncome = 0;
$scope.dataLengthExpense = 0;
// day book entry list
$scope.getDayBookList = function () {
$scope.loadingsearch = true;
$scope.noRecordFoundSearch = false;
var getDatBookListDetails = {
method: 'POST',
url: apiPoint.url + 'getDayBookDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
data: $scope.searchData,
localReqDetails: localDetails,
}
};
$http(getDatBookListDetails).then(function (response) {
if (response.data.dayBookListStatus) {
$scope.loadingsearch = false;
// $scope.data = response.data.dayBookListDetails;
$scope.datas = response.data.dayBookListDetails;
const filterAddSelect = $scope.datas.filter(val => {
val['Selected'] = false;
return val;
});
$scope.searchResultDetails = filterAddSelect;
$scope.searchResultDetailsCopy = filterAddSelect;
} else {
$scope.loadingsearch = false;
}
});
}
// Select one row in a table once
$scope.setOneSelect = function (value) {
angular.forEach($scope.searchResultDetails, function (item) {
item.Selected = false;
});
value.Selected = true;
$scope.OpenWindowStatus = true;
$scope.openUpdateWind();
}
$scope.unSelect = function () {
// alert(value.Selected);
angular.forEach($scope.searchResultDetails, function (item) {
item.Selected = false;
});
$scope.openUpdateWind();
}
$scope.myStatusModel = {
'staus': '',
'description': '',
}
// End: select all or individual functionality
$scope.OpenWindowStatus = false;
// open popup window when checkbox get selected / close popup window uncheck the selected items
$scope.openUpdateWind = function () {
var ItemsSelected = $scope.searchResultDetails.filter(function (item) {
if (item.Selected === true) { return true; }
});
if (ItemsSelected.length) {
$scope.myStatusModel = {
'staus': '',
'description': '',
}
$scope.OpenWindowStatus = true;
} else {
$scope.OpenWindowStatus = false;
}
}
// update the status details
$scope.statusUpdate = {
submit: function (form, myStatusModel) {
var firstError = null;
if (form.$invalid) {
var field = null, firstError = null;
for (field in form) {
if (field[0] != '$') {
if (firstError === null && !form[field].$valid) {
firstError = form[field].$name;
}
if (form[field].$pristine) {
form[field].$dirty = true;
}
}
}
angular.element('.ng-invalid[name=' + firstError + ']').focus();
} else {
var selectedItems = [];
var ItemsSelected = $scope.searchResultDetails.filter(function (item) {
if (item.Selected === true && item.Status === 'Pending' ) {
let itemGetID = new getUpdateDetails(item.ID);
selectedItems.push(itemGetID);
return true;
}
});
function getUpdateDetails(id) {
this.dabookListId = id;
this.ListCodeStatus = $scope.myStatusModel.staus;
this.comments = $scope.myStatusModel.description;
}
if(selectedItems.length > 0) {
$scope.disableStatusUpdateButton = true;
var updateStudyMaterial = {
method: 'POST',
url: apiPoint.url + 'updateDayBookStatusAdmin/',
headers: {
'Content-Type': 'application/json'
},
data: {
data: selectedItems,
requestDetails: localDetails
}
};
$http(updateStudyMaterial).then(function (response) {
if (response.data.addStatus) {
swal(" ", "Updated successfully,", "success");
// for success state
$scope.getDayBookList();
$scope.unSelect();
$scope.myStatusModel = {
'staus': '',
'description': '',
}
$scope.allSelected('undefined');
$scope.OpenWindowStatus = false;
$scope.disableStatusUpdateButton = false;
} else {
swal(" ", response.data.message, "error");
$scope.disableStatusUpdateButton = false;
}
});
} else {
swal(" ", "Item not Selected", "warning");
}
}
},
reset: function (form) {
form.$setPristine(true);
$scope.myStatusModel = {
'staus': '',
'description': '',
}
}
}
$scope.showTheResType = function (type) {
// alert(type);
if (type == undefined) {
$scope.searchResultDetails = $scope.searchResultDetailsCopy;
} else {
$scope.searchResultDetails = $scope.searchResultDetailsCopy.filter(val => {
return val.Name == type ? 1 : 0;
})
}
// const filterAddSelect = $scope.searchResultDetails.filter(val => {
// });
}
$scope.statusList = [{
"status_id": 'TS001',
"name": "Pending",
}, {
"status_id": 'TS002',
"name": "Approved",
}, {
"status_id": 'TS003',
"name": "Rejected",
}];
}]);

View File

@ -207,7 +207,7 @@
<th ng-click="sort('ListName')">Income/Expense
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='ListName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th>
<th>Voucher Number
<th>Voucher Number/Bill Number
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='EmailID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th>
<th ng-click="sort('PaidTo')">Paid To / Received From

View File

@ -207,7 +207,7 @@
<th ng-click="sort('ListName')">Income/Expense
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='ListName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th>
<th>Voucher Number
<th>Voucher Number /Bill Number
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='EmailID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th>
<th ng-click="sort('PaidTo')">Paid To / Received From

View File

@ -0,0 +1,355 @@
<!-- start: PAGE TITLE -->
<section id="page-title">
<div class="row">
<div class="col-sm-8">
<h1 class="mainTitle" translate="sidebar.nav.daybook.MAIN">{{ mainTitle }}</h1>
</div>
<div ncy-breadcrumb></div>
</div>
</section>
<!-- end: PAGE TITLE -->
<!-- start: DAY BOOK -->
<div class="container-fluid container-fullw bg-white">
<div ng-controller="daybooksuperadminapprovalCtrl" >
<div class="container" ng-init="init()">
<div class="row">
<div class="col-lg-4"></div>
<div class="col-lg-4">
<div>
<label for="form-field-select-2">
Select Branch
</label>
<select class="form-control" tabindex="0" class="cs-select cs-skin-elastic" name="branch" ng-model="localBranchDetails" ng-change="changeBranch()"
id="selectBranch" required>
<option value="" disabled selected>Select Branch</option>
<option ng-repeat="bdata in branchList_data" value="{{bdata.BranchCode}}">{{bdata.BranchName}}</option>
</select>
</div>
<!-- ng-if="loader == true"-->
<span ng-if="loader == true" style="color: #007AFF;
font-size: 16px;">Loading...</span>
</div>
<div class="col-lg-4"></div>
</div>
</div>
<div ng-if="viewStudentDetailsPage">
<tabset class="tabbable">
<tab heading="View" id="viewDayBook">
<div class="container-fluid container-fullw">
<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-4">
<div data-ng-controller="DatepickerDemoCtrl">
<label>
From Date
</label>
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="searchData.date"
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
placeholder="Select Date" close-text="Close" required="required" ng-change="changeDate()"
show-button-bar="true" />
</div>
</div>
<div class="col-md-4">
<div data-ng-controller="DatepickerDemoCtrl">
<label>
To Date
</label>
<input type="text" tabindex="1" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="searchData.dateTo"
is-open="startOpen" ng-init="startOpen = false" name="addDate" datepicker-options="dateOptions"
placeholder="Select Date" close-text="Close" required="required" ng-change="changeToDate()"
show-button-bar="true" />
</div>
</div>
<div class="col-md-4 form-group" ng-class="{'has-error':Form.gender.$dirty && Form.addName.$invalid , 'has-success':Form.addName.$valid}">
<label for="form-field-select-2">
Income/Expense
</label>
<select class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="addName" ng-model="showTheRefValue" ng-change="showTheResType(showTheRefValue)"
required>
<option value="" selected>Select</option>
<option ng-repeat="typeName in incomeExpenseName" ng-selected="showTheRefValue == typeName.ListCode" value="{{typeName.ListCode}}">{{typeName.ListName}}</option>
</select>
<span class="error text-small block" ng-if="Form.addName.$dirty && Form.addName.$error.required">Type is Required</span>
</div>
</div>
<div>
<div ng-show="loadingsearch" class="center">
<span style="color: #007AFF;
font-size: 16px;">Loading...</span>
</div>
</div>
<div class="center" ng-show="noRecordFoundSearch">
<p style="color: red;" align="center"><strong><h3 class="text-center">No
records found... </h3></strong></p>
</div>
<!--<div ng-if="showTheRefValue == 'I002'">
<style>
.listCoutShow {
margin: 12px;
padding: 4px;
padding-left: 10px;
padding-right: 10px;
border: 1px solid #59b176;
border-radius: 7px;
color: #FFF;
background-color: #5fba7d;
text-align: center;
}
</style>
<div class="row" ng-if="dataLengthIncome > 0">
<div class="pull-right">
<div style="margin: 8px;">
<div style="width: 45px; display: initial;">
<span style="font-size: 14px;
color: black;">Total Count:</span>
<span class="listCoutShow">{{ dataLengthIncome }}</span>
</div>
</div>
</div>
</div>
<div class="table-responsive">
<table style="width: 100%;" class="table table-hover" ng-if="dataLengthIncome > 0">
<thead>
<tr>
<th ng-click="sort('Date')">Date
<span class="glyphicon sort-icon" ng-show="sortKey=='Date'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th ng-click="sort('ListName')">Income/Expense
<span class="glyphicon sort-icon" ng-show="sortKey=='ListName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th>Voucher Number
</th>
<th ng-click="sort('PaidTo')">Paid To / Received From
<span class="glyphicon sort-icon" ng-show="sortKey=='PaidTo'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th>Description/Comments
</th>
<th ng-click="sort('TypeName')">Type
<span class="glyphicon sort-icon" ng-show="sortKey=='TypeName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th>Amount
</th>
</tr>
</thead>
<tbody dir-paginate="p in IncomeData|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10">
<tr>
<td>{{p.Date}}</td>
<td>{{p.ListName}}</td>
<td>{{p.VoucherNumber}}</td>
<td>{{p.PaidTo}}</td>
<td>
<div id="containersPara">
<div id="wrapper">
{{p.PaidDescription}} / {{p.Description}}
</div>
</div>
</td>
<td>{{p.TypeName}}</td>
<td>{{p.Amount}}</td>
</tr>
</tbody>
</table>
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
</dir-pagination-controls>
</div>
</div>-->
<div>
<style>
.listCoutShow {
margin: 12px;
padding: 4px;
padding-left: 10px;
padding-right: 10px;
border: 1px solid #59b176;
border-radius: 7px;
color: #FFF;
background-color: #5fba7d;
text-align: center;
}
</style>
<div class="row">
<div class="pull-right" ng-if="dataLengthExpense > 0">
<div style="margin: 8px;">
<div style="width: 45px; display: initial;">
<span style="font-size: 14px;
color: black;">Total Count:</span>
<span class="listCoutShow">{{ dataLengthExpense }}</span>
</div>
</div>
</div>
</div>
<div class="table-responsive">
<table style="width: 100%;" class="table table-hover">
<thead>
<tr>
<th>
</th>
<th ng-click="sort('Date')">Date
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='Date'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th>
<th ng-click="sort('ListName')">Income/Expense
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='ListName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th>
<th>Voucher Number /Bill Number
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='EmailID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th>
<th ng-click="sort('PaidTo')">Paid To / Received From
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='PaidTo'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th>
<th>Description/Comments
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='PaidTo'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th>
<th ng-click="sort('TypeName')">Type
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='TypeName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th>
<th>Amount
<!--<span class="glyphicon sort-icon" ng-show="sortKey=='EmailID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>-->
</th>
<th ng-click="sort('Status')">Status
<span class="glyphicon sort-icon" ng-show="sortKey=='Status'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
</tr>
</thead>
<tbody dir-paginate="p in searchResultDetails|itemsPerPage:10">
<tr>
<td>
<label ng-if="p.Status == 'Pending'">
<input type="checkbox" ng-model="p.Selected" ng-change="setOneSelect(p)" />
</label>
</td>
<td>{{p.Date}}</td>
<td>{{p.ListName}}</td>
<td>{{p.VoucherNumber}}</td>
<td>{{p.PaidTo}}</td>
<td>
<div id="containersPara">
<div id="wrapper">
{{p.PaidDescription}} / {{p.Description}}
</div>
</div>
</td>
<td>{{p.TypeName}}</td>
<td>{{p.Amount}}</td>
<!-- <td>
<div id="containersPara">
<div id="wrapper">
{{p.Description}}
</div>
</div>
</td> -->
<td tooltip="{{p.Approval_Comments}} BY {{p.Approved_by_name}}"><span ng-if="p.Status == 'Pending'" style="text-transform: uppercase; text-shadow: 1px 1px #286d5f; color: #55d4bb ">{{p.Status}}</span>
<span ng-if="p.Status == 'Approved'" style="text-transform: uppercase; text-shadow: 1px 1px #166307; color: #2be209 ">{{p.Status}}</span>
<span ng-if="p.Status == 'Rejected'" style="text-transform: uppercase; text-shadow: 1px 1px rgb(167, 88, 15); color: rgba(236, 24, 24, 0.98823529);">{{p.Status}}</span>
</td>
</tr>
</tbody>
</table>
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
</dir-pagination-controls>
</div>
</div>
</div>
</div>
</div>
<div ng-if="OpenWindowStatus">
<form name="Form" id="form" novalidate ng-submit="statusUpdate.submit(Form, myStatusModel)" method="post">
<div class="container">
<div class="row">
<div class="col-md-4">
</div>
<div class="col-md-4">
<fieldset style="background-color: #eaeaea;">
<legend>
Update Status
</legend>
<div class="row">
<a id="cancel_button" ng-click="unSelect()" tooltip="Close">
<span class="glyphicon glyphicon-remove-circle"></span>
</a>
<div class="col-md-2">
</div>
<div class="col-md-8 form-group" ng-class="{'has-error':Form.status.$dirty && Form.status.$invalid, 'has-success':Form.status.$valid}">
<label for="form-field-select-2">
Status <span class="symbol required"></span>
</label>
<select class="form-control" tabindex="4" class="cs-select cs-skin-elastic" name="status" ng-model="myStatusModel.staus"
required>
<option value="" disabled selected>Select Status</option>
<option ng-repeat="itemStatus in statusList" value="{{itemStatus.name}}">{{itemStatus.name}}</option>
</select>
<span class="error text-small block" ng-if="Form.status.$dirty && Form.status.$error.required">Status is Required</span>
</div>
</div>
<div>
<div class="row">
<div class="col-md-12 form-group" ng-class="{'has-error':Form.description.$dirty && Form.description.$invalid}">
<label>
Comments
</label>
<textarea type="text" placeholder="Enter Comments" tabindex="3" class="form-control" name="description" ng-model="myStatusModel.description"
maxlength="100" />
<span class="text-small block">Max 100 Characters.</span>
<span class="error text-small block" ng-if="Form.description.$dirty && Form.description.$error.pattern">Invalid Comments</span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="center">
<button type="submit" tabindex="8" ladda="ldloading1.zoom_in" class="btn btn-sm btn-success" data-style="zoom-in" ng-disabled="disableStatusUpdateButton">
<i class='fa fa-spinner fa-spin' ng-if="disableStatusUpdateButton"> </i> Update
</button>
<!--<button type="reset" tabindex="9" class="btn btn-warning btn-wide" tabindex="9" ng-click="employeeForm.resetCourse(Form)">
Reset
</button>-->
</div>
</div>
</div>
</fieldset>
</div>
<div class="col-md-4">
</div>
</div>
</div>
</form>
</div>
</tab>
</tabset>
</div>
</div>
</div>
<!-- end: DAY BOOK -->
<section id="page-title">
<div class="row">
<!--<div class="col-sm-8">
<h1 class="mainTitle" translate="sidebar.nav.profile.MAIN">{{ mainTitle }}</h1>
</div>
<div ncy-breadcrumb></div>-->
</div>
</section>

View File

@ -245,7 +245,7 @@
</ul>
</li>
<li ng-class="{'active open':$state.includes('app.daybooksuperadmin')}">
<!--<li ng-class="{'active open':$state.includes('app.daybooksuperadmin')}">
<a ui-sref="app.daybooksuperadmin" ng-click="checkSuperAdmin()">
<div class="item-content">
<div class="item-media">
@ -256,6 +256,30 @@
</div>
</div>
</a>
</li>-->
<li ng-class="{'active open':$state.includes('app.daybooksuperadmin')}">
<a href="javascript:void(0)">
<div class="item-content">
<div class="item-media">
<i class="ti-money"></i>
</div>
<div class="item-inner">
<span class="title" translate="sidebar.nav.daybook.MAIN"> DAY BOOK</span><i class="icon-arrow"></i>
</div>
</div>
</a>
<ul class="sub-menu">
<li ui-sref-active="active">
<a ui-sref="app.daybooksuperadmin.details" ng-click="checkSuperAdmin()">
<span class="title" translate="sidebar.nav.daybook.MAIN"> DAY BOOK</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.daybooksuperadmin.approval" ng-click="checkSuperAdmin()">
<span class="title" translate="sidebar.nav.daybook.APPROVAL"> DAY BOOK</span>
</a>
</li>
</ul>
</li>
<li ng-class="{'active open':$state.includes('app.broadCast')}">
<a href="javascript:void(0)">