kir-dev / pek-infinity

https://pek-infinity.vercel.app
1 stars 0 forks source link

Tickets page #46

Open tomitheninja opened 3 hours ago

tomitheninja commented 3 hours ago

Some actions require an approval from an authorized person. For example:

frontend:

Create a page, called "tickets" (or reuse the one from alumni web), that displays a list of requests with an accept / reject button.

Tickets should be grouped (different sections) into these categories:

kérvény létrehozó generált leírás (markdown) felhasználó megjegyzése állapot
1 Link tag-ben: profilkép, név A kérvény feladója csatlakozni szeretne a kir-dev körbe elfogadva
2 Link tag-ben: profilkép, név A kérvény feladója csatlakozni szeretne a svie körbe elfogadás | elutasítás

Closed and open tickets should be visually easily distinguishable. Add pagination and search features (the pek admin will see every ticket ever)

backend:

should be easily extendable by a new type of form.

only 3 public mutation service:

create a new ticket

createTicket(userId, { type: TicketType.EnterGroup })

Should do some sanity checks throw an error in scenerios like trying to create an existing group (same name), leaving entering SVIE while being a member of it, ... Should summarize the action in markdown format Should be a single service for all ticket type

close a ticket

acceptTicket(userId, { ticketId, reason: '' }) rejectTicket(userId, { ticketId, reason: '' }) Should call a worker method with the .data property of the ticket, before closing it. The worker method can then apply some effects on the DB.

only 4 controllers:

GET /?page=1&perPage=50&search="csatlakoz" POST /ticket (create new) POST /ticket/1/accept POST /ticket/1/reject

database

only 1 new database model and NOT one per each type.

linear[bot] commented 3 hours ago

KIR-549 Request approve / reject page