mirror of
https://github.com/plankanban/planka.git
synced 2025-07-23 15:19:44 +02:00
parent
bedd1f6e2a
commit
e0d5d7f4ff
4 changed files with 31 additions and 4 deletions
|
@ -23,6 +23,7 @@ const Card = React.memo(
|
||||||
id,
|
id,
|
||||||
index,
|
index,
|
||||||
name,
|
name,
|
||||||
|
description,
|
||||||
dueDate,
|
dueDate,
|
||||||
isDueDateCompleted,
|
isDueDateCompleted,
|
||||||
stopwatch,
|
stopwatch,
|
||||||
|
@ -106,7 +107,7 @@ const Card = React.memo(
|
||||||
)}
|
)}
|
||||||
<div className={styles.name}>{name}</div>
|
<div className={styles.name}>{name}</div>
|
||||||
{tasks.length > 0 && <Tasks items={tasks} />}
|
{tasks.length > 0 && <Tasks items={tasks} />}
|
||||||
{(dueDate || stopwatch || notificationsTotal > 0) && (
|
{(description || dueDate || stopwatch || notificationsTotal > 0) && (
|
||||||
<span className={styles.attachments}>
|
<span className={styles.attachments}>
|
||||||
{notificationsTotal > 0 && (
|
{notificationsTotal > 0 && (
|
||||||
<span
|
<span
|
||||||
|
@ -135,6 +136,13 @@ const Card = React.memo(
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
{description && (
|
||||||
|
<span className={classNames(styles.attachment, styles.attachmentLeft)}>
|
||||||
|
<span className={styles.attachmentContent}>
|
||||||
|
<Icon name="align left" />
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{users.length > 0 && (
|
{users.length > 0 && (
|
||||||
|
@ -221,6 +229,7 @@ Card.propTypes = {
|
||||||
id: PropTypes.string.isRequired,
|
id: PropTypes.string.isRequired,
|
||||||
index: PropTypes.number.isRequired,
|
index: PropTypes.number.isRequired,
|
||||||
name: PropTypes.string.isRequired,
|
name: PropTypes.string.isRequired,
|
||||||
|
description: PropTypes.string,
|
||||||
dueDate: PropTypes.instanceOf(Date),
|
dueDate: PropTypes.instanceOf(Date),
|
||||||
isDueDateCompleted: PropTypes.bool,
|
isDueDateCompleted: PropTypes.bool,
|
||||||
stopwatch: PropTypes.object, // eslint-disable-line react/forbid-prop-types
|
stopwatch: PropTypes.object, // eslint-disable-line react/forbid-prop-types
|
||||||
|
@ -256,6 +265,7 @@ Card.propTypes = {
|
||||||
};
|
};
|
||||||
|
|
||||||
Card.defaultProps = {
|
Card.defaultProps = {
|
||||||
|
description: undefined,
|
||||||
dueDate: undefined,
|
dueDate: undefined,
|
||||||
isDueDateCompleted: undefined,
|
isDueDateCompleted: undefined,
|
||||||
stopwatch: undefined,
|
stopwatch: undefined,
|
||||||
|
|
|
@ -39,6 +39,13 @@
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.attachmentContent {
|
||||||
|
color: #6a808b;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 20px;
|
||||||
|
padding: 0px 3px;
|
||||||
|
}
|
||||||
|
|
||||||
.attachmentLeft {
|
.attachmentLeft {
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -369,7 +369,7 @@ const CardModal = React.memo(
|
||||||
{(description || canEdit) && (
|
{(description || canEdit) && (
|
||||||
<div className={styles.contentModule}>
|
<div className={styles.contentModule}>
|
||||||
<div className={styles.moduleWrapper}>
|
<div className={styles.moduleWrapper}>
|
||||||
<Icon name="align justify" className={styles.moduleIcon} />
|
<Icon name="align left" className={styles.moduleIcon} />
|
||||||
<div className={styles.moduleHeader}>{t('common.description')}</div>
|
<div className={styles.moduleHeader}>{t('common.description')}</div>
|
||||||
{canEdit ? (
|
{canEdit ? (
|
||||||
<DescriptionEdit defaultValue={description} onUpdate={handleDescriptionUpdate}>
|
<DescriptionEdit defaultValue={description} onUpdate={handleDescriptionUpdate}>
|
||||||
|
|
|
@ -20,8 +20,17 @@ const makeMapStateToProps = () => {
|
||||||
const allLabels = selectors.selectLabelsForCurrentBoard(state);
|
const allLabels = selectors.selectLabelsForCurrentBoard(state);
|
||||||
const currentUserMembership = selectors.selectCurrentUserMembershipForCurrentBoard(state);
|
const currentUserMembership = selectors.selectCurrentUserMembershipForCurrentBoard(state);
|
||||||
|
|
||||||
const { name, dueDate, isDueDateCompleted, stopwatch, coverUrl, boardId, listId, isPersisted } =
|
const {
|
||||||
selectCardById(state, id);
|
name,
|
||||||
|
description,
|
||||||
|
dueDate,
|
||||||
|
isDueDateCompleted,
|
||||||
|
stopwatch,
|
||||||
|
coverUrl,
|
||||||
|
boardId,
|
||||||
|
listId,
|
||||||
|
isPersisted,
|
||||||
|
} = selectCardById(state, id);
|
||||||
|
|
||||||
const users = selectUsersByCardId(state, id);
|
const users = selectUsersByCardId(state, id);
|
||||||
const labels = selectLabelsByCardId(state, id);
|
const labels = selectLabelsByCardId(state, id);
|
||||||
|
@ -35,6 +44,7 @@ const makeMapStateToProps = () => {
|
||||||
id,
|
id,
|
||||||
index,
|
index,
|
||||||
name,
|
name,
|
||||||
|
description,
|
||||||
dueDate,
|
dueDate,
|
||||||
isDueDateCompleted,
|
isDueDateCompleted,
|
||||||
stopwatch,
|
stopwatch,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue