- Installa APP: Messaggio in CIMA

- in sistemazione: select compare la scelta di prima.
This commit is contained in:
Surya Paolo
2022-12-07 18:16:23 +01:00
parent 077c2dbd9e
commit 944d121943
29 changed files with 1119 additions and 752 deletions

View File

@@ -58,7 +58,7 @@ export default {
} }
} }
function isScrolledIntoView (el: any) { function isScrolledIntoView(el: any) {
let rect = el.getBoundingClientRect() let rect = el.getBoundingClientRect()
let elemTop = rect.top let elemTop = rect.top
let elemBottom = rect.bottom let elemBottom = rect.bottom
@@ -75,6 +75,16 @@ export default {
console.log('scrolled') console.log('scrolled')
} }
} }
let displayMode = 'browser';
const mqStandAlone = '(display-mode: standalone)';
// @ts-ignore
if (((navigator && (navigator.standalone))) ||
(window.matchMedia(mqStandAlone).matches)) {
displayMode = 'standalone'
}
globalStore.isAppRunning = displayMode === 'standalone';
} }
function mounted() { function mounted() {

View File

@@ -37,6 +37,7 @@ export const shared_consts = {
CAROUSEL_IMGS: 110, CAROUSEL_IMGS: 110,
OPENSTREETMAP: 120, OPENSTREETMAP: 120,
MAINVIEW: 130, MAINVIEW: 130,
CHECKAPPRUNNING: 135,
DASHBOARD: 140, DASHBOARD: 140,
STATUSREG: 160, STATUSREG: 160,
CHECKIFISLOGGED: 170, CHECKIFISLOGGED: 170,
@@ -1353,6 +1354,10 @@ export const shared_consts = {
value: 210, value: 210,
label: 'Notifiche in Top', label: 'Notifiche in Top',
}, },
{
value: 135,
label: 'Check App Running',
},
{ {
value: 220, value: 220,
label: 'CHART', label: 'CHART',

View File

@@ -0,0 +1,54 @@
import { defineComponent, ref, computed, PropType, toRef } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n'
import { tools } from '@store/Modules/tools'
import { costanti, IMainCard } from '@store/Modules/costanti'
import { CBigBtn } from '@/components/CBigBtn'
export default defineComponent({
name: 'CCheckAppRunning',
components: { CBigBtn },
props: {},
setup(props, { emit }) {
const userStore = useUserStore()
const $router = useRouter()
const globalStore = useGlobalStore()
const { t } = useI18n()
const deferredPrompt = ref(<any>null)
const isAppRunning = computed(() => globalStore.isAppRunning )
const finishLoading = computed(() => globalStore.finishLoading)
function initprompt() {
window.addEventListener('beforeinstallprompt', (event) => {
event.preventDefault()
console.log('beforeinstallprompt !')
// Stash the event so it can be triggered later.
deferredPrompt.value = event
})
}
function installApp() {
if (deferredPrompt.value)
deferredPrompt.value.prompt()
}
initprompt()
return {
userStore,
tools,
costanti,
finishLoading,
deferredPrompt,
installApp,
isAppRunning,
}
}
})

View File

@@ -0,0 +1,31 @@
<template>
<div v-if="finishLoading && !isAppRunning && deferredPrompt" class="row justify-center">
<q-btn
glossy
size="xl"
label="Installa App"
@click="installApp"
icon="fas fa-mobile-alt"
color="white"
text-color="green"
/>
</div>
<!--<div class="row justify-center">
<CBigBtn
label="Info" to="" @click="showInfo = true" icon="fas fa-info" color="primary"
:numcol="3"
>
</CBigBtn>
</div>
<div v-if="showInfo">
</div>-->
</template>
<script lang="ts" src="./CCheckAppRunning.ts">
</script>
<style lang="scss" scoped>
@import './CCheckAppRunning.scss';
</style>

View File

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

View File

@@ -264,6 +264,7 @@ export default defineComponent({
const addRow = ref('Aggiungi') const addRow = ref('Aggiungi')
const newRecordBool = ref(false) const newRecordBool = ref(false)
const newRecordBoolOld = ref(false)
const editRecordBool = ref(false) const editRecordBool = ref(false)
const newRecord: any = ref({}) const newRecord: any = ref({})
const recSaved: any = ref({}) const recSaved: any = ref({})
@@ -278,6 +279,7 @@ export default defineComponent({
const tablesel = ref('') const tablesel = ref('')
const loading = ref(false) const loading = ref(false)
const editOn = ref(false)
const visupagedialog = ref(false) const visupagedialog = ref(false)
const myrecdialog = ref(null) const myrecdialog = ref(null)
@@ -1818,6 +1820,15 @@ export default defineComponent({
ris.username = userStore.my.username ris.username = userStore.my.username
} }
if (userStore.my.profile) {
if (fieldsTable.tableforEnableCircuits.includes(props.prop_mytable)) {
if (!userStore.my.profile.calc.numGoodsAndServices)
userStore.my.profile.calc.numGoodsAndServices = 1
else
userStore.my.profile.calc.numGoodsAndServices += 1
}
}
// console.table(serverData.value) // console.table(serverData.value)
if (indrec >= 0) if (indrec >= 0)
serverData.value[indrec] = ris serverData.value[indrec] = ris
@@ -2153,6 +2164,8 @@ export default defineComponent({
t, t,
exportTable, exportTable,
showNotification, showNotification,
editOn,
newRecordBoolOld,
} }
} }
}) })

File diff suppressed because it is too large Load Diff

View File

@@ -21,6 +21,7 @@ import { CMyFieldRec } from '@src/components/CMyFieldRec'
import { CSelectColor } from '@src/components/CSelectColor' import { CSelectColor } from '@src/components/CSelectColor'
import { CMainView } from '@src/components/CMainView' import { CMainView } from '@src/components/CMainView'
import { CDashboard } from '@src/components/CDashboard' import { CDashboard } from '@src/components/CDashboard'
import { CCheckAppRunning } from '@src/components/CCheckAppRunning'
import { CStatusReg } from '@src/components/CStatusReg' import { CStatusReg } from '@src/components/CStatusReg'
import { CTitleBanner } from '@src/components/CTitleBanner' import { CTitleBanner } from '@src/components/CTitleBanner'
import { CCheckIfIsLogged } from '@src/components/CCheckIfIsLogged' import { CCheckIfIsLogged } from '@src/components/CCheckIfIsLogged'
@@ -44,7 +45,7 @@ export default defineComponent({
CSelectColor, CSelectFontSize, CImgPoster, CSelectColor, CSelectFontSize, CImgPoster,
CCheckIfIsLogged, CStatusReg, CDashboard, CMainView, CNotifAtTop, CCheckIfIsLogged, CStatusReg, CDashboard, CMainView, CNotifAtTop,
CPresentazione, CPresentazione,
CTitleBanner, CShareSocial, CTitleBanner, CShareSocial, CCheckAppRunning,
}, },
emits: ['selElemClick'], emits: ['selElemClick'],
props: { props: {

View File

@@ -435,6 +435,10 @@
<div v-if="editOn" class="elemEdit">CMainView</div> <div v-if="editOn" class="elemEdit">CMainView</div>
<CMainView></CMainView> <CMainView></CMainView>
</div> </div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CHECKAPPRUNNING">
<div v-if="editOn" class="elemEdit">CheckAppRunning</div>
<CCheckAppRunning />
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.DASHBOARD"> <div v-else-if="myel.type === shared_consts.ELEMTYPE.DASHBOARD">
<div v-if="editOn" class="elemEdit">CDashboard</div> <div v-if="editOn" class="elemEdit">CDashboard</div>
<CDashboard></CDashboard> <CDashboard></CDashboard>

View File

@@ -624,7 +624,7 @@ export default defineComponent({
return '[---]' return '[---]'
else else
return globalStore.getArrStrByValueBinary(col, val) return globalStore.getArrStrByValueBinary(col, val)
} else if (col.fieldtype === costanti.FieldType.select) { } else if ((col.fieldtype === costanti.FieldType.select) || (col.fieldtype === costanti.FieldType.option)) {
if (val === undefined) if (val === undefined)
return '[---]' return '[---]'
else else

View File

@@ -676,6 +676,31 @@
</div> </div>
<div v-else>(Scegli)</div> <div v-else>(Scegli)</div>
</div> </div>
<div v-else-if="col.fieldtype === costanti.FieldType.multioption">
<q-option-group
v-model="myvalue"
:inline="col.inline"
:type="col.typeobj"
:label="col.label ? col.label : $t(col.label_trans)"
@update:model-value="changevalRec"
:options="globalStore.getTableJoinLabelValueByName(col)"
></q-option-group>
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.option">
<q-option-group
v-model="myvalue"
type="toggle"
@update:model-value="changevalRec"
:options="
globalStore.getTableJoinByName(
col.jointable,
col.addall,
col.addnone,
col.filter
)
"
></q-option-group>
</div>
<div <div
v-else-if=" v-else-if="
col.fieldtype === costanti.FieldType.select || col.fieldtype === costanti.FieldType.select ||
@@ -754,6 +779,7 @@
col.fieldtype === costanti.FieldType.multiselect_by_server col.fieldtype === costanti.FieldType.multiselect_by_server
" "
> >
myvalue: {{myvalue}}
<CMySelect <CMySelect
:type_out="col.field_outtype" :type_out="col.field_outtype"
:col="col" :col="col"

View File

@@ -25,6 +25,11 @@ export default defineComponent({
required: false, required: false,
default: null, default: null,
}, },
editOn: {
type: Boolean,
required: false,
default: false,
}
}, },
setup(props, { emit }) { setup(props, { emit }) {

View File

@@ -56,7 +56,7 @@
</q-item-label> </q-item-label>
</q-item-section> </q-item-section>
<q-item-section side v-if="tools.canModifyThisRec(myrec)"> <q-item-section side v-if="tools.canModifyThisRec(myrec) || editOn">
<q-item-label> <q-item-label>
<q-btn rounded icon="fas fa-pencil-alt"> <q-btn rounded icon="fas fa-pencil-alt">
<q-menu> <q-menu>

View File

@@ -272,6 +272,7 @@ export default defineComponent({
if (myvalue.value && JSON.stringify(myvalue.value)) { if (myvalue.value && JSON.stringify(myvalue.value)) {
saveLastOpt(props.optval, JSON.stringify(myvalue.value)) saveLastOpt(props.optval, JSON.stringify(myvalue.value))
} }
saveOptInCookie([myvalue.value])
emit('update:value', myvalue.value) emit('update:value', myvalue.value)
emit('changeval', myvalue.value) emit('changeval', myvalue.value)
@@ -388,6 +389,8 @@ export default defineComponent({
rec = arrtempOpt.value.find((myrec: any) => val === (myrec[`${props.optval}`])) rec = arrtempOpt.value.find((myrec: any) => val === (myrec[`${props.optval}`]))
if (rec) { if (rec) {
myarrvalue.value.push(rec[`${props.optval}`]) myarrvalue.value.push(rec[`${props.optval}`])
} else {
myarrvalue.value.push(val)
} }
} }
} else { } else {

View File

@@ -1,6 +1,7 @@
<template> <template>
<div class="text-center"> <div class="text-center">
<div v-if="multiselect_by_server"> <div v-if="multiselect_by_server">
myarrvalue: {{myarrvalue}}
<q-select <q-select
:model-value="myarrvalue" :model-value="myarrvalue"
@update:model-value="changeval" @update:model-value="changeval"

View File

@@ -28,18 +28,7 @@ export default defineComponent({
const globalStore = useGlobalStore() const globalStore = useGlobalStore()
function initprompt() {
window.addEventListener('beforeinstallprompt', (event) => {
// console.log('******************************** beforeinstallprompt fired')
event.preventDefault()
// console.log('§§§§§§§§§§§§§§§§§§§§ IMPOSTA DEFERRED PROMPT !!!!!!!!!!!!!!!!! ')
// #Todo++ IMPOSTA DEFERRED PROMPT
return false
})
}
function created() { function created() {
initprompt()
animare.value = process.env.DEV ? 0 : 8000 animare.value = process.env.DEV ? 0 : 8000
} }

View File

@@ -0,0 +1,29 @@
import { tools } from '@store/Modules/tools'
import { computed, defineComponent, reactive, ref, watch } from 'vue'
import { useQuasar } from 'quasar'
import { useI18n } from '@/boot/i18n'
import { DefaultProfile, useUserStore } from '@store/UserStore'
import { useRoute, useRouter } from 'vue-router'
import { static_data } from '@/db/static_data'
import { useGlobalStore } from '@store/globalStore'
export default defineComponent({
name: 'CRegistration',
components: { },
setup(props, { emit }) {
const $q = useQuasar()
const { t } = useI18n()
const userStore = useUserStore()
const globalStore = useGlobalStore()
const $route = useRoute()
const $router = useRouter()
const site = ref(globalStore.site)
return {
tools,
site,
}
},
})

View File

@@ -0,0 +1,39 @@
<template>
<div>
<div
v-if="site.confpages.enableReg && site.confpages.enableRegByBot"
style="margin-top: 10px; text-align: center"
>
Se non sei ancora Registrato:<br />
<q-btn
type="a"
rounded
size="md"
color="primary"
href="/bot"
:label="$t('reg.submit')"
>
</q-btn>
</div>
<div
v-else-if="site.confpages.enableReg"
style="margin-top: 10px; text-align: center"
>
Se non sei ancora Registrato:<br />
<q-btn
rounded
size="md"
color="primary"
to="/signup"
:label="$t('reg.submit')"
>
</q-btn>
</div>
</div>
</template>
<script lang="ts" src="./CRegistration.ts">
</script>
<style lang="scss" scoped>
@import './CRegistration.scss';
</style>

View File

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

View File

@@ -879,7 +879,7 @@ h3 {
.my-sticky-header-table.q-table--loading thead tr:last-child th { .my-sticky-header-table.q-table--loading thead tr:last-child th {
/* height of all previous header rows */ /* height of all previous header rows */
top: 48px; top: 60px;
} }
.my-card-shadow { .my-card-shadow {
@@ -1507,3 +1507,6 @@ h3 {
font-weight: bold; font-weight: bold;
} }
.semi-transparent {
opacity: 0.7;
}

View File

@@ -450,6 +450,7 @@ export interface IGlobalState {
editOn?: boolean, editOn?: boolean,
myselector: ISelector, myselector: ISelector,
addNewRecord: string, addNewRecord: string,
isAppRunning: boolean
} }
export interface IMenuList { export interface IMenuList {
@@ -706,9 +707,12 @@ export interface IColGridTable {
foredit?: boolean foredit?: boolean
isInModif?: boolean isInModif?: boolean
fieldtype?: number fieldtype?: number
typeobj?: string
inline?: boolean
fieldtype_real?: number fieldtype_real?: number
field_outtype?: number field_outtype?: number
noshowlabel?: boolean noshowlabel?: boolean
numpag_carousel?: number
tipovisu?: number tipovisu?: number
link?: string link?: string
jointable?: string jointable?: string

View File

@@ -106,7 +106,7 @@ export interface IUserProfile {
refused_circuits: any[] refused_circuits: any[]
manage_mycircuits: ICircuit[] manage_mycircuits: ICircuit[]
useraccounts: IAccount[] useraccounts: IAccount[]
calc?: ICalc calc: ICalc
} }
export interface ICalc{ export interface ICalc{

View File

@@ -177,6 +177,7 @@ const msg_it = {
ok: 'Ok', ok: 'Ok',
yes: 'Si', yes: 'Si',
no: 'No', no: 'No',
save: 'Salva',
delete: 'Elimina', delete: 'Elimina',
cancel: 'Annulla', cancel: 'Annulla',
update: 'Aggiorna', update: 'Aggiorna',

View File

@@ -317,6 +317,7 @@ export const costanti = {
multiselect_by_server: 4010, multiselect_by_server: 4010,
nationality: 4096, nationality: 4096,
intcode: 5000, intcode: 5000,
option: 5500,
multioption: 6000, multioption: 6000,
onlydate: 7000, onlydate: 7000,
hours: 8000, hours: 8000,

View File

@@ -77,6 +77,8 @@ function AddCol(params: IColGridTable) {
field_outtype: (params.field_outtype === undefined) ? costanti.FieldType.string : params.field_outtype, field_outtype: (params.field_outtype === undefined) ? costanti.FieldType.string : params.field_outtype,
tipovisu: (params.tipovisu === undefined) ? costanti.TipoVisu.NONE : params.tipovisu, tipovisu: (params.tipovisu === undefined) ? costanti.TipoVisu.NONE : params.tipovisu,
link: (params.link === undefined) ? '' : params.link, link: (params.link === undefined) ? '' : params.link,
typeobj: (params.typeobj === undefined) ? '' : params.typeobj,
inline: (params.inline === undefined) ? '' : params.inline,
askaction: (params.askaction === undefined) ? '' : params.askaction, askaction: (params.askaction === undefined) ? '' : params.askaction,
tablesel: (params.tablesel === undefined) ? '' : params.tablesel, tablesel: (params.tablesel === undefined) ? '' : params.tablesel,
jointable: (params.jointable === undefined) ? '' : params.jointable, jointable: (params.jointable === undefined) ? '' : params.jointable,
@@ -86,6 +88,7 @@ function AddCol(params: IColGridTable) {
allowchar: (params.allowchar === undefined) ? null : params.allowchar, allowchar: (params.allowchar === undefined) ? null : params.allowchar,
showWhen: (params.showWhen === undefined) ? costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView : params.showWhen, showWhen: (params.showWhen === undefined) ? costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView : params.showWhen,
noshowlabel: (params.noshowlabel === undefined) ? false : params.noshowlabel, noshowlabel: (params.noshowlabel === undefined) ? false : params.noshowlabel,
numpag_carousel: (params.numpag_carousel === undefined) ? 0 : params.numpag_carousel,
notsave: (params.notsave === undefined) ? false : params.notsave, notsave: (params.notsave === undefined) ? false : params.notsave,
filter_table: (params.filter_table === undefined) ? '' : params.filter_table, filter_table: (params.filter_table === undefined) ? '' : params.filter_table,
remote_table: (params.remote_table === undefined) ? '' : params.remote_table, remote_table: (params.remote_table === undefined) ? '' : params.remote_table,
@@ -830,7 +833,7 @@ export const colmyGoods = [
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '', titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
minlength: 50, minlength: 50,
isadvanced_field: true, isadvanced_field: true,
required: true, required: false,
}), }),
AddCol({ AddCol({
name: 'idSectorGood', name: 'idSectorGood',
@@ -940,15 +943,31 @@ export const colmyGoods = [
] ]
export const colmySkills = [ export const colmySkills = [
AddCol({
name: 'adType',
label_trans: 'adTypes.name',
fieldtype: costanti.FieldType.multioption,
required: true,
jointable: 'adtypes',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
icon: 'fas fa-bullhorn',
noshowlabel: true,
numpag_carousel: 1,
inline: true,
typeobj: 'radio',
}),
AddCol({ AddCol({
name: 'idStatusSkill', name: 'idStatusSkill',
label_trans: 'statusSkill.name', label_trans: 'statusSkill.name',
fieldtype: costanti.FieldType.multiselect, fieldtype: costanti.FieldType.multioption,
jointable: 'statusSkills', jointable: 'statusSkills',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
noshowlabel: true, noshowlabel: true,
icon: 'mood', icon: 'mood',
required: true, required: true,
numpag_carousel: 1,
inline: true,
typeobj: 'checkbox',
}), }),
AddCol({ AddCol({
@@ -974,6 +993,7 @@ export const colmySkills = [
remote_key: '_id', remote_key: '_id',
remote_field: 'comune', remote_field: 'comune',
required: true, required: true,
numpag_carousel: 2,
}), }),
AddCol({ AddCol({
name: 'pub_to_share', name: 'pub_to_share',
@@ -982,16 +1002,7 @@ export const colmySkills = [
jointable: 'pub_to_share', jointable: 'pub_to_share',
icon: 'fas fa-users', icon: 'fas fa-users',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
}), numpag_carousel: 2,
AddCol({
name: 'adType',
label_trans: 'adTypes.name',
fieldtype: costanti.FieldType.select,
required: true,
jointable: 'adtypes',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
icon: 'fas fa-bullhorn',
noshowlabel: true,
}), }),
AddCol({ AddCol({
name: 'descr', name: 'descr',
@@ -1002,13 +1013,15 @@ export const colmySkills = [
maxlength: 120, maxlength: 120,
required: true, required: true,
sortable: false, sortable: false,
numpag_carousel: 3,
}), }),
AddCol({ AddCol({
name: 'note', label_trans: 'proj.descrapprof', fieldtype: costanti.FieldType.html, name: 'note', label_trans: 'proj.descrapprof', fieldtype: costanti.FieldType.html,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '', titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
required: true, required: false,
isadvanced_field: true, isadvanced_field: true,
numpag_carousel: 3,
}), }),
AddCol({ AddCol({
name: 'idSector', name: 'idSector',
@@ -1019,6 +1032,7 @@ export const colmySkills = [
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
visible: true, visible: true,
icon: 'category', icon: 'category',
numpag_carousel: 4,
}), }),
AddCol({ AddCol({
name: 'idSkill', name: 'idSkill',
@@ -1033,6 +1047,7 @@ export const colmySkills = [
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
allowNewValue: false, allowNewValue: false,
required: false, required: false,
numpag_carousel: 4,
}), }),
AddCol({ AddCol({
name: 'idContribType', name: 'idContribType',
@@ -1044,33 +1059,23 @@ export const colmySkills = [
icon: 'fas fa-hand-holding', icon: 'fas fa-hand-holding',
// icon: 'fas fa-hands-helping', // icon: 'fas fa-hands-helping',
// isadvanced_field: true, // isadvanced_field: true,
numpag_carousel: 5,
}), }),
AddCol({ AddCol({
name: '', name: 'photos',
fieldtype: costanti.FieldType.separator, label_trans: 'skill.photos',
required: false, fieldtype: costanti.FieldType.listimages,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit, jointable: '',
visible: false, showpicprofile_ifnotset: true,
}), showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
/*AddCol({
name: 'idSubSkill',
label_trans: 'skill.subskill',
fieldtype: costanti.FieldType.multiselect,
required: false,
jointable: 'subskills',
filter_table: 'skills',
filter_field: 'idSkill',
noshowlabel: true,
icon: 'far fa-id-card',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
allowNewValue: true,
isadvanced_field: true, isadvanced_field: true,
numpag_carousel: 6,
}),
AddCol({
name: 'website', label_trans: 'reg.website', isadvanced_field: true, fieldtype: costanti.FieldType.link,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
numpag_carousel: 6,
}), }),
*/
AddCol({ AddCol({
name: 'numLevel', name: 'numLevel',
label_trans: 'level.name', label_trans: 'level.name',
@@ -1081,6 +1086,7 @@ export const colmySkills = [
noshowlabel: false, noshowlabel: false,
icon: 'grading', icon: 'grading',
isadvanced_field: true, isadvanced_field: true,
numpag_carousel: 7,
}), }),
AddCol({ AddCol({
name: 'date_created', label_trans: 'event.dateCreated', fieldtype: costanti.FieldType.onlydate, name: 'date_created', label_trans: 'event.dateCreated', fieldtype: costanti.FieldType.onlydate,
@@ -1089,20 +1095,7 @@ export const colmySkills = [
sortable: true, sortable: true,
showWhen: 0 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,
}),
// **ADDFIELD_MYSKILL // **ADDFIELD_MYSKILL
AddCol({
name: 'website', label_trans: 'reg.website', isadvanced_field: true, fieldtype: costanti.FieldType.link,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist
}),
AddCol(DuplicateRec), AddCol(DuplicateRec),
AddCol(ModifRec), AddCol(ModifRec),
AddCol(DeleteRec), AddCol(DeleteRec),
@@ -1221,7 +1214,7 @@ export const colmyHosp = [
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '', titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
isadvanced_field: true, isadvanced_field: true,
required: true, required: false,
sortable: false, sortable: false,
}), }),
AddCol({ AddCol({
@@ -1339,7 +1332,7 @@ export const colmyBachecas = [
name: 'note', label_trans: 'proj.descrapprof', fieldtype: costanti.FieldType.html, name: 'note', label_trans: 'proj.descrapprof', fieldtype: costanti.FieldType.html,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '', titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
required: true, required: false,
isadvanced_field: true, isadvanced_field: true,
sortable: false, sortable: false,
}), }),
@@ -3062,6 +3055,13 @@ export const fieldsTable = {
'myhosps', 'myhosps',
], ],
tableforEnableCircuits: [
'myskills',
'mygoods',
'mybachecas',
'myhosps',
],
circuitslistcomplete() { circuitslistcomplete() {
return colTableCircuitComplete return colTableCircuitComplete
}, },

View File

@@ -6604,7 +6604,7 @@ export const tools = {
_id: 0, _id: 0,
idSector: tools.getSelectionByTable('sectors', 0, true), idSector: tools.getSelectionByTable('sectors', 0, true),
idSkill: tools.getSelectionByTable('skills', 0, true), idSkill: tools.getSelectionByTable('skills', 0, true),
idStatusSkill: tools.getSelectionByTable('statusSkills', []), idStatusSkill: tools.getSelectionByTable('statusSkills', [1]),
idContribType: tools.getSelectionByTable('contribtypes', []), idContribType: tools.getSelectionByTable('contribtypes', []),
idCity: this.getCitySel(), idCity: this.getCitySel(),
NumLevel: 0, NumLevel: 0,
@@ -6760,8 +6760,8 @@ export const tools = {
const userStore = useUserStore() const userStore = useUserStore()
//if (tools.isTest() && (userStore.isAdmin || userStore.isManager)) //if (tools.isTest() && (userStore.isAdmin || userStore.isManager))
if ((userStore.isAdmin || userStore.isManager)) // if ((userStore.isAdmin || userStore.isManager))
return true // return true
if (shared_consts.TABLES_WITH_ADMINS.includes(tablesel)) { if (shared_consts.TABLES_WITH_ADMINS.includes(tablesel)) {
// is Admin ? // is Admin ?

View File

@@ -180,6 +180,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
editOn: false, editOn: false,
myselector: { data: {}, table: ''}, myselector: { data: {}, table: ''},
addNewRecord: '', addNewRecord: '',
isAppRunning: false,
}), }),
getters: { getters: {
@@ -1797,6 +1798,26 @@ export const useGlobalStore = defineStore('GlobalStore', {
return '' return ''
}, },
getTableJoinLabelValueByName(col: IColGridTable) {
let myarrrec: any = []
if (col.jointable) {
let myarrtab = this.getTableJoinByName(col.jointable, col.addall, col.addnone, col.filter)
const key = fieldsTable.getKeyByTable(col.jointable)
const collab = fieldsTable.getLabelByTable(col.jointable)
for (let index = 0; index < myarrtab.length; index++) {
let obj = {label: '', value: 0}
obj.label = myarrtab[index][collab]
obj.value = myarrtab[index][key]
myarrrec.push(obj)
}
}
return myarrrec
},
getServerHost() { getServerHost() {
let myserv = '' let myserv = ''