Skip to content

Commit

Permalink
disable button if record series
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandria.gomez authored and alexandria.gomez committed Dec 12, 2024
1 parent 423156a commit 149859b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ export default function RepositoryViewComponent(props: {
);
}

const CANNOT_IMPORT_INTO_RECORD_SERIES = 'Cannot import into a Record Series';
const UPLOAD_FILE_TO_LASERFICHE = 'Upload file to Laserfiche';
function RepositoryBrowserToolbar(props: {
repoClient: IRepositoryApiClientExInternal;
webClientUrl: string;
Expand Down Expand Up @@ -301,7 +303,8 @@ function RepositoryBrowserToolbar(props: {
</button>
<button
className={styles.lfMaterialIconButton}
title='Upload file to Laserfiche'
title={props?.parentItem?.entryType === EntryType.RecordSeries ? CANNOT_IMPORT_INTO_RECORD_SERIES : UPLOAD_FILE_TO_LASERFICHE}
disabled={props?.parentItem?.entryType === EntryType.RecordSeries}
onClick={openImportFileModal}
>
<img
Expand Down

0 comments on commit 149859b

Please sign in to comment.