- catalogo
- corretto logica del RefreshToken che non richiedeva il nuovo token, quindi scadeva tutte le volte, richiedendo sempre l'accesso !
This commit is contained in:
@@ -66,7 +66,6 @@ export default defineComponent({
|
||||
|
||||
const filter = ref(<IFilterCatalogo>{
|
||||
author: '',
|
||||
sort: 1,
|
||||
publisher: '',
|
||||
type: '',
|
||||
ageGroup: ''
|
||||
@@ -158,7 +157,14 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
|
||||
watch(() => filter.value.sort, (newval, oldval) => {
|
||||
watch(() => filter.value.sort_field, (newval, oldval) => {
|
||||
|
||||
calcArrProducts()
|
||||
if (tools.scrollTop() > 300) {
|
||||
tools.scrollToTopValue(300)
|
||||
}
|
||||
})
|
||||
watch(() => filter.value.sort_dir, (newval, oldval) => {
|
||||
|
||||
calcArrProducts()
|
||||
if (tools.scrollTop() > 300) {
|
||||
@@ -203,7 +209,9 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function calcArrProducts() {
|
||||
console.log('calcArrProducts')
|
||||
// console.log('calcArrProducts')
|
||||
|
||||
let arrargomstr: any = []
|
||||
|
||||
// eventuali titoli specifici estratti dall'array di Prodotti Selezionati
|
||||
//const searchtext = getSearchText()
|
||||
@@ -219,12 +227,19 @@ export default defineComponent({
|
||||
let boolfiltroVuotoProductTypes = (filtroProductTypes.length === 0 || (filtroProductTypes.length === 1 && (filtroProductTypes[0] === 0)))
|
||||
let boolfiltroVuotoExcludeProductTypes = filtroExcludeProductTypes.length === 0
|
||||
|
||||
let filtroPublishers = optcatalogo.value.Editore || []
|
||||
let filtroPublishers = optcatalogo.value.editore || []
|
||||
let boolfiltroVuotoEditore = (filtroPublishers.length === 0)
|
||||
|
||||
//console.log('filtroVersione', filtroProductTypes)
|
||||
|
||||
let catstr = cat.value || ''
|
||||
let catstr = ''
|
||||
|
||||
if (optcatalogo.value.argomenti) {
|
||||
// ha la priorità questo scelto sul catalogo
|
||||
arrargomstr = optcatalogo.value.argomenti
|
||||
} else {
|
||||
catstr = cat.value || ''
|
||||
}
|
||||
|
||||
let gasselstr = ''
|
||||
if (cosa.value === shared_consts.PROD.GAS) {
|
||||
@@ -240,6 +255,12 @@ export default defineComponent({
|
||||
if (product && product.productInfo) {
|
||||
let lowerName = (product.productInfo.name || '').toLowerCase();
|
||||
let hasCategoria = !catstr || (catstr && (product.productInfo.idCatProds || []).includes(catstr));
|
||||
let hasArgomentiCat = true
|
||||
if (arrargomstr && arrargomstr.length > 0) {
|
||||
hasArgomentiCat = (product.productInfo.idCatProds || []).some(idCat => arrargomstr.includes(idCat))
|
||||
hasCategoria = true
|
||||
}
|
||||
|
||||
let hasAuthor = !filtroAuthor || (filtroAuthor && (product.productInfo.idAuthors || []).includes(filtroAuthor));
|
||||
|
||||
let hasProductTypes = true
|
||||
@@ -253,7 +274,7 @@ export default defineComponent({
|
||||
hasProductTypes = !optcatalogo.value.productTypes || (optcatalogo.value.productTypes && (product.productInfo.productTypes || []).some((item: any) => optcatalogo.value.productTypes!.includes(item)))
|
||||
}
|
||||
if (optcatalogo.value && !boolfiltroVuotoEditore) {
|
||||
hasPublished = !optcatalogo.value.Editore || (optcatalogo.value.Editore && optcatalogo.value.Editore.includes(product.productInfo.idPublisher!))
|
||||
hasPublished = !optcatalogo.value.editore || (optcatalogo.value.editore && optcatalogo.value.editore.includes(product.productInfo.idPublisher!))
|
||||
}
|
||||
|
||||
if (optcatalogo.value && !boolfiltroVuotoExcludeProductTypes) {
|
||||
@@ -273,7 +294,7 @@ export default defineComponent({
|
||||
// Check if all words in lowerSearchText are present in lowerName
|
||||
let allWordsPresent = lowerSearchText.split(/\s+/).every(word => new RegExp(`\\b${word}\\b`, 'i').test(lowerName));
|
||||
|
||||
return (codeMatch.test(product.productInfo.code || '') || allWordsPresent) && hasCategoria && hasAuthor && productgassel && hasProductTypes && hasPublished && !hasExcludeProductTypes;
|
||||
return (codeMatch.test(product.productInfo.code || '') || allWordsPresent) && hasCategoria && hasArgomentiCat && hasAuthor && productgassel && hasProductTypes && hasPublished && !hasExcludeProductTypes;
|
||||
} else {
|
||||
console.error('product or product.productInfo is null');
|
||||
return false;
|
||||
@@ -281,7 +302,7 @@ export default defineComponent({
|
||||
});
|
||||
}
|
||||
|
||||
arrprod = getProductsSorted(arrprod, filter.value.sort);
|
||||
arrprod = getProductsSorted(arrprod, filter.value.sort_field, filter.value.sort_dir);
|
||||
|
||||
arrProducts.value = arrprod
|
||||
|
||||
@@ -346,6 +367,8 @@ export default defineComponent({
|
||||
|
||||
const searchtext = scheda.arrProdottiSpeciali
|
||||
|
||||
let arrargomstr: any = []
|
||||
|
||||
let arrprod = productStore.getProducts(cosa.value) || [];
|
||||
let filtroAuthor = filter.value.author || '';
|
||||
|
||||
@@ -359,7 +382,14 @@ export default defineComponent({
|
||||
|
||||
//console.log('filtroVersione', filtroProductTypes)
|
||||
|
||||
let catstr = cat.value || ''
|
||||
let catstr = ''
|
||||
|
||||
if (optcatalogo.value.argomenti) {
|
||||
// ha la priorità questo scelto sul catalogo
|
||||
arrargomstr = optcatalogo.value.argomenti
|
||||
} else {
|
||||
catstr = cat.value || ''
|
||||
}
|
||||
|
||||
let gasselstr = ''
|
||||
if (cosa.value === shared_consts.PROD.GAS) {
|
||||
@@ -376,6 +406,12 @@ export default defineComponent({
|
||||
let lowerCode = (product.productInfo.code || '').toLowerCase();
|
||||
|
||||
let hasCategoria = !catstr || (catstr && (product.productInfo.idCatProds || []).includes(catstr));
|
||||
let hasArgomentiCat = true
|
||||
if (arrargomstr && arrargomstr.length > 0) {
|
||||
hasArgomentiCat = (product.productInfo.idCatProds || []).some(idCat => arrargomstr.includes(idCat))
|
||||
hasCategoria = true
|
||||
}
|
||||
|
||||
let hasAuthor = !filtroAuthor || (filtroAuthor && (product.productInfo.idAuthors || []).includes(filtroAuthor));
|
||||
|
||||
// Check if ANY search term matches the product name or code
|
||||
@@ -408,47 +444,49 @@ export default defineComponent({
|
||||
hasExcludeProductTypes = !scheda.excludeproductTypes || (scheda.excludeproductTypes && (product.productInfo.productTypes || []).every((item: any) => scheda.excludeproductTypes!.includes(item)))
|
||||
}
|
||||
|
||||
return searchMatch && hasCategoria && hasAuthor && hasProductTypes && hasPublished && !hasExcludeProductTypes;
|
||||
return searchMatch && hasCategoria && hasArgomentiCat && hasAuthor && hasProductTypes && hasPublished && !hasExcludeProductTypes;
|
||||
} else {
|
||||
console.error('product or product.productInfo is null');
|
||||
return false;
|
||||
}
|
||||
})
|
||||
|
||||
arrprod = getProductsSorted(arrprod, scheda?.sort!);
|
||||
arrprod = getProductsSorted(arrprod, scheda?.sort_field!, scheda?.sort_dir!);
|
||||
|
||||
return arrprod
|
||||
|
||||
}
|
||||
|
||||
function getProductsSorted(arrprod: IProduct[], sort: number) {
|
||||
// console.log('getProductsSorted', sort)
|
||||
if (sort === costanti.SORT_PUBDATE) {
|
||||
function getProductsSorted(arrprod: IProduct[], sort_field: string, sort_dir: number): IProduct[] {
|
||||
if (sort_field) {
|
||||
// Crea una copia dell'array per non modificare l'originale
|
||||
const sortedArr = [...arrprod].sort((a: IProduct, b: IProduct) => {
|
||||
const valA = a.productInfo?.[sort_field];
|
||||
const valB = b.productInfo?.[sort_field];
|
||||
|
||||
arrprod = arrprod.sort((a: IProduct, b: IProduct) => {
|
||||
return b.productInfo.date_pub_ts - a.productInfo.date_pub_ts
|
||||
})
|
||||
} else if (sort === costanti.SORT_BESTSELLER) {
|
||||
if (valA === undefined || valB === undefined) {
|
||||
return 0; // Gestisce il caso in cui il campo non esiste
|
||||
}
|
||||
|
||||
arrprod = arrprod.sort((a: IProduct, b: IProduct) => {
|
||||
return b.productInfo.vLast6M! - a.productInfo.vLast6M!
|
||||
})
|
||||
|
||||
arrprod = arrprod.map((product, index) => {
|
||||
return {
|
||||
...product,
|
||||
indiceRanking: index + 1
|
||||
};
|
||||
})
|
||||
|
||||
console.log('arr', arrprod)
|
||||
|
||||
} else if (sort === costanti.SORT_DEFAULT) {
|
||||
if (typeof valA === 'number' && typeof valB === 'number') {
|
||||
return sort_dir === 1 ? valA - valB : valB - valA;
|
||||
} else {
|
||||
// Per stringhe o altri tipi
|
||||
const compA = valA.toString().toLowerCase();
|
||||
const compB = valB.toString().toLowerCase();
|
||||
return sort_dir === 1
|
||||
? compA.localeCompare(compB)
|
||||
: compB.localeCompare(compA);
|
||||
}
|
||||
});
|
||||
|
||||
return sortedArr.map((product, index) => ({
|
||||
...product,
|
||||
indiceRanking: index + 1
|
||||
}));
|
||||
}
|
||||
|
||||
return arrprod
|
||||
|
||||
return arrprod;
|
||||
}
|
||||
|
||||
function addNextProductToTheView(arrproductfiltrati: IProduct[], indprod: number) {
|
||||
@@ -518,8 +556,8 @@ export default defineComponent({
|
||||
arrProdFiltrati = getProductsFilteredByScheda(recscheda.scheda)
|
||||
indprod = 0
|
||||
} else {
|
||||
if (recscheda.scheda?.sort! > 0) {
|
||||
arrProdFiltrati = getProductsSorted(arrGeneraleProdotti, recscheda.scheda.sort!);
|
||||
if (recscheda.scheda?.sort_field!) {
|
||||
arrProdFiltrati = getProductsSorted(arrGeneraleProdotti, recscheda.scheda.sort_field!, recscheda.scheda.sort_dir!);
|
||||
indprod = 0
|
||||
} else {
|
||||
indprod = indprodGenerale
|
||||
@@ -577,7 +615,7 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
console.log('Fine...')
|
||||
// console.log('Fine...')
|
||||
}
|
||||
|
||||
function getNextProd() {
|
||||
@@ -610,7 +648,7 @@ export default defineComponent({
|
||||
}*/
|
||||
|
||||
async function mounted() {
|
||||
console.log('mounted Catalogo')
|
||||
// console.log('mounted Catalogo')
|
||||
loadpage.value = false
|
||||
await productStore.loadProducts()
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
<!--<q-select
|
||||
v-model="filter.publisher"
|
||||
:options="publishers"
|
||||
label="Editore"
|
||||
label="editore"
|
||||
placeholder="Tutti"
|
||||
dense
|
||||
/>
|
||||
@@ -159,9 +159,9 @@
|
||||
|
||||
<div class="row justify-center q-mx-auto">
|
||||
<q-select
|
||||
v-model="filter.sort"
|
||||
v-model="filter.sort_field"
|
||||
dense
|
||||
:options="shared_consts.ORDINAMENTO_CATALOGHI"
|
||||
:options="shared_consts.ORDINAMENTO_CATALOGHI_PUBBLICO"
|
||||
label="Ordinamento"
|
||||
placeholder=""
|
||||
emit-value
|
||||
@@ -169,6 +169,17 @@
|
||||
filled
|
||||
rounded
|
||||
></q-select>
|
||||
<q-select
|
||||
v-model="filter.sort_dir"
|
||||
dense
|
||||
:options="shared_consts.ORDINAMENTO_DIREZIONE"
|
||||
label="Direzione"
|
||||
placeholder=""
|
||||
emit-value
|
||||
map-options
|
||||
filled
|
||||
rounded
|
||||
></q-select>
|
||||
</div>
|
||||
|
||||
<div class="text-center q-py-sm prod_trov">
|
||||
@@ -479,17 +490,22 @@
|
||||
|
||||
2. Eseguire "IMPORTA DESCRIZIONI E LINK DA SITO GRUPPOMACRO (XML)" - importa_descrizioni_e_link.xml
|
||||
|
||||
3. Visualizza <a
|
||||
3. Visualizza
|
||||
<a
|
||||
href="http://vps-88271abb.vps.ovh.net/apimacro/public/view-articles-fatturati"
|
||||
target="_blank"
|
||||
>Ranking</a> -
|
||||
<a
|
||||
href="http://vps-88271abb.vps.ovh.net/apimacro/public/view-articles-sales"
|
||||
target="_blank"
|
||||
>Ranking</a
|
||||
> e controlla se tutto ok
|
||||
>(Ranking Ordini)</a>
|
||||
e controlla se tutto ok
|
||||
|
||||
4. Esporta il file del Ranking ed importarlo con "IMPORTA RANKING DA JSON"
|
||||
<a
|
||||
href="http://vps-88271abb.vps.ovh.net/apimacro/public/export-articles-sales-json"
|
||||
target="_blank"
|
||||
>Esporta Ranking</a
|
||||
>(Esporta Ranking Venduti e Fatturati)</a
|
||||
>
|
||||
|
||||
5. Scarica Catalogo (<a
|
||||
@@ -516,12 +532,6 @@
|
||||
>Struttura Campi GM</a
|
||||
>
|
||||
|
||||
<a
|
||||
href="http://vps-88271abb.vps.ovh.net/apimacro/public/view-articles-sales"
|
||||
target="_blank"
|
||||
>Visualizza Descrizioni</a
|
||||
>
|
||||
|
||||
<a
|
||||
href="https://www.fioredellavita.it/wp-admin/admin.php?page=webappick-manage-feeds"
|
||||
target="_blank"
|
||||
|
||||
@@ -115,6 +115,13 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
|
||||
function getParamCircuitsToView() {
|
||||
return {
|
||||
'circuit.name': 1,
|
||||
'circuit._id': 1,
|
||||
}
|
||||
}
|
||||
|
||||
function loadAccount() {
|
||||
// console.log('loadAccount')
|
||||
account.value = circuit.value ? userStore.getAccountByCircuitId(circuit.value._id) : null
|
||||
@@ -148,6 +155,10 @@ export default defineComponent({
|
||||
notifStore.setAsRead(idnotif.value)
|
||||
users_in_circuit.value = data.users_in_circuit
|
||||
circuit.value = data.circuit
|
||||
|
||||
if (circuit.value!.circuitoIndipendente) {
|
||||
showrules.value = true
|
||||
}
|
||||
} else {
|
||||
circuit.value = null
|
||||
users_in_circuit.value = []
|
||||
@@ -204,7 +215,9 @@ export default defineComponent({
|
||||
name: 1,
|
||||
surname: 1,
|
||||
date_reg: 1,
|
||||
profile: 1, idapp: 1, 'circuit.name': 1, 'circuit._id': 1
|
||||
profile: 1,
|
||||
idapp: 1,
|
||||
...getParamCircuitsToView(),
|
||||
}
|
||||
|
||||
},
|
||||
@@ -279,7 +292,7 @@ export default defineComponent({
|
||||
verified_by_aportador: 1,
|
||||
admins: 1,
|
||||
idapp: 1,
|
||||
'circuit.name': 1, 'circuit._id': 1
|
||||
...getParamCircuitsToView(),
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -43,17 +43,19 @@
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="inset-shadow">
|
||||
<q-card-section v-if="circuit.symbol === 'RIS'" class="inset-shadow">
|
||||
<div v-html="t('circuit.disclaimer')"></div>
|
||||
</q-card-section>
|
||||
<q-card-section class="inset-shadow">
|
||||
<div style="font-weight: bold; font-size: 1.25rem">
|
||||
Regolamento:
|
||||
{{ t('circuit.regulation') }} {{ circuit.name }}
|
||||
</div>
|
||||
<q-btn
|
||||
v-if="!showrules"
|
||||
label="vedi Regolamento"
|
||||
@click="showrules = !showrules"
|
||||
></q-btn>
|
||||
<br />
|
||||
<div
|
||||
v-if="showrules && circuit"
|
||||
v-html="getRegulation(circuit.regulation)"
|
||||
@@ -72,7 +74,7 @@
|
||||
userStore.my.username,
|
||||
circuit.name,
|
||||
true,
|
||||
groupnameSel ? groupnameSel.groupname : ''
|
||||
groupnameSel ? groupnameSel.groupname : '',
|
||||
);
|
||||
"
|
||||
/>
|
||||
@@ -113,11 +115,12 @@
|
||||
v-close-popup
|
||||
v-if="true"
|
||||
@click="
|
||||
saldo !== 0
|
||||
saldo < 0
|
||||
? tools.showNegativeNotif(
|
||||
$q,
|
||||
t(
|
||||
'circuit.per_uscire_dal_circuito_occorre_essere_a_zero'
|
||||
'circuit.per_uscire_dal_circuito_occorre_essere_a_zero',
|
||||
{ symbol: circuit.symbol }
|
||||
),
|
||||
30000
|
||||
)
|
||||
@@ -179,7 +182,7 @@
|
||||
to="/circuits"
|
||||
round
|
||||
icon="fas fa-arrow-circle-left"
|
||||
style="position: absolute;"
|
||||
style="position: absolute"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@@ -215,7 +218,7 @@
|
||||
rounded
|
||||
dense
|
||||
color="green"
|
||||
style="height: 40px;"
|
||||
style="height: 40px"
|
||||
icon="fas fa-redo"
|
||||
class="q-mx-sm"
|
||||
@click="aggiornaSaldo()"
|
||||
@@ -336,7 +339,7 @@
|
||||
v-if="userStore.IsMyCircuitByName(circuit.name)"
|
||||
:label="t('circuit.movements_made')"
|
||||
@click="showMov = !showMov"
|
||||
icon="img: images/1ris_rosso_100.png"
|
||||
:icon="tools.getSymbolByCircuit(circuit) === 'RIS' ? 'img: images/1ris_rosso_100.png' : undefined"
|
||||
rounded
|
||||
color="primary"
|
||||
></q-btn>
|
||||
@@ -394,6 +397,7 @@
|
||||
v-if="
|
||||
userStore.my.profile &&
|
||||
userStore.my.profile.calc &&
|
||||
!circuit.circuitoIndipendente &&
|
||||
userStore.my.profile.calc.numGoodsAndServices <= 0 &&
|
||||
globalStore.site.confpages.showRIS &&
|
||||
userStore.IsMyCircuitByName(circuit.name)
|
||||
@@ -414,6 +418,7 @@
|
||||
<q-banner
|
||||
v-else-if="
|
||||
globalStore.site.confpages.showRIS &&
|
||||
!circuit.circuitoIndipendente &&
|
||||
userStore.my.profile.calc &&
|
||||
userStore.my.profile.calc.numGoodsAndServices <= 0
|
||||
"
|
||||
@@ -442,14 +447,22 @@
|
||||
!userStore.IsMyCircuitByName(circuit.name) &&
|
||||
!userStore.IsAskedCircuitByName(circuit.name) &&
|
||||
!userStore.IsRefusedCircuitByName(circuit.name) &&
|
||||
(!circuitStore.isCircuitNational(circuit.name) ||
|
||||
(circuit.circuitoIndipendente ||
|
||||
!circuitStore.isCircuitNational(circuit.name) ||
|
||||
(circuitStore.isCircuitNational(circuit.name) &&
|
||||
circuitStore.SonoDentroAdAlmeno1CircuitoConFido()))
|
||||
"
|
||||
:disable="circuitStore.IsNationalAndNotEnterInLocal(circuit.name)"
|
||||
:disable="
|
||||
!circuit.circuitoIndipendente &&
|
||||
circuitStore.IsNationalAndNotEnterInLocal(circuit.name)
|
||||
"
|
||||
icon="fas fa-user-plus"
|
||||
color="primary"
|
||||
:label="$t('circuit.ask')"
|
||||
:label="
|
||||
circuit.askManagerToEnter
|
||||
? $t('circuit.ask')
|
||||
: $t('circuit.enter')
|
||||
"
|
||||
@click="
|
||||
requestToEnterCircuit = true;
|
||||
groupnameSel = null;
|
||||
@@ -740,7 +753,7 @@
|
||||
<q-separator />
|
||||
|
||||
<q-card-section>
|
||||
<div class="text-h8 q-mb-sm">
|
||||
<div v-if="tools.getSymbolByCircuit(circuit) === 'RIS'" class="text-h8 q-mb-sm">
|
||||
<div v-html="$t('circuit.aggiuntive')"></div>
|
||||
</div>
|
||||
<q-card-section>
|
||||
@@ -838,6 +851,7 @@
|
||||
<div :class="$q.screen.lt.sm ? '' : 'row'">
|
||||
<div class="sezioni">
|
||||
<CCurrencyValue
|
||||
v-if="!circuit.ignoreLimits"
|
||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||
:color="tools.getColorByCircuit(circuit)"
|
||||
color_border="red"
|
||||
@@ -849,6 +863,7 @@
|
||||
</div>
|
||||
<div class="sezioni">
|
||||
<CCurrencyValue
|
||||
v-if="!circuit.ignoreLimits"
|
||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||
:color="tools.getColorByCircuit(circuit)"
|
||||
color_border="green"
|
||||
@@ -857,6 +872,16 @@
|
||||
:label="t('circuit.qta_max_default')"
|
||||
:tips="t('circuit.qta_max_default_tips')"
|
||||
></CCurrencyValue>
|
||||
<CCurrencyValue
|
||||
v-if="circuit.creditodiPartenza > 0"
|
||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||
:color="tools.getColorByCircuit(circuit)"
|
||||
color_border="blue"
|
||||
v-model="circuit.creditodiPartenza"
|
||||
icon="fas fa-battery-quarter"
|
||||
:label="t('circuit.creditodiPartenza')"
|
||||
:tips="t('circuit.creditodiPartenza_tips')"
|
||||
></CCurrencyValue>
|
||||
</div>
|
||||
<!--<div v-if="circuit.qta_max_default_grp" class="sezioni">
|
||||
<CCurrencyValue
|
||||
@@ -884,7 +909,7 @@
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
<div class="sezioni">
|
||||
<div v-if="circuit.totTransato" class="sezioni">
|
||||
<q-icon name="fas fa-stats" class="iconcirc"></q-icon>
|
||||
{{ t('circuit.stats') }}:
|
||||
<br />
|
||||
@@ -949,13 +974,14 @@
|
||||
|
||||
<q-card v-if="circuit.name">
|
||||
<q-card-section>
|
||||
<div class="text-h8">{{ t('circuit.regulation') }}:</div>
|
||||
<div class="text-h8">{{ t('circuit.regulation') }} {{ circuit.name }}: </div>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
|
||||
<q-card-section>
|
||||
<div class="centermydiv">
|
||||
<q-btn
|
||||
v-if="!showrules"
|
||||
label="vedi Regolamento"
|
||||
@click="showrules = !showrules"
|
||||
></q-btn>
|
||||
|
||||
@@ -25,6 +25,8 @@ export default defineComponent({
|
||||
|
||||
const filter = ref(costanti.MY_CIRCUITS)
|
||||
|
||||
const ind = ref(0)
|
||||
|
||||
const isfinishLoading = computed(() => globalStore.finishLoading)
|
||||
|
||||
function mounted() {
|
||||
@@ -32,6 +34,9 @@ export default defineComponent({
|
||||
if (userStore.my.profile.mycircuits.length <= 0) {
|
||||
filter.value = costanti.FIND_CIRCUIT
|
||||
}
|
||||
|
||||
ind.value = tools.getIndMainCardsByTable(shared_consts.TABLES_CIRCUITS)
|
||||
|
||||
// const filt_loaded = tools.getCookie(tools.COOK_SEARCH + tools.CIRCUIT_SEARCH, costanti.FIND_CIRCUIT, true)
|
||||
// console.log('filt_loaded', filt_loaded)
|
||||
// filter.value = filt_loaded ? filt_loaded : costanti.FIND_CIRCUIT
|
||||
@@ -51,6 +56,7 @@ export default defineComponent({
|
||||
toolsext,
|
||||
isfinishLoading,
|
||||
tools,
|
||||
ind,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -5,11 +5,12 @@
|
||||
|
||||
<CMyCircuits v-model="filter" :finder="true" :showfinder="true" :showBarSelection="true">
|
||||
<CFinder
|
||||
:ind="tools.getIndMainCardsByTable(shared_consts.TABLES_CIRCUITS)"
|
||||
:ind="ind"
|
||||
:table="shared_consts.TABLES_CIRCUITS"
|
||||
:noButtAdd="!tools.isManager()"
|
||||
:showFilterPersonal="true"
|
||||
:showBarSelection="false"
|
||||
:labelBtnAddExtra="(ind >= 0 && tools.isManager()) ? `Aggiungi ` + costanti.MAINCARDS[ind].strsingolo : ''"
|
||||
/>
|
||||
</CMyCircuits>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user