bsoc-bitbyte / busify

A centralised bus ticket booking system that will allow the students to book tickets in advance through an online website, saving time and effort.
https://busify.vercel.app
30 stars 67 forks source link

feat(ticket-page): implement dynamic cards for ticket page #88 #93

Open Vaibhavsahu2810 opened 1 week ago

Vaibhavsahu2810 commented 1 week ago

Overview

  1. This PR fixes or fixes part of #88 .
  2. This PR does the following: This pull request introduces significant changes and new features related to the ticketing system in both the backend and frontend of the application. The key enhancements include modifying backend services and controllers, seeding data according to a new schema, fetching and displaying ticket data dynamically on the frontend, and adding filtering functionality.

Essential Checklist

Proof that changes are correct

https://www.loom.com/share/14777e7eb2c94aaa8022051b1a7bde4c?sid=10910a6d-4717-4e03-b0c7-86729946abd5 Above i have provided the video link as the proof of my changes

Changes in Backend

  1. Modified ticket.service.ts:

    • Updated the service methods to align with the new schema.
    • Implemented logic to create and manage tickets with the new attributes, ensuring proper interaction with the database.
  2. Modified ticket.controller.ts:

    • Adjusted the endpoints to accommodate the changes in the service layer.
    • Added new endpoints or updated existing ones to support fetching, creating, and managing ticket data as per the new schema.
  3. Updated seed.mjs:

    • Updated the seed data script to reflect the new schema.
    • Ensured the seeded data is consistent and includes all necessary attributes for testing and development purposes.

Changes in Frontend

  1. Fetched Ticket Data:

    • Implemented API calls to fetch ticket data from the backend URL.
    • Ensured data is retrieved efficiently and handled any potential errors gracefully.
  2. Ticket Component:

    • Created or updated the ticket component to display ticket data dynamically.
    • Utilized the fetched data to populate the component, ensuring it reflects the latest ticket information.
  3. Profile Page Integration:

    • Integrated the ticket component into the profile page.
    • Ensured that the user's tickets are displayed correctly and updated dynamically as needed.
  4. Filtering Functionality:

    • Added the ability to filter ticket data based on user needs.
    • Implemented various filtering options, such as by date, status, or other relevant criteria.
    • Ensured the filtering is efficient and provides a seamless user experience.

PR Pointers

vercel[bot] commented 1 week ago

@Vaibhavsahu2810 is attempting to deploy a commit to the Busify Team on Vercel.

A member of the Team first needs to authorize it.

RISHIKESHk07 commented 1 week ago

@Vaibhavsahu2810 please make sure prisma schema you are following is same as @rohansen856 once as well , code looks fine anyway , @Pratik2026 any suggestions ?

Vaibhavsahu2810 commented 1 week ago

@RISHIKESHk07 i have successfully verified the schema with @rohansen856

RISHIKESHk07 commented 1 week ago

@Vaibhavsahu2810 i see a few small conflicts , please fix it and maybe show a demo of the working of the page as well

Vaibhavsahu2810 commented 1 week ago

@Vaibhavsahu2810 i see a few small conflicts , please fix it and maybe show a demo of the working of the page as well

@RISHIKESHk07 successfully resolved the conflicts and here is the proof of work https://www.loom.com/share/8ea4380ca836449285158a497f94e849?sid=3906a217-3a63-4cf7-acec-1d7acc0ed7ca