diff --git a/frontend/src/modules/contributor/components/details/overview/contributor-details-projects.vue b/frontend/src/modules/contributor/components/details/overview/contributor-details-projects.vue
index 8fba02ac96..e9131068b6 100644
--- a/frontend/src/modules/contributor/components/details/overview/contributor-details-projects.vue
+++ b/frontend/src/modules/contributor/components/details/overview/contributor-details-projects.vue
@@ -23,7 +23,8 @@
Organization(s) that an individual represents while contributing to a project.
This association indicates that the person's activities were made in the context
- of their role within the organization, rather than as an independent contributor.
+ of their role within the organization, rather than as an independent
+ contributor.
@@ -40,14 +41,15 @@
Individual responsible for overseeing and managing code repositories by
- reviewing and merging pull requests, addressing issues, ensuring code quality, and guiding contributors.
+ reviewing and merging pull requests, addressing issues, ensuring code quality,
+ and guiding contributors.
Contributor
- Someone who has contributed to a project by making changes or additions to its code.
- Contributions require that code was successfully merged into a repository.
+ Someone who has contributed to a project by making changes or additions to its
+ code. Contributions require that code was successfully merged into a repository.
@@ -57,21 +59,26 @@
-
+
{{ project.name }}
+
+ {{ project.activityCount }} {{ parseInt(project.activityCount) > 1 ? 'activities' : 'activity' }}
+
-
+
Add affiliation
@@ -93,11 +100,13 @@
Edit affiliation
Report issue
@@ -124,11 +133,11 @@
import LfCard from '@/ui-kit/card/Card.vue';
import LfButton from '@/ui-kit/button/Button.vue';
import LfIconOld from '@/ui-kit/icon/IconOld.vue';
+import LfIcon from '@/ui-kit/icon/Icon.vue';
import { computed, ref } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { Contributor, ContributorAffiliation } from '@/modules/contributor/types/Contributor';
-import LfContributorEditAffilations
- from '@/modules/contributor/components/edit/affilations/contributor-affilations-edit.vue';
+import LfContributorEditAffilations from '@/modules/contributor/components/edit/affilations/contributor-affilations-edit.vue';
import LfTable from '@/ui-kit/table/Table.vue';
import LfDropdown from '@/ui-kit/dropdown/Dropdown.vue';
import LfTableCell from '@/ui-kit/table/TableCell.vue';
@@ -156,7 +165,8 @@ const { setReportDataModal } = useSharedStore();
const showMore = ref(false);
const isAffilationEditOpen = ref(false);
-const getAffiliations = (projectId: string) => (props.contributor.affiliations || []).filter((affiliation) => affiliation.segmentId === projectId)
+const getAffiliations = (projectId: string) => (props.contributor.affiliations || [])
+ .filter((affiliation) => affiliation.segmentId === projectId)
.reduce((obj: Record, aff: ContributorAffiliation) => {
if (!obj[aff.organizationId]) {
return {
diff --git a/frontend/src/modules/organization/components/details/organization-details-contributors.vue b/frontend/src/modules/organization/components/details/organization-details-contributors.vue
index eba5a64385..c4132eb72f 100644
--- a/frontend/src/modules/organization/components/details/organization-details-contributors.vue
+++ b/frontend/src/modules/organization/components/details/organization-details-contributors.vue
@@ -20,9 +20,7 @@
-
- Sort:
-
+ Sort:
{{ sorters[sort] }}
@@ -37,12 +35,7 @@
@click="onSortChange(key)"
>
{{ label }}
-
+
@@ -71,11 +64,7 @@
class="border-2 rounded-full p-0.5"
:class="isNew(contributor) ? 'border-primary-500' : 'border-transparent'"
>
-
+
{{ contributor.displayName }}
@@ -117,11 +106,7 @@
-
+
@@ -139,18 +124,13 @@
{{ contributors.length }} of {{ totalContacts }} people
-
+
Load more
@@ -176,8 +156,7 @@ import LfDropdown from '@/ui-kit/dropdown/Dropdown.vue';
import LfDropdownItem from '@/ui-kit/dropdown/DropdownItem.vue';
import { useLfSegmentsStore } from '@/modules/lf/segments/store';
import LfButton from '@/ui-kit/button/Button.vue';
-import AppIdentitiesHorizontalListMembers
- from '@/shared/modules/identities/components/identities-horizontal-list-members.vue';
+import AppIdentitiesHorizontalListMembers from '@/shared/modules/identities/components/identities-horizontal-list-members.vue';
import pluralize from 'pluralize';
import LfTooltip from '@/ui-kit/tooltip/Tooltip.vue';
import LfSpinner from '@/ui-kit/spinner/Spinner.vue';
@@ -202,6 +181,7 @@ const totalContacts = ref(0);
const loading = ref(false);
const savedBody = ref({});
+const searchStr = ref('');
const {
avatar, isNew, identities, isMasked,
@@ -246,21 +226,18 @@ const doGetMembersCount = () => {
segments: selectedProjectGroup.value?.id ? [selectedProjectGroup.value?.id] : props.organization.segments,
},
true,
- )
- .then(({ count }) => {
- totalContacts.value = count;
- });
+ ).then(({ count }) => {
+ totalContacts.value = count;
+ });
};
const fetch = () => {
loading.value = true;
MemberService.listMembers({
filter: {
- and: [
- orgFilter,
- savedBody.value,
- ],
+ and: [orgFilter, savedBody.value],
},
+ search: searchStr.value,
offset: (pagination.value.page - 1) * pagination.value.perPage,
limit: pagination.value.perPage,
orderBy: sort.value,
@@ -284,7 +261,7 @@ const fetch = () => {
};
const loadMore = () => {
- if (pagination.value.total <= (pagination.value.page * pagination.value.perPage)) {
+ if (pagination.value.total <= pagination.value.page * pagination.value.perPage) {
return;
}
pagination.value.page += 1;
@@ -292,7 +269,8 @@ const loadMore = () => {
};
const onFilterChange = (filterQuery: FilterQuery) => {
- savedBody.value = filterQuery.filter;
+ savedBody.value = filterQuery.body;
+ searchStr.value = filterQuery.search;
pagination.value.page = 1;
pagination.value.total = 0;
fetch();
diff --git a/frontend/src/modules/organization/components/details/overview/organization-details-community.vue b/frontend/src/modules/organization/components/details/overview/organization-details-community.vue
index ab4d86052b..4cfa79dd14 100644
--- a/frontend/src/modules/organization/components/details/overview/organization-details-community.vue
+++ b/frontend/src/modules/organization/components/details/overview/organization-details-community.vue
@@ -17,13 +17,7 @@
Community size
-
+
{{ pluralize('person', memberCount || 0, true) }}
@@ -33,14 +27,14 @@
# of activities
- {{ activityCount && formatNumber(activityCount) || '-' }}
+ {{ (activityCount && formatNumber(activityCount)) || '-' }}
@@ -48,8 +42,11 @@
Joined date
- {{ moment(props.organization.joinedAt).isAfter(moment('1970-01-01', 'year'))
- ? moment(props.organization.joinedAt).format('MMM DD, YYYY') : '-' }}
+ {{
+ moment(props.organization.joinedAt).isAfter(moment('1970-01-01', 'year'))
+ ? moment(props.organization.joinedAt).format('MMM DD, YYYY')
+ : '-'
+ }}
@@ -63,13 +60,14 @@ import moment from 'moment';
import { formatNumber } from '@/utils/number';
import { Organization } from '@/modules/organization/types/Organization';
import pluralize from 'pluralize';
-import { computed, onMounted, ref } from 'vue';
+import {
+ computed, onMounted, ref,
+} from 'vue';
import { MemberService } from '@/modules/member/member-service';
import { MergeActionState } from '@/shared/modules/merge/types/MemberActions';
import LfLoading from '@/ui-kit/loading/Loading.vue';
import { useLfSegmentsStore } from '@/modules/lf/segments/store';
import { storeToRefs } from 'pinia';
-import { ActivityService } from '@/modules/activity/activity-service';
import LfOrganizationDetailsCommunityProjectSelect
from '@/modules/organization/components/details/overview/community/organization-details-community-project-select.vue';
@@ -82,8 +80,7 @@ const { selectedProjectGroup } = storeToRefs(useLfSegmentsStore());
const selectedSegment = ref(selectedProjectGroup.value?.id || '');
const memberCount = ref(0);
const loadingMemberCount = ref(true);
-const activityCount = ref(0);
-const loadingActivityCount = ref(true);
+const activityCount = computed(() => props.organization.activityCount);
const doGetMembersCount = () => {
loadingMemberCount.value = true;
@@ -104,35 +101,10 @@ const doGetMembersCount = () => {
});
};
-const doGetActivityCount = () => {
- loadingActivityCount.value = true;
- ActivityService.query(
- {
- filter: {
- and: [
- { organizationId: { in: [props.organization.id] } },
- ],
- },
- limit: 1,
- offset: 0,
- orderBy: 'timestamp_DESC',
- segments: selectedSegment.value ? [selectedSegment.value] : props.organization.segments,
- },
- true,
- )
- .then((data) => {
- activityCount.value = data.count;
- })
- .finally(() => {
- loadingActivityCount.value = false;
- });
-};
-
const hasSegments = computed(() => selectedProjectGroup.value?.id);
const loadData = () => {
doGetMembersCount();
- doGetActivityCount();
};
onMounted(() => {
diff --git a/frontend/src/shared/modules/filters/components/Filter.vue b/frontend/src/shared/modules/filters/components/Filter.vue
index cafd58d984..c40de09d2b 100644
--- a/frontend/src/shared/modules/filters/components/Filter.vue
+++ b/frontend/src/shared/modules/filters/components/Filter.vue
@@ -1,12 +1,7 @@
-
+
{{ filters.relation }}
@@ -59,8 +54,7 @@