- Il circuito viene creato in automatico, quando scegli una provincia.

This commit is contained in:
Surya Paolo
2023-03-21 18:12:06 +01:00
parent de937c73f7
commit 59af1d0b8b
19 changed files with 76 additions and 112 deletions

View File

@@ -86,6 +86,7 @@ export default defineComponent({
const cities = ref([] as ICity[])
watch(() => path.value, (to: any, from: any) => {
loadCircuit()
})
@@ -402,7 +403,7 @@ export default defineComponent({
myid: circuit.value ? circuit.value._id : '',
}
}
function extraparams_refused_groups() {
function extraparams_refused_groups() {
return {
querytype: shared_consts.QUERYTYPE_REFUSED_GROUP_CIRCUIT,
myid: circuit.value ? circuit.value._id : '',
@@ -421,6 +422,17 @@ function extraparams_refused_groups() {
return (circuit.value && circuit.value.admins) ? circuit.value.admins.map((rec) => rec.username).join(', ') : ''
}
function getRegulation(reg: string) {
let strreg = reg + ''
if (!reg) {
const mystringa = t('circuit.regolamento', {nomecircuito: circuit.value!.name})
return mystringa
} else {
return reg
}
}
onMounted(mounted)
return {
@@ -481,6 +493,7 @@ function extraparams_refused_groups() {
loadCircuit,
extraparams_rich_groups,
extraparams_refused_groups,
getRegulation,
}
}
})

View File

@@ -773,8 +773,8 @@
</div>
<div class="col-12 text-h7">
<span
v-if="checkifShow('descr') && showrules"
v-html="circuit.regulation"
v-if="checkifShow('descr') && showrules && circuit"
v-html="getRegulation(circuit.regulation)"
></span>
</div>
</q-card-section>
@@ -1029,7 +1029,7 @@
</div>
<q-btn label="vedi Regolamento" @click="showrules = !showrules">
</q-btn>
<div v-if="showrules" v-html="circuit.regulation"></div>
<div v-if="showrules && circuit" v-html="getRegulation(circuit.regulation)"></div>
</q-card-section>
<q-card-actions align="center">
<q-btn

View File

@@ -45,9 +45,9 @@ export default defineComponent({
{
label: 'Provincia',
table: 'provinces',
key: 'idProvince',
key: 'profile.resid_province',
type: costanti.FieldType.select,
value: tools.getCookie(tools.COOK_SEARCH + 'provinces', costanti.FILTER_TUTTI),
value: tools.getCookie(tools.COOK_SEARCH + 'resid_provinces', costanti.FILTER_TUTTI),
addall: true,
arrvalue: [],
filter: getFilterProvinceByRegion,
@@ -55,34 +55,6 @@ export default defineComponent({
icon: 'flag',
tablesel: 'provinces',
},
{
label: 'Comune',
table: 'cities',
key: 'profile.born_city_id',
type: costanti.FieldType.select_by_server,
value: tools.getCookie(tools.COOK_SEARCH + 'cities', costanti.FILTER_TUTTI),
addall: true,
arrvalue: [],
useinput: true,
filter: null,
// filter: getFilterCitiesByProvince,
// param1: shared_consts.PARAM_SHOW_PROVINCE,
tablesel: 'cities',
},
{
label: 'In cambio di',
table: 'contribtypes',
key: 'idContribType',
value: 0,
arrvalue: tools.getCookie(tools.COOK_SEARCH + 'contribtypes', []),
type: costanti.FieldType.multiselect,
filter: null,
useinput: false,
icon: 'fas fa-hand-holding',
filteradv: true,
//icon: 'swap_horizontal_circle',
},
]
filtercustom.value = []
@@ -104,50 +76,6 @@ export default defineComponent({
let af_objId_tab = 'myId'
return {
lookup1: {
lk_tab,
lk_LF,
lk_FF,
lk_as,
af_objId_tab,
lk_proj: {
username: 1,
name: 1,
surname: 1,
'profile.img': 1,
'profile.born_city_id': 1,
'profile.qualifica': 1,
'profile.handshake': 1,
reported: 1,
date_report: 1,
username_who_report: 1,
}
},
lookup2: {
lk_tab: 'cities',
lk_LF: 'profile.born_city_id',
lk_FF: '_id',
lk_as: 'comune',
af_objId_tab: '',
lk_proj: {
idCity: 1,
numLevel: 1,
comune: 1,
userId: 1,
username: 1,
name: 1,
surname: 1,
mycities: 1,
'profile.img': 1,
'profile.qualifica': 1,
reported: 1,
date_report: 1,
username_who_report: 1,
'profile.born_city_id': 1,
'profile.handshake': 1,
}
},
}
}
@@ -161,6 +89,7 @@ export default defineComponent({
}
onMounted(mounted)
return {

View File

@@ -37,6 +37,7 @@
noresultLabel="Username non trovato"
:arrfilters="arrfilterand"
:filtercustom="filtercustom"
:prop_searchList="searchList"
:showType="costanti.SHOW_USERINFO"
:showCol="false"
:extraparams="extraparams()">
@@ -45,7 +46,6 @@
</CMyFriends>
</div>
</template>
<!--:prop_searchList="searchList"-->
<script lang="ts" src="./myfriends.ts">
</script>