Filtra Ricerca...
This commit is contained in:
@@ -100,6 +100,7 @@ export default defineComponent({
|
||||
const serverData: any = ref([])
|
||||
const numRecLoaded = ref(0)
|
||||
const changetable = ref(false)
|
||||
const filtri = ref(false)
|
||||
const searchList = ref([] as ISearchList[])
|
||||
|
||||
const actual = ''
|
||||
@@ -349,6 +350,7 @@ export default defineComponent({
|
||||
createNewRecordDialog,
|
||||
toHome,
|
||||
iconsel,
|
||||
filtri,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
:class="$q.screen.lt.sm ? `` : `q-pa-xs`"
|
||||
v-if="isfinishLoading && mycolumns"
|
||||
>
|
||||
<q-layout view="hHh lpR fFf" :class="`shadow-2 rounded-borders `">
|
||||
<div :class="`shadow-2 rounded-borders`">
|
||||
<div>
|
||||
<div v-if="prop_search || canEdit" class="q-my-xs text-right">
|
||||
<q-btn
|
||||
@@ -15,218 +15,230 @@
|
||||
></q-btn>
|
||||
</div>
|
||||
<q-slide-transition>
|
||||
<div class="row no-wrap shadow-1">
|
||||
<q-header elevated reveal>
|
||||
<q-toolbar class="glossy" style="">
|
||||
<div v-if="$q.screen.gt.xs" class="col-1">
|
||||
<q-avatar @click="toHome" class="imglink">
|
||||
<img
|
||||
:src="tools.getimglogo()"
|
||||
height="27"
|
||||
alt="Immagine Logo"
|
||||
/>
|
||||
</q-avatar>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<q-select
|
||||
v-model="tablesel"
|
||||
:options="optionsMainCards"
|
||||
dark
|
||||
emit-value
|
||||
borderless
|
||||
map-options
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
@update:model-value="gotoPageSel"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon :name="iconsel" />
|
||||
</template>
|
||||
<template v-slot:option="scope">
|
||||
<q-item v-bind="scope.itemProps">
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="scope.opt.icon" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ scope.opt.label }}</q-item-label>
|
||||
<!--<q-item-label caption>{{
|
||||
<div class="row no-wrap shadow-1" style="height: 40px;">
|
||||
<div v-if="$q.screen.gt.xs" class="col-1">
|
||||
<q-avatar @click="toHome" class="imglink">
|
||||
<img
|
||||
:src="tools.getimglogo()"
|
||||
height="27"
|
||||
alt="Immagine Logo"
|
||||
/>
|
||||
</q-avatar>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<q-select
|
||||
dense
|
||||
v-model="tablesel"
|
||||
:options="optionsMainCards"
|
||||
emit-value
|
||||
borderless
|
||||
class="text-blue"
|
||||
map-options
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
@update:model-value="gotoPageSel"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon :name="iconsel" />
|
||||
</template>
|
||||
<template v-slot:option="scope">
|
||||
<q-item v-bind="scope.itemProps">
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="scope.opt.icon" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ scope.opt.label }}</q-item-label>
|
||||
<!--<q-item-label caption>{{
|
||||
scope.opt.description
|
||||
}}</q-item-label>-->
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-select>
|
||||
</div>
|
||||
<q-space />
|
||||
<!--<q-btn
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-select>
|
||||
</div>
|
||||
|
||||
<!--<q-btn
|
||||
size="sm"
|
||||
class="col-1 q-mx-xs"
|
||||
icon="fas fa-plus"
|
||||
@click="createNewRecordDialog"
|
||||
>
|
||||
</q-btn>-->
|
||||
<div
|
||||
class="col"
|
||||
v-for="(item, index) in searchList"
|
||||
:key="index"
|
||||
>
|
||||
<CMySelect
|
||||
:col="fieldsTable.getColByColumns(mycolumns, item.key)"
|
||||
v-if="
|
||||
item.type === costanti.FieldType.select ||
|
||||
item.type === costanti.FieldType.select_by_server
|
||||
"
|
||||
:label="
|
||||
item.value && item.value._id > 0
|
||||
? undefined
|
||||
: labelcombo(item)
|
||||
"
|
||||
v-model:value="item.value"
|
||||
@update:value="searchval(item.value, item.table)"
|
||||
:addall="item.addall"
|
||||
:addnone="item.addnone"
|
||||
:addlast="true"
|
||||
:tablesel="
|
||||
item.type === costanti.FieldType.select_by_server
|
||||
? item.tablesel
|
||||
: ''
|
||||
"
|
||||
:pickup="item.type === costanti.FieldType.select_by_server"
|
||||
label-color="white"
|
||||
myclass="comboselector"
|
||||
color="primary"
|
||||
dark
|
||||
:dense="true"
|
||||
:icon_alternative="item.icon"
|
||||
:optval="fieldsTable.getKeyByTable(item.table)"
|
||||
:optlab="fieldsTable.getLabelByTable(item.table)"
|
||||
:options="valoriopt(item, false)"
|
||||
:filter="item.filter"
|
||||
:filter_extra="item.filter_extra"
|
||||
style="font-size: 0.8rem !important"
|
||||
:useinput="
|
||||
item.useinput &&
|
||||
item.type !== costanti.FieldType.select_by_server
|
||||
"
|
||||
<q-btn v-if="false" color="green" label="Filtra la ricerca">
|
||||
<q-popup-proxy>
|
||||
<q-banner class="bg-brown text-white">
|
||||
<div
|
||||
class="col"
|
||||
v-for="(item, index) in searchList"
|
||||
:key="index"
|
||||
>
|
||||
</CMySelect>
|
||||
<CMySelect
|
||||
:col="fieldsTable.getColByColumns(mycolumns, item.key)"
|
||||
v-if="
|
||||
item.type === costanti.FieldType.select ||
|
||||
item.type === costanti.FieldType.select_by_server
|
||||
"
|
||||
:label="
|
||||
item.value && item.value._id > 0
|
||||
? undefined
|
||||
: labelcombo(item)
|
||||
"
|
||||
v-model:value="item.value"
|
||||
@update:value="searchval(item.value, item.table)"
|
||||
:addall="item.addall"
|
||||
:addnone="item.addnone"
|
||||
:addlast="true"
|
||||
:tablesel="
|
||||
item.type === costanti.FieldType.select_by_server
|
||||
? item.tablesel
|
||||
: ''
|
||||
"
|
||||
:pickup="
|
||||
item.type === costanti.FieldType.select_by_server
|
||||
"
|
||||
:label-color="$q.dark.isActive ? 'white' : 'black'"
|
||||
myclass="comboselector"
|
||||
color="primary"
|
||||
dark
|
||||
:dense="true"
|
||||
:icon_alternative="item.icon"
|
||||
:optval="fieldsTable.getKeyByTable(item.table)"
|
||||
:optlab="fieldsTable.getLabelByTable(item.table)"
|
||||
:options="valoriopt(item, false)"
|
||||
:filter="item.filter"
|
||||
:filter_extra="item.filter_extra"
|
||||
style="font-size: 0.8rem !important"
|
||||
:useinput="
|
||||
item.useinput &&
|
||||
item.type !== costanti.FieldType.select_by_server
|
||||
"
|
||||
>
|
||||
</CMySelect>
|
||||
|
||||
<!--<div v-if="item.type === costanti.FieldType.multiselect_by_server">
|
||||
<!--<div v-if="item.type === costanti.FieldType.multiselect_by_server">
|
||||
item: {{ item}}
|
||||
</div>-->
|
||||
|
||||
<CMySelect
|
||||
v-if="
|
||||
item.type === costanti.FieldType.multiselect_by_server
|
||||
"
|
||||
:col="fieldsTable.getColByColumns(mycolumns, item.key)"
|
||||
:multiselect_by_server="true"
|
||||
:label="labelcombo(item)"
|
||||
v-model:arrvalue="item.arrvalue"
|
||||
@update:arrvalue="searchval(item.arrvalue, item.table)"
|
||||
:addall="item.addall"
|
||||
:addnone="item.addnone"
|
||||
dark
|
||||
:addlast="true"
|
||||
:tablesel="item.tablesel"
|
||||
:pickup="true"
|
||||
:param1="item.param1"
|
||||
label-color="primary"
|
||||
class="comboselector"
|
||||
color="primary"
|
||||
:icon_alternative="item.icon"
|
||||
:optval="fieldsTable.getKeyByTable(item.table)"
|
||||
:optlab="fieldsTable.getLabelByTable(item.table)"
|
||||
:filter="item.filter"
|
||||
:filter_extra="item.filter_extra"
|
||||
:options="valoriopt(item, false)"
|
||||
:useinput="true"
|
||||
>
|
||||
</CMySelect>
|
||||
|
||||
<q-select
|
||||
v-if="item.type === costanti.FieldType.multiselect"
|
||||
v-model="item.arrvalue"
|
||||
label-color="primary"
|
||||
:label="labelcombo(item)"
|
||||
@update:model-value="searchval(item.arrvalue, item.table)"
|
||||
rounded
|
||||
dark
|
||||
dense
|
||||
outlined
|
||||
multiple
|
||||
options-dense
|
||||
emit-value
|
||||
map-options
|
||||
:useinput="item.useinput"
|
||||
:options="valoriopt(item, item.addall, item.addnone)"
|
||||
:filter="item.filter"
|
||||
class="comboselector"
|
||||
:option-value="fieldsTable.getKeyByTable(item.table)"
|
||||
>
|
||||
<template v-if="item.icon" v-slot:prepend>
|
||||
<q-icon :name="item.icon" />
|
||||
</template>
|
||||
<template
|
||||
v-if="item.arrvalue.length >= 1"
|
||||
v-slot:selected-item="scope"
|
||||
<CMySelect
|
||||
v-if="
|
||||
item.type === costanti.FieldType.multiselect_by_server
|
||||
"
|
||||
:col="fieldsTable.getColByColumns(mycolumns, item.key)"
|
||||
:multiselect_by_server="true"
|
||||
:label="labelcombo(item)"
|
||||
v-model:arrvalue="item.arrvalue"
|
||||
@update:arrvalue="searchval(item.arrvalue, item.table)"
|
||||
:addall="item.addall"
|
||||
:addnone="item.addnone"
|
||||
dark
|
||||
:addlast="true"
|
||||
:tablesel="item.tablesel"
|
||||
:pickup="true"
|
||||
:param1="item.param1"
|
||||
label-color="primary"
|
||||
class="comboselector"
|
||||
color="primary"
|
||||
:icon_alternative="item.icon"
|
||||
:optval="fieldsTable.getKeyByTable(item.table)"
|
||||
:optlab="fieldsTable.getLabelByTable(item.table)"
|
||||
:filter="item.filter"
|
||||
:filter_extra="item.filter_extra"
|
||||
:options="valoriopt(item, false)"
|
||||
:useinput="true"
|
||||
>
|
||||
<div
|
||||
v-if="
|
||||
scope.opt[fieldsTable.getLabelByTable(item.table)] ||
|
||||
(scope.opt && checkIfShowRec(scope.opt))
|
||||
"
|
||||
</CMySelect>
|
||||
|
||||
<q-select
|
||||
v-if="item.type === costanti.FieldType.multiselect"
|
||||
v-model="item.arrvalue"
|
||||
label-color="primary"
|
||||
:label="labelcombo(item)"
|
||||
@update:model-value="searchval(item.arrvalue, item.table)"
|
||||
rounded
|
||||
dark
|
||||
dense
|
||||
outlined
|
||||
multiple
|
||||
options-dense
|
||||
emit-value
|
||||
map-options
|
||||
:useinput="item.useinput"
|
||||
:options="valoriopt(item, item.addall, item.addnone)"
|
||||
:filter="item.filter"
|
||||
class="comboselector"
|
||||
:option-value="fieldsTable.getKeyByTable(item.table)"
|
||||
>
|
||||
<template v-if="item.icon" v-slot:prepend>
|
||||
<q-icon :name="item.icon" />
|
||||
</template>
|
||||
<template
|
||||
v-if="item.arrvalue.length >= 1"
|
||||
v-slot:selected-item="scope"
|
||||
>
|
||||
<q-chip
|
||||
removable
|
||||
dense
|
||||
@remove="scope.removeAtIndex(scope.index)"
|
||||
v-if="checkIfShowRec(scope.opt)"
|
||||
color="white"
|
||||
text-color="mycol"
|
||||
class="q-my-none q-ml-xs q-mr-none"
|
||||
>
|
||||
<q-avatar
|
||||
color="primary"
|
||||
text-color="white"
|
||||
:icon="item.icon"
|
||||
size="12px"
|
||||
/>
|
||||
{{
|
||||
<div
|
||||
v-if="
|
||||
scope.opt[
|
||||
fieldsTable.getLabelByTable(item.table)
|
||||
] || scope.opt
|
||||
}}
|
||||
</q-chip>
|
||||
</div>
|
||||
</template>
|
||||
<template
|
||||
v-slot:option="{ itemProps, opt, selected, toggleOption }"
|
||||
>
|
||||
<q-item v-bind="itemProps">
|
||||
<q-item-section>
|
||||
<q-item-label>{{
|
||||
opt[fieldsTable.getLabelByTable(item.table)]
|
||||
}}</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-toggle
|
||||
:model-value="selected"
|
||||
@update:model-value="toggleOption(opt)"
|
||||
/>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-select>
|
||||
</div>
|
||||
</q-toolbar>
|
||||
</q-header>
|
||||
] ||
|
||||
(scope.opt && checkIfShowRec(scope.opt))
|
||||
"
|
||||
>
|
||||
<q-chip
|
||||
removable
|
||||
dense
|
||||
@remove="scope.removeAtIndex(scope.index)"
|
||||
v-if="checkIfShowRec(scope.opt)"
|
||||
:color="$q.dark.isActive ? 'white' : 'black'"
|
||||
text-color="mycol"
|
||||
class="q-my-none q-ml-xs q-mr-none"
|
||||
>
|
||||
<q-avatar
|
||||
color="primary"
|
||||
:text-color="$q.dark.isActive ? 'white' : 'black'"
|
||||
:icon="item.icon"
|
||||
size="12px"
|
||||
/>
|
||||
{{
|
||||
scope.opt[
|
||||
fieldsTable.getLabelByTable(item.table)
|
||||
] || scope.opt
|
||||
}}
|
||||
</q-chip>
|
||||
</div>
|
||||
</template>
|
||||
<template
|
||||
v-slot:option="{
|
||||
itemProps,
|
||||
opt,
|
||||
selected,
|
||||
toggleOption,
|
||||
}"
|
||||
>
|
||||
<q-item v-bind="itemProps">
|
||||
<q-item-section>
|
||||
<q-item-label>{{
|
||||
opt[fieldsTable.getLabelByTable(item.table)]
|
||||
}}</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-toggle
|
||||
:model-value="selected"
|
||||
@update:model-value="toggleOption(opt)"
|
||||
/>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-select>
|
||||
</div>
|
||||
</q-banner>
|
||||
</q-popup-proxy>
|
||||
</q-btn>
|
||||
</div>
|
||||
</q-slide-transition>
|
||||
</div>
|
||||
<div class="q-my-md">
|
||||
<div class="q-my-xs">
|
||||
<slot />
|
||||
</div>
|
||||
</q-layout>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" src="./CBarSelection.ts">
|
||||
|
||||
@@ -326,18 +326,6 @@ export default defineComponent({
|
||||
|
||||
|
||||
searchList_Servizi.value = [
|
||||
{
|
||||
label: 'Stato',
|
||||
table: 'statusSkills',
|
||||
key: 'idStatusSkill',
|
||||
value: 0,
|
||||
arrvalue: tools.getCookie(tools.COOK_SEARCH + 'statusSkills', []),
|
||||
type: costanti.FieldType.multiselect,
|
||||
filter: null,
|
||||
useinput: false,
|
||||
icon: 'mood',
|
||||
filteradv: true,
|
||||
},
|
||||
{
|
||||
label: 'Regione',
|
||||
table: 'regions',
|
||||
@@ -377,7 +365,7 @@ export default defineComponent({
|
||||
// param1: shared_consts.PARAM_SHOW_PROVINCE,
|
||||
tablesel: 'cities',
|
||||
},
|
||||
{
|
||||
/*{
|
||||
label: 'Visibilità',
|
||||
table: 'pub_to_share',
|
||||
key: 'pub_to_share',
|
||||
@@ -387,18 +375,7 @@ export default defineComponent({
|
||||
arrvalue: [],
|
||||
useinput: false,
|
||||
filter: null,
|
||||
},
|
||||
{
|
||||
label: 'Offro/Cerco',
|
||||
table: 'adtypes',
|
||||
key: 'adType',
|
||||
value: tools.getCookie(tools.COOK_SEARCH + 'adtypes', costanti.FILTER_TUTTI, true),
|
||||
arrvalue: [],
|
||||
addall: true,
|
||||
type: costanti.FieldType.select,
|
||||
filter: null,
|
||||
useinput: false,
|
||||
},
|
||||
},*/
|
||||
{
|
||||
label: 'Settore',
|
||||
table: toolsext.TABSECTORS,
|
||||
@@ -411,6 +388,17 @@ export default defineComponent({
|
||||
notinsearch: true,
|
||||
useinput: false,
|
||||
},
|
||||
{
|
||||
label: 'Offro/Cerco',
|
||||
table: 'adtypes',
|
||||
key: 'adType',
|
||||
value: tools.getCookie(tools.COOK_SEARCH + 'adtypes', costanti.FILTER_TUTTI, true),
|
||||
arrvalue: [],
|
||||
addall: true,
|
||||
type: costanti.FieldType.select,
|
||||
filter: null,
|
||||
useinput: false,
|
||||
},
|
||||
{
|
||||
label: 'Categoria',
|
||||
table: 'skills',
|
||||
@@ -456,6 +444,18 @@ export default defineComponent({
|
||||
|
||||
|
||||
*/
|
||||
{
|
||||
label: 'Stato',
|
||||
table: 'statusSkills',
|
||||
key: 'idStatusSkill',
|
||||
value: 0,
|
||||
arrvalue: tools.getCookie(tools.COOK_SEARCH + 'statusSkills', []),
|
||||
type: costanti.FieldType.multiselect,
|
||||
filter: null,
|
||||
useinput: false,
|
||||
icon: 'mood',
|
||||
filteradv: true,
|
||||
},
|
||||
{
|
||||
label: 'In cambio di',
|
||||
table: 'contribtypes',
|
||||
@@ -490,7 +490,7 @@ export default defineComponent({
|
||||
]
|
||||
|
||||
searchList_Events.value = [
|
||||
{
|
||||
/*{
|
||||
label: 'Stato',
|
||||
table: 'statusSkills',
|
||||
key: 'idStatusSkill',
|
||||
@@ -501,7 +501,7 @@ export default defineComponent({
|
||||
useinput: false,
|
||||
icon: 'mood',
|
||||
filteradv: false,
|
||||
},
|
||||
},*/
|
||||
{
|
||||
label: 'Regione',
|
||||
table: 'regions',
|
||||
@@ -540,7 +540,7 @@ export default defineComponent({
|
||||
// param1: shared_consts.PARAM_SHOW_PROVINCE,
|
||||
tablesel: 'cities',
|
||||
},
|
||||
{
|
||||
/*{
|
||||
label: 'Visiblità',
|
||||
table: 'pub_to_share',
|
||||
key: 'pub_to_share',
|
||||
@@ -551,7 +551,7 @@ export default defineComponent({
|
||||
useinput: true,
|
||||
filter: null,
|
||||
tablesel: 'pub_to_share',
|
||||
},
|
||||
},*/
|
||||
{
|
||||
label: 'Data Inizio',
|
||||
table: 'caldate',
|
||||
@@ -736,7 +736,7 @@ export default defineComponent({
|
||||
// param1: shared_consts.PARAM_SHOW_PROVINCE,
|
||||
tablesel: 'cities',
|
||||
},
|
||||
{
|
||||
/*{
|
||||
label: 'Visiblità',
|
||||
table: 'pub_to_share',
|
||||
key: 'pub_to_share',
|
||||
@@ -747,7 +747,7 @@ export default defineComponent({
|
||||
useinput: true,
|
||||
filter: null,
|
||||
tablesel: 'pub_to_share',
|
||||
},
|
||||
},*/
|
||||
{
|
||||
label: 'Offro/Cerco',
|
||||
table: 'adtypes',
|
||||
|
||||
@@ -20,6 +20,7 @@ import { lists } from '@store/Modules/lists'
|
||||
import { IParamsQuery } from 'model'
|
||||
import { CMyPopupEdit } from '../CMyPopupEdit'
|
||||
import { CMyFriends } from '../CMyFriends'
|
||||
import { CNotifSettings } from '../CNotifSettings'
|
||||
import { CMyUser } from '../CMyUser'
|
||||
import { CMyGroups } from '../CMyGroups'
|
||||
import { CMyFieldDb } from '../CMyFieldDb'
|
||||
@@ -293,7 +294,7 @@ export default defineComponent({
|
||||
components: {
|
||||
CMyPopupEdit, CTitleBanner, CMyFieldDb, CMySelect, CMyFriends, CMyGroups,
|
||||
CMyUser, CMyRecCard, CMyCardPopup, CMyRecGrpCard, CMyCardGrpPopup, CMyCardCircuitPopup,
|
||||
CMyRecCircuitCard, CMyCardService
|
||||
CMyRecCircuitCard, CMyCardService, CNotifSettings
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
@@ -312,6 +313,7 @@ export default defineComponent({
|
||||
const newRecord: any = ref({})
|
||||
const recSaved: any = ref({})
|
||||
const recModif: any = ref({})
|
||||
const showInnerDialog: any = ref(false)
|
||||
|
||||
const mytable = ref('')
|
||||
const mytitle = ref('')
|
||||
@@ -321,6 +323,7 @@ export default defineComponent({
|
||||
|
||||
const tablesel = ref('')
|
||||
const showSpin = ref(false)
|
||||
const showNotification = ref(false)
|
||||
|
||||
const loading = ref(false)
|
||||
const editOn = computed({
|
||||
@@ -387,6 +390,11 @@ export default defineComponent({
|
||||
// console.log('valoriopt', item.table)
|
||||
return globalStore.getTableJoinByName(item.table, addall, addnone, item.filter)
|
||||
})
|
||||
const lengthopt = computed(() => (item: any, addall: boolean, addnone: boolean) => {
|
||||
// console.log('valoriopt', item.table)
|
||||
const valori = globalStore.getTableJoinByName(item.table, addall, addnone, item.filter)
|
||||
return (valori ? valori.length : 0)
|
||||
})
|
||||
|
||||
const labelcombo = computed(() => (item: any) => {
|
||||
let lab = item.label
|
||||
@@ -2150,6 +2158,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function onLoadScroll(index: number, done: any) {
|
||||
|
||||
if (index > 1) {
|
||||
// console.log('onLoadScroll', index, 'RECLOAD', numRecLoaded.value, 'ROWS: ', pagination.value.rowsNumber, 'PAGE: ', pagination.value.page)
|
||||
if (numRecLoaded.value < pagination.value.rowsNumber || (pagination.value.rowsNumber <= 0 && clickbuttsearch.value)) {
|
||||
@@ -2228,9 +2237,9 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function showNotification() {
|
||||
/*function showNotification() {
|
||||
$router.push('/notifs')
|
||||
}
|
||||
} */
|
||||
|
||||
created()
|
||||
mounted()
|
||||
@@ -2333,6 +2342,8 @@ export default defineComponent({
|
||||
ordinam_desc,
|
||||
getNumFilterSelected,
|
||||
rowsel,
|
||||
showInnerDialog,
|
||||
lengthopt,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -87,8 +87,9 @@
|
||||
<CMySelect
|
||||
:col="fieldsTable.getColByColumns(mycolumns, item.key)"
|
||||
v-if="
|
||||
item.type === costanti.FieldType.select ||
|
||||
item.type === costanti.FieldType.select_by_server
|
||||
(item.type === costanti.FieldType.select ||
|
||||
item.type === costanti.FieldType.select_by_server)
|
||||
&& lengthopt(item, false) > 1
|
||||
"
|
||||
:label="labelcombo(item)"
|
||||
v-model:value="item.value"
|
||||
@@ -122,7 +123,7 @@
|
||||
</div>-->
|
||||
|
||||
<CMySelect
|
||||
v-if="item.type === costanti.FieldType.multiselect_by_server"
|
||||
v-if="item.type === costanti.FieldType.multiselect_by_server && lengthopt(item, false) > 1"
|
||||
:col="fieldsTable.getColByColumns(mycolumns, item.key)"
|
||||
:multiselect_by_server="true"
|
||||
:label="labelcombo(item)"
|
||||
@@ -229,6 +230,33 @@
|
||||
v-if="prop_search || canEdit"
|
||||
class="row justify-center vertical-middle"
|
||||
>
|
||||
<div class="row justify-around q-mb-sm">
|
||||
<div v-if="searchList && finder">
|
||||
<q-btn
|
||||
dense
|
||||
label="Filtra Ricerca"
|
||||
color="positive"
|
||||
icon="fas fa-filter"
|
||||
@click="showfilter = !showfilter"
|
||||
><q-badge
|
||||
v-if="getNumFilterSelected()"
|
||||
color="red"
|
||||
floating
|
||||
transparent
|
||||
>
|
||||
{{ getNumFilterSelected() }}
|
||||
</q-badge>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
dense
|
||||
color="orange"
|
||||
icon="fas fa-bell"
|
||||
label="Avvisami se..."
|
||||
@click="showNotification = !showNotification"
|
||||
></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="prop_search" class="q-mr-sm full-width">
|
||||
<q-input
|
||||
v-model="search"
|
||||
@@ -243,29 +271,6 @@
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
<template v-if="searchList && finder" v-slot:before>
|
||||
<q-btn
|
||||
dense
|
||||
color="positive"
|
||||
icon="fas fa-filter"
|
||||
@click="showfilter = !showfilter"
|
||||
><q-badge
|
||||
v-if="getNumFilterSelected()"
|
||||
color="red"
|
||||
floating
|
||||
transparent
|
||||
>
|
||||
{{ getNumFilterSelected() }}
|
||||
</q-badge>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
dense
|
||||
color="orange"
|
||||
icon="fas fa-bell"
|
||||
@click="showNotification"
|
||||
></q-btn>
|
||||
</template>
|
||||
<template v-slot:after>
|
||||
<q-select
|
||||
v-if="prop_SortFieldsAvailable.length > 0"
|
||||
@@ -376,7 +381,9 @@
|
||||
<div v-if="row && shared_consts.TABLES_WITH_DATE.includes(tablesel)">
|
||||
<div
|
||||
v-if="
|
||||
actmonth !== tools.getstrMonth(row.dateTimeStart) || !actmonth || index === 0
|
||||
actmonth !== tools.getstrMonth(row.dateTimeStart) ||
|
||||
!actmonth ||
|
||||
index === 0
|
||||
"
|
||||
>
|
||||
<span style="display: none">{{
|
||||
@@ -393,10 +400,11 @@
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="false &&
|
||||
v-if="
|
||||
false &&
|
||||
((row.dateTimeStart &&
|
||||
tools.getstrVeryShortDate(row.dateTimeStart) !== actual) ||
|
||||
index === 0)
|
||||
index === 0)
|
||||
"
|
||||
class="actualdate"
|
||||
>
|
||||
@@ -457,6 +465,7 @@
|
||||
? tools.getLabelFooterByRow(row, col_footer, tablesel)
|
||||
: ''
|
||||
"
|
||||
@showInnerDialog="showInnerDialog"
|
||||
>
|
||||
</CMyUser>
|
||||
|
||||
@@ -1404,7 +1413,22 @@
|
||||
</q-dialog>
|
||||
<span v-if="!hidetitleIfEmpty"> <br /></span>
|
||||
</div>
|
||||
<q-dialog v-model="showNotification" :maximized="$q.screen.lt.sm">
|
||||
<q-card class="dialog_card">
|
||||
<q-toolbar class="bg-primary text-white">
|
||||
<q-toolbar-title>
|
||||
Notifiche
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-toolbar>
|
||||
|
||||
<q-card-section class="inset-shadow">
|
||||
<CNotifSettings> </CNotifSettings>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CGridTableRec.ts">
|
||||
</script>
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import { useCircuitStore } from '@store/CircuitStore'
|
||||
export default defineComponent({
|
||||
name: 'CMyUser',
|
||||
components: { CSendCoins, CSaldo, CUserInfoAccount },
|
||||
emits: ['setCmd'],
|
||||
emits: ['setCmd', 'showInnerDialog'],
|
||||
props: {
|
||||
mycontact: {
|
||||
type: Object as PropType<IUserFields | null>,
|
||||
@@ -111,6 +111,11 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function showsendCoin(value: boolean) {
|
||||
showsendCoinTo.value = value
|
||||
emit('showInnerDialog', showsendCoinTo.value)
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
@@ -125,6 +130,7 @@ export default defineComponent({
|
||||
circuit,
|
||||
showAccountInfo,
|
||||
showsendCoinTo,
|
||||
showsendCoin,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -391,6 +391,17 @@
|
||||
<q-menu>
|
||||
<q-list v-if="true" style="min-width: 150px">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
dense
|
||||
@click="naviga(`/my/` + contact.username)"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="primary" name="fas fa-user" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('shared.profile') }}</q-item-section>
|
||||
</q-item>
|
||||
<!--<q-item
|
||||
v-if="
|
||||
userStore.showButtonSendCoin(contact) &&
|
||||
(contact.username !== userStore.my.username ||
|
||||
@@ -400,13 +411,13 @@
|
||||
clickable
|
||||
v-close-popup
|
||||
dense
|
||||
@click="showsendCoinTo = true"
|
||||
@click="showsendCoin(true)"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="positive" name="fas fa-coins" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('circuit.sendcoins') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-item>-->
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@@ -776,7 +787,7 @@
|
||||
>
|
||||
<q-menu>
|
||||
<q-list style="min-width: 200px">
|
||||
<q-item
|
||||
<!--<q-item
|
||||
v-if="
|
||||
userStore.showButtonSendCoin(contact) &&
|
||||
(contact.username !== userStore.my.username ||
|
||||
@@ -786,13 +797,25 @@
|
||||
clickable
|
||||
v-close-popup
|
||||
dense
|
||||
@click="showsendCoinTo = true"
|
||||
@click="showsendCoin(true)"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="positive" name="fas fa-coins" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('circuit.sendcoins') }}</q-item-section>
|
||||
</q-item>-->
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
dense
|
||||
@click="naviga(`/my/` + contact.username)"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="primary" name="fas fa-user" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('shared.profile') }}</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item
|
||||
v-if="
|
||||
costanti.ENABLE_FRIENDS &&
|
||||
@@ -979,12 +1002,13 @@
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</div>
|
||||
<div v-if="showsendCoinTo && contact">
|
||||
<div v-if="contact">
|
||||
<CSendCoins
|
||||
v-if="showsendCoinTo"
|
||||
:showprop="showsendCoinTo"
|
||||
:to_user="contact"
|
||||
:circuitname="circuitname"
|
||||
@close="showsendCoinTo = false"
|
||||
@close="showsendCoin(false)"
|
||||
>
|
||||
</CSendCoins>
|
||||
</div>
|
||||
|
||||
@@ -35,21 +35,21 @@
|
||||
<div
|
||||
v-if="tools.isBitActive(getnotifbydir(shared_consts.TypeNotifs.TYPEDIR_BACHECA), shared_consts.UsersNotif.NEW_ADV_SECTOR)">
|
||||
<CMyFieldDb
|
||||
:title="$t('sectors.sector_general')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="notif_sectors"
|
||||
:jointable="toolsext.TABSECTORS"
|
||||
:type="costanti.FieldType.multiselect">
|
||||
</CMyFieldDb>
|
||||
<CMyFieldDb
|
||||
:title="$t('sectors.sector_goods')"
|
||||
:title="$t('sectors.sector_goods_select')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="notif_sector_goods"
|
||||
:jointable="toolsext.TABSECTORGOODS"
|
||||
:type="costanti.FieldType.multiselect">
|
||||
</CMyFieldDb>
|
||||
<CMyFieldDb
|
||||
:title="$t('sectors.sector_select')"
|
||||
table="users"
|
||||
mykey="profile"
|
||||
mysubkey="notif_sectors"
|
||||
:jointable="toolsext.TABSECTORS"
|
||||
:type="costanti.FieldType.multiselect">
|
||||
</CMyFieldDb>
|
||||
</div>
|
||||
<div
|
||||
v-if="tools.isBitActive(getnotifbydir(shared_consts.TypeNotifs.TYPEDIR_BACHECA), shared_consts.UsersNotif.NEW_ADV_REGION)">
|
||||
|
||||
@@ -240,7 +240,7 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function mounted() {
|
||||
async function mounted() {
|
||||
|
||||
arrTypesAccounts.value = [
|
||||
{
|
||||
@@ -259,13 +259,13 @@ export default defineComponent({
|
||||
} else {
|
||||
circuitsel.value = tools.getCookie(tools.CIRCUIT_USE, bothcircuits.value[0])
|
||||
}
|
||||
if (!userStore.IsMyCircuitByName(circuitsel.value)) {
|
||||
if (bothcircuits.value && bothcircuits.value.find((name: any) => name !== circuitsel.value)) {
|
||||
circuitsel.value = bothcircuits.value[0]
|
||||
}
|
||||
|
||||
qty.value = props.qtydefault
|
||||
|
||||
aggiorna()
|
||||
await aggiorna()
|
||||
|
||||
showpage.value = true
|
||||
}
|
||||
@@ -283,7 +283,7 @@ export default defineComponent({
|
||||
circuitsel.value = bothcircuits.value[0]
|
||||
}
|
||||
|
||||
aggiorna()
|
||||
await aggiorna()
|
||||
|
||||
showpage.value = true
|
||||
}
|
||||
@@ -296,7 +296,7 @@ export default defineComponent({
|
||||
circuitsel.value = bothcircuits.value[0]
|
||||
}
|
||||
|
||||
aggiorna()
|
||||
await aggiorna()
|
||||
|
||||
showpage.value = true
|
||||
}
|
||||
|
||||
@@ -1,207 +1,205 @@
|
||||
<template>
|
||||
<q-dialog
|
||||
v-model="showpage"
|
||||
:maximized="$q.screen.lt.sm"
|
||||
@hide="hide"
|
||||
@show="qtyRef ? qtyRef.focus() : ''"
|
||||
>
|
||||
<q-card class="dialog_card">
|
||||
<q-bar class="bg-primary text-white">
|
||||
{{ $t('circuit.sendcoins') }}
|
||||
<q-space />
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-bar>
|
||||
<q-card-section class="q-px-xs inset-shadow">
|
||||
<q-select
|
||||
v-if="!circuitname"
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
rounded
|
||||
dense
|
||||
outlined
|
||||
v-model="circuitsel"
|
||||
:options="bothcircuits"
|
||||
label="Circuito"
|
||||
>
|
||||
</q-select>
|
||||
<div v-else>{{ circuitname }}</div>
|
||||
<q-dialog
|
||||
v-model="showpage"
|
||||
:maximized="$q.screen.lt.sm"
|
||||
@hide="hide"
|
||||
@show="qtyRef ? qtyRef.focus() : ''"
|
||||
>
|
||||
<q-card class="dialog_card">
|
||||
<q-bar class="bg-primary text-white">
|
||||
{{ $t('circuit.sendcoins') }}
|
||||
<q-space />
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-bar>
|
||||
<q-card-section class="q-px-xs inset-shadow">
|
||||
<q-select
|
||||
v-if="!circuitname"
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
rounded
|
||||
dense
|
||||
outlined
|
||||
v-model="circuitsel"
|
||||
:options="bothcircuits"
|
||||
label="Circuito"
|
||||
>
|
||||
</q-select>
|
||||
<div v-else>{{ circuitname }}</div>
|
||||
|
||||
<q-banner
|
||||
v-if="showProvinceToSelect"
|
||||
<q-banner
|
||||
v-if="showProvinceToSelect"
|
||||
rounded
|
||||
class="bg-red text-white"
|
||||
style="text-align: center"
|
||||
>
|
||||
<em style="font-weight: bold">{{
|
||||
$t('circuit.insertprovince_text')
|
||||
}}</em
|
||||
><br />
|
||||
</q-banner>
|
||||
|
||||
<q-banner
|
||||
rounded
|
||||
dense
|
||||
class="shadow-5 q-my-sm"
|
||||
color="primary q-title"
|
||||
style="text-align: center"
|
||||
>
|
||||
<div class="mybanner_left bg-blue text-white q-mb-sm">
|
||||
{{ $t('circuit.sender') }}:
|
||||
</div>
|
||||
<div>
|
||||
<q-btn-toggle
|
||||
v-if="arrTypesAccounts.length > 0"
|
||||
v-model="tipoConto"
|
||||
class="my-custom-toggle"
|
||||
no-caps
|
||||
rounded
|
||||
class="bg-red text-white"
|
||||
style="text-align: center"
|
||||
unelevated
|
||||
toggle-color="primary"
|
||||
color="white"
|
||||
text-color="primary"
|
||||
:options="arrTypesAccounts"
|
||||
/>
|
||||
</div>
|
||||
<q-input
|
||||
v-if="tipoConto === costanti.AccountType.USER"
|
||||
v-model="from_username"
|
||||
class="full-width"
|
||||
readonly
|
||||
>
|
||||
</q-input>
|
||||
<div
|
||||
v-else-if="tipoConto === costanti.AccountType.COLLECTIVE_ACCOUNT"
|
||||
>
|
||||
<q-select
|
||||
v-model="from_groupname"
|
||||
:options="arrGroupsList"
|
||||
:label="$t('circuit.choosecontocom')"
|
||||
rounded
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
<em style="font-weight: bold">{{
|
||||
$t('circuit.insertprovince_text')
|
||||
}}</em
|
||||
><br />
|
||||
</q-banner>
|
||||
<!-- Mostra i gruppi su cui sei Admin -->
|
||||
</q-select>
|
||||
</div>
|
||||
<div v-else-if="tipoConto === costanti.AccountType.COMMUNITY_ACCOUNT">
|
||||
<q-input
|
||||
v-model="from_contocom"
|
||||
:label="$t('circuit.contocom')"
|
||||
readonly
|
||||
class="q-my-sm"
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
|
||||
<CSaldo
|
||||
v-if="circuitloaded && circuitloaded.symbol"
|
||||
:symbol="circuitloaded.symbol"
|
||||
:color="circuitloaded.color"
|
||||
:saldo="accountloaded ? accountloaded.saldo : 0"
|
||||
:qtarem="
|
||||
accountloaded
|
||||
? circuitStore.getRemainingCoinsToSend(accountloaded)
|
||||
: 0
|
||||
"
|
||||
>
|
||||
</CSaldo>
|
||||
</q-banner>
|
||||
|
||||
<q-banner
|
||||
rounded
|
||||
dense
|
||||
class="shadow-5 q-my-sm"
|
||||
color="primary q-title"
|
||||
>
|
||||
<div class="mybanner_left bg-green text-white q-mb-sm">
|
||||
{{ $t('circuit.dest') }}
|
||||
</div>
|
||||
|
||||
<!-- Destination -->
|
||||
<CMyUserOnlyView
|
||||
v-if="to_user"
|
||||
:mycontact="to_user"
|
||||
:visu="costanti.FIND_PEOPLE"
|
||||
@setCmd="tools.setCmd"
|
||||
>
|
||||
</CMyUserOnlyView>
|
||||
<CMyGroupOnlyView
|
||||
v-if="to_group"
|
||||
:mygrp="to_group"
|
||||
:visu="costanti.USER_GROUPS"
|
||||
:circuitname="circuitloaded.name"
|
||||
>
|
||||
</CMyGroupOnlyView>
|
||||
<CMyGroupOnlyView
|
||||
v-if="circuitloaded && to_contocom"
|
||||
:mygrp="{ groupname: to_contocom }"
|
||||
:visu="costanti.USER_GROUPS"
|
||||
:circuitname="circuitloaded.name"
|
||||
>
|
||||
</CMyGroupOnlyView>
|
||||
</q-banner>
|
||||
|
||||
<q-inner-loading id="spinner" :showing="loading">
|
||||
<q-spinner-tail size="6em" color="primary" />
|
||||
</q-inner-loading>
|
||||
|
||||
<div v-if="circuitloaded">
|
||||
<q-banner
|
||||
v-if="!circuitloaded.transactionsEnabled"
|
||||
rounded
|
||||
dense
|
||||
class="shadow-5 q-my-sm"
|
||||
color="primary q-title"
|
||||
class="bg-red text-white"
|
||||
style="text-align: center"
|
||||
>
|
||||
<div class="mybanner_left bg-blue text-white q-mb-sm">
|
||||
{{ $t('circuit.sender') }}:
|
||||
</div>
|
||||
<div>
|
||||
<q-btn-toggle
|
||||
v-if="arrTypesAccounts.length > 0"
|
||||
v-model="tipoConto"
|
||||
class="my-custom-toggle"
|
||||
no-caps
|
||||
rounded
|
||||
unelevated
|
||||
toggle-color="primary"
|
||||
color="white"
|
||||
text-color="primary"
|
||||
:options="arrTypesAccounts"
|
||||
/>
|
||||
</div>
|
||||
<q-input
|
||||
v-if="tipoConto === costanti.AccountType.USER"
|
||||
v-model="from_username"
|
||||
class="full-width"
|
||||
readonly
|
||||
>
|
||||
</q-input>
|
||||
<div
|
||||
v-else-if="tipoConto === costanti.AccountType.COLLECTIVE_ACCOUNT"
|
||||
>
|
||||
<q-select
|
||||
v-model="from_groupname"
|
||||
:options="arrGroupsList"
|
||||
:label="$t('circuit.choosecontocom')"
|
||||
rounded
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
<!-- Mostra i gruppi su cui sei Admin -->
|
||||
</q-select>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="tipoConto === costanti.AccountType.COMMUNITY_ACCOUNT"
|
||||
>
|
||||
<q-input
|
||||
v-model="from_contocom"
|
||||
:label="$t('circuit.contocom')"
|
||||
readonly
|
||||
class="q-my-sm"
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
|
||||
<CSaldo
|
||||
v-if="circuitloaded && circuitloaded.symbol"
|
||||
:symbol="circuitloaded.symbol"
|
||||
:color="circuitloaded.color"
|
||||
:saldo="accountloaded ? accountloaded.saldo : 0"
|
||||
:qtarem="
|
||||
accountloaded
|
||||
? circuitStore.getRemainingCoinsToSend(accountloaded)
|
||||
: 0
|
||||
"
|
||||
>
|
||||
</CSaldo>
|
||||
<em style="font-weight: bold">{{
|
||||
$t('circuit.transactionsEnabled_text')
|
||||
}}</em
|
||||
><br />
|
||||
</q-banner>
|
||||
|
||||
<q-banner
|
||||
rounded
|
||||
dense
|
||||
class="shadow-5 q-my-sm"
|
||||
color="primary q-title"
|
||||
<q-input
|
||||
ref="qtyRef"
|
||||
class="q-py-sm text-h5"
|
||||
outlined
|
||||
v-model="qty"
|
||||
type="number"
|
||||
:rules="[
|
||||
(val) =>
|
||||
val <= circuitStore.getRemainingCoinsToSend(accountloaded) ||
|
||||
t('circuit.qta_remaining_to_send', {
|
||||
maxqta: circuitStore.getRemainingCoinsToSend(accountloaded),
|
||||
symbol: circuitloaded.symbol,
|
||||
}),
|
||||
(val) => val > 0 || t('circuit.qta_not_valid'),
|
||||
]"
|
||||
:label="
|
||||
t('movement.amount_to_send', {
|
||||
qtamax: circuitStore.getRemainingCoinsToSend(accountloaded)
|
||||
? circuitStore
|
||||
.getRemainingCoinsToSend(accountloaded)
|
||||
.toFixed(2)
|
||||
: 0 + ` ` + circuitloaded.symbol,
|
||||
})
|
||||
"
|
||||
input-class="text-right"
|
||||
v-on:keyup.enter="$event.target.nextElementSibling.focus()"
|
||||
>
|
||||
<div class="mybanner_left bg-green text-white q-mb-sm">
|
||||
{{ $t('circuit.dest') }}
|
||||
</div>
|
||||
<!--val => val > circuitStore.getMaxCoinsToSend(accountloaded) || t('circuit.qta_max_to_send', { maxqta: tools.getRemainingCoinsToSend(accountloaded), symbol: circuitloaded.symbol })]" -->
|
||||
<template v-slot:append>
|
||||
<div class="text-h5">
|
||||
<em
|
||||
class="q-px-sm text-white rounded-borders"
|
||||
:style="
|
||||
`background-color: ` +
|
||||
(circuitloaded.color ? circuitloaded.color : '#ff5500')
|
||||
"
|
||||
>{{ circuitloaded.symbol }}</em
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<!-- Destination -->
|
||||
<CMyUserOnlyView
|
||||
v-if="to_user"
|
||||
:mycontact="to_user"
|
||||
:visu="costanti.FIND_PEOPLE"
|
||||
@setCmd="tools.setCmd"
|
||||
>
|
||||
</CMyUserOnlyView>
|
||||
<CMyGroupOnlyView
|
||||
v-if="to_group"
|
||||
:mygrp="to_group"
|
||||
:visu="costanti.USER_GROUPS"
|
||||
:circuitname="circuitloaded.name"
|
||||
>
|
||||
</CMyGroupOnlyView>
|
||||
<CMyGroupOnlyView
|
||||
v-if="circuitloaded && to_contocom"
|
||||
:mygrp="{ groupname: to_contocom }"
|
||||
:visu="costanti.USER_GROUPS"
|
||||
:circuitname="circuitloaded.name"
|
||||
>
|
||||
</CMyGroupOnlyView>
|
||||
</q-banner>
|
||||
|
||||
<q-inner-loading id="spinner" :showing="loading">
|
||||
<q-spinner-tail size="6em" color="primary" />
|
||||
</q-inner-loading>
|
||||
|
||||
<div v-if="circuitloaded">
|
||||
<q-banner
|
||||
v-if="!circuitloaded.transactionsEnabled"
|
||||
rounded
|
||||
class="bg-red text-white"
|
||||
style="text-align: center"
|
||||
>
|
||||
<em style="font-weight: bold">{{
|
||||
$t('circuit.transactionsEnabled_text')
|
||||
}}</em
|
||||
><br />
|
||||
</q-banner>
|
||||
|
||||
<q-input
|
||||
ref="qtyRef"
|
||||
class="q-py-sm text-h5"
|
||||
outlined
|
||||
v-model="qty"
|
||||
type="number"
|
||||
:rules="[
|
||||
(val) =>
|
||||
val <= circuitStore.getRemainingCoinsToSend(accountloaded) ||
|
||||
t('circuit.qta_remaining_to_send', {
|
||||
maxqta: circuitStore.getRemainingCoinsToSend(accountloaded),
|
||||
symbol: circuitloaded.symbol,
|
||||
}),
|
||||
(val) => val > 0 || t('circuit.qta_not_valid'),
|
||||
]"
|
||||
:label="
|
||||
t('movement.amount_to_send', {
|
||||
qtamax: circuitStore.getRemainingCoinsToSend(accountloaded)
|
||||
? circuitStore
|
||||
.getRemainingCoinsToSend(accountloaded)
|
||||
.toFixed(2)
|
||||
: 0 + ` ` + circuitloaded.symbol,
|
||||
})
|
||||
"
|
||||
input-class="text-right"
|
||||
v-on:keyup.enter="$event.target.nextElementSibling.focus()"
|
||||
>
|
||||
<!--val => val > circuitStore.getMaxCoinsToSend(accountloaded) || t('circuit.qta_max_to_send', { maxqta: tools.getRemainingCoinsToSend(accountloaded), symbol: circuitloaded.symbol })]" -->
|
||||
<template v-slot:append>
|
||||
<div class="text-h5">
|
||||
<em
|
||||
class="q-px-sm text-white rounded-borders"
|
||||
:style="
|
||||
`background-color: ` +
|
||||
(circuitloaded.color ? circuitloaded.color : '#ff5500')
|
||||
"
|
||||
>{{ circuitloaded.symbol }}</em
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<!--<q-slider
|
||||
<!--<q-slider
|
||||
class="q-ma-xs"
|
||||
v-if="
|
||||
qty !== '' &&
|
||||
@@ -221,61 +219,62 @@
|
||||
:min="0"
|
||||
:max="Number(maxsendable ? maxsendable : 0)"
|
||||
/>
|
||||
--></div>
|
||||
-->
|
||||
</div>
|
||||
|
||||
<q-input
|
||||
ref="causalRef"
|
||||
v-model="causal"
|
||||
:label="$t('circuit.note')"
|
||||
class="q-my-sm full-width"
|
||||
>
|
||||
</q-input>
|
||||
</q-card-section>
|
||||
<q-card-actions align="center">
|
||||
<q-btn
|
||||
v-if="
|
||||
circuitloaded &&
|
||||
(qtyRef
|
||||
? !(
|
||||
qtyRef.hasError ||
|
||||
!circuitloaded.transactionsEnabled ||
|
||||
(tipoConto === costanti.AccountType.USER &&
|
||||
to_user &&
|
||||
from_username === to_user.username) ||
|
||||
(tipoConto === costanti.AccountType.COLLECTIVE_ACCOUNT &&
|
||||
!from_groupname) ||
|
||||
(tipoConto === costanti.AccountType.COLLECTIVE_ACCOUT &&
|
||||
to_group &&
|
||||
from_groupname &&
|
||||
to_group.groupname === from_groupname) ||
|
||||
(tipoConto === costanti.AccountType.COMMUNITY_ACCOUNT &&
|
||||
!from_contocom)
|
||||
)
|
||||
: true)
|
||||
"
|
||||
:label="
|
||||
$t('circuit.sendcoinsto', {
|
||||
qty,
|
||||
coin: circuitloaded.symbol,
|
||||
dest: to_group
|
||||
? to_group.groupname
|
||||
: to_user
|
||||
? tools.getNomeUtenteByRecUser(to_user)
|
||||
: to_contocom,
|
||||
})
|
||||
"
|
||||
color="positive"
|
||||
@click="sendCoin()"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
flat
|
||||
:label="$t('dialog.cancel')"
|
||||
color="primary"
|
||||
v-close-popup
|
||||
></q-btn>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-input
|
||||
ref="causalRef"
|
||||
v-model="causal"
|
||||
:label="$t('circuit.note')"
|
||||
class="q-my-sm full-width"
|
||||
>
|
||||
</q-input>
|
||||
</q-card-section>
|
||||
<q-card-actions align="center">
|
||||
<q-btn
|
||||
v-if="
|
||||
circuitloaded &&
|
||||
(qtyRef
|
||||
? !(
|
||||
qtyRef.hasError ||
|
||||
!circuitloaded.transactionsEnabled ||
|
||||
(tipoConto === costanti.AccountType.USER &&
|
||||
to_user &&
|
||||
from_username === to_user.username) ||
|
||||
(tipoConto === costanti.AccountType.COLLECTIVE_ACCOUNT &&
|
||||
!from_groupname) ||
|
||||
(tipoConto === costanti.AccountType.COLLECTIVE_ACCOUT &&
|
||||
to_group &&
|
||||
from_groupname &&
|
||||
to_group.groupname === from_groupname) ||
|
||||
(tipoConto === costanti.AccountType.COMMUNITY_ACCOUNT &&
|
||||
!from_contocom)
|
||||
)
|
||||
: true)
|
||||
"
|
||||
:label="
|
||||
$t('circuit.sendcoinsto', {
|
||||
qty,
|
||||
coin: circuitloaded.symbol,
|
||||
dest: to_group
|
||||
? to_group.groupname
|
||||
: to_user
|
||||
? tools.getNomeUtenteByRecUser(to_user)
|
||||
: to_contocom,
|
||||
})
|
||||
"
|
||||
color="positive"
|
||||
@click="sendCoin()"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
flat
|
||||
:label="$t('dialog.cancel')"
|
||||
color="primary"
|
||||
v-close-popup
|
||||
></q-btn>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CSendCoins.ts">
|
||||
|
||||
@@ -867,7 +867,7 @@ const msg_it = {
|
||||
},
|
||||
typenotifs: {
|
||||
new_rec_bacheca: 'Annunci',
|
||||
new_rec_bacheca_descr: 'Avvisami se:',
|
||||
new_rec_bacheca_descr: 'Avvisami quando viene aggiunto un Annuncio:',
|
||||
friends: 'Richieste di Amicizia',
|
||||
groups: 'Gruppi',
|
||||
friends_descr: 'Avvisami se:',
|
||||
@@ -1050,7 +1050,9 @@ const msg_it = {
|
||||
sectors: {
|
||||
name: 'Settore',
|
||||
sector_general: 'Settori',
|
||||
sector_select: 'Scegli i Settori Preferiti',
|
||||
sector_goods: 'Settori dei Beni',
|
||||
sector_goods_select: 'Scegli i Settori Preferiti dei Beni',
|
||||
},
|
||||
catgrps: {
|
||||
name: 'Categoria',
|
||||
@@ -1136,6 +1138,7 @@ const msg_it = {
|
||||
subscribes: 'Membri',
|
||||
cancel_ask: 'Annulla la richiesta',
|
||||
refuse_ask: 'Rifiuta la richiesta',
|
||||
profile: 'Apri Profilo',
|
||||
cancel_ask_short: 'Annulla richiesta',
|
||||
refuse_ask_short: 'Rifiuta la richiesta',
|
||||
member: 'membro',
|
||||
|
||||
@@ -86,6 +86,8 @@ export default defineComponent({
|
||||
|
||||
const cities = ref([] as ICity[])
|
||||
|
||||
const fidoConcesso = computed(() => account.value ? account.value.fidoConcesso : circuit.value!.fido_scoperto_default)
|
||||
const qtaMax = computed(() => account.value ? account.value.qta_maxConcessa : circuit.value!.qta_max_default)
|
||||
|
||||
watch(() => path.value, (to: any, from: any) => {
|
||||
loadCircuit()
|
||||
@@ -496,6 +498,8 @@ export default defineComponent({
|
||||
extraparams_rich_groups,
|
||||
extraparams_refused_groups,
|
||||
getRegulation,
|
||||
fidoConcesso,
|
||||
qtaMax,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user