Skip to content

Commit

Permalink
expense claim form instructions (#202)
Browse files Browse the repository at this point in the history
<img width="505" alt="image"
src="https://github.com/user-attachments/assets/87f19649-45fa-4660-8a98-bfa7592b5974">

Added link to how to create an expense claim form for PPRs. Previously
was just sending over Discord. Also, no need for supporting documents on
UPRs
  • Loading branch information
victorzheng02 authored Aug 29, 2024
1 parent 580c48d commit bb109b6
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 bb109b6

Please sign in to comment.