From d4901653210f6e24792387f63c968d801fd06b44 Mon Sep 17 00:00:00 2001 From: resicovenba Date: Fri, 1 Dec 2017 18:44:47 +0530 Subject: [PATCH] activity added --- .../application/models/University_model.php | 15 +- Apollo/assets/js/controllers/activityCtrl.js | 3 +- Apollo/assets/views/activity.html | 5 +- .../views/announcement/Announcement.html | 2 +- Apollo/assets/views/editActivityDetails.html | 138 ++++++++---------- 5 files changed, 72 insertions(+), 91 deletions(-) diff --git a/Apollo/api/application/models/University_model.php b/Apollo/api/application/models/University_model.php index 39b87c68..fb831334 100644 --- a/Apollo/api/application/models/University_model.php +++ b/Apollo/api/application/models/University_model.php @@ -86,11 +86,11 @@ class University_model extends CI_Model // $this->db->where('Description', $arrayDetails['Description']); $checkExistActivity = $this->db->get(PICK_LIST_DETAILS); - if($checkExistActivity->result()){ - $result['activityStatus'] = false; - $result['details'] = "This activity is already added"; - } - else{ + // if($checkExistActivity->result()){ + // $result['activityStatus'] = false; + // $result['details'] = "This activity is already added"; + // } + // else{ $this->db->insert(PICK_LIST_DETAILS, $arrayDetails); if($this->db->affected_rows() == '1'){ $result['activityStatus'] = true; @@ -100,7 +100,7 @@ class University_model extends CI_Model $result['activityStatus'] = false; $result['message'] = "Something went wrong.please try again"; } - } + // } return $result; } @@ -134,7 +134,8 @@ class University_model extends CI_Model * update announcement details * created by Surendiran * */ - public function updateActivity($arrayDetails=null,$ListCode=null) { + public function updateActivity($arrayDetails=null,$ListCode=null) { + $this->db->where('ListCode',$ListCode); $updateStatus=$this->db->update(PICK_LIST_DETAILS, $arrayDetails); if($updateStatus){ diff --git a/Apollo/assets/js/controllers/activityCtrl.js b/Apollo/assets/js/controllers/activityCtrl.js index 49b4acfc..ba10f3fe 100644 --- a/Apollo/assets/js/controllers/activityCtrl.js +++ b/Apollo/assets/js/controllers/activityCtrl.js @@ -19,7 +19,6 @@ app.controller("activityCtrl", ["$scope", "toaster", "$filter", "API_POINTS", "$ * */ $scope.editId = -1; $scope.setEditId = function (pid) { - $scope.editId = pid; $scope.viewId = -1; }; @@ -89,7 +88,7 @@ $scope.activityForm = { $state.go($state.current, {}, { reload: true }); } else { $scope.ldloading1[loading.replace('-', '_')] = false; - swal("Failed!", response.data.message, "error"); + swal("Failed!", response.data.details, "error"); } }); diff --git a/Apollo/assets/views/activity.html b/Apollo/assets/views/activity.html index fb075b0a..ccf7cc35 100644 --- a/Apollo/assets/views/activity.html +++ b/Apollo/assets/views/activity.html @@ -90,14 +90,13 @@ --> - + - + diff --git a/Apollo/assets/views/announcement/Announcement.html b/Apollo/assets/views/announcement/Announcement.html index 31c7edf1..b8ac9755 100644 --- a/Apollo/assets/views/announcement/Announcement.html +++ b/Apollo/assets/views/announcement/Announcement.html @@ -77,7 +77,7 @@ Active InActive - + diff --git a/Apollo/assets/views/editActivityDetails.html b/Apollo/assets/views/editActivityDetails.html index f8c86517..ffd9a5c1 100644 --- a/Apollo/assets/views/editActivityDetails.html +++ b/Apollo/assets/views/editActivityDetails.html @@ -1,102 +1,84 @@
-
+
+
-
-
- - Update Activity Details - - -
-
-
-
-
- - - - - - \ No newline at end of file +
+ + \ No newline at end of file