mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-02 13:52:40 +00:00
Minor reminders fix (#1311)
Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
parent
6543fdf4b7
commit
08efb17a26
@ -54,11 +54,9 @@
|
|||||||
if (!opened) {
|
if (!opened) {
|
||||||
opened = true
|
opened = true
|
||||||
showPopup(TimeShiftPopup, { title, value, direction }, container, (ev) => {
|
showPopup(TimeShiftPopup, { title, value, direction }, container, (ev) => {
|
||||||
console.log('picker close handle')
|
|
||||||
console.log(ev)
|
|
||||||
changeValue(ev)
|
changeValue(ev)
|
||||||
opened = false
|
opened = false
|
||||||
}, changeValue)
|
})
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@ -33,8 +33,8 @@
|
|||||||
|
|
||||||
<div class="antiPopup">
|
<div class="antiPopup">
|
||||||
{#each values as value}
|
{#each values as value}
|
||||||
<div class="ap-menuItem">
|
<div class="ap-menuItem" on:click={() => { dispatch('close', value) }} >
|
||||||
<TimeShiftPresenter value={value * base} on:click={() => { dispatch('close', value) }} />
|
<TimeShiftPresenter value={value * base}/>
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
@ -26,8 +26,6 @@
|
|||||||
let time: string = ''
|
let time: string = ''
|
||||||
|
|
||||||
async function formatTime (value: number) {
|
async function formatTime (value: number) {
|
||||||
console.log('value')
|
|
||||||
console.log(value)
|
|
||||||
if (value > 0) {
|
if (value > 0) {
|
||||||
if (value < HOUR) {
|
if (value < HOUR) {
|
||||||
time = await translate(ui.string.MinutesAfter, { minutes: Math.floor(value / MINUTE) })
|
time = await translate(ui.string.MinutesAfter, { minutes: Math.floor(value / MINUTE) })
|
||||||
@ -52,4 +50,4 @@
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<span style="white-space: nowrap;" on:click>{time}</span>
|
<span style="white-space: nowrap;">{time}</span>
|
@ -33,7 +33,7 @@
|
|||||||
const client = getClient()
|
const client = getClient()
|
||||||
|
|
||||||
export function canClose (): boolean {
|
export function canClose (): boolean {
|
||||||
return title.trim().length === 0 && participants.length === 0
|
return title !== undefined && title.trim().length === 0 && participants.length === 0
|
||||||
}
|
}
|
||||||
|
|
||||||
async function saveReminder () {
|
async function saveReminder () {
|
||||||
@ -58,7 +58,7 @@
|
|||||||
<Card
|
<Card
|
||||||
label={calendar.string.CreateReminder}
|
label={calendar.string.CreateReminder}
|
||||||
okAction={saveReminder}
|
okAction={saveReminder}
|
||||||
canSave={title.trim().length > 0 && participants.length > 0}
|
canSave={title !== undefined && title.trim().length > 0 && participants.length > 0}
|
||||||
{space}
|
{space}
|
||||||
on:close={() => {
|
on:close={() => {
|
||||||
dispatch('close')
|
dispatch('close')
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
if (current === undefined) {
|
if (current === undefined) {
|
||||||
showPopup(CreateReminder, { attachedTo: value._id, attachedToClass: value._class, title }, ev.target as HTMLElement)
|
showPopup(CreateReminder, { attachedTo: value._id, attachedToClass: value._class, title }, ev.target as HTMLElement)
|
||||||
} else {
|
} else {
|
||||||
showPopup(DocRemindersPopup, { attachedTo: value._id, attachedToClass: value._class }, ev.target as HTMLElement )
|
showPopup(DocRemindersPopup, { attachedTo: value._id, attachedToClass: value._class, title }, ev.target as HTMLElement )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user