- 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 elemTop = rect.top
let elemBottom = rect.bottom
@@ -75,6 +75,16 @@ export default {
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() {

View File

@@ -37,6 +37,7 @@ export const shared_consts = {
CAROUSEL_IMGS: 110,
OPENSTREETMAP: 120,
MAINVIEW: 130,
CHECKAPPRUNNING: 135,
DASHBOARD: 140,
STATUSREG: 160,
CHECKIFISLOGGED: 170,
@@ -1353,6 +1354,10 @@ export const shared_consts = {
value: 210,
label: 'Notifiche in Top',
},
{
value: 135,
label: 'Check App Running',
},
{
value: 220,
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 newRecordBool = ref(false)
const newRecordBoolOld = ref(false)
const editRecordBool = ref(false)
const newRecord: any = ref({})
const recSaved: any = ref({})
@@ -278,6 +279,7 @@ export default defineComponent({
const tablesel = ref('')
const loading = ref(false)
const editOn = ref(false)
const visupagedialog = ref(false)
const myrecdialog = ref(null)
@@ -1818,6 +1820,15 @@ export default defineComponent({
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)
if (indrec >= 0)
serverData.value[indrec] = ris
@@ -2153,6 +2164,8 @@ export default defineComponent({
t,
exportTable,
showNotification,
editOn,
newRecordBoolOld,
}
}
})

View File

@@ -1,5 +1,12 @@
<template>
<div :class="$q.screen.lt.sm ? `` : `q-pa-xs`" v-if="isfinishLoading">
<q-toggle
v-if="tools.isManager()"
v-model="editOn"
color="green"
icon="fas fa-pencil-alt"
>
</q-toggle>
<div class="centermydiv q-my-sm" style="text-align: center">
<q-btn
v-if="mytable && visButtRow()"
@@ -303,6 +310,8 @@
/>
</div>
</div>
<q-page-container>
<q-page>
<q-infinite-scroll
ref="myinfscroll"
v-if="shared_consts.VERTIC_SHOW_GRID.includes(myvertical)"
@@ -335,7 +344,9 @@
shared_consts.TABLES_VISU_CMYSRECCARD.includes(tablesel))
"
>
<div v-if="row && shared_consts.TABLES_WITH_DATE.includes(tablesel)">
<div
v-if="row && shared_consts.TABLES_WITH_DATE.includes(tablesel)"
>
<div
v-if="
row.dateTimeStart &&
@@ -373,6 +384,7 @@
:table="tablesel"
:prop_myrec="row"
@cmdext="cmdExt"
:editOn="editOn"
>
</CMyRecCard>
</div>
@@ -435,7 +447,10 @@
` 100%)`
"
>
<q-toolbar class="bg-primary text-white" style="min-height: 30px">
<q-toolbar
class="bg-primary text-white"
style="min-height: 30px"
>
<q-toolbar-title>
{{
tools.isEntrataByRecMov(row)
@@ -448,7 +463,13 @@
<div v-for="col in mycolumns" :key="col.name">
<div
v-if="
showColCheck(col, tools.TIPOVIS_SHOW_RECORD, true, 1, row)
showColCheck(
col,
tools.TIPOVIS_SHOW_RECORD,
true,
1,
row
)
"
class="tdclass"
>
@@ -529,7 +550,9 @@
class="text-italic text-weight-bold"
>
<span
v-if="col && showColCheck(col, tools.TIPOVIS_SHOW_RECORD, true)"
v-if="
col && showColCheck(col, tools.TIPOVIS_SHOW_RECORD, true)
"
>
{{ col.label }}
</span>
@@ -838,7 +861,13 @@
<q-td v-for="col in mycolumns" :key="col.name" :props="props">
<div
v-if="
showColCheck(col, tools.TIPOVIS_SHOW_RECORD, true, 1, props.row)
showColCheck(
col,
tools.TIPOVIS_SHOW_RECORD,
true,
1,
props.row
)
"
class="tdclass"
>
@@ -846,7 +875,7 @@
<CMyPopupEdit
:table="mytable"
:canEdit="canEdit"
:canModify="tools.canModifyThisRec(props.row, tablesel)"
:canModify="tools.canModifyThisRec(props.row, tablesel) || editOn"
:disable="disabilita()"
:mycol="col"
v-model:row="props.row"
@@ -895,7 +924,9 @@
"
>
<q-bar
v-if="!visuinpage && tools.canModifyThisRec(props.row, tablesel)"
v-if="
!visuinpage && (tools.canModifyThisRec(props.row, tablesel) || editOn)
"
dense
class="bg-primary text-white full-height"
>
@@ -920,7 +951,7 @@
<q-space />
<q-btn
v-if="tools.canModifyThisRec(props.row, tablesel)"
v-if="tools.canModifyThisRec(props.row, tablesel) || editOn"
flat
round
color="white"
@@ -930,13 +961,14 @@
clickFunz(
props.row,
prop_mycolumns.find(
(rec) => rec.action === lists.MenuAction.CAN_EDIT_TABLE
(rec) =>
rec.action === lists.MenuAction.CAN_EDIT_TABLE
)
)
"
></q-btn>
<q-btn
v-if="tools.canModifyThisRec(props.row, tablesel)"
v-if="tools.canModifyThisRec(props.row, tablesel) || editOn"
flat
round
color="white"
@@ -946,7 +978,8 @@
clickFunz(
props.row,
prop_mycolumns.find(
(rec) => rec.action === lists.MenuAction.DELETE_RECTABLE
(rec) =>
rec.action === lists.MenuAction.DELETE_RECTABLE
)
)
"
@@ -991,7 +1024,7 @@
:table="mytable"
:canEdit="canEdit"
:canModify="
tools.canModifyThisRec(props.row, tablesel)
tools.canModifyThisRec(props.row, tablesel) || editOn
"
:disable="disabilita()"
:mycol="col"
@@ -1016,6 +1049,23 @@
</template>
</q-table>
<q-page-sticky
v-if="mytable && butt_modif_new"
position="bottom-right"
:offset="[18, 68]"
>
<q-btn
fab-mini
glossy
class="semi-transparent"
icon="add"
color="primary"
@click="createNewRecordDialog"
/>
</q-page-sticky>
</q-page>
</q-page-container>
<q-dialog
v-model="visupagedialog"
@hide="hidewindow"
@@ -1068,7 +1118,7 @@
<CMyPopupEdit
:table="mytable"
:canEdit="true"
:canModify="tools.canModifyThisRec(rowclicksel, tablesel)"
:canModify="tools.canModifyThisRec(rowclicksel, tablesel) || editOn"
:disable="disabilita()"
:isInModif="mycol.isInModif"
view="field"
@@ -1095,6 +1145,81 @@
:maximized="$q.screen.lt.sm"
permanent
>
<q-card class="dialog_card">
<q-bar dense class="bg-primary text-white">
Nuovo:
<q-space />
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
</q-bar>
<q-card-section class="inset-shadow">
<div
:class="$q.screen.lt.sm ? `` : `row` + ` text-blue `"
v-for="col in mycolumns"
:key="col.name"
>
<!--<div class="text-center q-my-xs" v-if="(col.fieldtype === costanti.FieldType.separator)">
<q-btn color="primary" size="md" dense :icon="!showfilteradv ? 'fas fa-arrow-down' : 'fas fa-arrow-up'"
label="Campi Avanzati" @click="showfilteradv = !showfilteradv"></q-btn>
</div>-->
<div
v-if="
showColCheck(
col,
tools.TIPOVIS_NEW_RECORD,
true,
0,
newRecord
) && col.foredit
"
>
<div class="">
<CMyPopupEdit
:table="mytable"
:canEdit="true"
:canModify="true"
:mycol="col"
v-model:row="newRecord"
:field="col.field"
:subfield="col.subfield"
:tablesel="col.tablesel"
:value_extra="getValueExtra(col, newRecord)"
:isInModif="true"
minuteinterval="1"
:visulabel="true"
:insertMode="true"
@save="SaveValue"
@show="selItem(newRecord, col)"
@showandsave="showandsel"
>
</CMyPopupEdit>
</div>
</div>
</div>
</q-card-section>
<q-card-actions align="center">
<q-btn
:label="$t('dialog.save')"
color="primary"
@click="saveNewRecord"
></q-btn>
<q-btn
flat
:label="$t('dialog.cancel')"
color="primary"
v-close-popup
@click="annulla"
></q-btn>
</q-card-actions>
</q-card>
</q-dialog>
<q-dialog
v-model="newRecordBoolOld"
@hide="hidewindow"
:maximized="$q.screen.lt.sm"
permanent
>
<q-card class="dialog_card">
<q-bar dense class="bg-primary text-white">
Nuovo:
@@ -1149,7 +1274,7 @@
</q-card-section>
<q-card-actions align="center">
<q-btn
:label="$t('dialog.ok')"
:label="$t('dialog.save')"
color="primary"
@click="saveNewRecord"
></q-btn>
@@ -1191,7 +1316,7 @@
<CMyPopupEdit
:table="mytable"
:canEdit="true"
:canModify="tools.canModifyThisRec(recModif, tablesel)"
:canModify="tools.canModifyThisRec(recModif, tablesel) || editOn"
:tablesel="col.tablesel"
:mycol="col"
:isInModif="true"

View File

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

View File

@@ -435,6 +435,10 @@
<div v-if="editOn" class="elemEdit">CMainView</div>
<CMainView></CMainView>
</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-if="editOn" class="elemEdit">CDashboard</div>
<CDashboard></CDashboard>

View File

@@ -624,7 +624,7 @@ export default defineComponent({
return '[---]'
else
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)
return '[---]'
else

View File

@@ -676,6 +676,31 @@
</div>
<div v-else>(Scegli)</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
v-else-if="
col.fieldtype === costanti.FieldType.select ||
@@ -754,6 +779,7 @@
col.fieldtype === costanti.FieldType.multiselect_by_server
"
>
myvalue: {{myvalue}}
<CMySelect
:type_out="col.field_outtype"
:col="col"

View File

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

View File

@@ -56,7 +56,7 @@
</q-item-label>
</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-btn rounded icon="fas fa-pencil-alt">
<q-menu>

View File

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

View File

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

View File

@@ -28,18 +28,7 @@ export default defineComponent({
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() {
initprompt()
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 {
/* height of all previous header rows */
top: 48px;
top: 60px;
}
.my-card-shadow {
@@ -1507,3 +1507,6 @@ h3 {
font-weight: bold;
}
.semi-transparent {
opacity: 0.7;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -180,6 +180,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
editOn: false,
myselector: { data: {}, table: ''},
addNewRecord: '',
isAppRunning: false,
}),
getters: {
@@ -1797,6 +1798,26 @@ export const useGlobalStore = defineStore('GlobalStore', {
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() {
let myserv = ''