Skip to content

Commit e9645a3

Browse files
committed
feat: add fe fix for standardize
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
1 parent 55e4fd6 commit e9645a3

4 files changed

Lines changed: 6 additions & 16 deletions

File tree

frontend/src/modules/activity/components/activity-timeline.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ const fetchActivities = async ({ reset } = { reset: false }) => {
380380
offset: offset.value,
381381
segments: selectedSegment.value
382382
? [selectedSegment.value]
383-
: segments.value.map((s) => s.id),
383+
: [selectedProjectGroup.value.id],
384384
});
385385
386386
loading.value = false;

frontend/src/modules/lf/layout/components/lf-banners.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ import {
150150
watch, ref, computed, onUnmounted,
151151
} from 'vue';
152152
import { IntegrationService } from '@/modules/integration/integration-service';
153-
import { getSegmentsFromProjectGroup } from '@/utils/segments';
154153
import { isCurrentDateAfterGivenWorkingDays } from '@/utils/date';
155154
import { useRoute } from 'vue-router';
156155
import usePermissions from '@/shared/modules/permissions/helpers/usePermissions';
@@ -227,7 +226,7 @@ const showBanner = computed(() => (integrationsWithErrors.value.length
227226
228227
const fetchIntegrations = (projectGroup) => {
229228
if (projectGroup) {
230-
IntegrationService.list(null, null, null, null, getSegmentsFromProjectGroup(projectGroup))
229+
IntegrationService.list(null, null, null, null, [projectGroup.id])
231230
.then((response) => {
232231
integrations.value = response.rows;
233232
})

frontend/src/modules/organization/organization-service.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import authAxios from '@/shared/axios/auth-axios';
22
import { AuthService } from '@/modules/auth/services/auth.service'; import { storeToRefs } from 'pinia';
33
import { useLfSegmentsStore } from '@/modules/lf/segments/store';
4-
import { getSegmentsFromProjectGroup } from '@/utils/segments';
54

65
const getSelectedProjectGroup = () => {
76
const lsSegmentsStore = useLfSegmentsStore();
@@ -216,10 +215,9 @@ export class OrganizationService {
216215
}
217216

218217
static async fetchMergeSuggestions(limit, offset, query) {
219-
const segments = [
220-
...getSegmentsFromProjectGroup(getSelectedProjectGroup()),
221-
getSelectedProjectGroup().id,
222-
];
218+
const segments = getSelectedProjectGroup()?.id
219+
? [getSelectedProjectGroup().id]
220+
: [];
223221

224222
const data = {
225223
limit,

frontend/src/modules/organization/services/organization.api.service.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import authAxios from '@/shared/axios/auth-axios';
22
import { Organization } from '@/modules/organization/types/Organization';
3-
import { getSegmentsFromProjectGroup } from '@/utils/segments';
43
import { useLfSegmentsStore } from '@/modules/lf/segments/store';
54
import { storeToRefs } from 'pinia';
65

@@ -30,13 +29,7 @@ export class OrganizationApiService {
3029
}
3130

3231
static async fetchMergeSuggestions(limit: number = 20, offset: number = 0, query: any = {}) {
33-
const lsSegmentsStore = useLfSegmentsStore();
34-
const { selectedProjectGroup } = storeToRefs(lsSegmentsStore);
35-
36-
const segments = [
37-
...getSegmentsFromProjectGroup(selectedProjectGroup.value),
38-
selectedProjectGroup.value?.id,
39-
];
32+
const segments = getSelectedProjectGroupId() ?? [];
4033

4134
const data = {
4235
limit,

0 commit comments

Comments
 (0)