Daybook New Updates , and added New role for access daybookaccess details : kdk
This commit is contained in:
parent
872c7faa4d
commit
cdf26405d5
@ -195,6 +195,8 @@ $route['getIncomeExpenseTypeState'] = 'DayBook_Controller/getIncomeExpenseTypeSt
|
||||
$route['addDayBook'] = 'DayBook_Controller/adddaybook';
|
||||
$route['updateDayBookStatusAdmin'] = 'DayBook_Controller/updateDayBookStatusAdmin';
|
||||
$route['getDayBookDetailsSuperAdmin'] = 'DayBook_Controller/getDayBookDetailsSuperAdmin';
|
||||
$route['empDayBookModuleAccessChk'] = 'DayBook_Controller/empDayBookModuleAccessChk';
|
||||
|
||||
/* * day book master * */
|
||||
$route['getDayBookMasterDetails'] = 'DayBookMaster_Controller/getDayBookMasterDetails';
|
||||
$route['addDaybookMasterDetails'] = 'DayBookMaster_Controller/addDaybookMasterDetails';
|
||||
|
||||
@ -52,6 +52,28 @@ class DayBook_Controller extends REST_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function empDayBookModuleAccessChk_post() {
|
||||
$reqDataBy = $this->post('localReqDetails');
|
||||
// print_r($reqDataBy);exit();
|
||||
$empDayBkAccessChk = $this->daybook_model->emp_day_book_AccessChk($reqDataBy);// Check if the employee exist
|
||||
if ($empDayBkAccessChk)
|
||||
{
|
||||
$empDayBkAccessChk['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($empDayBkAccessChk, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No list were found',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// {"data":{"date":"22-12-2017"},"localReqDetails":{"localUserID":"137","localBranchID":"001","localType":"R002","localOn":"2017-12-22T12:45:19.688Z","status":"active"}}
|
||||
|
||||
// get all daybook details
|
||||
|
||||
@ -200,6 +200,9 @@ class Employee_Controller extends REST_Controller {
|
||||
$req['Qualification'] = $data['qualificaion'];
|
||||
$req['BranchCode'] = $data['homeBranch'];
|
||||
$req['IsActive'] = $data['switchsetting'];
|
||||
|
||||
$req['FinanceModuleAccess'] = $data['finaceModuleAccess'];
|
||||
|
||||
$req['DOJ'] = $data['dateofjoining'];
|
||||
$req['JobResponsibility'] = $data['jobResponsibility'];
|
||||
// $req['DOJ'] = $data['dateofjoining'];
|
||||
@ -436,16 +439,17 @@ class Employee_Controller extends REST_Controller {
|
||||
|
||||
// update employee branch
|
||||
public function updateEmpBranchDetail_post() {
|
||||
|
||||
// exit();
|
||||
$empFor = $this->post('empFor');
|
||||
$reqBanch['BranchCode'] = $this->post('updateBranch');
|
||||
$req['ListCode'] = $this->post('updateRole');
|
||||
$reqJOBRES['JobResponsibility'] = $this->post('JobResponsibility');
|
||||
$FinanceModuleAccess = $this->post('FinanceModuleAccess') == 1 ? 1 : 0;
|
||||
$req['UpdatedBy'] = $this->post('updateBy');
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$req['UpdatedOn'] = $date;
|
||||
|
||||
$updateBranch = $this->employee_model->upate_employee_branch( $empFor, $reqBanch, $req, $req['UpdatedBy'], $req['UpdatedOn'], $reqJOBRES );// Check if the employee exist
|
||||
$updateBranch = $this->employee_model->upate_employee_branch( $empFor, $reqBanch, $req, $req['UpdatedBy'], $req['UpdatedOn'], $reqJOBRES, $FinanceModuleAccess);// Check if the employee exist
|
||||
if ($updateBranch)
|
||||
{
|
||||
$updateBranch['status'] = REST_Controller::HTTP_OK;
|
||||
|
||||
@ -36,6 +36,18 @@ class DayBook_model extends CI_Model
|
||||
return $results;
|
||||
}
|
||||
|
||||
public function emp_day_book_AccessChk($arr) {
|
||||
$id = $arr['localUserID'];
|
||||
$sql1 = "SELECT t1.FinanceModuleAccess FROM ".STAFF." as t1 LEFT JOIN ".LOGIN." as t2 ON t2.StaffID = t1.StaffID WHERE t2.id = $id";
|
||||
// update branch to staff_branch table
|
||||
$dayBookAccDetails = $this->db->query($sql1);
|
||||
$dayBkAcesDetail = $dayBookAccDetails->result();
|
||||
$result['dayBkAccessChkStatus'] = true;
|
||||
$result['dayBkAccessChk_Value'] = $dayBkAcesDetail[0]->FinanceModuleAccess;
|
||||
// echo $result['dayBkAccessChk_Value'];exit();
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function get_Daybook_Details_List($reqData, $reqDataBy) {
|
||||
|
||||
if($reqData['date'] != '' && $reqData['dateTo'] != '') {
|
||||
@ -50,7 +62,8 @@ class DayBook_model extends CI_Model
|
||||
$toDate = $dTo->format('Y-m-d');
|
||||
$reqpayType = $reqDataBy['localBranchID'];
|
||||
|
||||
$querys = "SELECT t1.*, t2.ListName, t3.TypeName FROM ".DAYBOOKMASTER." as t1 LEFT JOIN ".PICK_LIST_DETAILS." as t2 ON t2.ListCode = t1.Name LEFT JOIN ".INCOMEOUTCOMEMASTER." as t3 ON t3.ID = t1.Type
|
||||
$querys = "SELECT t1.*, t2.ListName, t3.TypeName , t5.Firstname as Approved_by_name FROM ".DAYBOOKMASTER." as t1 LEFT JOIN ".PICK_LIST_DETAILS." as t2 ON t2.ListCode = t1.Name LEFT JOIN ".INCOMEOUTCOMEMASTER." as t3 ON t3.ID = t1.Type
|
||||
LEFT JOIN ".LOGIN." as t4 ON t4.ID = t1.Approval_By LEFT JOIN ".STAFF." as t5 ON t5.StaffID = t4.StaffID
|
||||
WHERE STR_TO_DATE(t1.Date, '%d-%m-%Y') BETWEEN '$fromDate'
|
||||
AND '$toDate' AND t1.BranchCode = '$reqpayType' ORDER BY CreatedOn DESC";
|
||||
|
||||
@ -69,7 +82,8 @@ class DayBook_model extends CI_Model
|
||||
// $this->db->order_by('CreatedOn', 'DESC');
|
||||
// $this->db->where('t1.BranchCode', $reqDataBy['localBranchID']);
|
||||
$reqpayType = $reqDataBy['localBranchID'];
|
||||
$querys = "SELECT t1.*, t2.ListName, t3.TypeName FROM ".DAYBOOKMASTER." as t1 LEFT JOIN ".PICK_LIST_DETAILS." as t2 ON t2.ListCode = t1.Name LEFT JOIN ".INCOMEOUTCOMEMASTER." as t3 ON t3.ID = t1.Type
|
||||
$querys = "SELECT t1.*, t2.ListName, t3.TypeName, t5.Firstname as Approved_by_name FROM ".DAYBOOKMASTER." as t1 LEFT JOIN ".PICK_LIST_DETAILS." as t2 ON t2.ListCode = t1.Name LEFT JOIN ".INCOMEOUTCOMEMASTER." as t3 ON t3.ID = t1.Type
|
||||
LEFT JOIN ".LOGIN." as t4 ON t4.ID = t1.Approval_By LEFT JOIN ".STAFF." as t5 ON t5.StaffID = t4.StaffID
|
||||
WHERE t1.BranchCode = '$reqpayType' ORDER BY CreatedOn DESC";
|
||||
}
|
||||
|
||||
@ -156,11 +170,13 @@ class DayBook_model extends CI_Model
|
||||
public function get_Daybook_Details_List_superAdmin($reqData, $reqDataBy){
|
||||
|
||||
if($reqData['date'] != '' && $reqData['dateTo'] != '') {
|
||||
$this->db->select('t1.*, t2.ListName, t3.TypeName, t4.BranchName');
|
||||
$this->db->select('t1.*, t2.ListName, t3.TypeName, t4.BranchName, t6.Firstname as Approved_by_name ');
|
||||
$this->db->from(''.DAYBOOKMASTER. ' as t1');
|
||||
$this->db->join('' . PICK_LIST_DETAILS . ' as t2', 't2.ListCode = t1.Name', 'LEFT');
|
||||
$this->db->join('' . INCOMEOUTCOMEMASTER . ' as t3', 't3.ID = t1.Type', 'LEFT');
|
||||
$this->db->join('' . BRANCH . ' as t4', 't4.BranchCode = t1.BranchCode', 'LEFT');
|
||||
$this->db->join('' . LOGIN . ' as t5', 't5.ID = t1.Approval_By', 'LEFT');
|
||||
$this->db->join('' . STAFF . ' as t6', 't6.StaffID = t5.StaffID', 'LEFT');
|
||||
$this->db->where('t1.Date >=', $reqData['date']);
|
||||
$this->db->where('t1.Date <=', $reqData['dateTo']);
|
||||
$this->db->order_by('CreatedOn', 'DESC');
|
||||
@ -168,11 +184,13 @@ class DayBook_model extends CI_Model
|
||||
$dayBookDetails = $this->db->get();
|
||||
$dayBookDetailsList = $dayBookDetails->result();
|
||||
} else {
|
||||
$this->db->select('t1.*, t2.ListName, t3.TypeName, t4.BranchName');
|
||||
$this->db->select('t1.*, t2.ListName, t3.TypeName, t4.BranchName, t6.Firstname as Approved_by_name ');
|
||||
$this->db->from(''.DAYBOOKMASTER. ' as t1');
|
||||
$this->db->join('' . PICK_LIST_DETAILS . ' as t2', 't2.ListCode = t1.Name', 'LEFT');
|
||||
$this->db->join('' . INCOMEOUTCOMEMASTER . ' as t3', 't3.ID = t1.Type', 'LEFT');
|
||||
$this->db->join('' . BRANCH . ' as t4', 't4.BranchCode = t1.BranchCode', 'LEFT');
|
||||
$this->db->join('' . LOGIN . ' as t5', 't5.ID = t1.Approval_By', 'LEFT');
|
||||
$this->db->join('' . STAFF . ' as t6', 't6.StaffID = t5.StaffID', 'LEFT');
|
||||
// $this->db->where('t1.Date', $reqData['date']);
|
||||
$this->db->order_by('CreatedOn', 'DESC');
|
||||
// $this->db->join('' . COURSE . ' as t2', 't2.UniversityID = t1.UniversityID', 'LEFT');
|
||||
|
||||
@ -514,7 +514,7 @@ class Employee_model extends CI_Model
|
||||
// get employee branch details
|
||||
public function get_employee_branch($staffId)
|
||||
{
|
||||
$this->db->select('t3.ListCode, t3.ListName, t4.JobResponsibility');
|
||||
$this->db->select('t3.ListCode, t3.ListName, t4.JobResponsibility, t4.FinanceModuleAccess');
|
||||
$this->db->from('' . PICK_LIST_DETAILS . ' as t3');
|
||||
$this->db->join('' . STAFF . ' as t4', 't4.ListCode = t3.ListCode', 'LEFT');
|
||||
$this->db->where('t4.StaffID', $staffId);
|
||||
@ -553,7 +553,7 @@ class Employee_model extends CI_Model
|
||||
}
|
||||
|
||||
// update employee branch details
|
||||
public function upate_employee_branch($empFor, $reqBanch, $req, $createby, $createon, $reqJOBRES)
|
||||
public function upate_employee_branch($empFor, $reqBanch, $req, $createby, $createon, $reqJOBRES, $FinanceModuleAccess)
|
||||
{
|
||||
// print_r( count($reqBanch['BranchCode']));exit();
|
||||
if( count($reqBanch['BranchCode']) > 1) {
|
||||
@ -569,7 +569,7 @@ class Employee_model extends CI_Model
|
||||
// $branchCode = $this->get_branch_code($reqBanch['BranchCode'][0]);
|
||||
$branchCode = $reqBanch['BranchCode'][0];
|
||||
$roleResponsibility = $reqJOBRES['JobResponsibility'];
|
||||
$sql = "UPDATE ".STAFF." SET BranchCode='$branchCode', JobResponsibility='$roleResponsibility' WHERE StaffID='$empFor'";
|
||||
$sql = "UPDATE ".STAFF." SET BranchCode='$branchCode', JobResponsibility='$roleResponsibility', FinanceModuleAccess=$FinanceModuleAccess WHERE StaffID='$empFor'";
|
||||
// update branch to staff table
|
||||
if ($this->db->query($sql) == '1') {
|
||||
$this->db->where('StaffID', $empFor);
|
||||
@ -615,7 +615,7 @@ class Employee_model extends CI_Model
|
||||
// $branchCode = $this->get_branch_code($reqBanch['BranchCode'][0]);
|
||||
$branchCode = $reqBanch['BranchCode'][0];
|
||||
$roleResponsibility = $reqJOBRES['JobResponsibility'];
|
||||
$sql = "UPDATE ".STAFF." SET BranchCode='$branchCode', JobResponsibility='$roleResponsibility' WHERE StaffID='$empFor'";
|
||||
$sql = "UPDATE ".STAFF." SET BranchCode='$branchCode', JobResponsibility='$roleResponsibility', FinanceModuleAccess=$FinanceModuleAccess WHERE StaffID='$empFor'";
|
||||
// update branch to staff table
|
||||
if ($this->db->query($sql) == '1') {
|
||||
$this->db->where('StaffID', $empFor);
|
||||
|
||||
@ -35,7 +35,7 @@ class Login_model extends CI_Model
|
||||
if ($password == $loginDetails->Password) {
|
||||
if($loginDetails->ListCode !=STUDENT){
|
||||
//print_r($loginDetails);exit();
|
||||
$this->db->select('t1.MobileNumber, t1.ListCode, t1.ID, t2.BranchCode');
|
||||
$this->db->select('t1.MobileNumber, t1.ListCode, t1.ID, t2.BranchCode, t2.FinanceModuleAccess');
|
||||
$this->db->from('' . LOGIN . ' as t1');
|
||||
$this->db->join('' . STAFF . ' as t2', 't1.StaffID = t2.StaffID', 'LEFT');
|
||||
$this->db->where('t1.MobileNumber', $mobile);
|
||||
|
||||
@ -112,7 +112,8 @@
|
||||
"MAIN": "DAY BOOK",
|
||||
"INCOMELISTING": "INCOME LISTING",
|
||||
"EXPENSELISTING": "EXPENSE LISTING",
|
||||
"DAYBOOK": "DAY BOOK "
|
||||
"DAYBOOK": "DAY BOOK ",
|
||||
"APPROVAL": "DAY BOOK APPROVAL"
|
||||
},
|
||||
"mydetails": {
|
||||
"MAIN": "MY DETAILS"
|
||||
|
||||
@ -152,6 +152,7 @@ app.constant('JS_REQUIRES', {
|
||||
'daybookCtrl': 'assets/js/controllers/daybookCtrl.js',
|
||||
'daybookadminCtrl': 'assets/js/controllers/daybookadminCtrl.js',
|
||||
'daybooksuperadminCtrl': 'assets/js/controllers/daybooksuperadminCtrl.js',
|
||||
'daybookapprovalCtrl': 'assets/js/controllers/daybookapprovalCtrl.js',
|
||||
|
||||
'studentStatusUpdateCtrl':'assets/js/controllers/studentStatusUpdateCtrl.js',
|
||||
'studentViewCtrl':'assets/js/controllers/studentViewCtrl.js',
|
||||
|
||||
@ -362,12 +362,27 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
|
||||
}
|
||||
}).state('app.daybook', {
|
||||
url: '/daybook',
|
||||
templateUrl: "assets/views/daybook/daybook.html",
|
||||
template: '<div ui-view class="fade-in-up"> <div style="margin: auto; width: 50%;padding: 10px;"> STUDENT STATUS UPDATE </div> </div>',
|
||||
title: 'daybook',
|
||||
resolve: loadSequence('spin', 'ladda', 'angular-ladda', 'daybookCtrl','ngTable'),
|
||||
ncyBreadcrumb: {
|
||||
label: 'daybook'
|
||||
}
|
||||
}).state('app.daybook.details', {
|
||||
url: '/daybookdetails',
|
||||
templateUrl: "assets/views/daybook/daybook.html",
|
||||
title: 'daybookdetails',
|
||||
resolve: loadSequence('spin', 'ladda', 'angular-ladda', 'daybookCtrl','ngTable'),
|
||||
ncyBreadcrumb: {
|
||||
label: 'daybookdetails'
|
||||
}
|
||||
}).state('app.daybook.approval', {
|
||||
url: '/daybookApproval',
|
||||
templateUrl: "assets/views/daybook/dayBookApproval.html",
|
||||
title: 'Day Book Approval',
|
||||
resolve: loadSequence('spin', 'ladda', 'angular-ladda', 'daybookapprovalCtrl','ngTable'),
|
||||
ncyBreadcrumb: {
|
||||
label: 'daybookApproval'
|
||||
}
|
||||
}).state('app.daybookadmin', {
|
||||
url: '/daybookadmin',
|
||||
templateUrl: "assets/views/daybook/daybookadmin.html",
|
||||
|
||||
@ -18,14 +18,15 @@ app.controller('daybookCtrl', ["$scope", "$rootScope", "toaster", "$filter", "ng
|
||||
$scope.init = function () {
|
||||
const LOCALTYPE = localDetail.localType;
|
||||
if(LOCALTYPE === 'R002') {
|
||||
$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.getDayBookList();
|
||||
$scope.getIncomeExpenseType_Status();
|
||||
$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.getDayBookList();
|
||||
$scope.getIncomeExpenseType_Status();
|
||||
|
||||
}else {
|
||||
ipCookie.remove('cookiechk');
|
||||
ipCookie.remove('cookiechk');
|
||||
$window.localStorage.clear();
|
||||
$state.go('login.signin');
|
||||
}
|
||||
@ -33,6 +34,40 @@ app.controller('daybookCtrl', ["$scope", "$rootScope", "toaster", "$filter", "ng
|
||||
|
||||
}
|
||||
|
||||
$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.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.getDayBookList();
|
||||
$scope.getIncomeExpenseType_Status();
|
||||
return true;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// $scope.getApproveLoad = function() {
|
||||
// alert();
|
||||
// }
|
||||
|
||||
// change from date, update and call search functionality
|
||||
$scope.changeDate = function () {
|
||||
if($scope.searchData.date !== undefined) {
|
||||
|
||||
@ -20,30 +20,69 @@ app.controller('daybookadminCtrl', ["$scope", "$rootScope", "toaster", "$filter"
|
||||
$scope.init = function () {
|
||||
const LOCALTYPE = localDetail.localType;
|
||||
if (LOCALTYPE === 'R003') {
|
||||
$scope.showTheRefValue = 'I001';
|
||||
$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();
|
||||
} else {
|
||||
ipCookie.remove('cookiechk');
|
||||
$window.localStorage.clear();
|
||||
$state.go('login.signin');
|
||||
// $scope.localTypeViewSuperAdmin = true;
|
||||
// $scope.showTheRefValue = 'I001';
|
||||
// $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();
|
||||
// getFinanceModuleAccess();
|
||||
// if(getFinanceModuleAccess()){
|
||||
$scope.dayBookApprovalAccess = localDetail.is_DayBookApproval_Access;
|
||||
$scope.showTheRefValue = 'I001';
|
||||
$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();
|
||||
// }
|
||||
} else {
|
||||
ipCookie.remove('cookiechk');
|
||||
$window.localStorage.clear();
|
||||
$state.go('login.signin');
|
||||
// $scope.localTypeViewSuperAdmin = true;
|
||||
// $scope.showTheRefValue = 'I001';
|
||||
// $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();
|
||||
}
|
||||
}
|
||||
|
||||
$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 = 'I001';
|
||||
$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) {
|
||||
@ -226,7 +265,7 @@ app.controller('daybookadminCtrl', ["$scope", "$rootScope", "toaster", "$filter"
|
||||
} else {
|
||||
var selectedItems = [];
|
||||
var ItemsSelected = $scope.searchResultDetails.filter(function (item) {
|
||||
if (item.Selected === true) {
|
||||
if (item.Selected === true && item.Status === 'Pending') {
|
||||
let itemGetID = new getUpdateDetails(item.ID);
|
||||
selectedItems.push(itemGetID);
|
||||
return true;
|
||||
@ -237,6 +276,7 @@ app.controller('daybookadminCtrl', ["$scope", "$rootScope", "toaster", "$filter"
|
||||
this.ListCodeStatus = $scope.myStatusModel.staus;
|
||||
this.comments = $scope.myStatusModel.description;
|
||||
}
|
||||
if(selectedItems.length > 0) {
|
||||
var updateStudyMaterial = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'updateDayBookStatusAdmin/',
|
||||
@ -259,6 +299,9 @@ app.controller('daybookadminCtrl', ["$scope", "$rootScope", "toaster", "$filter"
|
||||
swal("Failed!", response.data.message, "error");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
swal("Warning!", "Item not Selected", "warning");
|
||||
}
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
|
||||
589
Apollo/assets/js/controllers/daybookapprovalCtrl.js
Normal file
589
Apollo/assets/js/controllers/daybookapprovalCtrl.js
Normal file
@ -0,0 +1,589 @@
|
||||
'use strict';
|
||||
/**
|
||||
* daybook details capturing
|
||||
*
|
||||
*/
|
||||
app.controller('daybookapprovalCtrl', ["$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.localTypeViewAdmin = false;
|
||||
$scope.localTypeViewSuperAdmin = false;
|
||||
|
||||
$scope.searchData = {
|
||||
"date": "",
|
||||
"dateTo": ""
|
||||
}
|
||||
|
||||
// load functionality when page get loaded
|
||||
$scope.init = function () {
|
||||
const LOCALTYPE = localDetail.localType;
|
||||
if (LOCALTYPE === 'R002') {
|
||||
// getFinanceModuleAccess();
|
||||
// // if(getFinanceModuleAccess()){
|
||||
$scope.dayBookApprovalAccess = localDetail.is_DayBookApproval_Access;
|
||||
$scope.showTheRefValue = 'I001';
|
||||
$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();
|
||||
// }
|
||||
} else {
|
||||
ipCookie.remove('cookiechk');
|
||||
$window.localStorage.clear();
|
||||
$state.go('login.signin');
|
||||
// $scope.localTypeViewSuperAdmin = true;
|
||||
// $scope.showTheRefValue = 'I001';
|
||||
// $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();
|
||||
}
|
||||
}
|
||||
|
||||
$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 = 'I001';
|
||||
$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;
|
||||
let datas = response.data.dayBookListDetails;
|
||||
if (datas.length <= 0) {
|
||||
$scope.noRecordFoundSearch = true;
|
||||
} else {
|
||||
$scope.noRecordFoundSearch = false;
|
||||
}
|
||||
let searchResultDetailsBef = datas.filter(val => {
|
||||
return val.Name == 'I001' ? 1 : 0;
|
||||
});
|
||||
$scope.IncomeData = datas.filter(val => {
|
||||
return val.Name == 'I002' ? 1 : 0;
|
||||
});
|
||||
$scope.dataLengthIncome = $scope.IncomeData.length;
|
||||
const filterAddSelect = searchResultDetailsBef.filter(val => {
|
||||
val['Selected'] = false;
|
||||
return val;
|
||||
});
|
||||
$scope.searchResultDetails = filterAddSelect;
|
||||
$scope.dataLengthExpense = $scope.searchResultDetails.length;
|
||||
// alert(JSON.stringify($scope.searchResultDetails));
|
||||
$scope.searchResultLength = Object.keys($scope.searchResultDetails).length;
|
||||
// if ($scope.data.length !== 0) {
|
||||
// $scope.OpenWindowStatus = false;
|
||||
// $scope.noRecordFound = false;
|
||||
// } else {
|
||||
// $scope.OpenWindowStatus = false;
|
||||
// $scope.noRecordFound = true;
|
||||
// }
|
||||
// alert(JSON.stringify($scope.data));
|
||||
// $scope.incomeExpenseType = response.data.typeNameList;
|
||||
} else {
|
||||
$scope.loadingsearch = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// select all or individual functionality
|
||||
var getAllSelected = function () {
|
||||
var selectedItems = $scope.searchResultDetails.filter(function (item) {
|
||||
return item.Selected;
|
||||
});
|
||||
|
||||
return selectedItems.length === $scope.searchResultDetails.length;
|
||||
}
|
||||
|
||||
var setAllSelected = function (value) {
|
||||
angular.forEach($scope.searchResultDetails, function (item) {
|
||||
item.Selected = value;
|
||||
});
|
||||
}
|
||||
|
||||
$scope.allSelected = function (value) {
|
||||
if (value !== undefined) {
|
||||
return setAllSelected(value);
|
||||
} else {
|
||||
return getAllSelected();
|
||||
}
|
||||
}
|
||||
|
||||
$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; }
|
||||
});
|
||||
// $scope.getStatusList();
|
||||
// alert(ItemsSelected.length);
|
||||
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();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} 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) {
|
||||
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("Success!", response.data.message, "success");
|
||||
// for success state
|
||||
$scope.getDayBookList();
|
||||
$scope.allSelected('undefined');
|
||||
$scope.OpenWindowStatus = false;
|
||||
} else {
|
||||
swal("Failed!", response.data.message, "error");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
swal("Warning!", "Item not Selected", "warning");
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
form.$setPristine(true);
|
||||
$scope.myStatusModel = {
|
||||
'staus': '',
|
||||
'description': '',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$scope.statusList = [{
|
||||
"status_id": 'TS001',
|
||||
"name": "Pending",
|
||||
}, {
|
||||
"status_id": 'TS002',
|
||||
"name": "Approved",
|
||||
}, {
|
||||
"status_id": 'TS003',
|
||||
"name": "Rejected",
|
||||
}];
|
||||
|
||||
$scope.data = [{
|
||||
"id": 1,
|
||||
"date": "20-12-2017",
|
||||
"incomeExpense": "Income",
|
||||
"type": "typeIncome1",
|
||||
"amount": "1000",
|
||||
"status": "Pending",
|
||||
"description": "income type income type income type"
|
||||
}, {
|
||||
"id": 2,
|
||||
"date": "20-12-2017",
|
||||
"incomeExpense": "Expense",
|
||||
"type": "typeIncome2",
|
||||
"amount": "2000",
|
||||
"status": "Pending",
|
||||
"description": "income type income type income type"
|
||||
}, {
|
||||
"id": 3,
|
||||
"date": "20-12-2017",
|
||||
"incomeExpense": "Expense",
|
||||
"type": "typeIncome3",
|
||||
"amount": "3000",
|
||||
"status": "Pending",
|
||||
"description": "income type income type income type"
|
||||
}];
|
||||
|
||||
$scope.incomeExpenseType = [{
|
||||
"type_id": 1,
|
||||
"type": "Income",
|
||||
"name": "fees"
|
||||
}, {
|
||||
"type_id": 2,
|
||||
"type": "Expense",
|
||||
"name": "food"
|
||||
}, {
|
||||
"type_id": 3,
|
||||
"type": "Expense",
|
||||
"name": "phone"
|
||||
}, {
|
||||
"type_id": 4,
|
||||
"type": "Expense",
|
||||
"name": "tea-coffee"
|
||||
}, {
|
||||
"type_id": 5,
|
||||
"type": "Expense",
|
||||
"name": "Paper"
|
||||
}];
|
||||
|
||||
$scope.getIncomeExpense = function () {
|
||||
$scope.incomeExpenseName = [{
|
||||
"type_id": 1,
|
||||
"type": "TYPE001",
|
||||
"name": "Income"
|
||||
}, {
|
||||
"type_id": 2,
|
||||
"type": "TYPE002",
|
||||
"name": "Expense"
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
$scope.getIncomeTypes = $scope.incomeExpenseType.filter(function (val) {
|
||||
return val.type === 'Income' ? 1 : 0;
|
||||
});
|
||||
$scope.getExpenseTypes = $scope.incomeExpenseType.filter(function (val) {
|
||||
return val.type === 'Expense' ? 1 : 0;
|
||||
});
|
||||
|
||||
$scope.getType = function (type) {
|
||||
// alert(type);
|
||||
$scope.myModelAdd.type = '';
|
||||
$scope.getTypes = type === 'Income' ? $scope.getIncomeTypes : $scope.getExpenseTypes;
|
||||
};
|
||||
|
||||
$scope.editId = -1;
|
||||
$scope.setEditId = function (P) {
|
||||
// alert(id);
|
||||
$scope.editId = P;
|
||||
}
|
||||
|
||||
$scope.editClose = function () {
|
||||
$scope.editId = -1;
|
||||
$scope.myModel = {
|
||||
"id": "",
|
||||
"date": "",
|
||||
"incomeExpense": "",
|
||||
"type": "",
|
||||
"amount": "",
|
||||
"status": "",
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
|
||||
$scope.myModel = {
|
||||
"id": "",
|
||||
"date": "",
|
||||
"incomeExpense": "",
|
||||
"type": "",
|
||||
"amount": "",
|
||||
"status": "",
|
||||
"description": ""
|
||||
}
|
||||
|
||||
$scope.copyModel = function (p) {
|
||||
$scope.myModel = {
|
||||
"id": p.id,
|
||||
"date": p.date,
|
||||
"incomeExpense": p.incomeExpense,
|
||||
"type": p.type,
|
||||
"amount": p.amount,
|
||||
"status": p.status,
|
||||
"description": p.description
|
||||
}
|
||||
}
|
||||
|
||||
// delete the entry row from the daybook list
|
||||
$scope.deleEditEntry = function (id) {
|
||||
swal({
|
||||
title: "Are you sure?",
|
||||
text: "Your will not be able to recover this record!",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonClass: "btn-danger",
|
||||
confirmButtonText: "Yes, delete it!",
|
||||
closeOnConfirm: false
|
||||
},
|
||||
function () {
|
||||
$scope.indexDelete2();
|
||||
// if( $scope.indexDelete2() === true) {
|
||||
// $scope.data;
|
||||
// swal("Deleted!", "Your imaginary file has been deleted.", "success");
|
||||
// }
|
||||
});
|
||||
$scope.indexDelete2 = function () {
|
||||
let ans = $scope.data.some(function (val, i) {
|
||||
if (val.id === id) {
|
||||
$scope.data.splice(i, 1);
|
||||
swal("Deleted!", "Your record has been deleted.", "success");
|
||||
return true;
|
||||
}
|
||||
}); return ans;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$scope.myModelAdd = {
|
||||
"id": "",
|
||||
"date": "",
|
||||
"name": "",
|
||||
"type": "",
|
||||
"amount": "",
|
||||
"status": "",
|
||||
"description": ""
|
||||
}
|
||||
|
||||
// add a new entry to the day book list
|
||||
$scope.daybookAdd = {
|
||||
submit: function (form, myModelAdd) {
|
||||
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();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
var formate = "dd-MM-yyyy";
|
||||
$scope.myModelAdd.date = $filter('date')(new Date($scope.myModelAdd.date), formate);
|
||||
$scope.myModelAdd.status = 'Pending';
|
||||
$scope.data.push(myModelAdd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// update daybook entry data from the list
|
||||
$scope.daybookeditUpdate = {
|
||||
submit: function (form, myModel) {
|
||||
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();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
// var studentForUpdate = [];
|
||||
// let formate = "dd-MM-yyyy";
|
||||
// $scope.myStatusModel.dateOn = $filter('date')(new Date($scope.myStatusModel.dateOn), formate);
|
||||
// var ItemsSelected = $scope.searchResultDetails.filter(function (item) {
|
||||
// if (item.Selected === true) {
|
||||
// let getStudentID = new getStudentForUpdateDetails(item.StudentID);
|
||||
// studentForUpdate.push(getStudentID);
|
||||
// return true;
|
||||
// }
|
||||
// });
|
||||
// function getStudentForUpdateDetails(id) {
|
||||
// this.StudentID = id;
|
||||
// this.CourseID = $scope.myStatusModel.semYear;
|
||||
// this.BranchCode = localDetails.localBranchID;
|
||||
// this.ListCode = $scope.myStatusModel.staus;
|
||||
// this.SDate = $scope.myStatusModel.dateOn;
|
||||
// this.Coursedetail = id;
|
||||
// this.Comments = $scope.myStatusModel.comment;
|
||||
// }
|
||||
// // alert(JSON.stringify($scope.myStatusModel));
|
||||
// // alert(JSON.stringify(studentForUpdate));
|
||||
|
||||
// var updateStudyMaterial = {
|
||||
// method: 'POST',
|
||||
// url: apiPoint.url + 'updateStudentMaterialStatus/',
|
||||
// headers: {
|
||||
// 'Content-Type': 'application/json'
|
||||
// },
|
||||
// data: {
|
||||
// data: studentForUpdate,
|
||||
// requestDetails : localDetails
|
||||
// }
|
||||
// };
|
||||
// $http(updateStudyMaterial).then(function (response) {
|
||||
// if (response.data.addStatus) {
|
||||
// swal("Success!", response.data.message, "success");
|
||||
// // for success state
|
||||
// $scope.allSelected('undefined');
|
||||
// $scope.OpenWindowStatus = false;
|
||||
// } else {
|
||||
// swal("Failed!", response.data.message, "error");
|
||||
// }
|
||||
// });
|
||||
}
|
||||
},
|
||||
// reset: function (form) {
|
||||
// form.$setPristine(true);
|
||||
// $scope.myStatusModel = {
|
||||
// 'semYear': '',
|
||||
// 'staus': '',
|
||||
// 'dateOn': '',
|
||||
// 'comment': ''
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
}]);
|
||||
|
||||
|
||||
@ -45,6 +45,7 @@ app.controller('staffCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$
|
||||
'role': '',
|
||||
'jobResponsibility': '',
|
||||
'switchsetting': true,
|
||||
'finaceModuleAccess': false
|
||||
};
|
||||
var data = '';
|
||||
$scope.roleDetails = '';
|
||||
@ -199,6 +200,7 @@ app.controller('staffCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$
|
||||
$scope.empBranchDetails = {
|
||||
arr: $scope.branchArr,
|
||||
}
|
||||
response.data.role_details[0].FinanceModuleAccess = response.data.role_details[0].FinanceModuleAccess == 1 ? true : false;
|
||||
$scope.empRoleDetail = response.data.role_details[0];
|
||||
} else {
|
||||
}
|
||||
@ -395,6 +397,8 @@ app.controller('staffCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$
|
||||
$scope.myModel.dateofjoining = $filter('date')(new Date($scope.myModel.dateofjoining), formate);
|
||||
// alert($scope.myModel.dateofbirth)
|
||||
|
||||
// alert(JSON.stringify($scope.myModel));
|
||||
|
||||
var idProof = $scope.files[0];
|
||||
if (idProof !== undefined) {
|
||||
var formData = new FormData();
|
||||
@ -468,6 +472,7 @@ app.controller('staffCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$
|
||||
'role': '',
|
||||
'jobResponsibility': '',
|
||||
'switchsetting': true,
|
||||
'finaceModuleAccess': false
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -600,6 +605,7 @@ app.controller('staffCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$
|
||||
|
||||
$scope.updateEmpBranchDetails = function (form, empRole, empBranchs, p) {
|
||||
// alert(empBranchs.arr.length);
|
||||
// alert(JSON.stringify(empRole));
|
||||
if (empBranchs.arr.length >= 1) {
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
@ -632,7 +638,8 @@ app.controller('staffCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$
|
||||
'updateRole': empRole.ListCode,
|
||||
'JobResponsibility': empRole.JobResponsibility,
|
||||
'updateBranch': $scope.arr1,
|
||||
'updateBy': localDetails.localUserID
|
||||
'updateBy': localDetails.localUserID,
|
||||
'FinanceModuleAccess': empRole.FinanceModuleAccess
|
||||
}
|
||||
// p.IsActive = p.IsActive === true ? 1 : 0;
|
||||
var req = {
|
||||
|
||||
@ -59,6 +59,7 @@ app.controller('loginCtrl', ["$scope", "$http", "API_POINTS", "$state", '$rootSc
|
||||
"localUserID": $scope.responseData.ID,
|
||||
"localBranchID": $scope.responseData.BranchCode,
|
||||
'localType': $scope.responseData.ListCode,
|
||||
'is_DayBookApproval_Access': $scope.responseData.FinanceModuleAccess,
|
||||
'localOn': localDateTime,
|
||||
'status': 'active'
|
||||
}
|
||||
|
||||
@ -21,6 +21,7 @@ app.controller('sessionCtrl', ["$scope", "$localStorage", "$state", 'ipCookie',
|
||||
$scope.getLoginDash = 'Admin';
|
||||
} else if (localDetail.localType == 'R002') {
|
||||
$scope.getLoginDash = 'staff';
|
||||
$scope.is_active_DayBookAprlAccess = localDetail.is_DayBookApproval_Access;
|
||||
}
|
||||
else if (localDetail.localType == 'R001') {
|
||||
$scope.getLoginDash = 'student';
|
||||
|
||||
403
Apollo/assets/views/daybook/dayBookApproval.html
Normal file
403
Apollo/assets/views/daybook/dayBookApproval.html
Normal file
@ -0,0 +1,403 @@
|
||||
<!-- 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="daybookapprovalCtrl">
|
||||
<div ng-init="init()">
|
||||
<style>
|
||||
/*#wrapper {
|
||||
width: 200px;
|
||||
height: 110px;
|
||||
}*/
|
||||
|
||||
#containersPara {
|
||||
/*background-color: #fff;*/
|
||||
width: 160px;
|
||||
height: 85px;
|
||||
/*overflow-x: scroll;*/
|
||||
color: rgba(7, 21, 176, 0.7);
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
/*.square {
|
||||
background-color: #00b;
|
||||
float: left;
|
||||
height: 90px;
|
||||
width: 90px;
|
||||
margin: 5px;
|
||||
}*/
|
||||
</style>
|
||||
<div ng-if="localTypeViewAdmin">
|
||||
<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-3">
|
||||
<script>
|
||||
$(function () {
|
||||
$("#search").focus();
|
||||
});
|
||||
</script>
|
||||
<input class="form-control" type="text" ng-model="search" id="search" autofocus tabindex="1" placeholder="Search" /><br><br>
|
||||
</div>-->
|
||||
|
||||
<div class="col-md-4">
|
||||
<!--<pre>{{searchData.date}}</pre>-->
|
||||
<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">
|
||||
<!--<pre>{{searchData.date}}</pre>-->
|
||||
<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>
|
||||
<!--<pre>{{incomeExpenseName }}</pre>-->
|
||||
<select class="form-control" tabindex="2" class="cs-select cs-skin-elastic" name="addName" ng-model="showTheRefValue" ng-change="showTheResType(myModelAdd.name)"
|
||||
required>
|
||||
<option value="" disabled 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 class="row">
|
||||
<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(myModelAdd.name)"
|
||||
required>
|
||||
<option value="" disabled 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: 1200px;" 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
|
||||
<!--<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
|
||||
<!--<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>Comments
|
||||
<!--<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('amount')">Status
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='EmailID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</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}}
|
||||
</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}}"><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 ng-if="showTheRefValue == 'I001'">
|
||||
<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: 1200px;" class="table table-hover" ng-if="dataLengthExpense > 0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th ng-if="dayBookApprovalAccess == '1'">
|
||||
<input type="checkbox" ng-hide="allSelectedHide" ng-model="allSelected" ng-change="openUpdateWind()" ng-model-options="{getterSetter: true}"
|
||||
/>
|
||||
</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
|
||||
<!--<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
|
||||
<!--<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>Comments
|
||||
<!--<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|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10">
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label ng-if="dayBookApprovalAccess == '1' && p.Status == 'Pending'">
|
||||
<input type="checkbox" ng-model="p.Selected" ng-change="openUpdateWind()" />
|
||||
<!--{{p.StudentID}}-->
|
||||
</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}}
|
||||
</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">
|
||||
<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">Comments Should be Less than 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">
|
||||
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>
|
||||
</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>
|
||||
@ -135,7 +135,7 @@
|
||||
<td>{{p.PaidTo}}</td>
|
||||
<td>{{p.TypeName}}</td>
|
||||
<td>{{p.Amount}}</td>
|
||||
|
||||
|
||||
<!--<td class="center" tooltip="{{p.Approval_Comments}}" ng-if="p.ListName == 'Income'">
|
||||
- </td>-->
|
||||
<td class="center" tooltip="{{p.Approval_Comments}}"><span ng-if="p.Status == 'Pending'" style="text-transform: uppercase; text-shadow: 1px 1px #286d5f; color: #55d4bb ">{{p.Status}}</span>
|
||||
@ -368,6 +368,13 @@
|
||||
</form>
|
||||
</div>
|
||||
</tab>
|
||||
<!--<tab heading="Approve Income/Expense" id="addDayBook" ng-if="dayBookApprovalAccess == '1'">
|
||||
|
||||
<div ng-init="getApproveLoad()">
|
||||
</div>
|
||||
|
||||
|
||||
</tab>-->
|
||||
</tabset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -242,7 +242,8 @@
|
||||
<table style="width: 1200px;" class="table table-hover" ng-if="dataLengthExpense > 0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<th ng-if="dayBookApprovalAccess == '1'">
|
||||
|
||||
<input type="checkbox" ng-hide="allSelectedHide" ng-model="allSelected" ng-change="openUpdateWind()" ng-model-options="{getterSetter: true}"
|
||||
/>
|
||||
</th>
|
||||
@ -279,7 +280,7 @@
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label>
|
||||
<label ng-if="dayBookApprovalAccess == '1' && p.Status == 'Pending'">
|
||||
<input type="checkbox" ng-model="p.Selected" ng-change="openUpdateWind()" />
|
||||
<!--{{p.StudentID}}-->
|
||||
</label>
|
||||
@ -304,7 +305,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td tooltip="{{p.Approval_Comments}}"><span ng-if="p.Status == 'Pending'" style="text-transform: uppercase; text-shadow: 1px 1px #286d5f; color: #55d4bb ">{{p.Status}}</span>
|
||||
<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>
|
||||
|
||||
@ -316,7 +316,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td tooltip="{{p.Approval_Comments}}"><span ng-if="p.Status == 'Pending'" style="text-transform: uppercase; text-shadow: 1px 1px #286d5f; color: #55d4bb ">{{p.Status}}</span>
|
||||
<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>
|
||||
|
||||
@ -425,6 +425,24 @@
|
||||
<span class="text-small block">Job Responsibility Should be Less than 1000 Characters.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.financeModuleAccess.$dirty && Form.financeModuleAccess.$invalid, 'has-success':Form.financeModuleAccess.$valid && empRoleDetail.FinanceModuleAccess == true}">
|
||||
<label>
|
||||
Day Book Access <span ng-if="empRoleDetail.FinanceModuleAccess" class="symbol"></span>
|
||||
</label>
|
||||
<div class="checkbox clip-check check-primary">
|
||||
<input type="checkbox" id="checkbox6" name="financeModuleAccess" ng-model="empRoleDetail.FinanceModuleAccess">
|
||||
<label for="checkbox6">
|
||||
Day Book Approval Access
|
||||
</label>
|
||||
</div>
|
||||
<span ng-if="myModel.finaceModuleAccess" class="success text-small block"></span>
|
||||
<!--<div class="checkbox clip-check check-primary checkbox-inline">
|
||||
<input type="checkbox" id="checkbox16" name="financeModuleAccess" ng-model="myModel.finaceModuleAccess">
|
||||
</div>
|
||||
<spann ng-if="myModel.finaceModuleAccess" class="text-small block">Job Responsibility Should be Less than 1000 Characters.</span>-->
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label>
|
||||
|
||||
@ -212,7 +212,7 @@
|
||||
Email ID <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="email" tabindex="6" placeholder="Enter Email ID" class="form-control" name="emailId" ng-pattern="/^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$/i"
|
||||
ng-model="myModelEdit.EmailID" ng-blur='updateCheckEmailExist(p)' required>
|
||||
ng-model="myModelEdit.EmailID" ng-blur='updateCheckEmailExist(myModelEdit)' required>
|
||||
<span class="error text-small block" ng-if="Form.emailId.$dirty && Form.primaryEmail.$invalid" ng-hide="Form.emailId.$error.email">Email is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.emailId.$error.email">Please, enter a valid email address.</span>
|
||||
</div>
|
||||
@ -225,7 +225,7 @@
|
||||
class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" name="primaryPhone" tabindex="7" placeholder="Enter Mobile Number" class="form-control" ng-model="myModelEdit.MobileNumber"
|
||||
ng-minlength="10" ng-maxlength="12" ng-pattern="/^[0-9]*$/" ng-blur='updateCheckMobileExist(p)'
|
||||
ng-minlength="10" ng-maxlength="12" ng-pattern="/^[0-9]*$/" ng-blur='updateCheckMobileExist(myModelEdit)'
|
||||
required/>
|
||||
<span class="error text-small block" ng-if="Form.primaryPhone.$dirty && Form.primaryPhone.$invalid" ng-hide="Form.primaryPhone.$error.maxlength || Form.primaryPhone.$error.minlength || Form.primaryPhone.$error.pattern">Mobile Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.primaryPhone.$error.maxlength || Form.primaryPhone.$error.minlength || Form.primaryPhone.$error.pattern">Enter a Valid Phone Number</span>
|
||||
|
||||
@ -468,6 +468,22 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.financeModuleAccess.$dirty && Form.financeModuleAccess.$invalid, 'has-success':Form.financeModuleAccess.$valid && myModel.finaceModuleAccess == true}">
|
||||
<label>
|
||||
Day Book Access <span ng-if="myModel.finaceModuleAccess" class="symbol"></span>
|
||||
</label>
|
||||
<div class="checkbox clip-check check-primary">
|
||||
<input type="checkbox" id="checkbox6" name="financeModuleAccess" ng-model="myModel.finaceModuleAccess">
|
||||
<label for="checkbox6">
|
||||
Day Book Approval Access
|
||||
</label>
|
||||
</div>
|
||||
<span ng-if="myModel.finaceModuleAccess" class="success text-small block"></span>
|
||||
<!--<div class="checkbox clip-check check-primary checkbox-inline">
|
||||
<input type="checkbox" id="checkbox16" name="financeModuleAccess" ng-model="myModel.finaceModuleAccess">
|
||||
</div>
|
||||
<spann ng-if="myModel.finaceModuleAccess" class="text-small block">Job Responsibility Should be Less than 1000 Characters.</span>-->
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.jobResponsibility.$dirty && Form.jobResponsibility.$invalid}">
|
||||
<label>
|
||||
Job Responsibility
|
||||
|
||||
@ -538,18 +538,44 @@
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li ng-class="{'active open':$state.includes('app.daybook')}">
|
||||
<!--<li ng-class="{'active open':$state.includes('app.daybook')}">
|
||||
<a ui-sref="app.daybook">
|
||||
<div class="item-content">
|
||||
<div class="item-media">
|
||||
<i class="ti-check-box"></i>
|
||||
</div>
|
||||
<div class="item-inner">
|
||||
<span class="title" translate="sidebar.nav.daybook.MAIN">DAY BOOK</span>
|
||||
<span class="title" translate="sidebar.nav.daybook.MAIN">DAY BOOK </span><span>{{is_active_DayBookAprlAccess}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>-->
|
||||
|
||||
<li ng-class="{'active open':$state.includes('app.daybook')}">
|
||||
<a href="javascript:void(0)">
|
||||
<div class="item-content">
|
||||
<div class="item-media">
|
||||
<i class="ti-user"></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.daybook.details">
|
||||
<span class="title" translate="sidebar.nav.daybook.MAIN"> DAY BOOK</span>
|
||||
</a>
|
||||
</li>
|
||||
<li ui-sref-active="active" ng-if="is_active_DayBookAprlAccess == '1'">
|
||||
<a ui-sref="app.daybook.approval">
|
||||
<span class="title" translate="sidebar.nav.daybook.APPROVAL"> DAY BOOK</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li ng-class="{'active open':$state.includes('app.myprofile')}">
|
||||
<a ui-sref="app.myprofile">
|
||||
<div class="item-content">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user