+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/CFacebookFrame/index.ts b/src/components/CFacebookFrame/index.ts
new file mode 100644
index 0000000..ff3a74f
--- /dev/null
+++ b/src/components/CFacebookFrame/index.ts
@@ -0,0 +1 @@
+export {default as CFacebookFrame} from './CFacebookFrame.vue'
diff --git a/src/components/CGridTableRec/CGridTableRec.ts b/src/components/CGridTableRec/CGridTableRec.ts
index 7c2ecd5..6438766 100644
--- a/src/components/CGridTableRec/CGridTableRec.ts
+++ b/src/components/CGridTableRec/CGridTableRec.ts
@@ -97,7 +97,7 @@ export default class CGridTableRec extends Vue {
}
public SaveValue(newVal, valinitial) {
- console.log('SaveValue', newVal, 'rowsel', this.rowsel)
+ // console.log('SaveValue', newVal, 'rowsel', this.rowsel)
// Update value in table memory
if (this.colsel.subfield !== '') {
diff --git a/src/components/CMyPopupEdit/CMyPopupEdit.ts b/src/components/CMyPopupEdit/CMyPopupEdit.ts
index 00f2408..8b70c74 100644
--- a/src/components/CMyPopupEdit/CMyPopupEdit.ts
+++ b/src/components/CMyPopupEdit/CMyPopupEdit.ts
@@ -52,13 +52,13 @@ export default class CMyPopupEdit extends Vue {
}
public OpenEdit() {
- console.log('OpenEdit')
+ // console.log('OpenEdit')
this.$emit('show')
}
public SaveValueInt(newVal, valinitial) {
- console.log('SaveValueInt', newVal)
+ // console.log('SaveValueInt', newVal)
// Update value in table memory
if (this.subfield !== '') {
diff --git a/src/components/Header/Header.vue b/src/components/Header/Header.vue
index ace39ad..b3f6e57 100644
--- a/src/components/Header/Header.vue
+++ b/src/components/Header/Header.vue
@@ -128,7 +128,6 @@
-
diff --git a/src/components/index.ts b/src/components/index.ts
index 67b5583..c6e82fe 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -3,6 +3,7 @@ export * from './todos'
export * from './logo'
export * from './CProgress'
export * from './CCard'
+export * from './CCardDiscipline'
export * from './CBook'
export * from './CMyPage'
export * from './CTitle'
@@ -25,4 +26,5 @@ export * from './BannerCookies'
export * from './PagePolicy'
export * from './FormNewsletter'
export * from './CGridTableRec'
+export * from './CFacebookFrame'
export * from './Shen/CTesseraElettronica'
diff --git a/src/model/GlobalStore.ts b/src/model/GlobalStore.ts
index 96402e1..42d4e42 100644
--- a/src/model/GlobalStore.ts
+++ b/src/model/GlobalStore.ts
@@ -34,6 +34,25 @@ export interface ISettings {
value_num?: number
}
+export interface ITeachUname {
+ username?: string
+}
+
+export interface IDiscipline {
+ typol_code?: string
+ order?: number
+ label?: string
+ description?: string
+ linkpage?: string
+ color?: string
+ icon?: string
+ img_small?: string
+ showinhome?: boolean
+ showinnewsletter?: boolean
+ img?: string
+ teachers?: ITeachUname[]
+}
+
export interface ITestp1 {
contatore: number
mioarray: ICfgServer[]
@@ -76,6 +95,7 @@ export interface IGlobalState {
arrConfig: IConfig[]
lastaction: IAction
settings: ISettings[],
+ disciplines: IDiscipline[],
}
export interface IMenuList {
diff --git a/src/store/Modules/GlobalStore.ts b/src/store/Modules/GlobalStore.ts
index d0bb01f..e49941c 100644
--- a/src/store/Modules/GlobalStore.ts
+++ b/src/store/Modules/GlobalStore.ts
@@ -68,7 +68,8 @@ const state: IGlobalState = {
type: 0,
_id: 0
},
- settings: []
+ settings: [],
+ disciplines: []
}
async function getConfig(id) {
@@ -163,6 +164,8 @@ namespace Getters {
return CalendarStore.state.wheres
else if (table === 'contribtype')
return CalendarStore.state.contribtype
+ else if (table === 'disciplines')
+ return GlobalStore.state.disciplines
else if (table === 'bookings')
return CalendarStore.state.bookedevent
else if (table === 'users')
@@ -690,6 +693,7 @@ namespace Actions {
CalendarStore.state.wheres = (res.data.wheres) ? res.data.wheres : []
CalendarStore.state.contribtype = (res.data.contribtype) ? res.data.contribtype : []
GlobalStore.state.settings = (res.data.settings) ? [...res.data.settings] : []
+ GlobalStore.state.disciplines = (res.data.disciplines) ? [...res.data.disciplines] : []
CalendarStore.state.editable = UserStore.state.isAdmin || UserStore.state.isManager
diff --git a/src/store/Modules/fieldsTable.ts b/src/store/Modules/fieldsTable.ts
index f6e1772..0841d70 100644
--- a/src/store/Modules/fieldsTable.ts
+++ b/src/store/Modules/fieldsTable.ts
@@ -53,6 +53,22 @@ const colcontribtype = [
AddCol(DeleteRec)
]
+const coldisciplines = [
+ AddCol({ name: 'typol_code', label_trans: 'disc.typol_code' }),
+ AddCol({ name: 'order', label_trans: 'disc.order', fieldtype: tools.FieldType.number }),
+ AddCol({ name: 'label', label_trans: 'event.title' }),
+ AddCol({ name: 'description', label_trans: 'proj.longdescr' }),
+ AddCol({ name: 'linkpage', label_trans: 'event.linkpage' }),
+ AddCol({ name: 'color', label_trans: 'event.color' }),
+ AddCol({ name: 'icon', label_trans: 'event.icon' }),
+ AddCol({ name: 'img', label_trans: 'event.img' }),
+ AddCol({ name: 'img_small', label_trans: 'event.img_small' }),
+ AddCol({ name: 'showinhome', label_trans: 'event.showinhome', fieldtype: tools.FieldType.boolean }),
+ AddCol({ name: 'showinnewsletter', label_trans: 'event.showinnewsletter', fieldtype: tools.FieldType.boolean }),
+ AddCol({ name: 'teachers', label_trans: 'event.teacher', fieldtype: tools.FieldType.multiselect, jointable: 'operators' }),
+ AddCol(DeleteRec)
+]
+
const colsettings = [
AddCol({ name: 'key', label_trans: 'col.label' }),
AddCol({ name: 'type', label_trans: 'col.type', fieldtype: tools.FieldType.select, jointable: 'fieldstype' }),
@@ -88,7 +104,7 @@ const colTableOperator = [
const colTableEvents = [
AddCol({ name: '_id', label_trans: 'event._id' }),
- AddCol({ name: 'typol', label_trans: 'event.typol' }),
+ AddCol({ name: 'typol', label_trans: 'event.typol', fieldtype: tools.FieldType.select, jointable: 'disciplines' }),
AddCol({ name: 'short_tit', label_trans: 'event.short_tit' }),
AddCol({ name: 'title', label_trans: 'event.title' }),
AddCol({ name: 'details', label_trans: 'event.details', fieldtype: tools.FieldType.html }),
@@ -244,6 +260,13 @@ export const fieldsTable = {
colkey: '_id',
collabel: 'label'
},
+ {
+ value: 'disciplines',
+ label: 'Discipline',
+ columns: coldisciplines,
+ colkey: '_id',
+ collabel: 'label'
+ },
{
value: 'permissions',
label: 'Permessi',
@@ -264,7 +287,7 @@ export const fieldsTable = {
columns: colsettings,
colkey: 'key',
collabel: 'key'
- },
+ }
],
// IColGridTable
diff --git a/src/store/Modules/tools.ts b/src/store/Modules/tools.ts
index 72eb673..3b1489b 100644
--- a/src/store/Modules/tools.ts
+++ b/src/store/Modules/tools.ts
@@ -132,6 +132,7 @@ export const tools = {
select: 32,
number: 64,
typeinrec: 128,
+ multiselect: 256,
},
FieldTypeArr: [
@@ -2526,6 +2527,35 @@ export const tools = {
return mythis.$q.screen.width
},
+ getwidthscale(mythis, mywidth, maxwidth) {
+ if (this.isMobile()) {
+ return mywidth
+ } else {
+ let myw = mywidth + ((this.getwidth(mythis) - mywidth - 300) * 0.4)
+ if (myw > maxwidth)
+ myw = maxwidth
+
+ return myw
+ }
+ },
+
+ getheightbywidth(mythis, mywidth, myheight, maxwidth) {
+ const myw = this.getwidthscale(mythis, mywidth, maxwidth)
+ return myw * (myheight / mywidth)
+ },
+
+ getheightscale(mythis, myheight, maxheight) {
+ if (this.isMobile()) {
+ return myheight
+ } else {
+ let myh = myheight + ((this.getheight(mythis) - myheight) * 0.3)
+ if (myh > maxheight)
+ myh = maxheight
+
+ return myh
+ }
+ },
+
isIsoDate(str) {
if (!/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(str)) return false
const d = new Date(str)
diff --git a/src/views/admin/cfgServer/cfgServer.ts b/src/views/admin/cfgServer/cfgServer.ts
index 6b0a6be..ec7dd90 100644
--- a/src/views/admin/cfgServer/cfgServer.ts
+++ b/src/views/admin/cfgServer/cfgServer.ts
@@ -52,7 +52,7 @@ export default class CfgServer extends Vue {
}
public SaveValue(newVal, valinitial) {
- console.log('SaveValue', newVal, 'selected', this.selected)
+ // console.log('SaveValue', newVal, 'selected', this.selected)
const mydata = {
chiave: this.keysel,