ECommerce Ordini Email 1
This commit is contained in:
@@ -96,7 +96,8 @@ export const shared_consts = {
|
||||
SEND_TO_ALL: 1,
|
||||
SEND_TO_SOCI: 2,
|
||||
SEND_TO_SOCIO_RESIDENTE: 3,
|
||||
SEND_TO_NON_SOCI: 10
|
||||
SEND_TO_NON_SOCI: 10,
|
||||
SEND_TO_PAOLO: 20
|
||||
},
|
||||
|
||||
TypeMsg_Actions: {
|
||||
@@ -143,6 +144,11 @@ export const shared_consts = {
|
||||
id: 3,
|
||||
label: 'Solo ai NON Soci',
|
||||
value: 10
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
label: 'a Paolo (test)',
|
||||
value: 20
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
@@ -392,9 +392,9 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
}
|
||||
|
||||
public beforeMount() {
|
||||
console.log('mounted')
|
||||
// console.log('mounted')
|
||||
this.selectedDate = this.formatDate(tools.getDateNow())
|
||||
console.log('this.selectedDate', this.selectedDate)
|
||||
// console.log('this.selectedDate', this.selectedDate)
|
||||
|
||||
CalendarStore.state.locale = toolsext.getLocale()
|
||||
this.updateFormatters()
|
||||
@@ -445,8 +445,8 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
this.resetForm()
|
||||
this.contextDay = { ...day.scope }
|
||||
|
||||
this.eventForm.dateTimeStart = tools.getstrYYMMDDDateTime(day.scope.date + ' 21:00:00')
|
||||
this.eventForm.dateTimeEnd = tools.getstrYYMMDDDateTime(day.scope.date + ' 22:00:00')
|
||||
this.eventForm.dateTimeStart = tools.getstrYYMMDDDateTime(day.scope.timestamp.date + ' 21:00:00')
|
||||
this.eventForm.dateTimeEnd = tools.getstrYYMMDDDateTime(day.scope.timestamp.date + ' 22:00:00')
|
||||
|
||||
console.log('eventForm', this.eventForm)
|
||||
|
||||
@@ -981,7 +981,7 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
|
||||
public getEvents(dt) {
|
||||
const eventsloc = []
|
||||
console.log('dt', dt)
|
||||
// console.log('dt', dt)
|
||||
|
||||
for (let i = 0; i < CalendarStore.state.eventlist.length; ++i) {
|
||||
let added = false
|
||||
@@ -1014,8 +1014,8 @@ export default class CEventsCalendar extends MixinEvents {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (eventsloc.length > 0)
|
||||
console.log('eventsloc', eventsloc)
|
||||
// if (eventsloc.length > 0)
|
||||
// console.log('eventsloc', eventsloc)
|
||||
return eventsloc
|
||||
}
|
||||
|
||||
|
||||
@@ -690,7 +690,7 @@
|
||||
:style="`background-color: ${event.bgcolor} !important; color: white !important;`"
|
||||
ripple
|
||||
rounded
|
||||
:label="event.title" :icon="event.icon"
|
||||
:label="getTitleEv(event)" :icon="event.icon"
|
||||
:color="event.bgcolor" text-color="white" glossy>
|
||||
|
||||
</q-btn>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
}
|
||||
|
||||
.title{
|
||||
font-size: 3.5rem;
|
||||
font-size: 3rem;
|
||||
padding: 10px;
|
||||
text-shadow: .2rem .2rem .2rem #3d3d3d;
|
||||
}
|
||||
@@ -63,7 +63,7 @@
|
||||
@media (max-width: 400px) {
|
||||
.title{
|
||||
padding: 5px;
|
||||
font-size: 3rem;
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<q-parallax :src="getsrc" :height="tools.myheight_imgtitle(myheight, myheightmobile)">
|
||||
<h1 class="text-white center_to_image title">{{title}}</h1>
|
||||
<div v-if="legendinside" class="mylegendinside absolute-bottom custom-caption center_to_image" v-html="legendinside"></div>
|
||||
<h1 class="text-white title" style="text-align: center" >{{title}}</h1>
|
||||
<div v-if="legendinside" class="mylegendinside absolute-bottom custom-caption" style="text-align: center" v-html="legendinside"></div>
|
||||
</q-parallax>
|
||||
<div v-if="legend" class="mylegend" v-html="legend"></div>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</q-btn>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right">
|
||||
<span class="text-grey q-mr-xs">Totale:</span> <span
|
||||
<span v-if="myTotalPrice" class="text-grey q-mr-xs">Totale:</span> <span
|
||||
class="text-subtitle1 q-mr-sm ">€ {{ myTotalPrice.toFixed(2) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,7 +16,11 @@ export default class CMySelect extends Vue {
|
||||
@Prop({ required: true, default: '' }) public optval
|
||||
@Prop({ required: false, default: true }) public useinput: boolean
|
||||
@Prop({ required: false, default: true }) public dense: boolean
|
||||
@Prop({ required: false, default: null }) public newvaluefunc
|
||||
@Prop({
|
||||
required: false, default: function mydef(): object {
|
||||
return {}
|
||||
}
|
||||
}) public newvaluefunc: object
|
||||
@Prop({ required: false, default: null }) public funcgetvaluebyid
|
||||
@Prop({ required: true }) public options
|
||||
|
||||
|
||||
168
src/components/CPhotosGallery/CPhotosGallery.scss
Executable file
168
src/components/CPhotosGallery/CPhotosGallery.scss
Executable file
@@ -0,0 +1,168 @@
|
||||
$grayshadow: #555;
|
||||
$textcol: #eeefe1;
|
||||
$textcol_scuro: darkblue;
|
||||
|
||||
p {
|
||||
margin: 0 0 1.25rem;
|
||||
//text-shadow: .125rem .125rem .25rem $grayshadow;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.landing > section {
|
||||
/*
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
//padding: 0 16px
|
||||
*/
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
|
||||
text-align: center;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.landing > section.padding {
|
||||
padding: 5.62rem 1rem;
|
||||
}
|
||||
|
||||
.landing > section > div {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.landing__footer .doc-link {
|
||||
color: $textcol;
|
||||
}
|
||||
|
||||
.landing__footer .doc-link:hover {
|
||||
opacity: .8
|
||||
}
|
||||
|
||||
.gallery:before {
|
||||
content: "";
|
||||
position: fixed;
|
||||
top: 0;
|
||||
height: 100vh;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: -1;
|
||||
//background: #000 url(../../statics/images/cover.jpg) 50%;
|
||||
|
||||
background-size: cover
|
||||
}
|
||||
|
||||
.carousel_slide {
|
||||
|
||||
}
|
||||
|
||||
.gallery {
|
||||
background-size: cover;
|
||||
background-position: center center;
|
||||
|
||||
margin: auto;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
.gallery2{
|
||||
margin: auto;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
.btn-start {
|
||||
margin: 3.125rem;
|
||||
}
|
||||
|
||||
.shadow {
|
||||
//color: white;
|
||||
text-shadow: 0.125rem 0.125rem 0.25rem $grayshadow;
|
||||
}
|
||||
|
||||
.shadow-max {
|
||||
//color: white;
|
||||
text-shadow: .25rem .25rem .5rem $grayshadow;
|
||||
}
|
||||
|
||||
@media (max-width: 2000px) {
|
||||
.q-carousel {
|
||||
height: 800px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1000px) {
|
||||
.q-carousel {
|
||||
height: 800px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
.q-carousel {
|
||||
height: 600px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 718px) {
|
||||
// PER VERSIONE MOBILE
|
||||
|
||||
.gallery2 {
|
||||
max-height: 80vh;
|
||||
}
|
||||
|
||||
.text-h1 {
|
||||
font-size: 3rem;
|
||||
line-height: 3.05rem;
|
||||
margin-bottom: 1.5rem
|
||||
}
|
||||
|
||||
.text-subtitle1 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
.text-vers {
|
||||
font-size: 0.6rem;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.q-carousel {
|
||||
height: 450px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 400px) {
|
||||
.q-carousel {
|
||||
height: 300px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.allunga0 {
|
||||
height: 300px !important;
|
||||
}
|
||||
.allunga1 {
|
||||
height: 400px !important;
|
||||
}
|
||||
.allunga2 {
|
||||
height: 500px !important;
|
||||
}
|
||||
.allunga3 {
|
||||
height: 600px !important;
|
||||
}
|
||||
|
||||
|
||||
.custom-caption {
|
||||
text-align: center;
|
||||
padding: .75rem;
|
||||
color: $textcol;
|
||||
background-color: rgba(0, 0, 0, .3);
|
||||
}
|
||||
250
src/components/CPhotosGallery/CPhotosGallery.ts
Executable file
250
src/components/CPhotosGallery/CPhotosGallery.ts
Executable file
@@ -0,0 +1,250 @@
|
||||
import Vue from 'vue'
|
||||
import { Component, Prop } from 'vue-property-decorator'
|
||||
import { GlobalStore, UserStore } from '@store'
|
||||
|
||||
import { IColl, IGallery, ITimeLineEntry } from '@src/model/GlobalStore'
|
||||
|
||||
import { Logo } from '../../components/logo'
|
||||
|
||||
import { Footer } from '../../components/Footer'
|
||||
|
||||
import VueScrollReveal from 'vue-scroll-reveal'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { CImgTitle } from '../../components/CImgTitle/index'
|
||||
import { Screen } from 'quasar'
|
||||
import { static_data } from '@src/db/static_data'
|
||||
|
||||
Vue.use(VueScrollReveal, {
|
||||
class: 'v-scroll-reveal', // A CSS class applied to elements with the v-scroll-reveal directive; useful for animation overrides.
|
||||
duration: 1200,
|
||||
scale: 0.95,
|
||||
distance: '10px',
|
||||
rotate: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
z: 0
|
||||
}
|
||||
// mobile: true
|
||||
})
|
||||
|
||||
@Component({
|
||||
components: { Logo, Footer, CImgTitle }
|
||||
})
|
||||
export default class PhotosGallery extends Vue {
|
||||
@Prop({ required: true }) public mygallery: []
|
||||
public text: string = ''
|
||||
public visibile: boolean = false
|
||||
public cardvisible: string = 'hidden'
|
||||
public displaycard: string = 'block'
|
||||
public $t: any
|
||||
// public firstClassSection: string = 'landing_background fade homep-cover-img animate-fade homep-cover-img-1'
|
||||
public firstClassSection: string = 'fade homep-cover-img animate-fade homep-cover-img-1'
|
||||
public $q
|
||||
public polling
|
||||
public slide = 'first'
|
||||
public slide2 = 1
|
||||
public animare: number = 0
|
||||
public activePanelImg: number
|
||||
public withThumbnails: boolean = true
|
||||
public withCaptions: boolean = true
|
||||
public allunga: boolean = false
|
||||
public fullscreen: boolean = false
|
||||
public myclass: string = ''
|
||||
public dimensione: string = ''
|
||||
public dimensioneImg: any = [
|
||||
{
|
||||
id: 0,
|
||||
label: 'Piccola',
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
label: 'Media',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
label: 'Grande',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
label: 'Molto Grande',
|
||||
value: 3
|
||||
}
|
||||
]
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
// console.log('Home constructor...')
|
||||
this.initprompt()
|
||||
}
|
||||
|
||||
get static_data() {
|
||||
return static_data
|
||||
}
|
||||
|
||||
public changeAllunga(value, evt) {
|
||||
if (value)
|
||||
this.myclass = 'allunga'
|
||||
else
|
||||
this.myclass = ''
|
||||
}
|
||||
|
||||
get getappname() {
|
||||
return this.$t('msg.myAppName')
|
||||
}
|
||||
|
||||
get tools() {
|
||||
return tools
|
||||
}
|
||||
|
||||
public mounted() {
|
||||
let primo = true
|
||||
const mytime = 10000
|
||||
this.polling = setInterval(() => {
|
||||
|
||||
this.firstClassSection = 'landing_background fade homep-cover-img ' + (primo ? 'homep-cover-img-2' : 'homep-cover-img-1')
|
||||
primo = !primo
|
||||
|
||||
// console.log('this.firstClassSection', this.firstClassSection)
|
||||
|
||||
}, mytime)
|
||||
}
|
||||
|
||||
get appname() {
|
||||
return process.env.APP_NAME
|
||||
}
|
||||
|
||||
public beforeDestroy() {
|
||||
console.log('beforeDestroy')
|
||||
clearInterval(this.polling)
|
||||
}
|
||||
|
||||
public created() {
|
||||
this.animare = process.env.DEV ? 0 : 8000
|
||||
|
||||
GlobalStore.actions.prova()
|
||||
}
|
||||
|
||||
get isLogged() {
|
||||
return UserStore.state.isLogged
|
||||
}
|
||||
|
||||
public meta() {
|
||||
return {
|
||||
keywords: { name: 'keywords', content: 'Quasar website' },
|
||||
// meta tags
|
||||
meta: {
|
||||
mykey: { name: 'mykey', content: 'Key 1' },
|
||||
description: { name: 'description', content: 'Page 1' },
|
||||
keywords: { name: 'keywords', content: 'Quasar website' },
|
||||
equiv: { 'http-equiv': 'Content-Type', 'content': 'text/html; charset=UTF-8' }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public mystilecard() {
|
||||
return {
|
||||
visibility: this.cardvisible,
|
||||
display: this.displaycard
|
||||
}
|
||||
}
|
||||
|
||||
get conta() {
|
||||
return GlobalStore.state.conta
|
||||
}
|
||||
|
||||
public getenv(myvar) {
|
||||
return process.env[myvar]
|
||||
}
|
||||
|
||||
set conta(valore) {
|
||||
GlobalStore.actions.setConta(valore)
|
||||
const my = this.$q.lang.isoName
|
||||
tools.showNotif(this.$q, String(my))
|
||||
}
|
||||
|
||||
public initprompt() {
|
||||
window.addEventListener('beforeinstallprompt', function (event) {
|
||||
// console.log('******************************** beforeinstallprompt fired')
|
||||
event.preventDefault()
|
||||
// console.log('§§§§§§§§§§§§§§§§§§§§ IMPOSTA DEFERRED PROMPT !!!!!!!!!!!!!!!!! ')
|
||||
// #Todo++ IMPOSTA DEFERRED PROMPT
|
||||
return false
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
get isInCostruction() {
|
||||
return process.env.IN_CONSTRUCTION === '1'
|
||||
}
|
||||
|
||||
public getPermission() {
|
||||
return Notification.permission
|
||||
}
|
||||
|
||||
public NotServiceWorker() {
|
||||
return (!('serviceWorker' in navigator))
|
||||
}
|
||||
|
||||
public PagLogin() {
|
||||
this.$router.replace('/signin')
|
||||
}
|
||||
|
||||
public PagReg() {
|
||||
this.$router.replace('/signup')
|
||||
}
|
||||
|
||||
public openCreatePostModal() {
|
||||
console.log('APERTO ! openCreatePostModal')
|
||||
|
||||
this.conta = this.conta + 1
|
||||
|
||||
this.visibile = !this.visibile
|
||||
|
||||
if (this.visibile) {
|
||||
this.displaycard = 'block'
|
||||
this.cardvisible = 'visible'
|
||||
} else {
|
||||
this.displaycard = 'block'
|
||||
this.cardvisible = 'hidden'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public getmywidth(rec: IColl) {
|
||||
return rec.width
|
||||
}
|
||||
|
||||
public getmyheight(rec: IColl) {
|
||||
return rec.height
|
||||
}
|
||||
|
||||
public setTransition(newVal, oldVal) {
|
||||
// console.log('setTransition', newVal, oldVal)
|
||||
this.activePanelImg = newVal
|
||||
}
|
||||
|
||||
public getsubtitle(data: IColl) {
|
||||
if (data.subtitle[toolsext.getLocale()])
|
||||
return data.subtitle[toolsext.getLocale()]
|
||||
else {
|
||||
return data.subtitle[static_data.arrLangUsed[0]]
|
||||
}
|
||||
}
|
||||
|
||||
public getTitle(data: IColl) {
|
||||
if (data.title[toolsext.getLocale()])
|
||||
return data.title[toolsext.getLocale()]
|
||||
else {
|
||||
return data.title[static_data.arrLangUsed[0]]
|
||||
}
|
||||
}
|
||||
|
||||
public changedim(value) {
|
||||
this.myclass = 'allunga' + value
|
||||
// console.log('myclass', this.myclass, value)
|
||||
}
|
||||
}
|
||||
67
src/components/CPhotosGallery/CPhotosGallery.vue
Executable file
67
src/components/CPhotosGallery/CPhotosGallery.vue
Executable file
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="text-black">
|
||||
<q-checkbox v-model="withThumbnails" label="Miniature">
|
||||
</q-checkbox>
|
||||
<q-checkbox v-model="withCaptions" label="Didascalie">
|
||||
</q-checkbox>
|
||||
<q-select v-model="dimensione" :options="dimensioneImg"
|
||||
style="max-width: 150px"
|
||||
rounded
|
||||
outlined
|
||||
dense
|
||||
label="Altezza"
|
||||
emit-value map-options
|
||||
@input="changedim"
|
||||
></q-select>
|
||||
</div>
|
||||
|
||||
<q-carousel
|
||||
animated
|
||||
infinite
|
||||
arrows
|
||||
control-color="primary"
|
||||
control-text-color="white"
|
||||
swipeable
|
||||
:thumbnails="withThumbnails"
|
||||
transition-next="slide-left"
|
||||
transition-prev="slide-right"
|
||||
v-model="slide2"
|
||||
:class="`bg-grey-1 shadow-2 rounded-borders ` + myclass + ' gallery2 ' "
|
||||
@transition="setTransition"
|
||||
|
||||
>
|
||||
<q-carousel-slide v-for="(rec, index) in mygallery" v-if="rec.ingallery"
|
||||
:key="index" :name="index" :img-src="rec.img">
|
||||
|
||||
<div v-if="rec.ingallery && withCaptions" class="absolute-bottom custom-caption"
|
||||
style="margin-bottom: 70px">
|
||||
<div v-if="!!rec.title" class="text-h5"><span style="font-size: 1.25rem;">{{ getTitle(rec) }}</span></div>
|
||||
<div class="subtitle" v-html="getsubtitle(rec)"></div>
|
||||
</div>
|
||||
</q-carousel-slide>
|
||||
|
||||
<!--<template v-slot:control>
|
||||
<q-carousel-control
|
||||
position="bottom-right"
|
||||
:offset="[18, 18]"
|
||||
>
|
||||
<q-btn
|
||||
push round dense color="white" text-color="primary"
|
||||
:icon="fullscreen ? 'fullscreen_exit' : 'fullscreen'"
|
||||
@click="fullscreen = !fullscreen"
|
||||
/>
|
||||
</q-carousel-control>
|
||||
</template>-->
|
||||
</q-carousel>
|
||||
|
||||
<br>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CPhotosGallery.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CPhotosGallery.scss';
|
||||
</style>
|
||||
1
src/components/CPhotosGallery/index.ts
Executable file
1
src/components/CPhotosGallery/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CPhotosGallery} from './CPhotosGallery.vue'
|
||||
@@ -76,7 +76,7 @@ export default class CProductCard extends MixinBase {
|
||||
}
|
||||
|
||||
public getnumstore() {
|
||||
if (!!this.myproduct.storehouses)
|
||||
if (this.myproduct.storehouses)
|
||||
return this.myproduct.storehouses.length
|
||||
else
|
||||
return 0
|
||||
|
||||
@@ -405,3 +405,7 @@ $heightdescr: 20px;
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
.clVice2Resp{
|
||||
font-weight: bold;
|
||||
color: darkblue;
|
||||
}
|
||||
|
||||
@@ -63,6 +63,13 @@ export default class SingleProject extends Vue {
|
||||
return Projects.getters.getTipoVisuProj(myprojparent)
|
||||
}
|
||||
|
||||
get getTipoViewByProjParent() {
|
||||
const myprojparent = Projects.getters.getRecordById(this.itemproject.id_parent)
|
||||
if (!myprojparent)
|
||||
return ''
|
||||
return myprojparent.view
|
||||
}
|
||||
|
||||
@Prop({ required: true }) public itemproject: IProject
|
||||
|
||||
@Watch('itemproject.enableExpiring')
|
||||
@@ -115,6 +122,11 @@ export default class SingleProject extends Vue {
|
||||
this.watchupdate('viceRespUsername')
|
||||
}
|
||||
|
||||
@Watch('itemproject.vice2RespUsername')
|
||||
public valueChangedvice2Resp() {
|
||||
this.watchupdate('vice2RespUsername')
|
||||
}
|
||||
|
||||
@Watch('itemproject.themebgcolor')
|
||||
public valueChangedthemebgcolor() {
|
||||
this.watchupdate('themebgcolor')
|
||||
@@ -659,4 +671,11 @@ export default class SingleProject extends Vue {
|
||||
return ''
|
||||
}
|
||||
|
||||
public getVice2Resp() {
|
||||
if (!!GlobalStore.state.resps)
|
||||
return this.itemproject.vice2RespUsername ? GlobalStore.getters.getRespByUsername(this.itemproject.vice2RespUsername) : ''
|
||||
else
|
||||
return ''
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,6 +27,19 @@
|
||||
</div>-->
|
||||
<!--<div class="q-mx-xs"></div>-->
|
||||
|
||||
|
||||
<q-item-label v-if="getTipoViewByProjParent === 'posiz'">
|
||||
<div class="flex-item donotdrag">
|
||||
<q-input
|
||||
v-model="itemproject.pos"
|
||||
type="number"
|
||||
rounded outlined
|
||||
dense
|
||||
debounce="500"
|
||||
style="max-width: 70px;"></q-input>
|
||||
</div>
|
||||
</q-item-label>
|
||||
|
||||
<q-item-label>
|
||||
<div class="flex-item donotdrag">
|
||||
<q-input v-if="(sel && inEdit)" hide-underline type="textarea" ref="inputprojdescr"
|
||||
@@ -50,8 +63,9 @@
|
||||
</q-item-label>
|
||||
|
||||
<q-item-label v-if="getTipovisuByProjParent === TipoVisu.responsabili" caption lines="2">
|
||||
<span v-if="getResp()">Responsabile: <span class="clResp">{{ getResp() }}</span><br></span>
|
||||
<span v-if="getViceResp()">ViceResponsabile: <span class="clViceResp">{{ getViceResp() }}</span></span>
|
||||
<span v-if="getResp()">Responsabile: <span class="clResp">{{ getResp() }}</span></span>
|
||||
<span v-if="getViceResp()"><br>ViceResponsabile: <span class="clViceResp">{{ getViceResp() }}</span></span>
|
||||
<span v-if="getVice2Resp()"><br>Vice 2 Responsabile: <span class="clVice2Resp">{{ getVice2Resp() }}</span></span>
|
||||
</q-item-label>
|
||||
|
||||
<!--<div>
|
||||
|
||||
@@ -65,11 +65,16 @@ export default class SingleTodo extends Vue {
|
||||
// this.watchupdate('priority')
|
||||
// }
|
||||
|
||||
@Watch('itemtodo.descr') public valueChanged5() {
|
||||
@Watch('itemtodo.descr') public valueChangeddescr() {
|
||||
this.precDescr = this.itemtodo.descr
|
||||
this.watchupdate('descr')
|
||||
}
|
||||
|
||||
@Watch('itemtodo.note') public valueChanged5() {
|
||||
this.precDescr = this.itemtodo.note
|
||||
this.watchupdate('note')
|
||||
}
|
||||
|
||||
@Watch('itemtodo.hoursplanned') public valueChangedhoursplanned() {
|
||||
// console.log('itemtodo.hoursplanned', this.itemtodo.hoursplanned)
|
||||
this.watchupdate('hoursplanned')
|
||||
|
||||
@@ -7,7 +7,8 @@ export let idbKeyval = (() => {
|
||||
if (!db) {
|
||||
// console.log('CREO DB STORAGE JS !')
|
||||
db = new Promise((resolve, reject) => {
|
||||
const openreq = indexedDB.open('mydb3', 11);
|
||||
// console.log('open mydb3')
|
||||
const openreq = indexedDB.open('mydb3', 12);
|
||||
|
||||
openreq.onerror = () => {
|
||||
reject(openreq.error);
|
||||
|
||||
@@ -67,6 +67,10 @@
|
||||
color: red;
|
||||
}
|
||||
|
||||
.isSocioResidente {
|
||||
color: darkgreen;
|
||||
}
|
||||
|
||||
.isCalendar {
|
||||
color: #fff241;
|
||||
}
|
||||
|
||||
@@ -76,18 +76,23 @@ export default class MenuOne extends Vue {
|
||||
public getmymenuclass(elem: IListRoutes) {
|
||||
let menu = this.clBaseint
|
||||
|
||||
if (elem.onlyAdmin)
|
||||
menu += ' isAdmin'
|
||||
if (elem.onlyManager)
|
||||
menu += ' isManager'
|
||||
if (elem.onlySocioResidente)
|
||||
menu += ' isSocioResidente'
|
||||
if (elem.onlyDepartment)
|
||||
menu += ' isDepartment'
|
||||
if (elem.onlyTutor)
|
||||
menu += ' isTutor'
|
||||
if (elem.onlyTraduttrici)
|
||||
menu += ' isTraduttrici'
|
||||
if (elem.color) {
|
||||
menu += ' ' + elem.color
|
||||
} else {
|
||||
if (elem.onlyAdmin)
|
||||
menu += ' isAdmin'
|
||||
if (elem.onlyManager)
|
||||
menu += ' isManager'
|
||||
if (elem.onlySocioResidente)
|
||||
menu += ' isSocioResidente'
|
||||
if (elem.onlyDepartment)
|
||||
menu += ' isDepartment'
|
||||
if (elem.onlyTutor)
|
||||
menu += ' isTutor'
|
||||
if (elem.onlyTraduttrici)
|
||||
menu += ' isTraduttrici'
|
||||
|
||||
}
|
||||
|
||||
if (elem.extraclass)
|
||||
menu += ' ' + elem.extraclass
|
||||
|
||||
@@ -72,7 +72,9 @@ export interface IMyPage {
|
||||
content?: string
|
||||
active?: boolean
|
||||
inmenu?: boolean
|
||||
color?: string
|
||||
onlyif_logged?: boolean
|
||||
only_residenti?: boolean
|
||||
submenu?: boolean
|
||||
l_par?: number,
|
||||
l_child?: number,
|
||||
@@ -228,6 +230,7 @@ export interface IListRoutes {
|
||||
onlySocioResidente?: boolean
|
||||
onlyDepartment?: boolean
|
||||
onlyTutor?: boolean
|
||||
color?: string
|
||||
onlyTraduttrici?: boolean
|
||||
extraclass?: string
|
||||
meta?: any
|
||||
|
||||
@@ -18,6 +18,7 @@ export interface IProject {
|
||||
id_main_project?: string
|
||||
id_parent?: string
|
||||
descr?: string
|
||||
note?: string
|
||||
longdescr?: string
|
||||
priority?: number
|
||||
statusproj?: number
|
||||
@@ -50,6 +51,8 @@ export interface IProject {
|
||||
groupId?: string
|
||||
respUsername?: string
|
||||
viceRespUsername?: string
|
||||
vice2RespUsername?: string
|
||||
view?: string
|
||||
}
|
||||
|
||||
export interface IProjectsState {
|
||||
|
||||
@@ -5,6 +5,7 @@ export interface ITodo {
|
||||
userId?: string
|
||||
category?: string
|
||||
descr?: string,
|
||||
note?: string,
|
||||
priority?: number,
|
||||
statustodo?: number,
|
||||
created_at?: Date,
|
||||
|
||||
@@ -529,6 +529,7 @@ const msg_it = {
|
||||
newsubproj: 'Titolo Sotto-Progetto',
|
||||
insertbottom: 'Inserisci Nuovo Project',
|
||||
longdescr: 'Descrizione',
|
||||
note: 'Note',
|
||||
hoursplanned: 'Ore Preventivate',
|
||||
hoursadded: 'Ore Aggiuntive',
|
||||
hoursworked: 'Ore Lavorate',
|
||||
@@ -546,7 +547,8 @@ const msg_it = {
|
||||
themebgcolor: 'Tema Colore Sfondo',
|
||||
group: 'Gruppo',
|
||||
respUsername: 'Responsabile',
|
||||
viceRespUsername: 'Vice Responsabile'
|
||||
viceRespUsername: 'Vice Responsabile',
|
||||
vice2RespUsername: 'Vice 2 Responsabile'
|
||||
},
|
||||
where: {
|
||||
code: 'Id',
|
||||
|
||||
@@ -572,8 +572,6 @@ namespace Actions {
|
||||
// console.log('saveSubscriptionToServer: ', newSub)
|
||||
// console.log('context', context)
|
||||
|
||||
console.log('saveNewSubscriptionToServer')
|
||||
|
||||
let options = null
|
||||
let notreg = false
|
||||
|
||||
@@ -607,6 +605,9 @@ namespace Actions {
|
||||
state.wasAlreadySubscribed = true
|
||||
state.wasAlreadySubOnDb = true
|
||||
|
||||
if (res)
|
||||
console.log('saveNewSubscriptionToServer: OK')
|
||||
|
||||
localStorage.setItem(tools.localStorage.wasAlreadySubOnDb, String(state.wasAlreadySubOnDb))
|
||||
})
|
||||
.catch((e) => {
|
||||
@@ -672,7 +673,7 @@ namespace Actions {
|
||||
}
|
||||
|
||||
async function loadAfterLogin(context) {
|
||||
console.log('loadAfterLogin')
|
||||
// console.log('loadAfterLogin')
|
||||
actions.clearDataAfterLoginOnlyIfActiveConnection()
|
||||
|
||||
let isok = false
|
||||
@@ -1226,6 +1227,8 @@ namespace Actions {
|
||||
materialIcon: page.icon,
|
||||
component: () => import('@/root/mypage/mypage.vue'),
|
||||
inmenu: page.inmenu,
|
||||
onlySocioResidente: page.only_residenti,
|
||||
color: page.color,
|
||||
infooter: page.infooter,
|
||||
onlyif_logged: page.onlyif_logged,
|
||||
level_child: page.l_child,
|
||||
|
||||
@@ -27,10 +27,10 @@ const stateglob: IProjectsState = {
|
||||
visuLastCompleted: 10
|
||||
}
|
||||
|
||||
const listFieldsToChange: string [] = ['descr', 'respUsername', 'viceRespUsername', 'longdescr', 'hoursplanned', 'hoursleft', 'hoursworked', 'id_parent', 'statusproj',
|
||||
const listFieldsToChange: string [] = ['descr', 'respUsername', 'viceRespUsername', 'vice2RespUsername', 'longdescr', 'hoursplanned', 'hoursleft', 'hoursworked', 'id_parent', 'statusproj',
|
||||
'category', 'expiring_at', 'priority', 'pos', 'groupId', 'enableExpiring', 'progressCalc', 'live_url', 'test_url',
|
||||
'begin_development', 'begin_test', 'actualphase', 'totalphases', 'hoursweeky_plannedtowork', 'endwork_estimate',
|
||||
'privacyread', 'privacywrite', 'tipovisu', 'id_main_project', 'typeproj', 'favourite', 'themecolor', 'themebgcolor']
|
||||
'privacyread', 'privacywrite', 'tipovisu', 'id_main_project', 'typeproj', 'favourite', 'themecolor', 'themebgcolor', 'view']
|
||||
|
||||
const listFieldsUpdateCalculation: string [] = ['hoursplanned', 'hoursleft', 'hoursworked', 'progressCalc', 'endwork_estimate']
|
||||
|
||||
@@ -142,6 +142,7 @@ namespace Getters {
|
||||
groupId: '',
|
||||
respUsername: '',
|
||||
viceRespUsername: '',
|
||||
vice2RespUsername: '',
|
||||
tipovisu: 0
|
||||
}
|
||||
|
||||
@@ -399,9 +400,9 @@ namespace Actions {
|
||||
// return false // Login not made
|
||||
// }
|
||||
|
||||
console.log('UserStore.state.my', UserStore.state.my)
|
||||
// console.log('UserStore.state.my', UserStore.state.my)
|
||||
|
||||
console.log('dbLoad', nametable, checkPending, 'userid=', UserStore.state.my._id)
|
||||
// console.log('dbLoad', nametable, checkPending, 'userid=', UserStore.state.my._id)
|
||||
|
||||
const ris = await Api.SendReq('/projects/' + UserStore.state.my._id, 'GET', null)
|
||||
.then((res) => {
|
||||
|
||||
@@ -69,6 +69,7 @@ namespace Getters {
|
||||
_id: objectId(),
|
||||
userId: UserStore.state.my._id,
|
||||
descr: '',
|
||||
note: '',
|
||||
priority: tools.Priority.PRIORITY_NORMAL,
|
||||
statustodo: tools.Status.OPENED,
|
||||
created_at: tools.getDateNow(),
|
||||
@@ -264,7 +265,7 @@ namespace Actions {
|
||||
if (!static_data.functionality.ENABLE_PROJECTS_LOADING)
|
||||
return null
|
||||
|
||||
console.log('dbLoad', nametable, checkPending, 'userid=', UserStore.state.my._id)
|
||||
// console.log('dbLoad', nametable, checkPending, 'userid=', UserStore.state.my._id)
|
||||
|
||||
// if (UserStore.state.my._id === '') {
|
||||
// return new Types.AxiosError(0, null, 0, '')
|
||||
|
||||
@@ -899,7 +899,8 @@ namespace Actions {
|
||||
}
|
||||
|
||||
async function setGlobal(isLogged: boolean) {
|
||||
console.log('setGlobal', isLogged)
|
||||
// console.log('setGlobal', isLogged)
|
||||
|
||||
try {
|
||||
// state.isLogged = true
|
||||
if (isLogged) {
|
||||
|
||||
@@ -97,7 +97,7 @@ export const colmsg_templates = [
|
||||
|
||||
export const colmypage = [
|
||||
AddCol({ name: 'title', label_trans: 'pages.title' }),
|
||||
AddCol({ name: 'content', label_trans: 'pages.content', fieldtype: tools.FieldType.html }),
|
||||
AddCol({ name: 'content', label_trans: 'pages.contentfield', fieldtype: tools.FieldType.html }),
|
||||
AddCol({ name: 'lang', label_trans: 'pages.lang' }),
|
||||
AddCol({ name: 'path', label_trans: 'pages.path' }),
|
||||
AddCol({ name: 'icon', label_trans: 'pages.icon' }),
|
||||
@@ -105,7 +105,9 @@ export const colmypage = [
|
||||
AddCol({ name: 'keywords', label_trans: 'pages.keywords' }),
|
||||
AddCol({ name: 'description', label_trans: 'pages.description' }),
|
||||
AddCol({ name: 'heightimg', label_trans: 'pages.heightimg', fieldtype: tools.FieldType.number }),
|
||||
AddCol({ name: 'color', label_trans: 'pages.color', fieldtype: tools.FieldType.string }),
|
||||
AddCol({ name: 'onlyif_logged', label_trans: 'pages.onlyif_logged', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'only_residenti', label_trans: 'pages.only_residenti', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'imgback', label_trans: 'pages.imgback', fieldtype: tools.FieldType.string }),
|
||||
AddCol({ name: 'active', label_trans: 'pages.active', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'inmenu', label_trans: 'pages.inmenu', fieldtype: tools.FieldType.boolean }),
|
||||
|
||||
@@ -10,6 +10,7 @@ export const lists = {
|
||||
PROGRESS_BAR: 120,
|
||||
PRIORITY: 130,
|
||||
SHOW_TASK: 150,
|
||||
SHOW_POSIZ: 155,
|
||||
EDIT: 160,
|
||||
ADD_PROJECT: 200,
|
||||
THEME: 210,
|
||||
|
||||
@@ -1000,6 +1000,13 @@ export const tools = {
|
||||
label: translation.it.task.showtask,
|
||||
value: 150, // SHOW_TASK
|
||||
icon: 'rowing'
|
||||
},
|
||||
{
|
||||
id: 15,
|
||||
disable: false,
|
||||
label: translation.it.task.showposiz,
|
||||
value: 155, // SHOW_POSIZ
|
||||
icon: 'rowing'
|
||||
}
|
||||
],
|
||||
es:
|
||||
@@ -2036,7 +2043,7 @@ export const tools = {
|
||||
,
|
||||
|
||||
checkLangPassed(mylang) {
|
||||
console.log('checkLangPassed ', mylang)
|
||||
// console.log('checkLangPassed ', mylang)
|
||||
|
||||
const mybrowserLang = Quasar.lang.isoName
|
||||
|
||||
@@ -2267,7 +2274,7 @@ export const tools = {
|
||||
},
|
||||
|
||||
isSocioResidente() {
|
||||
return UserStore.state.my.profile.socioresidente
|
||||
return !!UserStore.state.my.profile ? UserStore.state.my.profile.socioresidente : false
|
||||
},
|
||||
|
||||
isResp() {
|
||||
@@ -2530,7 +2537,7 @@ export const tools = {
|
||||
|
||||
gettimestampstrDate(mydatestr) {
|
||||
if (!!mydatestr) {
|
||||
let mydate = new Date(mydatestr)
|
||||
const mydate = new Date(mydatestr)
|
||||
if (!!mydate)
|
||||
return mydate.getTime()
|
||||
}
|
||||
@@ -3320,9 +3327,15 @@ export const tools = {
|
||||
},
|
||||
displayStyles(eventparam) {
|
||||
const s = { color: '' }
|
||||
if (tools.isCssColor(eventparam.bgcolor)) {
|
||||
|
||||
let mycol = eventparam.bgcolor
|
||||
if (!tools.isCssColor(eventparam.bgcolor)) {
|
||||
mycol = this.colourNameToHex(mycol)
|
||||
}
|
||||
|
||||
if (tools.isCssColor(mycol)) {
|
||||
// s['background-color'] = eventparam.bgcolor
|
||||
s.color = colors.luminosity(eventparam.bgcolor) > 0.5 ? 'black' : 'white'
|
||||
s.color = colors.luminosity(mycol) > 0.5 ? 'black' : 'white'
|
||||
}
|
||||
return s
|
||||
},
|
||||
@@ -4291,6 +4304,156 @@ export const tools = {
|
||||
minutes = '' + d.getMinutes()
|
||||
|
||||
return [tools.padTime(hours), tools.padTime(minutes)].join(':')
|
||||
},
|
||||
colourNameToHex(colour) {
|
||||
const colours = {
|
||||
'aliceblue': '#f0f8ff',
|
||||
'antiquewhite': '#faebd7',
|
||||
'aqua': '#00ffff',
|
||||
'aquamarine': '#7fffd4',
|
||||
'azure': '#f0ffff',
|
||||
'beige': '#f5f5dc',
|
||||
'bisque': '#ffe4c4',
|
||||
'black': '#000000',
|
||||
'blanchedalmond': '#ffebcd',
|
||||
'blue': '#0000ff',
|
||||
'blueviolet': '#8a2be2',
|
||||
'brown': '#a52a2a',
|
||||
'burlywood': '#deb887',
|
||||
'cadetblue': '#5f9ea0',
|
||||
'chartreuse': '#7fff00',
|
||||
'chocolate': '#d2691e',
|
||||
'coral': '#ff7f50',
|
||||
'cornflowerblue': '#6495ed',
|
||||
'cornsilk': '#fff8dc',
|
||||
'crimson': '#dc143c',
|
||||
'cyan': '#00ffff',
|
||||
'darkblue': '#00008b',
|
||||
'darkcyan': '#008b8b',
|
||||
'darkgoldenrod': '#b8860b',
|
||||
'darkgray': '#a9a9a9',
|
||||
'darkgreen': '#006400',
|
||||
'darkkhaki': '#bdb76b',
|
||||
'darkmagenta': '#8b008b',
|
||||
'darkolivegreen': '#556b2f',
|
||||
'darkorange': '#ff8c00',
|
||||
'darkorchid': '#9932cc',
|
||||
'darkred': '#8b0000',
|
||||
'darksalmon': '#e9967a',
|
||||
'darkseagreen': '#8fbc8f',
|
||||
'darkslateblue': '#483d8b',
|
||||
'darkslategray': '#2f4f4f',
|
||||
'darkturquoise': '#00ced1',
|
||||
'darkviolet': '#9400d3',
|
||||
'deeppink': '#ff1493',
|
||||
'deepskyblue': '#00bfff',
|
||||
'dimgray': '#696969',
|
||||
'dodgerblue': '#1e90ff',
|
||||
'firebrick': '#b22222',
|
||||
'floralwhite': '#fffaf0',
|
||||
'forestgreen': '#228b22',
|
||||
'fuchsia': '#ff00ff',
|
||||
'gainsboro': '#dcdcdc',
|
||||
'ghostwhite': '#f8f8ff',
|
||||
'gold': '#ffd700',
|
||||
'goldenrod': '#daa520',
|
||||
'gray': '#808080',
|
||||
'green': '#008000',
|
||||
'greenyellow': '#adff2f',
|
||||
'honeydew': '#f0fff0',
|
||||
'hotpink': '#ff69b4',
|
||||
'indianred ': '#cd5c5c',
|
||||
'indigo': '#4b0082',
|
||||
'ivory': '#fffff0',
|
||||
'khaki': '#f0e68c',
|
||||
'lavender': '#e6e6fa',
|
||||
'lavenderblush': '#fff0f5',
|
||||
'lawngreen': '#7cfc00',
|
||||
'lemonchiffon': '#fffacd',
|
||||
'lightblue': '#add8e6',
|
||||
'lightcoral': '#f08080',
|
||||
'lightcyan': '#e0ffff',
|
||||
'lightgoldenrodyellow': '#fafad2',
|
||||
'lightgrey': '#d3d3d3',
|
||||
'lightgreen': '#90ee90',
|
||||
'lightpink': '#ffb6c1',
|
||||
'lightsalmon': '#ffa07a',
|
||||
'lightseagreen': '#20b2aa',
|
||||
'lightskyblue': '#87cefa',
|
||||
'lightslategray': '#778899',
|
||||
'lightsteelblue': '#b0c4de',
|
||||
'lightyellow': '#ffffe0',
|
||||
'lime': '#00ff00',
|
||||
'limegreen': '#32cd32',
|
||||
'linen': '#faf0e6',
|
||||
'magenta': '#ff00ff',
|
||||
'maroon': '#800000',
|
||||
'mediumaquamarine': '#66cdaa',
|
||||
'mediumblue': '#0000cd',
|
||||
'mediumorchid': '#ba55d3',
|
||||
'mediumpurple': '#9370d8',
|
||||
'mediumseagreen': '#3cb371',
|
||||
'mediumslateblue': '#7b68ee',
|
||||
'mediumspringgreen': '#00fa9a',
|
||||
'mediumturquoise': '#48d1cc',
|
||||
'mediumvioletred': '#c71585',
|
||||
'midnightblue': '#191970',
|
||||
'mintcream': '#f5fffa',
|
||||
'mistyrose': '#ffe4e1',
|
||||
'moccasin': '#ffe4b5',
|
||||
'navajowhite': '#ffdead',
|
||||
'navy': '#000080',
|
||||
'oldlace': '#fdf5e6',
|
||||
'olive': '#808000',
|
||||
'olivedrab': '#6b8e23',
|
||||
'orange': '#ffa500',
|
||||
'orangered': '#ff4500',
|
||||
'orchid': '#da70d6',
|
||||
'palegoldenrod': '#eee8aa',
|
||||
'palegreen': '#98fb98',
|
||||
'paleturquoise': '#afeeee',
|
||||
'palevioletred': '#d87093',
|
||||
'papayawhip': '#ffefd5',
|
||||
'peachpuff': '#ffdab9',
|
||||
'peru': '#cd853f',
|
||||
'pink': '#ffc0cb',
|
||||
'plum': '#dda0dd',
|
||||
'powderblue': '#b0e0e6',
|
||||
'purple': '#800080',
|
||||
'rebeccapurple': '#663399',
|
||||
'red': '#ff0000',
|
||||
'rosybrown': '#bc8f8f',
|
||||
'royalblue': '#4169e1',
|
||||
'saddlebrown': '#8b4513',
|
||||
'salmon': '#fa8072',
|
||||
'sandybrown': '#f4a460',
|
||||
'seagreen': '#2e8b57',
|
||||
'seashell': '#fff5ee',
|
||||
'sienna': '#a0522d',
|
||||
'silver': '#c0c0c0',
|
||||
'skyblue': '#87ceeb',
|
||||
'slateblue': '#6a5acd',
|
||||
'slategray': '#708090',
|
||||
'snow': '#fffafa',
|
||||
'springgreen': '#00ff7f',
|
||||
'steelblue': '#4682b4',
|
||||
'tan': '#d2b48c',
|
||||
'teal': '#008080',
|
||||
'thistle': '#d8bfd8',
|
||||
'tomato': '#ff6347',
|
||||
'turquoise': '#40e0d0',
|
||||
'violet': '#ee82ee',
|
||||
'wheat': '#f5deb3',
|
||||
'white': '#ffffff',
|
||||
'whitesmoke': '#f5f5f5',
|
||||
'yellow': '#ffff00',
|
||||
'yellowgreen': '#9acd32'
|
||||
}
|
||||
|
||||
if (typeof colours[colour.toLowerCase()] != 'undefined')
|
||||
return colours[colour.toLowerCase()]
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// getLocale() {
|
||||
|
||||
@@ -21,6 +21,7 @@ export const translation = {
|
||||
},
|
||||
task: {
|
||||
showtask: 'Mostra Task',
|
||||
showposiz: 'Mostra Ordine',
|
||||
},
|
||||
action: {
|
||||
paste: 'Incolla'
|
||||
|
||||
@@ -413,6 +413,7 @@ export default class ProjList extends Vue {
|
||||
this.updateclasses()
|
||||
}
|
||||
|
||||
|
||||
@Watch('itemselproj._id')
|
||||
public changeidproj() {
|
||||
this.aggiornastat()
|
||||
@@ -474,6 +475,17 @@ export default class ProjList extends Vue {
|
||||
})
|
||||
}
|
||||
|
||||
public modifyfieldprojBase(field) {
|
||||
Projects.actions.modify({ myitem: this.itemproj, field })
|
||||
.then((ris) => {
|
||||
console.log('ris', ris)
|
||||
if (ris)
|
||||
tools.showPositiveNotif(this.$q, 'Campo Aggiornato')
|
||||
else
|
||||
tools.showNegativeNotif(this.$q, 'Campo non Aggiornato!')
|
||||
})
|
||||
}
|
||||
|
||||
public selproj() {
|
||||
this.deselectAllRowsproj(null, false, false)
|
||||
this.deselectAllRowstodo(null, false, false)
|
||||
@@ -595,7 +607,7 @@ export default class ProjList extends Vue {
|
||||
}
|
||||
|
||||
public async clickMenuProjList(action) {
|
||||
// console.log('clickMenuProjList: ', action)
|
||||
console.log('clickMenuProjList: ', action)
|
||||
if (action === lists.MenuAction.ADD_PROJECT) {
|
||||
const idnewelem = await this.addProject('inserisci qui...', this.gettipoProj)
|
||||
// console.log('idnewelem', idnewelem)
|
||||
@@ -607,6 +619,18 @@ export default class ProjList extends Vue {
|
||||
elem.activeEdit()
|
||||
}
|
||||
// console.log('idnewelem', idnewelem, 'Elem Trovato', elem)
|
||||
} else if (action === lists.MenuAction.SHOW_POSIZ) {
|
||||
|
||||
if (!!this.itemproj) {
|
||||
if (this.itemproj.view !== 'posiz')
|
||||
this.itemproj.view = 'posiz'
|
||||
else
|
||||
this.itemproj.view = ''
|
||||
|
||||
this.modifyfieldprojBase('view')
|
||||
|
||||
this.load()
|
||||
}
|
||||
} else if (action === lists.MenuAction.PASTE) {
|
||||
|
||||
const myaction: IAction = {
|
||||
@@ -853,7 +877,6 @@ export default class ProjList extends Vue {
|
||||
ApiTables.waitAndRefreshData()
|
||||
}
|
||||
|
||||
|
||||
private updateindexProj() {
|
||||
// console.log('idProjAtt', this.idProjAtt)
|
||||
this.itemproj = Projects.getters.getRecordById(this.idProjAtt)
|
||||
|
||||
@@ -174,6 +174,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div v-if="CanISeeProjectSel" class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="fas fa-sort-amount-up-alt"/>
|
||||
<div class="flex-item itemdescr">
|
||||
@@ -218,6 +220,12 @@
|
||||
:label="$t('proj.viceRespUsername')" emit-value map-options
|
||||
@input="modifyfieldproj('viceRespUsername')">
|
||||
</q-select>
|
||||
<q-select style="min-width: 200px"
|
||||
:readonly="readonly_PanelPrivacySel"
|
||||
rounded outlined v-model="itemselproj.vice2RespUsername" :options="selectResp"
|
||||
:label="$t('proj.vice2RespUsername')" emit-value map-options
|
||||
@input="modifyfieldproj('vice2RespUsername')">
|
||||
</q-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-container clMain">
|
||||
@@ -262,7 +270,7 @@
|
||||
<div class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="border_color"/>
|
||||
<div class="flex-item itemdescr">
|
||||
<q-icon size="md" :name="iconPriority" color="primary"/>
|
||||
<!--<q-icon size="md" :name="iconPriority" color="primary"/>-->
|
||||
<q-input
|
||||
ref="input4"
|
||||
v-model="itemtodosel.descr"
|
||||
@@ -279,6 +287,25 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="border_color"/>
|
||||
<div class="flex-item itemdescr">
|
||||
<!--<q-icon size="md" :name="iconPriority" color="primary"/>-->
|
||||
<q-input
|
||||
ref="input4"
|
||||
v-model="itemtodosel.note"
|
||||
:label="$t('proj.note')"
|
||||
outlined
|
||||
:readonly="readonly_PanelPrivacy"
|
||||
@input="modifyfieldtodo('note')"
|
||||
debounce="1000"
|
||||
autogrow
|
||||
style="flex: auto">
|
||||
|
||||
</q-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-container clMain">
|
||||
<q-icon class="flex-item flex-icon" name="fas fa-sort-amount-up-alt"/>
|
||||
<div class="flex-item itemdescr">
|
||||
|
||||
@@ -23,12 +23,17 @@ export default class Report extends MixinBase {
|
||||
calendar: any
|
||||
}
|
||||
|
||||
public myView: string = 'month'
|
||||
public myView: string = 'week-agenda'
|
||||
public myresource = { username: '' }
|
||||
public title: string = ''
|
||||
public spinner_visible: boolean = false
|
||||
|
||||
public optView = [{ _id: 1, label: 'Settimanale', value: 'week-scheduler' },
|
||||
{ _id: 2, label: 'Mensile', value: 'month' }]
|
||||
public optView = [
|
||||
{ _id: 1, label: 'Comunità', value: 'week-scheduler' },
|
||||
{ _id: 2, label: 'Giornalieri', value: 'day' },
|
||||
{ _id: 2, label: 'Settimanale', value: 'week-agenda' },
|
||||
{ _id: 3, label: 'Mensile', value: 'month' }
|
||||
]
|
||||
|
||||
public resourceHeight = 60
|
||||
|
||||
@@ -77,8 +82,17 @@ export default class Report extends MixinBase {
|
||||
}
|
||||
|
||||
public load() {
|
||||
this.spinner_visible = true
|
||||
this.myresource.username = UserStore.state.my.username
|
||||
const date_start = tools.addDays(new Date(tools.getTimestampsNow()), -90)
|
||||
let ggindietro = 90
|
||||
if (this.myView === 'week-agenda' || this.myView === 'week-scheduler') {
|
||||
ggindietro = 60
|
||||
} else if (this.myView === 'month') {
|
||||
ggindietro = 90
|
||||
} else if (this.myView === 'day') {
|
||||
ggindietro = 28
|
||||
}
|
||||
const date_start = tools.addDays(new Date(tools.getTimestampsNow()), -ggindietro)
|
||||
const date_end = tools.addDays(new Date(tools.getTimestampsNow()), 30)
|
||||
UserStore.actions.reportload({ date_start, date_end, filter: this.valfilter })
|
||||
.then((myris) => {
|
||||
@@ -86,6 +100,7 @@ export default class Report extends MixinBase {
|
||||
console.log('myris', myris)
|
||||
this.arrhour = myris.arrhour
|
||||
this.listaResidenti = myris.listaResidenti
|
||||
this.spinner_visible = false
|
||||
}
|
||||
})
|
||||
|
||||
@@ -99,10 +114,15 @@ export default class Report extends MixinBase {
|
||||
|
||||
public badgeClasses(eventparam, type) {
|
||||
const cssColor = tools.isCssColor(eventparam.bgcolor)
|
||||
let mycol = eventparam.bgcolor
|
||||
if (!tools.isCssColor(eventparam.bgcolor)) {
|
||||
mycol = tools.colourNameToHex(mycol)
|
||||
}
|
||||
const isHeader = type === 'header'
|
||||
return {
|
||||
[`text-white bg-${eventparam.bgcolor}`]: !cssColor,
|
||||
[`bg-${eventparam.bgcolor}`]: !cssColor,
|
||||
'full-width': !isHeader && (!eventparam.side || eventparam.side === 'full'),
|
||||
'color': mycol,
|
||||
'left-side': !isHeader && eventparam.side === 'left',
|
||||
'right-side': !isHeader && eventparam.side === 'right'
|
||||
}
|
||||
@@ -120,11 +140,18 @@ export default class Report extends MixinBase {
|
||||
public badgeStyles(eventparam) {
|
||||
const s = { color: '', top: '', height: '', opacity: 1 }
|
||||
|
||||
if (tools.isCssColor(eventparam.bgcolor)) {
|
||||
s['background-color'] = eventparam.bgcolor
|
||||
s.color = colors.luminosity(eventparam.bgcolor) > 0.5 ? 'black' : 'white'
|
||||
let mycol = eventparam.bgcolor
|
||||
if (!tools.isCssColor(eventparam.bgcolor)) {
|
||||
mycol = tools.colourNameToHex(mycol)
|
||||
}
|
||||
|
||||
if (tools.isCssColor(mycol)) {
|
||||
s['background-color'] = mycol
|
||||
s.color = colors.luminosity(mycol) > 0.5 ? 'black' : 'white'
|
||||
}
|
||||
|
||||
// console.log('bgcolor', s['background-color'])
|
||||
// console.log('fore', s.color)
|
||||
// if (!this.isEventEnabled(eventparam)) {
|
||||
// s.opacity = 0.5
|
||||
// }
|
||||
@@ -171,7 +198,13 @@ export default class Report extends MixinBase {
|
||||
|
||||
this.valfilter = 0
|
||||
for (const filter of this.arrfilters) {
|
||||
if (filter.ris)
|
||||
|
||||
let myris = filter.ris
|
||||
if (this.myView === 'day') {
|
||||
myris = true
|
||||
}
|
||||
|
||||
if (myris)
|
||||
this.valfilter += filter.value
|
||||
|
||||
if (filter.value === shared_consts.REPORT_FILT_ATTIVITA && filter.ris) {
|
||||
|
||||
@@ -8,11 +8,16 @@
|
||||
@input="refreshFilter(true)"></q-toggle>
|
||||
</div>
|
||||
|
||||
<q-select v-model="myView" :options="optView" emit-value map-options style="max-width: 150px"></q-select>
|
||||
<q-select v-model="myView" :options="optView" emit-value map-options style="max-width: 150px"
|
||||
@input="refreshFilter(true)"></q-select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<q-inner-loading :showing="spinner_visible">
|
||||
<q-spinner-tail size="2em" color="primary"/>
|
||||
</q-inner-loading>
|
||||
|
||||
<div class="row justify-center items-center">
|
||||
<div class="items-lg-start row">
|
||||
<q-btn flat dense icon="fas fa-chevron-left" @click="calendarPrev"/>
|
||||
@@ -28,6 +33,7 @@
|
||||
<q-calendar
|
||||
v-model="selectedDate"
|
||||
ref="calendar"
|
||||
:column-header-after="true"
|
||||
:view="myView"
|
||||
:weekdays="[1,2,3,4,5,6,0]"
|
||||
animated
|
||||
@@ -115,6 +121,39 @@
|
||||
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<template #column-header-after="{ timestamp, index2 }">
|
||||
|
||||
<template v-for="(event, index) in getEvents(timestamp, myresource)">
|
||||
<div v-if="event.totalhours > 0" class="centermydiv">
|
||||
<p
|
||||
:key="index"
|
||||
class="flex justify-center text-h7"
|
||||
>
|
||||
<q-chip dense color="primary" text-color="white" >{{ event.totalhours }}</q-chip>
|
||||
</p>
|
||||
</div>
|
||||
<div v-if="event.totalacchours > 0" class="row justify-center items-center">
|
||||
<p
|
||||
:key="index"
|
||||
class="flex justify-center text-h7 boldhigh text-blue"
|
||||
>
|
||||
<q-chip dense :color="event.totalacchours > 24 ? 'positive' : 'negative'" text-color="white">[{{ event.totalacchours }}]</q-chip>
|
||||
</p>
|
||||
</div>
|
||||
<div v-if="!!event.title">
|
||||
<q-badge
|
||||
:key="index"
|
||||
class="my-event justify-center ellipsis"
|
||||
:class="badgeClasses(event, 'body')"
|
||||
:style="badgeStyles(event)"
|
||||
>
|
||||
<span class="ellipsis">{{ event.title }}</span>
|
||||
</q-badge>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</template>
|
||||
</q-calendar>
|
||||
<div v-if="myView === 'month'">
|
||||
<CTitleBanner :title="'Ore Mensili: ' + getOreMensili"></CTitleBanner>
|
||||
|
||||
Reference in New Issue
Block a user