default batch done
This commit is contained in:
parent
a8262fd2c8
commit
d905b229f5
@ -9,7 +9,7 @@ app.controller('batchCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTabl
|
|||||||
"batchCode": "",
|
"batchCode": "",
|
||||||
"batchName": "",
|
"batchName": "",
|
||||||
"universityName":"",
|
"universityName":"",
|
||||||
"switchsetting": true
|
"switchsetting": true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -188,6 +188,45 @@ app.controller('batchCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTabl
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* change default batch options
|
||||||
|
* */
|
||||||
|
$scope.changeBtachDefault = function (details) {
|
||||||
|
if(details.IsDefault==true){
|
||||||
|
$scope.defaultBatch = false;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$scope.defaultBatch = true;
|
||||||
|
}
|
||||||
|
var changeDefault = {
|
||||||
|
method: 'POST',
|
||||||
|
url: apiPoint.url + 'updateBatchDefault/',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
batchCode: details.BatchCode,
|
||||||
|
IsDefault: $scope.defaultBatch,
|
||||||
|
universityID: details.UniversityID,
|
||||||
|
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$http(changeDefault).then(function (response) {
|
||||||
|
if (response.data.status==200 && response.data.batchStatus) {
|
||||||
|
$scope.init();
|
||||||
|
swal("", "Updated Successfully.", "success");
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
swal("", response.data.message, "error");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
*get Batch details when page loading called from view file
|
*get Batch details when page loading called from view file
|
||||||
*
|
*
|
||||||
@ -257,4 +296,5 @@ app.controller('batchCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTabl
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}]);
|
}]);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user