Добавлен стиль приоритета на карточку в Wishlist-е
This commit is contained in:
parent
ed451557f2
commit
62cb7d15ed
1 changed files with 6 additions and 24 deletions
|
|
@ -8,11 +8,14 @@ import * as IssueHrefNs from '../misc-components/issue-href';
|
||||||
import * as IssueDetailsDialogNs from '../misc-components/issue-details-dialog';
|
import * as IssueDetailsDialogNs from '../misc-components/issue-details-dialog';
|
||||||
import * as UnreadedFlagNs from '../misc-components/unreaded-flag';
|
import * as UnreadedFlagNs from '../misc-components/unreaded-flag';
|
||||||
import { SpentHoursToFixed } from '../utils/spent-hours-to-fixed';
|
import { SpentHoursToFixed } from '../utils/spent-hours-to-fixed';
|
||||||
|
import { getStyleObjectFromString } from '../utils/style';
|
||||||
|
|
||||||
export type Props = {
|
export type Props = {
|
||||||
store: IIssueStore
|
store: IIssueStore
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const defaultPriorityStyleKey = 'priorityStyle';
|
||||||
|
|
||||||
export const IssuesListCard = observer((props: Props): JSX.Element => {
|
export const IssuesListCard = observer((props: Props): JSX.Element => {
|
||||||
const unreadedStore = UnreadedFlagNs.CreateStoreFromLocalStorage(props.store);
|
const unreadedStore = UnreadedFlagNs.CreateStoreFromLocalStorage(props.store);
|
||||||
const detailsStore = IssueDetailsDialogNs.Store.create({
|
const detailsStore = IssueDetailsDialogNs.Store.create({
|
||||||
|
|
@ -20,28 +23,7 @@ export const IssuesListCard = observer((props: Props): JSX.Element => {
|
||||||
visible: false,
|
visible: false,
|
||||||
unreadedFlagStore: unreadedStore
|
unreadedFlagStore: unreadedStore
|
||||||
});
|
});
|
||||||
// return (
|
const priorityStyle = getStyleObjectFromString(props.store[defaultPriorityStyleKey]);
|
||||||
// <div className={Css.listItem} onClick={(e) => {e.stopPropagation(); detailsStore.show();}}>
|
|
||||||
// <IssueDetailsDialogNs.IssueDetailsDialog store={detailsStore}/>
|
|
||||||
// <div>
|
|
||||||
// <UnreadedFlagNs.UnreadedFlag store={unreadedStore}/>
|
|
||||||
// <TimePassedNs.TimePassed params={{ fromIssue: { issue: props.store, keyName: 'timePassedClass' } }}/>
|
|
||||||
// <span className={Css.issueSubject}>
|
|
||||||
// <IssueHrefNs.IssueHref
|
|
||||||
// url={props.store.url?.url || ''}
|
|
||||||
// subject={props.store.subject}
|
|
||||||
// tracker={props.store.tracker?.name || ''}
|
|
||||||
// id={props.store.id}
|
|
||||||
// />
|
|
||||||
// </span>
|
|
||||||
// <span className={Css.issueStatus}>| {props.store.status.name}</span>
|
|
||||||
// <span className={Css.issueTime}>| {props.store.total_spent_hours} / {props.store.total_estimated_hours}</span>
|
|
||||||
// </div>
|
|
||||||
// <div className={Css.tagsContainer}>
|
|
||||||
// <TagsNs.Tags params={{ tags: props.store.styledTags }}/>
|
|
||||||
// </div>
|
|
||||||
// </div>
|
|
||||||
// );
|
|
||||||
const tagsNewLine = (props.store.styledTags && props.store.styledTags.length > 0) ? <br/> : null;
|
const tagsNewLine = (props.store.styledTags && props.store.styledTags.length > 0) ? <br/> : null;
|
||||||
return (
|
return (
|
||||||
<div className={Css.todoBlock} onClick={(e) => { e.stopPropagation(); detailsStore.show(); }}>
|
<div className={Css.todoBlock} onClick={(e) => { e.stopPropagation(); detailsStore.show(); }}>
|
||||||
|
|
@ -63,8 +45,8 @@ export const IssuesListCard = observer((props: Props): JSX.Element => {
|
||||||
{tagsNewLine}
|
{tagsNewLine}
|
||||||
<TagsNs.Tags params={{ tags: props.store.styledTags }} />
|
<TagsNs.Tags params={{ tags: props.store.styledTags }} />
|
||||||
<div className={Css.positionInfo}>
|
<div className={Css.positionInfo}>
|
||||||
<span className={Css.timeBox}>{props.store.status.name}</span>
|
<span className={Css.timeBox}>{props.store.status.name}</span><span> </span>
|
||||||
<span className={Css.priorityBox}>{props.store.priority.name}</span>
|
<span className={Css.priorityBox} style={priorityStyle}>{props.store.priority.name}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue