From 200ac47035c1f6175de6d3cdd7e3a4cdb09232bf Mon Sep 17 00:00:00 2001 From: Paolo Arena Date: Fri, 6 May 2022 19:51:33 +0200 Subject: [PATCH] =?UTF-8?q?versione=200.3.16:=20=20-=20Aggiunto=20bottone?= =?UTF-8?q?=20"Scambio=20Ospitalit=C3=A0"=20(nuova=20tabella)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- .env.example.production | 2 +- _ALL_SITES/insiemesipuo.app/.env.development | 2 +- _ALL_SITES/insiemesipuo.app/db/static_data.ts | 11 +++ .../popolodelnuovomondo.app/.env.development | 2 +- _ALL_SITES/riso.app/.env.development | 2 +- _ALL_SITES/riso.app/.env.test | 2 +- package.json | 2 +- src/common/shared_vuejs.ts | 84 ++++++++++++++++++- .../CAccomodation/CAccomodation.scss | 17 +++- src/components/CAccomodation/CAccomodation.ts | 35 +++++--- .../CAccomodation/CAccomodation.vue | 75 +++++++++++++---- src/components/CFinder/CFinder.ts | 29 +++---- src/components/CMyCardPopup/CMyCardPopup.ts | 12 ++- src/components/CMyCardPopup/CMyCardPopup.vue | 18 +++- src/components/CMyPopupEdit/CMyPopupEdit.ts | 15 +++- src/components/CMyRecCard/CMyRecCard.vue | 2 +- src/css/app.scss | 26 +++++- src/db/lang/ws_it.js | 1 + src/db/static_data.ts | 13 ++- src/statics/lang/it.js | 8 +- src/store/Modules/costanti.ts | 2 +- src/store/Modules/fieldsTable.ts | 26 ++++++ src/store/Modules/toolsext.ts | 1 + src/store/globalStore.ts | 1 + 25 files changed, 322 insertions(+), 68 deletions(-) diff --git a/.env.development b/.env.development index 0a83cfc5..7f58cb00 100755 --- a/.env.development +++ b/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="0.3.15" +APP_VERSION="0.3.16" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL="newfreeplanet" diff --git a/.env.example.production b/.env.example.production index b34e3e31..ed7e48ce 100755 --- a/.env.example.production +++ b/.env.example.production @@ -1,4 +1,4 @@ -APP_VERSION="0.3.15" +APP_VERSION="0.3.16" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL=newfreeplanet diff --git a/_ALL_SITES/insiemesipuo.app/.env.development b/_ALL_SITES/insiemesipuo.app/.env.development index 81bffff2..a00c628b 100755 --- a/_ALL_SITES/insiemesipuo.app/.env.development +++ b/_ALL_SITES/insiemesipuo.app/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="0.3.15" +APP_VERSION="0.3.16" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL="newfreeplanet" diff --git a/_ALL_SITES/insiemesipuo.app/db/static_data.ts b/_ALL_SITES/insiemesipuo.app/db/static_data.ts index 9a93d52f..fde957a8 100755 --- a/_ALL_SITES/insiemesipuo.app/db/static_data.ts +++ b/_ALL_SITES/insiemesipuo.app/db/static_data.ts @@ -525,6 +525,17 @@ const baseroutes: IListRoutes[] = [ inmenu: false, infooter: false, }, + { + active: true, + order: 135, + path: '/myhosps/:idHosp', + materialIcon: '', + name: 'pages.myhosps2', + component: () => import('@/views/user/mypagehosp/mypagehosp.vue'), + meta: { requiresAuth: true }, + inmenu: false, + infooter: false, + }, { active: true, order: 400, diff --git a/_ALL_SITES/popolodelnuovomondo.app/.env.development b/_ALL_SITES/popolodelnuovomondo.app/.env.development index c66c9885..564b0bd0 100755 --- a/_ALL_SITES/popolodelnuovomondo.app/.env.development +++ b/_ALL_SITES/popolodelnuovomondo.app/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="0.3.15" +APP_VERSION="0.3.16" SERVICE_WORKER_FILE="service-worker.js" APP_ID="12" DIRECTORY_LOCAL="newfreeplanet" diff --git a/_ALL_SITES/riso.app/.env.development b/_ALL_SITES/riso.app/.env.development index aa4d2a63..af745464 100755 --- a/_ALL_SITES/riso.app/.env.development +++ b/_ALL_SITES/riso.app/.env.development @@ -1,4 +1,4 @@ -APP_VERSION="0.3.15" +APP_VERSION="0.3.16" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL="newfreeplanet" diff --git a/_ALL_SITES/riso.app/.env.test b/_ALL_SITES/riso.app/.env.test index 2cbd3bb3..d0f5f635 100755 --- a/_ALL_SITES/riso.app/.env.test +++ b/_ALL_SITES/riso.app/.env.test @@ -1,4 +1,4 @@ -APP_VERSION="0.3.15" +APP_VERSION="0.3.16" SERVICE_WORKER_FILE="service-worker.js" APP_ID="13" DIRECTORY_LOCAL=newfreeplanet diff --git a/package.json b/package.json index 1e62fce8..25c42d20 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "riso", - "version": "0.3.15", + "version": "0.3.16", "description": "Riso", "productName": "Riso", "author": "Paolo Arena", diff --git a/src/common/shared_vuejs.ts b/src/common/shared_vuejs.ts index 3d05aa3f..77ae1640 100755 --- a/src/common/shared_vuejs.ts +++ b/src/common/shared_vuejs.ts @@ -105,7 +105,7 @@ export const shared_consts = { 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_SHOW_ADTYPE: ['myskills', 'mygoods'], TABLES_VISU_LISTA_USER: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'users'], @@ -209,15 +209,35 @@ export const shared_consts = { TypeAccom: [ { value: 1, - label: 'Letto matrimoniale', + label: 'Letti matrimoniali', }, { value: 2, - label: 'Letto singolo', + label: 'Letti singoli', }, { value: 3, - label: 'Divano-letto', + label: 'Divani-letto', + }, + { + value: 4, + label: 'Almaca', + }, + { + value: 5, + label: 'sul materasso', + }, + { + value: 6, + label: 'sul tappeto', + }, + { + value: 7, + label: 'sacco a pelo', + }, + { + value: 8, + label: 'Culla', }, ], @@ -234,6 +254,22 @@ export const shared_consts = { value: 3, label: 'Soggiorno', }, + { + value: 4, + label: 'in camper', + }, + { + value: 5, + label: 'in tenda', + }, + { + value: 6, + label: 'in giardino', + }, + { + value: 7, + label: 'all\'aperto', + }, ], @@ -305,6 +341,41 @@ export const shared_consts = { }, ], + Preferences: [ + { + value: 1, + label: 'Si accettano bambini', + }, + { + value: 2, + label: 'Si accettano cani', + }, + { + value: 3, + label: 'Si accettano gatti', + }, + { + value: 4, + label: 'E\' consentito fumare in casa', + }, + { + value: 5, + label: 'Accessibile con sedia a rotelle', + }, + { + value: 6, + label: 'Parcheggio gratuito nella proprietà', + }, + { + value: 7, + label: 'Wi-fi disponibile', + }, + { + value: 8, + label: 'Sono permessi soggiorni a lungo termine', + }, + ], + Regions: [ { value: 'ABR', @@ -700,6 +771,11 @@ export const shared_consts = { return (trovatorec) ? trovatorec.label : '' }, + getLabelByValueAndArr(value: number, array: any) { + const trovatorec = array.find((rec: any) => rec.value === value) + return (trovatorec) ? trovatorec.label : '' + }, + fieldsUserToChange() { return ['_id', 'username', 'group', 'email', 'name', 'surname', 'perm', 'date_reg', 'verified_email', 'notask_verif', 'verified_by_aportador', 'trust_modified', 'img', 'ipaddr', 'lasttimeonline', 'profile', 'news_on'] }, diff --git a/src/components/CAccomodation/CAccomodation.scss b/src/components/CAccomodation/CAccomodation.scss index 0e7557e9..8a24f298 100755 --- a/src/components/CAccomodation/CAccomodation.scss +++ b/src/components/CAccomodation/CAccomodation.scss @@ -27,7 +27,7 @@ $grayshadow: #555; } -.barwidth{ +.barwidth { width: 250px !important; } @@ -56,10 +56,23 @@ $grayshadow: #555; } - .my-card-gallery-view { width: 100px; height: 100px; padding: 0.25rem 0.25rem; margin: auto; } + +.accom_type{ + font-size: 1rem; + font-weight: bold; + margin-right: 4px; + padding-top: 10px; +} + +.accom_location{ + font-size: 1rem; + padding-top: 10px; + margin-right: 4px; + font-style: italic; +} diff --git a/src/components/CAccomodation/CAccomodation.ts b/src/components/CAccomodation/CAccomodation.ts index c495514e..80048498 100755 --- a/src/components/CAccomodation/CAccomodation.ts +++ b/src/components/CAccomodation/CAccomodation.ts @@ -8,6 +8,8 @@ import { tools } from '@store/Modules/tools' import { shared_consts } from '@src/common/shared_vuejs' import { useGlobalStore } from '@store/globalStore' import { costanti } from '@costanti' +import { CMySelect } from '../CMySelect' +import { CTitleBanner } from '../CTitleBanner' export default defineComponent({ name: 'CAccomodation', @@ -27,12 +29,12 @@ export default defineComponent({ }, title: String, mylist: { - type: Object as PropType, + type: [Array, String, undefined, null] as PropType, required: true, }, }, emits: ['showandsave'], - components: { }, + components: { CMySelect, CTitleBanner }, setup(props, { emit }) { const $q = useQuasar() const { t } = useI18n() @@ -41,7 +43,7 @@ export default defineComponent({ const displayGall = ref(false) - const listobj = ref([]) + const listobj = ref([]) const maximizedToggle = ref(true) @@ -66,21 +68,16 @@ export default defineComponent({ }) function created() { - // console.log('created cgallery') + console.log('created CAccomodation', props.mylist) 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) - } - }) + listobj.value = myarr } } else { - listobj.value = [ - ] + listobj.value = [] } } @@ -100,7 +97,7 @@ export default defineComponent({ function getlist() { if (listobj.value) // return listobj.value.slice().sort((a: any, b: any) => a.order! - b.order!) - return listobj.value + return listobj.value.filter((rec) => rec.num > 0) else return null } @@ -144,7 +141,7 @@ export default defineComponent({ } function save() { - console.log('CGallery save', listobj.value) + console.log('CAccomodation save', listobj.value) if (listobj.value.length > 0) { emit('showandsave', listobj.value) } else { @@ -156,6 +153,17 @@ export default defineComponent({ return '' } + function add_newbed() { + const rec: IAccomodation = { + type: 2, + location: 2, + num: 1, + } + listobj.value.push(rec) + + save() + } + onMounted(created) return { @@ -174,6 +182,7 @@ export default defineComponent({ isListImgValid, costanti, shared_consts, + add_newbed, } } }) diff --git a/src/components/CAccomodation/CAccomodation.vue b/src/components/CAccomodation/CAccomodation.vue index 5ed35a60..60b5131a 100755 --- a/src/components/CAccomodation/CAccomodation.vue +++ b/src/components/CAccomodation/CAccomodation.vue @@ -1,25 +1,65 @@