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

Ticket #199 and ticket #213 #228

Merged
merged 32 commits into from
Nov 7, 2023
Merged

Ticket #199 and ticket #213 #228

merged 32 commits into from
Nov 7, 2023

Conversation

BrettEastman
Copy link
Contributor

@BrettEastman BrettEastman commented Oct 27, 2023

#199 - Create view state for Edit view for individual student

  • Add VIEW_STATES object and conditionally render based on view state.
  • Add cancel button.
  • Move Archive button to EDIT view.
  • Add basic CSS to student_id using MaterialUI - Stack, Box, Container, etc..
  • Remove Return to Student page button in Student page and rename to Next IEP.
  • Import student object with intention to populate rows with current student info.
  • Add display gridTemplateColumns to TableRows.
  • Create state for each input item in student_id.tsx.
  • Create types for all props in EditStudentRow.
  • Create editStudent authenticated procedure.
  • Refine handleEditStudent with correct types and add page reload in student_id.tsx.
  • styling of buttons
  • Refactor Edit Student view state to have each EditStudentRow to be in student_id.tsx in their own Containers with slight gap between each.
  • Refactor EditStudentRow component MUI CSS - remove underlines and padding.
  • Add sx CSS to buttons to match design system requirements.
  • Apply custom styles to input, change TableRow gridInputColumns to match design, and add padding to y axis of each table cell.
Screenshot 2023-10-31 at 2 18 51 PM

#213 - Create "Add Staff" email invitation html.

  • rewrite the basic template as an html template literal in createPara authenticated procedure in para.ts
  • Add caseManagerName variable using nullish coalescing operator to createPara authenticated procedure, in para.ts, to enable adding case mananger's name as signature to the email.
  • Fix(para-email invitation): remove student's name from the email template from designers - discussed at Wednesday night meeting with the team.
Screenshot 2023-10-26 at 5 46 01 PM

@tessathornberry tessathornberry requested review from hieungo89, codetheweb and amantri and removed request for hieungo89 October 27, 2023 17:41
@BrettEastman BrettEastman changed the title Start to create view state for Edit view for individual student. Add … Ticket #199 and ticket #213 Oct 31, 2023
@BrettEastman BrettEastman marked this pull request as ready for review October 31, 2023 21:20
@@ -66,10 +68,10 @@ export const para = router({
to: email,
subject: "Para-professional email confirmation",
text: "Email confirmation",
html: "<h1>Email confirmation</h1><p>Please confirm your email by going to the following link: <a>no link yet</a></p>",
html: `<p>Dear ${first_name},</p><p>Welcome to the data collection team for SFUSD.EDU!</p><p>I am writing to invite you to join our data collection efforts for our students. We are using an online platform called <strong>Project Compass</strong> to track and monitor student progress, and your participation is crucial to the success of this initiative.</p><p>To access Project Compass and begin collecting data, please follow these steps:</p><ul><li>Go to the website: (<a href="https://staging.compassiep.com/">https://staging.compassiep.com/</a>)</li> <li>Login using your provided username and password</li><li>Once logged in, navigate to the dashboard where you would see the student goals page</li></ul><p>By clicking on the <strong>data collection</strong> button, you will be directed to the instructions outlining the necessary steps for data collection. Simply follow the provided instructions and enter the required data points accurately.</p><p>If you encounter any difficulties or have any questions, please feel free to reach out to me. I am here to assist you throughout the process and ensure a smooth data collection experience. Your dedication and contribution will make a meaningful impact on our students' educational journeys.</p><p>Thank you,</p><p>${caseManagerName}<br>Case Manager</p>`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐧 we can fix this later, but ideally the domain is pulled from the environment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, sounds good. I'll leave it for now, but let me know.

src/backend/routers/case_manager.ts Outdated Show resolved Hide resolved
src/components/editStudentRow/EditStudentRow.tsx Outdated Show resolved Hide resolved

const ViewStudentPage = () => {
const [createIepModal, setCreateIepModal] = useState(false);
const [archivePrompt, setArchivePrompt] = useState(false);
const [startDate, setStartDate] = useState("");
const [endDate, setEndDate] = useState("");
const [viewState, setViewState] = useState(0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if there's only two states, could this be

Suggested change
const [viewState, setViewState] = useState(0);
const [isEditing, setIsEditing] = useState(false);

instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not implemented this yet. I like the viewState way, but I will change it to boolean if you think it would help performance.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my personal preference is a boolean as it feels a bit clearer to me, but it's fine to leave as-is too :), no performance impact

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay great. I will leave it for now but may change it later. I am imagining there may be something similar we would have to do for ticket #200 and at that point, I would change both if they are both just using two states, which would be cleaner with a boolean.

src/pages/students/[student_id].tsx Outdated Show resolved Hide resolved
src/pages/students/[student_id].tsx Outdated Show resolved Hide resolved
@BrettEastman
Copy link
Contributor Author

BrettEastman commented Nov 3, 2023

Hi Max, thanks for reviewing this PR! I have refactored according to your suggestions or otherwise responded to your comments above. Thanks for your great and helpful suggestions!

BrettEastman and others added 18 commits November 6, 2023 16:14
…VIEW_STATES object and conditionally render based on view state. Add cancel button. Add temporary "tableBasic" as placeholder for EDIT view. Move Archive button to EDIT view. Add basic CSS using MaterialUI. Put in rough draft example of possible editStudent authenticated procedure in routers/case_manager.
…a sx.Remove Return to Student page button in Student page and rename to Next IEP. Add gap to Box and Stack.
…ct to populate rows with current student info. Add StudentType and EditStudentTableProps. Add display gridTemplateColumns to TableRows. Add student prop to student_id.tsx.
…omponent EditStudentRow. Create state for each input item in student_id.tsx. Create types for all props in EditStudentTable and EditStudentRow.
…ror in Table. Wrap Textfield in TableCell and customize attributes.
…ine handleEditStudent with correct types and add page reload in student_id.tsx.

Co-authored-by: Brandon Cruz-Youll <[email protected]>
… student_id.tsx in their own Containers with slight gap between each. Refactor EditStudentRow component MUI CSS - remove underlines and padding. Add sx CSS to buttons to match design system requirements.

Co-authored-by: Brandon Cruz-Youll <[email protected]>
…late. Add caseManagerName variable using nullish coalescing operator to createPara authenticated procedure, in para.ts, to enable adding case mananger's name as signature to the email.
… custom styles to input, change TableRow grideInputColumns to match design, and add padding to y axis of each table cell.
…er all Containers. Add Table and TableRow to EditStudentRow.

Co-authored-by: Brandon Cruz-Youll <[email protected]>
…it. Delete inline styles to the whole page.

Co-authored-by: Brandon Cruz-Youll <[email protected]>
…VIEW_STATES object and conditionally render based on view state. Add cancel button. Add temporary "tableBasic" as placeholder for EDIT view. Move Archive button to EDIT view. Add basic CSS using MaterialUI. Put in rough draft example of possible editStudent authenticated procedure in routers/case_manager.
BrettEastman and others added 13 commits November 6, 2023 16:23
…a sx.Remove Return to Student page button in Student page and rename to Next IEP. Add gap to Box and Stack.
…ct to populate rows with current student info. Add StudentType and EditStudentTableProps. Add display gridTemplateColumns to TableRows. Add student prop to student_id.tsx.
…omponent EditStudentRow. Create state for each input item in student_id.tsx. Create types for all props in EditStudentTable and EditStudentRow.
…ror in Table. Wrap Textfield in TableCell and customize attributes.
…ine handleEditStudent with correct types and add page reload in student_id.tsx.

Co-authored-by: Brandon Cruz-Youll <[email protected]>
… student_id.tsx in their own Containers with slight gap between each. Refactor EditStudentRow component MUI CSS - remove underlines and padding. Add sx CSS to buttons to match design system requirements.

Co-authored-by: Brandon Cruz-Youll <[email protected]>
…ast commit. Delete inline styles to the whole page."

This reverts commit 2e43c3a.
…EditStudentRows table component. Delete EditStudentRows. Use form with uncontrolled inputs rather than controlled values in state - delete useState for student name, grade, email. Add input style to global styles to remove outlines and borders.
…utton. Edit view form now completed refactored away from table.
…. Add width 100% to Stack for form. Add padding to .studentEditContainer to match design.
@BrettEastman BrettEastman merged commit e4abb62 into main Nov 7, 2023
3 checks passed
@BrettEastman BrettEastman deleted the edit-button2 branch November 7, 2023 01:28
amantri pushed a commit that referenced this pull request Nov 11, 2023
Co-authored-by: Brandon Cruz-Youll <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants