From 09e72072a0298465d95c60e020bbf75405cfa781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Grom?= Date: Sun, 27 Sep 2026 12:49:21 +0100 Subject: [PATCH 1/3] refactor: convert shared pinia store to a setup store (CM-1564) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs linuxfoundation/lfx-cdp-insights-ops#264 Signed-off-by: Gašper Grom --- frontend/src/shared/pinia/shared.actions.ts | 15 ---------- frontend/src/shared/pinia/shared.getters.ts | 2 -- frontend/src/shared/pinia/shared.state.ts | 7 ----- frontend/src/shared/pinia/shared.store.ts | 33 +++++++++++++-------- 4 files changed, 21 insertions(+), 36 deletions(-) delete mode 100644 frontend/src/shared/pinia/shared.actions.ts delete mode 100644 frontend/src/shared/pinia/shared.getters.ts delete mode 100644 frontend/src/shared/pinia/shared.state.ts diff --git a/frontend/src/shared/pinia/shared.actions.ts b/frontend/src/shared/pinia/shared.actions.ts deleted file mode 100644 index ddf2c8baf9..0000000000 --- a/frontend/src/shared/pinia/shared.actions.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { Contributor } from '@/modules/contributor/types/Contributor'; -import type { ReportDataType } from '@/shared/modules/report-issue/constants/report-data-type.enum'; -import type { Organization } from '@/modules/organization/types/Organization'; - -export default { - /** Report Data Modal * */ - setReportDataModal(data: { - type?: ReportDataType, - attribute?: any, - contributor?: Contributor, - organization?: Organization, - }) { - this.reportDataModal = data; - }, -}; diff --git a/frontend/src/shared/pinia/shared.getters.ts b/frontend/src/shared/pinia/shared.getters.ts deleted file mode 100644 index 02a61bed5e..0000000000 --- a/frontend/src/shared/pinia/shared.getters.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default { -}; diff --git a/frontend/src/shared/pinia/shared.state.ts b/frontend/src/shared/pinia/shared.state.ts deleted file mode 100644 index 76abe30025..0000000000 --- a/frontend/src/shared/pinia/shared.state.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface SharedState { - reportDataModal: any | null; -} - -export default () => ({ - reportDataModal: null, -} as SharedState); diff --git a/frontend/src/shared/pinia/shared.store.ts b/frontend/src/shared/pinia/shared.store.ts index 144c9ad6ba..17dffc6916 100644 --- a/frontend/src/shared/pinia/shared.store.ts +++ b/frontend/src/shared/pinia/shared.store.ts @@ -1,13 +1,22 @@ import { defineStore } from 'pinia'; -import state from './shared.state'; -import getters from './shared.getters'; -import actions from './shared.actions'; - -export const useSharedStore = defineStore( - 'shared', - { - state, - getters, - actions, - }, -); +import { ref } from 'vue'; +import type { Contributor, ContributorIdentity } from '@/modules/contributor/types/Contributor'; +import type { Organization, OrganizationIdentity } from '@/modules/organization/types/Organization'; +import type { ReportDataType } from '@/shared/modules/report-issue/constants/report-data-type.enum'; + +interface ReportDataModalPayload { + type?: ReportDataType; + attribute?: ContributorIdentity | OrganizationIdentity | Organization | Contributor['segments'][number]; + contributor?: Contributor; + organization?: Organization; +} + +export const useSharedStore = defineStore('shared', () => { + const reportDataModal = ref(null); + + function setReportDataModal(data: ReportDataModalPayload): void { + reportDataModal.value = data; + } + + return { reportDataModal, setReportDataModal }; +}); From 1464dab10684bcc378a5dd2bfe7b863d31fdf314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Grom?= Date: Thu, 15 Oct 2026 19:37:25 +0100 Subject: [PATCH 2/3] refactor: type project affiliations in the report payload (CM-1564) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs linuxfoundation/lfx-cdp-insights-ops#264 Signed-off-by: Gašper Grom --- frontend/src/shared/pinia/shared.store.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/shared/pinia/shared.store.ts b/frontend/src/shared/pinia/shared.store.ts index 17dffc6916..f2a243eb5a 100644 --- a/frontend/src/shared/pinia/shared.store.ts +++ b/frontend/src/shared/pinia/shared.store.ts @@ -1,12 +1,16 @@ import { defineStore } from 'pinia'; import { ref } from 'vue'; -import type { Contributor, ContributorIdentity } from '@/modules/contributor/types/Contributor'; +import type { Contributor, ContributorAffiliation, ContributorIdentity } from '@/modules/contributor/types/Contributor'; import type { Organization, OrganizationIdentity } from '@/modules/organization/types/Organization'; import type { ReportDataType } from '@/shared/modules/report-issue/constants/report-data-type.enum'; interface ReportDataModalPayload { type?: ReportDataType; - attribute?: ContributorIdentity | OrganizationIdentity | Organization | Contributor['segments'][number]; + attribute?: + | ContributorIdentity + | OrganizationIdentity + | Organization + | (Contributor['segments'][number] & { affiliations: Record }); contributor?: Contributor; organization?: Organization; } From 0f8020b131de538f58aefef04cd73d71d4393437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C5=A1per=20Grom?= Date: Fri, 16 Oct 2026 13:42:04 +0100 Subject: [PATCH 3/3] chore: lower the type-check baseline to 30 (CM-1564) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs linuxfoundation/lfx-cdp-insights-ops#264 Signed-off-by: Gašper Grom --- frontend/typecheck-baseline.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/typecheck-baseline.json b/frontend/typecheck-baseline.json index 828a3964d8..1caeacfba9 100644 --- a/frontend/typecheck-baseline.json +++ b/frontend/typecheck-baseline.json @@ -1 +1 @@ -{ "errors": 31 } +{ "errors": 30 }