mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-06 07:46:32 +00:00
TSK-1339: resize tooltip for dueDate and ignore overdue in done/cancelled (#3113)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
77bd4fea29
commit
b4e3109350
@ -23,6 +23,7 @@
|
|||||||
export let daysDifference: number = 0
|
export let daysDifference: number = 0
|
||||||
export let isOverdue: boolean = false
|
export let isOverdue: boolean = false
|
||||||
export let iconModifier: 'warning' | 'critical' | 'overdue' | undefined = undefined
|
export let iconModifier: 'warning' | 'critical' | 'overdue' | undefined = undefined
|
||||||
|
export let shouldIgnoreOverdue: boolean = false
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if formattedDate}
|
{#if formattedDate}
|
||||||
@ -32,7 +33,7 @@
|
|||||||
class:mIconContainerWarning={iconModifier === 'warning'}
|
class:mIconContainerWarning={iconModifier === 'warning'}
|
||||||
class:mIconContainerCritical={iconModifier === 'critical' || iconModifier === 'overdue'}
|
class:mIconContainerCritical={iconModifier === 'critical' || iconModifier === 'overdue'}
|
||||||
>
|
>
|
||||||
<Icon icon={isOverdue ? DPCalendarOver : DPCalendar} size={'small'} />
|
<Icon icon={isOverdue && !shouldIgnoreOverdue ? DPCalendarOver : DPCalendar} size={'small'} />
|
||||||
</div>
|
</div>
|
||||||
<div class="messageContainer">
|
<div class="messageContainer">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
@ -42,10 +43,12 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<Label
|
{#if !shouldIgnoreOverdue}
|
||||||
label={isOverdue ? ui.string.DueDatePopupOverdueDescription : ui.string.DueDatePopupDescription}
|
<Label
|
||||||
params={{ value: daysDifference }}
|
label={isOverdue ? ui.string.DueDatePopupOverdueDescription : ui.string.DueDatePopupDescription}
|
||||||
/>
|
params={{ value: daysDifference }}
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -54,7 +57,7 @@
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.root {
|
.root {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 15rem;
|
width: 10rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconContainer {
|
.iconContainer {
|
||||||
|
@ -84,7 +84,8 @@
|
|||||||
formattedDate,
|
formattedDate,
|
||||||
daysDifference,
|
daysDifference,
|
||||||
isOverdue,
|
isOverdue,
|
||||||
iconModifier
|
iconModifier,
|
||||||
|
shouldIgnoreOverdue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
: undefined}
|
: undefined}
|
||||||
|
Loading…
Reference in New Issue
Block a user