+
Germplasm Lists
Date: Fri, 14 Jan 2022 10:06:35 -0500
Subject: [PATCH 12/14] Fixing type
---
src/components/germplasm/GermplasmListsTable.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/germplasm/GermplasmListsTable.vue b/src/components/germplasm/GermplasmListsTable.vue
index cbe24c2e7..055bb79f4 100644
--- a/src/components/germplasm/GermplasmListsTable.vue
+++ b/src/components/germplasm/GermplasmListsTable.vue
@@ -116,7 +116,7 @@ export default class GermplasmListsTable extends Vue {
}).finally(() => this.germplasmListsLoading = false);
}
- formatDate(date) {
+ formatDate(date: Date) {
return moment(date).format('YYYY-M-D, h:mm:ss');
}
}
From 6e365d9a2fa5078376197d1bd3ba0ed6ec5871c2 Mon Sep 17 00:00:00 2001
From: HMS17 <84345306+HMS17@users.noreply.github.com>
Date: Thu, 20 Jan 2022 16:29:56 -0500
Subject: [PATCH 13/14] Code review cleanup
---
src/breeding-insight/service/GermplasmService.ts | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/breeding-insight/service/GermplasmService.ts b/src/breeding-insight/service/GermplasmService.ts
index 57e391b96..7cf05990e 100644
--- a/src/breeding-insight/service/GermplasmService.ts
+++ b/src/breeding-insight/service/GermplasmService.ts
@@ -23,15 +23,11 @@ import {GermplasmDAO} from "@/breeding-insight/dao/GermplasmDAO";
export class GermplasmService {
- static getAll(programId: string, paginationQuery?: PaginationQuery): Promise<[GermplasmList[], Metadata]> {
+ static getAll(programId: string, paginationQuery: PaginationQuery = new PaginationQuery(0, 0, true)): Promise<[GermplasmList[], Metadata]> {
return new Promise<[GermplasmList[], Metadata]>(((resolve, reject) => {
let germplasmLists: GermplasmList[] = [];
- if (paginationQuery === undefined) {
- paginationQuery = new PaginationQuery(0, 0, true);
- }
-
if (programId) {
GermplasmDAO.getAllLists(programId, paginationQuery).then((biResponse: BiResponse) => {
if (biResponse.result.data) {
From 1e96b9c77331ddfab2ee649d71328b5163cf66c1 Mon Sep 17 00:00:00 2001
From: HMS17 <84345306+HMS17@users.noreply.github.com>
Date: Mon, 24 Jan 2022 10:52:55 -0500
Subject: [PATCH 14/14] Code review pagination changes
---
src/components/germplasm/GermplasmListsTable.vue | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/components/germplasm/GermplasmListsTable.vue b/src/components/germplasm/GermplasmListsTable.vue
index 055bb79f4..358b854c0 100644
--- a/src/components/germplasm/GermplasmListsTable.vue
+++ b/src/components/germplasm/GermplasmListsTable.vue
@@ -22,8 +22,8 @@
v-bind:loading="this.germplasmListsLoading"
v-bind:pagination="germplasmListsPagination"
v-on:paginate="paginationController.updatePage($event)"
- v-on:paginate-toggle-all="paginationController.toggleShowAll()"
- v-on:paginate-page-size="paginationController.updatePageSize($event)"
+ v-on:paginate-toggle-all="paginationController.toggleShowAll(germplasmListsPagination.totalCount.valueOf())"
+ v-on:paginate-page-size="updatePageSize($event)"
>
{{ props.row.data.listName}}
@@ -119,6 +119,11 @@ export default class GermplasmListsTable extends Vue {
formatDate(date: Date) {
return moment(date).format('YYYY-M-D, h:mm:ss');
}
+
+ updatePageSize(pageSize: string) {
+ this.paginationController.updatePageSize(Number(pageSize).valueOf());
+ }
+
}