Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expense claim form instructions #202

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading