diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 2377fc38..1cb35d79 100755 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -634,4 +634,7 @@ $routes->post('newClaim','VidalApiController::newClaim'); $routes->post('enrollment','VidalApiController::enrollment'); -$routes->post("ticketCreation", "ThzController::ticketCreation"); \ No newline at end of file +$routes->post("ticketCreation", "ThzController::ticketCreation"); +$routes->post("ticketList", "ThzController::ticketList"); +$routes->post("ticketConversationSave", "ThzController::ticketConversationSave"); +$routes->post("conversationListPerTicket", "ThzController::conversationListPerTicket"); \ No newline at end of file diff --git a/app/Controllers/ThzController.php b/app/Controllers/ThzController.php index 590e8f78..6613cb6b 100644 --- a/app/Controllers/ThzController.php +++ b/app/Controllers/ThzController.php @@ -33,13 +33,7 @@ class ThzController extends BaseController $data = $this->request->getJSON(true); - $cleanedData = $this->thzControllerCleaner->ticketCreation($data); - - if ($cleanedData === false) { - return $this->response->setJSON((['status' => 'error', 'message' => 'Invalid data given'])); - } - - $result = $this->thzMasterModel->insert($cleanedData); + $result = $this->thzMasterModel->insert($data); return $this->response->setJSON((['status' => 'success', 'message' => 'Ticket created successfully'])); @@ -49,20 +43,17 @@ class ThzController extends BaseController $data = $this->request->getJson(true); - $cleanedData = $this->thzControllerCleaner->ticketList($data); + $id = $data['id'] ?? null; - if( $cleanedData === false ) { - return $this->response->setJSON((['status' => 'error', 'message' => 'Invalid data given'])); + if ( isset($id) && !empty($id) ) { + //Find Specific Ticket per id + $mobile = $data['mobile'] ?? null; + $result = $this->thzMasterModel->where('mobile',$mobile)->findAll(); + }else{ + // Find all the Ticket For the Manager who can see all the Tickets + $result = $this->thzMasterModel->findAll(); } - $id = $cleanedData['id'] ?? null; - - if (empty($id)) { - $result = $this->thzMasterModel->findAll(); - } - - $result = $this->thzMasterModel->where('id',$id)->findAll(); - if(empty($result)){ return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found'])); } @@ -71,16 +62,11 @@ class ThzController extends BaseController } + public function ticketConversationSave(){ $data = $this->request->getJson(true); - $cleanedData = $this->thzControllerCleaner->ticketList($data); - - if( $cleanedData === false ) { - return $this->response->setJSON((['status' => 'error', 'message' => 'Invalid data given'])); - } - $result = $this->thzMasterNotesModel->insert($data); if(empty($result)){ @@ -92,17 +78,13 @@ class ThzController extends BaseController } - public function ticketListForUser(){ + public function conversationListPerTicket(){ $data = $this->request->getJson(true); - $cleanedData = $this->thzControllerCleaner->ticketList($data); + $thz_id = $data['thz_id'] ?? null; - if( $cleanedData === false ) { - return $this->response->setJSON((['status' => 'error', 'message' => 'Invalid data given'])); - } - - $result = $this->thzMasterNotesModel->insert($data); + $result = $this->thzMasterNotesModel->conversationListPerTicket($thz_id); if(empty($result)){ return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found'])); @@ -112,37 +94,6 @@ class ThzController extends BaseController } - public function conversationListForUserPerTicket(){ - - $data = $this->request->getJson(true); - - $cleanedData = $this->thzControllerCleaner->ticketList($data); - - if( $cleanedData === false ) { - return $this->response->setJSON((['status' => 'error', 'message' => 'Invalid data given'])); - } - - $thz_id = $cleanedData['thz_id'] ?? null; - - $result = $this->thzMasterNotesModel->conversationListForUserPerTicket($thz_id); - - if(empty($result)){ - return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found'])); - } - - return $this->response->setJSON((['status' => 'success', 'data' => $result])); - - } - - public function ticketListForAssignedStaff(){ - - } - - public function conversationListForAssignedStaffPerTicket(){ - - } - - diff --git a/app/Models/ThzMasterNotesModel.php b/app/Models/ThzMasterNotesModel.php index 2072c094..cd02a52c 100644 --- a/app/Models/ThzMasterNotesModel.php +++ b/app/Models/ThzMasterNotesModel.php @@ -40,7 +40,7 @@ class ThzMasterNotesModel extends Model protected $beforeDelete = []; protected $afterDelete = []; - public function conversationListForUserPerTicket($thz_id){ + public function conversationListPerTicket($thz_id){ if(empty($thz_id)){ @@ -50,6 +50,7 @@ class ThzMasterNotesModel extends Model $sql = "SELECT + thz_master.*, thz_master_notes.id, thz_master_notes.thz_id, thz_master_notes.notes, @@ -60,6 +61,7 @@ class ThzMasterNotesModel extends Model thz_master_notes Join thz_master ON thz_master.thz_id = :thz_id: + WHERE thz_master_notes.thz_id = :thz_id: ORDER BY diff --git a/app/Views/DashBoard.php b/app/Views/DashBoard.php index 08e08855..b0cefc4e 100755 --- a/app/Views/DashBoard.php +++ b/app/Views/DashBoard.php @@ -171,79 +171,109 @@ margin: 0 5px 10px!important; } + .nav-link{ + color:black !important; + background-color: #D4F5F6 !important; + font-size: small; + padding:8px; + border-radius: 10px !important; + } + .nav-link.active-tab { + color: white !important; + background-color: #00999E !important; + font-size: small; + padding:8px; + border-radius: 10px !important; + + } + .tab-content-styles{ + background-color:#F4F4F4; + margin-right:20px; + border-radius:25px!important; + min-height: 70vh !important; + } + + +

Dashboard

+
-
-
-
-
-
-
- -
+
-
+
+
+ @@ -257,7 +287,6 @@ - + +
+ + + + + +
+
+
+
+ © NHANCE +
+ +
+
+
+ + +
+ + + + + + +
+ + + +
+
+ +
+ + Notification +
+
+
    + +
+
+ + +
+ + TO DOs +
+
+
    + +
+
+
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php index 6ac2e4ee..0b311aee 100755 --- a/app/Views/layout/header.php +++ b/app/Views/layout/header.php @@ -327,6 +327,136 @@ } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ /assets/images/nhance-loader-fast.gif" height="40" width="40" alt="Loading..."> +
+
+ + + +
+ + + + + + +
+ + + + +
+ + + +
+ + +
+ + + + + + +
+
+ + +
\ No newline at end of file diff --git a/app/Views/leads_dash.php b/app/Views/leads_dash.php index 6effa135..b6b24fc4 100644 --- a/app/Views/leads_dash.php +++ b/app/Views/leads_dash.php @@ -1,8 +1,4 @@
-
-
-
-
Leads
-

-

-

 

-

 

+
+
+
+
+

Leads

+

+

+
Lead Tracker
+
-
-
-
-
-
BDS Renewals
-

-

-

 

-

 

+
+
+
+

BDS Renewals

+

+ +

+
Renewal Tracker
+
+
-
+
@@ -164,88 +196,102 @@ $isActive = get_role_id() == STAFF_ROLE_ID && in_array(ENROLLMENT_TEAM_ID, user_
- + $value) : ?> + + $value) : ?> - - + 20 ? substr($formattedStatus, 0, 15) . '...' : $formattedStatus; + $showTooltip = strlen($formattedStatus) > 20; + ?> + +
- - $value) : ?> +
- - 20 ? substr($formattedStatus, 0, 15) . '...' : $formattedStatus; - $showTooltip = strlen($formattedStatus) > 20; - ?> - + + // Get the background color for the current tile + $bgColor = $colorShades[$colorSetIndex][$shadeIndex]; + ?> + 20 ? substr($formattedStatus, 0, 15) . '...' : $formattedStatus; + $showTooltip = strlen($formattedStatus) > 20; + ?> + + + +