diff --git a/src/common/shared_vuejs.ts b/src/common/shared_vuejs.ts index 5c722cf..0e4546b 100755 --- a/src/common/shared_vuejs.ts +++ b/src/common/shared_vuejs.ts @@ -42,6 +42,12 @@ export const shared_consts = { REPORT_FILT_RESP: 1, REPORT_FILT_ATTIVITA: 2, + CashType: { + None: 0, + Incoming: 1, + Outcoming: 2, + }, + Permissions: { Admin: { value: 1, diff --git a/src/components/CGeoChart/CGeoChart.ts b/src/components/CGeoChart/CGeoChart.ts index 003a14a..59ca234 100755 --- a/src/components/CGeoChart/CGeoChart.ts +++ b/src/components/CGeoChart/CGeoChart.ts @@ -52,7 +52,7 @@ export default class CGeoChart extends Vue { for (const rec of this.mydata) { alldata = [] - alldata.push(tools.getNationsByNationality(rec._id, true)) + alldata.push(tools.getNationsByNationality(rec._id)) alldata.push(rec.count) this.mydatafixed.push(alldata) diff --git a/src/components/CListNationality/CListNationality.vue b/src/components/CListNationality/CListNationality.vue index 6b48625..f075782 100755 --- a/src/components/CListNationality/CListNationality.vue +++ b/src/components/CListNationality/CListNationality.vue @@ -18,7 +18,7 @@ - {{ tools.getNationsByNationality(nat._id, false) }} + {{ tools.getNationsByNationality(nat._id) }} diff --git a/src/components/CSignUpIscrizioneConacreis/CSignUpIscrizioneConacreis-validate.ts b/src/components/CSignUpIscrizioneConacreis/CSignUpIscrizioneConacreis-validate.ts index aab1fef..612958c 100755 --- a/src/components/CSignUpIscrizioneConacreis/CSignUpIscrizioneConacreis-validate.ts +++ b/src/components/CSignUpIscrizioneConacreis/CSignUpIscrizioneConacreis-validate.ts @@ -37,7 +37,16 @@ export const validations = { dateofbirth: { required }, - cell_phone: { + born_city: { + required + }, + born_province: { + required + }, + born_country: { + required + }, + metodo_pagamento: { required }, terms: { diff --git a/src/components/CSignUpIscrizioneConacreis/CSignUpIscrizioneConacreis.ts b/src/components/CSignUpIscrizioneConacreis/CSignUpIscrizioneConacreis.ts index ce6bee1..1918503 100755 --- a/src/components/CSignUpIscrizioneConacreis/CSignUpIscrizioneConacreis.ts +++ b/src/components/CSignUpIscrizioneConacreis/CSignUpIscrizioneConacreis.ts @@ -39,6 +39,7 @@ export default class CSignUpIscrizioneConacreis extends MixinUsers { public $q public $t: any public countryname: string = '' + public countryborn: string = '' public iamadult: boolean = false public duplicate_email: boolean = false @@ -51,7 +52,7 @@ export default class CSignUpIscrizioneConacreis extends MixinUsers { } public created() { - if (!!this.getMyUsername()) { + if (!!this.getMyUsername() && (!UserStore.state.my.profile.socio)) { this.signup.name = UserStore.state.my.name this.signup.surname = this.mySurname.toString() this.signup.email = this.Email @@ -186,4 +187,11 @@ export default class CSignUpIscrizioneConacreis extends MixinUsers { this.countryname = name } + public selectcountryborn({ name, iso2, dialCode }) { + // console.log(name, iso2, dialCode) + this.signup.born_country = iso2 + this.countryborn = name + } + + } diff --git a/src/components/CSignUpIscrizioneConacreis/CSignUpIscrizioneConacreis.vue b/src/components/CSignUpIscrizioneConacreis/CSignUpIscrizioneConacreis.vue index e4d0408..6e22022 100755 --- a/src/components/CSignUpIscrizioneConacreis/CSignUpIscrizioneConacreis.vue +++ b/src/components/CSignUpIscrizioneConacreis/CSignUpIscrizioneConacreis.vue @@ -6,6 +6,14 @@ + + Leggi + + Il Nostro Progetto + + + + @@ -108,7 +116,7 @@ :error="$v.signup.residency_province.$error" maxlength="3" debounce="1000" - :error-message="errorMsg('residency_address', $v.signup.residency_province)" + :error-message="errorMsg('residency_province', $v.signup.residency_province)" :label="$t('reg.residency_province')"> @@ -133,28 +141,6 @@ - - - - - - - + - - Leggi - - Il Nostro Progetto - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { // console.log('globalroutines', cmd, table, descr, id) return indexdb(context, cmd, table, data, id) .then((ris) => { - console.log('GlobalStore.state.connData', GlobalStore.state.connData) + // console.log('GlobalStore.state.connData', GlobalStore.state.connData) setTimeout(() => { GlobalStore.state.connData.uploading_indexeddb = 0 diff --git a/src/model/Calendar.ts b/src/model/Calendar.ts index 8b1c129..2b69685 100755 --- a/src/model/Calendar.ts +++ b/src/model/Calendar.ts @@ -32,6 +32,7 @@ export interface IEvents { lunchPrice?: number dinnerPrice?: number internal?: boolean + note?: string news?: boolean canceled?: boolean deleted?: boolean diff --git a/src/model/signup-option.ts b/src/model/signup-option.ts index e66ad56..0635eae 100755 --- a/src/model/signup-option.ts +++ b/src/model/signup-option.ts @@ -26,10 +26,17 @@ export interface ISignupIscrizioneConacreisOptions { residency_country?: string residency_zipcode?: string dateofbirth?: Date + dateofreg?: Date + dateofapproved?: Date + born_city?: string + born_province?: string + born_country?: string cell_phone?: string newsletter_on?: boolean accetta_carta_costituzionale_on?: boolean + metodo_pagamento?: number iscrizione_compilata?: boolean + codiceConacreis?: string annoTesseramento?: number motivazioni?: string competenze_professionalita?: string diff --git a/src/rootgen/admin/eventlist/eventlist.ts b/src/rootgen/admin/eventlist/eventlist.ts index 7d04d87..b7c94a6 100755 --- a/src/rootgen/admin/eventlist/eventlist.ts +++ b/src/rootgen/admin/eventlist/eventlist.ts @@ -10,6 +10,7 @@ import { Getter } from 'vuex-class' import { lists } from '@src/store/Modules/lists' import MixinUsers from '@src/mixins/mixin-users' import MixinOperator from '@src/mixins/mixin-operator' +import MixinEvents from '@src/mixins/mixin-events' const namespace = 'CalendarModule' @@ -18,10 +19,11 @@ const namespace = 'CalendarModule' name: 'EventList', components: { CTitle, CMyPage } }) -export default class Eventlist extends Vue { +export default class Eventlist extends MixinEvents { public $t: any public $q public showpeople: boolean = false + public shownote: boolean = false public eventsel: IEvents = null public showPrev = false public numrec = 0 @@ -154,4 +156,8 @@ export default class Eventlist extends Vue { this.getNumEvent() } + public change_rec(eventparam) { + this.UpdateDbByFields(this, eventparam) + } + } diff --git a/src/rootgen/admin/eventlist/eventlist.vue b/src/rootgen/admin/eventlist/eventlist.vue index 7047326..e741d71 100755 --- a/src/rootgen/admin/eventlist/eventlist.vue +++ b/src/rootgen/admin/eventlist/eventlist.vue @@ -63,16 +63,46 @@ - + > + + + + + + + Note: {{ eventsel.title }} + + + + + + + + + + diff --git a/src/rootgen/admin/iscritticonacreis/iscritticonacreis.ts b/src/rootgen/admin/iscritticonacreis/iscritticonacreis.ts index aa4bd2c..7e1e884 100755 --- a/src/rootgen/admin/iscritticonacreis/iscritticonacreis.ts +++ b/src/rootgen/admin/iscritticonacreis/iscritticonacreis.ts @@ -9,6 +9,9 @@ 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' +import { IParamsQuery, ISignupIscrizioneConacreisOptions } from '@src/model' +import { GlobalStore, UserStore } from '@store' +import { ISignupConacreis } from '@src/components/CSignUpIscrizioneConacreis/CSignUpIscrizioneConacreis-validate' @Component({ mixins: [MixinBase], @@ -37,4 +40,71 @@ export default class SitesPage extends MixinMetaTags { get static_data() { return static_data } + + public loadrec(): ISignupIscrizioneConacreisOptions[] { + const sortBy = 'numshared' + const descending = 1 + const myobj = {} + if (descending) + myobj[sortBy] = -1 + else + myobj[sortBy] = 1 + + const params: IParamsQuery = { + table: 'iscritticonacreis', + startRow: 0, + endRow: 10000, + filter: '', + filterand: '', + sortBy: myobj, + descending, + userId: UserStore.state.my._id + } + + console.log('myload', params) + + return GlobalStore.actions.loadTable(params).then((data) => { + return data.rows + }) + } + + public async exportLista() { + + const myrec = await this.loadrec() + + const sep = ';' + + let mystr = '' + + mystr += 'anno' + sep + 'Num' + sep + 'Conacreis' + sep + 'data_richiesta_iscrizione' + sep + 'data_approvazione_iscrizione' + sep + 'nome' + sep + 'cognome' + sep + 'codice_fiscale' + sep + 'nazione' + sep + 'indirizzo' + sep + 'localita' + sep + 'Prov' + sep + 'cap' + sep + 'data_nascita' + sep + 'nazione_nascita' + sep + 'luogo_nascita' + sep + 'provincia_nascita' + sep + 'email' + sep + 'telefono' + sep + 'quota_versata' + '\n'; + let index = 1 + for (const rec of myrec) { + mystr += rec.annoTesseramento + sep + mystr += index + sep + mystr += rec.codiceConacreis + sep + mystr += tools.getstrDate(rec.dateofreg) + sep + mystr += tools.getstrDate(rec.dateofapproved) + sep + mystr += rec.name + sep + mystr += rec.surname + sep + mystr += rec.fiscalcode + sep + mystr += tools.getNationsByNationality(rec.residency_country) + sep + mystr += rec.residency_address + sep + mystr += rec.residency_city + sep + mystr += rec.residency_province + sep + mystr += rec.residency_zipcode + sep + mystr += tools.getstrDate(rec.dateofbirth) + sep + mystr += tools.getNationsByNationality(rec.born_country) + sep + mystr += rec.born_city + sep + mystr += rec.born_province + sep + mystr += rec.email + sep + mystr += rec.cell_phone + sep + // mystr += 'si' + sep + // mystr += 'si' + sep + mystr += '\n' + index++ + } + + tools.copyStringToClipboard(this, mystr, false) + } + } diff --git a/src/rootgen/admin/iscritticonacreis/iscritticonacreis.vue b/src/rootgen/admin/iscritticonacreis/iscritticonacreis.vue index 0e7bf32..655f53d 100755 --- a/src/rootgen/admin/iscritticonacreis/iscritticonacreis.vue +++ b/src/rootgen/admin/iscritticonacreis/iscritticonacreis.vue @@ -9,7 +9,19 @@ - + + + + { // console.log('____________________________ res', res) if (res.status === 200) { diff --git a/src/store/Modules/Projects.ts b/src/store/Modules/Projects.ts index d779221..b78b75d 100755 --- a/src/store/Modules/Projects.ts +++ b/src/store/Modules/Projects.ts @@ -93,6 +93,8 @@ function getproj(projects, idproj, tipoproj: string) { ris = projects.filter((proj) => (proj.id_parent === idproj) && (proj.userId === UserStore.state.my._id) && (proj.privacyread !== Privacy.onlyme)) else if (tipoproj === RouteNames.projectsall) ris = projects.filter((proj) => (proj.id_parent === idproj) && (proj.userId !== UserStore.state.my._id)) + else + ris = projects.filter((proj) => (proj.id_parent === idproj)) if (ris) ris = ris.sort((a, b) => a.pos - b.pos) diff --git a/src/store/Modules/Store/calendar/CalendarStore.ts b/src/store/Modules/Store/calendar/CalendarStore.ts index e5cd476..1ba1b8b 100755 --- a/src/store/Modules/Store/calendar/CalendarStore.ts +++ b/src/store/Modules/Store/calendar/CalendarStore.ts @@ -55,7 +55,7 @@ namespace Getters { }, 'findEventBooked') const getNumParticipants = b.read((mystate: ICalendarState) => (myevent: IEvents, showall, tipo = 0): number => { - const myarr = mystate.bookedevent.filter((bookedevent) => (bookedevent.id_bookedevent === myevent._id) && (bookedevent.booked) && (showall || (!showall && bookedevent.userId === UserStore.state.my._id) ) && ( ((tipo === tools.peopleWhere.participants) && bookedevent.numpeople) || ((tipo === tools.peopleWhere.lunch && bookedevent.numpeopleLunch) || (tipo === tools.peopleWhere.dinner && bookedevent.numpeopleDinner) || (tipo === tools.peopleWhere.dinnerShared && bookedevent.numpeopleDinnerShared) ))) + const myarr = mystate.bookedevent.filter((bookedevent) => (bookedevent.id_bookedevent === myevent._id) && (bookedevent.booked) && (showall || (!showall && bookedevent.userId === UserStore.state.my._id) ) && ( ((tipo === tools.peopleWhere.participants) && bookedevent.numpeople > 0) || ((tipo === tools.peopleWhere.lunch && bookedevent.numpeopleLunch > 0) || (tipo === tools.peopleWhere.dinner && bookedevent.numpeopleDinner > 0) || (tipo === tools.peopleWhere.dinnerShared && bookedevent.numpeopleDinnerShared > 0) ))) if (myarr.length > 0) { let ris = null if (tipo === tools.peopleWhere.participants) { diff --git a/src/store/Modules/fieldsTable.ts b/src/store/Modules/fieldsTable.ts index 5e785b8..17a61f7 100755 --- a/src/store/Modules/fieldsTable.ts +++ b/src/store/Modules/fieldsTable.ts @@ -290,19 +290,34 @@ export const colTableIscrittiConacreis = [ AddCol({ name: 'residency_country', label_trans: 'reg.residency_country', fieldtype: tools.FieldType.string }), AddCol({ name: 'residency_zipcode', label_trans: 'reg.residency_zipcode', fieldtype: tools.FieldType.string }), AddCol({ name: 'dateofbirth', label_trans: 'reg.dateofbirth', fieldtype: tools.FieldType.onlydate }), + AddCol({ name: 'born_city', label_trans: 'reg.born_city', fieldtype: tools.FieldType.string }), + AddCol({ name: 'born_province', label_trans: 'reg.born_province', fieldtype: tools.FieldType.string }), + AddCol({ name: 'born_country', label_trans: 'reg.born_country', fieldtype: tools.FieldType.string }), AddCol({ name: 'cell_phone', label_trans: 'reg.cell_phone', fieldtype: tools.FieldType.string }), AddCol({ name: 'newsletter_on', label_trans: 'reg.newsletter_on', fieldtype: tools.FieldType.boolean }), AddCol({ name: 'iscrizione_compilata', label_trans: 'reg.iscrizione_compilata', fieldtype: tools.FieldType.boolean }), + AddCol({ name: 'metodo_pagamento', label_trans: 'reg.metodo_pagamento', fieldtype: tools.FieldType.number }), AddCol({ name: 'dateofreg', label_trans: 'reg.dateofreg', fieldtype: tools.FieldType.onlydate }), + AddCol({ name: 'dateofapproved', label_trans: 'reg.dateofapproved', fieldtype: tools.FieldType.onlydate }), AddCol({ name: 'codiceConacreis', label_trans: 'reg.codiceConacreis', fieldtype: tools.FieldType.string }), AddCol({ name: 'annoTesseramento', label_trans: 'reg.annoTesseramento', fieldtype: tools.FieldType.number }), AddCol({ name: 'motivazioni', label_trans: 'reg.motivazioni', fieldtype: tools.FieldType.string }), - AddCol({ name: 'competenze_professionalita', label_trans: 'reg.competenze_professionalita', fieldtype: tools.FieldType.string }), + AddCol({ + name: 'competenze_professionalita', + label_trans: 'reg.competenze_professionalita', + fieldtype: tools.FieldType.string + }), AddCol({ name: 'cosa_potrei_offrire', label_trans: 'reg.cosa_potrei_offrire', fieldtype: tools.FieldType.string }), AddCol({ name: 'cosa_vorrei_ricevere', label_trans: 'reg.cosa_vorrei_ricevere', fieldtype: tools.FieldType.string }), AddCol({ name: 'altre_comunicazioni', label_trans: 'reg.altre_comunicazioni', fieldtype: tools.FieldType.string }), - AddCol({ name: 'come_ci_hai_conosciuto', label_trans: 'reg.come_ci_hai_conosciuto', fieldtype: tools.FieldType.string }), - AddCol({ name: 'note', label_trans: 'reg.note', fieldtype: tools.FieldType.string }) + AddCol({ + name: 'come_ci_hai_conosciuto', + label_trans: 'reg.come_ci_hai_conosciuto', + fieldtype: tools.FieldType.string + }), + AddCol({ name: 'note', label_trans: 'reg.note', fieldtype: tools.FieldType.string }), + AddCol(DeleteRec), + AddCol(DuplicateRec) ] export const colTableProducts = [ @@ -543,6 +558,7 @@ const colTableEvents = [ AddCol({ name: 'infoextra', label_trans: 'event.infoextra' }), AddCol({ name: 'linkpage', label_trans: 'event.linkpage' }), AddCol({ name: 'linkpdf', label_trans: 'event.linkpdf' }), + AddCol({ name: 'note', label_trans: 'event.note' }), AddCol({ name: 'nobookable', label_trans: 'event.nobookable', fieldtype: tools.FieldType.boolean }), AddCol({ name: 'internal', label_trans: 'event.internal', fieldtype: tools.FieldType.boolean }), AddCol({ name: 'news', label_trans: 'event.news', fieldtype: tools.FieldType.boolean }), @@ -994,13 +1010,37 @@ export const fieldsTable = { label_trans: 'reg.consiglio', fieldtype: tools.FieldType.boolean }), - AddCol({ name: 'profile.chisei', field: 'profile', subfield: 'chisei', label_trans: 'reg.chisei' }), AddCol({ name: 'profile.motivazioni', field: 'profile', subfield: 'motivazioni', label_trans: 'reg.motivazioni' }), - AddCol({ name: 'profile.competenze_professionalita', field: 'profile', subfield: 'competenze_professionalita', label_trans: 'reg.competenze_professionalita' }), - AddCol({ name: 'profile.cosa_offrire', field: 'profile', subfield: 'cosa_offrire', label_trans: 'reg.cosa_offrire' }), - AddCol({ name: 'profile.cosa_ricevere', field: 'profile', subfield: 'cosa_ricevere', label_trans: 'reg.cosa_ricevere' }), - AddCol({ name: 'profile.altre_comunicazioni', field: 'profile', subfield: 'altre_comunicazioni', label_trans: 'reg.altre_comunicazioni' }), - AddCol({ name: 'profile.come_ci_hai_conosciuto', field: 'profile', subfield: 'come_ci_hai_conosciuto', label_trans: 'reg.come_ci_hai_conosciuto' }), + AddCol({ + name: 'profile.competenze_professionalita', + field: 'profile', + subfield: 'competenze_professionalita', + label_trans: 'reg.competenze_professionalita' + }), + AddCol({ + name: 'profile.cosa_offrire', + field: 'profile', + subfield: 'cosa_offrire', + label_trans: 'reg.cosa_offrire' + }), + AddCol({ + name: 'profile.cosa_ricevere', + field: 'profile', + subfield: 'cosa_ricevere', + label_trans: 'reg.cosa_ricevere' + }), + AddCol({ + name: 'profile.altre_comunicazioni', + field: 'profile', + subfield: 'altre_comunicazioni', + label_trans: 'reg.altre_comunicazioni' + }), + AddCol({ + name: 'profile.come_ci_hai_conosciuto', + field: 'profile', + subfield: 'come_ci_hai_conosciuto', + label_trans: 'reg.come_ci_hai_conosciuto' + }), AddCol({ name: 'profile.come_aiutare', field: 'profile', @@ -1059,6 +1099,20 @@ export const fieldsTable = { AddCol(DuplicateRec) ], + colTableCash: + [], + + colTableCashCategory: [ + AddCol({ name: 'descr', label_trans: 'pages.description' }), + AddCol({ name: 'notes', label_trans: 'reg.note' }) + ], + + colTableSubCashCategory: [ + AddCol({ name: 'idCashCategory', label_trans: 'Category.idCashCategory', fieldtype: tools.FieldType.select, jointable: 'cashcategory' }), + AddCol({ name: 'descr', label_trans: 'pages.description' }), + AddCol({ name: 'notes', label_trans: 'reg.note' }) + ], + tablesList: [ { value: 'operators', diff --git a/src/store/Modules/tools.ts b/src/store/Modules/tools.ts index 256388b..6dddaa8 100755 --- a/src/store/Modules/tools.ts +++ b/src/store/Modules/tools.ts @@ -303,6 +303,29 @@ export const tools = { }, ], + SelectMetodiPagamento: [ + { + id: 0, + label: '[Nessuno]', + value: 0 + }, + { + id: 1, + label: 'Bonifico Bancario', + value: 1 + }, + { + id: 2, + label: 'Paypal', + value: 2 + }, + { + id: 3, + label: 'In Contanti alla CNM', + value: 3 + }, + ], + SelectListNumPeople: [ { id: 0, @@ -333,7 +356,32 @@ export const tools = { id: 5, label: '5', value: 5 - } + }, + { + id: 6, + label: '6', + value: 6 + }, + { + id: 7, + label: '7', + value: 7 + }, + { + id: 8, + label: '8', + value: 8 + }, + { + id: 9, + label: '9', + value: 9 + }, + { + id: 10, + label: '10', + value: 10 + }, ] , @@ -2560,20 +2608,17 @@ export const tools = { return date.formatDate(mytimestamp, 'DD/MM/YYYY') + ' ' + mythis.$t('cal.starttime') + ' ' + date.formatDate(mytimestamp, 'HH:mm') else return '' - } - , + }, getstrMMMDate(mytimestamp) { // console.log('getstrDate', mytimestamp) if (!!mytimestamp) return date.formatDate(mytimestamp, 'DD MMM YYYY') else return '' - } - , + }, getstrYYMMDDDate(mytimestamp) { return date.formatDate(mytimestamp, 'YYYY-MM-DD') - } - , + }, getstrYYMMDDDateTime(mytimestamp) { return date.formatDate(mytimestamp, 'YYYY-MM-DD HH:mm') }, @@ -2609,8 +2654,7 @@ export const tools = { } // console.log('mystrdate', mystrdate, strdate, mydate) return mydate - } - , + }, capitalize(value) { if (!value) { @@ -2618,8 +2662,7 @@ export const tools = { } value = value.toString() return value.charAt(0).toUpperCase() + value.slice(1) - } - , + }, firstchars(value, numchars = 200) { if (!value) { @@ -2693,12 +2736,10 @@ export const tools = { }, getDateNull() { return new Date(0) - } - , + }, getTimeNow() { return new Date().getTime() - } - , + }, getTimestampsNow() { return new Date().valueOf() }, @@ -2709,8 +2750,7 @@ export const tools = { isMainProject(idproj) { return idproj === process.env.PROJECT_ID_MAIN - } - , + }, getUrlByTipoProj(tipoproj, name ?: string) { if (!!name) @@ -3857,7 +3897,12 @@ export const tools = { return '' + text + '' }, - getNationsByNationality(nat, code) { + getNationsByNationality(nat) { + if (!nat) + return '' + + nat = nat.toUpperCase() + if (nat === 'IT') { return 'Italy' } else if (nat === 'SI') { diff --git a/src/views/projects/proj-list/proj-list.ts b/src/views/projects/proj-list/proj-list.ts index 91e841f..b008374 100755 --- a/src/views/projects/proj-list/proj-list.ts +++ b/src/views/projects/proj-list/proj-list.ts @@ -55,6 +55,9 @@ const namespaceGS: string = 'GlobalState' export default class ProjList extends Vue { public tabproj: string = 'lista' + public shownewsubproj: boolean = false + + public newSubProj: string = '' get TipoVisu() { return TipoVisu @@ -361,7 +364,7 @@ export default class ProjList extends Vue { } else if (cmd === 'stat') { this.tabproj = 'stat' } else if (cmd === 'nuovo') { - this.clickMenuProjList(lists.MenuAction.ADD_PROJECT) + } GlobalStore.state.clickcmd = '' @@ -369,6 +372,16 @@ export default class ProjList extends Vue { } + public async insertSubProj() { + console.log('insertSubProj', this.newSubProj) + + const idnewelem = await this.addProject(this.newSubProj, this.gettipoProj) + this.newSubProj = '' + + this.shownewsubproj = false + + } + // @Watch('projs_dacompletare') // public changeitems() { // this.updateindexProj() @@ -413,7 +426,6 @@ export default class ProjList extends Vue { this.updateclasses() } - @Watch('itemselproj._id') public changeidproj() { this.aggiornastat() @@ -609,15 +621,7 @@ export default class ProjList extends Vue { public async clickMenuProjList(action) { console.log('clickMenuProjList: ', action) if (action === lists.MenuAction.ADD_PROJECT) { - const idnewelem = await this.addProject('inserisci qui...', this.gettipoProj) - // console.log('idnewelem', idnewelem) - // get element by id - const elem = this.getCompProjectById(idnewelem) - - if (!!elem) { - // @ts-ignore - elem.activeEdit() - } + this.shownewsubproj = true // console.log('idnewelem', idnewelem, 'Elem Trovato', elem) } else if (action === lists.MenuAction.SHOW_POSIZ) { @@ -877,6 +881,12 @@ export default class ProjList extends Vue { ApiTables.waitAndRefreshData() } + public getCreatedBy(item) { + + console.log('item.userid', item.userid) + return UserStore.getters.getNameSurnameByUserId(item.userid) + } + private updateindexProj() { // console.log('idProjAtt', this.idProjAtt) this.itemproj = Projects.getters.getRecordById(this.idProjAtt) @@ -1006,4 +1016,5 @@ export default class ProjList extends Vue { } + } diff --git a/src/views/projects/proj-list/proj-list.vue b/src/views/projects/proj-list/proj-list.vue index fd80bff..ce87097 100755 --- a/src/views/projects/proj-list/proj-list.vue +++ b/src/views/projects/proj-list/proj-list.vue @@ -1,6 +1,34 @@ + + + + + + Nuovo + + + + + + + + + + + + + + + + + + @@ -175,7 +203,6 @@ - @@ -260,6 +287,13 @@ + + + + + {{ $t('proj.createdby') }} {{ getCreatedBy(itemselproj) }} + +
+ Leggi + + Il Nostro Progetto + +
- Leggi - - Il Nostro Progetto - -