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

[Feature Request]: Implement Dynamic Cards for Ticket Page #88

Open RISHIKESHk07 opened 2 weeks ago

RISHIKESHk07 commented 2 weeks ago

Is your feature request related to a problem? Please describe.

The current implementation of ticket page cards involves hard-coded data. To make the cards dynamic, the data needs to be fetched from the backend. This task requires fetching data using Nest.js, Prisma, and PostgreSQL, and placing the information accurately where it's required. Dummy data can be inserted into the database for testing purposes.

Refer issue #82 for Created Card components , you will have just fetch data and insert it into the componenets

Describe the solution you'd like

Figma File

Figma File Link

Tasks

Describe alternatives you've considered

No response

Developer Help

Ping us once before starting this issue on discord

Vaibhavsahu2810 commented 2 weeks ago

@RISHIKESHk07 i would like to work on this issue. To fetch data from backend i will create a folder of ticket in backend/src and create a new function in its ticket.service.ts to fetch data from prisma command .findMany() and create a controller.ts to create a route of it after that to seed the data i will create a file seed.mjs in prisma folder and seed data using .createMany() function then i will fetch this data in frontend file and populate this data according to the information needed in frontend file.There is no task to add auth in it but if you want i can add it using authGuard of nest in ticket.controller.ts and from frontend i will send req with credentials currently my all pr's are merged and not assigned in any issue

Om-Thorat commented 2 weeks ago

hello, I would like to work on this issue i will create 3 files ie ticket.controller.ts , ticket.module.ts , ticket.service.ts in the backend/src/Tickets folder. I'll use the ticket model described in schema.prisma or modify it if needed and put the demo data in seed.mjs . On the frontend i'll use axios on the frontend to fetch the data and will send it withcredentials too, from the backend i'll ensure only the tickets for the logged in user are fetched and sent to the frontend.

RISHIKESHk07 commented 2 weeks ago

@Vaibhavsahu2810 will be taking this one ,as he commented this first

Vaibhavsahu2810 commented 2 weeks ago

@RISHIKESHk07 please provide me access of figma file email id - sahusv4527@gmail.com