From f1c83d5c69f2e3ccc3a4d0499eec4a9b443c91f4 Mon Sep 17 00:00:00 2001 From: Kevin Berry <41717340+51ngul4r1ty@users.noreply.github.com> Date: Sun, 28 Aug 2022 21:26:50 -0400 Subject: [PATCH 1/2] replace static with project data in bottom panel --- src/server/api/handlers/views/planViewBff.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/server/api/handlers/views/planViewBff.ts b/src/server/api/handlers/views/planViewBff.ts index 397086a6..e6d73c54 100644 --- a/src/server/api/handlers/views/planViewBff.ts +++ b/src/server/api/handlers/views/planViewBff.ts @@ -3,12 +3,12 @@ import type { Request, Response } from "express"; import { StatusCodes } from "http-status-codes"; // libraries -import { ApiSprint, DateOnly, determineSprintStatus, mapApiItemsToSprints, SprintStatus } from "@atoll/shared"; +import { ApiProject, ApiSprint, DateOnly, determineSprintStatus, mapApiItemsToSprints, SprintStatus } from "@atoll/shared"; // interfaces/types import type { UserPreferencesItemResult } from "../fetchers/userPreferencesFetcher"; import type { SprintBacklogItemsResult } from "../fetchers/sprintBacklogItemFetcher"; -import { isRestApiErrorResult, RestApiCollectionResult, RestApiErrorResult } from "../../utils/responseBuilder"; +import { isRestApiErrorResult, RestApiCollectionResult, RestApiErrorResult, RestApiItemResult } from "../../utils/responseBuilder"; // utils import { fetchBacklogItems } from "../fetchers/backlogItemFetcher"; @@ -24,6 +24,7 @@ import { fetchSprintBacklogItemsWithLinks } from "../fetchers/sprintBacklogItemF import { getLoggedInAppUserId } from "../../utils/authUtils"; import { getUserPreferences } from "../fetchers/userPreferencesFetcher"; import { logError } from "../utils/serverLogger"; +import { fetchProject } from "../fetchers/projectFetcher"; export const planViewBffGetHandler = async (req: Request, res: Response) => { try { @@ -31,7 +32,8 @@ export const planViewBffGetHandler = async (req: Request, res: Response) => { const selectedProjectId = (userPreferencesResult as UserPreferencesItemResult).data.item.settings.selectedProject; const archived = "N"; - let [backlogItemsResult, sprintsResult] = await Promise.all([ + const [projectResult, backlogItemsResult, sprintsResult] = await Promise.all([ + fetchProject(selectedProjectId), fetchBacklogItems(selectedProjectId), fetchSprints(selectedProjectId, archived) ]); @@ -71,7 +73,8 @@ export const planViewBffGetHandler = async (req: Request, res: Response) => { isRestApiCollectionResult(backlogItemsResult) && isRestApiCollectionResult(sprintsResult) && isRestApiItemResult(userPreferencesResult) && - isRestApiCollectionResult(sprintBacklogItemsResult) + isRestApiCollectionResult(sprintBacklogItemsResult) && + isRestApiItemResult(projectResult) ) { res.json( buildResponseWithData({ @@ -79,7 +82,8 @@ export const planViewBffGetHandler = async (req: Request, res: Response) => { sprints, sprintBacklogItems: sprintBacklogItemsResult?.data?.items || [], userPreferences: (userPreferencesResult as UserPreferencesItemResult).data?.item, - expandedSprintId: expandedSprintId ?? null + expandedSprintId: expandedSprintId ?? null, + project: projectResult.data?.item }) ); } else { From f360d568b0ae2014d3dcd531249fa066a929bed3 Mon Sep 17 00:00:00 2001 From: Kevin Berry <41717340+51ngul4r1ty@users.noreply.github.com> Date: Mon, 29 Aug 2022 23:15:36 -0400 Subject: [PATCH 2/2] show project name in bottom bar --- package-lock.json | 18 +++++++++--------- package.json | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index b6193ae9..8afb3c47 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "atoll", - "version": "0.60.1", + "version": "0.61.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "atoll", - "version": "0.60.1", + "version": "0.61.0", "license": "MIT", "dependencies": { - "@atoll/shared": "0.57.3", + "@atoll/shared": "0.61.0", "@flopflip/memory-adapter": "1.6.0", "@flopflip/react-broadcast": "10.1.11", "axios": "0.26.1", @@ -166,9 +166,9 @@ } }, "node_modules/@atoll/shared": { - "version": "0.57.3", - "resolved": "https://registry.npmjs.org/@atoll/shared/-/shared-0.57.3.tgz", - "integrity": "sha512-KYhuZ10fi0eTrteSvRv3dS/FUE+QbmhRW9vzM3emcd+7qcXgdOpFsZ22DLWahBOTiYtTchwJ6zTBs+D0yhMo/w==", + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@atoll/shared/-/shared-0.61.0.tgz", + "integrity": "sha512-6hmj3oYXfhEc/if6xjBFuVubPBzg/EmaEeZ3KHuUmTeAixaU+sconDW59bUfdk57e33FCiIpJD18Pqj7bBin8A==", "dependencies": { "@csstools/normalize.css": "10.1.0", "@flopflip/react-broadcast": "10.1.11", @@ -24766,9 +24766,9 @@ }, "dependencies": { "@atoll/shared": { - "version": "0.57.3", - "resolved": "https://registry.npmjs.org/@atoll/shared/-/shared-0.57.3.tgz", - "integrity": "sha512-KYhuZ10fi0eTrteSvRv3dS/FUE+QbmhRW9vzM3emcd+7qcXgdOpFsZ22DLWahBOTiYtTchwJ6zTBs+D0yhMo/w==", + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@atoll/shared/-/shared-0.61.0.tgz", + "integrity": "sha512-6hmj3oYXfhEc/if6xjBFuVubPBzg/EmaEeZ3KHuUmTeAixaU+sconDW59bUfdk57e33FCiIpJD18Pqj7bBin8A==", "requires": { "@csstools/normalize.css": "10.1.0", "@flopflip/react-broadcast": "10.1.11", diff --git a/package.json b/package.json index 2d272679..40ee9963 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "atoll", - "version": "0.60.1", + "version": "0.61.0", "author": { "name": "Kevin Berry", "email": "41717340+51ngul4r1ty@users.noreply.github.com" @@ -59,7 +59,7 @@ "check:prereqs": "ts-node ./scripts/check-prereqs.ts" }, "dependencies": { - "@atoll/shared": "0.57.3", + "@atoll/shared": "0.61.0", "@flopflip/memory-adapter": "1.6.0", "@flopflip/react-broadcast": "10.1.11", "axios": "0.26.1",