Skip to content

Commit

Permalink
DAH-2498 remove unneeded change and add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tallulahkay committed Jul 29, 2024
1 parent 554b1d8 commit 24e981c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ export const buildLeaseUpAppFirstComeFirstServedModel = (application) => {
return {
application_id: application.id,
application_number: application.name,
first_name: applicant?.first_name,
last_name: applicant?.last_name,
phone: applicant?.phone,
email: applicant?.email,
mailing_address: applicant?.mailing_address,
residence_address: applicant?.residence_address,
first_name: applicant.first_name,
last_name: applicant.last_name,
phone: applicant.phone,
email: applicant.email,
mailing_address: applicant.mailing_address,
residence_address: applicant.residence_address,
lease_up_status: application.processing_status,
status_last_updated: application.status_last_updated,
has_ada_priorities_selected: application.has_ada_priorities_selected,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ export const getApplications = async (listingId, page, filters) => {
.then(({ records, pages, listing_type }) => {
let apps
if (listing_type === LISTING_TYPE_FIRST_COME_FIRST_SERVED) {
// remove records that don't have an applicant (this is a bug with form assembly, but we are hiding them for now)
const cleanRecords = records.filter((record) => record.applicant != null)
apps = map(cleanRecords, buildLeaseUpAppFirstComeFirstServedModel)
// add an index, which will be used as the applicant's "rank"
apps.map((app, index) => {
app.index = index
return app
Expand Down

0 comments on commit 24e981c

Please sign in to comment.