coteh / logistics Goto Github PK
View Code? Open in Web Editor NEW:rose: :rocket: Rose Rocket Coding Challenge
:rose: :rocket: Rose Rocket Coding Challenge
You can see here:
logistics/src/domain/validator/DriverTaskValidator.ts
Lines 36 to 61 in 473ac56
that the "invalid" driver task check is just one small part of the function, and the rest of it checks for conflicting tasks. I think that this should be refactored so that there's one function that checks for validity of driver task and the other checks for whether driver tasks conflict with other tasks.
Update TSDoc comments and tests as well.
Small oversight when originally designing the scheduling system. Add ability to schedule between discrete times of 11 PM to 12 AM, but without it going into the next day. This would likely require a new discrete time value be added (25 since original requirement for discrete time was 1-24 IIRC) and can only be selected when selecting end time.
src/App.spec.tsx
โ Console
console.error
Warning: An update to App inside a test was not wrapped in act(...).
When testing, code that causes React state updates should be wrapped into act(...):
act(() => {
/* fire events that update state */
});
/* assert on the output */
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act
in App (at App.spec.tsx:7)
79 | .getWeeklyUserTasks(selectedUserID, selectedWeek, loggedInUser)
80 | .then((res: DriverTask[]) => {
> 81 | setTasks(res);
| ^
82 | })
83 | .catch((err: ServiceError) => {
84 | console.log(err.message);
at printWarning (node_modules/react-dom/cjs/react-dom.development.js:88:30)
at error (node_modules/react-dom/cjs/react-dom.development.js:60:5)
at warnIfNotCurrentlyActingUpdatesInDEV (node_modules/react-dom/cjs/react-dom.development.js:23284:7)
at setTasks (node_modules/react-dom/cjs/react-dom.development.js:15656:9)
at src/App.tsx:81:9
Add a "description" field for driver tasks, and add an input field for specifying description when adding or editing a driver task.
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.