From 62cb7d15ed614dc94e089c225036d2d4d10d5eb7 Mon Sep 17 00:00:00 2001 From: Pavel Gnedov Date: Mon, 3 Jul 2023 23:09:45 +0700 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D1=81=D1=82=D0=B8=D0=BB=D1=8C=20=D0=BF=D1=80=D0=B8?= =?UTF-8?q?=D0=BE=D1=80=D0=B8=D1=82=D0=B5=D1=82=D0=B0=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=BA=D0=B0=D1=80=D1=82=D0=BE=D1=87=D0=BA=D1=83=20=D0=B2=20Wis?= =?UTF-8?q?hlist-=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../issues-list-board/issues-list-card.tsx | 30 ++++--------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/frontend/src/issues-list-board/issues-list-card.tsx b/frontend/src/issues-list-board/issues-list-card.tsx index c9d5ad7..242546d 100644 --- a/frontend/src/issues-list-board/issues-list-card.tsx +++ b/frontend/src/issues-list-board/issues-list-card.tsx @@ -8,11 +8,14 @@ import * as IssueHrefNs from '../misc-components/issue-href'; import * as IssueDetailsDialogNs from '../misc-components/issue-details-dialog'; import * as UnreadedFlagNs from '../misc-components/unreaded-flag'; import { SpentHoursToFixed } from '../utils/spent-hours-to-fixed'; +import { getStyleObjectFromString } from '../utils/style'; export type Props = { store: IIssueStore }; +export const defaultPriorityStyleKey = 'priorityStyle'; + export const IssuesListCard = observer((props: Props): JSX.Element => { const unreadedStore = UnreadedFlagNs.CreateStoreFromLocalStorage(props.store); const detailsStore = IssueDetailsDialogNs.Store.create({ @@ -20,28 +23,7 @@ export const IssuesListCard = observer((props: Props): JSX.Element => { visible: false, unreadedFlagStore: unreadedStore }); - // return ( - //
{e.stopPropagation(); detailsStore.show();}}> - // - //
- // - // - // - // - // - // | {props.store.status.name} - // | {props.store.total_spent_hours} / {props.store.total_estimated_hours} - //
- //
- // - //
- //
- // ); + const priorityStyle = getStyleObjectFromString(props.store[defaultPriorityStyleKey]); const tagsNewLine = (props.store.styledTags && props.store.styledTags.length > 0) ?
: null; return (
{ e.stopPropagation(); detailsStore.show(); }}> @@ -63,8 +45,8 @@ export const IssuesListCard = observer((props: Props): JSX.Element => { {tagsNewLine}
- {props.store.status.name} - {props.store.priority.name} + {props.store.status.name} + {props.store.priority.name}