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

BI-1933 - merging into release/1.0 #408

Merged
merged 2 commits into from
Oct 8, 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
6 changes: 3 additions & 3 deletions src/components/admin/AdminProgramsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,8 @@ export default class AdminProgramsTable extends Vue {
}

mounted() {
this.updatePagination();
this.getPrograms();
this.getSpecies();
this.paginationChanged();
}

setSort(field: string, order: string) {
Expand All @@ -333,7 +332,7 @@ export default class AdminProgramsTable extends Vue {

@Watch('paginationController', { deep: true})
paginationChanged() {
let currentCall = this.paginationController.currentCall
let currentCall = this.paginationController.currentCall;
let paginationQuery = this.paginationController.getPaginationSelections();
if(currentCall && currentCall!.page == paginationQuery.page && currentCall!.pageSize == paginationQuery.pageSize && currentCall!.showAll == paginationQuery.showAll) {
return;
Expand All @@ -348,6 +347,7 @@ export default class AdminProgramsTable extends Vue {
}

getPrograms() {
this.programsLoading = true;
ProgramService.getAll(this.paginationController.currentCall, this.programSort).then(([programs, metadata]) => {

// Check that our most recent query is this one
Expand Down
4 changes: 2 additions & 2 deletions src/components/admin/AdminUsersTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,7 @@ export default class AdminUsersTable extends Vue {

mounted() {
this.getRoles();
this.updatePagination();
this.getUsers();
this.paginationChanged();
}

setSort(field: string, order: string) {
Expand Down Expand Up @@ -344,6 +343,7 @@ export default class AdminUsersTable extends Vue {
}

getUsers() {
this.usersLoading = true;
UserService.getAll(this.paginationController.currentCall, this.systemUserSort).then(([users, metadata]) => {
if (this.paginationController.matchesCurrentRequest(metadata.pagination)){
this.users = users;
Expand Down
2 changes: 2 additions & 0 deletions src/components/experiments/ExperimentsObservationsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export default class ExperimentsObservationsTable extends Vue {
));

this.paginationController.pageSize = 20;
this.paginationChanged();
}

@Watch('paginationController', { deep: true})
Expand All @@ -174,6 +175,7 @@ export default class ExperimentsObservationsTable extends Vue {

@Watch('filters', {deep: true})
async getExperiments() {
this.experimentsLoading = true;
try {
const {call, callId} = this.experimentCallStack.makeCall(this.filters);

Expand Down
3 changes: 2 additions & 1 deletion src/components/germplasm/GermplasmListsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export default class GermplasmListsTable extends Vue {
this.germplasmListSort,
this.paginationController
));
this.getGermplasmLists();
this.paginationChanged();
}

@Watch('paginationController', { deep: true})
Expand All @@ -183,6 +183,7 @@ export default class GermplasmListsTable extends Vue {

@Watch('filters', {deep: true})
async getGermplasmLists() {
this.germplasmListsLoading = true;
try {
const {call, callId} = this.germplasmListCallStack.makeCall(this.filters);
const response = await call;
Expand Down
3 changes: 2 additions & 1 deletion src/components/germplasm/GermplasmTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export default class GermplasmTable extends Vue {
this.paginationController
));

this.getGermplasm();
this.paginationChanged();
}

@Watch('paginationController', { deep: true})
Expand All @@ -177,6 +177,7 @@ export default class GermplasmTable extends Vue {

@Watch('filters', {deep: true})
async getGermplasm() {
this.germplasmLoading = true;
try {
// Only process the most recent call
const {call, callId} = this.germplasmCallStack.makeCall(this.filters);
Expand Down
3 changes: 2 additions & 1 deletion src/components/ontology/OntologyTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ export default class OntologyTable extends Vue {
ontologySort!: OntologySort;

mounted() {
this.paginationController.pageSize = 200;
this.getSubscribedOntology();
this.getObservationLevels();
this.getAttributesEntitiesDescriptions();
Expand All @@ -347,7 +348,7 @@ export default class OntologyTable extends Vue {
this.paginationController
));
this.registerSidePanelEventHandlers();
this.getTraits();
this.paginationChanged();
}

@Watch('paginationController', { deep: true})
Expand Down
4 changes: 2 additions & 2 deletions src/components/program/ProgramLocationsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,7 @@ export default class ProgramLocationsTable extends Vue {
}

mounted() {
this.updatePagination();
this.getLocations();
this.paginationChanged();
}

setSort(field: string, order: string) {
Expand Down Expand Up @@ -222,6 +221,7 @@ export default class ProgramLocationsTable extends Vue {
}

getLocations() {
this.locationsLoading = true;
ProgramLocationService.getAll(this.activeProgram!.id!, this.paginationController.currentCall, this.locationSort).then(([programLocations, metadata]) => {
if (this.paginationController.matchesCurrentRequest(metadata.pagination)){
this.locations = programLocations;
Expand Down
4 changes: 2 additions & 2 deletions src/components/program/ProgramUsersTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,9 @@ export default class ProgramUsersTable extends Vue {
}

mounted() {
this.updatePagination();
this.getRoles();
this.getUsers();
this.getSystemUsers();
this.paginationChanged();
}

setSort(field: string, order: string) {
Expand Down Expand Up @@ -286,6 +285,7 @@ export default class ProgramUsersTable extends Vue {
}

getUsers() {
this.usersLoading = true;
ProgramUserService.getAll(this.activeProgram!.id!, this.paginationController.currentCall, this.programUserSort).then(([programUsers, metadata]) => {
if (this.paginationController.matchesCurrentRequest(metadata.pagination)){
this.users = programUsers;
Expand Down
2 changes: 1 addition & 1 deletion src/components/tables/expandableTable/ExpandableTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
</a>
</b-table-column>

<template v-slot:empty v-if="this.loading !== true">
<template v-slot:empty v-if="!loading">
<slot name="emptyMessage" />
</template>

Expand Down
3 changes: 1 addition & 2 deletions src/components/trait/TraitsImportTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,7 @@ export default class TraitsImportTable extends Vue {
private fullNameSortLabel: string = OntologySortField.FullName;

mounted() {
this.updatePagination();
this.getTraitUpload();
this.paginationChanged();
}

@Watch('paginationController', { deep: true})
Expand Down
Loading