From fd3ca850d4504304dd61025c2df6ac8c53cde359 Mon Sep 17 00:00:00 2001 From: muthulakshmi Date: Wed, 18 Jan 2023 14:20:33 +0530 Subject: [PATCH] navigation api --- app/Controllers/Api/Event/Index.php | 24 +++++++++++++++++++ .../Api/Myaccount/Dashboard/Index.php | 19 +++++++-------- .../Api/Myaccount/Navigationmenu/Index.php | 12 +++++----- .../Api/Myaccount/Stallmanager/Index.php | 2 +- 4 files changed, 40 insertions(+), 17 deletions(-) diff --git a/app/Controllers/Api/Event/Index.php b/app/Controllers/Api/Event/Index.php index a85bbdc..521d97d 100644 --- a/app/Controllers/Api/Event/Index.php +++ b/app/Controllers/Api/Event/Index.php @@ -186,4 +186,28 @@ function checkincheckout(){ ]); die(); } + + public function commentsaction() + { + if ($this->request->getMethod()=='post'){ + + $requestData = $this->request->getPost(); + $result = $this->comments->action($requestData); + + if($result){ + $json = ['1','Your Comment Submitted Successfully', []]; + }else { + $json = ['0','Try Again', []];; + } + } else { + $json = ['0','Try Again', []];; + } + echo json_encode([ + 'status' => $json[0], + 'message' => $json[1], + 'result' => $json[2], + ]); + + die; + } } diff --git a/app/Controllers/Api/Myaccount/Dashboard/Index.php b/app/Controllers/Api/Myaccount/Dashboard/Index.php index 8937b93..82f2d5e 100644 --- a/app/Controllers/Api/Myaccount/Dashboard/Index.php +++ b/app/Controllers/Api/Myaccount/Dashboard/Index.php @@ -39,16 +39,15 @@ public function index() $result = $this->users->getUsers('row', ['users'], ['id' => $post['user_id'],'status' => ['1']]); if($result){ - - $countcurrentstall = 0; - $countcurrentbookingstalls = 0; - $countcurrentbookingrvlots = 0; - $countpastevent = []; - $countpaststall = 0; - $countpastamount = 0; - $countpayedamount = 0; - $countcurrentrvlots = 0; - $countcurrentevent = []; + $countcurrentstall = 0; + $countcurrentbookingstalls = 0; + $countcurrentbookingrvlots = 0; + $countpastevent = []; + $countpaststall = 0; + $countpastamount = 0; + $countpayedamount = 0; + $countcurrentrvlots = 0; + $countcurrentevent = []; $yesterday = date("Y-m-d", strtotime("yesterday")); $tday = date("Y-m-d", strtotime("today")); diff --git a/app/Controllers/Api/Myaccount/Navigationmenu/Index.php b/app/Controllers/Api/Myaccount/Navigationmenu/Index.php index b65a2f0..a15368c 100644 --- a/app/Controllers/Api/Myaccount/Navigationmenu/Index.php +++ b/app/Controllers/Api/Myaccount/Navigationmenu/Index.php @@ -61,7 +61,7 @@ public function index() array('id' => '4','screen' => 'Stall Manager'), array('id' => '5','screen' => 'Operators'), array('id' => '6','screen' => 'Current Reservation'), - array('id' => '7','screen' => 'Past Reservation'), + array('id' => '8','screen' => 'Past Reservation'), array('id' => '9','screen' => 'Payments'), array('id' => '10','screen' => 'Transactions'), ); @@ -72,8 +72,8 @@ public function index() array('id' => '1','screen' => 'Account Information'), array('id' => '2','screen' => 'Event'), array('id' => '3','screen' => 'Facility'), - array('id' => '6','screen' => 'Current Reservation'), - array('id' => '7','screen' => 'Past Reservation'), + array('id' => '7','screen' => 'Current Reservation'), + array('id' => '8','screen' => 'Past Reservation'), array('id' => '9','screen' => 'Payments'), ); @@ -81,8 +81,8 @@ public function index() $data = array( array('id' => '1','screen' => 'Account Information'), - array('id' => '6','screen' => 'Current Reservation'), - array('id' => '7','screen' => 'Past Reservation'), + array('id' => '7','screen' => 'Current Reservation'), + array('id' => '8','screen' => 'Past Reservation'), array('id' => '9','screen' => 'Payments'), ); @@ -90,7 +90,7 @@ public function index() $data = array( array('id' => '1','screen' => 'Account Information'), - array('id' => '6','screen' => 'Current Reservation'), + array('id' => '7','screen' => 'Current Reservation'), ); } $type = isset($result['type']) ? $result['type'] : []; diff --git a/app/Controllers/Api/Myaccount/Stallmanager/Index.php b/app/Controllers/Api/Myaccount/Stallmanager/Index.php index 07c3755..3992ecd 100644 --- a/app/Controllers/Api/Myaccount/Stallmanager/Index.php +++ b/app/Controllers/Api/Myaccount/Stallmanager/Index.php @@ -15,7 +15,7 @@ public function __construct() public function index() { - $post = $this->request->getPost(); //print_r($post);die; + $post = $this->request->getPost(); $validation = \Config\Services::validation(); $validation->setRules(