Aggiornamento APP RISO:

 Inviando i RIS, deve comparire prima il Circuito della Provincia, e poi quello Nazionale
 Risolto problema per vecchie registrazioni, la provincia compariva "undefined".
This commit is contained in:
Surya Paolo
2024-06-19 00:21:06 +02:00
parent 2d9c178c1f
commit 49d51712bd
155 changed files with 2510 additions and 5296 deletions

View File

@@ -546,6 +546,11 @@
color="primary"
@click="EseguiFunz('createAllCircuits', '', '')"
></q-btn>
<br /><q-btn
label="Correggi i Circuiti (togli i null)"
color="primary"
@click="EseguiFunz('correggiCircuitiANull', '', '')"
></q-btn>
<br />
</div>
<div class="row">

View File

@@ -67,6 +67,12 @@ export default defineComponent({
return lab
})
const getlist = computed(() => {
const mylist = searchList.value.find((rec: any) => rec.table === 'products')
return mylist
})
const arrLoaded = computed(() => {
if (arrProducts.value && numRecLoaded.value)
@@ -88,6 +94,12 @@ export default defineComponent({
};
watch(() => cat.value, (newval, oldval) => {
if (cat.value) {
filter.value.author = '' // disattivo il filtro autore
search.value = '' // disattivo anche la ricerca per testo
}
calcArrProducts()
})
@@ -103,6 +115,12 @@ export default defineComponent({
})
watch(() => filter.value.author, (newval, oldval) => {
// Se filtroAuthor attivato, allora evito il filtro per Categoria
if (filter.value.author) {
cat.value = '' // disattivo il filtro categoria
search.value = '' // disattivo anche la ricerca per testo
}
calcArrProducts()
if (tools.scrollTop() > 300) {
tools.scrollToTopValue(300)
@@ -121,8 +139,10 @@ export default defineComponent({
refreshpage.value = true
let arrprod = productStore.getProducts(cosa.value) || [];
let catstr = cat.value || '';
let filtroAuthor = filter.value.author || '';
let catstr = cat.value || '';
let gasselstr = ''
if (cosa.value === shared_consts.PROD.GAS) {
gasselstr = idGasSel.value || '';
@@ -281,8 +301,8 @@ export default defineComponent({
console.log('REFRR searchval', newval, table, 'tablesel', tablesel)
if (newval === '') {
search.value = ''
} else {
search.value = newval.name
} else {
search.value = newval.name
}
}

View File

@@ -30,6 +30,7 @@ export default defineComponent({
const cosa = ref(0)
const cat = ref('')
const subcat = ref('')
const idGasSel = ref('')
const loadpage = ref(false)
const refreshpage = ref(false)
@@ -68,6 +69,10 @@ export default defineComponent({
calcArrProducts()
})
watch(() => subcat.value, (newval, oldval) => {
calcArrProducts()
})
watch(() => idGasSel.value, (newval, oldval) => {
calcArrProducts()
})
@@ -81,8 +86,11 @@ export default defineComponent({
watch(() => cosa.value, (newval, oldval) => {
tools.setCookie(tools.COOK_COSA_PRODOTTI, cosa.value.toString())
if (cosa.value !== shared_consts.PROD.TUTTI)
if (cosa.value !== shared_consts.PROD.TUTTI) {
cat.value = ''
subcat.value = ''
}
calcArrProducts()
})
@@ -92,19 +100,21 @@ export default defineComponent({
refreshpage.value = true
let arrprod = productStore.getProducts(cosa.value)
let catstr = cat.value;
let subcatstr = subcat.value;
let gasselstr = ''
if (cosa.value === shared_consts.PROD.GAS) {
gasselstr = idGasSel.value
}
let lowerSearchText = search.value.toLowerCase().trim();
if ((!lowerSearchText || (lowerSearchText && lowerSearchText.length < 2)) && !catstr && (!gasselstr && (cosa.value !== shared_consts.PROD.GAS))) {
if ((!lowerSearchText || (lowerSearchText && lowerSearchText.length < 2)) && !catstr && !subcatstr && (!gasselstr && (cosa.value !== shared_consts.PROD.GAS))) {
} else {
arrprod = arrprod.filter((product: IProduct) => {
if (product && product.productInfo) {
if (product && product.productInfo && !!product.productInfo.name) {
let lowerName = product.productInfo.name!.toLowerCase();
let hasCategoria = !catstr || (catstr && product.productInfo.idCatProds?.includes(catstr));
let hasSubCategoria = !subcatstr || (subcatstr && product.productInfo.idSubCatProds?.includes(subcatstr));
let productgassel = true
if (gasselstr || (cosa.value === shared_consts.PROD.GAS)) {
@@ -118,7 +128,7 @@ export default defineComponent({
// Check if any word in lowerName starts with lowerSearchText
let anyWordStartsWithSearch = lowerName.split(/\s+/).some(word => nameMatch.test(word));
return (codeMatch.test(product.productInfo.code!) || anyWordStartsWithSearch) && hasCategoria && productgassel;
return (codeMatch.test(product.productInfo.code!) || anyWordStartsWithSearch) && hasCategoria && hasSubCategoria && productgassel;
}
});
}
@@ -171,9 +181,36 @@ export default defineComponent({
function getCatProds() {
let arrcat = productStore.getCatProds(cosa.value)
let riscat: any = [{ label: 'Tutti', value: '', icon: undefined, color: undefined }]
for (const rec of arrcat) {
riscat.push({ label: rec.name, value: rec._id, icon: rec.icon, color: rec.color })
let riscat: any = []
if (arrcat && arrcat.length > 0) {
riscat = [{ label: 'Tutti', value: '', icon: undefined, color: undefined }]
for (const rec of arrcat) {
riscat.push({ label: rec.name, value: rec._id, icon: rec.icon, color: rec.color })
}
}
return riscat
}
function getCatProdsByGas(idGasOrdine: string): any {
let arrcat = productStore.getCatProdsByGas(idGasOrdine)
let riscat: any = []
if (arrcat && arrcat.length > 0) {
riscat = [{ label: 'Tutti', value: '', icon: undefined, color: undefined }]
for (const rec of arrcat) {
riscat.push({ label: rec.name, value: rec._id, icon: rec.icon, color: rec.color })
}
}
return riscat
}
function getSubCatProdsByGas(idGasOrdine: string, idCatProd: string): any {
let arrcat = productStore.getSubCatProdsByGas(idGasOrdine, idCatProd)
let riscat: any = []
if (arrcat && arrcat.length > 0) {
riscat = [{ label: 'Tutti', value: '', icon: undefined, color: undefined }]
for (const rec of arrcat) {
riscat.push({ label: rec.name, value: rec._id, icon: rec.icon, color: rec.color })
}
}
return riscat
@@ -210,7 +247,9 @@ export default defineComponent({
cosa,
shared_consts,
getCatProds,
getCatProdsByGas,
cat,
subcat,
idGasSel,
productStore,
t,
@@ -223,6 +262,7 @@ export default defineComponent({
onLoadScroll,
numRecLoaded,
arrLoaded,
getSubCatProdsByGas,
}
}
})

View File

@@ -96,19 +96,65 @@
<div class="text-center text-h6 text-red">Ordini Attivi:</div>
</div>
<div class="row q-gutter-xs justify-center q-mx-auto">
<div v-for="(recgas, index) in productStore.getGasordinesActives()" :key="index">
<div
v-for="(recgas, index) in productStore.getGasordinesActives()"
:key="index"
>
<q-btn
push
dense
:size="tools.isMobile() ? '0.9rem' : '1.05rem'"
:color="idGasSel === recgas._id ? 'primary' : undefined"
:text-color="idGasSel === recgas._id ? 'white' : 'black'"
:text-color="idGasSel === recgas._id ? 'white' : 'black'"
:label="recgas.name"
@click="idGasSel = recgas._id"
>
</q-btn>
</div>
</div>
<div class="row q-gutter-xs justify-center q-mx-auto">
<div
v-for="(reccat, index) in getCatProdsByGas(idGasSel)"
:key="index"
>
<q-btn
:push="cat === reccat.value"
dense
:size="tools.isMobile() ? '0.70rem' : '0.85rem'"
:icon="reccat.icon ? reccat.icon : undefined"
:color="cat === reccat.value ? 'primary' : undefined"
:text-color="cat === reccat.value ? 'white' : 'black'"
rounded
:label="reccat.label"
@click="cat = reccat.value"
>
</q-btn>
</div>
</div>
<q-separator class="q-ma-md">&nbsp;</q-separator>
<div
v-if="getSubCatProdsByGas(idGasSel, cat)"
class="row q-gutter-xs justify-center q-mx-auto"
>
<div
v-for="(recsubcat, index) in getSubCatProdsByGas(idGasSel, cat)"
:key="index"
>
<q-btn
:push="subcat === recsubcat.value"
dense
:size="tools.isMobile() ? '0.70rem' : '0.85rem'"
:icon="recsubcat.icon ? recsubcat.icon : undefined"
:color="subcat === recsubcat.value ? 'positive' : undefined"
:text-color="subcat === recsubcat.value ? 'white' : 'blue'"
rounded
:label="recsubcat.label"
@click="subcat = recsubcat.value"
>
</q-btn>
</div>
</div>
<div class="text-center q-py-sm prod_trov">
<span
v-show="productStore.getNumProdTot() !== arrProducts.length"

View File

@@ -4,8 +4,8 @@
<CNotifAtTop />
<CMyCircuits v-model="filter" :finder="true" :showfinder="true" :showBarSelection="true">
<CFinder
:ind="tools.getIndMainCardsByTable(toolsext.TABCIRCUITS)"
:table="toolsext.TABCIRCUITS"
:ind="tools.getIndMainCardsByTable(shared_consts.TABLES_CIRCUITS)"
:table="shared_consts.TABLES_CIRCUITS"
:noButtAdd="!tools.isManager()"
:showFilterPersonal="true"
:showBarSelection="true"

View File

@@ -9,6 +9,7 @@ import { CMyFieldRec } from '@/components/CMyFieldRec'
import { CSkill } from '@/components/CSkill'
import { CDateTime } from '@/components/CDateTime'
import { CInfoAccount } from '@/components/CInfoAccount'
import { CSendCoins } from '@/components/CSendCoins'
import { tools } from '@store/Modules/tools'
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
import { useUserStore } from '@store/UserStore'
@@ -29,7 +30,8 @@ export default defineComponent({
name: 'mygroup',
components: {
CProfile, CTitleBanner, CMyFieldRec,
CInfoAccount, CSkill, CDateTime, CMyFriends, CGridTableRec, CMyUser, CCheckIfIsLogged, CNotifAtTop
CInfoAccount, CSkill, CDateTime, CMyFriends, CGridTableRec, CMyUser, CCheckIfIsLogged,
CNotifAtTop, CSendCoins
},
props: {},
setup() {
@@ -48,6 +50,8 @@ export default defineComponent({
const filtroutente = ref(<any[]>[])
const showPic = ref(false)
const showsendCoinTo = ref(false)
const tabcircuit = ref('info')
const mygrp = ref(<IMyGroup | null>{})
@@ -268,6 +272,7 @@ export default defineComponent({
circuitslistOpt,
filtroeventsgroup,
getlinkpage,
showsendCoinTo,
}
}
})

View File

@@ -36,7 +36,9 @@
<div
v-if="mygrp.title !== mygrp.groupname"
class="col-12 text-h7 text-blue text-shadow-2"
>{{ mygrp.groupname }}</div>
>
{{ mygrp.groupname }}
</div>
<q-banner
v-if="userStore.IsRefusedGroupByGroupname(mygrp.groupname)"
@@ -48,6 +50,18 @@
<br />
</q-banner>
<q-btn
v-if="circuitslistOpt.length > 0"
icon="fas fa-coins"
color="green"
size="md"
:label="t('circuit.sendcoins')"
dense
rounded
@click="showsendCoinTo = true"
>
</q-btn>
<div>
<q-btn
v-if="
@@ -93,9 +107,7 @@
<q-icon color="negative" name="fas fa-user-minus" />
</q-item-section>
<q-item-section>
{{
$t('groups.exit_group')
}}
{{ $t('groups.exit_group') }}
</q-item-section>
</q-item>
@@ -123,9 +135,7 @@
<q-icon color="negative" name="fas fa-trash-alt" />
</q-item-section>
<q-item-section>
{{
$t('groups.delete_group')
}}
{{ $t('groups.delete_group') }}
</q-item-section>
</q-item>
</q-list>
@@ -165,7 +175,10 @@
</div>
</div>
<div v-if="mygrp.descr" class="no-wrap justify-evenly items-center content-start">
<div
v-if="mygrp.descr"
class="no-wrap justify-evenly items-center content-start"
>
<!--
<q-btn
v-if="tools.iAmAdminGroup(groupname)" icon="fas fa-pencil-alt"
@@ -177,7 +190,11 @@
-->
<q-tabs v-model="tabgrp" class="text-blue">
<q-tab :label="t('shared.info1')" name="info" icon="fas fa-info"></q-tab>
<q-tab
:label="t('shared.info1')"
name="info"
icon="fas fa-info"
></q-tab>
<q-tab
v-if="
tools.iCanShowGroupsMember(mygrp) ||
@@ -196,7 +213,11 @@
name="circuits"
icon="fas fa-coins"
></q-tab>
<q-tab :label="t('groups.events')" name="events" icon="fas fa-bullhorn"></q-tab>
<q-tab
:label="t('groups.events')"
name="events"
icon="fas fa-bullhorn"
></q-tab>
</q-tabs>
<q-tab-panels v-model="tabgrp" animated>
@@ -223,7 +244,7 @@
v-if="
!!mygrp.date_updated &&
tools.getstrshortDate(mygrp.date_updated) !==
tools.getstrshortDate(mygrp.createdBy)
tools.getstrshortDate(mygrp.createdBy)
"
class="element"
>
@@ -247,7 +268,9 @@
<q-icon name="fas fa-lock"></q-icon>
</div>
<div>
<div class="title_param">{{ $t('groups.private') }}</div>
<div class="title_param">
{{ $t('groups.private') }}
</div>
{{ $t('groups.private_descr') }}
</div>
</div>
@@ -275,10 +298,9 @@
</div>
<div>
<div class="title_param">
<div
v-for="(city, index) of cities"
:key="index"
>{{ city.comune }} ({{ city.prov }})</div>
<div v-for="(city, index) of cities" :key="index">
{{ city.comune }} ({{ city.prov }})
</div>
</div>
</div>
</div>
@@ -477,8 +499,16 @@
class="text-blue"
no-caps
>
<q-tab :label="t('shared.info1')" name="info" icon="fas fa-info"></q-tab>
<q-tab :label="t('circuit.movements')" name="mov" icon="fas fa-coins"></q-tab>
<q-tab
:label="t('shared.info1')"
name="info"
icon="fas fa-info"
></q-tab>
<q-tab
:label="t('circuit.movements')"
name="mov"
icon="fas fa-coins"
></q-tab>
</q-tabs>
</q-tab-panel>
<q-tab-panel name="events"></q-tab-panel>
@@ -619,13 +649,23 @@
></CGridTableRec>
</div>
</div>
<div v-else class="fit column no-wrap justify-evenly items-center content-start">
<q-skeleton type="QAvatar" size="140px" height="140px" animation="fade" />
<div
v-else
class="fit column no-wrap justify-evenly items-center content-start"
>
<q-skeleton
type="QAvatar"
size="140px"
height="140px"
animation="fade"
/>
<q-card flat bordered style="width: 250px">
<div class="text-h6">
<q-skeleton :animation="animation" />
</div>
<div class="col-12 text-h7 text-grey text-center">{{ groupname }}</div>
<div class="col-12 text-h7 text-grey text-center">
{{ groupname }}
</div>
<div class="col-12 text-h7">
<q-skeleton :animation="animation" />
</div>
@@ -647,12 +687,23 @@
</q-dialog>
</div>
</div>
<div v-if="showsendCoinTo">
<CSendCoins
:showprop="showsendCoinTo"
:to_group="mygrp"
circuitname=""
@close="showsendCoinTo = false"
>
</CSendCoins>
</div>
</template>
<script lang="ts" src="./mygroup.ts">
</script>
<style lang="scss" scoped>
@import "./mygroup.scss";
@import './mygroup.scss';
</style>

View File

@@ -17,8 +17,8 @@
<CMyGroups v-model="filter" :finder="true">
<CFinder
:ind="tools.getIndMainCardsByTable(toolsext.TABMYGROUPS)"
:table="toolsext.TABMYGROUPS"
:ind="tools.getIndMainCardsByTable(shared_consts.TABLES_MYGROUPS)"
:table="shared_consts.TABLES_MYGROUPS"
:showFilterPersonal="true"
/>

View File

@@ -4,7 +4,7 @@
sizes="max-height: 120px" styleadd="bottom: -20px !important;">
<CMyCardService
:table="toolsext.TABMYBACHECAS"
:table="shared_consts.TABLES_MYBACHECAS"
:nopopup="true"
:idRec="idBacheca"
>
@@ -16,7 +16,7 @@
<!-- <CMyCardPopup
v-if="!!idBacheca"
:table="toolsext.TABMYBACHECAS"
:table="shared_consts.TABLES_MYBACHECAS"
:nopopup="true"
:idRec="idBacheca">

View File

@@ -7,7 +7,7 @@
>
<CMyCardService
v-if="idGood"
:table="toolsext.TABMYGOODS"
:table="shared_consts.TABLES_MYGOODS"
:nopopup="true"
:idRec="idGood"
>

View File

@@ -5,7 +5,7 @@
<CMyCardService
v-if="!!idHosp"
:table="toolsext.TABMYHOSPS"
:table="shared_consts.TABLES_MYHOSPS"
:nopopup="true"
:idRec="idHosp">

View File

@@ -35,7 +35,7 @@ export default defineComponent({
const animation = ref('fade')
const table = ref(toolsext.TABMYSKILLS)
const table = ref(shared_consts.TABLES_MYSKILLS)
const idSkill = computed(() => $route.params.idSkill ? $route.params.idSkill.toString() : '')

View File

@@ -7,7 +7,7 @@
>
<CMyCardService
v-if="idSkill"
:table="toolsext.TABMYSKILLS"
:table="shared_consts.TABLES_MYSKILLS"
:nopopup="true"
:idRec="idSkill"
>