mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 11:31:57 +03: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) {
|
||||
opened = true
|
||||
showPopup(TimeShiftPopup, { title, value, direction }, container, (ev) => {
|
||||
console.log('picker close handle')
|
||||
console.log(ev)
|
||||
changeValue(ev)
|
||||
opened = false
|
||||
}, changeValue)
|
||||
})
|
||||
}
|
||||
}}
|
||||
>
|
||||
|
@ -33,8 +33,8 @@
|
||||
|
||||
<div class="antiPopup">
|
||||
{#each values as value}
|
||||
<div class="ap-menuItem">
|
||||
<TimeShiftPresenter value={value * base} on:click={() => { dispatch('close', value) }} />
|
||||
<div class="ap-menuItem" on:click={() => { dispatch('close', value) }} >
|
||||
<TimeShiftPresenter value={value * base}/>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
@ -26,8 +26,6 @@
|
||||
let time: string = ''
|
||||
|
||||
async function formatTime (value: number) {
|
||||
console.log('value')
|
||||
console.log(value)
|
||||
if (value > 0) {
|
||||
if (value < HOUR) {
|
||||
time = await translate(ui.string.MinutesAfter, { minutes: Math.floor(value / MINUTE) })
|
||||
@ -52,4 +50,4 @@
|
||||
|
||||
</script>
|
||||
|
||||
<span style="white-space: nowrap;" on:click>{time}</span>
|
||||
<span style="white-space: nowrap;">{time}</span>
|
@ -33,7 +33,7 @@
|
||||
const client = getClient()
|
||||
|
||||
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 () {
|
||||
@ -58,7 +58,7 @@
|
||||
<Card
|
||||
label={calendar.string.CreateReminder}
|
||||
okAction={saveReminder}
|
||||
canSave={title.trim().length > 0 && participants.length > 0}
|
||||
canSave={title !== undefined && title.trim().length > 0 && participants.length > 0}
|
||||
{space}
|
||||
on:close={() => {
|
||||
dispatch('close')
|
||||
|
@ -39,7 +39,7 @@
|
||||
if (current === undefined) {
|
||||
showPopup(CreateReminder, { attachedTo: value._id, attachedToClass: value._class, title }, ev.target as HTMLElement)
|
||||
} 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