-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1381/listings management, application addresses (#1425)
* 1381 wip * last toggleable fields * add office hours * translations * details * Add applicationPickUpAddressType and applicationDropOffAddressType columns to Listing model * new backend fields for dropoff address * details page * submit issues * show address types * remove unused application methods * cleanup * application submission notes * default values load in the form * default values for postmark date * typing issues w add page * use existing addresses on listing page * can really share addresses * Add additionalApplicationSubmissionNotes migration (#1441) * pr feedback * pr feedback pr 2 * changelog * type yes/no * combine types * fixup address fxn * update migration * office hours fix * test updated config yaml * testing circleci config update * updated circleci config test * Updated config.yml * Updated config.yml * update migration file Co-authored-by: Michal Plebanski <michalp@airnauts.com> Co-authored-by: Sean Albert <smabert@gmail.com>
- Loading branch information
1 parent
37197bd
commit 32b916c
Showing
33 changed files
with
1,110 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
backend/core/src/listings/types/listing-application-address-type.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export enum ListingApplicationAddressType { | ||
leasingAgent = "leasingAgent", | ||
mailingAddress = "mailingAddress", | ||
} |
20 changes: 20 additions & 0 deletions
20
backend/core/src/migration/1624959910201-add-pick-up-and-drop-off-columns-to-listing.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm" | ||
|
||
export class addPickUpAndDropOffColumnsToListing1624959910201 implements MigrationInterface { | ||
name = "addPickUpAndDropOffColumnsToListing1624959910201" | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`CREATE TYPE "listings_application_pick_up_address_type_enum" AS ENUM('leasingAgent', 'mailingAddress')`); | ||
await queryRunner.query(`ALTER TABLE "listings" ADD "application_pick_up_address_type" "listings_application_pick_up_address_type_enum"`); | ||
|
||
await queryRunner.query(`CREATE TYPE "listings_application_drop_off_address_type_enum" AS ENUM('leasingAgent', 'mailingAddress')`); | ||
await queryRunner.query(`ALTER TABLE "listings" ADD "application_drop_off_address_type" "listings_application_drop_off_address_type_enum"`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "listings" DROP COLUMN "application_drop_off_address_type"`); | ||
await queryRunner.query(`DROP TYPE "listings_application_drop_off_address_type_enum"`); | ||
await queryRunner.query(`ALTER TABLE "listings" DROP COLUMN "application_pick_up_address_type"`); | ||
await queryRunner.query(`DROP TYPE "listings_application_pick_up_address_type_enum"`); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
backend/core/src/migration/1624985582782-application-drop-off-and-mailing-addresses.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import {MigrationInterface, QueryRunner} from "typeorm"; | ||
|
||
export class applicationDropOffAndMailingAddresses1624985582782 implements MigrationInterface { | ||
name = 'applicationDropOffAndMailingAddresses1624985582782' | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "listings" ADD "application_mailing_address" jsonb`); | ||
await queryRunner.query(`ALTER TABLE "listings" ADD "application_drop_off_address_office_hours" text`); | ||
await queryRunner.query(`ALTER TABLE "listings" ADD "application_drop_off_address" jsonb`); | ||
|
||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "listings" DROP COLUMN "application_mailing_address"`); | ||
await queryRunner.query(`ALTER TABLE "listings" DROP COLUMN "application_drop_off_address_office_hours" text`); | ||
await queryRunner.query(`ALTER TABLE "listings" DROP COLUMN "application_drop_off_address" jsonb`); | ||
} | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
backend/core/src/migration/1625041988613-add-additional-notes-column-to-listing.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import {MigrationInterface, QueryRunner} from "typeorm"; | ||
|
||
export class addAdditionalNotesColumnToListing1625041988613 implements MigrationInterface { | ||
name = 'addAdditionalNotesColumnToListing1625041988613' | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "listings" ADD "additional_application_submission_notes" text`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "listings" DROP COLUMN "additional_application_submission_notes"`); | ||
} | ||
|
||
} |
Oops, something went wrong.