2019-01-14 22:40:30 +01:00
|
|
|
<template>
|
2019-02-16 03:49:16 +01:00
|
|
|
<div :class="getClassRow()" @click="clickRow">
|
2019-02-22 10:23:00 +01:00
|
|
|
<div v-if="isTodo()" class="flex-item completed-item donotdrag">
|
2019-01-27 21:49:10 +01:00
|
|
|
<q-btn push flat
|
2019-01-27 19:09:48 +01:00
|
|
|
:class="classCompleted"
|
2019-01-16 02:26:43 +01:00
|
|
|
:icon="iconCompleted"
|
|
|
|
|
@click.native="setCompleted">
|
|
|
|
|
</q-btn>
|
|
|
|
|
</div>
|
2019-01-28 03:13:04 +01:00
|
|
|
|
2019-02-20 20:59:18 +01:00
|
|
|
<div class="flex-item donotdrag divdescrTot">
|
|
|
|
|
<q-input v-if="sel && !itemtodo.completed" hide-underline type="textarea" ref="inputdescr"
|
|
|
|
|
v-model.trim="precDescr"
|
2019-03-13 01:53:53 +01:00
|
|
|
autogrow
|
2019-03-14 21:09:41 +01:00
|
|
|
borderless
|
2019-03-13 01:53:53 +01:00
|
|
|
dense
|
2019-02-20 20:59:18 +01:00
|
|
|
:class="classDescrEdit" :max-height="100"
|
|
|
|
|
@keydown="keyDownArea" v-on:keydown.esc="exitEdit" @blur="exitEdit(true)" @click="editTodo()"/>
|
2019-01-28 03:13:04 +01:00
|
|
|
|
2019-02-20 20:59:18 +01:00
|
|
|
<div v-else :class="classDescr"
|
|
|
|
|
@keydown="keyDownRow">{{itemtodo.descr}}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
2019-02-16 03:49:16 +01:00
|
|
|
|
|
|
|
|
<!--<q-field dark v-else :label="itemtodo.descr"-->
|
2019-02-20 20:59:18 +01:00
|
|
|
<!--:class="classDescr"-->
|
|
|
|
|
<!--@keydown="keyDownRow"></q-field>-->
|
2019-02-16 03:49:16 +01:00
|
|
|
|
2019-01-28 20:39:40 +01:00
|
|
|
<!--:after="[{icon: 'arrow_forward', content: true, handler () {}}]"-->
|
2019-01-28 03:13:04 +01:00
|
|
|
|
2019-01-28 13:31:41 +01:00
|
|
|
<!--<div :class="classDescr" @mousedown.left="editTodo()">-->
|
2019-01-29 00:48:04 +01:00
|
|
|
<!--<q-field>{{ itemtodo.descr }}</q-field>-->
|
2019-01-28 13:31:41 +01:00
|
|
|
<!--</div>-->
|
2019-01-14 22:40:30 +01:00
|
|
|
|
2019-03-13 01:53:53 +01:00
|
|
|
<div v-if="isTodo() && (itemtodo.progress > 0) " class="flex-item progress-item shadow-1">
|
2019-03-11 19:16:39 +01:00
|
|
|
<q-linear-progress
|
|
|
|
|
stripe
|
2019-03-15 02:36:44 +01:00
|
|
|
rounded
|
|
|
|
|
:value="percentageProgress / 100"
|
2019-02-19 18:44:48 +01:00
|
|
|
class="progrbar-item"
|
2019-01-29 00:48:04 +01:00
|
|
|
:color="colProgress"
|
|
|
|
|
>
|
2019-03-11 19:16:39 +01:00
|
|
|
</q-linear-progress>
|
2019-01-29 00:48:04 +01:00
|
|
|
<div :class="percProgress">
|
2019-01-30 02:01:04 +01:00
|
|
|
{{percentageProgress}}%
|
2019-03-13 01:53:53 +01:00
|
|
|
<q-popup-edit v-model="percentageProgress" title="Progress" buttons class="editProgress"
|
|
|
|
|
@change="val => { model = val }"
|
|
|
|
|
@save="aggiornaProgress"
|
|
|
|
|
>
|
|
|
|
|
<q-input dense autofocus type="number" v-model="percentageProgress" :max="100" :min="0"/>
|
2019-02-19 18:44:48 +01:00
|
|
|
</q-popup-edit>
|
|
|
|
|
|
2019-01-29 00:48:04 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2019-01-28 03:13:04 +01:00
|
|
|
|
2019-02-19 18:44:48 +01:00
|
|
|
<div v-if="itemtodo.enableExpiring" :class="classExpiring">
|
2019-03-15 02:36:44 +01:00
|
|
|
<span class="data_string">{{getstrDate(itemtodo.expiring_at)}}</span>
|
|
|
|
|
<q-icon name="event" class="cursor-pointer" style="padding: 2px;">
|
2019-03-13 01:53:53 +01:00
|
|
|
<q-popup-proxy>
|
|
|
|
|
<q-date v-model="itemtodo.expiring_at" today-btn/>
|
|
|
|
|
</q-popup-proxy>
|
|
|
|
|
</q-icon>
|
|
|
|
|
<!--<q-icon name="event" class="cursor-pointer" />-->
|
|
|
|
|
<!--<q-popup-edit v-model="itemtodo.expiring_at"-->
|
|
|
|
|
<!--title="Edit"-->
|
|
|
|
|
<!--buttons class="">-->
|
|
|
|
|
<!--<q-input-->
|
|
|
|
|
<!--filled-->
|
|
|
|
|
<!--v-model="itemtodo.expiring_at"-->
|
|
|
|
|
<!--type="date"-->
|
|
|
|
|
<!--class="myexpired"-->
|
|
|
|
|
<!--format="DD/MM/YYYY"-->
|
|
|
|
|
<!-->-->
|
|
|
|
|
<!--</q-input>-->
|
|
|
|
|
<!--</q-popup-edit>-->
|
2019-01-16 02:26:43 +01:00
|
|
|
</div>
|
2019-02-22 10:23:00 +01:00
|
|
|
<div v-if="isTodo()" class="flex-item pos-item " @mousedown="clickRiga">
|
2019-02-15 01:25:44 +01:00
|
|
|
<q-btn push
|
|
|
|
|
:class="clButtPopover"
|
2019-02-20 20:59:18 +01:00
|
|
|
icon="menu">
|
2019-03-11 19:16:39 +01:00
|
|
|
<q-menu id="popmenu" v-if="true" self="top right">
|
2019-02-20 20:59:18 +01:00
|
|
|
<SubMenus :menuPopupTodo="menuPopupTodo" :itemtodo="itemtodo" @clickMenu="clickMenu"
|
|
|
|
|
@setPriority="setPriority"></SubMenus>
|
2019-03-11 19:16:39 +01:00
|
|
|
</q-menu>
|
2019-02-14 18:38:23 +01:00
|
|
|
|
|
|
|
|
</q-btn>
|
|
|
|
|
</div>
|
2019-02-15 01:25:44 +01:00
|
|
|
<!--clButtPopover: {{ clButtPopover }}-->
|
|
|
|
|
<!--Sel: {{ sel }}-->
|
2019-01-27 21:49:10 +01:00
|
|
|
<!--<div class="flex-item btn-item">-->
|
2019-02-12 12:06:01 +01:00
|
|
|
<!--{{itemtodo.expiring_at}}-->
|
2019-01-27 21:49:10 +01:00
|
|
|
<!--</div>-->
|
2019-01-27 19:09:48 +01:00
|
|
|
<!--<div class="flex-item btn-item">-->
|
2019-02-01 04:10:31 +01:00
|
|
|
<!--<q-btn class="mybtn" round color="" icon="delete" @click.native="removeitem(itemtodo._id)"></q-btn>-->
|
2019-01-27 19:09:48 +01:00
|
|
|
<!--</div>-->
|
2019-01-14 22:40:30 +01:00
|
|
|
</div>
|
2019-01-16 02:26:43 +01:00
|
|
|
|
2019-01-14 22:40:30 +01:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts" src="./SingleTodo.ts">
|
|
|
|
|
</script>
|
2019-01-16 02:26:43 +01:00
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
@import './SingleTodo.scss';
|
|
|
|
|
</style>
|