diff --git a/web/components/workspace/sidebar-dropdown.tsx b/web/components/workspace/sidebar-dropdown.tsx index 6e50fc507cc..358629db6a6 100644 --- a/web/components/workspace/sidebar-dropdown.tsx +++ b/web/components/workspace/sidebar-dropdown.tsx @@ -17,8 +17,6 @@ import { Avatar } from "components/ui"; import { Loader } from "@plane/ui"; // icons import { Check, LogOut, Plus, Settings, UserCircle2 } from "lucide-react"; -// helpers -import { truncateText } from "helpers/string.helper"; // types import { IWorkspace } from "types"; @@ -104,15 +102,15 @@ export const WorkspaceSidebarDropdown = observer(() => { }; return ( -
- - +
+ +
-
+
{activeWorkspace?.logo && activeWorkspace.logo !== "" ? ( {
{!themeStore.sidebarCollapsed && ( -

- {activeWorkspace?.name ? truncateText(activeWorkspace.name, 14) : "Loading..."} +

+ {activeWorkspace?.name ? activeWorkspace.name : "Loading..."}

)}
@@ -158,8 +156,8 @@ export const WorkspaceSidebarDropdown = observer(() => { onClick={() => handleWorkspaceNavigation(workspace)} className="flex w-full items-center justify-between gap-1 p-1 rounded-md text-sm text-custom-sidebar-text-100 hover:bg-custom-sidebar-background-80" > -
- +
+ {workspace?.logo && workspace.logo !== "" ? ( {
- {truncateText(workspace.name, 18)} + {workspace.name}
- - - + {workspace.id === activeWorkspace?.id && ( + + + + )} )} diff --git a/web/layouts/auth-layout/workspace-wrapper.tsx b/web/layouts/auth-layout/workspace-wrapper.tsx index 2de91b1dd25..e1ae8e4db59 100644 --- a/web/layouts/auth-layout/workspace-wrapper.tsx +++ b/web/layouts/auth-layout/workspace-wrapper.tsx @@ -19,6 +19,8 @@ export const WorkspaceAuthWrapper: FC = observer((props) // router const router = useRouter(); const { workspaceSlug } = router.query; + // fetching all workspaces + useSWR(`USER_WORKSPACES_LIST`, () => workspaceStore.fetchWorkspaces()); // fetching user workspace information useSWR( workspaceSlug ? `WORKSPACE_MEMBERS_ME_${workspaceSlug}` : null, diff --git a/web/services/issue/issue.service.ts b/web/services/issue/issue.service.ts index 11703e7925b..5f284489631 100644 --- a/web/services/issue/issue.service.ts +++ b/web/services/issue/issue.service.ts @@ -153,12 +153,14 @@ export class IssueService extends APIService { }); } - async patchIssueDisplayProperties( + async updateIssueDisplayProperties( workspaceSlug: string, projectId: string, data: IIssueDisplayProperties ): Promise { - return this.patch(`/api/workspaces/${workspaceSlug}/projects/${projectId}/issue-display-properties/`, data) + return this.post(`/api/workspaces/${workspaceSlug}/projects/${projectId}/issue-display-properties/`, { + properties: data, + }) .then((response) => response?.data) .catch((error) => { throw error?.response?.data; diff --git a/web/store/issue/issue_filters.store.ts b/web/store/issue/issue_filters.store.ts index 51544b68d19..91743de29c9 100644 --- a/web/store/issue/issue_filters.store.ts +++ b/web/store/issue/issue_filters.store.ts @@ -217,7 +217,7 @@ export class IssueFilterStore implements IIssueFilterStore { this.userDisplayProperties = newProperties; }); - await this.issueService.patchIssueDisplayProperties(workspaceSlug, projectId, newProperties); + await this.issueService.updateIssueDisplayProperties(workspaceSlug, projectId, newProperties); } catch (error) { this.fetchUserProjectFilters(workspaceSlug, projectId); @@ -225,7 +225,7 @@ export class IssueFilterStore implements IIssueFilterStore { this.error = error; }); - console.log("Failed to update user filters in issue filter store", error); + console.log("Failed to update user display properties in issue filter store", error); } }; }