diff --git a/app/controllers/API/Complaints.php b/app/controllers/API/Complaints.php
index 27858400..044cef10 100644
--- a/app/controllers/API/Complaints.php
+++ b/app/controllers/API/Complaints.php
@@ -29,4 +29,16 @@ public function resolveComplaint(string $a = ''): void
$response = new JSONResponse;
$response->statusCode(200)->success(true)->data(['complaint_id' => $a])->send();
}
+
+ public function cancelCustomerComplaint(string $a = '', string $b = '', string $c = ''): void
+ {
+
+ $complaint = new RentComplaintModel;
+ $complaint->cancelComplaint($a);
+
+ $response = new JSONResponse;
+ $response->statusCode(200)->data(['complaint_id' => $a])->send();
+ }
+
+
}
diff --git a/app/controllers/Complaints.php b/app/controllers/Complaints.php
index a1bb3afc..862f9f57 100644
--- a/app/controllers/Complaints.php
+++ b/app/controllers/Complaints.php
@@ -110,7 +110,7 @@ public function rentComplaints(string $a = '', string $b = '', string $c = ''):v
$rentcomplaint = new RentComplaintModel;
$data = ['customer_id' => UserMiddleware::getUser()['id']];
$data['complaints'] = $rentcomplaint->getComplaintsByCustomer($data);
- show ($data['complaints']);
+ // show ($data['complaints']);
$this->view('customer/components/customercomplaintlist', $data);
}
@@ -122,7 +122,7 @@ public function rentComplaint(string $a = '', string $b = '', string $c = ''):vo
$rent = new RentModel;
$data['rentitems'] = $rent->getItemListbyRentId($data['complaint']->rent_id);
- show($data);
+ // show($data);
$this->view('customer/components/customercomplaints', $data);
}
diff --git a/app/controllers/_404.php b/app/controllers/_404.php
index 58500916..24f88077 100755
--- a/app/controllers/_404.php
+++ b/app/controllers/_404.php
@@ -5,7 +5,7 @@ class _404{
public function index(){
http_response_code(404);
- echo "Controller not found";
+ $this->view('404');
}
}
diff --git a/app/models/RentComplaint.php b/app/models/RentComplaint.php
index efd2b2b0..574f10a0 100644
--- a/app/models/RentComplaint.php
+++ b/app/models/RentComplaint.php
@@ -3,12 +3,14 @@ class RentComplaintModel
{
use Model;
- protected string $table = 'rent_return_complaints';
+ protected string $table = 'rent_complaint';
protected array $allowedColumns = [
'rent_id',
+ 'complaint_no',
'title',
'description',
+ 'created_at',
'status'
];
@@ -30,36 +32,44 @@ public function resolveComplaint($id)
//$table
$this->update($id, ['status' => 'resolved']);
}
- public function getComplaints(array $data)
- {
+ public function getComplaints(array $data) {
return $this->where($data);
}
- public function getComplaintsByCustomer(array $data)
- {
+ public function getComplaintsByCustomer(array $data) {
$q = new QueryBuilder;
$q->setTable('rent_complaint');
$q->select('rent.customer_id as customer_id, rent.id as rent_id, complaint_no as complaint_no, rent_complaint.status as status, rent_complaint.description as description, rent_complaint.created_at as created_at')
- ->join('rent', 'rent_complaint.rent_id', 'rent.id')
- ->where('rent.customer_id', $data['customer_id']);
+ ->join('rent', 'rent_complaint.rent_id','rent.id')
+ ->where('rent.customer_id', $data['customer_id'])
+ ->orderBy('rent_complaint.created_at', 'DESC');
return $this->query($q->getQuery(), $q->getData());
}
-
- public function getRentComplaint($id)
- {
+
+ public function getRentComplaint($id) {
$q = new QueryBuilder;
$q->setTable('rent_complaint');
$q->select('rent_complaint.complaint_no as complaint_no, rent.id as rent_id,rent.created_at as rent_date, rent.customer_id as customer_id, rent.paid_amount as paid_amount, rent.created_at as paid_date, rent.start_date as start_date, rent.end_date as end_date,
- rent.status as rent_status, rent.total as total_amount,rental_services.id as rental_id, rental_services.name as rental_name, rental_services.mobile as rental_mobile,
- rent_complaint.title as title, rent_complaint.description as description, rent_complaint.created_at as created_at, rent_complaint.status as status')
- ->join('rent', 'rent_complaint.rent_id', 'rent.id')
- ->join('rental_services', 'rent.rentalservice_id', 'rental_services.id')
- ->where('rent_complaint.complaint_no', $id);
-
+ rent.status as rent_status, rent.total as total_amount,rental_services.id as rental_id, rental_services.name as rental_name, rental_services.mobile as rental_mobile,
+ rent_complaint.title as title, rent_complaint.description as description, rent_complaint.created_at as created_at, rent_complaint.status as status')
+ ->join('rent','rent_complaint.rent_id', 'rent.id')
+ ->join('rental_services', 'rent.rentalservice_id','rental_services.id')
+ ->where('rent_complaint.complaint_no', $id);
+ return $this->query($q->getQuery(), $q->getData());
+ }
+
+ public function cancelComplaint($id){
+ // show($id);
+ // return $this->update($id, ['status' => 'cancelled'], 'complaint_no');
+ $q = new QueryBuilder;
+ $q->setTable('rent_complaint');
+ $q->update(['status' => 'cancelled'])->where('complaint_no', $id);
return $this->query($q->getQuery(), $q->getData());
}
+
+
}
diff --git a/app/views/404.view.php b/app/views/404.view.php
index 8037c559..6e9e252b 100755
--- a/app/views/404.view.php
+++ b/app/views/404.view.php
@@ -1,5 +1,14 @@
-
-
Page not found
-
+
+
+
+
+
+
+
+
+
diff --git a/app/views/customer/complaints.view.php b/app/views/customer/complaints.view.php
index 19eefa23..67552f1a 100644
--- a/app/views/customer/complaints.view.php
+++ b/app/views/customer/complaints.view.php
@@ -7,10 +7,10 @@
-
+
-
Complaints
+
Complaints
@@ -29,6 +29,20 @@
+
+
+
+
+
×
+
Cancel Complaint
+
Are you sure you want to cancel this complaint?
+
+
+
+
+
+
+
@@ -137,4 +119,43 @@ function getComplaints(status) {
}
});
});
+
+
+
+
\ No newline at end of file
diff --git a/app/views/customer/components/cart.view.php b/app/views/customer/components/cart.view.php
index ef0e6aa7..64e6a965 100644
--- a/app/views/customer/components/cart.view.php
+++ b/app/views/customer/components/cart.view.php
@@ -2,7 +2,7 @@
Cart
-
start_date); ?> - end_date); ?>
+ start_date); ?> - end_date); ?>
@@ -36,7 +36,7 @@
-
Rs. total); ?>
+ Rs. total); ?>
diff --git a/app/views/customer/components/complaint.view.php b/app/views/customer/components/complaint.view.php
index 9997ff9c..f3c90355 100644
--- a/app/views/customer/components/complaint.view.php
+++ b/app/views/customer/components/complaint.view.php
@@ -94,7 +94,9 @@
-
Equipment List
+
+
Equipment List
+
@@ -119,20 +121,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/app/views/customer/components/complaintlist.view.php b/app/views/customer/components/complaintlist.view.php
index 72bea6fc..949c1062 100644
--- a/app/views/customer/components/complaintlist.view.php
+++ b/app/views/customer/components/complaintlist.view.php
@@ -93,7 +93,7 @@
-
+
\ No newline at end of file
diff --git a/app/views/customer/components/customercomplaints.view.php b/app/views/customer/components/customercomplaints.view.php
index 556ddb2c..092688a6 100644
--- a/app/views/customer/components/customercomplaints.view.php
+++ b/app/views/customer/components/customercomplaints.view.php
@@ -119,8 +119,9 @@
[equipment_name] => BBQ Grill
[item_number] => I000539029
[equipment_cost] => 5600.00 -->
-
-
Equipment List
+
+
Equipment List
+
diff --git a/app/views/customer/components/item.view.php b/app/views/customer/components/item.view.php
index 17896660..fe0f064d 100644
--- a/app/views/customer/components/item.view.php
+++ b/app/views/customer/components/item.view.php
@@ -5,31 +5,32 @@
-
rentalservice_name); ?>
+
rentalservice_name); ?>
-
+
-
+
-
name); ?>
+
name); ?>
description); ?>
-
-
+
-
-
Rs. total); ?>
+
+
Rs. total); ?>
+
diff --git a/app/views/customer/orders.view.php b/app/views/customer/orders.view.php
index 127c3c00..38b3c936 100644
--- a/app/views/customer/orders.view.php
+++ b/app/views/customer/orders.view.php
@@ -6,53 +6,32 @@
?>
-
-
+
+
-
-
-
+
-
-
Orders
-
+
Orders
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
@@ -486,24 +465,27 @@ function paymentGateWay(data) {
xhttp.send();
}
-
-
-
-
-
-
-
-
-
+
+
+
+
diff --git a/app/views/customer/rent.view.php b/app/views/customer/rent.view.php
index 9fb1bb41..c63e3f21 100644
--- a/app/views/customer/rent.view.php
+++ b/app/views/customer/rent.view.php
@@ -91,15 +91,15 @@
-
diff --git a/app/views/sections/guide.php b/app/views/sections/guide.php
index 7121f0cd..10a74fe2 100755
--- a/app/views/sections/guide.php
+++ b/app/views/sections/guide.php
@@ -28,12 +28,12 @@
$user = $_SESSION['USER']; ?>
diff --git a/app/views/sections/hero.php b/app/views/sections/hero.php
index b7f10abe..14af4264 100755
--- a/app/views/sections/hero.php
+++ b/app/views/sections/hero.php
@@ -29,12 +29,12 @@
$user = $_SESSION['USER']; ?>
diff --git a/app/views/sections/rental-service.php b/app/views/sections/rental-service.php
index 71328466..f81d7e5f 100755
--- a/app/views/sections/rental-service.php
+++ b/app/views/sections/rental-service.php
@@ -13,12 +13,12 @@
$user = $_SESSION['USER']; ?>
diff --git a/public/assets/images/404-error.png b/public/assets/images/404-error.png
new file mode 100644
index 00000000..59feee8e
Binary files /dev/null and b/public/assets/images/404-error.png differ
diff --git a/public/assets/scss/wl/dashboard/_button.scss b/public/assets/scss/wl/dashboard/_button.scss
index dfd92b00..3c1bf7b5 100644
--- a/public/assets/scss/wl/dashboard/_button.scss
+++ b/public/assets/scss/wl/dashboard/_button.scss
@@ -130,7 +130,7 @@
width: fit-content;
cursor: pointer;
border: none;
- padding: 10px;
+ padding: 8px 16px;
// font-family: "poppins", sans-serif;
& i {
@@ -143,15 +143,15 @@
// btn-text-green with border
&.border {
- border: 2px solid $color-primary;
+ border: 1px solid $color-primary;
border-radius: 10px;
min-width: 100px;
&:hover {
- border: 2px solid $color-primary;
+ border: 1px solid $color-primary;
text-decoration: none;
// shadow
- box-shadow: 0px 2px 5px 2px rgba(0, 0, 0, 0.2);
+ box-shadow : 0px 1px 10px 1px rgba(105, 105, 105, 0.5);
}
}
@@ -182,22 +182,22 @@
width: fit-content;
cursor: pointer;
border: none;
- padding: 10px;
+ padding: 8px 16px;
// font-family: "poppins", sans-serif;
& i {
margin-right: 5px;
}
&.border {
- border: 2px solid $blue;
+ border: 1px solid $blue;
border-radius: 10px;
min-width: 100px;
&:hover {
- border: 2px solid $blue;
+ border: 1px solid $blue;
text-decoration: none;
- box-shadow: 0px 2px 5px 2px rgba(0, 0, 0, 0.2);
+ box-shadow : 0px 1px 10px 1px rgba(105, 105, 105, 0.5);
}
}
@@ -215,7 +215,7 @@
width: fit-content;
cursor: pointer;
border: none;
- padding: 10px;
+ padding: 8px 16px;
// font-family: "poppins", sans-serif;
& i {
@@ -223,15 +223,15 @@
}
&.border {
- border: 2px solid $orange;
+ border: 1px solid $orange;
border-radius: 10px;
min-width: 100px;
&:hover {
- border: 2px solid $orange;
+ border: 1px solid $orange;
text-decoration: none;
- box-shadow: 0px 2px 5px 2px rgba(0, 0, 0, 0.2);
+ box-shadow : 0px 1px 10px 1px rgba(105, 105, 105, 0.5);
}
}
@@ -249,7 +249,7 @@
width: fit-content;
cursor: pointer;
border: none;
- padding: 10px;
+ padding: 8px 16px;
// font-family: "poppins", sans-serif;
& i {
@@ -257,15 +257,15 @@
}
&.border {
- border: 2px solid $red;
+ border: 1px solid $red;
border-radius: 10px;
min-width: 100px;
&:hover {
- border: 2px solid $red;
+ border: 1px solid $red;
text-decoration: none;
- box-shadow: 0px 2px 5px 2px rgba(0, 0, 0, 0.2);
+ box-shadow : 0px 1px 10px 1px rgba(105, 105, 105, 0.5);
}
}
@@ -444,7 +444,7 @@
width: fit-content;
cursor: pointer;
border: none;
- padding: 10px;
+ padding: 8px 16px;
// font-family: "poppins", sans-serif;
&:hover{
diff --git a/public/assets/scss/wl/dashboard/_customer.scss b/public/assets/scss/wl/dashboard/_customer.scss
index fbb6142c..428ac79c 100644
--- a/public/assets/scss/wl/dashboard/_customer.scss
+++ b/public/assets/scss/wl/dashboard/_customer.scss
@@ -786,3 +786,12 @@
}
}
+//view item on rent page
+.rent-item-view-price{
+ font-size: 2rem;
+ font-weight: 600;
+ color: $gray-text;
+ // justify-content: center;
+ // align-items: center;
+}
+
diff --git a/public/assets/scss/wl/dashboard/_home.scss b/public/assets/scss/wl/dashboard/_home.scss
index a95bde49..afb76f41 100644
--- a/public/assets/scss/wl/dashboard/_home.scss
+++ b/public/assets/scss/wl/dashboard/_home.scss
@@ -88,4 +88,21 @@
margin-top: 2rem;
}
}
+}
+
+.error-container{
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ // height: 50%;
+ // width: 50%;
+ // // background-color: red;
+
+ .error-img {
+ height: 50%;
+ width: 50%;
+ object-fit: cover;
+ overflow: visible;
+ }
}
\ No newline at end of file