ksquareincmx / conference-server Goto Github PK
View Code? Open in Web Editor NEWManage conference rooms inside you organization
License: MIT License
Manage conference rooms inside you organization
License: MIT License
Case 1 the bug happens:
1- having a booking and wanting to edit it.
2- Edit the end time.
3- the server returns a 204 but the database is not updated
this happens when the new time of the meeting collides with the time in the database, if you try to edit without changing the time this error happens too.
Case 2 the bug doesn't happens:
1- having a booking from 3:00 pm to 4:00 pm and wanting to edit it.
2- Edit the start time to 4 pm to 5 pm.
3- the server returns a 200 and the database is updated.
Consider this:
when compute room status the following date 2019-01-11T10:26:50-06:00 is considered as 2019-01-11T16:26:50, so the room status can be incorrect
add filters when get booking, consider:
Request
GET api/v2/booking?start[gte]=2019-03-07T12:00:00Z&end[lte]=2019-03-11T00:00:00Z&roomId[eq]=1
Returns all the bookings between 2019-03-07T12:00:00 - 2019-03-11 in the room 1
frontend log out
some users need to invite themselves to create the booking
add pagination to URI /api/v2/booking
Request: /api/v2/booking?page=1&pageSize=2
Response:
{
"_pagination": {
"size": 2
"prev": null,
"next": 2
},
"bookings": []
}
Constrains:
Change the time zone of the server to match the time of México City (GMT-06:00).
Scenario 1: The user provides the following data:
System response: Show the scheduled meeting details
Scenario 2: The user provides the following data:
System response: Show error messaging detailing what data is wrong and why
Implement a middleware to validate the data at the request level so that we can eliminate the data validation in controllers which does not currently follow the SRP.
Instead of having repeated logic and validations all over the place add a storageService
Instead of this:
if (localStorage.getItem('cb_jwt') && localStorage.getItem('cb_user')) {
const user = JSON.parse(localStorage.getItem('cb_user'));
const jwt = JSON.parse(localStorage.getItem('cb_jwt'));
this.setState({ user, jwt });
}
Favor this:
const item = storage.getAuthToken();
if (item) {
// ...
}
Request
POST api/v2/booking
Response
{
"_pagination": {
"size": 10,
"prev": null,
"next": null
},
"bookings": [
{
"id": 1,
"description": "This is a booking",
"start": "2019-03-28T18:24:00.000Z",
"end": "2019-03-28T18:25:00.000Z",
"user_id": 1,
"room_id": 1,
"event_id": "fhlffd8j6ts4erqp6fi316fB3B",
"updated_at": "2019-03-20T14:42:58.000Z",
"created_at": "2019-03-20T14:42:58.000Z",
"attendees": [
"[email protected]"
],
"room": {
"id": 1,
"name": "Conference 1",
"color": "Red",
"presence": false,
"created_at": "2019-03-19T21:08:56.000Z",
"updated_at": "2019-03-19T21:08:56.000Z"
},
"user": {
"id": 1,
"picture": ,
"name": "Admin",
"email": "[email protected]"
}
}
]
}
For the backend we will be using mocha + chai + nyc.
At the beginning of the project didn't follow the best practices, so the code is a little bit messy, define a strategy to refactor/rewrite the code
Case A:
1.- There is a booking in room 1 that goes from 10 am to 11 am.
2.- There is a request to create a booking that goes from 9 am to 10:15 am.
3.- Backedn should response that the hours are colliding.
Case B:
1.- There is a booking in room 1 that goes from 10 am to 11 am.
2.- There is a request to create a booking that goes from 9 am to 13 pm.
3.- Backedn should response that the hours are colliding.
Case C:
1.- There is a booking in room 1 that goes from 10 am to 11 am.
2.- There is a request to create a booking that goes from 10:15 am to 10:30 pm.
3.- Backedn should response that the hours are colliding.
Case D:
1.- There is a booking in room 1 that goes from 10 am to 11 am.
2.- There is a request to create a booking that goes from 10:30 am to 13 pm.
3.- Backedn should response that the hours are colliding.
Define errors message format in responses, actually only returns a string, see errors message in https://github.com/ksquareincmx/poc-chef-server
Validate the emails in the following endpoints:
Use the room name as a location
Design of the user interface of the page to show a specific appointment/booking (by id) to show the detailed information.
see normalize
for reference, (here)
Actually the frontend is not consuming the room API, brecause the admin site is not ready yet.
The interfaces use is little confusing, because the front is sending th room info in the camelCase style, so the maybe the mappers are not necessary at all in that case. The backend is sending as response a room in dto format, maybe is not necessary also.
Maybe a little check will be good!
the user that cannot cancel a past meeting
Use JSDoc format, see here for more information
Modifies resources mappers for return only necessary information
Scenario 1: The user provides the following data dragging the mouse:
future date
start date (during working hours)
The user provides the following data typing in their corresponding fields
end date (during working hours)
Conference room registered and available
People involved (emails)
A reason for the appointment
System response: Show the scheduled meeting details
We must keep the README file up to date. Please add the missing info
Use JSDoc format, see here for more information
For the frontend we will be using jest + enzyme to write our tests.
Use JSDoc format, see here for more information
The frontend and the backend now are in different repositories. The docker-compose try to build the frontend which not exists, so its necessary to remove the frontend.dockerfile and update the docker-compose
extend prettier config
Use JSDoc format, see here for more information
GET api/v2/booking must support associations
Request
GET api/v2/booking?include=["Room","User"]
Response
{
"_pagination": {
"size": 10,
"prev": null,
"next": null
},
"bookings": [
{
"id": 1,
"description": "This is a booking",
"start": "2019-03-26T16:24:00.000Z",
"end": "2019-03-26T16:25:00.000Z",
"room_id": 2,
"user_id": 43,
"created_at": "2019-03-11T14:28:49.000Z",
"updated_at": "2019-03-11T14:28:49.000Z",
"room": {
"id": 2,
"name": "Conference 2",
"color": "Red"
},
"user": {
"id": 43,
"name": "Admin",
"email": "[email protected]"
},
"attendees": [
"[email protected]"
]
}
]
}
Add a parameter to the GET /api/v1/Booking request to obtain only the reservations that exist in the indicated time period.
Use JSDoc format, see here for more information
In slack is possible to add a text at the right of the command as we are working with console commands. Ej.
/booking this is a text
The proposal is to use the channel and user information that slack provides for improve the way the user add new attendees, for example:
/booking @DanielB @Javier Mijangos
Using this format and enabling the Escape channels, users, and links sent to your app option in slack app's admin can allow to "translate" channel or user mentions into their correlated IDs; so the command above will send a text with the following text content:
/booking <@U012ABCDEF> <@U016PBFDES>
Having the user id's, we can do some request to the Slackl Web API for get info about that specific user's, particularly the email first part (daniel.basulto in [email protected]) and automatize the attendees adding and and build a simpler new appointment dialog.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.