- Adding map page (where is the location) #100
- fix menu appear Admin and Manager
This commit is contained in:
1811
package-lock.json
generated
1811
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -29,6 +29,7 @@
|
|||||||
"@babel/plugin-transform-runtime": "^7.4.0",
|
"@babel/plugin-transform-runtime": "^7.4.0",
|
||||||
"@babel/runtime": "^7.0.0",
|
"@babel/runtime": "^7.0.0",
|
||||||
"@quasar/extras": "^1.3.2",
|
"@quasar/extras": "^1.3.2",
|
||||||
|
"@types/googlemaps": "^3.38.0",
|
||||||
"@types/vuelidate": "^0.7.0",
|
"@types/vuelidate": "^0.7.0",
|
||||||
"@vue/eslint-config-standard": "^4.0.0",
|
"@vue/eslint-config-standard": "^4.0.0",
|
||||||
"acorn": "^6.0.0",
|
"acorn": "^6.0.0",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import VeeValidate from "vee-validate";
|
import VeeValidate from 'vee-validate'
|
||||||
|
|
||||||
export default ({ Vue }) => {
|
export default ({ Vue }) => {
|
||||||
Vue.use(VeeValidate, { inject: false })
|
Vue.use(VeeValidate, { inject: false })
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
</q-img>
|
</q-img>
|
||||||
|
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<div class="disc__description">{{discipline.description}}</div>
|
<div class="disc__description" v-html="discipline.description"></div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
||||||
<q-card-section v-if="ExistLesson()" class="text-blue">
|
<q-card-section v-if="ExistLesson()" class="text-blue">
|
||||||
|
|||||||
4
src/components/CGoogleMap/CGoogleMap.scss
Normal file
4
src/components/CGoogleMap/CGoogleMap.scss
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#map {
|
||||||
|
height: 400px;
|
||||||
|
width: 90%;
|
||||||
|
}
|
||||||
28
src/components/CGoogleMap/CGoogleMap.ts
Normal file
28
src/components/CGoogleMap/CGoogleMap.ts
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
import Vue from 'vue'
|
||||||
|
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||||
|
|
||||||
|
import { toolsext } from '@src/store/Modules/toolsext'
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
name: 'CGoogleMap'
|
||||||
|
})
|
||||||
|
|
||||||
|
export default class CGoogleMap extends Vue {
|
||||||
|
@Prop({ required: true, default: 'one' }) public tab
|
||||||
|
|
||||||
|
public map = null
|
||||||
|
|
||||||
|
public initMap() {
|
||||||
|
|
||||||
|
// this.map = new window.google.maps.Map(document.getElementById('map'), {
|
||||||
|
// center: { lat: -34.397, lng: 150.644 },
|
||||||
|
// zoom: 8
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
|
||||||
|
public async mounted() {
|
||||||
|
// await this.$google()
|
||||||
|
// this.initMap()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
12
src/components/CGoogleMap/CGoogleMap.vue
Normal file
12
src/components/CGoogleMap/CGoogleMap.vue
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<template>
|
||||||
|
<q-page class="flex flex-center">
|
||||||
|
<div id="map"></div>
|
||||||
|
</q-page>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" src="./CGoogleMap.ts">
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import './CGoogleMap.scss';
|
||||||
|
</style>
|
||||||
1
src/components/CGoogleMap/index.ts
Normal file
1
src/components/CGoogleMap/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {default as CGoogleMap} from './CGoogleMap.vue'
|
||||||
4
src/components/COpenStreetMap/COpenStreetMap.scss
Normal file
4
src/components/COpenStreetMap/COpenStreetMap.scss
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#map {
|
||||||
|
height: 400px;
|
||||||
|
width: 90%;
|
||||||
|
}
|
||||||
24
src/components/COpenStreetMap/COpenStreetMap.ts
Normal file
24
src/components/COpenStreetMap/COpenStreetMap.ts
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
import Vue from 'vue'
|
||||||
|
import { Component, Prop, Watch } from 'vue-property-decorator'
|
||||||
|
|
||||||
|
import { toolsext } from '@src/store/Modules/toolsext'
|
||||||
|
import { tools } from '../../store/Modules/tools'
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
name: 'COpenStreetMap'
|
||||||
|
})
|
||||||
|
|
||||||
|
export default class COpenStreetMap extends Vue {
|
||||||
|
@Prop({required: true}) public title: string
|
||||||
|
@Prop({required: true}) public coordinates: string
|
||||||
|
@Prop({required: true}) public coord_big: string
|
||||||
|
|
||||||
|
get mywidth() {
|
||||||
|
return tools.getwidth(this) - 20
|
||||||
|
}
|
||||||
|
|
||||||
|
get myheight() {
|
||||||
|
return 450
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
19
src/components/COpenStreetMap/COpenStreetMap.vue
Normal file
19
src/components/COpenStreetMap/COpenStreetMap.vue
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<template>
|
||||||
|
<div class="flex flex-center column justify-center">
|
||||||
|
<div class="">
|
||||||
|
<span class="text-subtitle2">{{title}}</span> - (<a :href="`https://www.openstreetmap.org/?` + coord_big + `&layers=N`" target="_blank">{{$t('showbigmap')}}</a>)
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<iframe :width="mywidth" :height="myheight" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"
|
||||||
|
:src="`https://www.openstreetmap.org/export/embed.html?bbox=` + coordinates"
|
||||||
|
style="border: 1px solid black"></iframe>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" src="./COpenStreetMap.ts">
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import './COpenStreetMap.scss';
|
||||||
|
</style>
|
||||||
1
src/components/COpenStreetMap/index.ts
Normal file
1
src/components/COpenStreetMap/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export {default as COpenStreetMap} from './COpenStreetMap.vue'
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
<logo></logo>
|
<logo></logo>
|
||||||
</p>
|
</p>
|
||||||
<div v-for="myitemmenu in static_data.routes">
|
<div v-for="myitemmenu in static_data.routes">
|
||||||
<div v-if="myitemmenu.infooter">
|
<div v-if="myitemmenu.infooter && tools.visumenu(myitemmenu)">
|
||||||
|
|
||||||
<div v-if="myitemmenu.solotitle">
|
<div v-if="myitemmenu.solotitle">
|
||||||
<span class="footer_link">{{tools.getLabelByItem(myitemmenu, mythisfoot)}}</span><br/>
|
<span class="footer_link">{{tools.getLabelByItem(myitemmenu, mythisfoot)}}</span><br/>
|
||||||
|
|||||||
@@ -30,3 +30,5 @@ export * from './FormNewsletter'
|
|||||||
export * from './CGridTableRec'
|
export * from './CGridTableRec'
|
||||||
export * from './CFacebookFrame'
|
export * from './CFacebookFrame'
|
||||||
export * from './Shen/CTesseraElettronica'
|
export * from './Shen/CTesseraElettronica'
|
||||||
|
export * from './CGoogleMap'
|
||||||
|
export * from './COpenStreetMap'
|
||||||
|
|||||||
@@ -32,11 +32,6 @@ export default class MenuOne extends Vue {
|
|||||||
return GlobalStore.getters.getmenu
|
return GlobalStore.getters.getmenu
|
||||||
}
|
}
|
||||||
|
|
||||||
public visumenu(elem) { // : IListRoutes
|
|
||||||
return (elem.onlyAdmin && UserStore.state.isAdmin) || (elem.onlyManager && UserStore.state.isManager)
|
|
||||||
|| ((!elem.onlyAdmin) && (!elem.onlyManager))
|
|
||||||
}
|
|
||||||
|
|
||||||
public setParentVisibilityBasedOnRoute(parent) {
|
public setParentVisibilityBasedOnRoute(parent) {
|
||||||
parent.routes.forEach((item) => {
|
parent.routes.forEach((item) => {
|
||||||
if (this.$route.path === item.path) {
|
if (this.$route.path === item.path) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<template v-for="(parent, index) in getmenu">
|
<template v-for="(parent, index) in getmenu">
|
||||||
<!--<div class="q-list-header">{{replaceUnderlineToSpace(index)}}</div>-->
|
<!--<div class="q-list-header">{{replaceUnderlineToSpace(index)}}</div>-->
|
||||||
<div v-for="myitemmenu in static_data.routes">
|
<div v-for="myitemmenu in static_data.routes">
|
||||||
<div v-if="!!myitemmenu.routes2 && myitemmenu.inmenu && visumenu(myitemmenu)">
|
<div v-if="!!myitemmenu.routes2 && myitemmenu.inmenu && tools.visumenu(myitemmenu)">
|
||||||
<q-expansion-item
|
<q-expansion-item
|
||||||
:header-inset-level="myitemmenu.level_parent"
|
:header-inset-level="myitemmenu.level_parent"
|
||||||
:content-inset-level="myitemmenu.level_parent"
|
:content-inset-level="myitemmenu.level_parent"
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
</q-expansion-item>
|
</q-expansion-item>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<div v-if="myitemmenu.inmenu && !myitemmenu.submenu && visumenu(myitemmenu)">
|
<div v-if="myitemmenu.inmenu && !myitemmenu.submenu && tools.visumenu(myitemmenu)">
|
||||||
<q-slide-transition :duration=200>
|
<q-slide-transition :duration=200>
|
||||||
<div v-show="true">
|
<div v-show="true">
|
||||||
<q-expansion-item
|
<q-expansion-item
|
||||||
|
|||||||
@@ -165,6 +165,7 @@ const msgglobal = {
|
|||||||
undefined: 'non definito'
|
undefined: 'non definito'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
showbigmap: 'Mostra la mappa più grande',
|
||||||
todo: {
|
todo: {
|
||||||
titleprioritymenu: 'Priorità:',
|
titleprioritymenu: 'Priorità:',
|
||||||
inserttop: 'Inserisci il Task in cima',
|
inserttop: 'Inserisci il Task in cima',
|
||||||
@@ -471,6 +472,7 @@ const msgglobal = {
|
|||||||
undefined: 'no definido'
|
undefined: 'no definido'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
showbigmap: 'Mostrar el mapa más grande',
|
||||||
todo: {
|
todo: {
|
||||||
titleprioritymenu: 'Prioridad:',
|
titleprioritymenu: 'Prioridad:',
|
||||||
inserttop: 'Ingrese una nueva Tarea arriba',
|
inserttop: 'Ingrese una nueva Tarea arriba',
|
||||||
@@ -774,6 +776,7 @@ const msgglobal = {
|
|||||||
undefined: 'non défini'
|
undefined: 'non défini'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
showbigmap: 'Montrer la plus grande carte',
|
||||||
todo: {
|
todo: {
|
||||||
titleprioritymenu: 'Prioridad:',
|
titleprioritymenu: 'Prioridad:',
|
||||||
inserttop: 'Ingrese una nueva Tarea arriba',
|
inserttop: 'Ingrese una nueva Tarea arriba',
|
||||||
@@ -1076,6 +1079,7 @@ const msgglobal = {
|
|||||||
undefined: 'undefined'
|
undefined: 'undefined'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
showbigmap: 'Show the largest map',
|
||||||
todo: {
|
todo: {
|
||||||
titleprioritymenu: 'Priority:',
|
titleprioritymenu: 'Priority:',
|
||||||
inserttop: 'Insert Task at the top',
|
inserttop: 'Insert Task at the top',
|
||||||
@@ -1380,6 +1384,7 @@ const msgglobal = {
|
|||||||
undefined: 'undefined'
|
undefined: 'undefined'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
showbigmap: 'Show the largest map',
|
||||||
todo: {
|
todo: {
|
||||||
titleprioritymenu: 'Priority:',
|
titleprioritymenu: 'Priority:',
|
||||||
inserttop: 'Insert Task at the top',
|
inserttop: 'Insert Task at the top',
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ export const fieldsTable = {
|
|||||||
value: 'disciplines',
|
value: 'disciplines',
|
||||||
label: 'Discipline',
|
label: 'Discipline',
|
||||||
columns: coldisciplines,
|
columns: coldisciplines,
|
||||||
colkey: '_id',
|
colkey: 'typol_code',
|
||||||
collabel: 'label'
|
collabel: 'label'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1373,6 +1373,12 @@ export const tools = {
|
|||||||
return result
|
return result
|
||||||
},
|
},
|
||||||
|
|
||||||
|
visumenu(elem) { // : IListRoutes
|
||||||
|
return (elem.onlyAdmin && UserStore.state.isAdmin) || (elem.onlyManager && UserStore.state.isManager)
|
||||||
|
|| ((!elem.onlyAdmin) && (!elem.onlyManager))
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
executefunc(myself: any, table, func: number, par: IParamDialog) {
|
executefunc(myself: any, table, func: number, par: IParamDialog) {
|
||||||
if (func === lists.MenuAction.DELETE) {
|
if (func === lists.MenuAction.DELETE) {
|
||||||
console.log('param1', par.param1)
|
console.log('param1', par.param1)
|
||||||
|
|||||||
1
src/typings/libs/axios.d.ts
vendored
1
src/typings/libs/axios.d.ts
vendored
@@ -5,4 +5,3 @@ declare module 'vue/types/vue' {
|
|||||||
$axios: axios
|
$axios: axios
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
1
src/typings/libs/globalroutines.d.ts
vendored
1
src/typings/libs/globalroutines.d.ts
vendored
@@ -5,4 +5,3 @@ declare module 'vue/types/vue' {
|
|||||||
$globalroutines: globalroutines
|
$globalroutines: globalroutines
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user