- la ricerca trova anche i "On Line" anche se metto la provincia o regione.

This commit is contained in:
Surya Paolo
2024-02-19 18:51:18 +01:00
parent e1bc367418
commit 70f5beb1cb
6 changed files with 67 additions and 35 deletions

View File

@@ -447,7 +447,7 @@ export default defineComponent({
*/
{
label: 'Stato',
label: 'Scambio',
table: 'statusSkills',
key: 'idStatusSkill',
value: 0,
@@ -455,7 +455,7 @@ export default defineComponent({
type: costanti.FieldType.multiselect,
filter: null,
useinput: false,
icon: 'mood',
icon: 'fas fa-exchange-alt',
filteradv: true,
},
{
@@ -493,7 +493,7 @@ export default defineComponent({
searchList_Events.value = [
/*{
label: 'Stato',
label: 'Scambio',
table: 'statusSkills',
key: 'idStatusSkill',
value: 0,

View File

@@ -269,23 +269,6 @@
</div>
</q-item-section>
<q-item-section avatar>
<q-item-label>
<span
v-for="(recstatus, index) in myrec.idStatusSkill"
:key="index"
>
<q-chip
dense
:color="globalStore.getColByStatusSkills(recstatus)"
text-color="white"
>
{{ globalStore.getStatusSkillById(recstatus) }}
</q-chip>
</span>
</q-item-label>
</q-item-section>
<q-item-section>
<q-item-label v-if="myrec.typeHosp" class="text-bold text-h7">
<q-chip dense color="green" text-color="white"

View File

@@ -11,6 +11,7 @@ import { useI18n } from '@/boot/i18n'
import { CMyCardPopup } from '@/components/CMyCardPopup'
import { useRouter } from 'vue-router'
import { useCalendarStore } from '@src/store/CalendarStore'
import { useGlobalStore } from '@src/store/globalStore'
export default defineComponent({
name: 'CMyRecCard',
@@ -42,6 +43,7 @@ export default defineComponent({
const userStore = useUserStore()
const calendarStore = useCalendarStore()
const globalStore = useGlobalStore()
// const $q = useQuasar()
const { t } = useI18n()
const $router = useRouter()
@@ -129,6 +131,7 @@ export default defineComponent({
isPartecipero,
calendarStore,
disabilita,
globalStore,
}
},
})

View File

@@ -35,8 +35,8 @@
@click="cmdExt(costanti.CMD_SHOW_PAGE, myrec)"
/>
<div>
{{tools.getstrDateTimeEvent($t, myrec, false)}}</div>
{{ tools.getstrDateTimeEvent($t, myrec, false) }}
</div>
</div>
</div>
</div>
@@ -103,7 +103,11 @@
</q-avatar>
</q-item-section>
<q-item-section v-else-if="!myrec.organisedBy" avatar @click="naviga(`/my/` + myrec.username)">
<q-item-section
v-else-if="!myrec.organisedBy"
avatar
@click="naviga(`/my/` + myrec.username)"
>
<q-badge
v-if="showBadge()"
class="q-my-xs self-center"
@@ -150,11 +154,36 @@
></span
>
</span>
<span
v-for="(recstatus, index) in myrec.idStatusSkill"
:key="index"
class="q-ml-xs"
style="vertical-align: middle"
>
<q-badge
v-if="(recstatus === costanti.STATUSSKILL_ONLINE) || myrec.idStatusSkill.length > 1"
dense
:color="globalStore.getColByStatusSkills(recstatus)"
text-color="white"
>
<q-icon
:name="globalStore.getStatusSkillIconById(recstatus)"
color="white"
/>&nbsp;
{{ globalStore.getStatusSkillById(recstatus) }}
</q-badge>
</span>
<!--<span class="dateevent" v-if="myrec.dateTimeStart">dal <span class="datainizio">{{tools.getstrVeryShortDate(myrec.dateStart) }}</span> al <span class="datafine">{{ tools.getstrVeryShortDate(myrec.dateEnd) }}</span>
</span>-->
</q-item-label>
<q-item-label lines="4" :class="(table === shared_consts.TABLES_MYBACHECAS) ? 'text-bold':''" v-if="myrec.descr"
<q-item-label
lines="4"
:class="table === shared_consts.TABLES_MYBACHECAS ? 'text-bold' : ''"
v-if="myrec.descr"
>{{ myrec.descr }}<br />
</q-item-label>
<q-item-label lines="1" style="" class="text_user_city">
@@ -173,7 +202,12 @@
</div>
<div class="q-mx-sm">
(
<span v-if="table === shared_consts.TABLES_MYBACHECAS && tools.getNumPartecipantes(myrec) > 0">
<span
v-if="
table === shared_consts.TABLES_MYBACHECAS &&
tools.getNumPartecipantes(myrec) > 0
"
>
<span class="q-mx-xxs text-bold">{{
tools.getNumPartecipantes(myrec)
}}</span>
@@ -181,12 +215,16 @@
><q-icon dense color="blue" name="far fa-check-circle" />
</span>
</span>
<span class="q-mx-xxs">{{ myrec.numseen ? myrec.numseen : 0 }}</span>
<span class="q-mx-xxs">{{
myrec.numseen ? myrec.numseen : 0
}}</span>
<span class="q-mx-xxs"
><q-icon dense color="blue" name="far fa-eye" />
</span>
<span class="q-mx-xxs">&nbsp;</span>
<span class="" v-if="myrec">{{ myrec.numfav ? myrec.numfav : 0 }}</span>
<span class="" v-if="myrec">{{
myrec.numfav ? myrec.numfav : 0
}}</span>
<span class="q-mx-xxs"
><q-icon
dense

View File

@@ -427,4 +427,6 @@ export const costanti = {
TESTO_BORDATO: 5,
},
STATUSSKILL_ONLINE: 2,
}

View File

@@ -239,6 +239,12 @@ export const useGlobalStore = defineStore('GlobalStore', {
},
getStatusSkillIconById: (state: IGlobalState) => (id: number) => {
const ctrec = state.statusSkills.find((mystatus: IStatusSkill) => mystatus._id === id)
return (ctrec) ? ctrec.icon : ''
},
isNewVersionAvailable: (state: IGlobalState) => {
// console.log('cfgServer', cfgServer)
const serversrec = state.cfgServer.find((x) => (x.chiave === toolsext.SERVKEY_VERS) && (x.idapp === process.env.APP_ID))
@@ -297,7 +303,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
const userStore = useUserStore()
const messageStore = useMessageStore()
const notifStore = useNotifStore()
if (table === costanti.TABEVENTS)
return calendarStore.eventlist
@@ -386,7 +392,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
}
return []
}
else {
return ris
}
@@ -1524,7 +1530,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
const calendarStore = useCalendarStore()
const circuitStore = useCircuitStore()
const Products = useProducts()
// console.log('calendarStore: loadAfterLogin')
// Load local data
const showall = userStore.isAdmin || userStore.isManager ? '1' : '0'
@@ -1559,7 +1565,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
this.producers = (res.data.producers) ? [...res.data.producers] : []
this.storehouses = (res.data.storehouses) ? [...res.data.storehouses] : []
this.providers = (res.data.providers) ? [...res.data.providers] : []
Products.catprods = (res.data.catprods) ? [...res.data.catprods] : []
Products.catprods_gas = (res.data.catprods_gas) ? [...res.data.catprods_gas] : []
@@ -1595,7 +1601,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
Products.cart = { items: [], totalPrice: 0, totalQty: 0, userId: '' }
Products.orders = (res.data.orders) ? [...res.data.orders] : []
if (showall) {
this.newstosent = (res.data.newstosent) ? [...res.data.newstosent] : []
@@ -1664,8 +1670,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
},
getArrCardByProv(provstr: string): string[] {
getArrCardByProv(provstr: string): string[] {
const recprov = this.provinces.filter((rec: any) => rec.prov === provstr)
@@ -1924,7 +1930,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
}
if (table === 'cards') {
obj = {card: '', label: '[Nessuna]'}
obj = { card: '', label: '[Nessuna]' }
}
myarr = [obj, ...myarr]