Nuovo Sistema di registrazione:

tramite il BOT, viene memorizzato l'username telegram e si usa quello come username per la APP, e l'ID telegram viene passato direttamente, senza chiedere la verifica.

- ospitalità (inizio).
This commit is contained in:
Paolo Arena
2022-05-04 00:26:30 +02:00
parent b5ea2f2293
commit dafee01e20
21 changed files with 607 additions and 44 deletions

View File

@@ -596,7 +596,7 @@ const baseroutes: IListRoutes[] = [
{
active: functionality.ENABLE_REGISTRATION,
order: 1000,
path: '/signup/:invited',
path: '/signup/:un/:tid',
materialIcon: 'how_to_reg',
name: 'pages.SignUp',
component: () => import('@/views/login/signup/signup.vue'),

View File

@@ -87,33 +87,29 @@ export const shared_consts = {
TABLES_MYSKILLS: 'myskills',
TABLES_MYBACHECAS: 'mybachecas',
TABLES_MYHOSPS: 'myhosps',
TABLES_MYGOODS: 'mygoods',
TABLES_ENABLE_GETREC_BYID: ['mybachecas'],
TABLES_ENABLE_GETREC_BYID: ['mybachecas', 'myhosps'],
TABLES_USER_INCLUDE_MY: ['mygroups'],
TABLES_GETCOMPLETEREC: ['myskills', 'mybachecas', 'mygoods'],
TABLES_GETCOMPLETEREC: ['myskills', 'mybachecas', 'myhosps', 'mygoods'],
TABLES_WITH_FILTER_FIELD: ['caldate'],
TABLES_WITH_DATE: ['mybachecas'],
TABLES_WITH_SORTING: ['mybachecas'],
TABLES_PERM_NEWREC: ['skills', 'goods', 'subskills', 'mygroups'],
TABLES_REC_ID: ['skills', 'goods', 'subskills', 'myskills', 'mybachecas', 'mygoods'],
TABLES_WITH_DATE: ['mybachecas', 'myhosps'],
TABLES_WITH_SORTING: ['mybachecas', 'myhosps'],
TABLES_REC_ID: ['skills', 'goods', 'subskills', 'myskills', 'mybachecas', 'myhosps', 'mygoods'],
// costanti.VISUTABLE_SCHEDA_USER, VISUTABLE_SCHEDA_GROUP, VISUTABLE_USER_TABGROUP
VERTIC_SHOW_GRID: [-1, 2, -3, -4],
TABLES_ID_NUMBER: ['permissions', 'levels', 'adtypes', 'adtypegoods', 'statusSkills', 'sectors', 'sectorgoods', 'catgrps', 'skills', 'subskills', 'cities', 'provinces',
'myskills', 'mybachecas', 'mygoods', 'mygroups'],
TABLES_USER_ID: ['mygroups', 'myskills', 'mybachecas', 'mygoods'],
TABLES_UPDATE_LASTIFIED: ['myskills', 'mybachecas', 'mygoods', 'mybots'],
TABLES_FINDER: ['myskills', 'mybachecas', 'mygoods', 'mygroups'],
TABLES_VISU_CMYSRECCARD: ['myskills', 'mybachecas', 'mygoods', 'mygroups'],
TABLES_SHOW_ADTYPE: ['myskills', 'mygoods'],
TABLES_UPDATE_LASTIFIED: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'mybots'],
TABLES_FINDER: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'mygroups'],
TABLES_VISU_CMYSRECCARD: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'mygroups'],
TABLES_SHOW_ADTYPE: ['myskills', 'mygoods', 'myhosps'],
TABLES_PERM_CHANGE_FOR_USERS: ['myskills', 'mybachecas', 'mygoods'],
TABLES_VISU_LISTA_USER: ['myskills', 'mybachecas', 'mygoods', 'users'],
TABLES_VISU_LISTA_USER: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'users'],
TABLES_VISU_IMG: ['myskills', 'mybachecas', 'mygoods', 'mygroups'],
TABLES_VISU_IMG: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'mygroups'],
TABLES_DIRECTORY_A_PARTE: ['mygroups'],
VISIB_ALL: 0,

View File

@@ -50,6 +50,7 @@ export default defineComponent({
const searchList_Beni = ref(<ISearchList[]>[])
const searchList_MyGroups = ref(<ISearchList[]>[])
const searchList_Events = ref(<ISearchList[]>[])
const searchList_Hosp = ref(<ISearchList[]>[])
const search = ref('')
const myrecfiltertoggle = ref(tools.FILTER_ALL)
@@ -118,6 +119,8 @@ export default defineComponent({
return searchList_MyGroups.value
else if (props.table === toolsext.TABMYBACHECAS)
return searchList_Events.value
else if (props.table === toolsext.TABMYHOSPS)
return searchList_Hosp.value
return searchList_Servizi.value
})
@@ -142,6 +145,8 @@ export default defineComponent({
return 'nome del Gruppo da cercare'
else if (props.table === toolsext.TABMYBACHECAS)
return 'nome dell\'Evento da cercare'
else if (props.table === toolsext.TABMYHOSPS)
return 'nome dell\'Ospitalità da cercare'
return 'nome da cercare'
})
@@ -168,6 +173,8 @@ export default defineComponent({
return 'Nessun Gruppo trovato con i filtri selezionati'
else if (props.table === toolsext.TABMYBACHECAS)
return 'Nessun Evento trovato con i filtri selezionati'
else if (props.table === toolsext.TABMYHOSPS)
return 'Nessuna Ospitalità trovata con i filtri selezionati'
return 'Nessun dato trovato con i filtri selezionati'
})
@@ -496,6 +503,108 @@ export default defineComponent({
]
searchList_Hosp.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: false,
},
{
label: 'Regione',
table: 'regions',
key: 'idReg',
type: costanti.FieldType.select,
value: tools.getCookie(tools.COOK_SEARCH + 'regions', costanti.FILTER_TUTTI),
addall: true,
arrvalue: [],
filter: null,
useinput: false,
icon: 'fas fa-globe-europe'
},
{
label: 'Provincia',
table: 'provinces',
key: 'idProvince',
type: costanti.FieldType.select,
value: tools.getCookie(tools.COOK_SEARCH + 'provinces', costanti.FILTER_TUTTI),
addall: true,
arrvalue: [],
filter: getFilterProvinceByRegion,
useinput: true,
icon: 'flag',
},
{
label: 'Comune',
table: 'cities',
key: 'idCity',
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: 'Data Inizio',
table: 'caldate',
key: 'dateTimeStart',
value: 2,
arrvalue: [],
type: costanti.FieldType.select,
addall: true,
filter: null,
useinput: false,
},
{
label: 'Settore',
table: toolsext.TABSECTORS,
key: 'idSector',
value: tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORS, 0),
arrvalue: [],
type: costanti.FieldType.select,
filter: null,
addall: true,
notinsearch: true,
useinput: false,
},
{
label: 'Categoria',
table: 'skills',
key: 'idSkill',
value: tools.getCookie(tools.COOK_SEARCH + 'skills' + '_' + tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORS, costanti.FILTER_TUTTI), costanti.FILTER_TUTTI),
arrvalue: [],
type: costanti.FieldType.select,
addall: true,
filter: getFilterSkills,
showcount: true,
useinput: false,
},
{
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: false,
//icon: 'swap_horizontal_circle',
},
]
searchList_Beni.value = [
{
label: 'Regione',
@@ -926,6 +1035,69 @@ export default defineComponent({
},
}
} else if (props.table === toolsext.TABMYHOSPS) {
return {
// Servizi
lookup1: {
lk_tab: 'users',
lk_LF: 'userId',
lk_FF: '_id',
lk_as: 'user',
af_objId_tab: 'myId',
},
lookup2: {
lk_tab: 'skills',
lk_LF: 'idSkill',
lk_FF: '_id',
lk_as: 'recSkill',
af_objId_tab: '',
lk_proj: {
recSkill: 1,
sector: 1,
idSector: 1,
idSkill: 1,
// idSubSkill: 1,
myskill: 1,
idStatusSkill: 1,
idContribType: 1,
idCity: 1,
dateTimeStart: 1,
dateTimeEnd: 1,
numLevel: 1,
adType: 1,
photos: 1,
note: 1,
website: 1,
//**ADDFIELD_MYSKILL
descr: 1,
date_created: 1,
date_updated: 1,
userId: 1,
username: 1,
name: 1,
surname: 1,
comune: 1,
mycities: 1,
'profile.img': 1,
'profile.qualifica': 1,
}
},
lookup3: {
lk_tab: toolsext.TABSECTORS,
lk_LF: 'recSkill.idSector',
lk_FF: '_id',
lk_as: 'sector',
af_objId_tab: '',
},
lookup5: {
lk_tab: 'cities',
lk_LF: 'idCity',
lk_FF: '_id',
lk_as: 'mycities',
af_objId_tab: '',
},
}
} else {
return {
// Servizi
@@ -994,6 +1166,8 @@ export default defineComponent({
return tools.getdefaultnewrec_MySkill()
} else if (props.table === toolsext.TABMYBACHECAS) {
return tools.getdefaultnewrec_MyBacheca()
} else if (props.table === toolsext.TABMYHOSPS) {
return tools.getdefaultnewrec_MyHosp()
} else if (props.table === toolsext.TABMYGOODS) {
return tools.getdefaultnewrec_MyGoods()
} else if (props.table === toolsext.TABMYGROUPS) {

View File

@@ -2,7 +2,7 @@ import { tools } from '@store/Modules/tools'
import { ISignupOptions } from 'model'
import { Logo } from '../../components/logo'
import { Logo } from '@/components/logo'
// import 'vue-country-code/dist/vue-country-code.css'
@@ -133,6 +133,8 @@ export default defineComponent({
const v$ = useVuelidate(validations, signup)
const invited = ref($route.params.invited)
const usernameteleg = ref($route.params.usernameteleg)
const idteleg = ref($route.params.idteleg)
watch(() => invited, (to: any, from: any) => {
if (props.showaportador) {
@@ -240,8 +242,12 @@ export default defineComponent({
console.log('$route.params', $route.params)
// @ts-ignore
signup.aportador_solidario = $route.params.invited
signup.aportador_solidario = !!$route.params.invited ? $route.params.invited.toString() : ''
signup.username = !!$route.params.usernameteleg ? $route.params.usernameteleg.toString() : ''
signup.profile.username_telegram = signup.username
if (!!$route.params.idteleg) {
signup.profile.teleg_id = $route.params.idteleg ? parseInt($route.params.idteleg.toString()) : 0
}
console.log('1) aportador_solidario', signup.aportador_solidario)
@@ -253,6 +259,10 @@ export default defineComponent({
}
console.log('signup.aportador_solidario', signup.aportador_solidario)
if (!signup.username || !signup.profile.teleg_id) {
window.location.href = tools.getLinkBotTelegram()
}
}
function myRuleEmail(val: string) {

View File

@@ -79,6 +79,25 @@
</q-input> -->
<q-input
v-model="signup.username"
:readonly="true"
rounded outlined
@blur="v$.username.$touch"
@update:model-value="changeusername"
:error="v$.username.$error"
@keydown.space="(event) => event.preventDefault()"
maxlength="20"
debounce="1000"
:error-message="tools.errorMsg( 'username', v$.username)"
:label="$t('reg.username_reg')">
<template v-slot:prepend>
<q-icon name="person"/>
</template>
</q-input>
<q-input
v-model="signup.email"
rounded outlined
@@ -95,25 +114,6 @@
</q-input>
<q-input
v-model="signup.username"
rounded outlined
@blur="v$.username.$touch"
@update:model-value="changeusername"
:error="v$.username.$error"
@keydown.space="(event) => event.preventDefault()"
maxlength="20"
:hint="$t('reg.username_hint')"
debounce="1000"
:error-message="tools.errorMsg( 'username', v$.username)"
:label="$t('reg.username_reg')">
<template v-slot:prepend>
<q-icon name="person"/>
</template>
</q-input>
<div v-if="show_namesurname">
<q-input
v-model="signup.name"

View File

@@ -339,6 +339,8 @@ export default defineComponent({
return tools.getdefaultnewrec_MySkill()
} else if (props.table === toolsext.TABMYBACHECAS) {
return tools.getdefaultnewrec_MyBacheca()
} else if (props.table === toolsext.TABMYHOSPS) {
return tools.getdefaultnewrec_MyHosp()
} else if (props.table === toolsext.TABMYGOODS) {
return tools.getdefaultnewrec_MyGoods()
}

View File

@@ -3,6 +3,7 @@ const msg_website = {
pages: {
home: 'Principale',
SignUp: 'Registrazione',
SignUp2: 'Registrazione2',
SignIn: 'Login',
vreg: 'Verifica Reg',
Test: 'Test',

View File

@@ -416,6 +416,17 @@ const baseroutes: IListRoutes[] = [
inmenu: true,
infooter: true,
},
{
active: true,
order: 15,
path: '/services',
materialIcon: 'fas fa-house-user',
name: 'mypages.hosp',
component: () => import('@/root/hosp/hosp.vue'),
meta: { requiresAuth: true },
inmenu: true,
infooter: true,
},
{
active: true,
order: 20,
@@ -611,7 +622,7 @@ const baseroutes: IListRoutes[] = [
{
active: functionality.ENABLE_REGISTRATION,
order: 1000,
path: '/signup/:invited',
path: '/signup/:invited/:usernameteleg/:idteleg',
materialIcon: 'how_to_reg',
name: 'pages.SignUp',
component: () => import('@/views/login/signup/signup.vue'),
@@ -619,6 +630,17 @@ const baseroutes: IListRoutes[] = [
infooter: false,
separator: false
},
{
active: true,
order: 1001,
path: '/signup/:invited',
materialIcon: 'how_to_reg',
name: 'pages.SignUp2',
component: () => import('@/views/login/signup/signup.vue'),
inmenu: false,
infooter: false,
separator: false
},
{
active: functionality.ENABLE_REGISTRATION,
order: 2000,

View File

@@ -831,3 +831,24 @@ export interface IMyBacheca {
}
export interface IMyHosp {
_id: number
idSector: number
idSkill: number
// idSubSkill: number[]
idStatusSkill: number[]
idContribType: string[]
dateTimeStart: Date
dateTimeEnd: Date
idCity: number[]
photos: IGallery[]
NumLevel: number
adType: number
note: string
website: string
descr: string
date_created?: Date,
date_updated?: Date,
}

0
src/root/hosp/hosp.scss Executable file
View File

36
src/root/hosp/hosp.ts Executable file
View File

@@ -0,0 +1,36 @@
import {
defineComponent, ref, computed,
} from 'vue'
import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { CSkill } from '@/components/CSkill'
import { CFinder } from '@/components/CFinder'
import { Footer } from '@/components/Footer'
import { CDashboard } from '@/components/CDashboard'
import { CChartMap } from '@src/components/CChartMap'
import { CUserNonVerif } from '@/components/CUserNonVerif'
import { CTitlePage } from '@/components/CTitlePage'
import { CMapsEsempio } from '@src/components/CMapsEsempio'
import { CVerifyEmail } from '@src/components/CVerifyEmail'
import { CVerifyTelegram } from '@src/components/CVerifyTelegram'
import { useGlobalStore } from '@store/globalStore'
import { useUserStore } from '@store/UserStore'
import { static_data } from '@/db/static_data'
import MixinBase from '@/mixins/mixin-base'
import MixinUsers from '@/mixins/mixin-users'
import { colmyHosp } from '@store/Modules/fieldsTable'
export default defineComponent({
name: 'hosp',
components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram, CDashboard, CUserNonVerif, CTitlePage, Footer },
setup() {
return {
colmyHosp,
tools,
toolsext,
static_data,
}
},
})

32
src/root/hosp/hosp.vue Executable file
View File

@@ -0,0 +1,32 @@
<template>
<q-page class="">
<div v-if="tools.isLogged()">
<div v-if="tools.isUserOk()">
<CTitlePage :ind="2" />
<CFinder
:ind="2"
:table="toolsext.TABMYHOSPS">
</CFinder>
<CDashboard></CDashboard>
</div>
<div v-else>
<CUserNonVerif></CUserNonVerif>
</div>
</div>
<Footer></Footer>
</q-page>
</template>
<script lang="ts" src="./hosp.ts">
</script>
<style lang="scss" scoped>
@import './hosp.scss';
</style>

View File

@@ -800,6 +800,7 @@ const msg_es = {
friends: 'Amici',
bacheca: 'Bacheca',
services: 'Servizi',
hosp: 'Scambio Ospitalità',
events: 'Eventi',
goods: 'Beni',
test: 'Test',

View File

@@ -458,8 +458,8 @@ const msg_it = {
deleted: 'Nascosto',
sospeso: 'Sospeso',
username: 'Username',
username_reg: 'Scegli il tuo Username',
username_hint: 'caratteri consentiti: tratteggio (_), meno (-) e il punto (.)',
username_reg: 'Username',
username_hint: 'caratteri consentiti: tratteggio (_)',
username_pseudonimo: 'Username (Pseudonimo)',
username_short: 'Username',
name: 'Nome',
@@ -897,6 +897,7 @@ const msg_it = {
friends: 'Amici',
bacheca: 'Bacheca',
services: 'Servizi',
hosp: 'Scambio Ospitalità',
events: 'Eventi',
goods: 'Beni',
test: 'Test',

View File

@@ -57,8 +57,8 @@ export const costanti = {
},
{
visible: true,
title: 'Mobilità',
strsingolo: 'Mobilità',
title: 'Scambio Ospitalità',
strsingolo: 'Scambio Ospitalità',
to: '/places',
icon: 'fas fa-taxi',
color: 'lime-6',

View File

@@ -943,6 +943,156 @@ export const colmySkills = [
AddCol(DeleteRec),
]
export const colmyHosp = [
AddCol({
name: 'idStatusSkill',
label_trans: 'statusSkill.name',
fieldtype: costanti.FieldType.multiselect,
jointable: 'statusSkills',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
noshowlabel: true,
icon: 'mood',
isadvanced_field: true,
sortable: false,
}),
AddCol({
name: 'username',
label_trans: 'reg.username',
foredit: false,
tipovisu: costanti.TipoVisu.LINK,
fieldtype: costanti.FieldType.username_chip,
link: '/my/username',
noshowlabel: true,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
sortable: false,
}),
AddCol({
name: 'idCity',
label_trans: 'skill.city',
fieldtype: costanti.FieldType.multiselect_by_server,
jointable: 'cities',
tablesel: 'cities',
noshowlabel: true,
icon: 'fas fa-map-marker-alt',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
remote_table: 'mycities',
remote_key: '_id',
remote_field: 'comune',
sortable: false,
required: true,
}),
AddCol(
{
name: 'dateTimeStart',
label_trans: 'event.dateTimeStart',
// jointable: toolsext.TABCALALLDATE,
fieldtype: costanti.FieldType.date,
// fieldtype: costanti.FieldType.select,
// fieldtype_real: costanti.FieldType.onlydate,
// fieldtype: costanti.FieldType.onlydate,
icon: 'fas fa-calendar-day',
}),
AddCol(
{
name: 'dateTimeEnd',
label_trans: 'event.dateTimeEnd',
fieldtype: costanti.FieldType.date,
// jointable: toolsext.TABCALALLDATE,
// fieldtype: costanti.FieldType.select,
// fieldtype_real: costanti.FieldType.onlydate,
icon: 'fas fa-calendar-day',
sortable: false,
}),
AddCol({
name: 'descr',
label_trans: 'proj.shortdescr',
fieldtype: costanti.FieldType.string,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
noshowlabel: true,
maxlength: 120,
required: true,
sortable: false,
}),
AddCol({
name: 'idSector',
label_trans: 'sectors.name',
fieldtype: costanti.FieldType.select,
required: true,
jointable: toolsext.TABSECTORS,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
visible: true,
icon: 'category',
sortable: false,
}),
AddCol({
name: 'idSkill',
label_trans: 'skill.name',
fieldtype: costanti.FieldType.select,
jointable: 'skills',
addnone: true,
filter_table: toolsext.TABSECTORS,
filter_field: 'idSector',
noshowlabel: true,
icon: 'engineering',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
allowNewValue: false,
required: false,
sortable: false,
}),
AddCol({
name: 'idContribType',
label_trans: 'contribtype.name',
fieldtype: costanti.FieldType.multiselect,
jointable: 'contribtypes',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
noshowlabel: true,
icon: 'fas fa-hand-holding',
//icon: 'fas fa-hands-helping',
isadvanced_field: false,
sortable: false,
}),
/*AddCol({
name: '',
fieldtype: costanti.FieldType.separator,
required: false,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit,
visible: false,
sortable: false,
}),*/
AddCol({ name: 'date_created', label_trans: 'event.dateCreated', fieldtype: costanti.FieldType.onlydate,
required: false,
visible: false,
sortable: true,
showWhen: 0}),
AddCol({
name: 'photos',
label_trans: 'skill.photos',
fieldtype: costanti.FieldType.listimages,
jointable: '',
showpicprofile_ifnotset: true,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
isadvanced_field: true,
sortable: false,
}),
AddCol({
name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
isadvanced_field: true,
sortable: false,
}),
//**ADDFIELD_MYBACHECAS
AddCol({
name: 'website', label_trans: 'reg.website', isadvanced_field: true, fieldtype: costanti.FieldType.link,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
sortable: false,
}),
AddCol(DuplicateRec),
AddCol(ModifRec),
AddCol(DeleteRec),
]
export const colmyBachecas = [
AddCol({
name: 'idStatusSkill',
@@ -2276,6 +2426,7 @@ export const fieldsTable = {
'myskills',
'mygoods',
'mybachecas',
'myhosp',
],
tableRemotePickup: [
@@ -2288,6 +2439,7 @@ export const fieldsTable = {
'myskills',
'mygoods',
'mybachecas',
'myhosp',
],
userlist() {
@@ -2588,6 +2740,13 @@ export const fieldsTable = {
colkey: '_id',
collabel: (rec: any) => `${rec.descr}`,
},
{
value: toolsext.TABMYHOSPS,
label: 'Ospitalità',
columns: colmyHosp,
colkey: '_id',
collabel: (rec: any) => `${rec.descr}`,
},
{
value: toolsext.TABMYGOODS,
label: 'Beni',

View File

@@ -5071,6 +5071,11 @@ export const tools = {
obj.col_title = 'descr'
obj.col_footer = 'idCity'
obj.col_tabfooter = 'mycities'
} else if (table === toolsext.TABMYHOSPS) {
obj.prop_colkey = 'idHosp'
obj.col_title = 'descr'
obj.col_footer = 'idCity'
obj.col_tabfooter = 'mycities'
}
return obj
@@ -5201,11 +5206,34 @@ export const tools = {
}
},
getdefaultnewrec_MyHosp(): any {
return {
_id: 0,
idSector: tools.getSelectionByTable('sectors', 0),
idHosp: tools.getSelectionByTable('hosps', 0),
idStatusSkill: tools.getSelectionByTable('statusSkills', []),
idContribType: tools.getSelectionByTable('contribtypes', []),
dateTimeStart: new Date(),
dateTimeEnd: new Date(),
idCity: this.getCitySel(),
NumLevel: 0,
adType: tools.getSelectionByTable('adtypes', costanti.AdType.OFFRO),
photos: [],
note: '',
//**ADDFIELD_MYBACHECAS
website: '',
descr: '',
}
},
getDirectoryByTable(table: string) {
if (table === toolsext.TABMYSKILLS) {
return 'myservice'
} else if (table === toolsext.TABMYBACHECAS) {
return 'mypage'
} else if (table === toolsext.TABMYHOSPS) {
return 'myhosps'
} else if (table === toolsext.TABMYGOODS) {
return 'mygood'
} else if (table === toolsext.TABMYGROUPS) {

View File

@@ -68,6 +68,7 @@ export const toolsext = {
TABMYSKILLS: 'myskills',
TABMYGOODS: 'mygoods',
TABMYBACHECAS: 'mybachecas',
TABMYHOSPS: 'myhosps',
TABCALDATE: 'caldate',
TABCALALLDATE: 'calalldate',
TABNAVI: 'navi',

View File

@@ -0,0 +1,18 @@
.profile {
width: 100%;
margin: 0 auto;
max-width: 450px;
}
.myrow{
display: flex;
@media (max-width: 600px) {
flex-flow: column;
}
}
.qualifica{
border: solid 2px #4198ef;
border-radius: 1rem;
padding: 5px;
}

View File

@@ -0,0 +1,31 @@
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRoute, useRouter } from 'vue-router'
import { useI18n } from '@/boot/i18n'
import { useQuasar } from 'quasar'
import { CMyCardPopup } from '@/components/CMyCardPopup'
import { CMyPage } from '@/components/CMyPage'
import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
import { toolsext } from '@store/Modules/toolsext'
import { tools } from '@store/Modules/tools'
export default defineComponent({
name: 'mypagehosp',
components: { CMyCardPopup, CMyPage, CCheckIfIsLogged },
props: {},
setup() {
const userStore = useUserStore()
const $route = useRoute()
const $q = useQuasar()
const { t } = useI18n()
const idHosp = computed(() => $route.params.idHosp ? $route.params.idHosp.toString() : 0)
return {
t,
idHosp,
toolsext,
tools,
}
}
})

View File

@@ -0,0 +1,30 @@
<template>
<CMyPage title="Ospitalità"
imgbackground="images/calendario_eventi.jpg"
sizes="max-height: 120px" styleadd="bottom: -20px !important;">
<div v-if="!tools.isLogged()">
<CCheckIfIsLogged></CCheckIfIsLogged>
</div>
<CMyCardPopup
v-if="!!idHosp"
:table="toolsext.TABMYHOSPS"
:nopopup="true"
:idRec="idHosp">
</CMyCardPopup>
<br>
<br>
</CMyPage>
</template>
<script lang="ts" src="./mypagehosp.ts">
</script>
<style lang="scss" scoped>
@import './mypagehosp.scss';
</style>