diff --git a/.env.development b/.env.development index c9ff8c0c..eb5bb354 100755 --- a/.env.development +++ b/.env.development @@ -11,7 +11,7 @@ PROVA_PAOLO="PROVA ENV FUNZIONA!" LANG_DEFAULT="it" PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF" MASTER_KEY="KKPPSS5KJK435J3KSS9F9D8S9F8SD3CR3T" -MONGODB_HOST="http://192.168.1.6:3000" +MONGODB_HOST="http://192.168.1.8:3000" LOGO_REG="freeplanet-logo-full.svg" TEST_NAME="Paolo" TEST_SURNAME="Arena" diff --git a/.env.test b/.env.test index 1aeb2fcd..62b1be93 100755 --- a/.env.test +++ b/.env.test @@ -19,7 +19,7 @@ TEST_EMAIL="paolo@freeplanet.app" TEST_USERNAME="paoloar77" TEST_PASSWORD="passpao1fr@1A" TEST_APORTADOR="" -PUBLICKEY_PUSH="BNM-cEpTbPVc_ujXf3QOC8ggf7b-X44P44esfJUWqNOFq1XhWCoZJpOi71_cbXC5SnfO9HassQ6OouAYgtBA9Pw" +PUBLICKEY_PUSH="BNRBtL3iaLVGW-aQckwQBmh5uKKzcizOZsMjnzCtSuHkssEhbyioEN2E_CwItDLDShMO-OQ1uhK51ty6zG_gCT8" IN_CONSTRUCTION="0" DEBUG="1" TELEGRAM_SUPPORT="" diff --git a/quasar.conf.js b/quasar.conf.js index fd4837df..2a33e18c 100755 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -17,7 +17,7 @@ const webpack = require('webpack') const helpers = require('./helpers') const envparser = require('./config/envparser') -const ESLintPlugin = require('eslint-webpack-plugin') +// const ESLintPlugin = require('eslint-webpack-plugin') module.exports = configure((ctx) => ({ // https://v2.quasar.dev/quasar-cli/supporting-ts @@ -276,8 +276,8 @@ module.exports = configure((ctx) => ({ // for the custom service worker ONLY (/src-pwa/custom-service-worker.[js|ts]) // if using workbox in InjectManifest mode chainWebpackCustomSW(chain) { - chain.plugin('eslint-webpack-plugin') - .use(ESLintPlugin, [{ extensions: ['js'] }]) + // chain.plugin('eslint-webpack-plugin') + // .use(ESLintPlugin, [{ extensions: ['js'] }]) }, manifest: { diff --git a/quasar.extensions.json b/quasar.extensions.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/quasar.extensions.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/src-pwa/custom-service-worker.js b/src-pwa/custom-service-worker.js index f2b0850c..7271c0bb 100755 --- a/src-pwa/custom-service-worker.js +++ b/src-pwa/custom-service-worker.js @@ -74,7 +74,7 @@ if (!workbox) { } if (workbox) { - const debug = true + const debug = false workbox.setConfig({ debug }) const precacheList = self.__WB_MANIFEST || []; diff --git a/src/App.ts b/src/App.ts index e124186b..2a551b78 100755 --- a/src/App.ts +++ b/src/App.ts @@ -38,7 +38,7 @@ export default { } } - function created() { + async function created() { try { if (process.env.DEV) { console.info('SESSIONE IN SVILUPPO ! (DEV)') @@ -67,7 +67,7 @@ export default { if (chiamaautologin) { // console.log('CHIAMA autologin_FromLocalStorage') - userStore.autologin_FromLocalStorage($router) + await userStore.autologin_FromLocalStorage($router) .then((loadstorage: any) => { if (loadstorage) { diff --git a/src/components/CDateTime/CDateTime.ts b/src/components/CDateTime/CDateTime.ts index 523e6d3a..0064284c 100755 --- a/src/components/CDateTime/CDateTime.ts +++ b/src/components/CDateTime/CDateTime.ts @@ -69,7 +69,7 @@ export default defineComponent({ const saveit = ref(false) const myvalue = ref(new Date()) const valueprec = ref(new Date()) - const valueDate = toRef(props, 'valueDate') + const myvalueDate = toRef(props, 'valueDate') function getclass() { return 'calendar_comp ' + props.data_class @@ -80,10 +80,10 @@ export default defineComponent({ saveit.value = false valueprec.value = myvalue.value if (myvalue.value === undefined) { - valueDate.value = new Date() - myvalue.value = tools.getstrYYMMDDDateTime(valueDate.value) + myvalueDate.value = new Date() + myvalue.value = tools.getstrYYMMDDDateTime(myvalueDate.value) } - // console.log('Opening', valueDate, myvalue) + // console.log('Opening', myvalueDate, myvalue) emit('show') } @@ -97,9 +97,11 @@ export default defineComponent({ } } - watch(() => props.valueDate, (value, oldval) => { - if (props.valueDate) - myvalue.value = tools.getstrYYMMDDDateTime(props.valueDate) + watch(() => myvalueDate.value, (value, oldval) => { + if (myvalueDate.value) { + myvalue.value = tools.getstrYYMMDDDateTime(myvalueDate.value) + console.log('myvalue Date = ', myvalue.value) + } }) @@ -129,7 +131,7 @@ export default defineComponent({ if (props.value !== null) myvalue.value = props.value else - myvalue.value = tools.getstrYYMMDDDateTime(valueDate.value) + myvalue.value = tools.getstrYYMMDDDateTime(myvalueDate.value) // console.log('created myvalue', myvalue) } @@ -166,6 +168,8 @@ export default defineComponent({ Closing, Opening, getclass, + myvalue, + showDateTimeScroller, } }, }) diff --git a/src/components/CDateTime/CDateTime.vue b/src/components/CDateTime/CDateTime.vue index bf08193f..49fa6a47 100755 --- a/src/components/CDateTime/CDateTime.vue +++ b/src/components/CDateTime/CDateTime.vue @@ -1,72 +1,82 @@ diff --git a/src/components/CGallery/CGallery.ts b/src/components/CGallery/CGallery.ts index 2ee5970a..a6bc3b24 100755 --- a/src/components/CGallery/CGallery.ts +++ b/src/components/CGallery/CGallery.ts @@ -211,7 +211,7 @@ export default defineComponent({ } function save() { - emit('showandsave', mylistimages) + emit('showandsave', mylistimages.value) } function getsrcimg(mygallery: any) { @@ -237,6 +237,8 @@ export default defineComponent({ copytoclipboard, deleteFile, getsrcimg, + tools, + uploaded, } } }) diff --git a/src/components/CGallery/CGallery.vue b/src/components/CGallery/CGallery.vue index 5f604d05..553131dd 100755 --- a/src/components/CGallery/CGallery.vue +++ b/src/components/CGallery/CGallery.vue @@ -2,12 +2,12 @@
-
+
- +
{{ listimages.length }} files @@ -22,7 +22,7 @@
-
+
diff --git a/src/components/CGridTableRec/CGridTableRec.ts b/src/components/CGridTableRec/CGridTableRec.ts index ec6b2205..1044084e 100755 --- a/src/components/CGridTableRec/CGridTableRec.ts +++ b/src/components/CGridTableRec/CGridTableRec.ts @@ -1,4 +1,4 @@ -import { defineComponent, PropType, ref, watch, toRef, onMounted, toRefs } from 'vue' +import { defineComponent, PropType, ref, watch, toRef, onMounted, toRefs, computed } from 'vue' import { useI18n } from '@src/boot/i18n' import { tools } from '../../store/Modules/tools' @@ -95,6 +95,7 @@ export default defineComponent({ const { t } = useI18n() const userStore = useUserStore() const globalStore = useGlobalStore() + const isfinishLoading = computed(() => globalStore.finishLoading) const mypagination = toRef(props, 'pagination') @@ -302,7 +303,7 @@ export default defineComponent({ } function disabilita() { - if ((mytable.value === 'users') && (isTutor)) { + if ((mytable.value === 'users') && (isTutor())) { return true } @@ -323,7 +324,7 @@ export default defineComponent({ } function undoVal() { - console.log('undoVal', 'colsel', colsel, 'valprec', valPrec, 'colkey', colkey, 'selected', rowsel) + console.log('undoVal', 'colsel', colsel.value, 'valprec', valPrec, 'colkey', colkey, 'selected', rowsel.value) // console.table(serverData) if (colsel.value) { if (colsel.value.subfield !== '') { @@ -340,7 +341,7 @@ export default defineComponent({ } function SaveValdb(newVal: any, valinitial: any) { - // console.log('SaveValdb', newVal) + console.log('SaveValdb', newVal) // console.log('SaveValue', newVal, 'rowsel', rowsel) colsel.value = colclicksel.value @@ -353,7 +354,7 @@ export default defineComponent({ function showandsel(row: any, col: any, newval: any, valinitial: any) { // console.log('showandsel', row, col, newval) rowsel = row - colsel = col + colsel.value = col idsel = row._id SaveValue(newval, valinitial) @@ -369,7 +370,7 @@ export default defineComponent({ } function SaveValue(newVal: any, valinitial: any) { - // console.log('SaveValue', newVal, 'rowsel', rowsel) + console.log('SaveValue', newVal, 'rowsel', rowsel, 'colsel', colsel.value) if (colsel.value) { // Update value in table memory @@ -384,7 +385,7 @@ export default defineComponent({ const mydata = { id: idsel, - table: mytable, + table: mytable.value, fieldsvalue: {} } @@ -396,9 +397,7 @@ export default defineComponent({ } // mydata.fieldsvalue[colsel.value.field][colsel.subfield] = newVal } else { - if (colsel.value) { - mydata.fieldsvalue[colsel.value.field!] = newVal - } + mydata.fieldsvalue[colsel.value.field!] = newVal } } @@ -456,14 +455,17 @@ export default defineComponent({ } async function createNewRecord() { + console.log('createNewRecord') loading.value = true const mydata: any = { - table: mytable, + table: mytable.value, data: {} } - mydata.data = props.defaultnewrec + if (props.defaultnewrec) { + mydata.data = props.defaultnewrec + } // const mykey = fieldsTable.getKeyByTable(mytable) @@ -493,14 +495,14 @@ export default defineComponent({ } function mounted() { - console.log('GridTable mounted', tablesel) + //console.log('GridTable mounted', tablesel) if (!!props.tablesList) { canEdit.value = tools.getCookie(tools.CAN_EDIT, canEdit) === 'true' tablesel.value = tools.getCookie('tablesel', tablesel) } myfilterand.value = props.filterdef - console.log('tablesel', tablesel) + // console.log('tablesel', tablesel) if (tablesel.value === '') { if (!!props.tablesList) @@ -509,7 +511,7 @@ export default defineComponent({ tablesel.value = mytable.value } - console.log('2) tablesel', tablesel) + // console.log('2) tablesel', tablesel) changeTable(false) @@ -518,7 +520,7 @@ export default defineComponent({ function clickFunz(item: any, col: IColGridTable) { if (col.action) { - tools.ActionRecTable(null, col.action, mytable.value, item._id, item, col.askaction) + tools.ActionRecTable($q, col.action, mytable.value, item._id, item, col.askaction) } } @@ -548,9 +550,9 @@ export default defineComponent({ } function changeCol(newval: any) { - console.log('changecol', mytable) + console.log('changecol', mytable.value) if (!!mytable.value) { - tools.setCookie(mytable, colVisib.value.join('|')) + tools.setCookie(mytable.value, colVisib.value.join('|')) } } @@ -606,7 +608,7 @@ export default defineComponent({ updatedcol() if (!!mytable.value) { - const myselcol = tools.getCookie(mytable, '') + const myselcol = tools.getCookie(mytable.value, '') if (!!myselcol && myselcol.length > 0) { colVisib.value = myselcol.split('|') } else { @@ -682,7 +684,7 @@ export default defineComponent({ console.log('saveNewRecord') savenewRec.value = true const mydata = { - table: mytable, + table: mytable.value, data: {} } @@ -705,10 +707,6 @@ export default defineComponent({ } } - function isfinishLoading() { - return globalStore.finishLoading - } - function getlabelAddRow() { return props.labelBtnAddRow } @@ -765,6 +763,9 @@ export default defineComponent({ myfilter, disabilita, newRecordBool, + lists, + refresh, + spinner_visible, } } }) diff --git a/src/components/CGridTableRec/CGridTableRec.vue b/src/components/CGridTableRec/CGridTableRec.vue index f599cef6..d92ee726 100755 --- a/src/components/CGridTableRec/CGridTableRec.vue +++ b/src/components/CGridTableRec/CGridTableRec.vue @@ -1,5 +1,5 @@ -