This commit is contained in:
resicovenba 2017-11-29 15:03:09 +05:30
commit 2e3db5e639
5 changed files with 112 additions and 8 deletions

View File

@ -59,7 +59,7 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
}).state('app.dashboard', {
url: "/dashboard",
templateUrl: "assets/views/dashboard.html",
resolve: loadSequence('jquery-sparkline', 'dashboardCtrl'),
resolve: loadSequence('spin', 'ladda', 'angular-ladda', 'dashboardCtrl','ngTable'),
title: 'Dashboard',
ncyBreadcrumb: {
label: 'Dashboard'

View File

@ -195,7 +195,7 @@ app.controller('batchCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTabl
} else {
$scope.emptyData=false;
$scope.loader=false;
$scope.loader=true;
$scope.university=response.data.universityDetails;
}

View File

@ -218,7 +218,6 @@ app.controller('branchCtrl', ["$scope","toaster", "$filter", "ngTableParams", "A
$scope.loader=true;
// var data = response.data.details;
$scope.data = response.data.details;
console.log(data);
// this for search box
// $scope.search = {BranchCode: ''};
// $scope.tableParams = new ngTableParams({
@ -235,7 +234,7 @@ app.controller('branchCtrl', ["$scope","toaster", "$filter", "ngTableParams", "A
// });
} else {
$scope.emptyData=false;
$scope.loader=false;
$scope.loader=true;
$scope.branchInfo='';

View File

@ -157,7 +157,6 @@ 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;
@ -223,7 +222,7 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
$rootScope.init = function () {
$scope.loader='';
var getBranch = {
var getCourse = {
method: 'POST',
url: apiPoint.url + 'getCourseDetails/',
headers: {
@ -233,7 +232,7 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
}
};
$http(getBranch).then(function (response) {
$http(getCourse).then(function (response) {
if (response.data.status==200 && response.data.courseStatus) {
$scope.emptyData=true;
$scope.loader=true;
@ -246,9 +245,13 @@ app.controller('courseCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTab
} else {
$scope.emptyData=false;
$scope.loader=false;
$scope.loader=true;
$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;
}
});

View File

@ -0,0 +1,102 @@
<form name="Form" id="form" novalidate>
<div class="row">
<div class="col-md-12">
<div class="col-md-12">
<fieldset>
<legend>
Update 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="p.BatchCode" ng-pattern="/^[a-zA-Z0-9\s]*$/" readonly 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 batch Code </span>
</div>
<div class="col-md-3 form-group"
ng-class="{'has-error':Form.batchName.$dirty && Form.batchName.$invalid, 'has-success':Form.batchcode.$valid}">
<label>
Batch Name <span class="symbol required"></span>
</label>
<input type="text" placeholder="Enter Batch Name"
tabindex="1" class="form-control" name="batchName"
ng-model="p.BatchName" required/>
<span class="error text-small block"
ng-if="Form.batchName.$dirty && Form.batchName.$error.required">Batch Code is required</span>
<span class="error text-small block"
ng-if="Form.batchName.$dirty && Form.batchName.$error.pattern">Invalid Batch Code </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="p.UniversityID"
ng-options="details.UniversityID as details.UniversityName for details in university"
disabled 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>
</div>
<div class="col-md-3">
<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>
</div>
<div class="row">
<div class="col-md-12">
<div class="pull-right">
<button type="submit" ladda="ldloading.zoom_in" tabindex="9" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="updateBatch(p,Form,'zoom-in')">
Save
</button>
<input type="button" class="btn btn-warning btn-wide" tabindex="10" value="Cancel"
ng-click="cancel();">
</input>
</div>
</div>
</div>
</fieldset>
</div>
</div>
</div>
</div>
</form>
<!-- class="editRowTd" -->