fix: ask updated dbLoadTodo (if something to process) only when is connected...
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
<template>
|
||||
<div :class="getClassRow()">
|
||||
<q-context-menu ref="contextMenu">
|
||||
<SubMenus :menuPopupTodo="menuPopupTodo" :itemtodo="itemtodo" @clickMenu="clickMenu" @setPriority="setPriority"></SubMenus>
|
||||
</q-context-menu>
|
||||
|
||||
|
||||
<div v-if="isTodo()" class="flex-item completed-item">
|
||||
@@ -53,9 +50,9 @@
|
||||
<q-btn push
|
||||
:class="clButtPopover"
|
||||
icon="menu" >
|
||||
<q-popover self="top right">
|
||||
<SubMenus :menuPopupTodo="menuPopupTodo" :itemtodo="itemtodo" @clickMenu="clickMenu" @setPriority="setPriority"></SubMenus>
|
||||
</q-popover>
|
||||
<!--<q-popover self="top right">-->
|
||||
<!--<SubMenus :menuPopupTodo="menuPopupTodo" :itemtodo="itemtodo" @clickMenu="clickMenu" @setPriority="setPriority"></SubMenus>-->
|
||||
<!--</q-popover>-->
|
||||
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<div class="drag">
|
||||
<draggable v-model="todos_arr" :options="{draggable:'.myitemdrag'}"
|
||||
@start="onStart" @end="onEnd" class="dragArea">
|
||||
<transition-group :name="mytypetransgroup">
|
||||
<!--<transition-group :name="mytypetransgroup">-->
|
||||
<div :id="getmyid(mytodo._id)" :key="mytodo._id" v-for="mytodo in todos_arr" class="myitemdrag">
|
||||
|
||||
<div v-if="(prior !== mytodo.priority) && !mytodo.completed" :class="getTitlePriority(mytodo.priority)">
|
||||
@@ -28,9 +28,13 @@
|
||||
|
||||
<div style="display: none">{{ prior = mytodo.priority, priorcomplet = mytodo.completed }}</div>
|
||||
</div>
|
||||
</transition-group>
|
||||
<!--</transition-group>-->
|
||||
</draggable>
|
||||
</div>
|
||||
<q-context-menu ref="contextMenu">
|
||||
<SubMenus :menuPopupTodo="menuPopupTodo" :itemtodo="itemtodo" @clickMenu="clickMenu" @setPriority="setPriority"></SubMenus>
|
||||
</q-context-menu>
|
||||
|
||||
<q-input ref="insertTask" v-model="todo" inverted :float-label="$t('todo.insert')"
|
||||
:after="[{icon: 'arrow_forward', content: true, handler () {}}]"
|
||||
v-on:keyup.enter="insertTodo"/>
|
||||
|
||||
@@ -128,7 +128,6 @@ namespace Actions {
|
||||
|
||||
let promiseChain = Promise.resolve()
|
||||
|
||||
something = true
|
||||
for (let rec of arr_recmsg) {
|
||||
// console.log(' .... sw.sync.register ( ', rec._id)
|
||||
// if ('SyncManager' in window) {
|
||||
@@ -138,6 +137,9 @@ namespace Actions {
|
||||
// #Alternative to SyncManager
|
||||
promiseChain = promiseChain.then(() => {
|
||||
return Api.syncAlternative(rec._id)
|
||||
.then(() => {
|
||||
something = true
|
||||
})
|
||||
})
|
||||
|
||||
// }
|
||||
@@ -166,6 +168,7 @@ namespace Actions {
|
||||
return sendSwMsgIfAvailable()
|
||||
.then(something => {
|
||||
if (something) {
|
||||
console.log('something')
|
||||
// Refresh data
|
||||
return waitAndRefreshData(context)
|
||||
}
|
||||
|
||||
@@ -399,7 +399,7 @@ namespace Actions {
|
||||
|
||||
Mutations.mutations.setServerCode(rescodes.CALLING)
|
||||
|
||||
let myres: IResult
|
||||
let myres: any
|
||||
|
||||
return Api.SendReq(call, 'POST', usertosend, true)
|
||||
.then(({ res, body }) => {
|
||||
|
||||
Reference in New Issue
Block a user