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

fix: remove ability to edit close and lottery dates on a published listing #623

Conversation

KrissDrawing
Copy link
Collaborator

Pull Request Template

Issue Overview

This PR addresses #570

  • This change addresses the issue in full
  • This change addresses only certain aspects of the issue
  • This change is a dependency for another issue
  • This change has a dependency from another issue

Description

Disables ability to edit due dates for active listings by non admin users. Also blocks switching between FCFS and Lottery

How Can This Be Tested/Reviewed?

  1. Non-admin should still be able to create listing with dates, and application type.
  2. Non-admin should still be able to edit listing (when dates not changed)
  3. Backend technically should not throw an error, as on frontend fields are blocked (only way to check it in app is to switch disableDueDates and disableDueDate to false).

Checklist:

  • My code follows the style guidelines of this project
  • I have added QA notes to the issue with applicable URLs
  • I have performed a self-review of my own code
  • I have reviewed the changes in a desktop view
  • I have reviewed the changes in a mobile view
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have assigned reviewers
  • I have run yarn generate:client and/or created a migration if I made backend changes that require them
  • My commit message(s) is/are polished, and any breaking changes are indicated in the message and are well-described
  • Commits made across packages purposefully have the same commit message/version change, else are separated into different commits

Reviewer Notes:

Steps to review a PR:

  • Read and understand the issue, and ensure the author has added QA notes
  • Review the code itself from a style point of view
  • Pull the changes down locally and test that the acceptance criteria is met
  • Also review the acceptance criteria on the Netlify deploy preview (noting that these do not yet include any backend changes made in the PR)
  • Either explicitly ask a clarifying question, request changes, or approve the PR if there are small remaining changes but the PR is otherwise good to go

On Merge:

If you have one commit and message, squash. If you need each message to be applied, rebase and merge.

@KrissDrawing KrissDrawing changed the title 570/remove ability to edit close and lottery dates on a published listing fix: remove ability to edit close and lottery dates on a published listing May 16, 2024
…ve-ability-to-edit-close-and-lottery-dates-on-a-published-listing
Copy link
Collaborator

@jaredcwhite jaredcwhite left a comment

Choose a reason for hiding this comment

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

Hey @KrissDrawing, just a bit of code structure feedback. TY!

api/src/services/listing.service.ts Show resolved Hide resolved
@KrissDrawing KrissDrawing requested a review from jaredcwhite June 4, 2024 14:25
Copy link
Collaborator

@mcgarrye mcgarrye left a comment

Choose a reason for hiding this comment

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

Jurisdictional Admins and Partners can still switch listing availability between Available Units and Open Waitlist which can cause problems with existing FCFS or Lottery setup.
Additionally, when I try to make any change not as an admin to a lottery listing I cannot save my changes because the disabled fields are sending back empty data. Fields should contain the current data so they send back correctly.

api/src/services/listing.service.ts Outdated Show resolved Hide resolved
api/src/services/listing.service.ts Outdated Show resolved Hide resolved
…ve-ability-to-edit-close-and-lottery-dates-on-a-published-listing

# Conflicts:
#	sites/partners/src/components/listings/PaperListingForm/index.tsx
@KrissDrawing KrissDrawing requested a review from mcgarrye June 20, 2024 15:33
Copy link
Collaborator

@mcgarrye mcgarrye left a comment

Choose a reason for hiding this comment

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

Overall looks good! One nit pick that idk if it can be fixed but would be nice if we could see which is selected with the disabled buttons
Screenshot 2024-06-27 at 10 35 02 AM
Screenshot 2024-06-27 at 1 Screenshot 2024-06-27 at 10 31 28 AM 0 35 10 AM

…ve-ability-to-edit-close-and-lottery-dates-on-a-published-listing
@mcgarrye
Copy link
Collaborator

Change looks great!

@ludtkemorgan ludtkemorgan added ready to merge Should be applied when a PR has been reviewed and approved and removed 1 review needed labels Jul 2, 2024
@KrissDrawing KrissDrawing merged commit b252458 into main Jul 3, 2024
16 checks passed
@KrissDrawing KrissDrawing deleted the 570/Remove-ability-to-edit-close-and-lottery-dates-on-a-published-listing branch July 3, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Should be applied when a PR has been reviewed and approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants