Skip to content

Commit b762d44

Browse files
authored
[Release] Version 0.0.8 (#308)
* Allow numbers in MSP (#296) * [Fix] Broken contact us link (#298) * change nam and address spacing to absolute instead of floating (#300) * Go to applicationProcessing instead of application (#301) * update shopify version to undeprecated one (#302) * Fix bash command for Windows (#299) * Update shopify-buy in yarn.lock (#303) * [Fix] No guardian on delete (#297) * Update processing fee from $26 to $31 (#305) * [Feature] Support search by permit ID on Permit Holders page (#307) * Change pdf address spacing from 1.5 to 1.4 (#306)
1 parent c445f1f commit b762d44

File tree

19 files changed

+81
-56
lines changed

19 files changed

+81
-56
lines changed

.env.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ S3_UPLOAD_BUCKET=""
2929
S3_UPLOAD_REGION=""
3030

3131
# Misc
32-
PROCESSING_FEE="26"
32+
PROCESSING_FEE="31"
3333
CONFIRMATION_EMAIL_FROM=""
3434
INVOICE_LINK_TTL_DAYS="7"
3535
APPLICATION_DOCUMENT_LINK_TTL_HOURS="1"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ npx prisma db seed --preview-feature
8181
5. Verify database
8282

8383
```bash
84-
docker exec -it rcd_db /bin/bash -c "psql -U postgres -d rcd"
84+
docker exec -it rcd_db bash -c "psql -U postgres -d rcd"
8585
```
8686

8787
## Run locally (Heroku)

components/applicant/FAQs.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ const OVERVIEW_FAQs: ReadonlyArray<{ question: string; answer: ReactNode | strin
139139
RCD will send you a Renewal Form approximately one (1) month before your permit is set to
140140
expire. This is applicable to all permanent permit holders. Once you receive your renewal
141141
notice you can renew your permit online, over the phone or by mailing in your completed
142-
renewal form. There is a processing fee to renew your permit (fee is $26 as at April
143-
2022). As well, we ask that you also return your expired permit.
142+
renewal form. There is a processing fee to renew your permit (fee is $31 as at August
143+
2023). As well, we ask that you also return your expired permit.
144144
</p>
145145
<p>
146146
Use the RCD Accessible Parking Permit Online Portal (online portal) to update your contact
@@ -195,8 +195,8 @@ const OVERVIEW_FAQs: ReadonlyArray<{ question: string; answer: ReactNode | strin
195195
<p>
196196
If you have lost your parking permit, please notify us right away. If you would like to
197197
request a replacement process, please complete the Replacement Declaration Form and we
198-
will issue a replacement permit. However, there will be a processing fee (fee is $26 as at
199-
April 2022). As well you are required to complete a declaration form that attests that in
198+
will issue a replacement permit. However, there will be a processing fee (fee is $31 as at
199+
August 2023). As well you are required to complete a declaration form that attests that in
200200
event that you find the lost permit you will return it to our office as the permit is no
201201
longer valid. Any permit holder using a permit that has been reported lost is at risk of a
202202
ticket or even towing of vehicle as this permit is no longer valid.{' '}
@@ -281,7 +281,7 @@ const TRAVELLING_FAQs: ReadonlyArray<{ question: string; answer: ReactNode | str
281281
temporary permit, you will need to present official documentation from the issuing agency
282282
in your country. This information is needed to help to confirm that you are a valid
283283
accessible parking permit holder in your home jurisdiction. There is a Canadian processing
284-
fee for any permit issued (fee is $26 as at April 2022).
284+
fee for any permit issued (fee is $31 as at August 2023).
285285
</p>
286286
</>
287287
),
@@ -313,7 +313,7 @@ const TRAVELLING_FAQs: ReadonlyArray<{ question: string; answer: ReactNode | str
313313
is all done through the processing fee that you pay as well as any donations that you
314314
make. As well, we have an established policy that hardship assistance is available upon
315315
request to anyone who does not have the economic resources to cover the cost of the
316-
processing fee. Processing fee is $26 as at April 2022.
316+
processing fee. Processing fee is $31 as at August 2023.
317317
</p>
318318
</>
319319
),
@@ -328,9 +328,7 @@ const TRAVELLING_FAQs: ReadonlyArray<{ question: string; answer: ReactNode | str
328328
604-232-2404 and we are more than happy to help.
329329
</p>
330330
<p>
331-
<NewTabLink href="https://www.rcdrichmond.org/NewsAndEvents/MovingNotice/NewLocationMap.pdf">
332-
Click here
333-
</NewTabLink>{' '}
331+
<NewTabLink href="https://rcdrichmond.org/ContactUs/ContactUs.php">Click here</NewTabLink>{' '}
334332
for details on our location, directions on best ways to find us and our hours of
335333
operation.
336334
</p>

lib/applicants/resolvers.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export const applicants: Resolver<
7979
expiryDateRangeTo = undefined,
8080
search = undefined,
8181
dateOfBirth = undefined,
82+
permitId = undefined,
8283
} = filter;
8384

8485
let expiryDateUpperBound,
@@ -148,7 +149,11 @@ export const applicants: Resolver<
148149
// Permit status and expiry date range filters both look at the permit expiryDate.
149150
// For this reason we need to filter on expiryDate twice to take both filters in account.
150151
const permitFilter =
151-
expiryDateLowerBound || expiryDateUpperBound || expiryDateRangeFrom || expiryDateRangeTo
152+
expiryDateLowerBound ||
153+
expiryDateUpperBound ||
154+
expiryDateRangeFrom ||
155+
expiryDateRangeTo ||
156+
permitId
152157
? {
153158
some: {
154159
AND: [
@@ -164,6 +169,11 @@ export const applicants: Resolver<
164169
lte: expiryDateRangeTo?.toISOString(),
165170
},
166171
},
172+
{
173+
rcdPermitId: {
174+
equals: permitId ?? undefined,
175+
},
176+
},
167177
],
168178
},
169179
}

lib/applicants/schema.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ export default gql`
158158
expiryDateRangeTo: Date
159159
search: String
160160
dateOfBirth: Date
161+
permitId: Int
161162
limit: Int
162163
offset: Int
163164
}

lib/application-processing/field-resolvers.ts

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,8 @@ export const applicationProcessingAppNumberEmployeeResolver: FieldResolver<
6363
ApplicationProcessing & { id: number },
6464
Employee
6565
> = async (parent, _, { prisma }) => {
66-
return await prisma.application
66+
return await prisma.applicationProcessing
6767
.findUnique({ where: { id: parent.id } })
68-
.applicationProcessing()
6968
.appNumberEmployee();
7069
};
7170

@@ -76,9 +75,8 @@ export const applicationProcessingAppHolepunchedEmployeeResolver: FieldResolver<
7675
ApplicationProcessing & { id: number },
7776
Employee
7877
> = async (parent, _, { prisma }) => {
79-
return await prisma.application
78+
return await prisma.applicationProcessing
8079
.findUnique({ where: { id: parent.id } })
81-
.applicationProcessing()
8280
.appHolepunchedEmployee();
8381
};
8482

@@ -89,9 +87,8 @@ export const applicationProcessingWalletCardCreatedEmployeeResolver: FieldResolv
8987
ApplicationProcessing & { id: number },
9088
Employee
9189
> = async (parent, _, { prisma }) => {
92-
return await prisma.application
90+
return await prisma.applicationProcessing
9391
.findUnique({ where: { id: parent.id } })
94-
.applicationProcessing()
9592
.walletCardCreatedEmployee();
9693
};
9794

@@ -102,9 +99,8 @@ export const applicationProcessingReviewRequestCompletedEmployeeResolver: FieldR
10299
ApplicationProcessing & { id: number },
103100
Employee
104101
> = async (parent, _, { prisma }) => {
105-
return await prisma.application
102+
return await prisma.applicationProcessing
106103
.findUnique({ where: { id: parent.id } })
107-
.applicationProcessing()
108104
.reviewRequestEmployee();
109105
};
110106

@@ -115,9 +111,8 @@ export const applicationProcessingDocumentsUrlEmployeeResolver: FieldResolver<
115111
ApplicationProcessing & { id: number },
116112
Employee
117113
> = async (parent, _, { prisma }) => {
118-
return await prisma.application
114+
return await prisma.applicationProcessing
119115
.findUnique({ where: { id: parent.id } })
120-
.applicationProcessing()
121116
.documentsUrlEmployee();
122117
};
123118

@@ -128,9 +123,8 @@ export const applicationProcessingAppMailedEmployeeResolver: FieldResolver<
128123
ApplicationProcessing & { id: number },
129124
Employee
130125
> = async (parent, _, { prisma }) => {
131-
return await prisma.application
126+
return await prisma.applicationProcessing
132127
.findUnique({ where: { id: parent.id } })
133-
.applicationProcessing()
134128
.appMailedEmployee();
135129
};
136130

@@ -141,8 +135,7 @@ export const applicationProcessingPaymentRefundedEmployeeResolver: FieldResolver
141135
ApplicationProcessing & { id: number },
142136
Employee
143137
> = async (parent, _, { prisma }) => {
144-
return await prisma.application
138+
return await prisma.applicationProcessing
145139
.findUnique({ where: { id: parent.id } })
146-
.applicationProcessing()
147140
.paymentRefundedEmployee();
148141
};

lib/application-processing/resolvers.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ export const completeApplication: Resolver<
321321
},
322322
},
323323
},
324-
// If guardian information given, upsert. Otherwise, delete (SET NULL)
324+
// If guardian information given, upsert.
325325
...(guardian
326326
? {
327327
guardian: {
@@ -331,7 +331,11 @@ export const completeApplication: Resolver<
331331
},
332332
},
333333
}
334-
: { guardian: { delete: true } }),
334+
: {
335+
guardian: {
336+
disconnect: true,
337+
},
338+
}),
335339
},
336340
});
337341

lib/applications/validation.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,6 @@ export const applicantFacingRenewalDoctorSchema = object().shape({
447447
is: true,
448448
then: string()
449449
.typeError('Please enter the MSP number')
450-
.matches(/^\d+$/, 'Must only contain numbers')
451450
.required('Please enter the MSP number'),
452451
}),
453452
doctorAddressLine1: string()

lib/graphql/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export type ApplicantsFilter = {
6363
expiryDateRangeTo: Maybe<Scalars['Date']>;
6464
search: Maybe<Scalars['String']>;
6565
dateOfBirth: Maybe<Scalars['Date']>;
66+
permitId: Maybe<Scalars['Int']>;
6667
limit: Maybe<Scalars['Int']>;
6768
offset: Maybe<Scalars['Int']>;
6869
};

lib/invoices/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ const pdfDefinition = (input: {
213213
`${address.addressLine2 ? `${address.addressLine2} - ` : ''}${address.addressLine1}\n`,
214214
`${address.city} ${address.province} ${formatPostalCode(address.postalCode)}`,
215215
],
216-
alignment: 'left',
217-
margin: [40, 170, 0, 0],
216+
absolutePosition: { x: 80, y: 740 },
218217
fontSize: 12,
218+
lineHeight: 1.4,
219219
},
220220
],
221221
styles: {

0 commit comments

Comments
 (0)