mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 05:22:02 +00:00
fix: show document name and use document path from the API response
This commit is contained in:
@@ -548,21 +548,15 @@ const ExpenseRequestContent = ({
|
||||
<ul className='list-disc'>
|
||||
{initialValues?.documents.map(
|
||||
(requestDocument, requestDocumentIdx) => {
|
||||
const path = requestDocument.path.startsWith(
|
||||
'/'
|
||||
)
|
||||
? requestDocument.path.slice(1)
|
||||
: requestDocument.path;
|
||||
const documentUrl = `${S3_PUBLIC_BASE_URL}/${path}`;
|
||||
return (
|
||||
<li key={requestDocumentIdx}>
|
||||
<Link
|
||||
href={documentUrl}
|
||||
href={requestDocument.path}
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
className='text-blue-500 underline'
|
||||
>
|
||||
{requestDocument.path}{' '}
|
||||
{requestDocument.name}{' '}
|
||||
<Icon
|
||||
icon='cuida:open-in-new-tab-outline'
|
||||
width={12}
|
||||
|
||||
Vendored
+1
@@ -10,6 +10,7 @@ export type BaseExpense = {
|
||||
category: 'BOP' | 'NON-BOP';
|
||||
documents?: {
|
||||
id: number;
|
||||
name: string;
|
||||
path: string;
|
||||
}[];
|
||||
realization_docs?: {
|
||||
|
||||
Reference in New Issue
Block a user