7
src/boot/.directory
Normal file
7
src/boot/.directory
Normal file
@@ -0,0 +1,7 @@
|
||||
[Dolphin]
|
||||
Timestamp=2019,10,10,17,25,7
|
||||
Version=4
|
||||
ViewMode=1
|
||||
|
||||
[Settings]
|
||||
HiddenFilesShown=true
|
||||
@@ -1,5 +0,0 @@
|
||||
import axios from 'axios'
|
||||
|
||||
export default ({ Vue }) => {
|
||||
Vue.prototype.$axios = axios
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
import Dialog from 'quasar'
|
||||
|
||||
export default ({ Vue }) => {
|
||||
Vue.use(Dialog)
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
import Vue from 'vue'
|
||||
import { Vue2Dragula } from 'vue2-dragula'
|
||||
|
||||
export default ({ Vue }) => {
|
||||
Vue.use(Vue2Dragula, {
|
||||
logging: {
|
||||
service: false // to only log methods in service (DragulaService)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
// import something here
|
||||
import errorHandler from '../error-handler'
|
||||
// leave the export, even if you don't use it
|
||||
export default ({ app, router, Vue }) => {
|
||||
// something to do
|
||||
Vue.prototype.$errorHandler = errorHandler
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
import globalroutines from '../globalroutines'
|
||||
|
||||
export default ({ app, router, store, Vue }) => {
|
||||
// something to do
|
||||
Vue.prototype.$globalroutines = globalroutines
|
||||
}
|
||||
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
// import something here
|
||||
|
||||
// leave the export, even if you don't use it
|
||||
export default ({ app, router, store, Vue }) => {
|
||||
// something to do
|
||||
|
||||
// ******************************************
|
||||
// *** Per non permettere di accedere alle pagine in cui è necessario essere Loggati ! ***
|
||||
// ******************************************
|
||||
|
||||
// Creates a `nextMiddleware()` function which not only
|
||||
// runs the default `next()` callback but also triggers
|
||||
// the subsequent Middleware function.
|
||||
function nextFactory(context, middleware, index) {
|
||||
const subsequentMiddleware = middleware[index]
|
||||
// If no subsequent Middleware exists,
|
||||
// the default `next()` callback is returned.
|
||||
if (!subsequentMiddleware) return context.next
|
||||
|
||||
return (...parameters) => {
|
||||
// Run the default Vue Router `next()` callback first.
|
||||
context.next(...parameters)
|
||||
// Then run the subsequent Middleware with a new
|
||||
// `nextMiddleware()` callback.
|
||||
const nextMiddleware = nextFactory(context, middleware, index + 1)
|
||||
subsequentMiddleware({ ...context, next: nextMiddleware })
|
||||
};
|
||||
}
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
if (to.meta.middleware) {
|
||||
const middleware = Array.isArray(to.meta.middleware)
|
||||
? to.meta.middleware
|
||||
: [to.meta.middleware];
|
||||
|
||||
const context = {
|
||||
from,
|
||||
next,
|
||||
router,
|
||||
to,
|
||||
};
|
||||
const nextMiddleware = nextFactory(context, middleware, 1)
|
||||
|
||||
return middleware[0]({ ...context, next: nextMiddleware })
|
||||
}
|
||||
|
||||
return next()
|
||||
})
|
||||
|
||||
|
||||
/*router.beforeEach((to, from, next) => {
|
||||
var accessToken = store.state.session.userSession.accessToken
|
||||
// ESTANDO LOGEADO
|
||||
if (accessToken) {
|
||||
// SE PERMITE IR DE AREA PUBLICA A PRIVADA
|
||||
if (!from.matched.some(record => record.meta.requiresAuth) && to.matched.some(record => record.meta.requiresAuth)) {
|
||||
next()
|
||||
}
|
||||
// SE PERMITE IR DE UNA AREA PRIVADA A OTRA PRIVADA
|
||||
if (from.matched.some(record => record.meta.requiresAuth) && to.matched.some(record => record.meta.requiresAuth)) {
|
||||
next()
|
||||
}
|
||||
// NO SE PERMITE IR A UN AREA PUBLICA DESDE UN AREA PRIVADA
|
||||
if (from.matched.some(record => record.meta.requiresAuth) && !to.matched.some(record => record.meta.requiresAuth)) {
|
||||
next(false)
|
||||
}
|
||||
// SE REDIRIJE AL PANEL
|
||||
if (!from.matched.some(record => record.meta.requiresAuth) && !to.matched.some(record => record.meta.requiresAuth)) {
|
||||
next('/Panel')
|
||||
}
|
||||
// NO ESTA LOGEADO
|
||||
} else {
|
||||
// SE PERMITE IR DE UNA AREA PUBLICA A OTRA PUBLICA
|
||||
if (!from.matched.some(record => record.meta.requiresAuth) && !to.matched.some(record => record.meta.requiresAuth)) {
|
||||
next()
|
||||
}
|
||||
// SE PERMITE IR DE UNA AREA PRIVADA A UNA PUBLICA (LOGOUT)
|
||||
if (from.matched.some(record => record.meta.requiresAuth) && !to.matched.some(record => record.meta.requiresAuth)) {
|
||||
next()
|
||||
}
|
||||
// NO SE PERMITE IR DE UNA AREA PUBLICA A UNA PRIVADA
|
||||
if (!from.matched.some(record => record.meta.requiresAuth) && to.matched.some(record => record.meta.requiresAuth)) {
|
||||
// REDIRIGIR A LOGIN
|
||||
next('/')
|
||||
}
|
||||
}
|
||||
})*/
|
||||
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// import something here
|
||||
import myconfig from '../myconfig'
|
||||
|
||||
// leave the export, even if you don't use it
|
||||
export default ({ Vue }) => {
|
||||
//Vue.use(myconfig);
|
||||
// something to do
|
||||
Vue.prototype.$myconfig = myconfig
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
import VeeValidate from "vee-validate";
|
||||
|
||||
export default ({ Vue }) => {
|
||||
Vue.use(VeeValidate, { inject: false })
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
// src/boot/i18n.js
|
||||
import VueI18n from 'vue-i18n';
|
||||
import messages from 'src/statics/i18n';
|
||||
import { tools } from "../store/Modules/tools";
|
||||
|
||||
export default ({ app, store, Vue }) => {
|
||||
Vue.use(VueI18n);
|
||||
// Vue.config.lang = process.env.LANG_DEFAULT;
|
||||
|
||||
let mylang = tools.getItemLS(tools.localStorage.lang)
|
||||
|
||||
if ((navigator) && (mylang === '')) {
|
||||
mylang = navigator.language
|
||||
console.log(`LANG NAVIGATOR ${mylang}`)
|
||||
}
|
||||
|
||||
if (mylang === '')
|
||||
mylang = process.env.LANG_DEFAULT;
|
||||
|
||||
if (mylang.toLowerCase() === 'es-es')
|
||||
mylang = 'esEs'
|
||||
|
||||
console.log('MYLANG2=', mylang)
|
||||
console.log('process.env.LANG_DEFAULT=', process.env.LANG_DEFAULT)
|
||||
Vue.config.lang = mylang
|
||||
|
||||
import(`quasar/lang/${mylang}`).then(lang => {
|
||||
console.log(' ... LANGDEFAULT=', lang)
|
||||
this.$q.lang.set(lang.default)
|
||||
import(`src/statics/i18n`).then(function () {
|
||||
})
|
||||
})
|
||||
|
||||
// console.log("PLUGINS INIT....");
|
||||
|
||||
//console.log("LANG_DEFAULT: ")
|
||||
//console.log(process.env.LANG_DEFAULT)
|
||||
|
||||
// Set i18n instance on app
|
||||
app.lang = new VueI18n({
|
||||
locale: mylang,
|
||||
fallbackLocale: mylang,
|
||||
messages
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
import Vue from 'vue'
|
||||
import VueIdb from 'vue-idb'
|
||||
|
||||
export default ({ Vue }) => {
|
||||
Vue.use(VueIdb)
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
export default new VueIdb({
|
||||
version: 1,
|
||||
database: 'test',
|
||||
schemas: [
|
||||
{ categories: '++_id, sub_categ_id, descr_it' }
|
||||
]
|
||||
})
|
||||
*/
|
||||
@@ -1,5 +0,0 @@
|
||||
import Vuelidate from 'vuelidate'
|
||||
|
||||
export default ({ Vue }) => {
|
||||
Vue.use(Vuelidate)
|
||||
}
|
||||
4
src/components/.directory
Normal file
4
src/components/.directory
Normal file
@@ -0,0 +1,4 @@
|
||||
[Dolphin]
|
||||
Timestamp=2019,10,10,16,45,34
|
||||
Version=4
|
||||
ViewMode=1
|
||||
@@ -38,7 +38,6 @@ export default class Header extends Vue {
|
||||
public photo = ''
|
||||
public visuimg: boolean = true
|
||||
|
||||
|
||||
get getappname(){
|
||||
if (Screen.width < 400) {
|
||||
return this.$t('msg.myAppNameShort')
|
||||
|
||||
@@ -102,7 +102,13 @@
|
||||
<label>{{ $t('msg.hello') }}</label> <span v-model="prova"></span> !
|
||||
</div>-->
|
||||
|
||||
<q-btn v-if="static_data.functionality.SHOW_USER_MENU" dense flat round icon="menu" @click="right = !right">
|
||||
<!-- BUTTON USER BAR -->
|
||||
|
||||
<q-btn v-if="static_data.functionality.SHOW_USER_MENU && !isLogged" dense flat round icon="menu"
|
||||
@click="right = !right">
|
||||
</q-btn>
|
||||
<q-btn v-if="static_data.functionality.SHOW_USER_MENU && isLogged" dense flat round
|
||||
icon="img:statics/images/avatar-1.svg" @click="right = !right">
|
||||
</q-btn>
|
||||
|
||||
</q-toolbar>
|
||||
@@ -121,7 +127,8 @@
|
||||
|
||||
</q-drawer>
|
||||
|
||||
<q-drawer v-if="static_data.functionality.SHOW_USER_MENU" v-model="right" side="right" overlay bordered>
|
||||
<!-- USER BAR -->
|
||||
<q-drawer v-if="static_data.functionality.SHOW_USER_MENU" v-model="right" side="right" elevated>
|
||||
<div id="profile">
|
||||
<q-img class="absolute-top" src="../../statics/images/landing_first_section.png"
|
||||
style="height: 150px">
|
||||
@@ -130,7 +137,9 @@
|
||||
<q-avatar class="q-mb-sm center_img">
|
||||
<img src="../../statics/images/avatar-1.svg">
|
||||
</q-avatar>
|
||||
<div v-if="Username" class="text-weight-bold text-user">{{ Username }} - {{ Name }}</div>
|
||||
<q-btn class="absolute-top-right" style="margin-top: 9px; margin-right: 12px; color: white;" dense flat round icon="close" @click="right = !right">
|
||||
</q-btn>
|
||||
<div v-if="Username" class="text-weight-bold text-user">{{ Username }} - {{ myName }}</div>
|
||||
<div v-else class="text-italic">{{ $t('user.loggati') }}</div>
|
||||
|
||||
<!--<span class="text-white" v-if="Verificato"> {{$t('reg.verificato')}} </span>-->
|
||||
|
||||
@@ -28,9 +28,20 @@ export interface IBookedEvent {
|
||||
infoevent: string
|
||||
msgbooking: string
|
||||
datebooked?: Date
|
||||
modified: boolean
|
||||
booked: boolean
|
||||
}
|
||||
|
||||
export enum EState {
|
||||
None, Creating, Modifying
|
||||
}
|
||||
|
||||
export interface IBookedEventPage {
|
||||
show: boolean
|
||||
bookedevent: IBookedEvent
|
||||
state: EState
|
||||
}
|
||||
|
||||
export interface ICalendarState {
|
||||
editable: boolean
|
||||
eventlist: IEvents[]
|
||||
|
||||
@@ -8,6 +8,7 @@ const msgglobal = {
|
||||
no: 'No',
|
||||
delete: 'Elimina',
|
||||
cancel: 'Annulla',
|
||||
update: 'Aggiorna',
|
||||
today: 'Oggi',
|
||||
book: 'Prenota',
|
||||
msg: {
|
||||
@@ -158,6 +159,7 @@ const msgglobal = {
|
||||
booked_error: 'Prenotazione non avvenuta. Riprovare più tardi',
|
||||
booking: 'Prenota Evento',
|
||||
titlebooking: 'Prenotazione',
|
||||
modifybooking: 'Modifica Prenotazione',
|
||||
cancelbooking: 'Cancella Prenotazione',
|
||||
canceledbooking: 'Prenotazione Cancellata',
|
||||
cancelederrorbooking: 'Cancellazione non effettuata, Riprovare più tardi',
|
||||
@@ -204,6 +206,7 @@ const msgglobal = {
|
||||
no: 'No',
|
||||
delete: 'Borrar',
|
||||
cancel: 'Cancelar',
|
||||
update: 'Actualiza',
|
||||
today: 'Hoy',
|
||||
book: 'Reserva',
|
||||
msg: {
|
||||
@@ -348,6 +351,7 @@ const msgglobal = {
|
||||
booked_error: 'Reserva fallida. Intenta nuevamente más tarde',
|
||||
booking: 'Reserva Evento',
|
||||
titlebooking: 'Reserva',
|
||||
modifybooking: 'Edita Reserva',
|
||||
cancelbooking: 'Cancelar Reserva',
|
||||
canceledbooking: 'Reserva Cancelada',
|
||||
cancelederrorbooking: 'Cancelación no realizada, intente nuevamente más tarde',
|
||||
@@ -393,6 +397,7 @@ const msgglobal = {
|
||||
yes: 'Oui',
|
||||
no: 'Non',
|
||||
delete: 'Supprimer',
|
||||
update: 'mises à jour',
|
||||
cancel: 'annuler',
|
||||
today: 'Aujourd\'hui',
|
||||
book: 'Réserve',
|
||||
@@ -537,6 +542,7 @@ const msgglobal = {
|
||||
booked_error: 'La réservation a échoué. Réessayez plus tard',
|
||||
booking: 'Réserver l\'événement',
|
||||
titlebooking: 'Réservation',
|
||||
modifybooking: 'changement de réservation',
|
||||
cancelbooking: 'Annuler la réservation',
|
||||
canceledbooking: 'Réservation annulée',
|
||||
cancelederrorbooking: 'Annulation non effectuée, réessayez plus tard',
|
||||
@@ -582,6 +588,7 @@ const msgglobal = {
|
||||
yes: 'Yes',
|
||||
no: 'No',
|
||||
delete: 'Delete',
|
||||
update: 'Update',
|
||||
cancel: 'Cancel',
|
||||
today: 'Today',
|
||||
book: 'Book',
|
||||
@@ -725,6 +732,7 @@ const msgglobal = {
|
||||
booked_error: 'Reservation failed. Try again later',
|
||||
booking: 'Book the Event',
|
||||
titlebooking: 'Reservation',
|
||||
modifybooking: 'Modify Reservation',
|
||||
cancelbooking: 'Cancel Reservation',
|
||||
canceledbooking: 'Booking cancelled',
|
||||
cancelederrorbooking: 'Cancellation unsuccessfully, try again later',
|
||||
@@ -770,6 +778,7 @@ const msgglobal = {
|
||||
yes: 'Yes',
|
||||
no: 'No',
|
||||
delete: 'Delete',
|
||||
update: 'Update',
|
||||
cancel: 'Cancel',
|
||||
today: 'Today',
|
||||
book: 'Book',
|
||||
@@ -915,6 +924,7 @@ const msgglobal = {
|
||||
booked_error: 'Reservation failed. Try again later',
|
||||
booking: 'Book the Event',
|
||||
titlebooking: 'Reservation',
|
||||
modifybooking: 'Modify Reservation',
|
||||
cancelbooking: 'Cancel Reservation',
|
||||
canceledbooking: 'Booking cancelled',
|
||||
cancelederrorbooking: 'Cancellation unsuccessfully, try again later',
|
||||
|
||||
6
src/store/.directory
Normal file
6
src/store/.directory
Normal file
@@ -0,0 +1,6 @@
|
||||
[Dolphin]
|
||||
Timestamp=2019,10,10,17,19,58
|
||||
Version=4
|
||||
|
||||
[Settings]
|
||||
HiddenFilesShown=true
|
||||
@@ -113,6 +113,7 @@ namespace Actions {
|
||||
datebooked: bookevent.datebooked,
|
||||
userId: UserStore.state.userId,
|
||||
booked: bookevent.booked,
|
||||
modified: bookevent.modified,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +126,15 @@ namespace Actions {
|
||||
.then((res) => {
|
||||
if (res.status === 200) {
|
||||
if (res.data.code === serv_constants.RIS_CODE_OK) {
|
||||
if (bookevent.modified) {
|
||||
|
||||
const foundIndex = state.bookedevent.findIndex((x) => x.id_bookedevent === bookevent.id_bookedevent)
|
||||
if (foundIndex >= 0)
|
||||
state.bookedevent[foundIndex] = bookevent
|
||||
|
||||
} else {
|
||||
state.bookedevent.push(bookevent)
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1305,9 +1305,10 @@ export const tools = {
|
||||
if (myfunc === costanti.FuncDialog.CANCEL_BOOKING) {
|
||||
console.log(' ENTRATO ! CancelBookingEvent ')
|
||||
CalendarStore.actions.CancelBookingEvent(par.param1).then((ris) => {
|
||||
if (ris)
|
||||
if (ris) {
|
||||
tools.showPositiveNotif(myself.$q, myself.$t('cal.canceledbooking') + ' "' + par.param1.title + '"')
|
||||
else
|
||||
myself.bookEventpage.show = false
|
||||
} else
|
||||
tools.showNegativeNotif(myself.$q, myself.$t('cal.cancelederrorbooking'))
|
||||
})
|
||||
}
|
||||
@@ -2077,7 +2078,7 @@ export const tools = {
|
||||
return msg
|
||||
},
|
||||
gettextevent(myevent) {
|
||||
return '"' + myevent.title + '" (' + this.getDateStr(myevent.date) + ') - ' + myevent.time
|
||||
return '"' + myevent.title + '" (' + func_tools.getDateStr(myevent.date) + ') - ' + myevent.time
|
||||
},
|
||||
|
||||
setLangAtt(mylang) {
|
||||
|
||||
72
tslint.json
Normal file
72
tslint.json
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"defaultSeverity": "error",
|
||||
"extends": [
|
||||
"tslint:recommended"
|
||||
],
|
||||
"jsRules": {},
|
||||
"rules": {
|
||||
"no-console": false,
|
||||
"curly": [false],
|
||||
"object-literal-sort-keys": false,
|
||||
// "no-restricted-syntax": [
|
||||
// "error",
|
||||
// {
|
||||
// "selector": "CallExpression[callee.object.nametranslate='console'][callee.property.nametranslate!=/^(log|warn|error|info|trace)$/]",
|
||||
// "message": "Unexpected property on console object was called"
|
||||
// }
|
||||
// ],
|
||||
"class-name": true,
|
||||
"comment-format": [
|
||||
true,
|
||||
"check-space"
|
||||
],
|
||||
"indent": [
|
||||
true,
|
||||
"spaces"
|
||||
],
|
||||
"ordered-imports": false,
|
||||
"no-duplicate-variable": true,
|
||||
"no-eval": true,
|
||||
"no-internal-module": false,
|
||||
"no-trailing-whitespace": false,
|
||||
"no-var-keyword": true,
|
||||
"max-line-length": false,
|
||||
"one-line": [
|
||||
true,
|
||||
"check-open-brace",
|
||||
"check-whitespace"
|
||||
],
|
||||
"quotemark": [
|
||||
true,
|
||||
"single"
|
||||
],
|
||||
"semicolon": [true, "never"],
|
||||
"trailing-comma": [true, {"multiline": "never", "singleline": "never"}],
|
||||
"triple-equals": [
|
||||
true,
|
||||
"allow-null-check"
|
||||
],
|
||||
"typedef-whitespace": [
|
||||
true,
|
||||
{
|
||||
"call-signature": "nospace",
|
||||
"index-signature": "nospace",
|
||||
"parameter": "nospace",
|
||||
"property-declaration": "nospace",
|
||||
"variable-declaration": "nospace"
|
||||
}
|
||||
],
|
||||
"variable-name": [
|
||||
true,
|
||||
"ban-keywords"
|
||||
],
|
||||
"whitespace": [
|
||||
true,
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-operator",
|
||||
"check-separator",
|
||||
"check-type"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user