fix Registrazione data
fix linkref fix controllo login fix pagination CGridTableRec
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
|
||||
<q-table
|
||||
flat
|
||||
bordered
|
||||
class="my-sticky-header-table"
|
||||
:data="serverData"
|
||||
:columns="mycolumns"
|
||||
:filter="myfilter"
|
||||
@@ -176,6 +179,6 @@
|
||||
<script lang="ts" src="./CGridTableRec.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
<style lang="scss" >
|
||||
@import './CGridTableRec.scss';
|
||||
</style>
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
<template>
|
||||
<div class="clchip">
|
||||
<div class="row clchip">
|
||||
<div v-for="(rec, index) in myarrvalues">
|
||||
<q-chip dense
|
||||
<q-chip v-if="rec.icon"
|
||||
dense
|
||||
:color="rec.color"
|
||||
text-color="white"
|
||||
:icon="rec.icon">
|
||||
{{rec.label}}
|
||||
</q-chip>
|
||||
<q-chip dense
|
||||
:color="rec.color"
|
||||
text-color="white">
|
||||
{{rec.label}}
|
||||
</q-chip>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,231 +1,233 @@
|
||||
<template>
|
||||
<div class="text-center">
|
||||
<div class="row items-center justify-center q-gutter-md q-ma-xs">
|
||||
<div class="q-ma-xs">
|
||||
<q-field rounded outlined bg-color="orange-3" dense style="min-width:110px;">
|
||||
<template v-slot:control>
|
||||
<div class="self-center full-width no-outline text-center" tabindex="0">{{title}}</div>
|
||||
</template>
|
||||
</q-field>
|
||||
</div>
|
||||
<div :class="getclassCol(col) + ` q-ma-sm q-pa-sm col-grow rounded-borders`" style="border: 1px solid #bbb">
|
||||
<div v-if="type === tools.FieldType.date">
|
||||
<CDateTime
|
||||
:label="col.label"
|
||||
class="cursor-pointer"
|
||||
:value.sync="myvalue"
|
||||
:readonly="false"
|
||||
:dense="true"
|
||||
:canEdit="canEdit"
|
||||
>
|
||||
</CDateTime>
|
||||
</div>
|
||||
<div v-else :class="mycl">
|
||||
<div v-if="type === tools.FieldType.binary">
|
||||
<CMyChipList
|
||||
:type="tools.FieldType.binary"
|
||||
:value="myvalue"
|
||||
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
</div>
|
||||
<!-- Show Value -->
|
||||
<div v-else-if="type === tools.FieldType.nationality">
|
||||
<q-input
|
||||
input-class="cursor-pointer text-center"
|
||||
:readonly="true"
|
||||
v-model="countryname"
|
||||
rounded
|
||||
dense
|
||||
debounce="1000"
|
||||
>
|
||||
|
||||
<div class="hidden">
|
||||
<vue-country-code
|
||||
:defaultCountry="myvalue"
|
||||
:disabledFetchingCountry="true"
|
||||
@onSelect="selectcountry"
|
||||
:preferredCountries="tools.getprefCountries"
|
||||
:dropdownOptions="{ disabledDialCode: true }">
|
||||
|
||||
</vue-country-code>
|
||||
</div>
|
||||
|
||||
</q-input>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.intcode">
|
||||
|
||||
{{ myvalprinted }}
|
||||
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.multiselect">
|
||||
<CMyChipList
|
||||
:type="tools.FieldType.multiselect"
|
||||
:value="myvalue"
|
||||
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.select">
|
||||
<CMyChipList
|
||||
myclass="text-center"
|
||||
:type="tools.FieldType.select"
|
||||
:value="myvalue"
|
||||
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.html">
|
||||
<div v-html="myvalprinted">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.boolean">
|
||||
<q-toggle dark color="green" v-model="myvalue" :label="col.title"
|
||||
@input="savefield"></q-toggle>
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ myvalprinted }}
|
||||
</div>
|
||||
|
||||
<q-popup-edit
|
||||
v-if="(canEdit && type !== tools.FieldType.boolean) && !disable"
|
||||
v-model="myvalue"
|
||||
:disable="col.disable"
|
||||
:title="col.title"
|
||||
@save="savefield"
|
||||
buttons
|
||||
>
|
||||
|
||||
<div v-if="type === tools.FieldType.boolean">
|
||||
<q-checkbox v-model="myvalue" :label="col.title">
|
||||
</q-checkbox>
|
||||
{{ visuValByType(myvalue) }}
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.string">
|
||||
<q-input v-model="myvalue"
|
||||
|
||||
autogrow
|
||||
@keyup.enter.stop
|
||||
autofocus>
|
||||
|
||||
</q-input>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.password">
|
||||
<q-input v-model="myvalue"
|
||||
type="password"
|
||||
@keyup.enter.stop
|
||||
autofocus>
|
||||
|
||||
</q-input>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.number">
|
||||
<q-input v-model="myvalue" type="number"
|
||||
autofocus>
|
||||
|
||||
</q-input>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.binary">
|
||||
<CMyToggleList :label="col.title"
|
||||
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:value.sync="myvalue"
|
||||
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="db_fieldsTable.getLabelByTable(col.jointable)">
|
||||
</CMyToggleList>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.html">
|
||||
<CMyEditor :value.sync="myvalue" :title="title" @keyup.enter.stop>
|
||||
|
||||
</CMyEditor>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.select">
|
||||
<CMySelect :label="col.title"
|
||||
:value.sync="myvalue"
|
||||
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
|
||||
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:useinput="false">
|
||||
</CMySelect>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.nationality">
|
||||
<div class="justify-center q-gutter-sm clgutter q-mt-sm">
|
||||
<q-input
|
||||
v-model="countryname"
|
||||
:readonly="true"
|
||||
rounded dense
|
||||
debounce="1000"
|
||||
:label="title">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<div style="font-size: 1rem;">
|
||||
<vue-country-code
|
||||
:defaultCountry="myvalue"
|
||||
:disabledFetchingCountry="true"
|
||||
@onSelect="selectcountry"
|
||||
:preferredCountries="tools.getprefCountries"
|
||||
:dropdownOptions="{ disabledDialCode: true }">
|
||||
|
||||
</vue-country-code>
|
||||
</div>
|
||||
</template>
|
||||
</q-input>
|
||||
<div style="height: 180px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.intcode">
|
||||
|
||||
<div class="justify-center q-gutter-sm clgutter q-mt-sm">
|
||||
<vue-tel-input
|
||||
@country-changed="intcode_change"
|
||||
v-model="myvalue"
|
||||
:disabledFetchingCountry="true"
|
||||
:preferredCountries="tools.getprefCountries"
|
||||
:placeholder="$t('reg.cell')"
|
||||
:enabledCountryCode="true"
|
||||
inputClasses="clCell"
|
||||
wrapperClasses="clCellCode">
|
||||
</vue-tel-input>
|
||||
<div style="height: 180px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.multiselect">
|
||||
<q-select
|
||||
v-model="myvalue"
|
||||
rounded
|
||||
outlined
|
||||
multiple
|
||||
dense
|
||||
options-dense
|
||||
:display-value="db_fieldsTable.getTitleByTable(col.jointable)"
|
||||
emit-value
|
||||
map-options
|
||||
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:option-label="db_fieldsTable.getLabelByTable(col.jointable)"
|
||||
:option-value="db_fieldsTable.getKeyByTable(col.jointable)"
|
||||
style="min-width: 150px"
|
||||
>
|
||||
|
||||
</q-select>
|
||||
</div>
|
||||
|
||||
</q-popup-edit>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<div class="row items-center justify-center q-gutter-md q-ma-xs">
|
||||
<div class="q-ma-xs">
|
||||
<q-field rounded outlined bg-color="orange-3" dense style="min-width:110px;">
|
||||
<template v-slot:control>
|
||||
<div class="self-center full-width no-outline text-center" tabindex="0">{{title}}</div>
|
||||
</template>
|
||||
</q-field>
|
||||
</div>
|
||||
<div :class="getclassCol(col) + ` q-ma-sm q-pa-sm col-grow rounded-borders`" style="border: 1px solid #bbb">
|
||||
<div v-if="type === tools.FieldType.date">
|
||||
<CDateTime
|
||||
:label="col.label"
|
||||
class="cursor-pointer"
|
||||
:value.sync="myvalue"
|
||||
:readonly="false"
|
||||
:dense="true"
|
||||
:canEdit="canEdit"
|
||||
>
|
||||
</CDateTime>
|
||||
</div>
|
||||
<div v-else :class="mycl">
|
||||
<div v-if="type === tools.FieldType.binary">
|
||||
<CMyChipList
|
||||
:type="tools.FieldType.binary"
|
||||
:value="myvalue"
|
||||
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
</div>
|
||||
<!-- Show Value -->
|
||||
<div v-else-if="type === tools.FieldType.nationality">
|
||||
<q-input
|
||||
input-class="cursor-pointer text-center"
|
||||
:readonly="true"
|
||||
v-model="countryname"
|
||||
rounded
|
||||
dense
|
||||
debounce="1000"
|
||||
>
|
||||
|
||||
<div class="hidden">
|
||||
<vue-country-code
|
||||
:defaultCountry="myvalue"
|
||||
:disabledFetchingCountry="true"
|
||||
@onSelect="selectcountry"
|
||||
:preferredCountries="tools.getprefCountries"
|
||||
:dropdownOptions="{ disabledDialCode: true }">
|
||||
|
||||
</vue-country-code>
|
||||
</div>
|
||||
|
||||
</q-input>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.intcode">
|
||||
|
||||
{{ myvalprinted }}
|
||||
|
||||
</div>
|
||||
<div v-else-if="((type === tools.FieldType.multiselect) || (type === tools.FieldType.multioption))">
|
||||
<CMyChipList
|
||||
:type="type"
|
||||
:value="myvalue"
|
||||
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.select">
|
||||
<CMyChipList
|
||||
myclass="text-center"
|
||||
:type="tools.FieldType.select"
|
||||
:value="myvalue"
|
||||
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
|
||||
:opticon="db_fieldsTable.getIconByTable(col.jointable)"></CMyChipList>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.html">
|
||||
<div v-html="myvalprinted">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.boolean">
|
||||
<q-toggle dark color="green" v-model="myvalue" :label="col.title"
|
||||
@input="savefieldboolean"></q-toggle>
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ myvalprinted }}
|
||||
</div>
|
||||
|
||||
<q-popup-edit
|
||||
v-if="(canEdit && type !== tools.FieldType.boolean) && !disable"
|
||||
v-model="myvalue"
|
||||
:disable="col.disable"
|
||||
:title="col.title"
|
||||
@save="savefield"
|
||||
buttons
|
||||
>
|
||||
|
||||
<div v-if="type === tools.FieldType.boolean">
|
||||
<q-checkbox v-model="myvalue" :label="col.title">
|
||||
</q-checkbox>
|
||||
{{ visuValByType(myvalue) }}
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.string">
|
||||
<q-input v-model="myvalue"
|
||||
|
||||
autogrow
|
||||
@keyup.enter.stop
|
||||
autofocus>
|
||||
|
||||
</q-input>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.password">
|
||||
<q-input v-model="myvalue"
|
||||
type="password"
|
||||
@keyup.enter.stop
|
||||
autofocus>
|
||||
|
||||
</q-input>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.number">
|
||||
<q-input v-model="myvalue" type="number"
|
||||
autofocus>
|
||||
|
||||
</q-input>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.binary">
|
||||
<CMyToggleList :label="col.title"
|
||||
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:value.sync="myvalue"
|
||||
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="db_fieldsTable.getLabelByTable(col.jointable)">
|
||||
</CMyToggleList>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.html">
|
||||
<CMyEditor :value.sync="myvalue" :title="title" @keyup.enter.stop>
|
||||
|
||||
</CMyEditor>
|
||||
</div>
|
||||
<div v-else-if="type === tools.FieldType.select">
|
||||
<CMySelect :label="col.title"
|
||||
:value.sync="myvalue"
|
||||
:optval="db_fieldsTable.getKeyByTable(col.jointable)"
|
||||
:optlab="db_fieldsTable.getLabelByTable(col.jointable)"
|
||||
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:useinput="false">
|
||||
</CMySelect>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.nationality">
|
||||
<div class="justify-center q-gutter-sm clgutter q-mt-sm">
|
||||
<q-input
|
||||
v-model="countryname"
|
||||
:readonly="true"
|
||||
rounded dense
|
||||
debounce="1000"
|
||||
:label="title">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<div style="font-size: 1rem;">
|
||||
<vue-country-code
|
||||
:defaultCountry="myvalue"
|
||||
:disabledFetchingCountry="true"
|
||||
@onSelect="selectcountry"
|
||||
:preferredCountries="tools.getprefCountries"
|
||||
:dropdownOptions="{ disabledDialCode: true }">
|
||||
|
||||
</vue-country-code>
|
||||
</div>
|
||||
</template>
|
||||
</q-input>
|
||||
<div style="height: 180px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.intcode">
|
||||
|
||||
<div class="justify-center q-gutter-sm clgutter q-mt-sm">
|
||||
<vue-tel-input
|
||||
@country-changed="intcode_change"
|
||||
v-model="myvalue"
|
||||
:disabledFetchingCountry="true"
|
||||
:preferredCountries="tools.getprefCountries"
|
||||
:placeholder="$t('reg.cell')"
|
||||
:enabledCountryCode="true"
|
||||
inputClasses="clCell"
|
||||
wrapperClasses="clCellCode">
|
||||
</vue-tel-input>
|
||||
<div style="height: 180px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.multiselect">
|
||||
<q-select
|
||||
v-model="myvalue"
|
||||
rounded
|
||||
dense
|
||||
outlined
|
||||
multiple
|
||||
options-dense
|
||||
:display-value="db_fieldsTable.getTitleByTable(col.jointable)"
|
||||
emit-value
|
||||
map-options
|
||||
:options="db_fieldsTable.getTableJoinByName(col.jointable)"
|
||||
:option-label="db_fieldsTable.getLabelByTable(col.jointable)"
|
||||
:option-value="db_fieldsTable.getKeyByTable(col.jointable)"
|
||||
style="min-width: 150px"
|
||||
>
|
||||
|
||||
</q-select>
|
||||
</div>
|
||||
<div v-else-if="col.fieldtype === tools.FieldType.multioption">
|
||||
</div>
|
||||
|
||||
</q-popup-edit>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyFieldDb.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CMyFieldDb.scss';
|
||||
@import './CMyFieldDb.scss';
|
||||
</style>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
</q-input>
|
||||
<div class="text-center" style="margin-bottom: 10px;">
|
||||
<a :href="getlinkforgetpwd" style="color:gray;">{{$t('reg.forgetpassword')}}</a>
|
||||
<a :href="getlinkforgetpwd()" style="color:gray;">{{$t('reg.forgetpassword')}}</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@ export default class CSignUp extends MixinBase {
|
||||
terms: !process.env.PROD,
|
||||
profile: DefaultProfile,
|
||||
aportador_solidario: '',
|
||||
already_registered: false
|
||||
}
|
||||
|
||||
public created() {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
@click="myvisible = !myvisible"
|
||||
>
|
||||
<template v-slot:avatar>
|
||||
<q-icon v-if="canopen" :name="icon" color="white"/>
|
||||
<q-icon v-if="canopen && icon" :name="icon" color="white"/>
|
||||
</template>
|
||||
<template v-slot:action>
|
||||
<div class="cursor-pointer">
|
||||
|
||||
@@ -49,7 +49,7 @@ export default class FormNewsletter extends MixinBase {
|
||||
return await Api.SendReq('/news/signup', 'POST', usertosend, false)
|
||||
.then((res) => {
|
||||
|
||||
console.log('res', res)
|
||||
// console.log('res', res)
|
||||
if (res.data.code === serv_constants.RIS_SUBSCRIBED_OK) {
|
||||
this.$q.notify({
|
||||
color: 'green-4',
|
||||
|
||||
@@ -234,10 +234,6 @@ canvas {
|
||||
content: url('../../statics/icons/flag_it.svg');
|
||||
}
|
||||
|
||||
.fa-flag-it:before {
|
||||
content: url('../../statics/icons/flag_it.svg');
|
||||
}
|
||||
|
||||
.clIconOnline {
|
||||
color: white;
|
||||
}
|
||||
|
||||
@@ -346,7 +346,7 @@ export default class Header extends Vue {
|
||||
}
|
||||
|
||||
public loginOk() {
|
||||
tools.loginOk(this, false)
|
||||
tools.loginOk(this, true)
|
||||
}
|
||||
|
||||
public loginInCorso() {
|
||||
|
||||
@@ -40,3 +40,6 @@ export * from './CTitleBanner'
|
||||
export * from './CGallery'
|
||||
export * from './CProfile'
|
||||
export * from './CStatus'
|
||||
export * from './CStatusReg'
|
||||
export * from './CCardState'
|
||||
export * from './CMyInnerPage'
|
||||
|
||||
Reference in New Issue
Block a user