Skip to content

Commit

Permalink
navigation api
Browse files Browse the repository at this point in the history
  • Loading branch information
TMuthulakshmi committed Jan 18, 2023
1 parent fff9a4a commit fd3ca85
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 17 deletions.
24 changes: 24 additions & 0 deletions app/Controllers/Api/Event/Index.php
Expand Up @@ -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;
}
}
19 changes: 9 additions & 10 deletions app/Controllers/Api/Myaccount/Dashboard/Index.php
Expand Up @@ -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"));
Expand Down
12 changes: 6 additions & 6 deletions app/Controllers/Api/Myaccount/Navigationmenu/Index.php
Expand Up @@ -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'),
);
Expand All @@ -72,25 +72,25 @@ 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'),
);

} elseif($result['type']=='5'){ //Horse Owner

$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'),
);

} elseif($result['type']=='6'){ //Operator

$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'] : [];
Expand Down
2 changes: 1 addition & 1 deletion app/Controllers/Api/Myaccount/Stallmanager/Index.php
Expand Up @@ -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(
Expand Down

0 comments on commit fd3ca85

Please sign in to comment.