Skip to content

Commit 12983bc

Browse files
authored
[Release] Version 0.0.6 (#270)
* [Fix] Disable GQL playground and introspection in production (#269) * [Fix] Specify node version in package.json (#268) * [Fix] Allow GQL introspection (#267) * [Fix] Re-enable GQL playground for debugging (#266) * [Fix] Add port to Next start script (#265) * [Fix] Fix create new APP flow failing (#263) * [Fix] Fix task log entries not showing (#262) * [Fix] Fix inconsistent applicant flow copy (#261) * [Fix] Fix accountant report aggregation values (#260) * [Fix] Fix invoice records failing to be created (#259) * [Fix] Fix permit holders not rendering if no recent permit (#258)
1 parent c4fd2da commit 12983bc

File tree

11 files changed

+34
-12
lines changed

11 files changed

+34
-12
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
matrix:
1919
os: [ubuntu-latest]
20-
node: [14]
20+
node: [14.17.0]
2121

2222
steps:
2323
- name: Checkout

components/applicant/renewals/RenewalForm/ContactInformationSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const ContactInformationSection: FC = () => {
6666
{/* Check whether applicant has updated contact info */}
6767
<RadioGroupField
6868
name="updatedContactInfo"
69-
label="Have you changed your contact information since you received or renewed your last parking pass?"
69+
label="Have you changed your contact information since you received or renewed your last parking permit?"
7070
required
7171
value={
7272
values.updatedContactInfo === null ? undefined : Number(values.updatedContactInfo)

components/applicant/renewals/RenewalForm/PersonalAddressSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const PersonalAddressSection: FC = () => {
7171
{/* Check whether applicant has updated address */}
7272
<RadioGroupField
7373
name="updatedAddress"
74-
label="Has your address changed since you received your last parking pass?"
74+
label="Has your address changed since you received your last parking permit?"
7575
required
7676
value={values.updatedAddress === null ? undefined : Number(values.updatedAddress)}
7777
>

components/applicant/renewals/RenewalForm/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ const RenewalForm: FC = () => {
205205
isChecked={certified}
206206
onChange={event => setCertified(event.target.checked)}
207207
>
208-
{`I certify that I am the holder of the accessible parking pass for which this
208+
{`I certify that I am the holder of the accessible parking permit for which this
209209
application for renewal is submitted, and that I have personally provided all of the
210210
information required in this application.`}
211211
</Checkbox>

lib/application-processing/resolvers.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -975,13 +975,15 @@ export const updateApplicationProcessingGenerateInvoice: Resolver<
975975
return { ok: false, error: 'Application does not exist' };
976976
}
977977

978+
const { applicationProcessingId } = application;
979+
978980
// Create invoice record in DB
979981
let invoice;
980982
try {
981983
invoice = await prisma.applicationInvoice.create({
982984
data: {
983985
applicationProcessing: {
984-
connect: { id: applicationId },
986+
connect: { id: applicationProcessingId },
985987
},
986988
employee: {
987989
connect: { id: session.id },

lib/applications/field-resolvers.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,18 @@ export const applicationProcessingResolver: FieldResolver<
6565
> = async (parent, _args, { prisma, logger }) => {
6666
const applicationProcessing = await prisma.application
6767
.findUnique({ where: { id: parent.id } })
68-
.applicationProcessing();
68+
.applicationProcessing({
69+
include: {
70+
appNumberEmployee: true,
71+
appHolepunchedEmployee: true,
72+
walletCardCreatedEmployee: true,
73+
reviewRequestEmployee: true,
74+
applicationInvoice: { include: { employee: true } },
75+
documentsUrlEmployee: true,
76+
appMailedEmployee: true,
77+
paymentRefundedEmployee: true,
78+
},
79+
});
6980

7081
if (!applicationProcessing) {
7182
return null;

lib/applications/resolvers.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,8 @@ export const createNewApplication: Resolver<
293293
const physicianAssessment = {
294294
disability,
295295
disabilityCertificationDate,
296+
mobilityAids,
297+
otherMobilityAids,
296298
patientCondition,
297299
otherPatientCondition,
298300
permitType: input.permitType,
@@ -352,7 +354,6 @@ export const createNewApplication: Resolver<
352354
billingCountry: input.billingCountry,
353355
billingPostalCode,
354356
};
355-
356357
try {
357358
await createNewRequestFormSchema.validate({
358359
permitHolder,
@@ -372,7 +373,7 @@ export const createNewApplication: Resolver<
372373
}
373374

374375
// Unknown error
375-
logger.error({ error: err }, 'Unknown error');
376+
logger.error({ error: (err as any).message }, 'Unknown error');
376377
throw new ApolloError('Application was unable to be created');
377378
}
378379

lib/reports/resolvers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ export const generateAccountantReport: Resolver<
363363
where: {
364364
createdAt: {
365365
gte: startDate,
366-
lte: endDate,
366+
lt: endDate,
367367
},
368368
},
369369
_sum: {

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
{
22
"name": "with-typescript",
33
"version": "1.0.0",
4+
"engines": {
5+
"node": "14.17.0"
6+
},
47
"scripts": {
58
"dev": "next",
69
"dev:pretty": "next | pino-pretty",
710
"build": "next build",
8-
"start": "next start",
11+
"start": "next start -p $PORT",
912
"type-check": "tsc",
1013
"generate-graphql-types": "node ./lib/scripts/generate-graphql-types.js",
1114
"reset-db": "sh lib/scripts/reset-db.sh",

pages/admin/permit-holders.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,12 @@ const PermitHolders: NextPage = () => {
221221
Header: 'Recent APP',
222222
accessor: 'mostRecentPermit',
223223
disableSortBy: true,
224-
Cell: ({ value: { expiryDate, rcdPermitId } }) => {
224+
Cell: ({ value }) => {
225+
if (!value) {
226+
return 'N/A';
227+
}
228+
229+
const { expiryDate, rcdPermitId } = value;
225230
const permitStatus = getPermitExpiryStatus(new Date(expiryDate));
226231
return (
227232
<Flex>

0 commit comments

Comments
 (0)