Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Log BE/FE Integration #81

Closed
4 of 5 tasks
Safewaan opened this issue Jun 3, 2023 · 1 comment · Fixed by #129
Closed
4 of 5 tasks

Create Log BE/FE Integration #81

Safewaan opened this issue Jun 3, 2023 · 1 comment · Fixed by #129
Assignees
Labels
Homepage Features related to the homepage

Comments

@Safewaan
Copy link
Collaborator

Safewaan commented Jun 3, 2023

Summary

This task involves integrating the completed front-end and back-end components to allow the user to create a new log through the application. This task has two requirements:

  • Update the input fields to use the corresponding data from the db
  • On submit, a new log is created in the db

Back-end Component: log_records_service.py
Front-end Component: CreateLog.tsx

Goals

  • Employee Select: Use the data from the users table. The employee should default to the current user, and the select should remain locked. There may be some investigation required on how to obtain the user id of the current user.
  • Resident Select; Use the data from the resident table. Currently, this is blocked until Create residence table in database #50 is merged in.
  • Tags Select: Use the data from the tags table. This is blocked until Linking tags and log records table #84 is merged. This input can be disabled as a workaround - NOT REQUIRED FOR MVP (Disable Input for now)
  • Attention To: Also use the data from the users table.
  • When the submit button is clicked on the "Create Log" modal, a new log is created in the database with the information the user inputted for the fields

Implementation

  • Create the corresponding API calls in front-end/src/APIClients
  • Update CreateLog.tsx to use data from the db for inputs
  • Include the API call to create a log in the onSubmit method
@Safewaan Safewaan added back-end involves back-end work front-end involves front-end work Homepage Features related to the homepage and removed back-end involves back-end work front-end involves front-end work labels Jun 3, 2023
@kevin-pierce kevin-pierce self-assigned this Jun 6, 2023
@Safewaan
Copy link
Collaborator Author

Safewaan commented Jun 6, 2023

@kevin-pierce just thought of this... but when you select a resident, should we display on the residents that are currently with SHOW? for context, we track the date they joined, and the date they left. If they have a value for date_left, that means they are no longer with SHOW, but they're in the system so they can be tracked for previous logs.

What are your thoughts? I need to bring this up with the designers and Hiba, but my thinking is that they should still be able to be selected, since a user may want to create a log for an event that occurred in the past. There should be some message that indicated to the user that they've selected a resident who's no longer with SHOW.

@kevin-pierce kevin-pierce added duplicate This issue or pull request already exists and removed duplicate This issue or pull request already exists labels Jun 13, 2023
This was referenced Jun 5, 2023
@Safewaan Safewaan linked a pull request Jul 11, 2023 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Homepage Features related to the homepage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants