Project e Todos sistemati...
aggiunti Gruppi
This commit is contained in:
@@ -73,6 +73,12 @@ export const shared_consts = {
|
|||||||
label: 'dashboard.zoomeri',
|
label: 'dashboard.zoomeri',
|
||||||
icon: 'fas fa-user-tie',
|
icon: 'fas fa-user-tie',
|
||||||
color: 'yellow'
|
color: 'yellow'
|
||||||
|
},
|
||||||
|
Department: {
|
||||||
|
value: 64,
|
||||||
|
label: 'pages.department',
|
||||||
|
icon: 'fas fa-user-tie',
|
||||||
|
color: 'yellow'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -91,7 +97,7 @@ export const shared_consts = {
|
|||||||
TypeMsg_Actions: {
|
TypeMsg_Actions: {
|
||||||
NORMAL: 0,
|
NORMAL: 0,
|
||||||
YESNO: 1,
|
YESNO: 1,
|
||||||
OPZ1_2: 2,
|
OPZ1_2: 2
|
||||||
},
|
},
|
||||||
|
|
||||||
selectActions: [
|
selectActions: [
|
||||||
@@ -138,13 +144,53 @@ export const shared_consts = {
|
|||||||
OrderStatus: {
|
OrderStatus: {
|
||||||
NONE: 0,
|
NONE: 0,
|
||||||
IN_CART: 1,
|
IN_CART: 1,
|
||||||
CHECKOUT_CONFIRMED: 2,
|
CHECKOUT_SENT: 2,
|
||||||
PAYED: 3,
|
ORDER_CONFIRMED: 3,
|
||||||
DELIVEDED: 4,
|
PAYED: 4,
|
||||||
RECEIVED: 5,
|
DELIVEDED: 5,
|
||||||
CANCELED: 10,
|
RECEIVED: 6,
|
||||||
|
CANCELED: 10
|
||||||
},
|
},
|
||||||
|
|
||||||
|
OrderStatusStr: [
|
||||||
|
{
|
||||||
|
label: 'Nessuno',
|
||||||
|
value: 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'In Carrello',
|
||||||
|
value: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Ordine Inviato',
|
||||||
|
value: 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Ordine Confermato',
|
||||||
|
value: 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Pagato',
|
||||||
|
value: 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Spedito',
|
||||||
|
value: 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Ricevuto',
|
||||||
|
value: 6
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Cancellato',
|
||||||
|
value: 10
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
getStatusStr(status) {
|
||||||
|
const trovatorec = this.OrderStatusStr.find((rec) => rec.value === status)
|
||||||
|
return (!!trovatorec) ? trovatorec.label : ''
|
||||||
|
},
|
||||||
|
|
||||||
fieldsUserToChange() {
|
fieldsUserToChange() {
|
||||||
return ['_id', 'username', 'email', 'name', 'surname', 'perm', 'date_reg', 'verified_email', 'img', 'ipaddr', 'lasttimeonline', 'profile', 'news_on']
|
return ['_id', 'username', 'email', 'name', 'surname', 'perm', 'date_reg', 'verified_email', 'img', 'ipaddr', 'lasttimeonline', 'profile', 'news_on']
|
||||||
|
|||||||
@@ -79,6 +79,10 @@ export default class CGridTableRec extends Vue {
|
|||||||
return UserStore.state.isManager
|
return UserStore.state.isManager
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get isSocioResidente() {
|
||||||
|
return UserStore.state.my.profile.socioresidente
|
||||||
|
}
|
||||||
|
|
||||||
get isTutor() {
|
get isTutor() {
|
||||||
return UserStore.state.isTutor
|
return UserStore.state.isTutor
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,8 +114,8 @@
|
|||||||
</FormNewsletter>
|
</FormNewsletter>
|
||||||
|
|
||||||
<p class="text-center">
|
<p class="text-center">
|
||||||
<router-link v-if="static_data.functionality.SHOW_ONLY_POLICY" to="/policy"><span
|
<router-link v-if="static_data.functionality.SHOW_ONLY_POLICY" to="/policy" custom v-slot="{ navigate }">
|
||||||
class="footer_link">{{$t('privacy_policy')}}</span></router-link>
|
<span class="footer_link" @click="navigate" @keypress.enter="navigate" role="link">{{$t('privacy_policy')}}</span></router-link>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -131,8 +131,8 @@
|
|||||||
<span class="footer_link">{{tools.getLabelByItem(myitemmenu, mythisfoot)}}</span><br/>
|
<span class="footer_link">{{tools.getLabelByItem(myitemmenu, mythisfoot)}}</span><br/>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<router-link :to="myitemmenu.path">
|
<router-link :to="myitemmenu.path" custom v-slot="{ navigate }">
|
||||||
<span class="footer_link"><span
|
<span class="footer_link" @click="navigate" @keypress.enter="navigate" role="link"><span
|
||||||
v-if="myitemmenu.level_child > 0"> </span>
|
v-if="myitemmenu.level_child > 0"> </span>
|
||||||
{{tools.getLabelByItem(myitemmenu, mythisfoot)}}</span><br/>
|
{{tools.getLabelByItem(myitemmenu, mythisfoot)}}</span><br/>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|||||||
@@ -44,7 +44,8 @@
|
|||||||
|
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
||||||
<router-link to="/policy"><span class="news_link">{{$t('privacy_policy')}}</span></router-link>
|
<router-link to="/policy" custom v-slot="{ navigate }">
|
||||||
|
<span class="news_link" @click="navigate" @keypress.enter="navigate" role="link">{{$t('privacy_policy')}}</span></router-link>
|
||||||
|
|
||||||
<q-toggle dark v-model="accept" :label="$t('newsletter.acceptlicense')"/>
|
<q-toggle dark v-model="accept" :label="$t('newsletter.acceptlicense')"/>
|
||||||
|
|
||||||
|
|||||||
@@ -83,6 +83,26 @@ export default class SingleProject extends Vue {
|
|||||||
this.watchupdate('themecolor')
|
this.watchupdate('themecolor')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Watch('itemproject.pos')
|
||||||
|
public valueChangedpos() {
|
||||||
|
this.watchupdate('pos')
|
||||||
|
}
|
||||||
|
|
||||||
|
@Watch('itemproject.groupId')
|
||||||
|
public valueChangedgroupId() {
|
||||||
|
this.watchupdate('groupId')
|
||||||
|
}
|
||||||
|
|
||||||
|
@Watch('itemproject.respUsername')
|
||||||
|
public valueChangedresp() {
|
||||||
|
this.watchupdate('respUsername')
|
||||||
|
}
|
||||||
|
|
||||||
|
@Watch('itemproject.viceRespUsername')
|
||||||
|
public valueChangedviceResp() {
|
||||||
|
this.watchupdate('viceRespUsername')
|
||||||
|
}
|
||||||
|
|
||||||
@Watch('itemproject.themebgcolor')
|
@Watch('itemproject.themebgcolor')
|
||||||
public valueChangedthemebgcolor() {
|
public valueChangedthemebgcolor() {
|
||||||
this.watchupdate('themebgcolor')
|
this.watchupdate('themebgcolor')
|
||||||
@@ -130,7 +150,7 @@ export default class SingleProject extends Vue {
|
|||||||
|
|
||||||
@Watch('itemproject.progressCalc')
|
@Watch('itemproject.progressCalc')
|
||||||
public valueChanged6() {
|
public valueChanged6() {
|
||||||
console.log('itemproject.progressCalc')
|
// console.log('itemproject.progressCalc')
|
||||||
this.updateClasses()
|
this.updateClasses()
|
||||||
|
|
||||||
// console.log('this.percentageProgress', this.percentageProgress, 'this.itemproject.progressCalc', this.itemproject.progressCalc)
|
// console.log('this.percentageProgress', this.percentageProgress, 'this.itemproject.progressCalc', this.itemproject.progressCalc)
|
||||||
@@ -169,7 +189,7 @@ export default class SingleProject extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public watchupdate(field = '') {
|
public watchupdate(field = '') {
|
||||||
console.log('watchupdate PROJ', field)
|
// console.log('watchupdate PROJ', field)
|
||||||
this.$emit('eventupdateproj', { myitem: this.itemproject, field })
|
this.$emit('eventupdateproj', { myitem: this.itemproject, field })
|
||||||
this.updateicon()
|
this.updateicon()
|
||||||
}
|
}
|
||||||
@@ -231,7 +251,7 @@ export default class SingleProject extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public clickRiga(clickmenu: boolean = false) {
|
public clickRiga(clickmenu: boolean = false) {
|
||||||
console.log('CLICK RIGA PROJ ************')
|
// console.log('CLICK RIGA PROJ ************')
|
||||||
|
|
||||||
// if (!this.sel) {
|
// if (!this.sel) {
|
||||||
|
|
||||||
@@ -287,7 +307,7 @@ export default class SingleProject extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public activeEdit() {
|
public activeEdit() {
|
||||||
console.log('Attiva Edit')
|
// console.log('Attiva Edit')
|
||||||
this.attivaEdit = true
|
this.attivaEdit = true
|
||||||
this.editProject()
|
this.editProject()
|
||||||
}
|
}
|
||||||
@@ -297,6 +317,10 @@ export default class SingleProject extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get tipoProj() {
|
get tipoProj() {
|
||||||
|
const myarr = this.$route.name.split('.')
|
||||||
|
if (myarr)
|
||||||
|
return myarr[1]
|
||||||
|
else
|
||||||
return this.$route.name
|
return this.$route.name
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -342,7 +366,7 @@ export default class SingleProject extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// console.log('focus()')
|
// console.log('focus()')
|
||||||
}, 400)
|
}, 100)
|
||||||
}
|
}
|
||||||
|
|
||||||
public getFocus(e) {
|
public getFocus(e) {
|
||||||
@@ -379,7 +403,9 @@ export default class SingleProject extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public keyDownArea(e) {
|
public keyDownArea(e) {
|
||||||
console.log('keyDownArea')
|
// console.log('keyDownArea', e.keyCode, 'key', e.key)
|
||||||
|
// console.log('precDescr', this.precDescr)
|
||||||
|
// console.log('shiftKey', e.shiftKey)
|
||||||
/*
|
/*
|
||||||
if ((e.key === 'ArrowUp') && !e.shiftKey) {
|
if ((e.key === 'ArrowUp') && !e.shiftKey) {
|
||||||
e.key = 'Tab'
|
e.key = 'Tab'
|
||||||
@@ -405,6 +431,7 @@ export default class SingleProject extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (((e.key === 'Enter') || (e.key === 'Tab')) && !e.shiftKey) {
|
if (((e.key === 'Enter') || (e.key === 'Tab')) && !e.shiftKey) {
|
||||||
|
// console.log(' updateTodo...')
|
||||||
this.updateTodo()
|
this.updateTodo()
|
||||||
|
|
||||||
if ((e.key === 'Tab') && !e.shiftKey) {
|
if ((e.key === 'Tab') && !e.shiftKey) {
|
||||||
@@ -427,14 +454,17 @@ export default class SingleProject extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public updateTodo() {
|
public updateTodo() {
|
||||||
|
// console.log('this.itemproject.descr', this.itemproject.descr)
|
||||||
|
// console.log('precDescr', this.precDescr)
|
||||||
|
|
||||||
if (this.itemproject.descr === this.precDescr) {
|
if (this.itemproject.descr === this.precDescr) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.itemproject.descr = this.precDescr
|
this.itemproject.descr = this.precDescr
|
||||||
console.log('updateTodo', this.precDescr, this.itemproject.descr)
|
// console.log('updateTodo', this.precDescr, this.itemproject.descr)
|
||||||
console.log('itemproject', this.itemproject)
|
// console.log('itemproject', this.itemproject)
|
||||||
console.log('Prec:', this.itemprojectPrec)
|
// console.log('Prec:', this.itemprojectPrec)
|
||||||
|
|
||||||
this.watchupdate('descr')
|
this.watchupdate('descr')
|
||||||
this.inEdit = false
|
this.inEdit = false
|
||||||
@@ -467,7 +497,7 @@ export default class SingleProject extends Vue {
|
|||||||
|
|
||||||
public updatedata(field: string) {
|
public updatedata(field: string) {
|
||||||
// const myitem = tools.jsonCopy(this.itemproject)
|
// const myitem = tools.jsonCopy(this.itemproject)
|
||||||
console.log('calling this.$emit(eventupdateproj)', this.itemproject)
|
// console.log('calling this.$emit(eventupdateproj)', this.itemproject)
|
||||||
this.$emit('eventupdateproj', { myitem: this.itemproject, field })
|
this.$emit('eventupdateproj', { myitem: this.itemproject, field })
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -497,7 +527,7 @@ export default class SingleProject extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async clickMenu(action) {
|
public async clickMenu(action) {
|
||||||
console.log('click menu: ', action)
|
// console.log('click menu: ', action)
|
||||||
if (action === lists.MenuAction.DELETE) {
|
if (action === lists.MenuAction.DELETE) {
|
||||||
return await this.askConfirmDelete()
|
return await this.askConfirmDelete()
|
||||||
} else if (action === lists.MenuAction.TOGGLE_EXPIRING) {
|
} else if (action === lists.MenuAction.TOGGLE_EXPIRING) {
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
v-model.trim="precDescr"
|
v-model.trim="precDescr"
|
||||||
autogrow
|
autogrow
|
||||||
borderless
|
borderless
|
||||||
debounce="1000"
|
|
||||||
:label="getlabeltext"
|
:label="getlabeltext"
|
||||||
dense
|
dense
|
||||||
@focus="getFocus($event)"
|
@focus="getFocus($event)"
|
||||||
@@ -18,11 +17,16 @@
|
|||||||
</q-input>
|
</q-input>
|
||||||
|
|
||||||
<div v-else :class="classDescr"
|
<div v-else :class="classDescr"
|
||||||
@keydown="keyDownRow">{{itemproject.descr}}
|
@keydown="keyDownRow"><div class="clpos">{{ itemproject.pos }}: </div> {{ itemproject.descr }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ tools.getGroupById(itemproject.groupId) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div v-if="isProject()" class="flex-item progress-item shadow-1">
|
<div v-if="isProject()" class="flex-item progress-item shadow-1">
|
||||||
<q-linear-progress
|
<q-linear-progress
|
||||||
stripe
|
stripe
|
||||||
|
|||||||
@@ -91,10 +91,10 @@ export default class CTodo extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public created() {
|
public created() {
|
||||||
const $service = this.$dragula.$service
|
const service = this.$dragula.$service
|
||||||
tools.dragula_option($service, this.dragname)
|
tools.dragula_option(service, this.dragname)
|
||||||
|
|
||||||
$service.eventBus.$on('dragend', (args) => {
|
service.eventBus.$on('dragend', (args) => {
|
||||||
// console.log('args', args)
|
// console.log('args', args)
|
||||||
if (args.name === this.dragname) {
|
if (args.name === this.dragname) {
|
||||||
const itemdragend: IDrag = {
|
const itemdragend: IDrag = {
|
||||||
@@ -106,10 +106,10 @@ export default class CTodo extends Vue {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
$service.eventBus.$on('drag', (el, source) => {
|
service.eventBus.$on('drag', (el, source) => {
|
||||||
this.scrollable = false
|
this.scrollable = false
|
||||||
})
|
})
|
||||||
$service.eventBus.$on('drop', (el, source) => {
|
service.eventBus.$on('drop', (el, source) => {
|
||||||
this.scrollable = true
|
this.scrollable = true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -71,19 +71,23 @@ export default class SingleTodo extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Watch('itemtodo.hoursplanned') public valueChangedhoursplanned() {
|
@Watch('itemtodo.hoursplanned') public valueChangedhoursplanned() {
|
||||||
console.log('itemtodo.hoursplanned', this.itemtodo.hoursplanned)
|
// console.log('itemtodo.hoursplanned', this.itemtodo.hoursplanned)
|
||||||
this.watchupdate('hoursplanned')
|
this.watchupdate('hoursplanned')
|
||||||
}
|
}
|
||||||
|
@Watch('itemtodo.pos') public valueChangedpos() {
|
||||||
|
// console.log('itemtodo.hoursplanned', this.itemtodo.hoursplanned)
|
||||||
|
this.watchupdate('pos')
|
||||||
|
}
|
||||||
@Watch('itemtodo.statustodo') public valueChangedstatus() {
|
@Watch('itemtodo.statustodo') public valueChangedstatus() {
|
||||||
console.log('itemtodo.statustodo', this.itemtodo.statustodo)
|
// console.log('itemtodo.statustodo', this.itemtodo.statustodo)
|
||||||
this.watchupdate('statustodo')
|
this.watchupdate('statustodo')
|
||||||
}
|
}
|
||||||
@Watch('itemtodo.completed_at') public valueChangedcompleted_at() {
|
@Watch('itemtodo.completed_at') public valueChangedcompleted_at() {
|
||||||
console.log('itemtodo.completed_at', this.itemtodo.completed_at)
|
// console.log('itemtodo.completed_at', this.itemtodo.completed_at)
|
||||||
this.watchupdate('completed_at')
|
this.watchupdate('completed_at')
|
||||||
}
|
}
|
||||||
@Watch('itemtodo.hoursworked') public valueChangedhoursworked() {
|
@Watch('itemtodo.hoursworked') public valueChangedhoursworked() {
|
||||||
console.log('itemtodo.hoursworked', this.itemtodo.hoursworked)
|
// console.log('itemtodo.hoursworked', this.itemtodo.hoursworked)
|
||||||
this.watchupdate('hoursworked')
|
this.watchupdate('hoursworked')
|
||||||
}
|
}
|
||||||
@Watch('itemtodo.start_date') public valueChangedstart_date() {
|
@Watch('itemtodo.start_date') public valueChangedstart_date() {
|
||||||
@@ -102,11 +106,15 @@ export default class SingleTodo extends Vue {
|
|||||||
this.watchupdate('phase')
|
this.watchupdate('phase')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Watch('itemtodo.assignedToUsers') public valueChangeassignedToUsers() {
|
||||||
|
this.watchupdate('assignedToUsers')
|
||||||
|
}
|
||||||
|
|
||||||
@Watch('itemtodo.progress') public valueChanged6() {
|
@Watch('itemtodo.progress') public valueChanged6() {
|
||||||
console.log('itemtodo.progress')
|
// console.log('itemtodo.progress')
|
||||||
this.updateClasses()
|
this.updateClasses()
|
||||||
|
|
||||||
console.log('this.percentageProgress', this.percentageProgress, 'this.itemtodo.progress', this.itemtodo.progress)
|
// console.log('this.percentageProgress', this.percentageProgress, 'this.itemtodo.progress', this.itemtodo.progress)
|
||||||
this.watchupdate('progress')
|
this.watchupdate('progress')
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,7 +247,7 @@ export default class SingleTodo extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public deselectRiga() {
|
public deselectRiga() {
|
||||||
console.log('DeselectRiga', this.itemtodo.descr)
|
// console.log('DeselectRiga', this.itemtodo.descr)
|
||||||
this.sel = false
|
this.sel = false
|
||||||
this.classRow = ''
|
this.classRow = ''
|
||||||
this.inEdit = false
|
this.inEdit = false
|
||||||
@@ -298,7 +306,7 @@ export default class SingleTodo extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!!theField) {
|
if (!!theField) {
|
||||||
console.log('FOCUS TODO', theField)
|
// console.log('FOCUS TODO', theField)
|
||||||
theField.focus()
|
theField.focus()
|
||||||
}
|
}
|
||||||
// console.log('focus()')
|
// console.log('focus()')
|
||||||
@@ -320,7 +328,7 @@ export default class SingleTodo extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public keyDownRow(e) {
|
public keyDownRow(e) {
|
||||||
console.log('keyDownRow')
|
// console.log('keyDownRow')
|
||||||
// Delete Key or Backspage
|
// Delete Key or Backspage
|
||||||
if (((e.keyCode === 8) || (e.keyCode === 46)) && (this.precDescr === '') && !e.shiftKey) {
|
if (((e.keyCode === 8) || (e.keyCode === 46)) && (this.precDescr === '') && !e.shiftKey) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
@@ -335,7 +343,7 @@ export default class SingleTodo extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public keyDownArea(e) {
|
public keyDownArea(e) {
|
||||||
console.log('keyDownArea')
|
// console.log('keyDownArea')
|
||||||
/*
|
/*
|
||||||
if ((e.key === 'ArrowUp') && !e.shiftKey) {
|
if ((e.key === 'ArrowUp') && !e.shiftKey) {
|
||||||
e.key = 'Tab'
|
e.key = 'Tab'
|
||||||
@@ -376,7 +384,7 @@ export default class SingleTodo extends Vue {
|
|||||||
if (e.key === 'Escape') {
|
if (e.key === 'Escape') {
|
||||||
this.deselectRiga()
|
this.deselectRiga()
|
||||||
// this.faiFocus('insertTask', true)
|
// this.faiFocus('insertTask', true)
|
||||||
console.log('LOAD this.precDescr', this.precDescr)
|
// console.log('LOAD this.precDescr', this.precDescr)
|
||||||
this.precDescr = this.itemtodo.descr
|
this.precDescr = this.itemtodo.descr
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -388,9 +396,9 @@ export default class SingleTodo extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.itemtodo.descr = this.precDescr
|
this.itemtodo.descr = this.precDescr
|
||||||
console.log('updateTodo', this.precDescr, this.itemtodo.descr)
|
// console.log('updateTodo', this.precDescr, this.itemtodo.descr)
|
||||||
console.log('itemtodo', this.itemtodo)
|
// console.log('itemtodo', this.itemtodo)
|
||||||
console.log('Prec:', this.itemtodoPrec)
|
// console.log('Prec:', this.itemtodoPrec)
|
||||||
|
|
||||||
this.watchupdate('descr')
|
this.watchupdate('descr')
|
||||||
this.inEdit = false
|
this.inEdit = false
|
||||||
@@ -426,7 +434,7 @@ export default class SingleTodo extends Vue {
|
|||||||
|
|
||||||
public updatedata(field: string) {
|
public updatedata(field: string) {
|
||||||
// const myitem = tools.jsonCopy(this.itemtodo)
|
// const myitem = tools.jsonCopy(this.itemtodo)
|
||||||
console.log('calling this.$emit(eventupdate)', this.itemtodo)
|
// console.log('calling this.$emit(eventupdate)', this.itemtodo)
|
||||||
this.$emit('eventupdate', { myitem: this.itemtodo, field } )
|
this.$emit('eventupdate', { myitem: this.itemtodo, field } )
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -462,13 +470,13 @@ export default class SingleTodo extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public activeEdit() {
|
public activeEdit() {
|
||||||
console.log('Attiva Edit')
|
// console.log('Attiva Edit')
|
||||||
this.attivaEdit = true
|
this.attivaEdit = true
|
||||||
this.editTodo()
|
this.editTodo()
|
||||||
}
|
}
|
||||||
|
|
||||||
public async clickMenu(action) {
|
public async clickMenu(action) {
|
||||||
console.log('click menu: ', action)
|
// console.log('click menu: ', action)
|
||||||
if (action === lists.MenuAction.DELETE) {
|
if (action === lists.MenuAction.DELETE) {
|
||||||
return await this.askConfirmDelete()
|
return await this.askConfirmDelete()
|
||||||
} else if (action === lists.MenuAction.TOGGLE_EXPIRING) {
|
} else if (action === lists.MenuAction.TOGGLE_EXPIRING) {
|
||||||
|
|||||||
@@ -10,10 +10,12 @@
|
|||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<q-icon :name="iconPriority"/>
|
||||||
|
|
||||||
<div class="flex-item donotdrag divdescrTot">
|
<div class="flex-item donotdrag divdescrTot">
|
||||||
<q-input v-if="sel && inEdit && itemtodo.statustodo !== tools.Status.COMPLETED" hide-underline type="textarea" ref="inputdescr"
|
<q-input v-if="sel && inEdit && itemtodo.statustodo !== tools.Status.COMPLETED" hide-underline type="textarea"
|
||||||
|
ref="inputdescr"
|
||||||
v-model.trim="precDescr"
|
v-model.trim="precDescr"
|
||||||
debounce="1000"
|
|
||||||
autogrow
|
autogrow
|
||||||
borderless
|
borderless
|
||||||
:readonly="!CanIModifyTodo"
|
:readonly="!CanIModifyTodo"
|
||||||
@@ -22,9 +24,10 @@
|
|||||||
@keydown="keyDownArea" v-on:keydown.esc="exitEdit" @blur="exitEdit(true)" @click="editTodo()"></q-input>
|
@keydown="keyDownArea" v-on:keydown.esc="exitEdit" @blur="exitEdit(true)" @click="editTodo()"></q-input>
|
||||||
|
|
||||||
<div v-else :class="classDescr"
|
<div v-else :class="classDescr"
|
||||||
@keydown="keyDownRow">{{itemtodo.descr}}
|
@keydown="keyDownRow"><div class="clpos">{{itemtodo.pos}}: </div> {{ itemtodo.descr }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--<q-field dark v-else :label="itemtodo.descr"-->
|
<!--<q-field dark v-else :label="itemtodo.descr"-->
|
||||||
|
|||||||
@@ -5,15 +5,14 @@ export default async (context, cmd, table, data = null, id = '') => {
|
|||||||
const descr = data !== null ? data.descr : ''
|
const descr = data !== null ? data.descr : ''
|
||||||
// console.log('globalroutines', cmd, table, descr, id)
|
// console.log('globalroutines', cmd, table, descr, id)
|
||||||
return await indexdb(context, cmd, table, data, id)
|
return await indexdb(context, cmd, table, data, id)
|
||||||
.then(ris => {
|
.then((ris) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
GlobalStore.state.connData.uploading_indexeddb = 0
|
GlobalStore.state.connData.uploading_indexeddb = 0
|
||||||
GlobalStore.state.connData.downloading_indexeddb = 0
|
GlobalStore.state.connData.downloading_indexeddb = 0
|
||||||
}, 1000)
|
}, 1000)
|
||||||
return ris
|
return ris
|
||||||
}
|
}
|
||||||
|
).catch((err) => {
|
||||||
).catch(err => {
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
GlobalStore.state.connData.uploading_indexeddb = (GlobalStore.state.connData.uploading_indexeddb === 1) ? -1 : GlobalStore.state.connData.uploading_indexeddb
|
GlobalStore.state.connData.uploading_indexeddb = (GlobalStore.state.connData.uploading_indexeddb === 1) ? -1 : GlobalStore.state.connData.uploading_indexeddb
|
||||||
GlobalStore.state.connData.downloading_indexeddb = (GlobalStore.state.connData.downloading_indexeddb === 1) ? -1 : GlobalStore.state.connData.downloading_indexeddb
|
GlobalStore.state.connData.downloading_indexeddb = (GlobalStore.state.connData.downloading_indexeddb === 1) ? -1 : GlobalStore.state.connData.downloading_indexeddb
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ async function readfromIndexDbToState(context, table) {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
const arrris = tools.setArrayMainByTable(table, reccat)
|
const arrris = tools.setArrayMainByTable(table, reccat)
|
||||||
// console.log('************ ARRAYS SALVATI IN MEMORIA ', table, arrris)
|
console.log('************ ARRAYS SALVATI IN MEMORIA ', table, arrris)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,6 +80,10 @@ export default class MenuOne extends Vue {
|
|||||||
menu += ' isAdmin'
|
menu += ' isAdmin'
|
||||||
if (elem.onlyManager)
|
if (elem.onlyManager)
|
||||||
menu += ' isManager'
|
menu += ' isManager'
|
||||||
|
if (elem.onlySocioResidente)
|
||||||
|
menu += ' isSocioResidente'
|
||||||
|
if (elem.onlyDepartment)
|
||||||
|
menu += ' isDepartment'
|
||||||
if (elem.onlyTutor)
|
if (elem.onlyTutor)
|
||||||
menu += ' isTutor'
|
menu += ' isTutor'
|
||||||
if (elem.onlyTraduttrici)
|
if (elem.onlyTraduttrici)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { IAction } from '@src/model/Projects'
|
|||||||
import { Component } from 'vue-router/types/router'
|
import { Component } from 'vue-router/types/router'
|
||||||
import { lists } from '@src/store/Modules/lists'
|
import { lists } from '@src/store/Modules/lists'
|
||||||
import { IPaymentType } from '@src/model/UserStore'
|
import { IPaymentType } from '@src/model/UserStore'
|
||||||
import { ICart, IProducer, IProduct, IShareWithUs, IStorehouse } from '@src/model/Products'
|
import { ICart, IDepartment, IProducer, IProduct, IShareWithUs, IStorehouse } from '@src/model/Products'
|
||||||
|
|
||||||
export interface IPost {
|
export interface IPost {
|
||||||
title: string
|
title: string
|
||||||
@@ -98,6 +98,11 @@ export interface ICalZoom {
|
|||||||
note?: string
|
note?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IGroup {
|
||||||
|
_id?: any
|
||||||
|
descr?: string
|
||||||
|
}
|
||||||
|
|
||||||
export interface IMailinglist {
|
export interface IMailinglist {
|
||||||
name?: string
|
name?: string
|
||||||
surname?: string
|
surname?: string
|
||||||
@@ -175,7 +180,9 @@ export interface IGlobalState {
|
|||||||
calzoom: ICalZoom[],
|
calzoom: ICalZoom[],
|
||||||
producers: IProducer[],
|
producers: IProducer[],
|
||||||
storehouses: IStorehouse[],
|
storehouses: IStorehouse[],
|
||||||
|
departments: IDepartment[],
|
||||||
sharewithus: IShareWithUs[],
|
sharewithus: IShareWithUs[],
|
||||||
|
groups: IGroup[],
|
||||||
autoplaydisc: number
|
autoplaydisc: number
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,6 +215,8 @@ export interface IListRoutes {
|
|||||||
onlyAdmin?: boolean
|
onlyAdmin?: boolean
|
||||||
onlyif_logged?: boolean
|
onlyif_logged?: boolean
|
||||||
onlyManager?: boolean
|
onlyManager?: boolean
|
||||||
|
onlySocioResidente?: boolean
|
||||||
|
onlyDepartment?: boolean
|
||||||
onlyTutor?: boolean
|
onlyTutor?: boolean
|
||||||
onlyTraduttrici?: boolean
|
onlyTraduttrici?: boolean
|
||||||
extraclass?: string
|
extraclass?: string
|
||||||
|
|||||||
@@ -70,6 +70,13 @@ export interface IProducer {
|
|||||||
website?: string,
|
website?: string,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IDepartment {
|
||||||
|
_id?: any
|
||||||
|
idapp?: string
|
||||||
|
name?: string,
|
||||||
|
username?: string,
|
||||||
|
}
|
||||||
|
|
||||||
export interface IStorehouse {
|
export interface IStorehouse {
|
||||||
_id?: any
|
_id?: any
|
||||||
idapp?: string
|
idapp?: string
|
||||||
@@ -89,6 +96,7 @@ export interface ICart {
|
|||||||
userId?: string
|
userId?: string
|
||||||
totalQty?: number
|
totalQty?: number
|
||||||
totalPrice?: number
|
totalPrice?: number
|
||||||
|
department?: string
|
||||||
items?: IBaseOrder[]
|
items?: IBaseOrder[]
|
||||||
note?: string
|
note?: string
|
||||||
modify_at?: Date
|
modify_at?: Date
|
||||||
@@ -101,6 +109,7 @@ export interface IOrderCart {
|
|||||||
userId?: string
|
userId?: string
|
||||||
totalQty?: number
|
totalQty?: number
|
||||||
totalPrice?: number
|
totalPrice?: number
|
||||||
|
department?: string
|
||||||
items?: IBaseOrder[]
|
items?: IBaseOrder[]
|
||||||
status?: number
|
status?: number
|
||||||
note?: string
|
note?: string
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ export interface IProject {
|
|||||||
completed_at?: Date
|
completed_at?: Date
|
||||||
expiring_at?: Date
|
expiring_at?: Date
|
||||||
enableExpiring?: boolean
|
enableExpiring?: boolean
|
||||||
id_prev?: string
|
|
||||||
modified?: boolean
|
modified?: boolean
|
||||||
favourite?: number
|
favourite?: number
|
||||||
pos?: number
|
pos?: number
|
||||||
@@ -47,6 +46,9 @@ export interface IProject {
|
|||||||
privacywrite?: string
|
privacywrite?: string
|
||||||
themecolor?: string
|
themecolor?: string
|
||||||
themebgcolor?: string
|
themebgcolor?: string
|
||||||
|
groupId?: string
|
||||||
|
respUsername?: string
|
||||||
|
viceRespUsername?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IProjectsState {
|
export interface IProjectsState {
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ export interface ITodo {
|
|||||||
completed_at?: Date,
|
completed_at?: Date,
|
||||||
expiring_at?: Date,
|
expiring_at?: Date,
|
||||||
enableExpiring?: boolean,
|
enableExpiring?: boolean,
|
||||||
id_prev?: string,
|
|
||||||
modified?: boolean,
|
modified?: boolean,
|
||||||
pos?: number,
|
pos?: number,
|
||||||
order?: number,
|
order?: number,
|
||||||
@@ -25,6 +24,7 @@ export interface ITodo {
|
|||||||
start_date?: Date
|
start_date?: Date
|
||||||
themecolor?: string
|
themecolor?: string
|
||||||
themebgcolor?: string
|
themebgcolor?: string
|
||||||
|
assignedToUsers?: string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IParamTodo {
|
export interface IParamTodo {
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ export interface IUserState {
|
|||||||
isLogged?: boolean
|
isLogged?: boolean
|
||||||
isAdmin?: boolean
|
isAdmin?: boolean
|
||||||
isManager?: boolean
|
isManager?: boolean
|
||||||
|
isDepartment?: boolean
|
||||||
isTutor?: boolean
|
isTutor?: boolean
|
||||||
isZoomeri?: boolean
|
isZoomeri?: boolean
|
||||||
isTraduttrici?: boolean
|
isTraduttrici?: boolean
|
||||||
|
|||||||
0
src/rootgen/admin/departments/departments.scss
Executable file
0
src/rootgen/admin/departments/departments.scss
Executable file
44
src/rootgen/admin/departments/departments.ts
Executable file
44
src/rootgen/admin/departments/departments.ts
Executable file
@@ -0,0 +1,44 @@
|
|||||||
|
import Vue from 'vue'
|
||||||
|
import { Component, Prop } from 'vue-property-decorator'
|
||||||
|
import { GlobalStore, UserStore } from '@store'
|
||||||
|
|
||||||
|
import { tools } from '../../../store/Modules/tools'
|
||||||
|
import { toolsext } from '../../../store/Modules/toolsext'
|
||||||
|
import { static_data } from '../../../db/static_data'
|
||||||
|
import { Screen } from 'quasar'
|
||||||
|
|
||||||
|
import { colTabledepartments } from '@src/store/Modules/fieldsTable'
|
||||||
|
|
||||||
|
import { CImgText } from '../../../components/CImgText/index'
|
||||||
|
import { CCard, CGridTableRec, CMyPage, CTitleBanner } from '@components'
|
||||||
|
import MixinMetaTags from '../../../mixins/mixin-metatags'
|
||||||
|
import MixinBase from '@src/mixins/mixin-base'
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
mixins: [MixinBase],
|
||||||
|
components: { CImgText, CCard, CMyPage, CTitleBanner, CGridTableRec }
|
||||||
|
})
|
||||||
|
export default class StorehousePage extends MixinMetaTags {
|
||||||
|
public pagination = {
|
||||||
|
sortBy: 'name',
|
||||||
|
descending: false,
|
||||||
|
page: 2,
|
||||||
|
rowsPerPage: 5
|
||||||
|
// rowsNumber: xx if getting data from a server
|
||||||
|
}
|
||||||
|
|
||||||
|
public selected = []
|
||||||
|
public dataPages = []
|
||||||
|
|
||||||
|
get getcoldepartments() {
|
||||||
|
return colTabledepartments
|
||||||
|
}
|
||||||
|
|
||||||
|
public meta() {
|
||||||
|
return tools.metafunc(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
get static_data() {
|
||||||
|
return static_data
|
||||||
|
}
|
||||||
|
}
|
||||||
27
src/rootgen/admin/departments/departments.vue
Executable file
27
src/rootgen/admin/departments/departments.vue
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
<template>
|
||||||
|
<CMyPage title="Uffici" imgbackground="../../statics/images/produttori.jpg" sizes="max-height: 120px">
|
||||||
|
<span>{{ setmeta({
|
||||||
|
title: 'Uffici',
|
||||||
|
description: "",
|
||||||
|
keywords: '' } ) }}
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||||
|
<CTitleBanner title="Uffici"></CTitleBanner>
|
||||||
|
<CGridTableRec prop_mytable="departments"
|
||||||
|
prop_mytitle="Lista Uffici"
|
||||||
|
:prop_mycolumns="getcoldepartments"
|
||||||
|
prop_colkey="name"
|
||||||
|
nodataLabel="Nessun Ufficio"
|
||||||
|
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
|
||||||
|
|
||||||
|
</CGridTableRec>
|
||||||
|
</div>
|
||||||
|
</CMyPage>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" src="./departments.ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import 'departments.scss';
|
||||||
|
</style>
|
||||||
0
src/rootgen/admin/groups/groups.scss
Executable file
0
src/rootgen/admin/groups/groups.scss
Executable file
44
src/rootgen/admin/groups/groups.ts
Executable file
44
src/rootgen/admin/groups/groups.ts
Executable file
@@ -0,0 +1,44 @@
|
|||||||
|
import Vue from 'vue'
|
||||||
|
import { Component, Prop } from 'vue-property-decorator'
|
||||||
|
import { GlobalStore, UserStore } from '@store'
|
||||||
|
|
||||||
|
import { tools } from '../../../store/Modules/tools'
|
||||||
|
import { toolsext } from '../../../store/Modules/toolsext'
|
||||||
|
import { static_data } from '../../../db/static_data'
|
||||||
|
import { Screen } from 'quasar'
|
||||||
|
|
||||||
|
import { colTablegroups } from '@src/store/Modules/fieldsTable'
|
||||||
|
|
||||||
|
import { CImgText } from '../../../components/CImgText/index'
|
||||||
|
import { CCard, CGridTableRec, CMyPage, CTitleBanner } from '@components'
|
||||||
|
import MixinMetaTags from '../../../mixins/mixin-metatags'
|
||||||
|
import MixinBase from '@src/mixins/mixin-base'
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
mixins: [MixinBase],
|
||||||
|
components: { CImgText, CCard, CMyPage, CTitleBanner, CGridTableRec }
|
||||||
|
})
|
||||||
|
export default class GroupPage extends MixinMetaTags {
|
||||||
|
public pagination = {
|
||||||
|
sortBy: 'descr',
|
||||||
|
descending: false,
|
||||||
|
page: 2,
|
||||||
|
rowsPerPage: 5
|
||||||
|
// rowsNumber: xx if getting data from a server
|
||||||
|
}
|
||||||
|
|
||||||
|
public selected = []
|
||||||
|
public dataPages = []
|
||||||
|
|
||||||
|
get getcolgroups() {
|
||||||
|
return colTablegroups
|
||||||
|
}
|
||||||
|
|
||||||
|
public meta() {
|
||||||
|
return tools.metafunc(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
get static_data() {
|
||||||
|
return static_data
|
||||||
|
}
|
||||||
|
}
|
||||||
27
src/rootgen/admin/groups/groups.vue
Executable file
27
src/rootgen/admin/groups/groups.vue
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
<template>
|
||||||
|
<CMyPage title="Gruppi" imgbackground="../../statics/images/produttori.jpg" sizes="max-height: 120px">
|
||||||
|
<span>{{ setmeta({
|
||||||
|
title: 'Gruppi',
|
||||||
|
description: "",
|
||||||
|
keywords: '' } ) }}
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||||
|
<CTitleBanner title="Gruppi"></CTitleBanner>
|
||||||
|
<CGridTableRec prop_mytable="groups"
|
||||||
|
prop_mytitle="Gruppi"
|
||||||
|
:prop_mycolumns="getcolgroups"
|
||||||
|
prop_colkey="descr"
|
||||||
|
nodataLabel="Nessun Gruppo"
|
||||||
|
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
|
||||||
|
|
||||||
|
</CGridTableRec>
|
||||||
|
</div>
|
||||||
|
</CMyPage>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" src="./groups.ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import 'groups.scss';
|
||||||
|
</style>
|
||||||
0
src/rootgen/admin/orders/orders.scss
Executable file
0
src/rootgen/admin/orders/orders.scss
Executable file
44
src/rootgen/admin/orders/orders.ts
Executable file
44
src/rootgen/admin/orders/orders.ts
Executable file
@@ -0,0 +1,44 @@
|
|||||||
|
import Vue from 'vue'
|
||||||
|
import { Component, Prop } from 'vue-property-decorator'
|
||||||
|
import { GlobalStore, UserStore } from '@store'
|
||||||
|
|
||||||
|
import { tools } from '../../../store/Modules/tools'
|
||||||
|
import { toolsext } from '../../../store/Modules/toolsext'
|
||||||
|
import { static_data } from '../../../db/static_data'
|
||||||
|
import { Screen } from 'quasar'
|
||||||
|
|
||||||
|
import { getcolorderscart } from '@src/store/Modules/fieldsTable'
|
||||||
|
|
||||||
|
import { CImgText } from '../../../components/CImgText/index'
|
||||||
|
import { CCard, CGridTableRec, CMyPage, CTitleBanner } from '@components'
|
||||||
|
import MixinMetaTags from '../../../mixins/mixin-metatags'
|
||||||
|
import MixinBase from '@src/mixins/mixin-base'
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
mixins: [MixinBase],
|
||||||
|
components: { CImgText, CCard, CMyPage, CTitleBanner, CGridTableRec }
|
||||||
|
})
|
||||||
|
export default class StorehousePage extends MixinMetaTags {
|
||||||
|
public pagination = {
|
||||||
|
sortBy: 'name',
|
||||||
|
descending: false,
|
||||||
|
page: 2,
|
||||||
|
rowsPerPage: 5
|
||||||
|
// rowsNumber: xx if getting data from a server
|
||||||
|
}
|
||||||
|
|
||||||
|
public selected = []
|
||||||
|
public dataPages = []
|
||||||
|
|
||||||
|
get getcolorderscart() {
|
||||||
|
return getcolorderscart
|
||||||
|
}
|
||||||
|
|
||||||
|
public meta() {
|
||||||
|
return tools.metafunc(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
get static_data() {
|
||||||
|
return static_data
|
||||||
|
}
|
||||||
|
}
|
||||||
28
src/rootgen/admin/orders/orders.vue
Executable file
28
src/rootgen/admin/orders/orders.vue
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
<template>
|
||||||
|
<CMyPage title="Ordini Ufficio" imgbackground="../../statics/images/produttori.jpg" sizes="max-height: 120px">
|
||||||
|
<span>{{ setmeta({
|
||||||
|
title: 'Ordini Ufficio',
|
||||||
|
description: "",
|
||||||
|
keywords: '' } ) }}
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||||
|
<CTitleBanner title="Ordini Ufficio"></CTitleBanner>
|
||||||
|
<!--<CGridTableRec prop_mytable="orderscart"
|
||||||
|
prop_mytitle="Lista Ordini"
|
||||||
|
:prop_mycolumns="getcolorderscart"
|
||||||
|
prop_colkey="name"
|
||||||
|
nodataLabel="Nessun Ordine"
|
||||||
|
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
|
||||||
|
|
||||||
|
</CGridTableRec>
|
||||||
|
-->
|
||||||
|
</div>
|
||||||
|
</CMyPage>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" src="./orders.ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import 'orders.scss';
|
||||||
|
</style>
|
||||||
@@ -220,6 +220,7 @@ const msg_it = {
|
|||||||
options: 'Opzioni',
|
options: 'Opzioni',
|
||||||
},
|
},
|
||||||
dashboard: {
|
dashboard: {
|
||||||
|
info: 'Info',
|
||||||
commento: 'Commento',
|
commento: 'Commento',
|
||||||
azione: 'Azione',
|
azione: 'Azione',
|
||||||
inviato: 'Inviato',
|
inviato: 'Inviato',
|
||||||
@@ -416,6 +417,9 @@ const msg_it = {
|
|||||||
non_verificato: "Non Verificato",
|
non_verificato: "Non Verificato",
|
||||||
forgetpassword: "Password dimenticata?",
|
forgetpassword: "Password dimenticata?",
|
||||||
modificapassword: "Modifica Password",
|
modificapassword: "Modifica Password",
|
||||||
|
resp: "Responsabile",
|
||||||
|
viceResp: "Vice Rrsponsabile",
|
||||||
|
userslist: "Lista Persone",
|
||||||
err: {
|
err: {
|
||||||
required: 'è richiesto',
|
required: 'è richiesto',
|
||||||
email: 'inserire una email valida',
|
email: 'inserire una email valida',
|
||||||
@@ -534,7 +538,8 @@ const msg_it = {
|
|||||||
privacywrite: 'Chi lo puo modificare:',
|
privacywrite: 'Chi lo puo modificare:',
|
||||||
totalphases: 'Totale Fasi',
|
totalphases: 'Totale Fasi',
|
||||||
themecolor: 'Tema Colore',
|
themecolor: 'Tema Colore',
|
||||||
themebgcolor: 'Tema Colore Sfondo'
|
themebgcolor: 'Tema Colore Sfondo',
|
||||||
|
group: 'Gruppo'
|
||||||
},
|
},
|
||||||
where: {
|
where: {
|
||||||
code: 'Id',
|
code: 'Id',
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { toolsext } from '@src/store/Modules/toolsext'
|
|||||||
|
|
||||||
export const OtherTables = ['categories', 'config', 'swmsg']
|
export const OtherTables = ['categories', 'config', 'swmsg']
|
||||||
export const MainTables = ['todos', 'projects']
|
export const MainTables = ['todos', 'projects']
|
||||||
export const allMethod = ['sync_post_', 'sync_patch_', 'delete_']
|
export const allMethod = ['sync_post_', 'sync_patch_', 'delete_', 'hide_']
|
||||||
|
|
||||||
export function getLinkByTableName(nametable) {
|
export function getLinkByTableName(nametable) {
|
||||||
if (nametable === 'todos') {
|
if (nametable === 'todos') {
|
||||||
@@ -24,9 +24,11 @@ export const DB = {
|
|||||||
CMD_SYNC: 'sync',
|
CMD_SYNC: 'sync',
|
||||||
CMD_SYNC_NEW: 'sync-new',
|
CMD_SYNC_NEW: 'sync-new',
|
||||||
CMD_DELETE: 'sync-delete',
|
CMD_DELETE: 'sync-delete',
|
||||||
|
CMD_HIDE: 'sync-hide',
|
||||||
TABLE_SYNC_POST: 'sync_post_',
|
TABLE_SYNC_POST: 'sync_post_',
|
||||||
TABLE_SYNC_PATCH: 'sync_patch_',
|
TABLE_SYNC_PATCH: 'sync_patch_',
|
||||||
TABLE_DELETE: 'delete_'
|
TABLE_DELETE: 'delete_',
|
||||||
|
TABLE_HIDE: 'hide_'
|
||||||
}
|
}
|
||||||
|
|
||||||
export function allTables() {
|
export function allTables() {
|
||||||
@@ -82,7 +84,7 @@ async function dbDeleteItem(call, item) {
|
|||||||
|
|
||||||
call = '/' + call
|
call = '/' + call
|
||||||
|
|
||||||
const res = await Api.SendReq(call + item._id, 'DELETE', item)
|
const res = await Api.SendReq(call + item._id, 'DELETE', null)
|
||||||
.then((myres) => {
|
.then((myres) => {
|
||||||
console.log('dbdeleteItem to the Server')
|
console.log('dbdeleteItem to the Server')
|
||||||
return myres
|
return myres
|
||||||
@@ -96,6 +98,37 @@ async function dbDeleteItem(call, item) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function dbHideItem(call, item) {
|
||||||
|
|
||||||
|
if (!('serviceWorker' in navigator)) {
|
||||||
|
// console.log('dbdeleteItem', item)
|
||||||
|
if (UserStore.getters.isUserInvalid) {
|
||||||
|
return false
|
||||||
|
} // Login not made
|
||||||
|
|
||||||
|
item = {
|
||||||
|
...item,
|
||||||
|
hide: true
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('dbHideItem', item)
|
||||||
|
|
||||||
|
call = '/' + call
|
||||||
|
|
||||||
|
const res = await Api.SendReq(call + item._id + '/true', 'DELETE', null)
|
||||||
|
.then((myres) => {
|
||||||
|
console.log('dbHideItem to the Server')
|
||||||
|
return myres
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
UserStore.mutations.setErrorCatch(error)
|
||||||
|
return UserStore.getters.getServerCode
|
||||||
|
})
|
||||||
|
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async function Sync_Execute(cmd, tablesync, nametab, method, item: ITodo, id, msg: String) {
|
async function Sync_Execute(cmd, tablesync, nametab, method, item: ITodo, id, msg: String) {
|
||||||
// Send to Server to Sync
|
// Send to Server to Sync
|
||||||
|
|
||||||
@@ -105,7 +138,7 @@ async function Sync_Execute(cmd, tablesync, nametab, method, item: ITodo, id, ms
|
|||||||
}
|
}
|
||||||
|
|
||||||
let cmdSw = cmd
|
let cmdSw = cmd
|
||||||
if ((cmd === DB.CMD_SYNC_NEW) || (cmd === DB.CMD_DELETE)) {
|
if ((cmd === DB.CMD_SYNC_NEW) || (cmd === DB.CMD_DELETE) || (cmd === DB.CMD_HIDE)) {
|
||||||
cmdSw = DB.CMD_SYNC
|
cmdSw = DB.CMD_SYNC
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,7 +194,7 @@ async function Sync_Execute(cmd, tablesync, nametab, method, item: ITodo, id, ms
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function Sync_ExecuteCmd(cmd, nametab: string, method, item: ITodo, id, msg: String) {
|
async function Sync_ExecuteCmd(cmd, nametab: string, method, item: ITodo, id, msg: string) {
|
||||||
// Send to Server to Sync
|
// Send to Server to Sync
|
||||||
|
|
||||||
let tablesync = ''
|
let tablesync = ''
|
||||||
@@ -171,6 +204,8 @@ async function Sync_ExecuteCmd(cmd, nametab: string, method, item: ITodo, id, ms
|
|||||||
tablesync = DB.TABLE_SYNC_PATCH + nametab
|
tablesync = DB.TABLE_SYNC_PATCH + nametab
|
||||||
} else if (method === 'DELETE') {
|
} else if (method === 'DELETE') {
|
||||||
tablesync = DB.TABLE_DELETE + nametab
|
tablesync = DB.TABLE_DELETE + nametab
|
||||||
|
} else if (method === 'HIDE') {
|
||||||
|
tablesync = DB.TABLE_HIDE + nametab
|
||||||
}
|
}
|
||||||
|
|
||||||
const risdata = await Sync_Execute(cmd, tablesync, nametab, method, item, id, msg)
|
const risdata = await Sync_Execute(cmd, tablesync, nametab, method, item, id, msg)
|
||||||
@@ -181,6 +216,8 @@ async function Sync_ExecuteCmd(cmd, nametab: string, method, item: ITodo, id, ms
|
|||||||
}
|
}
|
||||||
} else if (cmd === DB.CMD_DELETE) {
|
} else if (cmd === DB.CMD_DELETE) {
|
||||||
await dbDeleteItem(nametab, item)
|
await dbDeleteItem(nametab, item)
|
||||||
|
} else if (cmd === DB.CMD_HIDE) {
|
||||||
|
await dbHideItem(nametab, item)
|
||||||
}
|
}
|
||||||
|
|
||||||
return risdata
|
return risdata
|
||||||
@@ -194,6 +231,10 @@ export function Sync_DeleteItem(nametab: string, item, id) {
|
|||||||
Sync_ExecuteCmd(DB.CMD_DELETE, nametab, 'DELETE', item, id, '')
|
Sync_ExecuteCmd(DB.CMD_DELETE, nametab, 'DELETE', item, id, '')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function Sync_HideItem(nametab: string, item, id) {
|
||||||
|
Sync_ExecuteCmd(DB.CMD_HIDE, nametab, 'HIDE', item, id, '')
|
||||||
|
}
|
||||||
|
|
||||||
export async function aftercalling(ris, checkPending: boolean, nametabindex: string) {
|
export async function aftercalling(ris, checkPending: boolean, nametabindex: string) {
|
||||||
|
|
||||||
if (ris.status !== 200) {
|
if (ris.status !== 200) {
|
||||||
@@ -387,13 +428,14 @@ function setmodifiedIfchanged(recOut, recIn, field) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function table_ModifyRecord(nametable, myitem, listFieldsToChange, field) {
|
export async function table_ModifyRecord(nametable, myitem, listFieldsToChange, field) {
|
||||||
|
console.log('table_ModifyRecord ... ', nametable)
|
||||||
if (myitem === null) {
|
if (myitem === null) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('--> table_ModifyRecord', nametable, myitem.descr)
|
// console.log('--> table_ModifyRecord', nametable, myitem.descr)
|
||||||
|
|
||||||
if ((field === 'status') && (nametable === 'todos') && (myitem.status === tools.Status.COMPLETED)) {
|
if ((field === 'status') && (nametable === 'todos') && (myitem.status === tools.Status.COMPLETED)) {
|
||||||
myitem.completed_at = tools.getDateNow()
|
myitem.completed_at = tools.getDateNow()
|
||||||
@@ -412,8 +454,10 @@ export async function table_ModifyRecord(nametable, myitem, listFieldsToChange,
|
|||||||
setmodifiedIfchanged(miorec, myobjsaved, myfield)
|
setmodifiedIfchanged(miorec, myobjsaved, myfield)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log( ' ... 4 ')
|
||||||
|
|
||||||
if (miorec.modified) {
|
if (miorec.modified) {
|
||||||
// console.log(' ' + nametable + ' MODIFICATO! ', miorec.descr, miorec.pos, 'SALVALO SULLA IndexedDB')
|
console.log(' ' + nametable + ' MODIFICATO! ', miorec.descr, miorec.pos, 'SALVALO SULLA IndexedDB')
|
||||||
miorec.modify_at = tools.getDateNow()
|
miorec.modify_at = tools.getDateNow()
|
||||||
miorec.modified = false
|
miorec.modified = false
|
||||||
|
|
||||||
@@ -448,3 +492,18 @@ export function table_DeleteRecord(nametable, myobjtrov, id) {
|
|||||||
Sync_DeleteItem(nametable, myobjtrov, id)
|
Sync_DeleteItem(nametable, myobjtrov, id)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function table_HideRecord(nametable, myobjtrov, id) {
|
||||||
|
|
||||||
|
const mymodule = tools.getModulesByTable(nametable)
|
||||||
|
|
||||||
|
// 1) Delete from the Todos Array
|
||||||
|
mymodule.mutations.deletemyitem(myobjtrov)
|
||||||
|
|
||||||
|
// 2) Delete from the IndexedDb
|
||||||
|
globalroutines(null, 'delete', nametable, null, id)
|
||||||
|
|
||||||
|
// 3) Hide from the Server (call)
|
||||||
|
Sync_DeleteItem(nametable, myobjtrov, id)
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -83,7 +83,9 @@ const state: IGlobalState = {
|
|||||||
mypage: [],
|
mypage: [],
|
||||||
calzoom: [],
|
calzoom: [],
|
||||||
producers: [],
|
producers: [],
|
||||||
|
groups: [],
|
||||||
storehouses: [],
|
storehouses: [],
|
||||||
|
departments: [],
|
||||||
sharewithus: []
|
sharewithus: []
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,8 +135,7 @@ namespace Getters {
|
|||||||
const config = state.arrConfig.find((item) => item._id === costanti.CONFIG_ID_SHOW_TYPE_TODOS)
|
const config = state.arrConfig.find((item) => item._id === costanti.CONFIG_ID_SHOW_TYPE_TODOS)
|
||||||
if (config) {
|
if (config) {
|
||||||
return config.value
|
return config.value
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -205,6 +206,10 @@ namespace Getters {
|
|||||||
return GlobalStore.state.producers
|
return GlobalStore.state.producers
|
||||||
else if (table === 'storehouses')
|
else if (table === 'storehouses')
|
||||||
return GlobalStore.state.storehouses
|
return GlobalStore.state.storehouses
|
||||||
|
else if (table === 'groups')
|
||||||
|
return GlobalStore.state.groups
|
||||||
|
else if (table === 'departments')
|
||||||
|
return GlobalStore.state.departments
|
||||||
else if (table === 'sharewithus')
|
else if (table === 'sharewithus')
|
||||||
return GlobalStore.state.sharewithus
|
return GlobalStore.state.sharewithus
|
||||||
else if (table === 'paymenttypes')
|
else if (table === 'paymenttypes')
|
||||||
@@ -1092,6 +1097,8 @@ namespace Actions {
|
|||||||
GlobalStore.state.calzoom = (res.data.calzoom) ? [...res.data.calzoom] : []
|
GlobalStore.state.calzoom = (res.data.calzoom) ? [...res.data.calzoom] : []
|
||||||
GlobalStore.state.producers = (res.data.producers) ? [...res.data.producers] : []
|
GlobalStore.state.producers = (res.data.producers) ? [...res.data.producers] : []
|
||||||
GlobalStore.state.storehouses = (res.data.storehouses) ? [...res.data.storehouses] : []
|
GlobalStore.state.storehouses = (res.data.storehouses) ? [...res.data.storehouses] : []
|
||||||
|
GlobalStore.state.groups = (res.data.groups) ? [...res.data.groups] : []
|
||||||
|
GlobalStore.state.departments = (res.data.departments) ? [...res.data.departments] : []
|
||||||
// console.log('res.data.cart', res.data.cart)
|
// console.log('res.data.cart', res.data.cart)
|
||||||
if (res.data.cart)
|
if (res.data.cart)
|
||||||
Products.state.cart = (res.data.cart) ? { ...res.data.cart } : {}
|
Products.state.cart = (res.data.cart) ? { ...res.data.cart } : {}
|
||||||
@@ -1134,8 +1141,14 @@ namespace Actions {
|
|||||||
|
|
||||||
return true
|
return true
|
||||||
|
|
||||||
})
|
}).then((res) => {
|
||||||
.catch((error) => {
|
|
||||||
|
if (static_data.functionality.ENABLE_PROJECTS_LOADING)
|
||||||
|
Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: true })
|
||||||
|
|
||||||
|
return res
|
||||||
|
|
||||||
|
}).catch((error) => {
|
||||||
console.log('error dbLoad', error)
|
console.log('error dbLoad', error)
|
||||||
// UserStore.mutations.setErrorCatch(error)
|
// UserStore.mutations.setErrorCatch(error)
|
||||||
return new Types.AxiosError(serv_constants.RIS_CODE_ERR, null, tools.ERR_GENERICO, error)
|
return new Types.AxiosError(serv_constants.RIS_CODE_ERR, null, tools.ERR_GENERICO, error)
|
||||||
@@ -1222,9 +1235,15 @@ namespace Actions {
|
|||||||
static_data.routes = static_data.routes.sort((a, b) => a.order - b.order)
|
static_data.routes = static_data.routes.sort((a, b) => a.order - b.order)
|
||||||
|
|
||||||
if (tools.sito_online(false)) {
|
if (tools.sito_online(false)) {
|
||||||
router.addRoutes([...arrpagesroute, last])
|
for (const r of arrpagesroute) {
|
||||||
|
router.addRoute(r)
|
||||||
|
}
|
||||||
|
router.addRoute(last)
|
||||||
|
// router.addRoutes([...arrpagesroute, last])
|
||||||
} else {
|
} else {
|
||||||
router.addRoutes([sito_offline, last])
|
router.addRoute(sito_offline)
|
||||||
|
router.addRoute(last)
|
||||||
|
// router.addRoutes([sito_offline, last])
|
||||||
this.$router.replace('/sito_offline')
|
this.$router.replace('/sito_offline')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,9 +75,9 @@ namespace Getters {
|
|||||||
|
|
||||||
const getOrdersCart = b.read((stateparamf: IProductsState) => (tipoord: string): IOrderCart[] => {
|
const getOrdersCart = b.read((stateparamf: IProductsState) => (tipoord: string): IOrderCart[] => {
|
||||||
if (tipoord === 'incorso')
|
if (tipoord === 'incorso')
|
||||||
return state.orders.filter((rec) => rec.status <= shared_consts.OrderStatus.CHECKOUT_CONFIRMED)
|
return state.orders.filter((rec) => rec.status <= shared_consts.OrderStatus.CHECKOUT_SENT)
|
||||||
else
|
else
|
||||||
return state.orders.filter((rec) => rec.status < shared_consts.OrderStatus.RECEIVED && rec.status > shared_consts.OrderStatus.CHECKOUT_CONFIRMED)
|
return state.orders.filter((rec) => rec.status < shared_consts.OrderStatus.RECEIVED && rec.status > shared_consts.OrderStatus.CHECKOUT_SENT)
|
||||||
}, 'getOrdersCart')
|
}, 'getOrdersCart')
|
||||||
|
|
||||||
const existProductInCart = b.read((stateparamf: IProductsState) => (idproduct): boolean => {
|
const existProductInCart = b.read((stateparamf: IProductsState) => (idproduct): boolean => {
|
||||||
@@ -218,14 +218,14 @@ namespace Actions {
|
|||||||
return ris
|
return ris
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loadCart(context) {
|
async function loadOrders(context) {
|
||||||
|
|
||||||
console.log('loadCart')
|
console.log('loadOrders')
|
||||||
|
|
||||||
if (!static_data.functionality.ENABLE_ECOMMERCE)
|
if (!static_data.functionality.ENABLE_ECOMMERCE)
|
||||||
return null
|
return null
|
||||||
|
|
||||||
console.log('loadCart', 'userid=', UserStore.state.my._id)
|
console.log('loadOrders', 'userid=', UserStore.state.my._id)
|
||||||
|
|
||||||
// if (UserStore.state.my._id === '') {
|
// if (UserStore.state.my._id === '') {
|
||||||
// return new Types.AxiosError(0, null, 0, '')
|
// return new Types.AxiosError(0, null, 0, '')
|
||||||
@@ -244,7 +244,7 @@ namespace Actions {
|
|||||||
return res
|
return res
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log('error loadCart', error)
|
console.log('error loadOrders', error)
|
||||||
UserStore.mutations.setErrorCatch(error)
|
UserStore.mutations.setErrorCatch(error)
|
||||||
return new Types.AxiosError(serv_constants.RIS_CODE_ERR, null, tools.ERR_GENERICO, error)
|
return new Types.AxiosError(serv_constants.RIS_CODE_ERR, null, tools.ERR_GENERICO, error)
|
||||||
})
|
})
|
||||||
@@ -349,7 +349,7 @@ namespace Actions {
|
|||||||
ris = await Api.SendReq('/cart/' + UserStore.state.my._id + '/cartstatus', 'POST', { cart_id, status })
|
ris = await Api.SendReq('/cart/' + UserStore.state.my._id + '/cartstatus', 'POST', { cart_id, status })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
||||||
if (res.data.status === shared_consts.OrderStatus.CHECKOUT_CONFIRMED) {
|
if (res.data.status === shared_consts.OrderStatus.CHECKOUT_SENT) {
|
||||||
ProductsModule.state.cart = {}
|
ProductsModule.state.cart = {}
|
||||||
if (res.data.orders)
|
if (res.data.orders)
|
||||||
Products.state.orders = res.data.orders
|
Products.state.orders = res.data.orders
|
||||||
@@ -366,13 +366,13 @@ namespace Actions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const actions = {
|
export const actions = {
|
||||||
// loadCart: b.dispatch(loadCart),
|
|
||||||
loadProduct: b.dispatch(loadProduct),
|
loadProduct: b.dispatch(loadProduct),
|
||||||
loadProducts: b.dispatch(loadProducts),
|
loadProducts: b.dispatch(loadProducts),
|
||||||
addToCart: b.dispatch(addToCart),
|
addToCart: b.dispatch(addToCart),
|
||||||
addSubQtyToItem: b.dispatch(addSubQtyToItem),
|
addSubQtyToItem: b.dispatch(addSubQtyToItem),
|
||||||
UpdateStatusCart: b.dispatch(UpdateStatusCart),
|
UpdateStatusCart: b.dispatch(UpdateStatusCart),
|
||||||
removeFromCart: b.dispatch(removeFromCart),
|
removeFromCart: b.dispatch(removeFromCart),
|
||||||
|
loadOrders: b.dispatch(loadOrders),
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ const stateglob: IProjectsState = {
|
|||||||
visuLastCompleted: 10
|
visuLastCompleted: 10
|
||||||
}
|
}
|
||||||
|
|
||||||
const listFieldsToChange: string [] = ['descr', 'longdescr', 'hoursplanned', 'hoursleft', 'hoursworked', 'id_parent', 'statusproj',
|
const listFieldsToChange: string [] = ['descr', 'respUsername', 'viceRespUsername', 'longdescr', 'hoursplanned', 'hoursleft', 'hoursworked', 'id_parent', 'statusproj',
|
||||||
'category', 'expiring_at', 'priority', 'id_prev', 'pos', 'enableExpiring', 'progressCalc', 'live_url', 'test_url',
|
'category', 'expiring_at', 'priority', 'pos', 'groupId', 'enableExpiring', 'progressCalc', 'live_url', 'test_url',
|
||||||
'begin_development', 'begin_test', 'actualphase', 'totalphases', 'hoursweeky_plannedtowork', 'endwork_estimate',
|
'begin_development', 'begin_test', 'actualphase', 'totalphases', 'hoursweeky_plannedtowork', 'endwork_estimate',
|
||||||
'privacyread', 'privacywrite', 'id_main_project', 'typeproj', 'favourite', 'themecolor', 'themebgcolor']
|
'privacyread', 'privacywrite', 'id_main_project', 'typeproj', 'favourite', 'themecolor', 'themebgcolor']
|
||||||
|
|
||||||
@@ -62,12 +62,14 @@ function getproj(projects, idproj, tipoproj: string) {
|
|||||||
let ris = null
|
let ris = null
|
||||||
|
|
||||||
if (tipoproj === RouteNames.myprojects)
|
if (tipoproj === RouteNames.myprojects)
|
||||||
ris = projects.filter((proj) => (proj.id_parent === idproj) && (proj.userId === UserStore.state.my._id) && (proj.privacyread === Privacy.onlyme))
|
ris = projects.filter((proj) => (proj.id_parent === idproj) && (proj.userId === UserStore.state.my._id))
|
||||||
else if (tipoproj === RouteNames.projectsshared)
|
else if (tipoproj === RouteNames.projectsshared)
|
||||||
ris = projects.filter((proj) => (proj.id_parent === idproj) && (proj.userId === UserStore.state.my._id) && (proj.privacyread !== Privacy.onlyme))
|
ris = projects.filter((proj) => (proj.id_parent === idproj) && (proj.userId === UserStore.state.my._id) && (proj.privacyread !== Privacy.onlyme))
|
||||||
else if (tipoproj === RouteNames.projectsall)
|
else if (tipoproj === RouteNames.projectsall)
|
||||||
ris = projects.filter((proj) => (proj.id_parent === idproj) && (proj.userId !== UserStore.state.my._id) )
|
ris = projects.filter((proj) => (proj.id_parent === idproj) && (proj.userId !== UserStore.state.my._id) )
|
||||||
|
|
||||||
|
if (ris)
|
||||||
|
ris = ris.sort((a, b) => a.pos - b.pos)
|
||||||
// console.log('idproj', idproj, 'projects', projects, 'getproj', tipoproj, 'ris=', ris)
|
// console.log('idproj', idproj, 'projects', projects, 'getproj', tipoproj, 'ris=', ris)
|
||||||
|
|
||||||
return ris
|
return ris
|
||||||
@@ -93,7 +95,6 @@ namespace Getters {
|
|||||||
category: '',
|
category: '',
|
||||||
// expiring_at: tomorrow,
|
// expiring_at: tomorrow,
|
||||||
enableExpiring: false,
|
enableExpiring: false,
|
||||||
id_prev: '',
|
|
||||||
pos: 0,
|
pos: 0,
|
||||||
modified: false,
|
modified: false,
|
||||||
live_url: '',
|
live_url: '',
|
||||||
@@ -111,7 +112,10 @@ namespace Getters {
|
|||||||
hoursweeky_plannedtowork: 0,
|
hoursweeky_plannedtowork: 0,
|
||||||
endwork_estimate: tools.getDateNull(),
|
endwork_estimate: tools.getDateNull(),
|
||||||
themecolor: '',
|
themecolor: '',
|
||||||
themebgcolor: ''
|
themebgcolor: '',
|
||||||
|
groupId: '',
|
||||||
|
respUsername: '',
|
||||||
|
viceRespUsername: ''
|
||||||
}
|
}
|
||||||
|
|
||||||
return obj
|
return obj
|
||||||
@@ -156,6 +160,8 @@ namespace Getters {
|
|||||||
}, 'getDescrById')
|
}, 'getDescrById')
|
||||||
|
|
||||||
const getRecordById = b.read((state: IProjectsState) => (id: string): IProject => {
|
const getRecordById = b.read((state: IProjectsState) => (id: string): IProject => {
|
||||||
|
// console.log('state.projects', state.projects)
|
||||||
|
// console.log('find', state.projects.find((item) => item._id === id))
|
||||||
if (state.projects) {
|
if (state.projects) {
|
||||||
return state.projects.find((item) => item._id === id)
|
return state.projects.find((item) => item._id === id)
|
||||||
}
|
}
|
||||||
@@ -293,6 +299,8 @@ namespace Actions {
|
|||||||
// return false // Login not made
|
// return false // Login not made
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
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)
|
const ris = await Api.SendReq('/projects/' + UserStore.state.my._id, 'GET', null)
|
||||||
@@ -333,15 +341,19 @@ namespace Actions {
|
|||||||
console.log('myobjtrov', myobjtrov.descr)
|
console.log('myobjtrov', myobjtrov.descr)
|
||||||
|
|
||||||
if (!!myobjtrov) {
|
if (!!myobjtrov) {
|
||||||
|
/*
|
||||||
const myobjnext = tools.getElemPrevById(myarr, myobjtrov._id)
|
const myobjnext = tools.getElemPrevById(myarr, myobjtrov._id)
|
||||||
|
|
||||||
if (!!myobjnext) {
|
if (!!myobjnext) {
|
||||||
myobjnext.id_prev = myobjtrov.id_prev
|
myobjnext.pos = myobjtrov.pos + 1
|
||||||
myobjnext.modified = true
|
myobjnext.modified = true
|
||||||
await modify(context, { myitem: myobjnext, field: 'id_prev' })
|
await modify(context, { myitem: myobjnext, field: 'pos' })
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiTables.table_DeleteRecord(nametable, myobjtrov, idobj)
|
*/
|
||||||
|
|
||||||
|
// ApiTables.table_DeleteRecord(nametable, myobjtrov, idobj)
|
||||||
|
ApiTables.table_HideRecord(nametable, myobjtrov, idobj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -365,13 +377,13 @@ namespace Actions {
|
|||||||
if (atfirst) {
|
if (atfirst) {
|
||||||
console.log('INSERT AT THE TOP')
|
console.log('INSERT AT THE TOP')
|
||||||
elemtochange = tools.getFirstList(myarr)
|
elemtochange = tools.getFirstList(myarr)
|
||||||
objproj.id_prev = ApiTables.LIST_START
|
objproj.pos = 10
|
||||||
} else {
|
} else {
|
||||||
console.log('INSERT AT THE BOTTOM')
|
console.log('INSERT AT THE BOTTOM')
|
||||||
// INSERT AT THE BOTTOM , so GET LAST ITEM
|
// INSERT AT THE BOTTOM , so GET LAST ITEM
|
||||||
const lastelem = tools.getLastListNotCompleted(nametable, objproj.id_parent, this.tipoProj)
|
const lastelem = tools.getLastListNotCompleted(nametable, objproj.id_parent, this.tipoProj)
|
||||||
|
|
||||||
objproj.id_prev = (!!lastelem) ? lastelem._id : ApiTables.LIST_START
|
objproj.pos = (!!lastelem) ? lastelem.pos + 10 : 10
|
||||||
}
|
}
|
||||||
objproj.modified = false
|
objproj.modified = false
|
||||||
|
|
||||||
@@ -382,9 +394,9 @@ namespace Actions {
|
|||||||
let field = ''
|
let field = ''
|
||||||
if (atfirst) { // update also the last elem
|
if (atfirst) { // update also the last elem
|
||||||
if (!!elemtochange) {
|
if (!!elemtochange) {
|
||||||
elemtochange.id_prev = id
|
elemtochange.pos = objproj.pos
|
||||||
console.log('elemtochange', elemtochange)
|
console.log('elemtochange', elemtochange)
|
||||||
field = 'id_prev'
|
field = 'pos'
|
||||||
|
|
||||||
// Modify the other record
|
// Modify the other record
|
||||||
await modify(context, { myitem: elemtochange, field })
|
await modify(context, { myitem: elemtochange, field })
|
||||||
@@ -429,7 +441,6 @@ namespace Actions {
|
|||||||
dest_obj.id_parent = dest._id
|
dest_obj.id_parent = dest._id
|
||||||
dest_obj.id_main_project = dest.id_main_project
|
dest_obj.id_main_project = dest.id_main_project
|
||||||
dest_obj.modified = true
|
dest_obj.modified = true
|
||||||
dest_obj.id_prev = null
|
|
||||||
|
|
||||||
GlobalStore.state.lastaction.type = 0
|
GlobalStore.state.lastaction.type = 0
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ const state: ITodosState = {
|
|||||||
visuLastCompleted: 10
|
visuLastCompleted: 10
|
||||||
}
|
}
|
||||||
|
|
||||||
const listFieldsToChange: string [] = ['descr', 'statustodo', 'category', 'expiring_at', 'priority', 'id_prev', 'pos', 'enableExpiring', 'progress', 'phase', 'assigned_to_userId', 'hoursplanned', 'hoursworked', 'start_date', 'completed_at', 'themecolor', 'themebgcolor']
|
const listFieldsToChange: string [] = ['descr', 'statustodo', 'category', 'expiring_at', 'priority', 'pos', 'enableExpiring', 'progress', 'phase', 'assigned_to_userId', 'hoursplanned', 'hoursworked', 'start_date', 'completed_at', 'themecolor', 'themebgcolor', 'assignedToUsers']
|
||||||
|
|
||||||
const b = storeBuilder.module<ITodosState>('Todos', state)
|
const b = storeBuilder.module<ITodosState>('Todos', state)
|
||||||
const stateGetter = b.state()
|
const stateGetter = b.state()
|
||||||
@@ -77,7 +77,6 @@ namespace Getters {
|
|||||||
category: '',
|
category: '',
|
||||||
expiring_at: tomorrow,
|
expiring_at: tomorrow,
|
||||||
enableExpiring: false,
|
enableExpiring: false,
|
||||||
id_prev: '',
|
|
||||||
pos: 0,
|
pos: 0,
|
||||||
modified: false,
|
modified: false,
|
||||||
progress: 0,
|
progress: 0,
|
||||||
@@ -88,7 +87,8 @@ namespace Getters {
|
|||||||
hoursworked: 0,
|
hoursworked: 0,
|
||||||
start_date: tools.getDateNull(),
|
start_date: tools.getDateNull(),
|
||||||
themecolor: 'blue',
|
themecolor: 'blue',
|
||||||
themebgcolor: 'white'
|
themebgcolor: 'white',
|
||||||
|
assignedToUsers: []
|
||||||
}
|
}
|
||||||
// return this.copy(objtodo)
|
// return this.copy(objtodo)
|
||||||
return objtodo
|
return objtodo
|
||||||
@@ -104,6 +104,9 @@ namespace Getters {
|
|||||||
arrout = []
|
arrout = []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (arrout)
|
||||||
|
arrout = arrout.sort((a, b) => a.pos - b.pos)
|
||||||
|
|
||||||
// return tools.mapSort(arrout)
|
// return tools.mapSort(arrout)
|
||||||
return arrout
|
return arrout
|
||||||
}, 'items_dacompletare')
|
}, 'items_dacompletare')
|
||||||
@@ -126,7 +129,10 @@ namespace Getters {
|
|||||||
arrout = []
|
arrout = []
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('arrout', arrout)
|
if (arrout)
|
||||||
|
arrout = arrout.sort((a, b) => a.pos - b.pos)
|
||||||
|
|
||||||
|
// console.log('arrout', arrout)
|
||||||
|
|
||||||
return arrout
|
return arrout
|
||||||
// return tools.mapSort(arrout)
|
// return tools.mapSort(arrout)
|
||||||
@@ -309,15 +315,18 @@ namespace Actions {
|
|||||||
console.log('myobjtrov', myobjtrov.descr)
|
console.log('myobjtrov', myobjtrov.descr)
|
||||||
|
|
||||||
if (!!myobjtrov) {
|
if (!!myobjtrov) {
|
||||||
|
/*
|
||||||
const myobjnext = tools.getElemPrevById(myarr, myobjtrov._id)
|
const myobjnext = tools.getElemPrevById(myarr, myobjtrov._id)
|
||||||
|
|
||||||
if (!!myobjnext) {
|
if (!!myobjnext) {
|
||||||
myobjnext.id_prev = myobjtrov.id_prev
|
myobjnext.pos = myobjtrov.pos + 1
|
||||||
myobjnext.modified = true
|
myobjnext.modified = true
|
||||||
await modify(context, { myitem: myobjnext, field: 'id_prev' })
|
await modify(context, { myitem: myobjnext, field: 'pos' })
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiTables.table_DeleteRecord(nametable, myobjtrov, idobj)
|
*/
|
||||||
|
|
||||||
|
ApiTables.table_HideRecord(nametable, myobjtrov, idobj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -336,13 +345,13 @@ namespace Actions {
|
|||||||
if (atfirst) {
|
if (atfirst) {
|
||||||
console.log('INSERT AT THE TOP')
|
console.log('INSERT AT THE TOP')
|
||||||
elemtochange = tools.getFirstList(myarr)
|
elemtochange = tools.getFirstList(myarr)
|
||||||
objtodo.id_prev = ApiTables.LIST_START
|
objtodo.pos = 10
|
||||||
} else {
|
} else {
|
||||||
console.log('INSERT AT THE BOTTOM')
|
console.log('INSERT AT THE BOTTOM')
|
||||||
// INSERT AT THE BOTTOM , so GET LAST ITEM
|
// INSERT AT THE BOTTOM , so GET LAST ITEM
|
||||||
const lastelem = tools.getLastListNotCompleted(nametable, objtodo.category, this.tipoProj)
|
const lastelem = tools.getLastListNotCompleted(nametable, objtodo.category, this.tipoProj)
|
||||||
|
|
||||||
objtodo.id_prev = (!!lastelem) ? lastelem._id : ApiTables.LIST_START
|
objtodo.pos = (!!lastelem) ? lastelem.pos + 10 : 10
|
||||||
}
|
}
|
||||||
objtodo.modified = false
|
objtodo.modified = false
|
||||||
|
|
||||||
@@ -353,9 +362,9 @@ namespace Actions {
|
|||||||
let field = ''
|
let field = ''
|
||||||
if (atfirst) { // update also the last elem
|
if (atfirst) { // update also the last elem
|
||||||
if (!!elemtochange) {
|
if (!!elemtochange) {
|
||||||
elemtochange.id_prev = id
|
elemtochange.pos = objtodo.pos
|
||||||
console.log('elemtochange', elemtochange)
|
console.log('elemtochange', elemtochange)
|
||||||
field = 'id_prev'
|
field = 'pos'
|
||||||
|
|
||||||
// Modify the other record
|
// Modify the other record
|
||||||
await modify(context, { myitem: elemtochange, field })
|
await modify(context, { myitem: elemtochange, field })
|
||||||
@@ -444,7 +453,7 @@ namespace Actions {
|
|||||||
if (!!dest_obj) {
|
if (!!dest_obj) {
|
||||||
dest_obj.category = action._id
|
dest_obj.category = action._id
|
||||||
dest_obj.modified = true
|
dest_obj.modified = true
|
||||||
dest_obj.id_prev = null
|
dest_obj.pos = 1
|
||||||
|
|
||||||
GlobalStore.state.lastaction.type = 0
|
GlobalStore.state.lastaction.type = 0
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ export const DefaultUser: IUserFields = {
|
|||||||
userId: '',
|
userId: '',
|
||||||
items: [],
|
items: [],
|
||||||
totalPrice: 0,
|
totalPrice: 0,
|
||||||
|
department: '',
|
||||||
totalQty: 0,
|
totalQty: 0,
|
||||||
note: '',
|
note: '',
|
||||||
}
|
}
|
||||||
@@ -103,6 +104,7 @@ const state: IUserState = {
|
|||||||
isLogged: false,
|
isLogged: false,
|
||||||
isAdmin: false,
|
isAdmin: false,
|
||||||
isManager: false,
|
isManager: false,
|
||||||
|
isDepartment: false,
|
||||||
isTutor: false,
|
isTutor: false,
|
||||||
isZoomeri: false,
|
isZoomeri: false,
|
||||||
isTraduttrici: false,
|
isTraduttrici: false,
|
||||||
@@ -341,6 +343,7 @@ namespace Mutations {
|
|||||||
mystate.isManager = tools.isBitActive(mystate.my.perm, shared_consts.Permissions.Manager.value)
|
mystate.isManager = tools.isBitActive(mystate.my.perm, shared_consts.Permissions.Manager.value)
|
||||||
mystate.isTutor = tools.isBitActive(mystate.my.perm, shared_consts.Permissions.Tutor.value)
|
mystate.isTutor = tools.isBitActive(mystate.my.perm, shared_consts.Permissions.Tutor.value)
|
||||||
mystate.isZoomeri = tools.isBitActive(mystate.my.perm, shared_consts.Permissions.Zoomeri.value)
|
mystate.isZoomeri = tools.isBitActive(mystate.my.perm, shared_consts.Permissions.Zoomeri.value)
|
||||||
|
mystate.isDepartment = tools.isBitActive(mystate.my.perm, shared_consts.Permissions.Department.value)
|
||||||
mystate.isTeacher = tools.isBitActive(mystate.my.perm, shared_consts.Permissions.Teacher.value)
|
mystate.isTeacher = tools.isBitActive(mystate.my.perm, shared_consts.Permissions.Teacher.value)
|
||||||
mystate.isTraduttrici = tools.isBitActive(mystate.my.perm, shared_consts.Permissions.Traduttrici.value)
|
mystate.isTraduttrici = tools.isBitActive(mystate.my.perm, shared_consts.Permissions.Traduttrici.value)
|
||||||
|
|
||||||
@@ -897,6 +900,7 @@ namespace Actions {
|
|||||||
GlobalStore.mutations.setCategorySel(localStorage.getItem(tools.localStorage.categorySel))
|
GlobalStore.mutations.setCategorySel(localStorage.getItem(tools.localStorage.categorySel))
|
||||||
|
|
||||||
GlobalStore.actions.checkUpdates()
|
GlobalStore.actions.checkUpdates()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const isok = await GlobalStore.actions.loadAfterLogin()
|
const isok = await GlobalStore.actions.loadAfterLogin()
|
||||||
|
|||||||
@@ -174,11 +174,36 @@ export const colTableProducer = [
|
|||||||
AddCol({ name: 'website', label_trans: 'producer.website' }),
|
AddCol({ name: 'website', label_trans: 'producer.website' }),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
export const getcolorderscart = [
|
||||||
|
AddCol({ name: 'numorder', label_trans: 'order.numorder' }),
|
||||||
|
AddCol({ name: 'created_at', label_trans: 'order.created_at', fieldtype: tools.FieldType.date }),
|
||||||
|
AddCol({ name: 'status', label_trans: 'order.status' }),
|
||||||
|
AddCol({ name: 'items', label_trans: 'order.items' }),
|
||||||
|
AddCol({ name: 'userId', label_trans: 'order.users', fieldtype: tools.FieldType.select, jointable: 'users' }),
|
||||||
|
AddCol({ name: 'note', label_trans: 'order.note' }),
|
||||||
|
]
|
||||||
|
|
||||||
export const colTableShareWithUs = [
|
export const colTableShareWithUs = [
|
||||||
AddCol({ name: 'description', label_trans: 'share.description' }),
|
AddCol({ name: 'description', label_trans: 'share.description' }),
|
||||||
AddCol({ name: 'numshared', label_trans: 'share.numshared', fieldtype: tools.FieldType.number }),
|
AddCol({ name: 'numshared', label_trans: 'share.numshared', fieldtype: tools.FieldType.number }),
|
||||||
AddCol({ name: 'rating', label_trans: 'share.rating', fieldtype: tools.FieldType.number }),
|
AddCol({ name: 'rating', label_trans: 'share.rating', fieldtype: tools.FieldType.number }),
|
||||||
]
|
]
|
||||||
|
export const colTablegroups = [
|
||||||
|
AddCol({ name: 'descr', label_trans: 'share.description' }),
|
||||||
|
AddCol({ name: 'resp', label_trans: 'reg.resp' }),
|
||||||
|
AddCol({ name: 'viceResp', label_trans: 'reg.viceResp' }),
|
||||||
|
AddCol({
|
||||||
|
name: 'assignedToUsers',
|
||||||
|
label_trans: 'reg.userslist',
|
||||||
|
fieldtype: tools.FieldType.multiselect,
|
||||||
|
jointable: 'users'
|
||||||
|
}),
|
||||||
|
]
|
||||||
|
|
||||||
|
export const colTabledepartments = [
|
||||||
|
AddCol({ name: 'name', label_trans: 'store.name' }),
|
||||||
|
AddCol({ name: 'username', label_trans: 'store.username' })
|
||||||
|
]
|
||||||
|
|
||||||
export const colTableStorehouse = [
|
export const colTableStorehouse = [
|
||||||
AddCol({ name: 'name', label_trans: 'store.name' }),
|
AddCol({ name: 'name', label_trans: 'store.name' }),
|
||||||
@@ -197,7 +222,6 @@ export const colTableProducts = [
|
|||||||
AddCol({ name: 'description', label_trans: 'products.description' }),
|
AddCol({ name: 'description', label_trans: 'products.description' }),
|
||||||
AddCol({ name: 'icon', label_trans: 'products.icon' }),
|
AddCol({ name: 'icon', label_trans: 'products.icon' }),
|
||||||
AddCol({ name: 'img', label_trans: 'products.img' }),
|
AddCol({ name: 'img', label_trans: 'products.img' }),
|
||||||
AddCol({ name: 'department', label_trans: 'products.department' }),
|
|
||||||
// AddCol({ name: 'idProducer', label_trans: 'products.idProducer' }),
|
// AddCol({ name: 'idProducer', label_trans: 'products.idProducer' }),
|
||||||
AddCol({
|
AddCol({
|
||||||
name: 'idProducer',
|
name: 'idProducer',
|
||||||
@@ -211,6 +235,13 @@ export const colTableProducts = [
|
|||||||
fieldtype: tools.FieldType.multiselect,
|
fieldtype: tools.FieldType.multiselect,
|
||||||
jointable: 'storehouses'
|
jointable: 'storehouses'
|
||||||
}),
|
}),
|
||||||
|
AddCol({
|
||||||
|
name: 'department',
|
||||||
|
label_trans: 'products.department',
|
||||||
|
fieldtype: tools.FieldType.select,
|
||||||
|
jointable: 'departments'
|
||||||
|
}),
|
||||||
|
// AddCol({ name: 'department', label_trans: 'products.department' }),
|
||||||
AddCol({ name: 'category', label_trans: 'products.category' }),
|
AddCol({ name: 'category', label_trans: 'products.category' }),
|
||||||
AddCol({ name: 'price', label_trans: 'products.price', fieldtype: tools.FieldType.number }),
|
AddCol({ name: 'price', label_trans: 'products.price', fieldtype: tools.FieldType.number }),
|
||||||
AddCol({ name: 'color', label_trans: 'products.color' }),
|
AddCol({ name: 'color', label_trans: 'products.color' }),
|
||||||
@@ -517,7 +548,7 @@ export const fieldsTable = {
|
|||||||
|
|
||||||
getTableJoinByName(table) {
|
getTableJoinByName(table) {
|
||||||
if (table === 'permissions')
|
if (table === 'permissions')
|
||||||
return [shared_consts.Permissions.Admin, shared_consts.Permissions.Manager, shared_consts.Permissions.Teacher, shared_consts.Permissions.Tutor, shared_consts.Permissions.Traduttrici, shared_consts.Permissions.Zoomeri]
|
return [shared_consts.Permissions.Admin, shared_consts.Permissions.Manager, shared_consts.Permissions.Teacher, shared_consts.Permissions.Tutor, shared_consts.Permissions.Traduttrici, shared_consts.Permissions.Zoomeri, shared_consts.Permissions.Department]
|
||||||
else if (table === 'accepted')
|
else if (table === 'accepted')
|
||||||
return [shared_consts.Accepted.CHECK_READ_GUIDELINES, shared_consts.Accepted.CHECK_SEE_VIDEO_PRINCIPI]
|
return [shared_consts.Accepted.CHECK_READ_GUIDELINES, shared_consts.Accepted.CHECK_SEE_VIDEO_PRINCIPI]
|
||||||
else if (table === 'fieldstype')
|
else if (table === 'fieldstype')
|
||||||
@@ -932,6 +963,13 @@ export const fieldsTable = {
|
|||||||
colkey: '_id',
|
colkey: '_id',
|
||||||
collabel: 'name'
|
collabel: 'name'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
value: 'departments',
|
||||||
|
label: 'Uffici',
|
||||||
|
columns: colTabledepartments,
|
||||||
|
colkey: 'username',
|
||||||
|
collabel: 'name'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
value: 'storehouses',
|
value: 'storehouses',
|
||||||
label: 'Magazzini',
|
label: 'Magazzini',
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ export const tools = {
|
|||||||
TABMAILINGLIST: 'mailinglist',
|
TABMAILINGLIST: 'mailinglist',
|
||||||
TABMYPAGE: 'mypage',
|
TABMYPAGE: 'mypage',
|
||||||
TABCALZOOM: 'calzoom',
|
TABCALZOOM: 'calzoom',
|
||||||
|
TABGROUPS: 'groups',
|
||||||
TABTEMPLEMAIL: 'templemail',
|
TABTEMPLEMAIL: 'templemail',
|
||||||
TABOPZEMAIL: 'opzemail',
|
TABOPZEMAIL: 'opzemail',
|
||||||
TABSHAREWITHUS: 'sharewithus',
|
TABSHAREWITHUS: 'sharewithus',
|
||||||
@@ -1072,11 +1073,9 @@ export const tools = {
|
|||||||
|
|
||||||
if (priority === tools.Priority.PRIORITY_HIGH) {
|
if (priority === tools.Priority.PRIORITY_HIGH) {
|
||||||
cl = 'high_priority'
|
cl = 'high_priority'
|
||||||
}
|
} else if (priority === tools.Priority.PRIORITY_NORMAL) {
|
||||||
else if (priority === tools.Priority.PRIORITY_NORMAL) {
|
|
||||||
cl = 'medium_priority'
|
cl = 'medium_priority'
|
||||||
}
|
} else if (priority === tools.Priority.PRIORITY_LOW) {
|
||||||
else if (priority === tools.Priority.PRIORITY_LOW) {
|
|
||||||
cl = 'low_priority'
|
cl = 'low_priority'
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1116,12 +1115,12 @@ export const tools = {
|
|||||||
,
|
,
|
||||||
|
|
||||||
logelem(mystr, elem) {
|
logelem(mystr, elem) {
|
||||||
console.log(mystr, 'elem [', elem._id, '] ', elem.descr, ' Pr(', tools.getPriorityByInd(elem.priority), ') [', elem.id_prev, '] modif=', elem.modified)
|
console.log(mystr, 'elem [', elem._id, '] ', elem.descr, 'pos', elem.pos, ' Pr(', tools.getPriorityByInd(elem.priority), ') modif=', elem.modified)
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
|
|
||||||
getelemprojstr(elem) {
|
getelemprojstr(elem) {
|
||||||
return 'elem [id= ' + elem._id + '] ' + elem.descr + ' [id_prev= ' + elem.id_prev + '] '
|
return elem.descr + ' [id= ' + elem._id + '] ' + 'pos: ' + elem.pos + ']\n'
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
|
|
||||||
@@ -1141,7 +1140,7 @@ export const tools = {
|
|||||||
,
|
,
|
||||||
|
|
||||||
getstrelem(elem) {
|
getstrelem(elem) {
|
||||||
return 'elem [' + elem._id + '] ' + elem.descr + ' Pr(' + tools.getPriorityByInd(elem.priority) + ') [ID_PREV=' + elem.id_prev + '] modif=' + elem.modified + ' '
|
return 'elem [' + elem._id + '] ' + elem.descr + ' Pr(' + tools.getPriorityByInd(elem.priority) + ') modif=' + elem.modified + ' '
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
|
|
||||||
@@ -1151,7 +1150,7 @@ export const tools = {
|
|||||||
) {
|
) {
|
||||||
let mystr = '\n'
|
let mystr = '\n'
|
||||||
myarr.forEach((item) => {
|
myarr.forEach((item) => {
|
||||||
mystr += '[' + item.pos + '] ' + item.descr + ' Pr(' + tools.getPriorityByInd(item.priority) + ') [' + item.id_prev + '] modif=' + item.modified + '\n'
|
mystr += '[' + item.pos + '] ' + item.descr + ' Pr(' + tools.getPriorityByInd(item.priority) + ')' + ' modif=' + item.modified + '\n'
|
||||||
// mystr += '[' + item.pos + '] ' + item.descr + '\n'
|
// mystr += '[' + item.pos + '] ' + item.descr + '\n'
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -1198,25 +1197,28 @@ export const tools = {
|
|||||||
}
|
}
|
||||||
,
|
,
|
||||||
|
|
||||||
update_idprev(myarr, indelemchange, indelemId) {
|
/* update_idprev(myarr, indelemchange, indelemId) {
|
||||||
if (tools.isOkIndex(myarr, indelemchange)) {
|
if (tools.isOkIndex(myarr, indelemchange)) {
|
||||||
const id_prev = (indelemId >= 0) ? myarr[indelemId]._id : ApiTables.LIST_START
|
// const id_prev = (indelemId >= 0) ? myarr[indelemId]._id : ApiTables.LIST_START
|
||||||
console.log('update_idprev [', indelemchange, ']', '[id_prev=', id_prev, ']')
|
const id_prevnew = myarr[indelemchange].id_prevnew
|
||||||
if (myarr[indelemchange].id_prev !== id_prev) {
|
console.log('update_idprev [', indelemchange, ']', myarr[indelemchange].descr, '[id_prev=', myarr[indelemchange].id_prev, ']', '[id_prevnew=', id_prevnew, ']')
|
||||||
|
if (myarr[indelemchange].id_prev !== id_prevnew) {
|
||||||
// tools.notifyarraychanged(myarr)
|
// tools.notifyarraychanged(myarr)
|
||||||
// myarr[indelemchange].modified = true
|
// myarr[indelemchange].modified = true
|
||||||
// console.log('update_idprev Index=', indelemchange, 'indtoget', indelemId, tools.getstrelem(myarr[indelemchange]))
|
// console.log('update_idprev Index=', indelemchange, 'indtoget', indelemId, tools.getstrelem(myarr[indelemchange]))
|
||||||
console.log(' MODIFICATO! ', myarr[indelemchange].descr, ' PRIMA:', myarr[indelemchange].id_prev, 'DOPO: ', id_prev)
|
console.log(' MODIFICATO! ', myarr[indelemchange].descr, ' PRIMA:', myarr[indelemchange].id_prev, 'DOPO: ', id_prevnew)
|
||||||
myarr[indelemchange].id_prev = id_prev
|
myarr[indelemchange].id_prev = id_prevnew
|
||||||
return myarr[indelemchange]
|
return myarr[indelemchange]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
}
|
}, */
|
||||||
,
|
|
||||||
|
|
||||||
async swapGeneralElem(nametable, myarr, itemdragend, listFieldsToChange) {
|
async swapGeneralElem(nametable, myarr, itemdragend, listFieldsToChange) {
|
||||||
|
|
||||||
|
const arrprec = [...myarr]
|
||||||
|
|
||||||
if (itemdragend.field === 'priority') {
|
if (itemdragend.field === 'priority') {
|
||||||
// get last elem priority
|
// get last elem priority
|
||||||
console.log('get last elem priority')
|
console.log('get last elem priority')
|
||||||
@@ -1235,15 +1237,16 @@ export const tools = {
|
|||||||
if (tools.isOkIndex(myarr, itemdragend.newIndex) && tools.isOkIndex(myarr, itemdragend.oldIndex)) {
|
if (tools.isOkIndex(myarr, itemdragend.newIndex) && tools.isOkIndex(myarr, itemdragend.oldIndex)) {
|
||||||
|
|
||||||
console.log('*** SPLICE!')
|
console.log('*** SPLICE!')
|
||||||
// console.log(' PRIMA!', tools.logga_arrproj(myarr))
|
console.log(' PRIMA!', tools.logga_arrproj(myarr))
|
||||||
myarr.splice(itemdragend.newIndex, 0, myarr.splice(itemdragend.oldIndex, 1)[0])
|
myarr.splice(itemdragend.newIndex, 0, myarr.splice(itemdragend.oldIndex, 1)[0])
|
||||||
// console.log(' DOPO!', tools.logga_arrproj(myarr))
|
console.log(' DOPO!', tools.logga_arrproj(myarr))
|
||||||
|
|
||||||
// Ora inverti gli indici
|
// Ora inverti gli indici
|
||||||
const indold = itemdragend.oldIndex
|
const indold = itemdragend.oldIndex
|
||||||
itemdragend.oldIndex = itemdragend.newIndex
|
itemdragend.oldIndex = itemdragend.newIndex
|
||||||
itemdragend.newIndex = indold
|
itemdragend.newIndex = indold
|
||||||
|
|
||||||
|
/*
|
||||||
if (nametable === 'todos') {
|
if (nametable === 'todos') {
|
||||||
if (itemdragend.field !== 'priority') {
|
if (itemdragend.field !== 'priority') {
|
||||||
const precind = itemdragend.newIndex - 1
|
const precind = itemdragend.newIndex - 1
|
||||||
@@ -1273,7 +1276,54 @@ export const tools = {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} */
|
||||||
|
|
||||||
|
let status = 0
|
||||||
|
|
||||||
|
// const arr = lists.selectPriority[toolsext.getLocale()]
|
||||||
|
// for (const priority of arr) {
|
||||||
|
for (let i = 0; i < myarr.length; ++i) {
|
||||||
|
if (nametable === 'todos') {
|
||||||
|
status = myarr[i].statustodo
|
||||||
|
} else if (nametable === 'projects') {
|
||||||
|
status = myarr[i].statusproj
|
||||||
}
|
}
|
||||||
|
if (status !== tools.Status.COMPLETED) {
|
||||||
|
myarr[i].pos = i
|
||||||
|
|
||||||
|
const findelem = arrprec.find((rec) => rec._id === myarr[i]._id)
|
||||||
|
|
||||||
|
if (findelem !== myarr[i].pos) {
|
||||||
|
myarr[i].modified = true
|
||||||
|
await ApiTables.table_ModifyRecord(nametable, myarr[i], listFieldsToChange, 'pos')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
for (let i = 0; i < myarr.length; ++i) {
|
||||||
|
if (nametable === 'todos') {
|
||||||
|
status = myarr[i].statustodo
|
||||||
|
} else if (nametable === 'projects') {
|
||||||
|
status = myarr[i].statusproj
|
||||||
|
}
|
||||||
|
// (myarr[i].priority === priority.value)
|
||||||
|
if ((status === tools.Status.COMPLETED)) {
|
||||||
|
myarr[i].pos = 1000 + i
|
||||||
|
|
||||||
|
const findelem = arrprec.find((rec) => rec._id === myarr[i]._id)
|
||||||
|
|
||||||
|
if (findelem !== myarr[i].pos) {
|
||||||
|
myarr[i].modified = true
|
||||||
|
await ApiTables.table_ModifyRecord(nametable, myarr[i], listFieldsToChange, 'pos')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
console.table(myarr)
|
||||||
|
|
||||||
// Update the id_prev property
|
// Update the id_prev property
|
||||||
const elem1 = tools.update_idprev(myarr, itemdragend.newIndex, itemdragend.newIndex - 1) // 0, -1
|
const elem1 = tools.update_idprev(myarr, itemdragend.newIndex, itemdragend.newIndex - 1) // 0, -1
|
||||||
@@ -1290,6 +1340,9 @@ export const tools = {
|
|||||||
await
|
await
|
||||||
ApiTables.table_ModifyRecord(nametable, elem4, listFieldsToChange, 'id_prev')
|
ApiTables.table_ModifyRecord(nametable, elem4, listFieldsToChange, 'id_prev')
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
tools.notifyarraychanged(myarr)
|
tools.notifyarraychanged(myarr)
|
||||||
|
|
||||||
console.log('arr FINALE', tools.logga_arrproj(myarr))
|
console.log('arr FINALE', tools.logga_arrproj(myarr))
|
||||||
@@ -1318,8 +1371,8 @@ export const tools = {
|
|||||||
if (myarr === undefined)
|
if (myarr === undefined)
|
||||||
return null
|
return null
|
||||||
return myarr.find((elem) => elem.id_prev === id)
|
return myarr.find((elem) => elem.id_prev === id)
|
||||||
}
|
},
|
||||||
,
|
|
||||||
|
|
||||||
getLastFirstElemPriority(myarr, priority: number, atfirst: boolean, escludiId: string) {
|
getLastFirstElemPriority(myarr, priority: number, atfirst: boolean, escludiId: string) {
|
||||||
if (myarr === null) {
|
if (myarr === null) {
|
||||||
@@ -1350,8 +1403,7 @@ export const tools = {
|
|||||||
} else {
|
} else {
|
||||||
if (priority === tools.Priority.PRIORITY_LOW) {
|
if (priority === tools.Priority.PRIORITY_LOW) {
|
||||||
return myarr.length - 1
|
return myarr.length - 1
|
||||||
}
|
} else if (priority === tools.Priority.PRIORITY_HIGH) {
|
||||||
else if (priority === tools.Priority.PRIORITY_HIGH) {
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1380,8 +1432,7 @@ export const tools = {
|
|||||||
Projects.state.projects = tools.jsonCopy(myarr)
|
Projects.state.projects = tools.jsonCopy(myarr)
|
||||||
return Projects.state.projects
|
return Projects.state.projects
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
,
|
|
||||||
|
|
||||||
getmyid(id) {
|
getmyid(id) {
|
||||||
return 'row' + id
|
return 'row' + id
|
||||||
@@ -1406,8 +1457,7 @@ export const tools = {
|
|||||||
getElemByIndex(myarr, index) {
|
getElemByIndex(myarr, index) {
|
||||||
if (index >= 0 && index < myarr.length) {
|
if (index >= 0 && index < myarr.length) {
|
||||||
return myarr[index]
|
return myarr[index]
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1429,8 +1479,11 @@ export const tools = {
|
|||||||
|
|
||||||
visumenu(elem) { // : IListRoutes
|
visumenu(elem) { // : IListRoutes
|
||||||
let visu = ((elem.onlyAdmin && UserStore.state.isAdmin) || (elem.onlyManager && UserStore.state.isManager)
|
let visu = ((elem.onlyAdmin && UserStore.state.isAdmin) || (elem.onlyManager && UserStore.state.isManager)
|
||||||
|
|| (elem.onlySocioResidente && UserStore.state.my.profile.socioresidente)
|
||||||
|| (elem.onlyTutor && UserStore.state.isTutor) || (elem.onlyTraduttrici && UserStore.state.isTraduttrici)
|
|| (elem.onlyTutor && UserStore.state.isTutor) || (elem.onlyTraduttrici && UserStore.state.isTraduttrici)
|
||||||
|| ((!elem.onlyAdmin) && (!elem.onlyManager) && (!elem.onlyTutor) && (!elem.onlyTraduttrici))) && elem.active
|
|| (elem.onlyDepartment && UserStore.state.isDepartment)
|
||||||
|
|| ((!elem.onlyAdmin) && (!elem.onlyManager) && (!elem.onlyTutor) && (!elem.onlyTraduttrici) && (!elem.onlyDepartment)
|
||||||
|
&& (!elem.onlySocioResidente))) && elem.active
|
||||||
|
|
||||||
if (!tools.isLoggedToSystem()) {
|
if (!tools.isLoggedToSystem()) {
|
||||||
if (elem.onlyif_logged)
|
if (elem.onlyif_logged)
|
||||||
@@ -2091,6 +2144,14 @@ export const tools = {
|
|||||||
return UserStore.state.isManager
|
return UserStore.state.isManager
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isSocioResidente() {
|
||||||
|
return UserStore.state.my.profile.socioresidente
|
||||||
|
},
|
||||||
|
|
||||||
|
isDepartment() {
|
||||||
|
return UserStore.state.isDepartment
|
||||||
|
},
|
||||||
|
|
||||||
isAdmin() {
|
isAdmin() {
|
||||||
return UserStore.state.isAdmin
|
return UserStore.state.isAdmin
|
||||||
},
|
},
|
||||||
@@ -3076,8 +3137,7 @@ export const tools = {
|
|||||||
} finally {
|
} finally {
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
,
|
|
||||||
|
|
||||||
SignUpcheckErrors(mythis, riscode: number, msg: string) {
|
SignUpcheckErrors(mythis, riscode: number, msg: string) {
|
||||||
console.log('SignUpcheckErrors', riscode)
|
console.log('SignUpcheckErrors', riscode)
|
||||||
@@ -3114,19 +3174,16 @@ export const tools = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return endload
|
return endload
|
||||||
}
|
},
|
||||||
,
|
|
||||||
isCssColor(color) {
|
isCssColor(color) {
|
||||||
return !!color && !!color.match(/^(#|(rgb|hsl)a?\()/)
|
return !!color && !!color.match(/^(#|(rgb|hsl)a?\()/)
|
||||||
}
|
},
|
||||||
,
|
|
||||||
displayClasses(eventparam) {
|
displayClasses(eventparam) {
|
||||||
return {
|
return {
|
||||||
// [`bg-${eventparam.bgcolor}`]: !tools.isCssColor(eventparam.bgcolor),
|
// [`bg-${eventparam.bgcolor}`]: !tools.isCssColor(eventparam.bgcolor),
|
||||||
'text-white': !tools.isCssColor(eventparam.bgcolor)
|
'text-white': !tools.isCssColor(eventparam.bgcolor)
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
,
|
|
||||||
displayStyles(eventparam) {
|
displayStyles(eventparam) {
|
||||||
const s = { color: '' }
|
const s = { color: '' }
|
||||||
if (tools.isCssColor(eventparam.bgcolor)) {
|
if (tools.isCssColor(eventparam.bgcolor)) {
|
||||||
@@ -3134,8 +3191,7 @@ export const tools = {
|
|||||||
s.color = colors.luminosity(eventparam.bgcolor) > 0.5 ? 'black' : 'white'
|
s.color = colors.luminosity(eventparam.bgcolor) > 0.5 ? 'black' : 'white'
|
||||||
}
|
}
|
||||||
return s
|
return s
|
||||||
}
|
},
|
||||||
,
|
|
||||||
CancelBookingEvent(mythis, eventparam: IEvents, bookeventid: string, notify: boolean) {
|
CancelBookingEvent(mythis, eventparam: IEvents, bookeventid: string, notify: boolean) {
|
||||||
console.log('CancelBookingEvent ', eventparam)
|
console.log('CancelBookingEvent ', eventparam)
|
||||||
tools.askConfirm(mythis.$q, translate('cal.titlebooking'), translate('cal.cancelbooking') + ' ' + tools.gettextevent(mythis, eventparam) + '?', translate('dialog.yes'), translate('dialog.no'), mythis, '', lists.MenuAction.DELETE, 0, {
|
tools.askConfirm(mythis.$q, translate('cal.titlebooking'), translate('cal.cancelbooking') + ' ' + tools.gettextevent(mythis, eventparam) + '?', translate('dialog.yes'), translate('dialog.no'), mythis, '', lists.MenuAction.DELETE, 0, {
|
||||||
@@ -3143,8 +3199,7 @@ export const tools = {
|
|||||||
param2: notify,
|
param2: notify,
|
||||||
param3: eventparam.title
|
param3: eventparam.title
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
,
|
|
||||||
CancelEvent(mythis, eventparam: IEvents) {
|
CancelEvent(mythis, eventparam: IEvents) {
|
||||||
console.log('CancelEvent ', eventparam)
|
console.log('CancelEvent ', eventparam)
|
||||||
tools.askConfirm(mythis.$q, translate('cal.event'), translate('cal.cancelevent') + ' ' + tools.gettextevent(mythis, eventparam) + '?', translate('dialog.yes'), translate('dialog.no'), mythis, '', lists.MenuAction.DELETE_EVENT, 0, {
|
tools.askConfirm(mythis.$q, translate('cal.event'), translate('cal.cancelevent') + ' ' + tools.gettextevent(mythis, eventparam) + '?', translate('dialog.yes'), translate('dialog.no'), mythis, '', lists.MenuAction.DELETE_EVENT, 0, {
|
||||||
@@ -3166,8 +3221,7 @@ export const tools = {
|
|||||||
param1: id,
|
param1: id,
|
||||||
param2: item
|
param2: item
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
,
|
|
||||||
|
|
||||||
async createNewRecord(mythis, table, data, withnotif = true) {
|
async createNewRecord(mythis, table, data, withnotif = true) {
|
||||||
|
|
||||||
@@ -3687,6 +3741,14 @@ export const tools = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getGroupById(myid) {
|
||||||
|
const group = GlobalStore.state.groups.find((rec) => rec._id === myid)
|
||||||
|
if (group) {
|
||||||
|
return group.descr
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
},
|
||||||
|
|
||||||
getLinkZoom() {
|
getLinkZoom() {
|
||||||
let id = ''
|
let id = ''
|
||||||
if (GlobalStore.state.calzoom.length > 0) {
|
if (GlobalStore.state.calzoom.length > 0) {
|
||||||
@@ -3944,6 +4006,30 @@ export const tools = {
|
|||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getGroupList() {
|
||||||
|
|
||||||
|
// console.log('GlobalStore.state.groups', GlobalStore.state.groups)
|
||||||
|
const mylist = {
|
||||||
|
it: [],
|
||||||
|
es: [],
|
||||||
|
enUs: []
|
||||||
|
}
|
||||||
|
|
||||||
|
let myrec = {}
|
||||||
|
|
||||||
|
for (const mygroup of GlobalStore.state.groups) {
|
||||||
|
myrec = {
|
||||||
|
id: mygroup._id,
|
||||||
|
label: mygroup.descr,
|
||||||
|
value: mygroup._id
|
||||||
|
}
|
||||||
|
mylist.it.push(myrec)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return mylist
|
||||||
}
|
}
|
||||||
|
|
||||||
// getLocale() {
|
// getLocale() {
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
<i class="on-left">keyboard_arrow_left</i>
|
<i class="on-left">keyboard_arrow_left</i>
|
||||||
Go back
|
Go back
|
||||||
</button>
|
</button>
|
||||||
<router-link to="/">
|
<router-link to="/" custom v-slot="{ navigate }">
|
||||||
<button class="grey push small">
|
<button class="grey push small" @click="navigate" @keypress.enter="navigate" role="link">
|
||||||
Go home
|
Go home
|
||||||
<i class="on-right">home</i>
|
<i class="on-right">home</i>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ export default class CheckOut extends MixinBase {
|
|||||||
},
|
},
|
||||||
title: 'Ordine'
|
title: 'Ordine'
|
||||||
}).onOk(async () => {
|
}).onOk(async () => {
|
||||||
const status = shared_consts.OrderStatus.CHECKOUT_CONFIRMED
|
const status = shared_consts.OrderStatus.CHECKOUT_SENT
|
||||||
const statusnow = await Products.actions.UpdateStatusCart({ cart_id: this.mycart._id, status })
|
const statusnow = await Products.actions.UpdateStatusCart({ cart_id: this.mycart._id, status })
|
||||||
|
|
||||||
if (statusnow === status) {
|
if (statusnow === status) {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
{{ props.row.totalPrice }} €
|
{{ props.row.totalPrice }} €
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="status" :props="props">
|
<q-td key="status" :props="props">
|
||||||
{{ props.row.status }}
|
{{ shared_consts.getStatusStr(props.row.status) }}
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -37,74 +37,8 @@ const namespace: string = 'Projects'
|
|||||||
})
|
})
|
||||||
|
|
||||||
export default class ProjList extends Vue {
|
export default class ProjList extends Vue {
|
||||||
public $q: any
|
|
||||||
public projbottom: string = ''
|
|
||||||
public prova: string = ''
|
|
||||||
public provatr: string = ''
|
|
||||||
public polling = null
|
|
||||||
public service: any
|
|
||||||
public scrollable = true
|
|
||||||
public dragname: string = 'second'
|
|
||||||
public idProjAtt: string = process.env.PROJECT_ID_MAIN
|
|
||||||
public splitterModel = 50 // start at 50%
|
|
||||||
public itemproj: IProject = null
|
|
||||||
public itemprojparent: IProject = null
|
|
||||||
public idsel: string = ''
|
|
||||||
public itemselproj: IProject = Projects.getters.getRecordEmpty()
|
|
||||||
public itemtodosel: ITodo = Todos.getters.getRecordEmpty()
|
|
||||||
public whatisSel: number = 0
|
|
||||||
public colProgress: string = 'blue'
|
|
||||||
public percProgress: string = 'percProgress'
|
|
||||||
public readonly: boolean = false
|
|
||||||
|
|
||||||
public selectStatus: any[] = tools.selectStatus[toolsext.getLocale()]
|
public tabproj: string = 'info'
|
||||||
public selectPhase: any[] = tools.selectPhase[toolsext.getLocale()]
|
|
||||||
public selectPrivacy: any[] = tools.selectPrivacy[toolsext.getLocale()]
|
|
||||||
|
|
||||||
public $refs: {
|
|
||||||
singleproject: SingleProject[],
|
|
||||||
ctodo: CTodo
|
|
||||||
}
|
|
||||||
|
|
||||||
@Getter('projs_dacompletare', { namespace })
|
|
||||||
public projs_dacompletare: (state: IProjectsState, id_parent: string, tipoproj: string) => IProject[]
|
|
||||||
|
|
||||||
// @Watch('projs_dacompletare')
|
|
||||||
// public changeitems() {
|
|
||||||
// this.updateindexProj()
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Watch('$route.name')
|
|
||||||
public changename() {
|
|
||||||
console.log('tools.getUrlByTipoProj(this.tipoProj)', tools.getUrlByTipoProj(this.tipoProj))
|
|
||||||
this.changeparent()
|
|
||||||
}
|
|
||||||
|
|
||||||
@Watch('$route.params.idProj')
|
|
||||||
public changeparent() {
|
|
||||||
this.idProjAtt = this.$route.params.idProj
|
|
||||||
this.updateindexProj()
|
|
||||||
this.selproj()
|
|
||||||
}
|
|
||||||
|
|
||||||
@Watch('itemselproj.progressCalc')
|
|
||||||
public changeprogress() {
|
|
||||||
this.updateclasses()
|
|
||||||
}
|
|
||||||
|
|
||||||
private updateindexProj() {
|
|
||||||
// console.log('idProjAtt', this.idProjAtt)
|
|
||||||
this.itemproj = Projects.getters.getRecordById(this.idProjAtt)
|
|
||||||
if (!!this.itemproj) {
|
|
||||||
this.itemprojparent = Projects.getters.getRecordById(this.itemproj.id_parent)
|
|
||||||
console.log('this.itemproj.descr', this.itemproj.descr)
|
|
||||||
}
|
|
||||||
// console.log('idproj', this.idProjAtt, 'params' , this.$route.params)
|
|
||||||
}
|
|
||||||
|
|
||||||
public keyDownArea(e) {
|
|
||||||
console.log('keyDownArea')
|
|
||||||
}
|
|
||||||
|
|
||||||
get classTitle() {
|
get classTitle() {
|
||||||
let cl = 'flex-item categorytitle shadow-4'
|
let cl = 'flex-item categorytitle shadow-4'
|
||||||
@@ -133,11 +67,18 @@ export default class ProjList extends Vue {
|
|||||||
} else {
|
} else {
|
||||||
cl += ' text-black' + ' bg-light-blue'
|
cl += ' text-black' + ' bg-light-blue'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!tools.isMobile())
|
||||||
|
cl += ' full-width '
|
||||||
return cl
|
return cl
|
||||||
}
|
}
|
||||||
|
|
||||||
get tipoProj() {
|
get tipoProj() {
|
||||||
// console.log('this.$route.name', this.$route.name)
|
// console.log('this.$route.name', this.$route.name)
|
||||||
|
const myarr = this.$route.name.split('.')
|
||||||
|
if (myarr)
|
||||||
|
return myarr[1]
|
||||||
|
else
|
||||||
return this.$route.name
|
return this.$route.name
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,7 +123,7 @@ export default class ProjList extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set showtype(value) {
|
set showtype(value) {
|
||||||
console.log('showtype', value)
|
// console.log('showtype', value)
|
||||||
GlobalStore.mutations.setShowType(value)
|
GlobalStore.mutations.setShowType(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -268,10 +209,10 @@ export default class ProjList extends Vue {
|
|||||||
if (date.getDateDiff(mydate, datenow) < 0) {
|
if (date.getDateDiff(mydate, datenow) < 0) {
|
||||||
mydate = datenow
|
mydate = datenow
|
||||||
}
|
}
|
||||||
console.log('mydate', mydate)
|
// console.log('mydate', mydate)
|
||||||
this.itemselproj.endwork_estimate = date.addToDate(mydate, { days })
|
this.itemselproj.endwork_estimate = date.addToDate(mydate, { days })
|
||||||
|
|
||||||
console.log(' days', days, 'weeks', weeks, 'orerimaste', orerimaste, 'dateestimated', this.itemselproj.endwork_estimate)
|
// console.log(' days', days, 'weeks', weeks, 'orerimaste', orerimaste, 'dateestimated', this.itemselproj.endwork_estimate)
|
||||||
|
|
||||||
return this.itemselproj.endwork_estimate
|
return this.itemselproj.endwork_estimate
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -295,10 +236,81 @@ export default class ProjList extends Vue {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get isHorizontal() {
|
||||||
|
return (Screen.width < 600)
|
||||||
|
}
|
||||||
|
|
||||||
|
get myStyle() {
|
||||||
|
if (this.isHorizontal)
|
||||||
|
return 'height: 600px'
|
||||||
|
else
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
public $q: any
|
||||||
|
public projbottom: string = ''
|
||||||
|
public prova: string = ''
|
||||||
|
public provatr: string = ''
|
||||||
|
public polling = null
|
||||||
|
public service: any
|
||||||
|
public scrollable = true
|
||||||
|
public dragname: string = 'second'
|
||||||
|
public idProjAtt: string = process.env.PROJECT_ID_MAIN
|
||||||
|
public splitterModel = 50 // start at 50%
|
||||||
|
public itemproj: IProject = null
|
||||||
|
public itemprojparent: IProject = null
|
||||||
|
public idsel: string = ''
|
||||||
|
public itemselproj: IProject = Projects.getters.getRecordEmpty()
|
||||||
|
public itemtodosel: ITodo = Todos.getters.getRecordEmpty()
|
||||||
|
public whatisSel: number = 0
|
||||||
|
public colProgress: string = 'blue'
|
||||||
|
public percProgress: string = 'percProgress'
|
||||||
|
public readonly: boolean = false
|
||||||
|
|
||||||
|
public selectStatus: any[] = tools.selectStatus[toolsext.getLocale()]
|
||||||
|
public selectPhase: any[] = tools.selectPhase[toolsext.getLocale()]
|
||||||
|
public selectPrivacy: any[] = tools.selectPrivacy[toolsext.getLocale()]
|
||||||
|
public selectGroup: any[] = []
|
||||||
|
|
||||||
|
public $refs: {
|
||||||
|
singleproject: SingleProject[],
|
||||||
|
ctodo: CTodo
|
||||||
|
}
|
||||||
|
|
||||||
|
@Getter('projs_dacompletare', { namespace })
|
||||||
|
public projs_dacompletare: (state: IProjectsState, id_parent: string, tipoproj: string) => IProject[]
|
||||||
|
|
||||||
|
// @Watch('projs_dacompletare')
|
||||||
|
// public changeitems() {
|
||||||
|
// this.updateindexProj()
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Watch('$route.name')
|
||||||
|
public changename() {
|
||||||
|
// console.log('tools.getUrlByTipoProj(this.tipoProj)', tools.getUrlByTipoProj(this.tipoProj))
|
||||||
|
this.changeparent()
|
||||||
|
}
|
||||||
|
|
||||||
|
@Watch('$route.params.idProj')
|
||||||
|
public changeparent() {
|
||||||
|
// console.log('this.$route.params.idProj', this.$route.params)
|
||||||
|
this.idProjAtt = this.$route.params.idProj
|
||||||
|
this.updateindexProj()
|
||||||
|
this.selproj()
|
||||||
|
}
|
||||||
|
|
||||||
|
@Watch('itemselproj.progressCalc')
|
||||||
|
public changeprogress() {
|
||||||
|
this.updateclasses()
|
||||||
|
}
|
||||||
|
|
||||||
|
public keyDownArea(e) {
|
||||||
|
// console.log('keyDownArea')
|
||||||
|
}
|
||||||
|
|
||||||
// I use this because the statustodo will disappear from the UI, so it won't call the status changed...
|
// I use this because the statustodo will disappear from the UI, so it won't call the status changed...
|
||||||
// in this case I need to call manually the modify.
|
// in this case I need to call manually the modify.
|
||||||
public modifyfieldtodo(field) {
|
public modifyfieldtodo(field) {
|
||||||
console.log('modifyfieldtodo', field)
|
// console.log('modifyfieldtodo', field)
|
||||||
Todos.actions.modify({ myitem: this.itemtodosel, field })
|
Todos.actions.modify({ myitem: this.itemtodosel, field })
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -313,17 +325,17 @@ export default class ProjList extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async onEndproj(itemdragend) {
|
public async onEndproj(itemdragend) {
|
||||||
console.log('onEndproj...')
|
// console.log('onEndproj...')
|
||||||
await Projects.actions.swapElems(itemdragend)
|
await Projects.actions.swapElems(itemdragend)
|
||||||
}
|
}
|
||||||
|
|
||||||
public created() {
|
public created() {
|
||||||
const $service = this.$dragula.$service
|
const service = this.$dragula.$service
|
||||||
tools.dragula_option($service, this.dragname)
|
tools.dragula_option(service, this.dragname)
|
||||||
|
|
||||||
this.updateclasses()
|
this.updateclasses()
|
||||||
|
|
||||||
$service.eventBus.$on('dragend', (args) => {
|
service.eventBus.$on('dragend', (args) => {
|
||||||
|
|
||||||
// console.log('args proj-list', args)
|
// console.log('args proj-list', args)
|
||||||
if (args.name === this.dragname) {
|
if (args.name === this.dragname) {
|
||||||
@@ -340,27 +352,16 @@ export default class ProjList extends Vue {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
$service.eventBus.$on('drag', (el, source) => {
|
service.eventBus.$on('drag', (el, source) => {
|
||||||
this.scrollable = false
|
this.scrollable = false
|
||||||
})
|
})
|
||||||
$service.eventBus.$on('drop', (el, source) => {
|
service.eventBus.$on('drop', (el, source) => {
|
||||||
this.scrollable = true
|
this.scrollable = true
|
||||||
})
|
})
|
||||||
|
|
||||||
this.load()
|
this.load()
|
||||||
}
|
}
|
||||||
|
|
||||||
get isHorizontal() {
|
|
||||||
return (Screen.width < 600)
|
|
||||||
}
|
|
||||||
|
|
||||||
get myStyle(){
|
|
||||||
if (this.isHorizontal)
|
|
||||||
return 'height: 600px'
|
|
||||||
else
|
|
||||||
return ''
|
|
||||||
}
|
|
||||||
|
|
||||||
public mounted() {
|
public mounted() {
|
||||||
|
|
||||||
// console.log('Screen.width', Screen.width)
|
// console.log('Screen.width', Screen.width)
|
||||||
@@ -378,12 +379,16 @@ export default class ProjList extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async load() {
|
public async load() {
|
||||||
console.log('LOAD PROJECTS....')
|
// console.log('LOAD PROJECTS....')
|
||||||
if (!!this.$route.params.idProj) {
|
if (!!this.$route.params.idProj) {
|
||||||
this.idProjAtt = this.$route.params.idProj
|
this.idProjAtt = this.$route.params.idProj
|
||||||
this.updateindexProj()
|
this.updateindexProj()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.selectGroup = tools.getGroupList()[toolsext.getLocale()]
|
||||||
|
|
||||||
|
console.log('this.selectGroup', this.selectGroup)
|
||||||
|
|
||||||
// Set last category selected
|
// Set last category selected
|
||||||
// localStorage.setItem(tools.localStorage.categorySel, this.categoryAtt)
|
// localStorage.setItem(tools.localStorage.categorySel, this.categoryAtt)
|
||||||
|
|
||||||
@@ -402,12 +407,12 @@ export default class ProjList extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public mydeleteitemproj(idobj: string) {
|
public mydeleteitemproj(idobj: string) {
|
||||||
console.log('mydeleteitemtodo', idobj)
|
// console.log('mydeleteitemtodo', idobj)
|
||||||
return Projects.actions.deleteItem({ idobj })
|
return Projects.actions.deleteItem({ idobj })
|
||||||
}
|
}
|
||||||
|
|
||||||
public dbInsert() {
|
public dbInsert() {
|
||||||
console.log('dbInsert')
|
// console.log('dbInsert')
|
||||||
const descr = this.projbottom.trim()
|
const descr = this.projbottom.trim()
|
||||||
|
|
||||||
this.projbottom = ''
|
this.projbottom = ''
|
||||||
@@ -416,13 +421,17 @@ export default class ProjList extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async clickMenuProjList(action) {
|
public async clickMenuProjList(action) {
|
||||||
console.log('clickMenuProjList: ', action)
|
// console.log('clickMenuProjList: ', action)
|
||||||
if (action === lists.MenuAction.ADD_PROJECT) {
|
if (action === lists.MenuAction.ADD_PROJECT) {
|
||||||
const idnewelem = await this.addProject('', this.tipoProj)
|
const idnewelem = await this.addProject('test...', this.tipoProj)
|
||||||
|
// console.log('idnewelem', idnewelem)
|
||||||
// get element by id
|
// get element by id
|
||||||
const elem = this.getCompProjectById(idnewelem)
|
const elem = this.getCompProjectById(idnewelem)
|
||||||
|
|
||||||
|
if (!!elem) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
elem.activeEdit()
|
elem.activeEdit()
|
||||||
|
}
|
||||||
// console.log('idnewelem', idnewelem, 'Elem Trovato', elem)
|
// console.log('idnewelem', idnewelem, 'Elem Trovato', elem)
|
||||||
} else if (action === lists.MenuAction.PASTE) {
|
} else if (action === lists.MenuAction.PASTE) {
|
||||||
|
|
||||||
@@ -441,7 +450,7 @@ export default class ProjList extends Vue {
|
|||||||
|
|
||||||
public getCompProjectById(id): SingleProject {
|
public getCompProjectById(id): SingleProject {
|
||||||
if (!!this.$refs.singleproject) {
|
if (!!this.$refs.singleproject) {
|
||||||
console.log('this.$refs.singleproject', this.$refs.singleproject)
|
// console.log('this.$refs.singleproject', this.$refs.singleproject)
|
||||||
for (const elem of this.$refs.singleproject) {
|
for (const elem of this.$refs.singleproject) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
if (elem.itemproject._id === id) {
|
if (elem.itemproject._id === id) {
|
||||||
@@ -449,12 +458,14 @@ export default class ProjList extends Vue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
// const descr = this.$t('project.newproj').toString()
|
// const descr = this.$t('project.newproj').toString()
|
||||||
|
|
||||||
public async addProject(descr, tipoproj: string) {
|
public async addProject(descr, tipoproj: string) {
|
||||||
const projatt = Projects.getters.getRecordById(this.idProjAtt)
|
const projatt = Projects.getters.getRecordById(this.idProjAtt)
|
||||||
|
// console.log('projatt', projatt)
|
||||||
let myobj: IProject = null
|
let myobj: IProject = null
|
||||||
if (this.idProjAtt === process.env.PROJECT_ID_MAIN) {
|
if (this.idProjAtt === process.env.PROJECT_ID_MAIN) {
|
||||||
myobj = {
|
myobj = {
|
||||||
@@ -462,15 +473,21 @@ export default class ProjList extends Vue {
|
|||||||
id_parent: this.idProjAtt,
|
id_parent: this.idProjAtt,
|
||||||
privacyread: tools.getprivacyreadbytipoproj(tipoproj),
|
privacyread: tools.getprivacyreadbytipoproj(tipoproj),
|
||||||
privacywrite: tools.getprivacywritebytipoproj(tipoproj),
|
privacywrite: tools.getprivacywritebytipoproj(tipoproj),
|
||||||
actualphase: projatt.actualphase
|
}
|
||||||
|
|
||||||
|
if (projatt) {
|
||||||
|
myobj.actualphase = projatt.actualphase
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
myobj = {
|
myobj = {
|
||||||
descr,
|
descr,
|
||||||
id_parent: this.idProjAtt,
|
id_parent: this.idProjAtt,
|
||||||
privacyread: projatt.privacyread,
|
}
|
||||||
privacywrite: projatt.privacywrite,
|
|
||||||
actualphase: projatt.actualphase
|
if (projatt) {
|
||||||
|
myobj.actualphase = projatt.actualphase
|
||||||
|
myobj.privacyread = projatt.privacyread
|
||||||
|
myobj.privacywrite = projatt.privacywrite
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -488,11 +505,13 @@ export default class ProjList extends Vue {
|
|||||||
myobj.id_main_project = this.itemproj.id_main_project
|
myobj.id_main_project = this.itemproj.id_main_project
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// console.log('myobj', myobj)
|
||||||
|
|
||||||
if (!tools.checkIfUserExist(this)) {
|
if (!tools.checkIfUserExist(this)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Nuovo PROJ', myobj)
|
// console.log('Nuovo PROJ', myobj)
|
||||||
return await Projects.actions.dbInsert({ myobj, atfirst: false })
|
return await Projects.actions.dbInsert({ myobj, atfirst: false })
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -518,14 +537,20 @@ export default class ProjList extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public checkiftoenable() {
|
public checkiftoenable() {
|
||||||
|
|
||||||
|
if (tools.isMobile()) {
|
||||||
|
|
||||||
if (this.whatisSel === tools.WHAT_NOTHING)
|
if (this.whatisSel === tools.WHAT_NOTHING)
|
||||||
this.splitterModel = 100
|
this.splitterModel = 100
|
||||||
else
|
else
|
||||||
this.splitterModel = 0
|
this.splitterModel = 0
|
||||||
|
} else {
|
||||||
|
this.splitterModel = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public setdeselectrow() {
|
public setdeselectrow() {
|
||||||
console.log('setdeselectrow')
|
// console.log('setdeselectrow')
|
||||||
this.itemtodosel = null
|
this.itemtodosel = null
|
||||||
this.itemselproj = null
|
this.itemselproj = null
|
||||||
this.whatisSel = tools.WHAT_NOTHING
|
this.whatisSel = tools.WHAT_NOTHING
|
||||||
@@ -538,7 +563,7 @@ export default class ProjList extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async updateitemproj({ myitem, field }) {
|
public async updateitemproj({ myitem, field }) {
|
||||||
console.log('calling MODIFY updateitemproj', myitem, field)
|
// console.log('calling MODIFY updateitemproj', myitem, field)
|
||||||
|
|
||||||
await Projects.actions.modify({ myitem, field })
|
await Projects.actions.modify({ myitem, field })
|
||||||
|
|
||||||
@@ -627,6 +652,16 @@ export default class ProjList extends Vue {
|
|||||||
ApiTables.waitAndcheckPendingMsg()
|
ApiTables.waitAndcheckPendingMsg()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private updateindexProj() {
|
||||||
|
// console.log('idProjAtt', this.idProjAtt)
|
||||||
|
this.itemproj = Projects.getters.getRecordById(this.idProjAtt)
|
||||||
|
if (!!this.itemproj) {
|
||||||
|
this.itemprojparent = Projects.getters.getRecordById(this.itemproj.id_parent)
|
||||||
|
// console.log('this.itemproj.descr', this.itemproj.descr)
|
||||||
|
}
|
||||||
|
// console.log('idproj', this.idProjAtt, 'params' , this.$route.params)
|
||||||
|
}
|
||||||
|
|
||||||
private getElementIndex(el: any) {
|
private getElementIndex(el: any) {
|
||||||
return [].slice.call(el.parentElement.children).indexOf(el)
|
return [].slice.call(el.parentElement.children).indexOf(el)
|
||||||
}
|
}
|
||||||
@@ -635,5 +670,19 @@ export default class ProjList extends Vue {
|
|||||||
return parseInt(el.attributes.index.value, 10)
|
return parseInt(el.attributes.index.value, 10)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get iconPriority() {
|
||||||
|
let iconpriority = ''
|
||||||
|
if (this.itemtodosel.priority === tools.Priority.PRIORITY_HIGH) {
|
||||||
|
iconpriority = 'expand_less'
|
||||||
|
} // expand_less
|
||||||
|
else if (this.itemtodosel.priority === tools.Priority.PRIORITY_NORMAL) {
|
||||||
|
iconpriority = 'remove'
|
||||||
|
}
|
||||||
|
else if (this.itemtodosel.priority === tools.Priority.PRIORITY_LOW) {
|
||||||
|
iconpriority = 'expand_more'
|
||||||
|
} // expand_more
|
||||||
|
|
||||||
|
return iconpriority
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<template v-slot:before>
|
<template v-slot:before>
|
||||||
<div>
|
<div>
|
||||||
idProjAtt: {{idProjAtt}}
|
<!-- idProjAtt: {{ idProjAtt }} -->
|
||||||
<div class="divtitlecat clMain">
|
<div class="divtitlecat clMain">
|
||||||
<div class="flex-container clMain">
|
<div class="flex-container clMain">
|
||||||
<q-btn v-if="!!getIdParent && CanISeeProjectParent" size="sm" push color="secondary" round
|
<q-btn v-if="!!getIdParent && CanISeeProjectParent" size="sm" push color="secondary" round
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<div :class="classTitle">{{ descrProject | capitalize }}</div>
|
<div :class="classTitle">{{ descrProject | capitalize }}</div>
|
||||||
|
|
||||||
<div class="flex-item">
|
<div class="flex-item">
|
||||||
<q-btn push
|
<q-btn push
|
||||||
size="sm"
|
size="sm"
|
||||||
@@ -79,6 +80,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="display: none">{{ prior = 0, priorcomplet = false }}</div>
|
<div style="display: none">{{ prior = 0, priorcomplet = false }}</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<!--<q-infinite-scroll :handler="loadMoreTodo" :offset="7">-->
|
<!--<q-infinite-scroll :handler="loadMoreTodo" :offset="7">-->
|
||||||
<div class="container" v-dragula="projs_dacompletare(idProjAtt, tipoProj)" drake="second">
|
<div class="container" v-dragula="projs_dacompletare(idProjAtt, tipoProj)" drake="second">
|
||||||
@@ -100,7 +102,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<q-separator></q-separator>
|
<q-separator></q-separator>
|
||||||
|
|
||||||
<q-input v-model="projbottom"
|
<!--<q-input v-model="projbottom"
|
||||||
style="margin-left: 6px;"
|
style="margin-left: 6px;"
|
||||||
color="blue-12"
|
color="blue-12"
|
||||||
:label="$t('proj.insertbottom')"
|
:label="$t('proj.insertbottom')"
|
||||||
@@ -111,7 +113,7 @@
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
<q-separator></q-separator>
|
<q-separator></q-separator>
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
<!--CanIModifyPanelPrivacy = {{CanIModifyPanelPrivacy}}<br>-->
|
<!--CanIModifyPanelPrivacy = {{CanIModifyPanelPrivacy}}<br>-->
|
||||||
@@ -130,9 +132,23 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-if="(whatisSel === tools.WHAT_PROJECT) && (!!itemselproj.descr)" v-slot:after>
|
<template v-if="(whatisSel === tools.WHAT_PROJECT) && (!!itemselproj.descr)" v-slot:after>
|
||||||
|
|
||||||
<!--ID = {{itemselproj._id}}-->
|
<q-tabs
|
||||||
|
v-model="tabproj"
|
||||||
|
dense
|
||||||
|
class="bg-blue text-white shadow-2"
|
||||||
|
indicator-color="white"
|
||||||
|
align="center"
|
||||||
|
narrow-indicator
|
||||||
|
>
|
||||||
|
<q-tab name="info" icon="fas fa-check" :label="$t('dashboard.info')"></q-tab>
|
||||||
|
<q-tab name="stat" icon="fas fa-chart-line" :label="$t('pages.status')"></q-tab>
|
||||||
|
|
||||||
|
</q-tabs>
|
||||||
|
|
||||||
<div class="q-pa-xs clMain">
|
<div class="q-pa-xs clMain">
|
||||||
|
|
||||||
<div class="flex-container clMain">
|
<div class="flex-container clMain">
|
||||||
|
|
||||||
<!--<q-rating-->
|
<!--<q-rating-->
|
||||||
<!--v-model="itemselproj.favourite"-->
|
<!--v-model="itemselproj.favourite"-->
|
||||||
<!--class="flex-item flex-icon"-->
|
<!--class="flex-item flex-icon"-->
|
||||||
@@ -145,7 +161,12 @@
|
|||||||
<div :class="classTitleProjSel">
|
<div :class="classTitleProjSel">
|
||||||
{{ itemselproj.descr }}
|
{{ itemselproj.descr }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<q-tab-panels v-model="tabproj" animated>
|
||||||
|
<q-tab-panel name="info">
|
||||||
<div class="flex-container clMain">
|
<div class="flex-container clMain">
|
||||||
<q-icon class="flex-item flex-icon" name="border_color"/>
|
<q-icon class="flex-item flex-icon" name="border_color"/>
|
||||||
<div class="flex-item itemdescr">
|
<div class="flex-item itemdescr">
|
||||||
@@ -155,27 +176,58 @@
|
|||||||
:label="$t('proj.longdescr')"
|
:label="$t('proj.longdescr')"
|
||||||
outlined
|
outlined
|
||||||
debounce="1000"
|
debounce="1000"
|
||||||
autogrow>
|
autogrow
|
||||||
|
style="flex: auto">
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</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">
|
||||||
|
<q-input
|
||||||
|
v-model="itemselproj.pos"
|
||||||
|
type="number"
|
||||||
|
rounded outlined
|
||||||
|
debounce="500"
|
||||||
|
style="max-width: 100px;"
|
||||||
|
:label="$t('dashboard.posizione')"></q-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="CanISeeProjectSel" class="flex-container clMain">
|
||||||
|
<q-icon class="flex-item flex-icon" name="group"/>
|
||||||
|
<div class="flex-item itemstatus">
|
||||||
|
<q-select style="min-width: 200px"
|
||||||
|
:readonly="readonly_PanelPrivacySel"
|
||||||
|
rounded outlined v-model="itemselproj.groupId" :options="selectGroup"
|
||||||
|
:label="$t('proj.group')" emit-value map-options>
|
||||||
|
</q-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div v-if="CanISeeProjectSel" class="flex-container clMain">
|
<div v-if="CanISeeProjectSel" class="flex-container clMain">
|
||||||
<q-icon class="flex-item flex-icon" name="lock"/>
|
<q-icon class="flex-item flex-icon" name="lock"/>
|
||||||
<div class="flex-item itemstatus">
|
<div class="flex-item itemstatus">
|
||||||
<q-select :readonly="readonly_PanelPrivacySel"
|
<q-select style="min-width: 200px"
|
||||||
|
:readonly="readonly_PanelPrivacySel"
|
||||||
rounded outlined v-model="itemselproj.privacyread" :options="selectPrivacy"
|
rounded outlined v-model="itemselproj.privacyread" :options="selectPrivacy"
|
||||||
:label="$t('proj.privacyread')" emit-value map-options>
|
:label="$t('proj.privacyread')" emit-value map-options>
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="CanISeeProjectSel" class="flex-container clMain">
|
||||||
<q-icon class="flex-item flex-icon" name="edit"/>
|
<q-icon class="flex-item flex-icon" name="edit"/>
|
||||||
<div class="flex-item itemstatus">
|
<div class="flex-item itemstatus">
|
||||||
<q-select :readonly="readonly_PanelPrivacySel" rounded outlined
|
<q-select style="min-width: 200px" :readonly="readonly_PanelPrivacySel" rounded outlined
|
||||||
v-model="itemselproj.privacywrite" :options="selectPrivacy"
|
v-model="itemselproj.privacywrite" :options="selectPrivacy"
|
||||||
:label="$t('proj.privacywrite')" emit-value map-options>
|
:label="$t('proj.privacywrite')" emit-value map-options>
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</q-tab-panel>
|
||||||
|
<q-tab-panel name="stat">
|
||||||
<div v-if="CanISeeProjectSel">
|
<div v-if="CanISeeProjectSel">
|
||||||
<div class="flex-container clMain">
|
<div class="flex-container clMain">
|
||||||
<q-icon class="flex-item flex-icon" name="work_outline"/>
|
<q-icon class="flex-item flex-icon" name="work_outline"/>
|
||||||
@@ -188,10 +240,12 @@
|
|||||||
rounded outlined
|
rounded outlined
|
||||||
:label="$t('proj.hoursworked')"
|
:label="$t('proj.hoursworked')"
|
||||||
debounce="500"></q-input>
|
debounce="500"></q-input>
|
||||||
<CProgress descr="" :progressval="getCalcHoursWorked"></CProgress>
|
<CProgress descr="Fatte" :progressval="getCalcHoursWorked"></CProgress>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="CanISeeProjectSel" class="flex-item items-center">
|
||||||
<q-icon class="flex-item flex-icon" name="watch_later"/>
|
<q-icon class="flex-item flex-icon" name="watch_later"/>
|
||||||
<div class="flex-item itemdata content-center">
|
<div class="flex-item itemdata content-center q-mx-sm">
|
||||||
<q-input
|
<q-input
|
||||||
ref="input3"
|
ref="input3"
|
||||||
type="number"
|
type="number"
|
||||||
@@ -225,13 +279,17 @@
|
|||||||
<div class="flex-container clMain">
|
<div class="flex-container clMain">
|
||||||
<q-icon class="flex-item flex-icon" name="outlined_flag"/>
|
<q-icon class="flex-item flex-icon" name="outlined_flag"/>
|
||||||
<div class="flex-item itemstatus">
|
<div class="flex-item itemstatus">
|
||||||
<q-select :readonly="readonly_PanelPrivacySel" rounded outlined v-model="itemselproj.actualphase" :options="selectPhase"
|
<q-select style="min-width: 150px" :readonly="readonly_PanelPrivacySel" rounded outlined
|
||||||
|
v-model="itemselproj.actualphase"
|
||||||
|
:options="selectPhase"
|
||||||
:label="$t('proj.actualphase')" emit-value map-options>
|
:label="$t('proj.actualphase')" emit-value map-options>
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
<q-icon class="flex-item flex-icon" name="outlined_flag"/>
|
<q-icon class="flex-item flex-icon" name="outlined_flag"/>
|
||||||
<div class="flex-item itemstatus">
|
<div class="flex-item itemstatus">
|
||||||
<q-select :readonly="readonly_PanelPrivacySel" rounded outlined v-model="itemselproj.totalphases" :options="selectPhase"
|
<q-select style="min-width: 150px"
|
||||||
|
:readonly="readonly_PanelPrivacySel" rounded outlined v-model="itemselproj.totalphases"
|
||||||
|
:options="selectPhase"
|
||||||
:label="$t('proj.totalphases')" emit-value map-options>
|
:label="$t('proj.totalphases')" emit-value map-options>
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
@@ -261,10 +319,36 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</q-tab-panel>
|
||||||
|
</q-tab-panels>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="(whatisSel === tools.WHAT_TODO) && (!!itemtodosel.descr)" v-slot:after>
|
<template v-else-if="(whatisSel === tools.WHAT_TODO) && (!!itemtodosel.descr)" v-slot:after>
|
||||||
|
<q-tabs
|
||||||
|
v-model="tabproj"
|
||||||
|
dense
|
||||||
|
class="bg-blue text-white shadow-2"
|
||||||
|
indicator-color="white"
|
||||||
|
align="center"
|
||||||
|
narrow-indicator
|
||||||
|
>
|
||||||
|
<q-tab name="info" icon="fas fa-check" :label="$t('dashboard.info')"></q-tab>
|
||||||
|
<q-tab name="stat" icon="fas fa-chart-line" :label="$t('pages.status')"></q-tab>
|
||||||
|
|
||||||
|
</q-tabs>
|
||||||
|
|
||||||
<div class="q-pa-xs clMain">
|
<div class="q-pa-xs clMain">
|
||||||
|
|
||||||
|
<div class="flex-container clMain">
|
||||||
|
<q-icon class="flex-item flex-icon" name="format_align_center"/>
|
||||||
|
<div :class="classTitleProjSel">
|
||||||
|
{{ itemtodosel.descr }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<q-tab-panels v-model="tabproj" animated>
|
||||||
|
<q-tab-panel name="info">
|
||||||
<div class="flex-container clMain">
|
<div class="flex-container clMain">
|
||||||
<q-icon class="flex-item flex-icon" name="border_color"/>
|
<q-icon class="flex-item flex-icon" name="border_color"/>
|
||||||
<div class="flex-item itemdescr">
|
<div class="flex-item itemdescr">
|
||||||
@@ -279,9 +363,23 @@
|
|||||||
autogrow>
|
autogrow>
|
||||||
|
|
||||||
</q-input>
|
</q-input>
|
||||||
|
<q-icon size="md" :name="iconPriority" color="primary"/>
|
||||||
</div>
|
</div>
|
||||||
</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">
|
||||||
|
<q-input
|
||||||
|
v-model="itemtodosel.pos"
|
||||||
|
type="number"
|
||||||
|
debounce="500"
|
||||||
|
rounded outlined
|
||||||
|
style="max-width: 100px;"
|
||||||
|
:label="$t('dashboard.posizione')"></q-input>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="flex-container clMain">
|
<div class="flex-container clMain">
|
||||||
<q-icon class="flex-item flex-icon" name="done_outline"/>
|
<q-icon class="flex-item flex-icon" name="done_outline"/>
|
||||||
<div class="flex-item itemstatus">
|
<div class="flex-item itemstatus">
|
||||||
@@ -299,6 +397,8 @@
|
|||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</q-tab-panel>
|
||||||
|
<q-tab-panel name="stat">
|
||||||
<div class="flex-container clMain">
|
<div class="flex-container clMain">
|
||||||
<q-icon class="flex-item flex-icon" name="work_outline"/>
|
<q-icon class="flex-item flex-icon" name="work_outline"/>
|
||||||
<div class="flex-item itemdescr">
|
<div class="flex-item itemdescr">
|
||||||
@@ -314,6 +414,8 @@
|
|||||||
</q-input>
|
</q-input>
|
||||||
<CProgress descr="" :progressval="getCalcTodoHoursWorked"></CProgress>
|
<CProgress descr="" :progressval="getCalcTodoHoursWorked"></CProgress>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex-container clMain">
|
||||||
<q-icon class="flex-item flex-icon" name="watch_later"/>
|
<q-icon class="flex-item flex-icon" name="watch_later"/>
|
||||||
<div class="flex-item itemdata content-center">
|
<div class="flex-item itemdata content-center">
|
||||||
<q-input
|
<q-input
|
||||||
@@ -353,6 +455,10 @@
|
|||||||
</CDate>
|
</CDate>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</q-tab-panel>
|
||||||
|
</q-tab-panels>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</q-splitter>
|
</q-splitter>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user