This is a simple React IT Logger application that uses redux for state management. The application uses a local db.json
file to simulate a database.
If you don't already have a GitLab profile setup you'll have to create one and apply your computers SSH key to the profile. This will allow you to pull and push to this repository.
Follow the steps to setup your GitLab and SSH key here
git clone [email protected]:peterlehto/it-logger.git
cd it-logger
npm install
npm run dev
will start the application and json server concurrently.- The application will be served on
http://localhost:3000
.
- The application displays "IT logs" from the database.
- You can create new "IT logs" by clicking blue button in the bottom right corner (screenshot below).
- You can edit existing "IT logs" by clicking the title of the log.
- You can create new "Technicians" by hovering over the blue button and then clicking the red button (screenshot below).
- You can delete a log by clicking the Trashcan icon.
Please create a new branch using your name and date as the branch name eg. peter-10-01-2022
Complete the following tests:
-
Create a new Technician -
./src/components/techs/AddTechModal.js
- Add inputs for First Name and Last Name.
onChange
store thefirstName
andlastName
inputs in state.onSubmit
the technician must be saved to the database.- Use the
addTech
redux action provided to save the new technician to thedb.json
"database". - Clear input fields after save.
-
Add Log Modal Select a Technician -
./src/components/logs/AddLogModal.js
- Add a select dropdown to select a technician
tech
.- Use the
./src/components/techs/TechSelectOptions.js
component for your select options. - Complete the
TechSelectOptions
component to list all the technicians in a dropdown list.
- Use the
onChange
store thetech
in state.onSubmit
the log with the selectedtech
must be saved to thedb.json
"database".- Use the
addLog
action provided. - Clear all input fields after save.
- Add a select dropdown to select a technician
-
Edit Log Modal Select a Technician -
./src/components/logs/EditLogModal.js
- Add a select dropdown to select a technician
tech
.- Use the
./src/components/techs/TechSelectOptions.js
component for your select options.
- Use the
onChange
store thetech
in state.onSubmit
the log with the selectedtech
must be saved to thedb.json
"database".- Use the
updateLog
action provided. - Clear all input fields after save.
- Add a select dropdown to select a technician
-
Complete the deleteLog action -
./src/actions/logActions.js
- Complete the
deleteLog
action to delete a log from the database. - Dispatch a
DELETE_LOG
reducer. - Show a toast message that a log has been deleted.
- Complete the
-
Complete the DELETE_LOG reducer -
./src/reducers/logReducer.js
- Complete the
DELETE_LOG
reducer used by thedeleteLog
action. - Delete the log from the database and update the state.
- Show a toast message that a log has been deleted.
- Complete the
-
Create a GitLab Pull Request
- Create a pull request from your branch to
master
. - Add a description and screenshots.
- Create a pull request from your branch to