724 lines
24 KiB
JavaScript
724 lines
24 KiB
JavaScript
'use strict';
|
|
/**
|
|
* Student University Formid, Fee details compare
|
|
* kdk
|
|
*/
|
|
|
|
app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$http", "API_POINTS", "$state", '$rootScope', '$cookies', 'md5', 'ipCookie', '$timeout', '$window', "flowFactory", "$interval", 'SweetAlert', function ($scope, toaster, $filter, ngTableParams, $http, apiPoint, $state, $rootScope, $cookies, md5, ipCookie, $timeout, $window, flowFactory, $interval, SweetAlert) {
|
|
/**
|
|
* student university fee details compare
|
|
*/
|
|
|
|
// get local client details
|
|
var localDetail = JSON.parse(localStorage.getItem('localObj'));
|
|
var localDetails = ipCookie('cookiechk');
|
|
|
|
// load when html page load
|
|
$scope.init = function () {
|
|
|
|
var logcheck = JSON.parse(localStorage.getItem('localObj'));
|
|
|
|
const LOCALTYPE = logcheck.localType;
|
|
if (logcheck != null && (LOCALTYPE == 'R003' || LOCALTYPE == 'R004' || LOCALTYPE == 'R002' || LOCALTYPE == 'R005')) {
|
|
console.log("if");
|
|
} else {
|
|
if (logcheck != null && LOCALTYPE != 'R001') {
|
|
console.log("else if");
|
|
$state.go('app.dashboard');
|
|
} else {
|
|
console.log("else else");
|
|
window.localStorage.clear();
|
|
$state.go('login.signin');
|
|
}
|
|
}
|
|
|
|
if (localDetail != null) {
|
|
if (localDetails.localType === 'R004') {
|
|
// $scope.getUniversityList();
|
|
$scope.getUniversitySearchList();
|
|
$scope.getUniveesityListFromApp();
|
|
} else {
|
|
ipCookie.remove('cookiechk');
|
|
$window.localStorage.clear();
|
|
$state.go('login.signin');
|
|
}
|
|
} else {
|
|
}
|
|
}
|
|
|
|
|
|
$scope.universityData = '';
|
|
$scope.getUniveesityListFromApp = function () {
|
|
var empListreq = {
|
|
method: 'POST',
|
|
url: apiPoint.url + 'getUniversityCodeForFormDetailsGet/',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
data: {
|
|
data: localDetails
|
|
}
|
|
};
|
|
$http(empListreq).then(function (response) {
|
|
if (response.data.univList) {
|
|
$scope.universityData = response.data.university_details;
|
|
} else {
|
|
}
|
|
});
|
|
}
|
|
// get University List
|
|
$scope.universitySearchData = '';
|
|
$scope.getUniversitySearchList = function () {
|
|
var empListreq = {
|
|
method: 'POST',
|
|
url: apiPoint.url + 'getUnivCourseFromFileDetails/',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
data: {
|
|
data: localDetails
|
|
}
|
|
};
|
|
$http(empListreq).then(function (response) {
|
|
if (response.data.status) {
|
|
$scope.universitySearchData = response.data.details;
|
|
} else {
|
|
$scope.universitySearchData = "";
|
|
}
|
|
});
|
|
};
|
|
|
|
$scope.semDetails = ["1", "2", "3", "4", "5", "6", "7", "8"];
|
|
|
|
$scope.searchData = {
|
|
"University": "",
|
|
"Course": "",
|
|
"Sem": ""
|
|
}
|
|
$scope.myUnivSearch = "";
|
|
$scope.courseData = "";
|
|
|
|
$scope.getUniveId = function (univ) {
|
|
$scope.sessionData = "";
|
|
if (univ === '') {
|
|
$scope.myUnivSearch = "";
|
|
$scope.courseData = "";
|
|
$scope.searchData.University = '';
|
|
$scope.searchData.Course = '';
|
|
} else {
|
|
let name = JSON.parse(univ);
|
|
$scope.searchData.University = name.univCode;
|
|
$scope.courseData = name.univCourseDetails;
|
|
}
|
|
};
|
|
|
|
//For session dropdown
|
|
$scope.filterSessionDetails = "";
|
|
$scope.$watch('searchData.University', function (newValue, oldValue) {
|
|
if (newValue == undefined || newValue == '') {
|
|
$scope.filterSessionDetails = "";
|
|
}
|
|
else {
|
|
if (angular.isString(newValue)) {
|
|
$scope.filterSessionDetails = angular.fromJson(newValue);
|
|
}
|
|
}
|
|
|
|
});
|
|
|
|
|
|
$scope.Searchloader = false;
|
|
$scope.studentData = false;
|
|
|
|
$scope.onSubmit = function () {
|
|
$scope.Searchloader = true;
|
|
if ($scope.searchData.University !== '' && $scope.searchData.Course !== '') {
|
|
$scope.Searchloader = true;
|
|
var empListreq = {
|
|
method: 'POST',
|
|
url: apiPoint.url + 'getStudentUnivFormIdFeeDatailsList/',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
data: {
|
|
data: localDetails,
|
|
search: $scope.searchData,
|
|
}
|
|
};
|
|
$http(empListreq).then(function (response) {
|
|
if (response.data.formTypeStatus) {
|
|
$scope.Searchloader = false;
|
|
$scope.studentData = true;
|
|
$scope.data = response.data.studentFeeCompareDetails;
|
|
$scope.studentListLength = $scope.data.length;
|
|
// $scope.statusMessage = $scope.data.message;
|
|
} else {
|
|
$scope.Searchloader = false;
|
|
$scope.studentData = false;
|
|
$scope.statusMessage = $scope.data.message;
|
|
}
|
|
});
|
|
} else {
|
|
|
|
}
|
|
}
|
|
//Export excel
|
|
var mystyle1 = {
|
|
sheetid: 'Student University FormId Fees Details',
|
|
headers: true,
|
|
caption: {
|
|
title:'Student University FormId Fees Details',
|
|
width: '300px',
|
|
style:'font-size:50px;'
|
|
},
|
|
// style:'background:#00FF00',
|
|
column: {
|
|
style:'font-size:16px'
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
$scope.exportData = function () {
|
|
alasql('SELECT CAST(FormID as NUMBER) as FormID,FormType as FormType,CentreCode as CentreCode,Session as Session,CAST(Year as NUMBER) as Year,Semester as Semester,Student_Name as Student_Name,Father_Name as Father_Name,CourseCode as CourseCode,CAST(ActualCourseFee as NUMBER) as ActualCourseFee,CAST(CourseFee as NUMBER) as CourseFee,CAST(ExamFee as NUMBER) as ExamFee,CAST(EnrollmentFee as NUMBER) as EnrollmentFee,CAST(ProspectusFee as NUMBER) as ProspectusFee,CAST(ReRegFee as NUMBER) as ReRegFee,CAST(CreditTransferFee as NUMBER) as CreditTransferFee,CAST(LateralEntryFee as NUMBER) as LateralEntryFee,CAST(DualSpclFee as NUMBER) as DualSpclFee,CAST(OtherFee as NUMBER) as OtherFee,CAST(NRIFEE as NUMBER) as NRIFEE,CAST(ProvisionalFee as NUMBER) as ProvisionalFee,CAST(MigrationFee as NUMBER) as MigrationFee,CAST(UrgentResultDMCFee as NUMBER) as UrgentResultDMCFee,CAST(AdditionalFee as NUMBER) as AdditionalFee,CAST(Amount as NUMBER) as Amount INTO XLS("FormIdFeesDetails.xls",?) FROM ?',[mystyle1,$scope.data]);
|
|
};
|
|
//End of export excel
|
|
$scope.myObj = {
|
|
// "color" : "green",
|
|
"font-size": "inherit"
|
|
}
|
|
|
|
$scope.myObjErr = {
|
|
"text-decoration": "underline",
|
|
"text-decoration-color": "red",
|
|
"font-size": "inherit"
|
|
}
|
|
|
|
$scope.editId = -1;
|
|
$scope.setEditId = function (id) {
|
|
$scope.editId = id;
|
|
}
|
|
|
|
/*upload model*/
|
|
$scope.uploadModel = {
|
|
university: "",
|
|
uploadFor: "",
|
|
}
|
|
/*
|
|
* upload options json
|
|
* */
|
|
$scope.uploadOptions = [{
|
|
id: 1,
|
|
name: 'Received Enrolment From University',
|
|
},
|
|
{
|
|
id: 2,
|
|
name: 'Received Fees From University'
|
|
},
|
|
];
|
|
/*
|
|
watch upload model for enable upload options
|
|
*/
|
|
$scope.showFile = "1";
|
|
// $scope.$watchCollection('uploadModel', function (newValue, oldValue) {
|
|
|
|
// if (newValue.university != '' && newValue.university != null) {
|
|
// $scope.showFile = "1";
|
|
// }
|
|
// else {
|
|
// $scope.showFile = "0";
|
|
// }
|
|
|
|
// });
|
|
|
|
$scope.extractFormIDDetails = "";
|
|
$scope.readXlsxFormDetails = function (workbook) {
|
|
$scope.extractFormIDDetails = "";
|
|
/* DO SOMETHING WITH workbook HERE */
|
|
for (var sheetName in workbook.Sheets) {
|
|
var jsonData = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName]);
|
|
if (jsonData.length != 0) {
|
|
$scope.extractFormIDDetails = jsonData;
|
|
}
|
|
|
|
}
|
|
$scope.error = function (e) {
|
|
/* DO SOMETHING WHEN ERROR IS THROWN */
|
|
//console.log(e);
|
|
}
|
|
|
|
}
|
|
|
|
$scope.formUploadUnivSelectID = {
|
|
'univCode': ''
|
|
};
|
|
|
|
$scope.receiveFormIdFeeDetails = function (details) {
|
|
console.log(details);
|
|
var updateUniversityEnrolment = {
|
|
method: 'POST',
|
|
url: apiPoint.url + 'insertFormIdUnivFeeDetails/',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
data: {
|
|
localDetails: localDetail,
|
|
details: details,
|
|
univ: $scope.formUploadUnivSelectID
|
|
}
|
|
};
|
|
|
|
$http(updateUniversityEnrolment).then(function (response) {
|
|
if (response.data.stuFeeList == true) {
|
|
swal("", "Updated Successfully", "success");
|
|
$state.go($state.current, {}, { reload: true });
|
|
} else {
|
|
swal("", "Failed", "error");
|
|
}
|
|
});
|
|
}
|
|
|
|
$scope.popupLoad = false;
|
|
$scope.popupLoadData = false;
|
|
$scope.formPaymentDetails = "";
|
|
|
|
// Fee compare details get
|
|
|
|
$scope.getFeeCompareDetails = function (formId, enrolmentId) {
|
|
$scope.popupLoadData = false;
|
|
$scope.formPaymentDetails = "";
|
|
$scope.popupLoad = true;
|
|
var getFeeCompareDetailsList = {
|
|
method: 'POST',
|
|
url: apiPoint.url + 'formIDFeeCompareDetails/',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
data: {
|
|
localDetails: localDetail,
|
|
formId: formId,
|
|
enrolmentId: enrolmentId
|
|
}
|
|
};
|
|
|
|
$http(getFeeCompareDetailsList).then(function (response) {
|
|
if (response.data.status == true) {
|
|
$scope.popupLoad = false;
|
|
$scope.popupLoadData = true;
|
|
$scope.formPaymentDetails = response.data;
|
|
|
|
} else {
|
|
$scope.popupLoad = false;
|
|
$scope.popupLoadData = true;
|
|
$scope.formPaymentDetails = response.data;
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
$scope.formIdMissMatchUnivSelectID = {
|
|
'univCode': ''
|
|
};
|
|
|
|
$scope.unMatchedLoadingStatus = false;
|
|
// Get unmached details
|
|
$scope.getUnmatchedRecord = function (ss) {
|
|
$scope.unMatchedRecordDetails = '';
|
|
$scope.unMatchedNoRecordFound = false;
|
|
$scope.unMatchedLoadingStatus = true;
|
|
var getFeeCompareDetailsList = {
|
|
method: 'POST',
|
|
url: apiPoint.url + 'getUnmatchedFormIdFeesDetails/',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
data: {
|
|
localDetails: localDetail,
|
|
getDetailsFor: $scope.formIdMissMatchUnivSelectID
|
|
}
|
|
};
|
|
$http(getFeeCompareDetailsList).then(function (response) {
|
|
if (response.data.unMatchedRecordStatus == true) {
|
|
$scope.unMatchedLoadingStatus = false;
|
|
$scope.unMatchedNoRecordFound = false;
|
|
$scope.unMatchedRecordDetails = response.data.unMatchedRecordDetails;
|
|
$scope.unMatchedRecordDetailsType = response.data.unMatchedRecordFor;
|
|
} else {
|
|
$scope.unMatchedLoadingStatus = false;
|
|
$scope.unMatchedNoRecordFound = true;
|
|
$scope.unMatchedRecordDetails = response.data.unMatchedRecordDetails;
|
|
}
|
|
});
|
|
}
|
|
//Export Excel
|
|
var mystyle = {
|
|
sheetid: 'Student University FormId Unmatched Records',
|
|
headers: true,
|
|
caption: {
|
|
title:'Student University FormId Unmatched Records',
|
|
width: '300px',
|
|
style:'font-size:50px;'
|
|
},
|
|
// style:'background:#00FF00',
|
|
column: {
|
|
style:'font-size:16px'
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
$scope.exportDataTab3 = function () {
|
|
alasql('SELECT CAST(FormID as NUMBER) as FormID,FormType as FormType,CentreCode as CentreCode,CourseCode as CourseCode,CAST(ActualCourseFee as NUMBER) as ActualCourseFee,CAST(CourseFee as NUMBER) as CourseFee,CAST(Amount as NUMBER) as Amount INTO XLS("FormIdUnmatchedRecords.xls",?) FROM ?',[mystyle,$scope.unMatchedRecordDetails]);
|
|
};
|
|
//End of export excel
|
|
// get subtab details for the formid fee details get form the university
|
|
|
|
$scope.subTabActive = function (tab) {
|
|
if (tab == 'subTabactive2') {
|
|
getDraftFormIdDetails();
|
|
}
|
|
}
|
|
|
|
|
|
$scope.draftManualEntryDetails = {
|
|
'FormID': '',
|
|
'FormType': 'NEW',
|
|
'CentreCode': '',
|
|
'Session': '',
|
|
'Year': '',
|
|
'Semester': '',
|
|
'Student_Name': '',
|
|
'Father_Name': '',
|
|
'CourseCode': '',
|
|
'ActualCourseFee': '0',
|
|
'CourseFee': '0',
|
|
'ExamFee': '0',
|
|
'EnrollmentFee': '0',
|
|
'ProspectusFee': '0',
|
|
'ReRegFee': '0',
|
|
'CreditTransferFee': '0',
|
|
'LateralEntryFee': '0',
|
|
'DualSpclFee': '0',
|
|
'OtherFee': '0',
|
|
'NRIFEE': '0',
|
|
'ProvisionalFee': '0',
|
|
'MigrationFee': '0',
|
|
'UrgentResultDMCFee': '0',
|
|
'AdditionalFee': '0',
|
|
'Amount': '0'
|
|
}
|
|
|
|
|
|
$scope.draftListDetails = '';
|
|
$scope.draftListDetailsNoRecordFound = false;
|
|
$scope.draftListDetailsLoading = false;
|
|
// get draft form id details
|
|
function getDraftFormIdDetails() {
|
|
$scope.draftListDetailsLoading = true;
|
|
$scope.draftListDetailsNoRecordFound = false;
|
|
$scope.draftListDetails = '';
|
|
var getFormIdDraftDetailsList = {
|
|
method: 'POST',
|
|
url: apiPoint.url + 'getForFormIdDraftDetails/',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
data: {
|
|
localDetails: localDetail
|
|
}
|
|
};
|
|
$http(getFormIdDraftDetailsList).then(function (response) {
|
|
if (response.data.draftStatus == true) {
|
|
$scope.draftListDetailsLoading = false;
|
|
$scope.draftListDetails = response.data.draftDetails;
|
|
$scope.draftListDetailsNoRecordFound = false;
|
|
} else {
|
|
$scope.draftListDetailsLoading = false;
|
|
$scope.draftListDetailsNoRecordFound = true;
|
|
}
|
|
});
|
|
}
|
|
|
|
// manual entry details add
|
|
|
|
$scope.addManualData = function () {
|
|
// alert(JSON.stringify($scope.draftManualEntryDetails));
|
|
|
|
var addDraftDetailsList = {
|
|
method: 'POST',
|
|
url: apiPoint.url + 'addForFormIdDraftDetails/',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
data: {
|
|
localDetails: localDetail,
|
|
details: $scope.draftManualEntryDetails,
|
|
univ: $scope.formUploadUnivSelectID
|
|
}
|
|
};
|
|
$http(addDraftDetailsList).then(function (response) {
|
|
if (response.data.draftStatus == true) {
|
|
swal("", response.data.draftDetailsMessagae, "success");
|
|
getDraftFormIdDetails();
|
|
getEmptycall();
|
|
} else {
|
|
swal("", response.data.draftDetailsMessagae, "warning");
|
|
getDraftFormIdDetails();
|
|
getEmptycall();
|
|
}
|
|
});
|
|
}
|
|
|
|
function getEmptycall() {
|
|
$scope.draftManualEntryDetails = {
|
|
'FormID': '',
|
|
'FormType': 'NEW',
|
|
'CentreCode': '',
|
|
'Session': '',
|
|
'Year': '',
|
|
'Semester': '',
|
|
'Student_Name': '',
|
|
'Father_Name': '',
|
|
'CourseCode': '',
|
|
'ActualCourseFee': '0',
|
|
'CourseFee': '0',
|
|
'ExamFee': '0',
|
|
'EnrollmentFee': '0',
|
|
'ProspectusFee': '0',
|
|
'ReRegFee': '0',
|
|
'CreditTransferFee': '0',
|
|
'LateralEntryFee': '0',
|
|
'DualSpclFee': '0',
|
|
'OtherFee': '0',
|
|
'NRIFEE': '0',
|
|
'ProvisionalFee': '0',
|
|
'MigrationFee': '0',
|
|
'UrgentResultDMCFee': '0',
|
|
'AdditionalFee': '0',
|
|
'Amount': '0'
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
// add draft details to list
|
|
$scope.addToList = function (id) {
|
|
swal({
|
|
title: "Are you sure?",
|
|
text: "You Want to Add this Record to List!",
|
|
type: "warning",
|
|
showCancelButton: true,
|
|
confirmButtonColor: '#DD6B55',
|
|
confirmButtonText: 'Yes',
|
|
cancelButtonText: "No",
|
|
closeOnConfirm: false,
|
|
closeOnCancel: false
|
|
},
|
|
function (isConfirm) {
|
|
if (isConfirm) {
|
|
var selectedItems = [];
|
|
function getUpdateDetails(id) {
|
|
this.ID = id;
|
|
this.DraftStatus = 0;
|
|
}
|
|
let itemGetID = new getUpdateDetails(id);
|
|
selectedItems.push(itemGetID);
|
|
var draftMoveToList = {
|
|
method: 'POST',
|
|
url: apiPoint.url + 'draftMovetoList/',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
data: {
|
|
localDetails: localDetail,
|
|
details: selectedItems
|
|
}
|
|
};
|
|
$http(draftMoveToList).then(function (response) {
|
|
if (response.data.draftStatus == true) {
|
|
// alert();
|
|
swal("", response.data.draftDetailsMessagae, "success");
|
|
getDraftFormIdDetails();
|
|
} else {
|
|
swal("", response.data.draftDetailsMessagae, "warning");
|
|
|
|
}
|
|
});
|
|
} else {
|
|
swal("Cancelled", "Your record not added to list :)", "error");
|
|
}
|
|
});
|
|
}
|
|
|
|
$scope.editId = -1;
|
|
$scope.leader = {};
|
|
$scope.editList = function (details, d) {
|
|
$scope.leader = {};
|
|
angular.copy(d, $scope.leader);
|
|
$scope.editId = details;
|
|
}
|
|
|
|
// update feeid details in draft mode
|
|
$scope.updateFeeIDDetails = function (id, p) {
|
|
var editDraftMoveToList = {
|
|
method: 'POST',
|
|
url: apiPoint.url + 'editDraftFormIdFeesDetails/',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
data: {
|
|
localDetails: localDetail,
|
|
details: p,
|
|
detailsID: id
|
|
}
|
|
};
|
|
$http(editDraftMoveToList).then(function (response) {
|
|
if (response.data.updatedraftStatus == true) {
|
|
// alert();
|
|
swal("", response.data.updatedraftDetailsMessagae, "success");
|
|
getDraftFormIdDetails();
|
|
$scope.editId = -1;
|
|
$scope.leader = {};
|
|
} else {
|
|
swal("", response.data.updatedraftDetailsMessagae, "warning");
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
$scope.statusUpdateEditId = -1;
|
|
$scope.statusUpdate = function (id) {
|
|
$scope.statusUpdateEditId = id;
|
|
$scope.statusUpdateFormIdDetails = {
|
|
"Status": "",
|
|
"Comments": ""
|
|
}
|
|
}
|
|
|
|
|
|
$scope.StatusListDetails = '';
|
|
$scope.getFormIdDetailsStatusListLoading = false;
|
|
// formid records status details
|
|
$scope.getFormIdDetailsStatusList = function (id) {
|
|
|
|
$scope.getFormIdDetailsStatusListLoading = true;
|
|
var getFormIdDetailsStatusList = {
|
|
method: 'POST',
|
|
url: apiPoint.url + 'getFormIdDetailsStatusUpdateList/',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
data: {
|
|
localDetails: localDetail,
|
|
detailsID: id
|
|
}
|
|
};
|
|
$http(getFormIdDetailsStatusList).then(function (response) {
|
|
if (response.data.formIdstatusListStatus == true) {
|
|
$scope.getFormIdDetailsStatusListLoading = false;
|
|
$scope.StatusListDetails = response.data.formIdstatusListDetails;
|
|
} else {
|
|
$scope.getFormIdDetailsStatusListLoading = false;
|
|
$scope.StatusListDetails = response.data.formIdstatusListDetails;
|
|
$scope.StatusListDetailsApiMessage = response.data.formIdstatusListMessagae;
|
|
}
|
|
});
|
|
}
|
|
|
|
$scope.statusUpdateFormIdDetails = {
|
|
"Status": "",
|
|
"Comments": ""
|
|
}
|
|
|
|
$scope.resetStatusUpdateForm = function () {
|
|
$scope.statusUpdateFormIdDetails = {
|
|
"Status": "",
|
|
"Comments": ""
|
|
}
|
|
}
|
|
|
|
// add status for the formid record details
|
|
// kdk
|
|
$scope.addStatusUpdateDetails = function (id, formId) {
|
|
var addStatusUpdateDetailsStatusList = {
|
|
method: 'POST',
|
|
url: apiPoint.url + 'insertStatusUpdateDetails/',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
data: {
|
|
localDetails: localDetail,
|
|
details: $scope.statusUpdateFormIdDetails,
|
|
id: id,
|
|
formId: formId
|
|
}
|
|
};
|
|
$http(addStatusUpdateDetailsStatusList).then(function (response) {
|
|
if (response.data.insertStatusUpdateDetailsStatus == true) {
|
|
$scope.statusUpdateFormIdDetails = {
|
|
"Status": "",
|
|
"Comments": ""
|
|
}
|
|
$scope.statusUpdateEditId = -1;
|
|
swal("", response.data.insertStatusUpdateDetailsMessagae, "success");
|
|
} else {
|
|
swal("", response.data.insertStatusUpdateDetailsMessagae, "success");
|
|
// $scope.getFormIdDetailsStatusListLoading = false;
|
|
// $scope.StatusListDetails = response.data.formIdstatusListDetails;
|
|
// $scope.StatusListDetailsApiMessage = response.data.formIdstatusListMessagae;
|
|
}
|
|
});
|
|
}
|
|
|
|
// add formid list details to account state
|
|
// kdk
|
|
$scope.addToAccountState = function (id) {
|
|
|
|
swal({
|
|
title: "Are you sure?",
|
|
text: "You Want to Add this Record to Account State List!",
|
|
type: "warning",
|
|
showCancelButton: true,
|
|
confirmButtonColor: '#DD6B55',
|
|
confirmButtonText: 'Yes',
|
|
cancelButtonText: "No",
|
|
closeOnConfirm: false,
|
|
closeOnCancel: false
|
|
},
|
|
function (isConfirm) {
|
|
if (isConfirm) {
|
|
var selectedItems = [];
|
|
function getUpdateDetails(id) {
|
|
this.ID = id;
|
|
}
|
|
let itemGetID = new getUpdateDetails(id);
|
|
selectedItems.push(itemGetID);
|
|
var addToAccountStateList = {
|
|
method: 'POST',
|
|
url: apiPoint.url + 'addToAccountStateList/',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
data: {
|
|
localDetails: localDetail,
|
|
details: selectedItems
|
|
}
|
|
};
|
|
$http(addToAccountStateList).then(function (response) {
|
|
if (response.data.accountStateMoveStatus == true) {
|
|
swal("", response.data.accountStateMoveMessagae, "success");
|
|
$scope.onSubmit();
|
|
} else {
|
|
swal("", response.data.accountStateMoveMessagae, "warning");
|
|
|
|
}
|
|
});
|
|
} else {
|
|
swal("Cancelled", "Your record not added to list :)", "error");
|
|
}
|
|
});
|
|
}
|
|
|
|
}]);
|