Skip to content

Commit

Permalink
Add Workspace Planner Button
Browse files Browse the repository at this point in the history
  • Loading branch information
saithsab877 committed Dec 19, 2024
1 parent 8c08f3b commit 13aa120
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import TokenRefresh from '../people/utils/TokenRefresh';
import GenerateStoriesView from '../people/widgetViews/GenerateStoriesView';
import PhasePlannerView from '../people/widgetViews/PhasePlannerView';
import { HiveChatView } from '../people/hiveChat/index';
import WorkSpacePlanner from '../people/WorkSpacePlanner/index';
import Body from './tribes/Body';
import Header from './tribes/Header';
import { MainLayout } from './MainLayout';
Expand All @@ -36,6 +37,9 @@ const modeDispatchPages: Record<AppMode, () => React.ReactElement> = {
<Route path="/workspace/bounties/:uuid">
<WorkspaceTicketsPage />
</Route>
<Route path="/workspace/:uuid/planner">
<WorkSpacePlanner />
</Route>
<Route path="/workspace/:uuid/hivechat/:chatId">
<HiveChatView />
</Route>
Expand Down
6 changes: 6 additions & 0 deletions src/pages/tickets/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -567,3 +567,9 @@ export const TicketHeaderInputWrap = styled.div`
align-items: center;
gap: 10px;
`;

export const WorkspaceFieldWrap = styled.div`
margin-bottom: 10px;
margin-top: 10px;
width: 98%;
`;
9 changes: 9 additions & 0 deletions src/people/WorkSpacePlanner/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';

const WorkspacePlanner = () => (
<div style={{ padding: '20px', textAlign: 'center' }}>
<h1>Welcome to the new Workspace Planner</h1>
</div>
);

export default WorkspacePlanner;
30 changes: 29 additions & 1 deletion src/people/widgetViews/WorkspaceMission.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ import {
EditPopoverTail,
EditPopoverContent,
EditPopoverText,
EditPopover
EditPopover,
WorkspaceFieldWrap
} from 'pages/tickets/style';

import React, { useCallback, useEffect, useMemo, useState } from 'react';
Expand Down Expand Up @@ -440,6 +441,10 @@ const WorkspaceMission = () => {
history.push(`/workspace/${uuid}/hivechat/${chatId}`);
};

const handleWorkspacePlanner = () => {
history.push(`/workspace/${uuid}/planner`);
};

const handleUserRepoOptionClick = (repositoryId: number) => {
setDisplayUserRepoOptions((prev: Record<number, boolean>) => ({
...prev,
Expand Down Expand Up @@ -1083,6 +1088,29 @@ const WorkspaceMission = () => {
</RowFlex>
<AvatarGroup avatarList={avatarList} avatarSize="xl" maxGroupSize={5} />
</FieldWrap>

<HorizontalGrayLine />
{uuid && (
<WorkspaceFieldWrap>
<Button
style={{
borderRadius: '5px',
margin: 0,
padding: '10px 20px',
width: '100%',
backgroundColor: '#4285f4',
color: 'white',
textAlign: 'center',
border: 'none',
fontSize: '16px',
cursor: 'pointer'
}}
onClick={handleWorkspacePlanner}
dataTestId="workspace-planner-btn"
text="Workspace Planner"
/>
</WorkspaceFieldWrap>
)}
<HorizontalGrayLine />
<FieldWrap style={{ marginTop: '10px' }}>
<Label>Talk to Hive</Label>
Expand Down

0 comments on commit 13aa120

Please sign in to comment.