Skip to content

Commit

Permalink
[Improvement] Add Mail Lost Option as Replacement Reason (#340)
Browse files Browse the repository at this point in the history
* initial commit for the mail lost option

* changed the processing fee for mail lost

* made the migrations for mail lost

* reverted yarn lock to staging

* initial commit for the mail lost option

* changed the processing fee for mail lost

* made the migrations for mail lost

* reverted yarn lock to staging

---------

Co-authored-by: Chinemerem <[email protected]>
  • Loading branch information
kj3moraes and ChinemeremChigbo authored Jun 15, 2024
1 parent 3da5327 commit cb36e24
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 16 deletions.
10 changes: 9 additions & 1 deletion components/admin/requests/reason-for-replacement/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,21 @@ export default function ReasonForReplacementForm({
{'Stolen'}
</Radio>
<Radio
value={'OTHER'}
value={'MAIL_LOST'}
onChange={() => {
setFieldValue('paymentInformation.processingFee', '0');
}}
>
{'Mail Lost'}
</Radio>
<Radio
value={'OTHER'}
onChange={() => {
setFieldValue('paymentInformation.processingFee', '0');
}}
>
{'Other'}
</Radio>
</Stack>
</RadioGroupField>
</Box>
Expand Down
1 change: 1 addition & 0 deletions lib/graphql/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ export default gql`
enum ReasonForReplacement {
LOST
STOLEN
MAIL_LOST
OTHER
}
Expand Down
1 change: 1 addition & 0 deletions lib/graphql/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,7 @@ export type QueryComparePhysiciansArgs = {
export type ReasonForReplacement =
| 'LOST'
| 'STOLEN'
| 'MAIL_LOST'
| 'OTHER';

export type RejectApplicationInput = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterEnum
ALTER TYPE "reasonforreplacement" ADD VALUE 'MAIL_LOST';
31 changes: 16 additions & 15 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -349,15 +349,15 @@ enum ApplicantStatus {
ACTIVE
INACTIVE
@@map("applicantstatus")
@@map("applicantstatus")
}

enum Gender {
MALE
FEMALE
OTHER
@@map("gender")
@@map("gender")
}

enum PaymentType {
Expand All @@ -370,14 +370,14 @@ enum PaymentType {
DEBIT
SHOPIFY
@@map("paymenttype")
@@map("paymenttype")
}

enum PhysicianStatus {
ACTIVE
INACTIVE
@@map("physicianstatus")
@@map("physicianstatus")
}

enum Province {
Expand All @@ -395,15 +395,15 @@ enum Province {
NT
YT
@@map("province")
@@map("province")
}

enum Role {
ADMIN
ACCOUNTING
SECRETARY
@@map("role")
@@map("role")
}

enum ApplicationStatus {
Expand All @@ -412,37 +412,38 @@ enum ApplicationStatus {
REJECTED
COMPLETED
@@map("applicationstatus")
@@map("applicationstatus")
}

enum ReasonForReplacement {
LOST
STOLEN
OTHER
MAIL_LOST
@@map("reasonforreplacement")
@@map("reasonforreplacement")
}

enum PermitType {
PERMANENT
TEMPORARY
@@map("permittype")
@@map("permittype")
}

enum AccessibleConvertedVanLoadingMethod {
SIDE_LOADING
END_LOADING
@@map("accessibleconvertedvanloadingmethod")
@@map("accessibleconvertedvanloadingmethod")
}

enum ApplicationType {
NEW
RENEWAL
REPLACEMENT
@@map("applicationtype")
@@map("applicationtype")
}

enum MobilityAid {
Expand All @@ -454,7 +455,7 @@ enum MobilityAid {
CRUTCHES
OTHERS
@@map("mobilityaid")
@@map("mobilityaid")
}

enum PatientCondition {
Expand All @@ -463,20 +464,20 @@ enum PatientCondition {
CANNOT_WALK_100M
OTHER
@@map("patientcondition")
@@map("patientcondition")
}

enum RequiresWiderParkingSpaceReason {
HAS_ACCESSIBLE_VAN
MEDICAL_REASONS
OTHER
@@map("requireswiderparkingspacereason")
@@map("requireswiderparkingspacereason")
}

enum ShopifyPaymentStatus {
PENDING
RECEIVED
@@map("shopifypaymentstatus")
@@map("shopifypaymentstatus")
}

0 comments on commit cb36e24

Please sign in to comment.