Skip to content

Commit

Permalink
minor ui fixes for project table
Browse files Browse the repository at this point in the history
  • Loading branch information
khansadaoudi committed Sep 12, 2024
1 parent 3c0aac0 commit 8e9e972
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/components/project/ProjectOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
{{ selectedSamples.length }}
<span v-if="selectedSamples.length === 1">{{ $t('projectOptions.sample[0]') }}</span>
<span v-else>{{ $t('projectOptions.sample[1]') }}</span>
/
{{ samplesLength }}
<span v-if="samplesLength === 1">{{ $t('projectOptions.sample[0]') }}</span>
<span v-else>{{ $t('projectOptions.sample[1]') }}</span>
</div>
<q-btn v-if="isAdmin" flat icon="delete" @click="triggerConfirmAction(deleteSamples)">
<q-tooltip>
Expand Down Expand Up @@ -70,6 +74,10 @@ export default defineComponent({
DeleteUserTreesDial,
},
props: {
samplesLength: {
type: Object as PropType<number>,
required: true,
},
selectedSamples: {
type: Object as PropType<sample_t[]>,
required: true,
Expand Down
3 changes: 1 addition & 2 deletions src/components/project/ProjectTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
selection="multiple"
:table-header-class="$q.dark.isActive ? 'text-white' : 'text-primary'"
virtual-scroll
table-style="max-height:80vh"
row-key="sampleName"
hide-no-data
:pagination="table.pagination"
Expand Down Expand Up @@ -148,7 +147,7 @@ export default defineComponent({
sortBy: 'samplename',
descending: true,
page: 1,
rowsPerPage: 10,
rowsPerPage: 50,
},
loadingDelete: false,
exporting: false,
Expand Down
2 changes: 2 additions & 0 deletions src/pages/Project.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@
</q-tabs>
<q-tab-panels keep-alive v-model="tab">
<q-tab-panel class="q-gutter-md" name="samples">

<ProjectOptions
:selected-samples="selectedSamples"
:canDeleteFromGithub="isAllowdedToSync && syncGithubRepo !== undefined"
:samples-length="samples.length"
@unselect="unselectSamples = true"
@reload="loadProjectData"
></ProjectOptions>
Expand Down

0 comments on commit 8e9e972

Please sign in to comment.