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 all contacts-FE #8

Open
CCirbo opened this issue Dec 4, 2024 · 4 comments
Open

Create all contacts-FE #8

CCirbo opened this issue Dec 4, 2024 · 4 comments
Assignees

Comments

@CCirbo
Copy link
Collaborator

CCirbo commented Dec 4, 2024

FE work
Logged in users should be able to add new contacts which are only visible to the logged in user (we don't want to expose a person's contacts to other people)

Fields:

*First Name
*Last Name
Company (dropdown that links to existing company in database)
Email
Phone Number
Notes

  • Indicates required

Image

@CCirbo CCirbo self-assigned this Dec 4, 2024
@CCirbo CCirbo moved this to In Progress in Tracker CRM Dec 4, 2024
@CCirbo
Copy link
Collaborator Author

CCirbo commented Dec 10, 2024

Form elements that should render on the page

  • Form should have form boxes for
    • First Name
      • Renders
      • Works
      • Styled Correctly--has red asterisk to show it is required
    • Last Name
      • Renders
      • Works
      • Styled Correctly--has red asterisk to show it is required
    • Email
      • Renders
      • Works
      • Styled Correctly--has an email placeholder in field
    • Phone Number
      • Renders
      • Works
      • Styled Correctly--has a phone number placeholder in field
    • Company Drop Down Box
      • Renders
      • Works
      • Styled Correctly
    • Notes
      • Renders
      • Works
      • Styled Correctly--has notes or something placeholder in field
    • Save Button--tied to the Post request in BE
      • Renders
      • Works
      • Styled Correctly

Testing

  • Cypress testing of all fields
  • Cypress testing of functionality

@CCirbo
Copy link
Collaborator Author

CCirbo commented Dec 11, 2024

  • Got create new contact page to render but had to hijack the person profile button on the Nav bar to navigate to the page.
    • Also set up Router in Index.js
    • Added Route of newContact in App.tsx
    • These will have to be changed or checked for merge issues as some of this is a duplication of others but was a work around while waiting for FE issues to be done.
  • This is not correct as I understand it from the flow of the wireframes,
    • I think all contacts page show up first,
    • then a button on that page navigates to the create contact page. This will need to be sorted out.
  • While testing out the fetch/post to see if a new contact is being created when save button is pushed, goes to empty page
  • Need to test further

Blockers to testing the BE route

  • Downloaded PR that has new authentication rules, I believe this is stopping my route from working as it is in Postman but haven't figure out how to do authentication correctly in app to see if it is working. Had to put after_action :verify_authorized, except: :create in the BE contacts controller to bypass additional security to get Postman to work.

@CCirbo
Copy link
Collaborator Author

CCirbo commented Dec 12, 2024

I believe we need to create a new ticket for refactoring the BE Contacts Controller to align with the new security measures. I’d like to bring this up during standup to gather everyone’s thoughts on permissions for admin roles. Personally, I feel that contacts should remain completely private, even from admin users, but I’m happy to align with the group’s consensus to maintain continuity and consistency.

Additionally, I think it’s important to document the consensus or rules directly in the ticket to ensure all requirements are clear and met during the refactor. We should also include testing in the ticket scope and consider whether refactoring existing tests is necessary. If that’s the case, we can either add it to this ticket or create a separate one for me to handle.

@CCirbo
Copy link
Collaborator Author

CCirbo commented Dec 13, 2024

I need a new ticket for BE create contacts for fixes to contact model and update tests

While testing the Add Contacts Page--to see if it was hitting the BE and if error messages from BE was rendering, realized that duplicate contacts were being created because of white spaces or case insensitivity.

I went into the BE and I had to update the model to avoid duplication due to whitespaces or case insensitivity. I also added tests for the changes. I also need to fix two contact index tests that are failing--we think because of pundit/rollify/policy changes but not sure as they were passing before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

1 participant