activity changes done

This commit is contained in:
gandhimathi 2018-04-23 12:41:04 +05:30
parent 28324c21a7
commit e10d31313f

View File

@ -105,7 +105,8 @@ if(myModel.status.length > 0) {
description: myModel.Description,
status: myModel.switchsetting,
activityStatus:myModel.status,
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID
createdBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(addactivity).then(function (response) {
@ -114,7 +115,11 @@ if(myModel.status.length > 0) {
$scope.init();
swal("","Activity details added successfully.", "success");
$state.go($state.current, {}, { reload: true });
} else {
}
else if(response.data.activityStatus==false){
swal("",response.data.message, "warning");
}
else {
$scope.ldloading[loading.replace('-', '_')] = false;
swal(" ", "Something went wrong.please try again.", "error");
}
@ -149,7 +154,8 @@ swal("Warning!", "Status are required", "warning");
'Content-Type': 'application/json'
},
data: {
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(getActivity).then(function (response) {
@ -224,7 +230,8 @@ swal("Warning!", "Status are required", "warning");
description: myModel.Description,
status: myModel.IsActive,
activityStatus:listStatus.list,
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
updatedBy: JSON.parse(localStorage.getItem('localObj')).localUserID,
branchCode:JSON.parse(localStorage.getItem('localObj')).localBranchID
}
};
$http(update).then(function (response) {
@ -236,7 +243,11 @@ swal("Warning!", "Status are required", "warning");
$scope.editId = -1;
} else {
}
else if(response.data.activityStatus==false){
swal("",response.data.message, "warning");
}
else {
$scope.ldloading3[loading.replace('-', '_')] = false;
swal(" ","Something went wrong.please try again", "error");
}