- Node.js (v18)
- npm
cd client
npm install
npm run dev
cd server
npm install
npm run start
- Run
npm run test
to run tests
- Route
/
: landing page of the application - Route
/admin
: admin dashboard - Route
/admin/counters
: counters table view - Route
/admin/edit-counters/:counterId
: edit counter form - Route
/admin/services
: services table view - Route
/officer
: officer control panel to call next client - Route
/client
: client page to get a new ticket - Route
/client/:serviceName/ticket/:ticketNumber
: ticket page for the specific service - Route
/*
: error route page
All commands have to be done in the server
folder.
-
GET
/
- parameters: none
- response :
- 200 : { message: string }
-
GET
/counter/:counterId/callNextClient
- parameters:
- counterId: number - the id of the counter
- response :
- 200 : { data: number } - the ticket number of the next client
- 204 : { } - no client to call
- 404 : { message: string } - counter with the given id not found
- parameters:
-
GET
/service/:serviceId/getTicket
- parameters:
- serviceId: number - the id of the service
- response :
- 200 : { data: number } - the ticket number of the client
- 404 : { message: string } - service does not exists or is not provided by a counter
- parameters:
-
GET
/counter/retCounters
- response :
- 200 : {data: {Object}} - get all counters
- 404 : { message: string} - no couters found
- response :
-
GET
/counter/getData
- response :
- 200 : {data: {Object}} - get all counters with releted sevices
- 404 : { message: string} - no couters found
- response :
{
"currentTicketNumber": 0,
"services": [
{
"id": <number>,
"name": <string>,
"serviceTime": <number>,
"description": <string>,
"color": <string>
}
],
"counters": [
{
"id": <number>,
"services": <number[]>,
"clients": <number[]>,
"servedClient": <number>
}
]
}
Note: the clients property in "counters" is a queue of ticket numbers
ErrorPage
(inErrorPage.jsx
): component used to handle wrong client routesLandingPage
(inLandingPage.jsx
): component used to access the app with a different role (client, officer or admin)AdminPage
(inAdminPage.jsx
): component used to access the admin dashboard and navigate the tabsCountersTable
(inCountersTable.jsx
): component used to display all the counters and related services each counter hasCountersForm
(inCountersForm.jsx
): component used to add or remove services from a specific counterServicesTable
(inServicesTable.jsx
): component used to display all the services and the metadata attached to each serviceOfficerPage
(inOfficerPage.jsx
): component used to access the officer dashboard and select a counter to call the next client in lineClientPage
(inClientPage.jsx
): component used to let the client choose a service and get a ticket