diff --git a/satellite/satellitedb/projectmembers.go b/satellite/satellitedb/projectmembers.go index b8e115a11..149391f19 100644 --- a/satellite/satellitedb/projectmembers.go +++ b/satellite/satellitedb/projectmembers.go @@ -205,7 +205,7 @@ func sanitizedOrderColumnName(pmo console.ProjectMemberOrder) string { case 2: return "u.email" case 3: - return "u.created_at" + return "pm.created_at" default: return "u.full_name" } diff --git a/satellite/satellitedb/projectmembers_test.go b/satellite/satellitedb/projectmembers_test.go index 7949c817f..1bd3c2a77 100644 --- a/satellite/satellitedb/projectmembers_test.go +++ b/satellite/satellitedb/projectmembers_test.go @@ -19,7 +19,7 @@ func TestSanitizedOrderColumnName(t *testing.T) { 0: {0, "u.full_name"}, 1: {1, "u.full_name"}, 2: {2, "u.email"}, - 3: {3, "u.created_at"}, + 3: {3, "pm.created_at"}, 4: {4, "u.full_name"}, } diff --git a/web/satellite/src/components/apiKeys/SortingHeader.vue b/web/satellite/src/components/apiKeys/SortingHeader.vue index d1c60961c..cf0b16097 100644 --- a/web/satellite/src/components/apiKeys/SortingHeader.vue +++ b/web/satellite/src/components/apiKeys/SortingHeader.vue @@ -6,14 +6,14 @@

Key Name

Created

diff --git a/web/satellite/src/components/team/ProjectMembersArea.vue b/web/satellite/src/components/team/ProjectMembersArea.vue index 487c2fd10..36f741c5d 100644 --- a/web/satellite/src/components/team/ProjectMembersArea.vue +++ b/web/satellite/src/components/team/ProjectMembersArea.vue @@ -151,12 +151,12 @@ export default class ProjectMembersArea extends Vue { } public async onHeaderSectionClickCallback(sortBy: ProjectMemberOrderBy, sortDirection: SortDirection): Promise { - this.$store.dispatch(PM_ACTIONS.SET_SORT_BY, sortBy); - this.$store.dispatch(PM_ACTIONS.SET_SORT_DIRECTION, sortDirection); + await this.$store.dispatch(PM_ACTIONS.SET_SORT_BY, sortBy); + await this.$store.dispatch(PM_ACTIONS.SET_SORT_DIRECTION, sortDirection); try { await this.$store.dispatch(PM_ACTIONS.FETCH, this.FIRST_PAGE); } catch (error) { - this.$store.dispatch(NOTIFICATION_ACTIONS.ERROR, `Unable to fetch project members. ${error.message}`); + await this.$store.dispatch(NOTIFICATION_ACTIONS.ERROR, `Unable to fetch project members. ${error.message}`); } if (this.totalPageCount > 1) { diff --git a/web/satellite/src/components/team/SortingListHeader.vue b/web/satellite/src/components/team/SortingListHeader.vue index 42597ea43..a76fa759b 100644 --- a/web/satellite/src/components/team/SortingListHeader.vue +++ b/web/satellite/src/components/team/SortingListHeader.vue @@ -49,7 +49,7 @@ export default class SortingListHeader extends Vue { public sortBy: ProjectMemberOrderBy = ProjectMemberOrderBy.NAME; public sortDirection: SortDirection = SortDirection.ASCENDING; - public get getSortDirection() { + public get getSortDirection(): SortDirection { if (this.sortDirection === SortDirection.DESCENDING) { return SortDirection.ASCENDING; } @@ -57,15 +57,15 @@ export default class SortingListHeader extends Vue { return SortDirection.DESCENDING; } - public areProjectMembersSortedByName(): boolean { + public get areProjectMembersSortedByName(): boolean { return this.sortBy === ProjectMemberOrderBy.NAME; } - public areProjectMembersSortedByDate(): boolean { + public get areProjectMembersSortedByDate(): boolean { return this.sortBy === ProjectMemberOrderBy.CREATED_AT; } - public areProjectMembersSortedByEmail(): boolean { + public get areProjectMembersSortedByEmail(): boolean { return this.sortBy === ProjectMemberOrderBy.EMAIL; } diff --git a/web/satellite/tests/unit/projectMembers/__snapshots__/SortingListHeader.spec.ts.snap b/web/satellite/tests/unit/projectMembers/__snapshots__/SortingListHeader.spec.ts.snap index 67b7524a1..e40050439 100644 --- a/web/satellite/tests/unit/projectMembers/__snapshots__/SortingListHeader.spec.ts.snap +++ b/web/satellite/tests/unit/projectMembers/__snapshots__/SortingListHeader.spec.ts.snap @@ -14,7 +14,7 @@ exports[`SortingListHeader.vue should render correctly 1`] = `

Added

- +
@@ -22,7 +22,7 @@ exports[`SortingListHeader.vue should render correctly 1`] = `

Email

- +