Skip to content

Commit a645238

Browse files
sherryhliChinemeremChigbokj3moraesjennchennJennyVong
authored
[Release] Version 0.3.4 (#375)
* Add bowen to employees (#367) * Add Jenny to employees (#368) * [Fix] Mail Lost Default to Cash (#366) * 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 * mail lost default to cash * removed the extra other option * Add Jenn Chen * fix name * [Fix] Fix names being clipped in table cell content (#370) * Set overflow-y to visible for table content * Update employee email for testing * Update overflow property for requests table * move generate report button (#369) * Update permit form links (#373) Use the 2024 links for the permit replacement and application forms * [Fix] Force network call for accountant report download (#371) --------- Co-authored-by: Chinemerem <chinemeremchigbo@Outlook.com> Co-authored-by: Keane Moraes <lordvader3002@gmail.com> Co-authored-by: Jennifer Chen <32009013+jennchenn@users.noreply.github.com> Co-authored-by: Jenny Vong <jenny_vong@outlook.com>
1 parent 53d690c commit a645238

File tree

9 files changed

+52
-24
lines changed

9 files changed

+52
-24
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"editor.defaultFormatter": "esbenp.prettier-vscode",
3-
"editor.formatOnSave": true
3+
"editor.formatOnSave": true,
4+
"typescript.tsdk": "node_modules\\typescript\\lib"
45
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ export default function PaymentDetailsForm({ paymentInformation }: PaymentDetail
2525
name="paymentInformation.paymentMethod"
2626
label="Payment method"
2727
required
28+
// Set default value to the payment method if paymentMethod is set in the form data
29+
defaultValue={paymentInformation.paymentMethod || undefined}
2830
>
2931
<Stack>
3032
<Radio value={'AMEX' as PaymentType}>{'American Express'}</Radio>

components/admin/requests/reason-for-replacement/Form.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export default function ReasonForReplacementForm({
5757
value={'MAIL_LOST'}
5858
onChange={() => {
5959
setFieldValue('paymentInformation.processingFee', '0');
60+
setFieldValue('paymentInformation.paymentMethod', 'CASH');
6061
}}
6162
>
6263
{'Mail Lost'}

components/applicant/FAQs.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ const OVERVIEW_FAQs: ReadonlyArray<{ question: string; answer: ReactNode | strin
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.{' '}
203-
<NewTabLink href="https://www.rcdrichmond.org/Parking/PermitReplacementDeclarationForm_2022%20v.pdf">
203+
<NewTabLink href="https://www.rcdrichmond.org/Parking/Permit_Replacement_Declaration_Form_Fillable_2024v.pdf">
204204
Click here
205205
</NewTabLink>{' '}
206206
to download the Replacement Declaration Form.
@@ -220,7 +220,7 @@ const OVERVIEW_FAQs: ReadonlyArray<{ question: string; answer: ReactNode | strin
220220
<p>
221221
The police will also give you an incident or case number to include with your request for
222222
a Replacement Permit.{' '}
223-
<NewTabLink href="https://www.rcdrichmond.org/Parking/PermitReplacementDeclarationForm_2022%20v.pdf">
223+
<NewTabLink href="https://www.rcdrichmond.org/Parking/Permit_Replacement_Declaration_Form_Fillable_2024v.pdf">
224224
Click here
225225
</NewTabLink>{' '}
226226
to download the Replacement Declaration Form.

pages/admin/index.tsx

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import {
2121
Wrap,
2222
Tooltip,
2323
HStack,
24-
useDisclosure,
2524
} from '@chakra-ui/react'; // Chakra UI
2625
import { ChevronDownIcon, SearchIcon, AddIcon } from '@chakra-ui/icons'; // Chakra UI Icons
2726
import Layout from '@components/admin/Layout'; // Layout component
@@ -43,7 +42,6 @@ import useDebounce from '@tools/hooks/useDebounce'; // Debounce hook
4342
import { Column } from 'react-table';
4443
import { formatFullName } from '@lib/utils/format'; // String formatter util
4544
import { formatDateYYYYMMDDLocal } from '@lib/utils/date'; // Date Formatter Util
46-
import GenerateReportModal from '@components/admin/requests/reports/GenerateModal'; // Generate report modal
4745
import EmptyMessage from '@components/EmptyMessage';
4846

4947
// Placeholder columns
@@ -60,7 +58,7 @@ const COLUMNS: Column<ApplicationRow>[] = [
6058
maxWidth="280"
6159
whiteSpace="nowrap"
6260
textOverflow="ellipsis"
63-
overflow="hidden"
61+
overflow="clip visible"
6462
mb="4px"
6563
>
6664
{name}
@@ -129,13 +127,6 @@ const Requests: NextPage = () => {
129127
// Router
130128
const router = useRouter();
131129

132-
//Generate report modal
133-
const {
134-
isOpen: isGenerateReportModalOpen,
135-
onOpen: onOpenGenerateReportModal,
136-
onClose: onCloseGenerateReportModal,
137-
} = useDisclosure();
138-
139130
// Filters
140131
const [statusFilter, setStatusFilter] = useState<ApplicationStatus | null>('PENDING');
141132
const [permitTypeFilter, setPermitTypeFilter] = useState<PermitType | null>(null);
@@ -212,9 +203,6 @@ const Requests: NextPage = () => {
212203
<Flex justifyContent="space-between" alignItems="center" marginBottom="32px">
213204
<Text textStyle="display-xlarge">Requests</Text>
214205
<HStack spacing="12px">
215-
<Button height="48px" variant="outline" onClick={onOpenGenerateReportModal}>
216-
Generate a Report
217-
</Button>
218206
<Menu>
219207
<MenuButton
220208
as={Button}
@@ -417,10 +405,6 @@ const Requests: NextPage = () => {
417405
</Box>
418406
</Box>
419407
</GridItem>
420-
<GenerateReportModal
421-
isOpen={isGenerateReportModalOpen}
422-
onClose={onCloseGenerateReportModal}
423-
/>
424408
</Layout>
425409
);
426410
};

pages/admin/permit-holders.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ const PermitHolders: NextPage = () => {
187187
maxWidth="180"
188188
whiteSpace="nowrap"
189189
textOverflow="ellipsis"
190-
overflow="hidden"
190+
overflow="clip visible"
191191
mb="4px"
192192
>
193193
{name}

pages/admin/reports.tsx

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
import { GetServerSideProps } from 'next'; // Get server side props
22
import { getSession } from 'next-auth/client'; // Session management
3-
import { Text, GridItem, Box, Flex, Input, Button, Spinner, useToast } from '@chakra-ui/react'; // Chakra UI
3+
import {
4+
Text,
5+
GridItem,
6+
Box,
7+
Flex,
8+
Input,
9+
Button,
10+
Spinner,
11+
useToast,
12+
useDisclosure,
13+
} from '@chakra-ui/react'; // Chakra UI
414
import Layout from '@components/admin/Layout'; // Layout component
515
import { authorize } from '@tools/authorization'; // Page authorization
616
import { DownloadIcon } from '@chakra-ui/icons'; // Chakra UI icons
@@ -12,9 +22,16 @@ import {
1222
GenerateAccountantReportResponse,
1323
} from '@tools/admin/permit-holders/graphql/generate-report';
1424
import EmptyMessage from '@components/EmptyMessage';
25+
import GenerateReportModal from '@components/admin/requests/reports/GenerateModal'; // Generate report modal
1526

1627
// Internal home page
1728
export default function Reports() {
29+
//Generate report modal
30+
const {
31+
isOpen: isGenerateReportModalOpen,
32+
onOpen: onOpenGenerateReportModal,
33+
onClose: onCloseGenerateReportModal,
34+
} = useDisclosure();
1835
// const { dateRange, addDayToDateRange, dateRangeString } = useDateRangePicker();
1936
const [startDate, setStartDate] = useState('');
2037
const [endDate, setEndDate] = useState('');
@@ -25,6 +42,7 @@ export default function Reports() {
2542
GenerateAccountantReportResponse,
2643
GenerateAccountantReportRequest
2744
>(GENERATE_ACCOUNTANT_REPORT_QUERY, {
45+
fetchPolicy: 'network-only',
2846
onCompleted: data => {
2947
if (data.generateAccountantReport.ok && !!data.generateAccountantReport.url) {
3048
const link = document.createElement('a');
@@ -61,6 +79,9 @@ export default function Reports() {
6179
<GridItem colSpan={12}>
6280
<Flex justifyContent="space-between" alignItems="center" marginBottom="32px">
6381
<Text textStyle="display-xlarge">Accountant Reports</Text>
82+
<Button height="48px" variant="outline" onClick={onOpenGenerateReportModal}>
83+
Generate a Report
84+
</Button>
6485
</Flex>
6586
<Box
6687
border="1px solid"
@@ -139,6 +160,10 @@ export default function Reports() {
139160
</Box>
140161
</Box>
141162
</GridItem>
163+
<GenerateReportModal
164+
isOpen={isGenerateReportModalOpen}
165+
onClose={onCloseGenerateReportModal}
166+
/>
142167
</Layout>
143168
);
144169
}

pages/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export default function Landing() {
127127
</Box>
128128
<VStack width="100%" alignItems={{ sm: 'center', lg: 'flex-start' }} spacing="32px">
129129
<a
130-
href="https://www.rcdrichmond.org/Parking/Parking_Permit_Application_Form_Fillable_2023v.pdf"
130+
href="https://www.rcdrichmond.org/Parking/Parking_Permit_Application_Form_Fillable_2024v.pdf"
131131
target="_blank"
132132
rel="noopener noreferrer"
133133
>
@@ -146,7 +146,7 @@ export default function Landing() {
146146
</Button>
147147
</a>
148148
<a
149-
href="https://www.rcdrichmond.org/Parking/Permit_Replacement_Declaration_Form_Fillable_2023v.pdf"
149+
href="https://www.rcdrichmond.org/Parking/Permit_Replacement_Declaration_Form_Fillable_2024v.pdf"
150150
target="_blank"
151151
rel="noopener noreferrer"
152152
>

prisma/dev-seed-utils/employees.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ const employees = [
7474
lastName: 'Chigbo',
7575
email: 'chinemeremchigbo+employee@uwblueprint.org',
7676
},
77+
{
78+
firstName: 'Bowen',
79+
lastName: 'Zhu',
80+
email: 'bowenzhu+employee@uwblueprint.org',
81+
},
7782
{
7883
firstName: 'Adil',
7984
lastName: 'Kapadia',
@@ -94,6 +99,16 @@ const employees = [
9499
lastName: 'Sreekaran',
95100
email: 'sharujansreekaran+employee@uwblueprint.org',
96101
},
102+
{
103+
firstName: 'Jenny',
104+
lastName: 'Vong',
105+
email: 'jennyvong+employee@uwblueprint.org',
106+
},
107+
{
108+
firstName: 'Jennifer',
109+
lastName: 'Chen',
110+
email: 'jenniferchen+employee@uwblueprint.org',
111+
},
97112
];
98113

99114
/**

0 commit comments

Comments
 (0)