ksquareincmx / poc-chef-client Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
extend prettier config
Due to an user cannot cancel or edit a past event, those options are irrelevant.
as a partner
I want to view a particular event (current and/or past)
Scenario 1:
user tries to see a particular event
Sytem Reponse: shows the user the event
Scenario 2:
user tries to see a non-existing event
Sytem Reponse: notifies the user that the event doesn't exists
Scenario 3:
user tries to see a particular event, but the service is not available
Sytem Reponse: notifies the user that the service is not available
as a partner
I want to cancel a current event
Contraints:
Scenario 1:
partner
tries to delete an existing (and current) event
System Response: notifies the user that the event was deleted
Scenario 2:
the partner
tries to delete an existing past event
System Response: notifies the partner that you cannot cancel a past event
Scenario 3:
the partner
tries to delete a non-existing event
System Response: notifies the partner that the event doesn't exist
We are moving away from classes
in order to adopt hooks
(See #21)
Implement an HttpApiGateway that implements the following interface:
Create an order view
We need to add support for absolute
imports
// good
import { EventMapper } from 'mappers'
// bad :(
import { EventMapper } from '../../mappers/'
Add edit profile route and page
Bad behavior in currentEvents->viewEvent:
Component path: src/partner/modules/EventList/EventOrdersContainer.tsx
Correct behavior :
unpaid orders
(first checkbox)move orders to paid
unpaid orders
is emptypaid orders
to see all paid ordersBad behavior:
When you change the tab to paid orders
or unpaid orders
after moving some orders,
moved orders still checked.
this happens when handleShowTabs function
is called when the user change the tab to "paid orders" this modifies showPaidOrder state
to true, then it calls handleCheckAll(false)
to reset all the checkboxes in the current tab (in this case paid orders
), but when handleCheckAll
is invoked showPaidOrder state
still false
We don't need to have multiple mappers for the same entity
// mappers/Event.ts
const toEvent = (eventDto: IEventDto): IEvent => {}
const toEventDto = (event: IEvent): IEventDto => {}
const toNewEvent = (newEventDto: INewEventDto): INewEvent => {}
const toNewEventDto = (newEvent: INewEvent): INewEventDto => {}
update to react >=18.8
If you enter to the partner/
it should redirect to current-events
, see
as a partner
I want to edit an existing event
Input Data:
Contraints:
Scenario 1
user tries to edit an existing event with the following data
System Response: notifies the user that the event was edited
Scenario 2:
the user tries to edit an existing event but inputs the wrong data,
System Response: display error messages below the fields (see error list)
Scenario 3: user tries to edit a non-existing event
System Response: notifies the user that the event doesn't exist
Error List
As a user I want to be able to see a list of current events.
Constraints:
Scenario 1: show all
user tries to see the list of current events
System Response: shows the user the list of events (ordered from newest to oldest)
Scenario 2: no current events
user tries to see the list of current events
System Response: shows an empty list message
Scenario 3: service not available
user tries to see the list of current events, but the service is not available
System Response: notifies the user that the service is not available
Partner app:
protect any partner/ sub-route from no authenticated users
if user is no logged must be redirected to partner/login
not authenticated users can only go to partner/ and partner/login routes
when user is logged and go to partner/login must be redirected to partner/current-events
User app:
protect any user/ sub-route from no authenticated users
if user is no logged must be redirected to user/login
not authenticated users can only go to user/ and user/login routes
when user is logged and go to user/login must be redirected to user/my-orders
as a partner
I want to mark an event as finished.
Scenario 1:
partner
tries to mark a current event as finished
System Response: notifies the user that the event has been marked as finished.
Scenario 2:
partner
tries to mark a non-existing event as finished
System Response: notifies the user that the event doesn't exist
Scenario 3:
partner
tries to mark a past event as finished
System Response: notifies the user that the event has been marked as finished
Replace promises by async/await
:
getCurrentEvents: async () => {
try {
const res = await fetch('...');
const data = await res.json();
return data.events.map(EventMapper.toEntity);
} catch(err) {
// add proper error handling
}
}
Should create a new event using the event form
Constrains:
We must keep the README file up to date. Please add the missing info
as a partner
I want to mark one or many orders from a particular event as not paid
Scenario 1:
partner
tries to mark one or many orders as not paid
System Response: notifies the user that those orders were marked as not paid
Scenario 2:
partner
tries to mark one or many non-existing orders as not paid
System Response: notifies the user that those orders doesn't exist
Scenario 3:
partner
tries to mark one or many orders as not paid but the service is not available
System Response: notifies the user that the service is not available
This is useful when wanna show more than text or an UL list;
as a partner
I want to mark one or many orders from a particular event as paid
Scenario 1:
partner
tries to mark one or many orders as paid
System Response: notifies the user that those orders were marked as paid
Scenario 2:
partner
tries to mark one or many non-existing orders as paid
System Response: notifies the user that those orders doesn't exist
Scenario 3:
partner
tries to mark one or many orders as paid but the service is not available
System Response: notifies the user that the service is not available
Test user new order view useReducer
This includes partner/interfaces
and client/interfaces
Add a user login view
Add styles to components and reorganize the existing ones.
as a partner
I want to create a new event
Input Data:
Contraints:
Scenario 1
user tries to create new user with the following data
System Response: notifies the user that the event was created
Scenario 2:
the user tries to create a new event but inputs the wrong data,
System Response: display error messages below the fields (see error list)
Error List
Every file now must have named exports
, no more default exports
And every layer
directory should have an index.ts
that exports everything
Example:
// mappers/EventMapper
export const toEntity = () => {
// ...
}
// mappers/index.ts
import * as EventMapper from './EventMapper'
export { EventMapper }
// services/EventService
import { EventMapper } from 'mappers'
As a user I want to be able to see a list of past events.
Constraints:
Scenario 1: show all
user tries to see the list of past events
System Response: shows the user the list of events (ordered from newest to oldest)
Scenario 2: no past events
user tries to see the list of past events
System Response: shows an empty list message
Scenario 3: service not available
user tries to see the list of past events, but the service is not available
System Response: notifies the user that the service is not available
everything shared between the partner and the client should be in this directory
Requires:
username
password
Constrains:
Both username and password must be an string
Scenario 1:
User types an username that doesn't exist:
System response: "Username doesn't exist"
Scenario 2:
User types a wrong password:
System response: "Invalid password"
Scenario 3:
User types correct username and password,
System response: Redirect user to current events view
View:
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.