From 4a4eba310a6957ab06bc626c8c39bd19b795bd4d Mon Sep 17 00:00:00 2001 From: Christopher Berge Hove Date: Thu, 17 Oct 2024 09:11:43 +0200 Subject: [PATCH 1/3] chore: update api version on meetings actions (#821) Co-authored-by: Noggling --- .changeset/pr-821-2129413296.md | 5 +++++ .../src/components/task/hooks/use-assignment.ts | 3 ++- .../components/task/queries/fusion-meetings-queries.ts | 9 ++++++--- 3 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 .changeset/pr-821-2129413296.md diff --git a/.changeset/pr-821-2129413296.md b/.changeset/pr-821-2129413296.md new file mode 100644 index 000000000..606899611 --- /dev/null +++ b/.changeset/pr-821-2129413296.md @@ -0,0 +1,5 @@ + +--- +"fusion-project-portal": patch +--- +Update api version on meeting actions to the newest version. diff --git a/client/packages/components/src/components/task/hooks/use-assignment.ts b/client/packages/components/src/components/task/hooks/use-assignment.ts index 8f698bfe2..306218790 100644 --- a/client/packages/components/src/components/task/hooks/use-assignment.ts +++ b/client/packages/components/src/components/task/hooks/use-assignment.ts @@ -1,7 +1,7 @@ import { useFramework } from '@equinor/fusion-framework-react'; import { useQuery } from 'react-query'; import { getPimsTasks } from '../work-assigned/assignment-queries'; -import { getMyMeetingsActions, getMyReviewActions } from '../queries/fusion-meetings-queries'; +import { getMyMeetingsActions, getMyReviewActions, myMeetingsActionSelector } from '../queries/fusion-meetings-queries'; import { getQueryAndNCRequest } from '../queries/query-ncr-request-queries'; import { Task } from '../types/task'; import { getFusionTasks, getProCoSysAssignments } from '../queries/fusion-task-queries'; @@ -95,6 +95,7 @@ export function useMeetingsActionsQuery() { return useQuery({ queryKey: ['Assignment', 'Meetings', 'Meetings-Actions'], queryFn: async ({ signal }) => getMyMeetingsActions(await client, signal), + select: myMeetingsActionSelector, cacheTime: 5000 * 60, refetchInterval: 5000 * 60, staleTime: 2000 * 60, diff --git a/client/packages/components/src/components/task/queries/fusion-meetings-queries.ts b/client/packages/components/src/components/task/queries/fusion-meetings-queries.ts index 7473b0dbe..071aaf026 100644 --- a/client/packages/components/src/components/task/queries/fusion-meetings-queries.ts +++ b/client/packages/components/src/components/task/queries/fusion-meetings-queries.ts @@ -2,7 +2,7 @@ import { IHttpClient } from '@equinor/fusion-framework-module-http'; import { Task } from '../types/task'; import { verifyDate } from '../utils/time'; -import { ActionState, MeetingAction } from '../types/meetings-task'; +import { ActionState, MeetingAction, MeetingType } from '../types/meetings-task'; import { isTaskOverdue } from './query-ncr-request-queries'; function stripHtml(html?: string) { @@ -11,11 +11,14 @@ function stripHtml(html?: string) { return tmp.textContent || tmp.innerText || ''; } -export async function getMyMeetingsActions(client: IHttpClient, signal?: AbortSignal): Promise { - const response = await client.fetch('/persons/me/actions', { signal }); +export async function getMyMeetingsActions(client: IHttpClient, signal?: AbortSignal): Promise { + const response = await client.fetch('/persons/me/actions?api-version=4.0', { signal }); const tasks: MeetingAction[] = await response.json(); + return tasks; +} +export function myMeetingsActionSelector(tasks: MeetingAction[]): Task[] { return tasks .filter((a) => a.state !== ActionState.Completed && a.state !== ActionState.NotCompleted) .map((task) => ({ From cc5f76c5df36ae5cb304382ae43c14d949f6a24f Mon Sep 17 00:00:00 2001 From: Edward Brunton <42774600+EdwardBrunton@users.noreply.github.com> Date: Mon, 21 Oct 2024 09:41:25 +0200 Subject: [PATCH 2/3] fix: Rename meetings tab to meeting actions (#815) Co-authored-by: EdwardBrunton --- .changeset/pr-815-2119525784.md | 5 +++++ client/packages/components/src/components/task/Tasks.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/pr-815-2119525784.md diff --git a/.changeset/pr-815-2119525784.md b/.changeset/pr-815-2119525784.md new file mode 100644 index 000000000..91f0f5334 --- /dev/null +++ b/.changeset/pr-815-2119525784.md @@ -0,0 +1,5 @@ + +--- +"fusion-project-portal": patch +--- +Rename meetings tab to meeting actions diff --git a/client/packages/components/src/components/task/Tasks.tsx b/client/packages/components/src/components/task/Tasks.tsx index 988726d97..11b6648f3 100644 --- a/client/packages/components/src/components/task/Tasks.tsx +++ b/client/packages/components/src/components/task/Tasks.tsx @@ -51,7 +51,7 @@ export const Tasks: FC = ({ height }) => { All ({assignments.length}) - Meetings + Meeting Actions {isLoading.meetingsActions ? ( ) : ( From 7e684b8b92cd2eec3216eb535cdc56c411971551 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 12:33:52 +0200 Subject: [PATCH 3/3] Fusion Project Portal Release (#817) Co-authored-by: EdwardBrunton[bot] --- .changeset/pr-806-2098564848.md | 15 --------------- .changeset/pr-808-2100756531.md | 5 ----- .changeset/pr-815-2119525784.md | 5 ----- .changeset/pr-821-2129413296.md | 5 ----- CHANGELOG.md | 22 ++++++++++++++++++++++ package.json | 2 +- 6 files changed, 23 insertions(+), 31 deletions(-) delete mode 100644 .changeset/pr-806-2098564848.md delete mode 100644 .changeset/pr-808-2100756531.md delete mode 100644 .changeset/pr-815-2119525784.md delete mode 100644 .changeset/pr-821-2129413296.md diff --git a/.changeset/pr-806-2098564848.md b/.changeset/pr-806-2098564848.md deleted file mode 100644 index 26042e71e..000000000 --- a/.changeset/pr-806-2098564848.md +++ /dev/null @@ -1,15 +0,0 @@ - ---- -"fusion-project-portal": major ---- -- BREAKING CHANGE: The previous proxy endpoint: `/bundles/apps/{appKey}/resources/{*resourcePath}` is no more. Instead use `/fusion-apps/{*wildcard*}` to make proxy calls against the whole Fusion Apps API. See Fusion Apps API Swagger documentation for more information about routes. -- Migrated proxy from Fusion Portal to Fusion Apps API -- Updated packages to latest version -- Refactored and simplified code -- Removed unused Project Portal variables in frontend -- Update frontend to use the new proxy endpoints -- Make frontend client use the new types provided by fusion core -- Update the legacy app loader to use the new proxy endpoints and and fix types -- Move legacy app code to apps folder for cleaner repository -- Setup build of legacy app loader in build pipeline for constant build an deployment. -- Update all Fusion dependencies for frontend client diff --git a/.changeset/pr-808-2100756531.md b/.changeset/pr-808-2100756531.md deleted file mode 100644 index 82e3ec560..000000000 --- a/.changeset/pr-808-2100756531.md +++ /dev/null @@ -1,5 +0,0 @@ - ---- -"fusion-project-portal": patch ---- -Fix errors and add data owner on milestones diff --git a/.changeset/pr-815-2119525784.md b/.changeset/pr-815-2119525784.md deleted file mode 100644 index 91f0f5334..000000000 --- a/.changeset/pr-815-2119525784.md +++ /dev/null @@ -1,5 +0,0 @@ - ---- -"fusion-project-portal": patch ---- -Rename meetings tab to meeting actions diff --git a/.changeset/pr-821-2129413296.md b/.changeset/pr-821-2129413296.md deleted file mode 100644 index 606899611..000000000 --- a/.changeset/pr-821-2129413296.md +++ /dev/null @@ -1,5 +0,0 @@ - ---- -"fusion-project-portal": patch ---- -Update api version on meeting actions to the newest version. diff --git a/CHANGELOG.md b/CHANGELOG.md index 47913b4e3..8bedb30c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # fusion-project-portal +## 5.0.0 + +### Major Changes + +- d96ab34: - BREAKING CHANGE: The previous proxy endpoint: `/bundles/apps/{appKey}/resources/{*resourcePath}` is no more. Instead use `/fusion-apps/{*wildcard*}` to make proxy calls against the whole Fusion Apps API. See Fusion Apps API Swagger documentation for more information about routes. + - Migrated proxy from Fusion Portal to Fusion Apps API + - Updated packages to latest version + - Refactored and simplified code + - Removed unused Project Portal variables in frontend + - Update frontend to use the new proxy endpoints + - Make frontend client use the new types provided by fusion core + - Update the legacy app loader to use the new proxy endpoints and and fix types + - Move legacy app code to apps folder for cleaner repository + - Setup build of legacy app loader in build pipeline for constant build an deployment. + - Update all Fusion dependencies for frontend client + +### Patch Changes + +- b3edf8a: Fix errors and add data owner on milestones +- cc5f76c: Rename meetings tab to meeting actions +- 4a4eba3: Update api version on meeting actions to the newest version. + ## 4.1.4 ### Patch Changes diff --git a/package.json b/package.json index 7434f9b5f..2cf11955f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fusion-project-portal", - "version": "4.1.4", + "version": "5.0.0", "license": "MIT", "description": "Project Portal powered by Fusion", "devDependencies": {