From 5153c143dd94b73806f95118ee7348fbd32002d0 Mon Sep 17 00:00:00 2001 From: Paolo Arena Date: Mon, 20 Jan 2020 01:50:21 +0100 Subject: [PATCH] fix Registrazione data fix linkref fix controllo login fix pagination CGridTableRec --- quasar.conf.js | 1 + .../CGridTableRec/CGridTableRec.scss | 30 ++ src/components/CGridTableRec/CGridTableRec.ts | 8 +- .../CGridTableRec/CGridTableRec.vue | 5 +- src/components/CMyChipList/CMyChipList.vue | 10 +- src/components/CMyFieldDb/CMyFieldDb.ts | 14 + src/components/CMyFieldDb/CMyFieldDb.vue | 444 +++++++++--------- src/components/CMyPopupEdit/CMyPopupEdit.ts | 45 +- src/components/CSignIn/CSignIn.vue | 2 +- src/components/CSignUp/CSignUp.ts | 1 - src/components/CTitleBanner/CTitleBanner.vue | 2 +- .../FormNewsletter/FormNewsletter.ts | 2 +- src/components/Header/Header.scss | 4 - src/components/Header/Header.ts | 2 +- src/components/index.ts | 3 + src/layouts/menuone/menuOne.scss | 4 - src/model/GlobalStore.ts | 2 + src/model/UserStore.ts | 9 + src/model/index.ts | 1 + src/model/signup-option.ts | 2 +- src/rootgen/admin/newsletter/newsletter.ts | 2 +- src/rootgen/admin/usersList/usersList.vue | 4 +- src/statics/i18n.js | 103 +++- src/store/Modules/GlobalStore.ts | 36 +- src/store/Modules/MessageStore.ts | 4 +- src/store/Modules/UserStore.ts | 42 +- src/store/Modules/fieldsTable.ts | 4 + src/store/Modules/index.ts | 1 + src/store/Modules/serv_constants.ts | 2 + src/store/Modules/tools.ts | 40 +- src/views/login/requestresetpwd.vue | 123 ----- src/views/login/updatepassword.vue | 1 - src/views/login/vreg/vreg.ts | 2 +- 33 files changed, 540 insertions(+), 415 deletions(-) delete mode 100644 src/views/login/requestresetpwd.vue diff --git a/quasar.conf.js b/quasar.conf.js index 0d3f495..4c30c4d 100644 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -165,6 +165,7 @@ module.exports = function (ctx) { 'QColor', 'QIcon', 'QList', + 'QKnob', 'QItemLabel', 'QItem', 'QCard', diff --git a/src/components/CGridTableRec/CGridTableRec.scss b/src/components/CGridTableRec/CGridTableRec.scss index 4129ee2..71fdbe5 100644 --- a/src/components/CGridTableRec/CGridTableRec.scss +++ b/src/components/CGridTableRec/CGridTableRec.scss @@ -6,3 +6,33 @@ max-width: 250px; min-width: 200px; } + +.my-sticky-header-table { + /* max height is important */ + /* this is when the loading indicator appears */ + +} +.my-sticky-header-table .q-table__middle { + max-height: 650px !important; + @media (max-width: 718px) { + // PER VERSIONE MOBILE + max-height: 400px !important; + } +} +.my-sticky-header-table .q-table__top, +.my-sticky-header-table .q-table__bottom, +.my-sticky-header-table thead tr:first-child th { + /* bg color is important for th; just specify one */ + background-color: #f0ffff; +} +.my-sticky-header-table thead tr th { + position: sticky; + z-index: 1; +} +.my-sticky-header-table thead tr:first-child th { + top: 0; +} +.my-sticky-header-table.q-table--loading thead tr:last-child th { + /* height of all previous header rows */ + top: 48px; +} diff --git a/src/components/CGridTableRec/CGridTableRec.ts b/src/components/CGridTableRec/CGridTableRec.ts index f903dc7..2b8a52a 100644 --- a/src/components/CGridTableRec/CGridTableRec.ts +++ b/src/components/CGridTableRec/CGridTableRec.ts @@ -206,7 +206,7 @@ export default class CGridTableRec extends Vue { const startRow = (page - 1) * rowsPerPage const endRow = startRow + fetchCount - console.log('startRow', startRow, 'endRow', endRow) + // console.log('startRow', startRow, 'endRow', endRow) this.serverData = [] @@ -233,7 +233,7 @@ export default class CGridTableRec extends Vue { this.pagination.sortBy = sortBy this.pagination.descending = descending - console.log('this.pagination', this.pagination) + // console.log('this.pagination', this.pagination) // ...and turn of loading indicator this.loading = false @@ -350,7 +350,7 @@ export default class CGridTableRec extends Vue { } public saveFieldValue(mydata) { - console.log('saveFieldValue', mydata) + // console.log('saveFieldValue', mydata) // Save on Server GlobalStore.actions.saveFieldValue(mydata).then((esito) => { @@ -541,7 +541,7 @@ export default class CGridTableRec extends Vue { return this.selected.length === 0 ? '' : `${this.selected.length} record${this.selected.length > 1 ? 's' : ''} selected of ${this.serverData.length}` } public selectionclick(details) { - console.log('selectionclick this.selected', this.selected, 'details', details) + // console.log('selectionclick this.selected', this.selected, 'details', details) if (details.added) { this.rowclicksel = details.rows[0] this.colclicksel = details.keys[0] diff --git a/src/components/CGridTableRec/CGridTableRec.vue b/src/components/CGridTableRec/CGridTableRec.vue index 76152f1..8715011 100644 --- a/src/components/CGridTableRec/CGridTableRec.vue +++ b/src/components/CGridTableRec/CGridTableRec.vue @@ -3,6 +3,9 @@ - diff --git a/src/components/CMyChipList/CMyChipList.vue b/src/components/CMyChipList/CMyChipList.vue index 5e65090..14c9406 100644 --- a/src/components/CMyChipList/CMyChipList.vue +++ b/src/components/CMyChipList/CMyChipList.vue @@ -1,12 +1,18 @@ diff --git a/src/components/CMyFieldDb/CMyFieldDb.ts b/src/components/CMyFieldDb/CMyFieldDb.ts index 5b78dc8..f56d009 100644 --- a/src/components/CMyFieldDb/CMyFieldDb.ts +++ b/src/components/CMyFieldDb/CMyFieldDb.ts @@ -77,6 +77,11 @@ export default class CMyFieldDb extends MixinBase { return '[---]' else return fieldsTable.getMultiValueByTable(this.col, val) + } else if (this.col.fieldtype === tools.FieldType.multioption) { + if (val === undefined) + return '[---]' + else + return fieldsTable.getMultiValueByTable(this.col, val) } else if (this.col.fieldtype === tools.FieldType.password) { if (val === undefined) return '[---]' @@ -115,6 +120,15 @@ export default class CMyFieldDb extends MixinBase { this.setValDb(this.mykey, this.myvalue, this.type, this.serv, this.table, this.mysubkey) } + public savefieldboolean(value) { + if (this.myvalue === undefined) + this.myvalue = 'true' + else + this.myvalue = value + + this.setValDb(this.mykey, this.myvalue, this.type, this.serv, this.table, this.mysubkey) + } + public selectcountry({name, iso2, dialCode}) { // console.log(name, iso2, dialCode) this.myvalue = iso2 diff --git a/src/components/CMyFieldDb/CMyFieldDb.vue b/src/components/CMyFieldDb/CMyFieldDb.vue index 1460a8d..2dc51d1 100644 --- a/src/components/CMyFieldDb/CMyFieldDb.vue +++ b/src/components/CMyFieldDb/CMyFieldDb.vue @@ -1,231 +1,233 @@ diff --git a/src/components/CMyPopupEdit/CMyPopupEdit.ts b/src/components/CMyPopupEdit/CMyPopupEdit.ts index 0a3c90b..dac72d3 100644 --- a/src/components/CMyPopupEdit/CMyPopupEdit.ts +++ b/src/components/CMyPopupEdit/CMyPopupEdit.ts @@ -14,7 +14,7 @@ import { CGallery } from '../CGallery' @Component({ name: 'CMyPopupEdit', - components: {CMyChipList, CDateTime, CMyToggleList, CMySelect, CMyEditor, CGallery } + components: { CMyChipList, CDateTime, CMyToggleList, CMySelect, CMyEditor, CGallery } }) export default class CMyPopupEdit extends Vue { @@ -28,6 +28,7 @@ export default class CMyPopupEdit extends Vue { @Prop({ required: false, default: '5' }) public minuteinterval public myvalue = '' + public myvalueprec = 'false' public countryname = '' get tools() { @@ -41,6 +42,7 @@ export default class CMyPopupEdit extends Vue { get db_fieldsTable() { return fieldsTable } + public changeval(newval) { this.$emit('update:row', newval) } @@ -50,6 +52,7 @@ export default class CMyPopupEdit extends Vue { } public mounted() { + // console.log('mounted') if ((this.subfield !== '') && (this.subfield !== '')) { if (this.row[this.field] === undefined) { this.row[this.field] = {} @@ -63,6 +66,10 @@ export default class CMyPopupEdit extends Vue { else this.myvalue = this.row } + + this.myvalueprec = this.myvalue + + // console.log('this.myvalueprec', this.myvalueprec) } public OpenEdit() { @@ -70,9 +77,29 @@ export default class CMyPopupEdit extends Vue { this.$emit('show') } + public getval() { + let myval = 'false' + + if ((this.subfield !== '') && (this.subfield !== '')) { + if (this.row[this.field] === undefined) { + this.row[this.field] = {} + myval = '' + } else { + myval = this.row[this.field][this.subfield] + } + } else { + if (this.field !== '') + myval = this.row[this.field] + else + myval = this.row + } + + return myval + } + public SaveValueInt(newVal, valinitial) { - console.log('SaveValueInt', newVal, valinitial) + // console.log('SaveValueInt', newVal, valinitial) // Update value in table memory if (this.subfield !== '') { @@ -91,6 +118,16 @@ export default class CMyPopupEdit extends Vue { public Savedb(newVal, valinitial) { + if (this.col.fieldtype === tools.FieldType.boolean) { + // console.log('this.myvalue', this.myvalue, newVal, this.myvalueprec) + if (this.myvalueprec === undefined) { + newVal = true + this.myvalueprec = this.myvalue + this.myvalue = newVal + } + // console.log('DOPO this.myvalue', this.myvalue, newVal, this.myvalueprec) + } + // console.log('Savedb', newVal) this.$emit('showandsave', this.row, this.col, newVal, valinitial) @@ -171,13 +208,15 @@ export default class CMyPopupEdit extends Vue { } - public selectcountry({name, iso2, dialCode}) { + public selectcountry({ name, iso2, dialCode }) { // console.log(name, iso2, dialCode) + this.myvalueprec = this.myvalue this.myvalue = iso2 this.countryname = name } public intcode_change(coderec) { + this.myvalueprec = this.myvalue this.myvalue = '+' + coderec.dialCode } diff --git a/src/components/CSignIn/CSignIn.vue b/src/components/CSignIn/CSignIn.vue index fc030e6..942ad83 100644 --- a/src/components/CSignIn/CSignIn.vue +++ b/src/components/CSignIn/CSignIn.vue @@ -38,7 +38,7 @@ diff --git a/src/components/CSignUp/CSignUp.ts b/src/components/CSignUp/CSignUp.ts index cbcf403..aa10ab5 100644 --- a/src/components/CSignUp/CSignUp.ts +++ b/src/components/CSignUp/CSignUp.ts @@ -53,7 +53,6 @@ export default class CSignUp extends MixinBase { terms: !process.env.PROD, profile: DefaultProfile, aportador_solidario: '', - already_registered: false } public created() { diff --git a/src/components/CTitleBanner/CTitleBanner.vue b/src/components/CTitleBanner/CTitleBanner.vue index 1e25413..6e74a1e 100644 --- a/src/components/CTitleBanner/CTitleBanner.vue +++ b/src/components/CTitleBanner/CTitleBanner.vue @@ -8,7 +8,7 @@ @click="myvisible = !myvisible" >