Skip to content

Commit 35571cf

Browse files
leogjhuangsherryhliChinemeremChigbo
authored
[Release] Version 0.3.0 (#351)
* [Improvement] Clarify lowercase extension requirement for POA form upload (#343) * Change text on processing task 2 (#344) * Remove holiday closure banner (#345) * [Feature] Update ci.yml to add pending migrations to db (#339) * Update ci.yml to add pending migrations to db * Add .env file to CI * Update ci.yml * Update ci.yml * Use longer URL * Add to package.json instead * revert ci.yml * Re-add ci.yml * Add space to yarn build * Make title fit on one line (#347) * [Fix] Remove npx from start script (#348) * [Feature] Add AMEX (#346) * Add Amex * Add Amex to popoulate js file * Update populate-db-09-13-21.ts * [Fix] Revert init migration file and add new migration for AMEX paymenttype (#349) * Revert paymenttype edit to init migration file * Create migration to add AMEX paymenttype * [Improvement] Change helper text for date of birth (#350) * Change helper text for date of birth * Remove text wrapper on DOB helper text * [Feature] Add second payment method for permit requests (#338) * Add second payment method types to schema * Update application validation schema to allow second payment methods * Change payment detail components to show second payment method * Consider donations on second payment method in processing tasks * Update data pipelines to generate accountant reports with second payment method included * Update invoice and donation receipt with second payment method included * Rename second payment method variables to improve clarity * Add migration for second payment method --------- Co-authored-by: Sherry Li <sherryhli@users.noreply.github.com> Co-authored-by: Chinemerem <chinemeremchigbo@Outlook.com>
1 parent 6ef89aa commit 35571cf

File tree

27 files changed

+699
-111
lines changed

27 files changed

+699
-111
lines changed

components/admin/requests/guardian-information/PoaFormUploadField.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ export const PoaFormUploadField: FC<Props> = ({
6363
{'Upload POA File'}
6464
</Text>
6565
<Text color="text.secondary">
66-
{'Only ONE file can be added. Files must be .pdf and can be a maximum of 5MB in size.'}{' '}
66+
{
67+
'Only ONE file can be added. Files must have .pdf extension (lowercase) and can be a maximum of 5MB in size.'
68+
}{' '}
6769
</Text>
6870
{(file || initialFileUrl) && (
6971
<>

components/admin/requests/payment-information/Card.tsx

Lines changed: 68 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { FC, useState } from 'react';
22
import { useQuery, useMutation } from '@tools/hooks/graphql';
3-
import { Box, Text, Divider, SimpleGrid, VStack, Button } from '@chakra-ui/react'; // Chakra UI
3+
import { Box, Text, Divider, SimpleGrid, VStack, Button, HStack } from '@chakra-ui/react'; // Chakra UI
44
import PermitHolderInfoCard from '@components/admin/LayoutCard'; // Custom Card component
55
import EditPaymentDetailsModal from '@components/admin/requests/payment-information/EditModal'; // Edit modal
66
import {
@@ -69,6 +69,10 @@ const Card: FC<Props> = props => {
6969
paymentMethod,
7070
processingFee,
7171
donationAmount,
72+
secondPaymentMethod,
73+
secondProcessingFee,
74+
secondDonationAmount,
75+
hasSecondPaymentMethod,
7276
shippingAddressSameAsHomeAddress,
7377
shippingFullName,
7478
shippingAddressLine1,
@@ -99,8 +103,12 @@ const Card: FC<Props> = props => {
99103
<EditPaymentDetailsModal
100104
paymentInformation={{
101105
paymentMethod,
102-
donationAmount,
103106
processingFee,
107+
donationAmount,
108+
secondPaymentMethod,
109+
secondProcessingFee,
110+
secondDonationAmount,
111+
hasSecondPaymentMethod,
104112
shippingAddressSameAsHomeAddress,
105113
shippingFullName,
106114
shippingAddressLine1,
@@ -133,33 +141,64 @@ const Card: FC<Props> = props => {
133141
Fees
134142
</Text>
135143
</Box>
136-
<SimpleGrid columns={2} spacingX="70px" spacingY="12px">
137-
<Box>
138-
<Text as="p" textStyle="body-regular" textAlign="left">
139-
Permit Fee
140-
</Text>
141-
</Box>
142-
<Box>
143-
<Text as="p" textStyle="body-regular" textAlign="left">
144-
${processingFee}
145-
</Text>
146-
</Box>
147-
<Box>
148-
<Text as="p" textStyle="body-regular" textAlign="left">
149-
Donation
150-
</Text>
151-
</Box>
152-
<Box>
153-
<Text as="p" textStyle="body-regular" textAlign="left">
154-
${donationAmount}
155-
</Text>
156-
</Box>
157-
<Box>
158-
<Text as="p" textStyle="caption" textAlign="left">
159-
Paid with {titlecase(paymentMethod)}
160-
</Text>
161-
</Box>
162-
</SimpleGrid>
144+
<HStack>
145+
<SimpleGrid columns={2} spacingX="70px" spacingY="12px">
146+
<Box>
147+
<Text as="p" textStyle="body-regular" textAlign="left">
148+
Permit Fee
149+
</Text>
150+
</Box>
151+
<Box>
152+
<Text as="p" textStyle="body-regular" textAlign="left">
153+
${processingFee}
154+
</Text>
155+
</Box>
156+
<Box>
157+
<Text as="p" textStyle="body-regular" textAlign="left">
158+
Donation
159+
</Text>
160+
</Box>
161+
<Box>
162+
<Text as="p" textStyle="body-regular" textAlign="left">
163+
${donationAmount}
164+
</Text>
165+
</Box>
166+
<Box>
167+
<Text as="p" textStyle="caption" textAlign="left">
168+
Paid with {titlecase(paymentMethod)}
169+
</Text>
170+
</Box>
171+
</SimpleGrid>
172+
{hasSecondPaymentMethod && (
173+
<SimpleGrid columns={2} spacingX="70px" spacingY="12px">
174+
<Box>
175+
<Text as="p" textStyle="body-regular" textAlign="left">
176+
Permit Fee
177+
</Text>
178+
</Box>
179+
<Box>
180+
<Text as="p" textStyle="body-regular" textAlign="left">
181+
${secondProcessingFee}
182+
</Text>
183+
</Box>
184+
<Box>
185+
<Text as="p" textStyle="body-regular" textAlign="left">
186+
Donation
187+
</Text>
188+
</Box>
189+
<Box>
190+
<Text as="p" textStyle="body-regular" textAlign="left">
191+
${secondDonationAmount}
192+
</Text>
193+
</Box>
194+
<Box>
195+
<Text as="p" textStyle="caption" textAlign="left">
196+
Paid with {titlecase(secondPaymentMethod ?? '')}
197+
</Text>
198+
</Box>
199+
</SimpleGrid>
200+
)}
201+
</HStack>
163202
</VStack>
164203
<Divider mt="20px" />
165204
<SimpleGrid columns={2} spacingX="150px" spacingY="12px" pt="20px">

components/admin/requests/payment-information/Form.tsx

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export default function PaymentDetailsForm({ paymentInformation }: PaymentDetail
2727
required
2828
>
2929
<Stack>
30+
<Radio value={'AMEX' as PaymentType}>{'American Express'}</Radio>
3031
<Radio value={'MASTERCARD' as PaymentType}>{'Mastercard'}</Radio>
3132
<Radio value={'VISA' as PaymentType}>{'Visa'}</Radio>
3233
<Radio value={'DEBIT' as PaymentType}>{'Debit'}</Radio>
@@ -56,6 +57,57 @@ export default function PaymentDetailsForm({ paymentInformation }: PaymentDetail
5657
/>
5758
</GridItem>
5859
</Grid>
60+
61+
<CheckboxField
62+
name="paymentInformation.hasSecondPaymentMethod"
63+
paddingTop="24px"
64+
paddingBottom="24px"
65+
>
66+
{'Add a second payment method'}
67+
</CheckboxField>
68+
69+
{paymentInformation.hasSecondPaymentMethod && (
70+
<Grid templateColumns="repeat(2, 1fr)" rowGap={'24px'}>
71+
<GridItem rowSpan={2} colSpan={1}>
72+
<RadioGroupField
73+
name="paymentInformation.secondPaymentMethod"
74+
label="Second payment method"
75+
>
76+
<Stack>
77+
<Radio value={'MASTERCARD' as PaymentType}>{'Mastercard'}</Radio>
78+
<Radio value={'VISA' as PaymentType}>{'Visa'}</Radio>
79+
<Radio value={'DEBIT' as PaymentType}>{'Debit'}</Radio>
80+
<Radio value={'CASH' as PaymentType}>{'Cash'}</Radio>
81+
<Radio value={'CHEQUE' as PaymentType}>{'Cheque'}</Radio>
82+
<Radio value={'ETRANSFER' as PaymentType}>{'E-transfer'}</Radio>
83+
</Stack>
84+
</RadioGroupField>
85+
</GridItem>
86+
87+
<GridItem>
88+
<TextField
89+
name="paymentInformation.secondProcessingFee"
90+
label="Permit fee"
91+
monetaryInput
92+
/>
93+
</GridItem>
94+
95+
<GridItem colSpan={1}>
96+
<TextField
97+
name="paymentInformation.secondDonationAmount"
98+
label={
99+
<>
100+
{'Donation '}
101+
<Box as="span" textStyle="body-regular" fontSize="sm">
102+
{'(optional)'}
103+
</Box>
104+
</>
105+
}
106+
monetaryInput
107+
/>
108+
</GridItem>
109+
</Grid>
110+
)}
59111
</Box>
60112

61113
<Divider />

components/admin/requests/processing/TasksCard.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ export default function ProcessingTasksCard({ applicationId }: ProcessingTasksCa
185185
shopifyConfirmationNumber,
186186
shopifyOrderNumber,
187187
donationAmount,
188+
secondDonationAmount,
188189
processing: {
189190
status,
190191
appNumber,
@@ -332,7 +333,7 @@ export default function ProcessingTasksCard({ applicationId }: ProcessingTasksCa
332333
<ProcessingTaskStep
333334
id={2}
334335
label="Hole punch parking permit"
335-
description="Gender, Expiry Year and Month"
336+
description="Expiry Year and Month"
336337
isCompleted={appHolepunched}
337338
showLog={showTaskLog}
338339
log={
@@ -414,7 +415,7 @@ export default function ProcessingTasksCard({ applicationId }: ProcessingTasksCa
414415
<ProcessingTaskStep
415416
id={4}
416417
label={
417-
Number(donationAmount) >= 20
418+
Number(donationAmount) + (Number(secondDonationAmount) || 0) >= 20
418419
? 'Generate invoice and donation receipt'
419420
: 'Generate invoice'
420421
}
@@ -438,7 +439,7 @@ export default function ProcessingTasksCard({ applicationId }: ProcessingTasksCa
438439
_hover={!reviewRequestCompleted ? undefined : { bg: 'background.grayHover' }}
439440
color="black"
440441
onClick={() => {
441-
Number(donationAmount) >= 20
442+
Number(donationAmount) + (Number(secondDonationAmount) || 0) >= 20
442443
? handleGenerateInvoice(true)
443444
: handleGenerateInvoice(false);
444445
}}

components/applicant/renewals/IdentityVerification.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,9 @@ const IdentityVerification: FC = () => {
167167
<Box marginBottom={{ sm: '40px', md: '20px' }} textAlign={'left'}>
168168
<DateField name="dateOfBirth" label="Date of Birth" width="184px">
169169
<FormHelperText>
170-
<Text>Please enter your date of birth in YYYY-MM-DD format.</Text>
171-
<Text>
172-
For example, if you were born on 20th August 1950, you would enter
173-
1950-08-20.
174-
</Text>
170+
{
171+
'If you are on a mobile device, please use the date picker to select your date of birth. You can click on the year and month at the top of the pop-up calendar to change them.'
172+
}
175173
</FormHelperText>
176174
</DateField>
177175
</Box>

0 commit comments

Comments
 (0)