diff --git a/src/components/FlawAffects.vue b/src/components/FlawAffects.vue index 74b8ed048..df1a390bf 100644 --- a/src/components/FlawAffects.vue +++ b/src/components/FlawAffects.vue @@ -340,7 +340,7 @@ function addNewAffect() { alerts: [], } as ZodAffectType; emit('affect:add', affect); - affectsBeingEdited.value.push(affect); + // affectsBeingEdited.value.push(affect); } // Remove affects @@ -503,7 +503,14 @@ const allTrackers = computed(() => allAffects.value.flatMap(affect => affect.tra const affectsManaging = ref(); const displayedTrackers = computed(() => { - return sortedAffects.value.flatMap(affect => affect.trackers); + const aux = sortedAffects.value.flatMap(affect => + affect.trackers.map(tracker => ({ + ...tracker, + ps_module: affect.ps_module + })) + ); + console.log(aux); + return aux; }); function fileTrackersForAffects(affects: ZodAffectType[]) { diff --git a/src/components/FlawTrackers.vue b/src/components/FlawTrackers.vue index b82fe59b5..639fa82e7 100644 --- a/src/components/FlawTrackers.vue +++ b/src/components/FlawTrackers.vue @@ -5,9 +5,11 @@ import type { ZodAffectType, ZodTrackerType } from '@/types/zodAffect'; import { ascend, descend, sortWith } from 'ramda'; import AffectsTrackers from '@/components/AffectsTrackers.vue'; +type TrackerWithModule = ZodTrackerType & { ps_module: string }; + const props = defineProps<{ flawId: string; - displayedTrackers: ZodTrackerType[]; + displayedTrackers: TrackerWithModule[]; affectsNotBeingDeleted: ZodAffectType[]; allTrackersCount: number; }>(); @@ -42,19 +44,19 @@ const setSort = (key: sortKeys) => { } }; -function sortTrackers(affects: ZodTrackerType[]): ZodTrackerType[] { +function sortTrackers(trackers: TrackerWithModule[]): TrackerWithModule[] { const customSortKey = sortKey.value; const order = sortOrder.value; - const customSortFn = (affect: ZodTrackerType) => { + const customSortFn = (affect: TrackerWithModule) => { return affect[customSortKey] || 0; }; - const comparator = [order(customSortFn)]; + const comparator = [order(customSortFn)]; return sortWith([ ...comparator - ])(affects); + ])(trackers); } // Trackers filters by field @@ -178,6 +180,7 @@ function changePage(page: number) { Bug ID + Module Product Stream Status @@ -257,6 +260,7 @@ function changePage(page: number) { {{ tracker.ps_update_stream }} + {{ tracker.ps_module }} {{ tracker.status?.toUpperCase() || 'EMPTY' }} {{ formatDate(tracker.created_dt ?? '', true) }} {{ formatDate(tracker.updated_dt ?? '', true) }} @@ -341,20 +345,24 @@ function changePage(page: number) { } &:nth-of-type(2) { - width: 23%; + width: 20%; } &:nth-of-type(3) { - width: 15%; + width: 20%; } &:nth-of-type(4) { - width: 20%; - cursor: pointer; + width: 15%; } &:nth-of-type(5) { - width: 20%; + width: 15%; + cursor: pointer; + } + + &:nth-of-type(6) { + width: 15%; cursor: pointer; } }