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

Add a scrollbar to the duplicate import modal #71

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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## UNRELEASED

### Adds

* Add a scrollbar to the duplicate import modal to handle too many duplicates, and fixed the "Type" column to display the correct document type.

## 2.2.0 (2024-07-12)

### Adds
Expand Down
14 changes: 12 additions & 2 deletions ui/apos/components/AposDuplicateImportModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<div class="apos-import-duplicate__section">
<table class="apos-table">
<tbody>
<thead>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

<tr>
<th class="apos-table__header">
<AposButton
Expand All @@ -46,6 +46,8 @@
{{ $t('aposImportExport:lastEdited') }}
</th>
</tr>
</thead>
<tbody>
<tr
v-for="doc in duplicatedDocs"
:key="doc.aposDocId"
Expand Down Expand Up @@ -243,7 +245,7 @@ export default {
: this.duplicatedDocs.map(({ aposDocId }) => aposDocId);
},
docLabel(doc) {
const moduleOptions = apos.modules[this.type];
const moduleOptions = apos.modules[doc.type];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes! 👌

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks


return moduleOptions?.label
? this.$t(moduleOptions?.label)
Expand Down Expand Up @@ -323,6 +325,14 @@ export default {
display: flex;
flex-direction: column;
align-items: baseline;
max-height: 210px;
overflow-y: auto;
}

.apos-import-duplicate__section thead {
position: sticky;
top: 0;
background-color: var(--a-background-primary);
}

.apos-import-duplicate__section .apos-table__header {
Expand Down
Loading