Skip to content

Commit

Permalink
expense claim form instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
victorzheng02 committed Aug 28, 2024
1 parent 580c48d commit 43bc722
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 12 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/TicketContent/PPRAdminContentTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ const PPRAdminContentTable = () => {
return (
<>
<h2>
To transition status, reporter must upload
supporting documents and manually transition the
To transition status, reporter must upload the
expense claim form and manually transition the
status
</h2>
</>
Expand Down
16 changes: 15 additions & 1 deletion frontend/src/components/UploadFileModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
Button,
CloseButton,
Divider,
Link,
ListItem,
Modal,
ModalBody,
Expand All @@ -21,6 +22,7 @@ import { axiosPreset } from '../axiosConfig'
import LoadingSpinner from './LoadingSpinner'
import { createErrorMessage } from '../utils/errorToasts'
import { useGetCurrentTicket } from '../hooks/hooks'
import { ExternalLinkIcon } from '@chakra-ui/icons'

const fileTypes = ['PNG', 'JPG', 'PDF']
const UploadFileModal = ({
Expand Down Expand Up @@ -101,10 +103,22 @@ const UploadFileModal = ({
<ModalContent>
<ModalHeader>
{isSupportingDocument
? 'Upload Supporting Documents'
? 'Upload Expense Claim Form'
: 'Upload Files'}
</ModalHeader>
<ModalBody>
{isSupportingDocument && (
<Box marginBottom="10px">
<Link
href="https://wiki.watonomous.ca/finance/creating_personal_purchases"
color="blue.600"
isExternal
>
Expense Claim Form Guide
<ExternalLinkIcon mx="2px" />
</Link>
</Box>
)}
<FileUploader
handleChange={onFileAttach}
name="file"
Expand Down
20 changes: 11 additions & 9 deletions frontend/src/pages/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,15 @@ const Dashboard = () => {
>
<Text>Upload Files</Text>
</Button>
<Button
size="sm"
colorScheme="blackAlpha"
onClick={onOpenSupportingDocumentsModal}
>
<Text>Upload Supporting Documents</Text>
</Button>
{currentTicket.type === TICKET_TYPES.PPR && (
<Button
size="sm"
colorScheme="blackAlpha"
onClick={onOpenSupportingDocumentsModal}
>
<Text>Upload Expense Claim Form</Text>
</Button>
)}
</Flex>
)}
{getCurrentTicketContentTable()}
Expand Down Expand Up @@ -351,7 +353,7 @@ const Dashboard = () => {
{supportingDocuments.length > 0 && (
<Box w="100%" mt="12px">
<Heading mb="8px" fontSize="2xl">
Supporting Documents
Expense Claim Form
</Heading>
<Grid gap="5px">
{supportingDocuments?.map((file) => {
Expand Down Expand Up @@ -419,7 +421,7 @@ const Dashboard = () => {
(file) => file.is_supporting_document
)}
refetchFiles={getUploadedFiles}
isSupportingDocument={true}
isSupportingDocument
/>
)}
{isDeleteTicketOpen && (
Expand Down

0 comments on commit 43bc722

Please sign in to comment.