Accomodations ...

This commit is contained in:
Paolo Arena
2022-05-05 23:56:23 +02:00
parent b01de2d003
commit 171b99c34d
22 changed files with 2321 additions and 2342 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "riso",
"version": "0.2.10",
"version": "0.3.15",
"description": "Riso",
"productName": "Riso",
"author": "Paolo Arena",
@@ -22,43 +22,44 @@
"generate-sw": "workbox generateSW workbox-config.js"
},
"dependencies": {
"@quasar/extras": "^1.12.5",
"@quasar/extras": "^1.13.6",
"@quasar/quasar-ui-qcalendar": "^4.0.0-beta.13",
"@vue/compat": "^3.2.31",
"@vue/compiler-sfc": "^3.2.31",
"@vue/eslint-config-standard": "5.1.2",
"@vuelidate/core": "^2.0.0-alpha.34",
"@vuelidate/validators": "^2.0.0-alpha.26",
"acorn": "^8.7.0",
"autoprefixer": "^10.4.2",
"@vue-leaflet/vue-leaflet": "^0.6.1",
"@vue/compat": "^3.2.33",
"@vue/compiler-sfc": "^3.2.33",
"@vue/eslint-config-standard": "6.1.0",
"@vuelidate/core": "^2.0.0-alpha.41",
"@vuelidate/validators": "^2.0.0-alpha.29",
"acorn": "^8.7.1",
"autoprefixer": "^10.4.7",
"axios": "^0.26.0",
"bcryptjs": "^2.4.3",
"chart.js": "^3.7.1",
"core-js": "^3.21.0",
"core-js": "^3.22.4",
"crypto": "^1.0.1",
"date-fns": "^2.28.0",
"dotenv": "^10.0.0",
"echarts": "^5.3.0",
"dotenv": "^16.0.0",
"echarts": "^5.3.2",
"eslint-plugin-quasar": "^1.1.0",
"eslint-plugin-standard": "^5.0.0",
"graphql": "^16.3.0",
"graphql": "^16.4.0",
"graphql-tag": "^2.12.6",
"gsap": "^3.9.1",
"gsap": "^3.10.4",
"jquery": "^3.6.0",
"js-cookie": "^3.0.1",
"localforage": "^1.10.0",
"lodash": "^4.17.21",
"normalize.css": "^8.0.1",
"npm": "^8.5.1",
"npm": "^8.9.0",
"nprogress": "^0.2.0",
"pinia": "^2.0.11",
"pinia": "^2.0.14",
"prerender-spa-plugin": "^3.4.0",
"quasar": "^2.5.5",
"quasar": "^2.6.6",
"quasar-extras": "^2.0.9",
"register-service-worker": "^1.7.2",
"vee-validate": "^4.5.8",
"vue": "^3.2.31",
"vue-chart-3": "^3.1.2",
"vee-validate": "^4.5.11",
"vue": "^3.2.33",
"vue-chart-3": "^3.1.8",
"vue-class-component": "^8.0.0-rc.1",
"vue-country-code": "^1.1.3",
"vue-echarts": "^6.0.2",
@@ -66,7 +67,7 @@
"vue-idb": "^0.2.0",
"vue-loader": "^17.0.0",
"vue-property-decorator": "^10.0.0-rc.3",
"vue-router": "^4.0.12",
"vue-router": "^4.0.15",
"vue-scroll-reveal": "^1.0.11",
"vue-svgicon": "^4.0.0-alpha.3",
"vue2-dragula": "^2.5.5",
@@ -78,42 +79,42 @@
"@types/bcryptjs": "^2.4.2",
"@types/dotenv": "^8.2.0",
"@types/googlemaps": "^3.43.3",
"@types/jest": "^27.4.0",
"@types/js-cookie": "^3.0.1",
"@types/node": "17.0.19",
"@types/jest": "^27.5.0",
"@types/js-cookie": "^3.0.2",
"@types/node": "17.0.31",
"@types/nprogress": "^0.2.0",
"@types/vue-tel-input": "^2.1.2",
"@types/vuelidate": "^0.7.15",
"@typescript-eslint/eslint-plugin": "^5.12.0",
"@typescript-eslint/parser": "^5.12.0",
"eslint": "^8.9.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.4",
"@typescript-eslint/eslint-plugin": "^5.22.0",
"@typescript-eslint/parser": "^5.22.0",
"eslint": "^8.14.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-vue": "^8.4.1",
"eslint-plugin-vue": "^8.7.1",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.5.0",
"http-proxy-middleware": "^2.0.3",
"jest": "^27.5.1",
"http-proxy-middleware": "^2.0.6",
"jest": "^28.0.3",
"json-loader": "^0.5.7",
"node-sass": "6.0.1",
"npm-check-updates": "^12.4.0",
"node-sass": "7.0.1",
"npm-check-updates": "^12.5.11",
"optimize-css-assets-webpack-plugin": "^6.0.1",
"postcss": "^8.4.6",
"postcss": "^8.4.13",
"postcss-loader": "^6.2.1",
"sass-loader": "^12.6.0",
"strip-ansi": "=7.0.1",
"ts-jest": "^27.1.3",
"ts-loader": "^9.2.6",
"ts-jest": "^28.0.1",
"ts-loader": "^9.3.0",
"tslint": "^6.1.3",
"tslint-config-standard": "^9.0.0",
"tslint-loader": "^3.5.4",
"typescript": "^4.5.4",
"typescript": "^4.6.4",
"vue-cli-plugin-element-ui": "^1.1.4",
"vueify": "^9.4.1",
"webpack": "^5.0.0",
"workbox-webpack-plugin": "^6.4.2"
"workbox-webpack-plugin": "^6.5.3"
},
"browser": {
"crypto": false

View File

@@ -39,7 +39,7 @@ export function Debounce(func: Function, wait?: number, immediate?: boolean) {
}
}
return function a2() {
/*return function a2() {
// @ts-ignore
context = this
// @ts-ignore
@@ -55,5 +55,5 @@ export function Debounce(func: Function, wait?: number, immediate?: boolean) {
}
return result
}
}*/
}

View File

@@ -195,6 +195,116 @@ export const shared_consts = {
},
],
TypeHosps: [
{
value: 1,
label: 'Scambio Casa',
},
{
value: 2,
label: 'Ospitalità',
}
],
TypeAccom: [
{
value: 1,
label: 'Letto matrimoniale',
},
{
value: 2,
label: 'Letto singolo',
},
{
value: 3,
label: 'Divano-letto',
},
],
LocationAccom: [
{
value: 1,
label: 'Camera Privata',
},
{
value: 2,
label: 'Camera Condivisa',
},
{
value: 3,
label: 'Soggiorno',
},
],
People: [
{
value: 0,
label: 'Nessuna',
},
{
value: 1,
label: '1',
},
{
value: 2,
label: '2',
},
{
value: 3,
label: '3',
},
{
value: 4,
label: '4',
},
{
value: 5,
label: '5',
},
{
value: 6,
label: '6',
},
{
value: 7,
label: '7',
},
{
value: 8,
label: '8',
},
{
value: 9,
label: '9',
},
{
value: 10,
label: '10',
},
{
value: 11,
label: '11',
},
{
value: 12,
label: '12',
},
{
value: 13,
label: '13',
},
{
value: 14,
label: '14',
},
{
value: 15,
label: '15',
},
],
Regions: [
{
value: 'ABR',

View File

@@ -0,0 +1,65 @@
$heightBtn: 100%;
$grayshadow: #555;
.text-subtitle-gallery {
font-size: 1rem;
font-weight: 400;
line-height: 1.75rem;
letter-spacing: .00937em;
text-shadow: .1rem .1rem .1rem $grayshadow;
}
@media (max-width: 718px) {
// PER VERSIONE MOBILE
.text-subtitle-gallery {
font-size: 1rem;
}
}
.myimg {
border-radius: 10px !important;
height: 200px;
cursor: pointer;
}
.myimg-modify {
cursor: grab;
}
.barwidth{
width: 250px !important;
}
.q-img {
&__image {
border-radius: 10px !important;
}
}
.my-card-gallery {
width: 100%;
max-width: 300px;
min-width: 200px;
padding: 0.5rem 0.5rem;
height: 350px;
margin: auto;
}
.my-card-gallery-noModif {
width: 100%;
max-width: 300px;
min-width: 200px;
padding: 1rem 1rem;
height: 220px;
}
.my-card-gallery-view {
width: 100px;
height: 100px;
padding: 0.25rem 0.25rem;
margin: auto;
}

View File

@@ -0,0 +1,179 @@
import { defineComponent, ref, PropType, watch, onMounted, computed } from 'vue'
import { useI18n } from '@src/boot/i18n'
import { useUserStore } from '@store/UserStore'
import { useQuasar } from 'quasar'
import { IAccomodation, IGallery, IImgGallery } from 'model'
import { CMyPage } from '@/components/CMyPage'
import { tools } from '@store/Modules/tools'
import { shared_consts } from '@src/common/shared_vuejs'
import { useGlobalStore } from '@store/globalStore'
import { costanti } from '@costanti'
export default defineComponent({
name: 'CAccomodation',
props: {
edit: {
type: Boolean,
required: true,
},
canModify: {
type: Boolean,
required: true,
},
isInModif: {
type: Boolean,
required: false,
default: false,
},
title: String,
mylist: {
type: Object as PropType<IAccomodation[] | string | undefined | null>,
required: true,
},
},
emits: ['showandsave'],
components: { },
setup(props, { emit }) {
const $q = useQuasar()
const { t } = useI18n()
const userStore = useUserStore()
const globalStore = useGlobalStore()
const displayGall = ref(false)
const listobj = ref(<IImgGallery[]>[])
const maximizedToggle = ref(true)
function isValid(myobj: any): boolean {
return (myobj && typeof myobj !== 'string' && typeof myobj !== 'undefined')
}
const isListImgValid = computed(() => {
const arr = getlist()
if (arr && tools.isArray(arr)) {
return arr.length > 0
} else {
return !!arr
}
})
watch(() => props.mylist, (newval, oldval) => {
if (isValid(props.mylist)) {
// @ts-ignore
listobj.value = props.mylist
}
})
function created() {
// console.log('created cgallery')
if (isValid(props.mylist)) {
// @ts-ignore
let myarr: any = props.mylist
listobj.value = []
if (Array.isArray(myarr)) {
myarr.forEach((pic: any) => {
if (pic.imagefile) {
listobj.value.push(pic)
}
})
}
} else {
listobj.value = [
]
}
}
function showandsave(value: any) {
console.log('EMIT: showandsave')
emit('showandsave', value)
}
function getnumimages() {
if (listobj.value)
return listobj.value.length
else
return 0
}
function getlist() {
if (listobj.value)
// return listobj.value.slice().sort((a: any, b: any) => a.order! - b.order!)
return listobj.value
else
return null
}
function getclass() {
return (props.edit || displayGall.value) ? (props.isInModif ? 'my-card-gallery' : 'my-card-gallery-noModif') : 'my-card-gallery-view' + ' text-center'
}
function getclimg() {
let mycl = (props.edit || displayGall.value) ? 'myimg' : 'myimg-view'
if (props.canModify && props.edit)
mycl = mycl + ' myimg-modify'
return mycl
}
function apri() {
displayGall.value = true
}
function deleted(rec: any) {
console.log('deleted', rec.imagefile)
// console.table(mylistimages)
if (listobj.value) {
const index = listobj.value.findIndex((elem: any) => elem.imagefile === rec.imagefile)
if (index > -1) {
listobj.value.splice(index, 1)
}
// mylistimages = mylistimages.pop((elem) => elem.imagefile !== rec.imagefile)
// console.table(mylistimages)
save()
}
}
function deleteRec(rec: any)
{
deleted(rec)
}
function save() {
console.log('CGallery save', listobj.value)
if (listobj.value.length > 0) {
emit('showandsave', listobj.value)
} else {
emit('showandsave', [])
}
}
function close() {
return ''
}
onMounted(created)
return {
getlist,
getclass,
getclimg,
deleteRec,
tools,
listobj,
getnumimages,
apri,
displayGall,
save,
maximizedToggle,
close,
isListImgValid,
costanti,
shared_consts,
}
}
})

View File

@@ -0,0 +1,30 @@
<template>
<!--<div class="q-pa-md items-start " style="display: inline-flex; width: 800px;"> -->
1) Accom:
<div v-for="(myaccom, index) in getlist()" :key="index">
myaccom: {{ myaccom}}
<CMySelect
:label="$t('hosps.accomodation.type')" v-model:value="myaccom.type"
optval="value"
optlab="label"
:options="shared_consts.TypeAccom" :useinput="false">
</CMySelect>
<CMySelect
:label="$t('hosps.accomodation.location')" v-model:value="myaccom.location"
optval="value"
optlab="label"
:options="shared_consts.LocationAccom" :useinput="false">
</CMySelect>
</div>
</template>
<script lang="ts" src="./CAccomodation.ts">
</script>
<style lang="scss" scoped>
@import './CAccomodation.scss';
</style>

View File

@@ -0,0 +1 @@
export {default as CAccomodation} from './CAccomodation.vue'

View File

@@ -555,39 +555,28 @@ export default defineComponent({
tablesel: 'cities',
},
{
label: 'Data Inizio',
table: 'caldate',
key: 'dateTimeStart',
value: 2,
arrvalue: [],
label: 'Tipologia',
table: toolsext.TABTYPEHOSP,
key: 'typeHosp',
type: costanti.FieldType.select,
value: tools.getCookie(tools.COOK_SEARCH + 'typeHosp', costanti.FILTER_TUTTI),
addall: true,
arrvalue: [],
filter: null,
useinput: false,
icon: 'flag',
},
{
label: 'Settore',
table: toolsext.TABSECTORS,
key: 'idSector',
value: tools.getCookie(tools.COOK_SEARCH + toolsext.TABSECTORS, 0),
arrvalue: [],
label: 'Numero Massimo di Ospiti',
table: toolsext.TABPEOPLE,
key: 'numMaxPeopleHosp',
type: costanti.FieldType.select,
value: tools.getCookie(tools.COOK_SEARCH + 'numMaxPeopleHosp', costanti.FILTER_TUTTI),
addall: true,
arrvalue: [],
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,
icon: 'flag',
},
{
label: 'In cambio di',
@@ -1046,29 +1035,20 @@ export default defineComponent({
af_objId_tab: 'myId',
},
lookup2: {
lk_tab: 'skills',
lk_LF: 'idSkill',
lk_tab: 'cities',
lk_LF: 'idCity',
lk_FF: '_id',
lk_as: 'recSkill',
lk_as: 'mycities',
af_objId_tab: '',
lk_proj: {
recSkill: 1,
sector: 1,
idSector: 1,
idSkill: 1,
// idSubSkill: 1,
myskill: 1,
idStatusSkill: 1,
typeHosp: 1,
numMaxPeopleHosp: 1,
accomodation: 1,
preferences: 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,
@@ -1082,20 +1062,6 @@ export default defineComponent({
'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 {

View File

@@ -1202,7 +1202,7 @@ export default defineComponent({
}
function visuIntestazCol(col: IColGridTable) {
if (col.fieldtype === costanti.FieldType.html || col.fieldtype === costanti.FieldType.listimages || col.noshowlabel) {
if (col.fieldtype === costanti.FieldType.html || col.fieldtype === costanti.FieldType.listimages || col.fieldtype === costanti.FieldType.listobj || col.noshowlabel) {
return false
} else {
return true

View File

@@ -12,6 +12,7 @@ import { CMyToggleList } from '../CMyToggleList'
import { CMySelect } from '../CMySelect'
import { CMyEditor } from '../CMyEditor'
import { CGallery } from '../CGallery'
import { CAccomodation } from '../CAccomodation'
import { tools } from '@store/Modules/tools'
import { costanti } from '@costanti'
@@ -174,7 +175,7 @@ export default defineComponent({
default: false,
},
},
components: { CMyChipList, CDateTime, CDate, CMyToggleList, CMySelect, CMyEditor, CGallery, CLabel },
components: { CMyChipList, CDateTime, CDate, CMyToggleList, CMySelect, CMyEditor, CGallery, CLabel, CAccomodation },
setup(props, { emit }) {
const $q = useQuasar()
const { t } = useI18n()
@@ -671,6 +672,7 @@ export default defineComponent({
return (mycol.fieldtype !== costanti.FieldType.html
&& mycol.fieldtype !== costanti.FieldType.image
&& mycol.fieldtype !== costanti.FieldType.listimages
&& mycol.fieldtype !== costanti.FieldType.listobj
&& mycol.fieldtype !== costanti.FieldType.number
)
}

View File

@@ -179,6 +179,15 @@
@showandsave="Savedb">
</CGallery>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.listobj" style="text-align: center;">
<CAccomodation
:mylist="myvalue"
:isInModif="isInModif"
:edit="isviewfield() && isInModif"
:canModify="canModify && isInModif"
@showandsave="Savedb">
</CAccomodation>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.image">
<div v-if="canEdit">
{{ $t('reg.photo') }}

View File

@@ -1,3 +1,4 @@
<!--suppress ALL -->
<template>
<div class="q-py-xs centermydiv cardrec" :style="`max-width: `+ (tools.getwidth($q) - 20) +`px; ` + ($q.screen.lt.sm ? (`min-width: `+ (tools.getwidth($q) - 20) +`px;`) : ``)">

View File

@@ -50,4 +50,5 @@ export * from './CBigBtn'
export * from './CMyRecCard'
export * from './CMyRecGrpCard'
export * from './CPresentazione'
export * from './CAccomodation'
// export * from './CPreloadImages'

View File

@@ -419,7 +419,7 @@ const baseroutes: IListRoutes[] = [
{
active: true,
order: 15,
path: '/services',
path: '/hosps',
materialIcon: 'fas fa-house-user',
name: 'mypages.hosp',
component: () => import('@/root/hosp/hosp.vue'),

View File

@@ -836,23 +836,23 @@ export interface IMyBacheca {
date_updated?: Date,
}
export interface IAccomodation {
type: number // Letto matrimoniale / letto singolo / divano-letto / almaca / a terra sul tappeto (per sacco a pelo)
location: number // in camera privata / in camera condivisa / in soggiorno / in camper / in tenda / in giardino / all'aperto
num: number
}
export interface IMyHosp {
_id: number
idSector: number
idSkill: number
// idSubSkill: number[]
idStatusSkill: number[]
typeHosp: number
numMaxPeopleHosp: number
accomodation: IAccomodation[]
preferences: number[]
idContribType: string[]
dateTimeStart: Date
dateTimeEnd: Date
idCity: number[]
photos: IGallery[]
NumLevel: number
adType: number
descr: string
note: string
website: string
descr: string
date_created?: Date,
date_updated?: Date,
}

View File

@@ -954,7 +954,15 @@ const msg_it = {
prov: 'Provincia',
reg: 'Regione',
link_grp: 'Link Territoriale',
}
},
hosps: {
typeHosp: 'Tipologia',
numMaxPeopleHosp: 'Numero Massimo di Ospiti',
accomodation: {
title: 'Tipo di Ospitalità',
type: 'Tipo'
}
},
},

View File

@@ -59,16 +59,16 @@ export const costanti = {
visible: true,
title: 'Scambio Ospitalità',
strsingolo: 'Scambio Ospitalità',
to: '/places',
to: '/hosps',
icon: 'fas fa-taxi',
color: 'lime-6',
textcolor: '',
hint: '',
disable: true,
disable: false,
small: false,
},
{
visible: true,
visible: false,
title: 'Scuola',
strsingolo: 'Scuola',
to: '/school',
@@ -92,7 +92,7 @@ export const costanti = {
small: false,
},
{
visible: true,
visible: false,
strsingolo: 'Luogo',
title: 'Luoghi',
to: '/places',
@@ -249,6 +249,7 @@ export const costanti = {
separator: 11000,
username_chip: 12000,
link: 12500,
listobj: 13000,
},
FieldTypeArr: [

View File

@@ -944,18 +944,6 @@ export const colmySkills = [
]
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',
@@ -967,6 +955,40 @@ export const colmyHosp = [
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
sortable: false,
}),
AddCol({
name: 'typeHosp',
label_trans: 'hosps.typeHosp',
fieldtype: costanti.FieldType.select,
required: true,
jointable: toolsext.TABTYPEHOSP,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
visible: true,
icon: 'category',
sortable: false,
}),
AddCol({
name: 'numMaxPeopleHosp',
label_trans: 'hosps.numMaxPeopleHosp',
fieldtype: costanti.FieldType.select,
required: true,
jointable: toolsext.TABPEOPLE,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
visible: true,
icon: 'category',
sortable: false,
}),
AddCol({
name: 'accomodation',
label_trans: 'hosps.accomodation.title',
fieldtype: costanti.FieldType.listobj,
jointable: '',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
sortable: false,
}),
AddCol({
name: 'idCity',
label_trans: 'skill.city',
@@ -982,64 +1004,6 @@ export const colmyHosp = [
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',
@@ -1052,28 +1016,24 @@ export const colmyHosp = [
isadvanced_field: false,
sortable: false,
}),
/*AddCol({
name: '',
fieldtype: costanti.FieldType.separator,
required: false,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit,
visible: 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: '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,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
isadvanced_field: false,
}),
AddCol({
name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html,
@@ -1088,6 +1048,11 @@ export const colmyHosp = [
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
sortable: false,
}),
AddCol({ name: 'date_created', label_trans: 'event.dateCreated', fieldtype: costanti.FieldType.onlydate,
required: false,
visible: false,
sortable: true,
showWhen: 0}),
AddCol(DuplicateRec),
AddCol(ModifRec),
AddCol(DeleteRec),
@@ -2917,6 +2882,42 @@ export const fieldsTable = {
colkey: '_id',
collabel: 'name',
},
{
value: toolsext.TABTYPEHOSP,
label: 'Tipo Ospitalità',
columns: colTableGeneric,
colkey: 'value',
collabel: 'label',
colicon: 'icon',
noshow: true,
},
{
value: toolsext.TABPEOPLE,
label: 'Persone',
columns: colTableGeneric,
colkey: 'value',
collabel: 'label',
colicon: 'icon',
noshow: true,
},
{
value: toolsext.TABTYPEACCOM,
label: 'Tipo di Accomodazione',
columns: colTableGeneric,
colkey: 'value',
collabel: 'label',
colicon: 'icon',
noshow: true,
},
{
value: toolsext.TABLOCACCOM,
label: 'Locazione',
columns: colTableGeneric,
colkey: 'value',
collabel: 'label',
colicon: 'icon',
noshow: true,
},
],
}

View File

@@ -5088,7 +5088,7 @@ export const tools = {
obj.col_footer = 'idCity'
obj.col_tabfooter = 'mycities'
} else if (table === toolsext.TABMYHOSPS) {
obj.prop_colkey = 'idHosp'
obj.prop_colkey = 'descr'
obj.col_title = 'descr'
obj.col_footer = 'idCity'
obj.col_tabfooter = 'mycities'
@@ -5225,20 +5225,13 @@ export const tools = {
getdefaultnewrec_MyHosp(): any {
return {
_id: 0,
idSector: tools.getSelectionByTable('sectors', 0),
idHosp: tools.getSelectionByTable('hosps', 0),
idStatusSkill: tools.getSelectionByTable('statusSkills', []),
typeHosp: tools.getSelectionByTable(toolsext.TABTYPEHOSP, 2),
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: '',
note: '',
website: '',
}
},

View File

@@ -85,12 +85,17 @@ export const toolsext = {
TABTEMPLEMAIL: 'templemail',
TABOPZEMAIL: 'opzemail',
TABSHAREWITHUS: 'sharewithus',
TABTYPEHOSP: 'typehosps',
TABTYPEACCOM: 'typeaccoms',
TABLOCACCOM: 'locaccoms',
TABPEOPLE: 'people',
SERVKEY_VERS: 'vers',
ERR_GENERICO: -1,
ERR_SERVERFETCH: -2,
ERR_AUTHENTICATION: -5,
localStorage: {
teleg_id: 'ti',
verified_email: 'vf',

View File

@@ -1547,6 +1547,10 @@ export const useGlobalStore = defineStore('GlobalStore', {
else if (table === 'otherfilters') myarr = shared_consts.OtherFilters
else if (table === toolsext.TABCALDATE) myarr = this.getArrDateEvent()
else if (table === toolsext.TABCALALLDATE) myarr = this.getArrAllDateEvent()
else if (table === toolsext.TABTYPEHOSP) myarr = shared_consts.TypeHosps
else if (table === toolsext.TABPEOPLE) myarr = shared_consts.People
else if (table === toolsext.TABTYPEACCOM) myarr = shared_consts.TypeAccom
else if (table === toolsext.TABLOCACCOM) myarr = shared_consts.LocationAccom
else myarr = this.getListByTable(table)
if (costanti.TABLES_ARRAY.includes(table)) {

3868
yarn.lock

File diff suppressed because it is too large Load Diff