- Installa APP: Messaggio in CIMA
- in sistemazione: select compare la scelta di prima.
This commit is contained in:
12
src/App.ts
12
src/App.ts
@@ -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() {
|
||||
|
||||
@@ -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',
|
||||
|
||||
0
src/components/CCheckAppRunning/CCheckAppRunning.scss
Executable file
0
src/components/CCheckAppRunning/CCheckAppRunning.scss
Executable file
54
src/components/CCheckAppRunning/CCheckAppRunning.ts
Executable file
54
src/components/CCheckAppRunning/CCheckAppRunning.ts
Executable 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,
|
||||
}
|
||||
}
|
||||
})
|
||||
31
src/components/CCheckAppRunning/CCheckAppRunning.vue
Executable file
31
src/components/CCheckAppRunning/CCheckAppRunning.vue
Executable 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>
|
||||
1
src/components/CCheckAppRunning/index.ts
Executable file
1
src/components/CCheckAppRunning/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CCheckAppRunning} from './CCheckAppRunning.vue'
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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: {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -25,6 +25,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
editOn: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
|
||||
setup(props, { emit }) {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
0
src/components/CRegistration/CRegistration.scss
Executable file
0
src/components/CRegistration/CRegistration.scss
Executable file
29
src/components/CRegistration/CRegistration.ts
Executable file
29
src/components/CRegistration/CRegistration.ts
Executable 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,
|
||||
}
|
||||
},
|
||||
})
|
||||
39
src/components/CRegistration/CRegistration.vue
Executable file
39
src/components/CRegistration/CRegistration.vue
Executable 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>
|
||||
1
src/components/CRegistration/index.ts
Executable file
1
src/components/CRegistration/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CRegistration} from './CRegistration.vue'
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -106,7 +106,7 @@ export interface IUserProfile {
|
||||
refused_circuits: any[]
|
||||
manage_mycircuits: ICircuit[]
|
||||
useraccounts: IAccount[]
|
||||
calc?: ICalc
|
||||
calc: ICalc
|
||||
}
|
||||
|
||||
export interface ICalc{
|
||||
|
||||
@@ -177,6 +177,7 @@ const msg_it = {
|
||||
ok: 'Ok',
|
||||
yes: 'Si',
|
||||
no: 'No',
|
||||
save: 'Salva',
|
||||
delete: 'Elimina',
|
||||
cancel: 'Annulla',
|
||||
update: 'Aggiorna',
|
||||
|
||||
@@ -317,6 +317,7 @@ export const costanti = {
|
||||
multiselect_by_server: 4010,
|
||||
nationality: 4096,
|
||||
intcode: 5000,
|
||||
option: 5500,
|
||||
multioption: 6000,
|
||||
onlydate: 7000,
|
||||
hours: 8000,
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||
@@ -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 ?
|
||||
|
||||
@@ -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 = ''
|
||||
|
||||
Reference in New Issue
Block a user