diff --git a/client/src/pages/HBContestPage.tsx b/client/src/pages/HBContestPage.tsx index 20bd235..65b7940 100644 --- a/client/src/pages/HBContestPage.tsx +++ b/client/src/pages/HBContestPage.tsx @@ -173,7 +173,7 @@ export default function HBContestPage() {
{topUser && ( -
+

{topUser.name}

@@ -181,8 +181,8 @@ export default function HBContestPage() {
{top5Users.map((user, index) => ( -
- {index + 2} +
+ {index + 2} {user.name}
))} diff --git a/client/src/pages/HBFormPage.tsx b/client/src/pages/HBFormPage.tsx index fe5bd1f..cd5e1b8 100644 --- a/client/src/pages/HBFormPage.tsx +++ b/client/src/pages/HBFormPage.tsx @@ -21,11 +21,21 @@ const validationSchema = Yup.object({ .positive("Must be a positive value") .max(99999.99, "Value is too large") .required("Water bill is a required field"), + totalBill: Yup.number() + .typeError("Must be a number") + .positive("Must be a positive value") + .max(99999.99, "Value is too large") + .required("Total bill is a required field"), noOfDependents: Yup.number() .typeError("Must be a number") .integer("Must be a whole number") .positive("Must be a positive value") .required("No. of dependents is a required field"), + avgBill: Yup.number() + .typeError("Must be a number") + .positive("Must be a positive value") + .max(99999.99, "Value is too large") + .required("Average bill is a required field"), ebPicture: Yup.mixed().required("Electrical bill picture is required"), wbPicture: Yup.mixed().required("Water bill picture is required"), }); diff --git a/client/src/pages/SchedulePage.tsx b/client/src/pages/SchedulePage.tsx index 1cdf8f0..693fdd3 100644 --- a/client/src/pages/SchedulePage.tsx +++ b/client/src/pages/SchedulePage.tsx @@ -20,7 +20,7 @@ import React from "react"; interface Schedule { id: number; - dateTime: string; + dateTime: Date; location: string; postalCode: string; status: string; @@ -49,8 +49,10 @@ export default function SchedulePage() { .then((res) => { const schedules = res.data.map((schedule: Schedule) => ({ ...schedule, - dateTime: new Date(schedule.dateTime), // Ensure dateTime is a Date object + dateTime: new Date(schedule.dateTime), // Convert dateTime to Date object })); + // Sort schedules by dateTime in descending order + schedules.sort((a: Schedule, b: Schedule) => b.dateTime.getTime() - a.dateTime.getTime()); setScheduleList(schedules); }) .catch((err) => { @@ -86,8 +88,10 @@ export default function SchedulePage() { .then((res) => { const schedules = res.data.map((schedule: Schedule) => ({ ...schedule, - dateTime: new Date(schedule.dateTime), // Ensure dateTime is a Date object + dateTime: new Date(schedule.dateTime), // Convert dateTime to Date object })); + // Sort schedules by dateTime in descending order + schedules.sort((a: Schedule, b: Schedule) => b.dateTime.getTime() - a.dateTime.getTime()); setScheduleList(schedules); }) .catch((err) => { @@ -156,49 +160,45 @@ export default function SchedulePage() { ))} -
-
-
-
- - -

Paper

-

$0.05 to 0.20/KG

-
    -
  • Cardboard ($0.20/kg)
  • -
  • Newspaper and B&W ($0.11/kg)
  • -
  • Mix paper ($0.05/kg)
  • -
-
-
-
-
- - -

Paper

-

$0.05 to 0.20/KG

-
    -
  • Cardboard ($0.20/kg)
  • -
  • Newspaper and B&W ($0.11/kg)
  • -
  • Mix paper ($0.05/kg)
  • -
-
-
-
-
- - -

Paper

-

$0.05 to 0.20/KG

-
    -
  • Cardboard ($0.20/kg)
  • -
  • Newspaper and B&W ($0.11/kg)
  • -
  • Mix paper ($0.05/kg)
  • -
-
-
-
-
+
{/* Adjust gap size as needed */} +
{/* Flex 1 for equal sizing and padding */} + + +

Paper

+

$0.05 to 0.20/KG

+
    +
  • Cardboard ($0.20/kg)
  • +
  • Newspaper and B&W ($0.11/kg)
  • +
  • Mix paper ($0.05/kg)
  • +
+
+
+
+
+ + +

Electronics

+

$2 to 50/KG

+
    +
  • Flat TV ($5++)
  • +
  • Laptop ($10++)
  • +
  • Smartphone ($10++)
  • +
+
+
+
+
+ + +

Clothes

+

$0.20/KG

+
    +
  • Shoe
  • +
  • Jewellery
  • +
  • Bag
  • +
+
+