This commit is contained in:
resicovenba 2017-11-28 20:21:56 +05:30
commit 90732920e5
12 changed files with 1287 additions and 60 deletions

View File

@ -0,0 +1,115 @@
<?php
/**
* Created by VisualCodeStudio.
* User: Subaram
* Date: 11/27/17
* Time: 12:55 PM
*/
class Batch_Controller extends REST_Controller {
function __construct()
{
// Construct the parent class
parent::__construct();
// Configure limits on our controller methods
// Ensure you have created the 'limits' table and enabled 'limits' within application/config/rest.php
$this->methods['addBatchDetails_get']['limit'] = 500; // 500 requests per hour per user/key
$this->methods['addBatchDetails_post']['limit'] = 100; // 100 requests per hour per user/key
$this->methods['addBatchDetails_delete']['limit'] = 50; // 50 requests per hour per user/key
$this->methods['getBatchDetails_post']['limit'] = 500; // 50 requests per hour per user/key
$this->methods['updateBatchDetails_post']['limit'] = 500;// 500 requests per hour per user/key
// load the model
$this->load->model('Batch_model', 'batch_model');
}
/*
* This method used to add batch details
* created by srk
* */
public function addBatchDetails_post()
{
$details['BatchCode'] = $this->post('batchcode');
$details['BatchName'] = $this->post('batcheName');
$details['UniversityID'] = $this->post('universityName');
$details['CreatedBy'] = $this->post('createdBy');
$details['IsActive'] = $this->post('status');
$batchDetails = $this->batch_model->addBatch($details);// Check if the users data store contains users (in case the database result returns NULL)
if ($batchDetails)
{
$batchDetails['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($batchDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'Something went wrong.please try again!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
}
/*
* get Batch details
* created by srk
* */
public function getBatchDetails_post()
{
$requestedBy = $this->post('requestedBy');
$getBatch = $this->batch_model->getBatch($requestedBy);
if ($getBatch)
{
$getBatch['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getBatch, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'No records found!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
}
/*
* update the batch details
* created by srk
* */
public function updateBatchDetails_post()
{
$details['BatchCode'] = $this->post('batchCode');
$details['BatchName'] = $this->post('batchName');
$details['IsActive'] = $this->post('status');
$details['UpdatedBy'] = $this->post('updatedBy');
$details['UpdatedOn'] = date("Y-m-d", time());
$updateDetails = $this->batch_model->updateBatch($details);// Check if the users data store contains users (in case the database result returns NULL)
if ($updateDetails)
{
$updateDetails['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($updateDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'Something went wrong.please try again!',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
}
}

View File

@ -31,13 +31,22 @@ class Course_Controller extends REST_Controller {
public function addCourseDetails_post()
{
$now = new DateTime();
$now->setTimezone(new DateTimezone('Asia/Kolkata'));
$details['CourseID'] = $this->post('courseID');
$details['CourseName'] = $this->post('courseName');
$details['UniversityID'] = $this->post('universityName');
$details['FeesType'] = $this->post('feesType');
$details['PC'] = $this->post('provFess');
$details['DC'] = $this->post('degreeAmount');
$details['TC'] = $this->post('transferAmount');
$details['MC'] = $this->post('migrationAmount');
$details['OtherFees'] = $this->post('otherAmount');
$details['CreatedBy'] = $this->post('createdBy');
$details['CreatedOn'] = $now->format('Y-m-d H:i:s');
$details['IsActive'] = $this->post('status');
$courseDetails = $this->course_model->addCourse($details);// Check if the users data store contains users (in case the database result returns NULL)
$jsonFeesData=$this->post('feesAmounts');
$courseDetails = $this->course_model->addCourse($details,$jsonFeesData);// Check if the users data store contains users (in case the database result returns NULL)
if ($courseDetails)
{
$courseDetails['status'] = REST_Controller::HTTP_OK;
@ -87,12 +96,20 @@ class Course_Controller extends REST_Controller {
* */
public function updateCourseDetails_post()
{
$now = new DateTime();
$now->setTimezone(new DateTimezone('Asia/Kolkata'));
$details['CourseID'] = $this->post('courseCode');
$details['CourseName'] = $this->post('courseName');
$details['IsActive'] = $this->post('status');
$details['PC'] = $this->post('provFess');
$details['DC'] = $this->post('degreeAmount');
$details['TC'] = $this->post('transferAmount');
$details['MC'] = $this->post('migrationAmount');
$details['OtherFees'] = $this->post('otherAmount');
$details['UpdatedBy'] = $this->post('updatedBy');
$details['UpdatedOn'] = date("Y-m-d", time());
$updateDetails = $this->course_model->updateCourse($details);// Check if the users data store contains users (in case the database result returns NULL)
$details['UpdatedOn'] = $now->format('Y-m-d H:i:s');
$jsonFeesData=$this->post('feesAmounts');
$updateDetails = $this->course_model->updateCourse($details,$jsonFeesData);// Check if the users data store contains users (in case the database result returns NULL)
if ($updateDetails)
{
$updateDetails['status'] = REST_Controller::HTTP_OK;

View File

@ -0,0 +1,111 @@
<?php
/**
* Created by Visual Code studio
* User: Subaram
* Date: 11/26/17
* Time: 10:05 PM
*/
defined('BASEPATH') OR exit('No direct script access allowed');
class Batch_model extends CI_Model {
/*
* Add batch details
* created by subaram
* */
public function addBatch($arrayDetails=null)
{
$this->db->select('BatchCode');
$this->db->where('BatchCode', $arrayDetails['BatchCode']);
if($this->db->get(T_BATCHMASTER)->first_row()){
$result['batchStatus'] = false;
$result['message'] = "This batch Code is already exist!";
} else {
$this->db->insert(T_BATCHMASTER, $arrayDetails);
if ($this->db->affected_rows() == '1') {
$result['batchStatus'] = true;
$result['message'] = "Successfully Batch details added";
} else {
$result['batchStatus'] = false;
$result['message'] = "Something went wrong.please try again";
}
}
return $result;
}
/*
* Get batch details
* parama id
* created by srk
* */
public function getBatch()
{
$this->db->select('CU.BatchCode,CU.BatchName,CU.IsActive,US.UniversityID,US.UniversityName');
$this->db->from(T_BATCHMASTER.' as CU');
$this->db->join(UNIVERSITY.' as US', 'US.UniversityID = CU.UniversityID');
$this->db->order_by('CU.CreatedOn','DESC');
$batchDetails = $this->db->get();
if($batchDetails->result()){
$result['batchStatus'] = true;
$result['details'] = $batchDetails->result();
}
else {
$result['batchStatus'] = false;
$result['message'] = "No records found!";
}
$result['universityDetails'] = $this->getUniversityDetails();
return $result;
}
/*
* update batch details
* created by Srk
* */
public function updateBatch($arrayDetails=null)
{
$this->db->where('BatchCode',$arrayDetails['BatchCode']);
$upateStatus=$this->db->update(T_BATCHMASTER, $arrayDetails);
if($upateStatus){
$result['batchStatus'] = true;
$result['message'] = "Successfully Batch details updated";
}
else {
$result['batchStatus'] = false;
$result['message'] = "Something went wrong.please try again";
}
return $result;
}
/*
* Get university details
* created by Srk
* */
public function getUniversityDetails()//doubt
{
$this->db->select('UniversityID,UniversityName');
$this->db->order_by('UniversityID','ASC');
$this->db->order_by('IsActive','1');
$universityDetails = $this->db->get(UNIVERSITY);
return $universityDetails->result();
}
}

View File

@ -15,7 +15,7 @@ class Course_model extends CI_Model {
* created by kms
* */
public function addCourse($arrayDetails=null)
public function addCourse($arrayDetails=null,$jsonData=null)
{
$this->db->select('CourseID');
@ -26,9 +26,30 @@ class Course_model extends CI_Model {
} else {
$this->db->insert(COURSE, $arrayDetails);
if ($this->db->affected_rows() == '1') {
if($jsonData){
foreach($jsonData as $row){
$insertFeesArray['CourseID'] =$arrayDetails['CourseID'];
$insertFeesArray['ProgramType'] =$row['program'];
$insertFeesArray['FeesType'] =$arrayDetails['FeesType'];
$insertFeesArray['FeesAmount'] =$row['FeesAmount'];
$insertFeesArray['Sem_Year'] =$row['FeesName'];
$insertFeesArray['UpdatedOn'] =$arrayDetails['CreatedOn'];
$insertFeesArray['UpdatedBy'] =$arrayDetails['CreatedBy'];
$this->db->insert(COURSE_FEES, $insertFeesArray);
}
$result['courseStatus'] = true;
$result['message'] = "Successfully course details added";
}
else{
$this -> db -> where('CourseID', $arrayDetails['CourseID']);
$this -> db -> delete('COURSE');
$result['courseStatus'] = false;
$result['message'] = "Something went wrong.please try again";
}
$result['courseStatus'] = true;
$result['message'] = "Successfully course details added";
} else {
$result['courseStatus'] = false;
$result['message'] = "Something went wrong.please try again";
@ -47,7 +68,7 @@ class Course_model extends CI_Model {
public function getCourse()
{
$this->db->select('CU.CourseID,CU.CourseName,CU.IsActive,US.UniversityID,US.UniversityName');
$this->db->select('CU.CourseID,CU.CourseName,CU.FeesType,CU.PC,CU.DC,CU.TC,CU.MC,CU.OtherFees,CU.IsActive,US.UniversityID,US.UniversityName');
$this->db->from(COURSE.' as CU');
$this->db->join(UNIVERSITY.' as US', 'US.UniversityID = CU.UniversityID');
$this->db->order_by('CourseID','DESC');
@ -56,7 +77,23 @@ class Course_model extends CI_Model {
if($courseDetails->result()){
$result['courseStatus'] = true;
$result['details'] = $courseDetails->result();
foreach ($courseDetails->result() as $row){
$fetchData['CourseID']=$row->CourseID;
$fetchData['CourseName']=$row->CourseName;
$fetchData['FeesType']=$row->FeesType;
$fetchData['PC']=$row->PC;
$fetchData['DC']=$row->DC;
$fetchData['TC']=$row->TC;
$fetchData['MC']=$row->MC;
$fetchData['OtherFees']=$row->OtherFees;
$fetchData['IsActive']=$row->IsActive;
$fetchData['UniversityID']=$row->UniversityID;
$fetchData['UniversityName']=$row->UniversityName;
$fetchData['feesStructures'] = $this->getCourseFeesDetails($row->CourseID);
$storeCourseArray[]=$fetchData;
}
$result['details'] = $storeCourseArray;
}
else {
$result['courseStatus'] = false;
@ -64,6 +101,7 @@ class Course_model extends CI_Model {
}
$result['universityDetails'] = $this->getUniversityDetails();
$result['feesDetails'] = $this->getFeesDetails();
return $result;
@ -73,14 +111,29 @@ class Course_model extends CI_Model {
* update course details
* created by kms
* */
public function updateCourse($arrayDetails=null)
public function updateCourse($arrayDetails=null,$jsonData=null)
{
$this->db->where('CourseID',$arrayDetails['CourseID']);
$upateStatus=$this->db->update(COURSE, $arrayDetails);
if($upateStatus){
if($upateStatus) {
$result['courseStatus'] = true;
$result['message'] = "Successfully course details updated";
if ($jsonData) {
foreach ($jsonData as $row) {
$updateFeesArray['ID'] = $row['ID'];
$updateFeesArray['CourseID'] = $arrayDetails['CourseID'];
// $insertFeesArray['ProgramType'] =$row['program'];
//$insertFeesArray['FeesType'] =$arrayDetails['FeesType'];
$updateFeesArray['FeesAmount'] = $row['FeesAmount'];
$updateFeesArray['Sem_Year'] = $row['Sem_Year'];
$updateFeesArray['UpdatedOn'] = $arrayDetails['UpdatedOn'];
$updateFeesArray['UpdatedBy'] = $arrayDetails['UpdatedBy'];
$this->db->where('ID', $updateFeesArray['ID']);
$this->db->update(COURSE_FEES, $updateFeesArray);
}
$result['courseStatus'] = true;
$result['message'] = "Successfully course details updated";
}
}
else {
@ -101,10 +154,75 @@ class Course_model extends CI_Model {
{
$this->db->select('UniversityID,UniversityName');
$this->db->order_by('UniversityID','ASC');
$this->db->order_by('IsActive','1');
$this->db->where('IsActive','1');
$universityDetails = $this->db->get(UNIVERSITY);
return $universityDetails->result();
}
/*
* get fees details
* created by kms
* */
public function getFeesDetails()
{
$this->db->select('ListCode,ListName');
$this->db->order_by('ListCode','ASC');
$this->db->where('IsActive','1');
$this->db->where('ListGroup','3');
$feesDetails = $this->db->get(PICK_LIST_DETAILS);
if($feesDetails){
$result_fees = array();
foreach ($feesDetails->result() as $row)
{
$list_array['ListCode'] = $row->ListCode;
$list_array['ListName'] = $row->ListName;
if($row->ListCode=='F001'){
$list_array['programType']=$this->getFeesProgram('4');
}
else if($row->ListCode=='F002'){
$list_array['programType']=$this->getFeesProgram('5');
}
else{
$list_array['programType']="";
}
$result_fees[]=$list_array;
}
}
else{
$result_fees[]="";
}
return $result_fees;
}
/*
* get fees type
* created by kms
* */
public function getFeesProgram($programType=null)
{
$this->db->select('ListCode,ListName');
$this->db->order_by('ListCode','ASC');
$this->db->where('IsActive','1');
$this->db->where('ListGroup',$programType);
$feesDetails = $this->db->get(PICK_LIST_DETAILS);
return $feesDetails->result();
}
/*
* get course fees details
* created by kms
* */
public function getCourseFeesDetails($courseID=null){
$this->db->select('ID,CourseID,ProgramType,FeesAmount,Sem_Year,PLD.ListName as programName');
$this->db->order_by('ID','ASC');
$this->db->where('CourseID',$courseID);
$this->db->from(COURSE_FEES.' as CF');
$this->db->join(PICK_LIST_DETAILS.' as PLD', 'PLD.ListCode = CF.ProgramType');
$feesDetails = $this->db->get();
return $feesDetails->result();
}

View File

@ -95,6 +95,10 @@ app.constant('JS_REQUIRES', {
Student
* */
'studentCtrl': 'assets/js/controllers/studentCtrl.js',
/*
* batch
* */
'batchCtrl': 'assets/js/controllers/batchCtrl.js',
/*

View File

@ -107,8 +107,9 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
}
}).state('app.master.batch', {
url: '/batch',
templateUrl: "assets/views/ui_links.html",
templateUrl: "assets/views/batch.html",
title: 'Batch',
resolve: loadSequence('spin', 'ladda', 'angular-ladda', 'batchCtrl','ngTable'),
ncyBreadcrumb: {
label: 'Batch'
}

View File

@ -0,0 +1,208 @@
'use strict';
/**
* controllers for ng-table
* Simple table with sorting and filtering on AngularJS
*/
app.controller('batchCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", function ($scope,$rootScope,toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state) {
$scope.myModel = {
"batchCode": "",
"batchName": "",
"universityName":"",
"switchsetting": true
};
/*
* edit batch details
* created by subaram
* */
$scope.editId = -1;
$scope.setEditId = function (pid) {
$scope.editId = pid;
$scope.viewId = -1;
};
/*
* cancel edit div
* created by subaram
* */
$scope.cancel = function () {
$scope.init();
$scope.editId = -1;
};
// sorting function for table params
$scope.sort = function(keyname){
$scope.sortKey = keyname; //set the sortKey to the param passed
$scope.reverse = !$scope.reverse; //if true make it false and vice versa
}
/*
* Submit,update and reset batch details
* @params myModel
* created by subaram
* */
$scope.batchForm = {
submit: function (form, myModel,loading) {
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 {
$scope.ldloading1 = {};
$scope.ldloading1[loading.replace('-', '_')] = true;
var addBatch = {
method: 'POST',
url: apiPoint.url + 'addBatchDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
batchcode: myModel.batchCode,
batcheName: myModel.batchName,
universityName: myModel.universityName,
status: myModel.switchsetting,
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID
}
};
$http(addBatch).then(function (response) {
if (response.data.status==200 && response.data.batchStatus) {
$scope.ldloading1[loading.replace('-', '_')] = false;
swal("Success!", response.data.message, "success");
$state.go($state.current, {}, {reload: true});
} else {
$scope.ldloading1[loading.replace('-', '_')] = false;
swal("Failed!", response.data.message, "error");
}
});
}
},
reset: function (form) {
$scope.myModel = angular.copy($scope.master);
form.$setPristine(true);
}
};
/*
* update the batch details
* created by subaram
* */
$scope.updateBatch = function (myModel, form, loading) {
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].$stop_name;
}
if (form[field].$pristine) {
form[field].$dirty = true;
}
}
}
angular.element('.ng-invalid[name=' + firstError + ']').focus();
} else {
$scope.ldloading = {};
$scope.ldloading[loading.replace('-', '_')] = true;
var update = {
method: 'POST',
url: apiPoint.url + 'updateBatchDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
batchCode: myModel.BatchCode,
batchName: myModel.BatchName,
status: myModel.IsActive,
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID
}
};
$http(update).then(function (response) {
if (response.data.status==200 && response.data.batchStatus) {
$scope.ldloading[loading.replace('-', '_')] = false;
$scope.editId = -1;
$scope.init();
swal("Success!", response.data.message, "success");
} else {
$scope.ldloading[loading.replace('-', '_')] = false;
swal("Failed!", response.data.message, "error");
}
});
}
};
/*
*get Batch details when page loading called from view file
*
* created by Srk
* */
$scope.loader='';
$scope.emptyData='';
$rootScope.init = function () {
var getBranch = {
method: 'POST',
url: apiPoint.url + 'getBatchDetails/',
headers: {
'Content-Type': 'application/json'
},
data: {
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
}
};
$http(getBranch).then(function (response) {
if (response.data.status==200 && response.data.batchStatus) {
$scope.emptyData=true;
$scope.loader=true;
$scope.data = response.data.details;
$scope.university=response.data.universityDetails;
} else {
$scope.emptyData=false;
$scope.loader=false;
$scope.university=response.data.universityDetails;
}
});
};
}]);

View File

@ -9,18 +9,37 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
"courseCode": "",
"courseName": "",
"universityName":"",
"switchsetting": true
"switchsetting": true,
"ListName": "",
"programListName":"",
"semYear":"",
"feesAmount":"",
"provFess":"",
"transferAmount":"",
"degreeAmount":"",
"migrationAmount":"",
"otherAmount":""
};
$rootScope.myModel1 = {
"ListName": "",
"programListName":""
};
/*
* edit branch details
* edit course details
* created by kms
* */
$scope.editId = -1;
$scope.setEditId = function (pid) {
$rootScope.setEditId = function (pid,p) {
// find index for fees type drop down list
for(var i in $scope.feesDetails) {
if($scope.feesDetails[i].ListCode==p.FeesType){
$rootScope.myModel1.ListName=$scope.feesDetails[i];
}
}
$scope.editId = pid;
$scope.viewId = -1;
};
/*
@ -28,7 +47,7 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
* created by kms
* */
$scope.cancel = function () {
$scope.init();
$rootScope.init();
$scope.editId = -1;
};
@ -45,7 +64,8 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
* created by kms
* */
$scope.courseForm = {
submit: function (form, myModel,loading) {
submit: function (form, myModel,loading,addMoreItems) {
var firstError = null;
if (form.$invalid) {
var field = null, firstError = null;
@ -62,6 +82,27 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
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 {
if(myModel.programListName=='P001'){
$scope.addMoreItems.push({
program: myModel.programListName,
FeesName: 'Regular',
FeesAmount: myModel.feesAmount
});
}
else if(myModel.programListName=='P002'){
$scope.addMoreItems.push({
program: myModel.programListName,
FeesName: 'Lateral Entry',
FeesAmount: myModel.feesAmount
});
}
else if(myModel.programListName=='Y001'){
$scope.addMoreItems.push({
program: myModel.programListName,
FeesName: myModel.semYear,
FeesAmount: myModel.feesAmount
});
}
$scope.ldloading1 = {};
@ -76,9 +117,16 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
},
data: {
courseID: myModel.courseCode,
courseName: myModel.courseName,
courseName: myModel.courseName,
universityName: myModel.universityName,
feesType:myModel.ListName.ListCode,
status: myModel.switchsetting,
provFess:myModel.provFess,
transferAmount:myModel.transferAmount,
degreeAmount:myModel.degreeAmount,
migrationAmount:myModel.migrationAmount,
otherAmount:myModel.otherAmount,
feesAmounts:$scope.addMoreItems,
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID
}
};
@ -97,7 +145,9 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
}
},
reset: function (form) {
$scope.addMoreItems = [];
$scope.myModel.ListName=$scope.feesDetails[0];
$scope.myModel.programListName=$scope.myModel.ListName.programType[0].ListCode;
$scope.myModel = angular.copy($scope.master);
form.$setPristine(true);
}
@ -107,7 +157,7 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
* created by kms
* */
$scope.updateCourse = function (myModel, form, loading) {
console.log(form);
var firstError = null;
if (form.$invalid) {
var field = null, firstError = null;
@ -138,8 +188,14 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
data: {
courseCode: myModel.CourseID,
courseName: myModel.CourseName,
provFess:myModel.PC,
transferAmount:myModel.TC,
degreeAmount:myModel.DC,
migrationAmount:myModel.MC,
otherAmount:myModel.OtherFees,
feesAmounts:myModel.feesStructures,
status: myModel.IsActive,
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
}
};
$http(update).then(function (response) {
@ -147,7 +203,7 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
$scope.ldloading[loading.replace('-', '_')] = false;
swal("Success!", response.data.message, "success");
$scope.editId = -1;
$scope.init();
$rootScope.init();
} else {
$scope.ldloading[loading.replace('-', '_')] = false;
@ -166,7 +222,7 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
$scope.emptyData='';
$rootScope.init = function () {
$scope.loader='';
var getBranch = {
method: 'POST',
url: apiPoint.url + 'getCourseDetails/',
@ -184,7 +240,9 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
$scope.data = response.data.details;
$scope.university=response.data.universityDetails;
$scope.feesDetails=response.data.feesDetails;
$scope.myModel.ListName=$scope.feesDetails[0];
$scope.myModel.programListName=$scope.myModel.ListName.programType[0].ListCode;
} else {
@ -196,6 +254,51 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
});
};
/*
* get fees type drop down
* created by kms
* */
$scope.getFeesProgram = function () {
$scope.myModel.programListName=$scope.myModel.ListName.programType[0].ListCode;
$scope.addMoreItems = [];
}
/*
* get add more fees item array
* created by kms
* */
$scope.addMoreItems = [];
$rootScope.addMoreFeesItems = function (model,form) {
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].$stop_name;
}
if (form[field].$pristine) {
form[field].$dirty = true;
}
}
}
angular.element('.ng-invalid[name=' + firstError + ']').focus();
} else {
$scope.addMoreItems.push({
program: model.programListName,
FeesName: model.semYear,
FeesAmount: model.feesAmount
});
$scope.myModel.semYear="";
$scope.myModel.feesAmount="";
}
}

View File

@ -0,0 +1,229 @@
<style>
b.fa {
display: inline-block;
border-radius: 60px;
box-shadow: 0px 0px 2px #007AFF;
padding: 0.5em 0.6em;
}
</style>
<!-- start: PAGE TITLE -->
<section id="page-title">
<div class="row">
<div class="col-sm-8">
<h1 class="mainTitle" translate="Add/View Batch Details"></h1>
<!--
<span class="mainDescription">Over a dozen reusable components built to provide popovers, media objects, navigation, tooltips and much more. </span>
-->
</div>
<div ncy-breadcrumb></div>
</div>
</section>
<!-- end: PAGE TITLE -->
<!-- start: LIST GROUP -->
<div class="container-fluid container-fullw bg-white">
<div class="row" ng-controller="batchCtrl" data-ng-init="init()">
<tabset class="tabbable">
<tab heading="View Batch" id="viewbatch">
<div class="container-fluid container-fullw">
<div class="row">
<div ng-if="loader == ''" class="col-md-12" align="center">
<!--<img src="assets/images/ajax_loader_blue.gif" style="width: 5%; height: 30%">-->
<spinner name="html5spinner"> <div class="overlay"></div> <div class="spinner"> <div class="double-bounce1"></div> <div class="double-bounce2"></div> </div> <div class="please-wait">Please Wait...</div>
</spinner>
</div>
<div class="col-md-12" ng-if="emptyData == false && loader != ''" style="min-height: 281px;">
<p style="color: red;" align="center"><strong><h3 class="text-center">oops! No
records found... </h3></strong></p>
</div>
<div class="col-md-12" ng-if="emptyData == true">
<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>
<div class="table-responsive">
<fieldset>
<table class="table table-hover">
<thead>
<tr>
<th ng-click="sort('BatchCode')">Batch Code
<span class="glyphicon sort-icon" ng-show="sortKey=='BatchCode'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th ng-click="sort('BatchName')">Batch Name
<span class="glyphicon sort-icon" ng-show="sortKey=='BatchName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th ng-click="sort('UniversityName')">University Name
<span class="glyphicon sort-icon" ng-show="sortKey=='UniversityName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th> Action</th>
</tr>
</thead>
<tbody dir-paginate="p in data|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10">
<!-- <pre>p|json</pre> -->
<tr>
<td>{{p.BatchCode}}</td>
<td>{{p.BatchName}}</td>
<td>{{p.UniversityName}}</td>
<td>
<a href="#" class="text-azure" id="editRowBtn{{p.BatchCode}}" ng-click="setEditId(p.BatchCode);"><b class="fa fa-hover fa-pencil " aria-hidden="true"></b>
</a>
</td>
</tr>
<tr ng-show="editId === p.BatchCode" ng-if="editId === p.BatchCode" >
<td colspan="6" ng-include src="'assets/views/editBatchDetails.html'"></td>
</tr>
</tbody>
</table>
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
</dir-pagination-controls>
</fieldset>
</div>
</div>
</div>
</div>
<!--
view tab end
-->
</tab>
<script>
$('#addbatch').click(function () {
$('#batch').focus();
});
</script>
<tab heading="Add Batch" id="addbatch">
<div>
<form name="Form" id="form" novalidate ng-submit="batchForm.submit(Form, myModel, 'zoom-in')" method="post">
<div class="row">
<div class="col-md-12">
<fieldset>
<legend>
Add New Batch Details
</legend>
<div class="row">
<div class="col-md-3 form-group"
ng-class="{'has-error':Form.batchCode.$dirty && Form.batchCode.$invalid, 'has-success':Form.batchCode.$valid}">
<label>
Batch Code <span class="symbol required"></span>
</label>
<input type="text" placeholder="Enter Batch Code"
tabindex="1" class="form-control" name="batchCode"
ng-model="myModel.batchCode" ng-pattern="/^[a-zA-Z0-9\s]*$/" required/>
<span class="error text-small block"
ng-if="Form.batchCode.$dirty && Form.batchCode.$error.required">Batch code is required</span>
<span class="error text-small block"
ng-if="Form.batchCode.$dirty && Form.batchCode.$error.pattern">Invalid course id </span>
</div>
<div class="col-md-3 form-group"
ng-class="{'has-error':Form.batchName.$dirty && Form.batchName.$invalid, 'has-success':Form.batchName.$valid}">
<label>
Batch Name <span class="symbol required"></span>
</label>
<input type="text" placeholder="Enter Batch Name"
tabindex="2" class="form-control" name="batchName"
ng-model="myModel.batchName" ng-pattern="" required/>
<span class="error text-small block"
ng-if="Form.batchName.$dirty && Form.batchName.$error.required">Batch name is required</span>
<span class="error text-small block"
ng-if="Form.batchName.$dirty && Form.batchName.$error.pattern">Invalid batch name </span>
<!--<span class="success text-small"-->
<!--ng-if="Form.stopname.$valid">Thank You!</span>-->
</div>
<div class="col-md-3 form-group"
ng-class="{'has-error':Form.university.$dirty && Form.university.$invalid, 'has-success':Form.university.$valid}">
<label>
University <span class="symbol required"></span>
</label>
<select class="form-control" name="university" tabindex="3" id="university"
ng-model="myModel.universityName"
ng-options="details.UniversityID as details.UniversityName for details in university"
required>
<option value=""> Select University</option>
</select>
<span class="error text-small block"
ng-if="Form.university.$dirty && Form.university.$invalid">University is required</span>
<!--<span class="success text-small" ng-if="Form.university.$valid">Thank You!</span>-->
</div>
<div class="col-md-3">
<label>
Active/De-Active
</label>
<div ng-switch="myModel.switchsetting">
<div ng-switch-when="true">
<switch ng-model="myModel.switchsetting" ng-init="myModel.switchsetting = true" class="green"></switch>
</div>
<div ng-switch-when="false">
<switch ng-model="myModel.switchsetting" ng-init="myModel.switchsetting = false" class="green"></switch>
</div>
<div ng-switch-default>
<switch ng-model="myModel.switchsetting" ng-init="myModel.switchsetting = true" class="green"></switch>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="pull-right">
<button type="submit" ladda="ldloading1.zoom_in" tabindex="9" class="btn btn-wide btn-success" data-style="zoom-in">
Submit
</button>
<button type="reset" class="btn btn-warning btn-wide" tabindex="10"
ng-click="batchForm.reset(Form)">
Reset
</button>
</div>
</div>
</fieldset>
</div>
</div>
</form>
</div>
</tab>
</tabset>
</div>
</div>
<!-- end: LIST GROUP -->

View File

@ -82,7 +82,7 @@
<td>{{p.UniversityName}}</td>
<td>
<a href="#" class="text-azure" id="editRowBtn{{p.CourseID}}" ng-click="setEditId(p.CourseID);"><b class="fa fa-hover fa-pencil " aria-hidden="true"></b>
<a href="#" class="text-azure" id="editRowBtn{{p.CourseID}}" ng-click="setEditId(p.CourseID,p);"><b class="fa fa-hover fa-pencil " aria-hidden="true"></b>
</a>
</td>
@ -93,8 +93,8 @@
</tr>
<tr ng-show="editId === p.CourseID" ng-if="editId === p.CourseID" style="width: ">
<td colspan="6" ng-include
<tr ng-show="editId === p.CourseID" ng-if="editId === p.CourseID">
<td colspan="12" ng-include
src="'assets/views/editCourseDetails.html'"></td>
</tr>
</tbody>
@ -124,7 +124,7 @@
<tab heading="Add Course" id="addcourse">
<div>
<form name="Form" id="form" novalidate ng-submit="courseForm.submit(Form, myModel, 'zoom-in')" method="post">
<form name="Form" id="form" novalidate ng-submit="courseForm.submit(Form, myModel, 'zoom-in',addMoreItems)" method="post">
<div class="row">
<div class="col-md-12">
@ -134,6 +134,21 @@
</legend>
<div class="row">
<div class="col-md-3 form-group"
ng-class="{'has-error':Form.university.$dirty && Form.university.$invalid, 'has-success':Form.university.$valid}">
<label>
University <span class="symbol required"></span>
</label>
<select class="form-control" name="university" tabindex="1" id="university"
ng-model="myModel.universityName"
ng-options="details.UniversityID as details.UniversityName for details in university"
required>
<option value=""> Select University</option>
</select>
<span class="error text-small block"
ng-if="Form.university.$dirty && Form.university.$invalid">University is required</span>
<!--<span class="success text-small" ng-if="Form.university.$valid">Thank You!</span>-->
</div>
<div class="col-md-3 form-group"
ng-class="{'has-error':Form.coursecode.$dirty && Form.coursecode.$invalid, 'has-success':Form.coursecode.$valid}">
<label>
@ -141,7 +156,7 @@
</label>
<input type="text" placeholder="Enter Course ID"
tabindex="1" class="form-control" name="coursecode"
tabindex="2" class="form-control" name="coursecode"
ng-model="myModel.courseCode" ng-pattern="/^[a-zA-Z0-9\s]*$/" required/>
<span class="error text-small block"
ng-if="Form.coursecode.$dirty && Form.coursecode.$error.required">Course id is required</span>
@ -158,7 +173,7 @@
</label>
<input type="text" placeholder="Enter Course Name"
tabindex="2" class="form-control" name="coursename"
tabindex="3" class="form-control" name="coursename"
ng-model="myModel.courseName" ng-pattern="/^[a-zA-Z-./\s]*$/" required/>
<span class="error text-small block"
ng-if="Form.coursename.$dirty && Form.coursename.$error.required">Course name is required</span>
@ -167,23 +182,194 @@
<!--<span class="success text-small"-->
<!--ng-if="Form.stopname.$valid">Thank You!</span>-->
</div>
<div class="col-md-3 form-group"
ng-class="{'has-error':Form.university.$dirty && Form.university.$invalid, 'has-success':Form.university.$valid}">
ng-class="{'has-error':Form.fees.$dirty && Form.fees.$invalid, 'has-success':Form.fees.$valid}">
<label>
University <span class="symbol required"></span>
Fees <span class="symbol required"></span>
</label>
<select class="form-control" name="university" tabindex="3" id="university"
ng-model="myModel.universityName"
ng-options="details.UniversityID as details.UniversityName for details in university"
<select class="form-control" name="fees" tabindex="4" id="fees"
ng-model="myModel.ListName"
ng-options="feesList.ListName for feesList in feesDetails" ng-change="getFeesProgram();"
required>
<option value=""> Select University</option>
<!-- <option value=""> Select Fees</option>-->
</select>
<span class="error text-small block"
ng-if="Form.university.$dirty && Form.university.$invalid">University is required</span>
<!--<span class="success text-small" ng-if="Form.university.$valid">Thank You!</span>-->
ng-if="Form.fees.$dirty && Form.fees.$invalid">Fees is required</span>
<!--<span class="success text-small" ng-if="Form.fees.$valid">Thank You!</span>-->
</div>
<div class="col-md-3">
</div>
<div class="col-md-6">
<fieldset>
<div class="row">
<div class="col-md-12 form-group"
ng-class="{'has-error':Form.fees.$dirty && Form.fees.$invalid, 'has-success':Form.fees.$valid}">
<label>
Program <span class="symbol required"></span>
</label>
<select class="form-control" name="program" tabindex="5" id="program"
ng-model="myModel.programListName"
ng-options="program.ListCode as program.ListName for program in myModel.ListName.programType"
required>
<!-- <option value=""> Select Program</option>-->
</select>
<span class="error text-small block"
ng-if="Form.program.$dirty && Form.program.$invalid">Program is required</span>
<!--<span class="success text-small" ng-if="Form.fees.$valid">Thank You!</span>-->
</div>
<div class="col-md-6 form-group" ng-if="myModel.programListName=='Y001'"
ng-class="{'has-error':Form.sem_year.$dirty && Form.sem_year.$invalid, 'has-success':Form.sem_year.$valid}">
<label>
Sem/Year <span class="symbol required"></span>
</label>
<input type="text" placeholder="Enter Sem/year"
tabindex="6" class="form-control" name="sem_year"
ng-model="myModel.semYear" ng-pattern="/^[a-zA-Z0-9-./\s]*$/" required/>
<span class="error text-small block"
ng-if="Form.sem_year.$dirty && Form.sem_year.$error.required">Sem/Year is required</span>
<span class="error text-small block"
ng-if="Form.sem_year.$dirty && Form.sem_year.$error.pattern">Invalid Sem/Year name </span>
</div>
<div class="col-md-6 form-group"
ng-class="{'has-error':Form.feesAmount.$dirty && Form.feesAmount.$invalid, 'has-success':Form.feesAmount.$valid}">
<label>
Fees <span class="symbol required"></span>
</label>
<input type="text" placeholder="Enter Fees Amount"
autofocus tabindex="7" class="form-control" name="feesAmount" id="feesAmount" ng-maxlength="8"
ng-model="myModel.feesAmount" ng-pattern="/^[0-9]*$/" required/>
<span class="error text-small block"
ng-if="Form.feesAmount.$dirty && Form.feesAmount.$invalid"
ng-hide="Form.feesAmount.$error.maxlength || Form.feesAmount.$error.pattern">Fees amount is required</span>
<span class="error text-small block"
ng-if="Form.feesAmount.$error.maxlength || Form.feesAmount.$error.pattern">Enter a valid amount</span>
</div>
</div>
<div class="row" ng-if="myModel.programListName=='Y001'">
<div class="col-md-12">
<div class="pull-right">
<input type="button" class="btn btn-sm btn-info" title="Click to add one more fees items" value="Add More" ng-click="addMoreFeesItems(myModel,Form);"/>
</div>
</div>
</div>
<div class="row" ng-if="myModel.programListName=='Y001'" ng-repeat="n in addMoreItems">
<div class="col-md-6 form-group" ng-class="{'has-error':n.FeesName==undefined, 'has-success':n.FeesName!=undefined}">
<label>
</label>
<input type="text" placeholder="Enter Sem/year"
class="form-control" name="sem_year{{$index}}"
ng-model="n.FeesName" ng-pattern="/^[a-zA-Z0-9-./\s]*$/" required/>
<span class="error text-small block" ng-if="n.FeesName==undefined">Enter a valid name</span>
</div>
<div class="col-md-6 form-group" ng-class="{'has-error':n.FeesAmount==undefined, 'has-success':n.FeesAmount!=undefined}">
<label>
</label>
<input type="text" placeholder="Enter Fees Amount"
autofocus class="form-control" name="feesAmount{{$index}}" id="feesAmount{{$index}}" ng-maxlength="8"
ng-model="n.FeesAmount" ng-pattern="/^[0-9]*$/" required/>
<span class="error text-small block" ng-if="n.FeesAmount==undefined">Enter a valid amount</span>
</div>
</div>
</fieldset>
</div>
<div class="col-md-6">
<fieldset>
<div class="row">
<div class="col-md-6 form-group"
ng-class="{'has-error':Form.provFess.$dirty && Form.provFess.$invalid}">
<label>
Prov Cert Fees
</label>
<input type="text" placeholder="Enter Prov Cert Fees"
autofocus tabindex="8" class="form-control" name="provFess" id="provFess" ng-maxlength="8"
ng-model="myModel.provFess" ng-pattern="/^[0-9]*$/">
<span class="error text-small block"
ng-if="Form.provFess.$error.maxlength || Form.provFess.$error.pattern">Enter a valid amount</span>
</div>
<div class="col-md-6 form-group"
ng-class="{'has-error':Form.transferAmount.$dirty && Form.transferAmount.$invalid}">
<label>
Transfer Cert Fees
</label>
<input type="text" placeholder="Enter transfer Cert Fees"
autofocus tabindex="9" class="form-control" name="transferAmount" id="transferAmount" ng-maxlength="8"
ng-model="myModel.transferAmount" ng-pattern="/^[0-9]*$/">
<span class="error text-small block"
ng-if="Form.transferAmount.$error.maxlength || Form.transferAmount.$error.pattern">Enter a valid amount</span>
</div>
</div>
<div class="row">
<div class="col-md-6 form-group"
ng-class="{'has-error':Form.degreeAmount.$dirty && Form.degreeAmount.$invalid}">
<label>
Degree Cert Fees
</label>
<input type="text" placeholder="Enter Degree Cert Fees"
autofocus tabindex="10" class="form-control" name="degreeAmount" id="degreeAmount" ng-maxlength="8"
ng-model="myModel.degreeAmount" ng-pattern="/^[0-9]*$/">
<span class="error text-small block"
ng-if="Form.degreeAmount.$error.maxlength || Form.degreeAmount.$error.pattern">Enter a valid amount</span>
</div>
<div class="col-md-6 form-group"
ng-class="{'has-error':Form.migrationAmount.$dirty && Form.migrationAmount.$invalid}">
<label>
Migration Cert Fees
</label>
<input type="text" placeholder="Enter Migration Cert Fees"
autofocus tabindex="11" class="form-control" name="migrationAmount" id="migrationAmount" ng-maxlength="8"
ng-model="myModel.migrationAmount" ng-pattern="/^[0-9]*$/">
<span class="error text-small block"
ng-if="Form.migrationAmount.$error.maxlength || Form.migrationAmount.$error.pattern">Enter a valid amount</span>
</div>
</div>
<div class="row">
<div class="col-md-6 form-group"
ng-class="{'has-error':Form.otherAmount.$dirty && Form.otherAmount.$invalid}">
<label>
Other Fees
</label>
<input type="text" placeholder="Enter Other Fees"
autofocus tabindex="12" class="form-control" name="otherAmount" id="otherAmount" ng-maxlength="8"
ng-model="myModel.otherAmount" ng-pattern="/^[0-9]*$/">
<span class="error text-small block"
ng-if="Form.otherAmount.$error.maxlength || Form.otherAmount.$error.pattern">Enter a valid amount</span>
</div>
<div class="col-md-6">
<label>
Active/De-Active
</label>
@ -205,19 +391,24 @@
</div>
</div>
</div>
</fieldset>
</div>
<div class="col-md-12">
<div class="pull-right">
<button type="submit" ladda="ldloading1.zoom_in" tabindex="9" class="btn btn-wide btn-success" data-style="zoom-in">
<button type="submit" ladda="ldloading1.zoom_in" tabindex="13" class="btn btn-wide btn-success" data-style="zoom-in">
Submit
</button>
<!-- <button type="submit" class="btn btn-success btn-o" tabindex="8">
Submit
</button>-->
<button type="reset" class="btn btn-warning btn-wide" tabindex="10"
<button type="reset" class="btn btn-warning btn-wide" tabindex="14" ng-click="courseForm.reset(Form);"
ng-click="branchForm.reset(Form)">
Reset
</button>

View File

@ -57,23 +57,147 @@
ng-if="Form.university.$dirty && Form.university.$invalid">University is required</span>
<!--<span class="success text-small" ng-if="Form.university.$valid">Thank You!</span>-->
</div>
<div class="col-md-3">
<div class="col-md-3 form-group"
ng-class="{'has-error':Form.fees.$dirty && Form.fees.$invalid, 'has-success':Form.fees.$valid}">
<label>
Active/De-Active
Fees <span class="symbol required"></span>
</label>
<div ng-if="p.IsActive==true">
<switch ng-model="p.IsActive" ng-init="p.IsActive = true" class="green"></switch>
</div>
<div ng-if="p.IsActive==false">
<switch ng-model="p.IsActive" ng-init="p.IsActive = false" class="green"></switch>
</div>
<select class="form-control" name="fees" tabindex="4" id="fees"
ng-model="myModel1.ListName"
ng-options="feesList.ListName for feesList in feesDetails" disabled
required>
<!-- <option value=""> Select Fees</option>-->
</select>
<span class="error text-small block"
ng-if="Form.fees.$dirty && Form.fees.$invalid">Fees is required</span>
<!--<span class="success text-small" ng-if="Form.fees.$valid">Thank You!</span>-->
</div>
</div>
<div class="col-md-6" >
<fieldset style="min-height:150px;max-height:270px;overflow-y: scroll;">
<div class="row" ng-repeat="n in p.feesStructures">
<div class="col-md-6 form-group"
ng-class="{'has-error':n.Sem_Year==undefined, 'has-success':n.Sem_Year!=undefined}">
<input type="text" placeholder="Enter Sem/year"
class="form-control" name="sem_year_{{$index}}"
ng-model="n.Sem_Year" ng-pattern="/^[a-zA-Z0-9-./\s]*$/" required/>
<span class="error text-small block" ng-if="n.Sem_Year==undefined">Enter a valid name</span>
</div>
<div class="col-md-6 form-group" ng-class="{'has-error':n.FeesAmount==undefined, 'has-success':n.FeesAmount!=undefined}">
<input type="text" placeholder="Enter Fees Amount"
autofocus class="form-control" name="feesAmount{{$index}}" id="feesAmount{{$index}}" ng-maxlength="8"
ng-model="n.FeesAmount" ng-pattern="/^[0-9]*$/" required/>
<span class="error text-small block" ng-if="n.FeesAmount==undefined">Enter a valid amount</span>
</div>
</div>
</fieldset>
</div>
<div class="col-md-6">
<fieldset>
<div class="row">
<div class="col-md-6 form-group"
ng-class="{'has-error':Form.provFess.$dirty && Form.provFess.$invalid}">
<label>
Prov Cert Fees
</label>
<input type="text" placeholder="Enter Prov Cert Fees"
autofocus tabindex="8" class="form-control" name="provFess" id="provFess" ng-maxlength="8"
ng-model="p.PC" ng-pattern="/^[0-9]*$/">
<span class="error text-small block"
ng-if="Form.provFess.$error.maxlength || Form.provFess.$error.pattern">Enter a valid amount</span>
</div>
<div class="col-md-6 form-group"
ng-class="{'has-error':Form.transferAmount.$dirty && Form.transferAmount.$invalid}">
<label>
Transfer Cert Fees
</label>
<input type="text" placeholder="Enter transfer Cert Fees"
autofocus tabindex="9" class="form-control" name="transferAmount" id="transferAmount" ng-maxlength="8"
ng-model="p.TC" ng-pattern="/^[0-9]*$/">
<span class="error text-small block"
ng-if="Form.transferAmount.$error.maxlength || Form.transferAmount.$error.pattern">Enter a valid amount</span>
</div>
</div>
<div class="row">
<div class="col-md-6 form-group"
ng-class="{'has-error':Form.degreeAmount.$dirty && Form.degreeAmount.$invalid}">
<label>
Degree Cert Fees
</label>
<input type="text" placeholder="Enter Degree Cert Fees"
autofocus tabindex="10" class="form-control" name="degreeAmount" id="degreeAmount" ng-maxlength="8"
ng-model="p.DC" ng-pattern="/^[0-9]*$/">
<span class="error text-small block"
ng-if="Form.degreeAmount.$error.maxlength || Form.degreeAmount.$error.pattern">Enter a valid amount</span>
</div>
<div class="col-md-6 form-group"
ng-class="{'has-error':Form.migrationAmount.$dirty && Form.migrationAmount.$invalid}">
<label>
Migration Cert Fees
</label>
<input type="text" placeholder="Enter Migration Cert Fees"
autofocus tabindex="11" class="form-control" name="migrationAmount" id="migrationAmount" ng-maxlength="8"
ng-model="p.MC" ng-pattern="/^[0-9]*$/">
<span class="error text-small block"
ng-if="Form.migrationAmount.$error.maxlength || Form.migrationAmount.$error.pattern">Enter a valid amount</span>
</div>
</div>
<div class="row">
<div class="col-md-6 form-group"
ng-class="{'has-error':Form.otherAmount.$dirty && Form.otherAmount.$invalid}">
<label>
Other Fees
</label>
<input type="text" placeholder="Enter Other Fees"
autofocus tabindex="12" class="form-control" name="otherAmount" id="otherAmount" ng-maxlength="8"
ng-model="p.OtherFees" ng-pattern="/^[0-9]*$/">
<span class="error text-small block"
ng-if="Form.otherAmount.$error.maxlength || Form.otherAmount.$error.pattern">Enter a valid amount</span>
</div>
<div class="col-md-6">
<label>
Active/De-Active
</label>
<div ng-if="p.IsActive==true">
<switch ng-model="p.IsActive" ng-init="p.IsActive = true" class="green"></switch>
</div>
<div ng-if="p.IsActive==false">
<switch ng-model="p.IsActive" ng-init="p.IsActive = false" class="green"></switch>
</div>
</div>
</div>
</fieldset>
</div>

View File

@ -43,6 +43,12 @@
<span class="title" translate="sidebar.nav.master.ACTIVITY"> ACTIVITY DETAILS </span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.master.batch">
<span class="title" translate="sidebar.nav.master.BATCH"> BATCH DETAILS </span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.master.branch">
<span class="title" translate="sidebar.nav.master.BRANCH"> BRANCH DETAILS </span>