diff --git a/src/common/shared_vuejs.ts b/src/common/shared_vuejs.ts index f54dfda4..2414c605 100755 --- a/src/common/shared_vuejs.ts +++ b/src/common/shared_vuejs.ts @@ -108,7 +108,7 @@ export const shared_consts = { TABLES_UPDATE_LASTIFIED: ['myskills', 'mybachecas', 'mygoods', 'mybots'], TABLES_FINDER: ['myskills', 'mybachecas', 'mygoods', 'mygroups'], TABLES_VISU_CMYSRECCARD: ['myskills', 'mybachecas', 'mygoods', 'mygroups'], - TABLES_SHOW_ADTYPE: ['myskills', 'mybachecas', 'mygoods'], + TABLES_SHOW_ADTYPE: ['myskills', 'mygoods'], TABLES_PERM_CHANGE_FOR_USERS: ['myskills', 'mybachecas', 'mygoods'], TABLES_VISU_LISTA_USER: ['myskills', 'mybachecas', 'mygoods', 'users'], diff --git a/src/components/CFinder/CFinder.ts b/src/components/CFinder/CFinder.ts index 57bfaad7..20ae7e0a 100755 --- a/src/components/CFinder/CFinder.ts +++ b/src/components/CFinder/CFinder.ts @@ -28,6 +28,11 @@ export default defineComponent({ type: Boolean, required: false, default: true, + }, + ind: { + type: Number, + required: false, + default: -1, } }, components: { @@ -54,6 +59,8 @@ export default defineComponent({ const col_footer = ref('idCity') const col_tabfooter = ref('mycities') + const strextra = ref('') + const col = ref({}) @@ -97,7 +104,7 @@ export default defineComponent({ const mypagination = computed(() => { if (props.table === toolsext.TABMYBACHECAS) - return { sortBy: 'dateStart', descending: false, page: 1, rowsNumber: 20, rowsPerPage: 20 } + return { sortBy: 'dateTimeStart', descending: false, page: 1, rowsNumber: 20, rowsPerPage: 20 } return { sortBy: 'date_created', descending: true, page: 1, rowsNumber: 20, rowsPerPage: 20 } }) @@ -170,6 +177,10 @@ export default defineComponent({ let obj = tools.getParamsByTable(props.table) + if (props.ind >= 0) { + strextra.value = costanti.MAINCARDS[props.ind].strsingolo! + } + col.value = fieldsTable.getArrColsByTable(props.table) prop_colkey.value = obj.prop_colkey @@ -434,22 +445,11 @@ export default defineComponent({ // param1: shared_consts.PARAM_SHOW_PROVINCE, tablesel: 'cities', }, - { - label: 'Offro/Cerco', - table: 'adtypes', - key: 'adType', - value: tools.getCookie(tools.COOK_SEARCH + 'adtypes', costanti.FILTER_TUTTI), - arrvalue: [], - addall: true, - type: costanti.FieldType.select, - filter: null, - useinput: false, - }, { label: 'Data Inizio', table: 'caldate', key: 'dateTimeStart', - value: tools.getCookie(tools.COOK_SEARCH + 'datetimestart', costanti.FILTER_TUTTI), + value: 2, arrvalue: [], type: costanti.FieldType.select, addall: true, @@ -1026,6 +1026,7 @@ export default defineComponent({ showType, visuType, hint, + strextra, } }, }) diff --git a/src/components/CFinder/CFinder.vue b/src/components/CFinder/CFinder.vue index 154517ab..d298809b 100755 --- a/src/components/CFinder/CFinder.vue +++ b/src/components/CFinder/CFinder.vue @@ -10,8 +10,8 @@ glossy toggle-color="primary" :options="[ - {label: 'Tutti', value: tools.FILTER_ALL}, - {label: 'Personali', value: tools.FILTER_MYREC}, + {label: '🌎 Tutti', value: tools.FILTER_ALL}, + {label: '👤 Personali', value: tools.FILTER_MYREC}, // {label: 'Seguo', value: tools.FILTER_MYFOLLOW}, ]" /> @@ -43,6 +43,7 @@ :nodataLabel="noMsgRecord" :prop_search="true" :finder="true" + :labelBtnAddExtra="`Aggiungi ${strextra}`" :choose_visutype="visuType" :butt_modif_new="true" noresultLabel="Il filtro selezionato non ha trovato nessun risultato" diff --git a/src/components/CGridTableRec/CGridTableRec.ts b/src/components/CGridTableRec/CGridTableRec.ts index 7eade28a..b9cc3df6 100755 --- a/src/components/CGridTableRec/CGridTableRec.ts +++ b/src/components/CGridTableRec/CGridTableRec.ts @@ -121,6 +121,11 @@ export default defineComponent({ required: false, default: 'Aggiungi', }, + labelBtnAddExtra: { + type: String, + required: false, + default: 'Aggiungi', + }, noresultLabel: { type: String, required: false, diff --git a/src/components/CGridTableRec/CGridTableRec.vue b/src/components/CGridTableRec/CGridTableRec.vue index e76dcde6..8571cb28 100755 --- a/src/components/CGridTableRec/CGridTableRec.vue +++ b/src/components/CGridTableRec/CGridTableRec.vue @@ -22,12 +22,11 @@ - diff --git a/src/components/CMyRecCard/CMyRecCard.vue b/src/components/CMyRecCard/CMyRecCard.vue index a887be10..bf9ac615 100755 --- a/src/components/CMyRecCard/CMyRecCard.vue +++ b/src/components/CMyRecCard/CMyRecCard.vue @@ -6,7 +6,7 @@ - + {{ fieldsTable.getValByTabAndId(table, 'adType', myrec.adType) }} @@ -18,7 +18,7 @@ - + {{ fieldsTable.getValByTabAndId(table, 'adType', myrec.adType) }} diff --git a/src/components/CPresentazione/CPresentazione.ts b/src/components/CPresentazione/CPresentazione.ts index c8a0e1fd..d21a422f 100755 --- a/src/components/CPresentazione/CPresentazione.ts +++ b/src/components/CPresentazione/CPresentazione.ts @@ -4,7 +4,7 @@ import { useRouter } from 'vue-router' import { useGlobalStore } from '@store/globalStore' import { useI18n } from '@/boot/i18n' import { tools } from '@store/Modules/tools' -import { Footer, Logo } from "@components" +import { Footer, Logo } from '@components' export default defineComponent({ diff --git a/src/components/CTitlePage/CTitlePage.ts b/src/components/CTitlePage/CTitlePage.ts index 43e35f0d..617e076b 100755 --- a/src/components/CTitlePage/CTitlePage.ts +++ b/src/components/CTitlePage/CTitlePage.ts @@ -1,5 +1,6 @@ import { computed, defineComponent, onMounted, PropType, ref } from 'vue' import { costanti } from '@costanti' +import { tools } from '@store/Modules/tools' export default defineComponent({ name: 'CTitlePage', @@ -36,7 +37,7 @@ export default defineComponent({ } else { mytitle.value = costanti.MAINCARDS[props.ind].title myicon.value = costanti.MAINCARDS[props.ind].icon - mycolor.value = costanti.MAINCARDS[props.ind].color + mycolor.value = tools.colourNameToHex(costanti.MAINCARDS[props.ind].color) } } diff --git a/src/root/eventi/eventi.vue b/src/root/eventi/eventi.vue index e3982da8..24d9450c 100755 --- a/src/root/eventi/eventi.vue +++ b/src/root/eventi/eventi.vue @@ -7,6 +7,7 @@ diff --git a/src/root/goods/goods.vue b/src/root/goods/goods.vue index 54230f1e..dfa09e57 100755 --- a/src/root/goods/goods.vue +++ b/src/root/goods/goods.vue @@ -7,6 +7,7 @@ diff --git a/src/root/services/services.vue b/src/root/services/services.vue index 843d9e8d..730aa468 100755 --- a/src/root/services/services.vue +++ b/src/root/services/services.vue @@ -7,6 +7,7 @@
diff --git a/src/store/Modules/costanti.ts b/src/store/Modules/costanti.ts index 43960472..7f2ecc89 100755 --- a/src/store/Modules/costanti.ts +++ b/src/store/Modules/costanti.ts @@ -1,5 +1,6 @@ export interface IMainCard { visible: boolean + strsingolo?: string title: string to?: string icon?: string @@ -33,6 +34,7 @@ export const costanti = { { visible: true, title: ' Beni ', + strsingolo: 'Bene', to: '/goods', icon: 'fas fa-tshirt', color: 'indigo-6', @@ -43,6 +45,7 @@ export const costanti = { }, { visible: true, + strsingolo: 'Servizio', title: 'Servizi', to: '/services', icon: 'fas fa-house-user', @@ -55,6 +58,7 @@ export const costanti = { { visible: true, title: 'Mobilità', + strsingolo: 'Mobilità', to: '/places', icon: 'fas fa-taxi', color: 'lime-6', @@ -66,6 +70,7 @@ export const costanti = { { visible: true, title: 'Scuola', + strsingolo: 'Scuola', to: '/school', icon: 'fas fa-book-open', color: 'orange-6', @@ -76,6 +81,7 @@ export const costanti = { { visible: true, title: 'Eventi', + strsingolo: 'Evento', to: '/events', icon: 'event', color: 'green-6', @@ -87,6 +93,7 @@ export const costanti = { }, { visible: true, + strsingolo: 'Luogo', title: 'Luoghi', to: '/places', icon: 'fas fa-map-marker-alt', @@ -97,6 +104,7 @@ export const costanti = { }, { visible: true, + strsingolo: 'Idea', title: 'Tue Idee', to: '/ideas', icon: 'fas fa-lightbulb', diff --git a/src/store/Modules/fieldsTable.ts b/src/store/Modules/fieldsTable.ts index 784bd28c..7fd333ea 100755 --- a/src/store/Modules/fieldsTable.ts +++ b/src/store/Modules/fieldsTable.ts @@ -982,17 +982,6 @@ export const colmyBachecas = [ sortable: false, required: true, }), - AddCol({ - name: 'adType', - label_trans: 'adTypes.name', - fieldtype: costanti.FieldType.select, - required: true, - jointable: 'adtypes', - showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit, - icon: 'fas fa-bullhorn', - noshowlabel: true, - sortable: false, - }), AddCol( { name: 'dateTimeStart', diff --git a/src/store/globalStore.ts b/src/store/globalStore.ts index 89d1e2ab..1135d6d0 100644 --- a/src/store/globalStore.ts +++ b/src/store/globalStore.ts @@ -1479,9 +1479,9 @@ export const useGlobalStore = defineStore('GlobalStore', { }, - getItemDate(num: number, day: number, mystr: string) { + getItemDate(num: number, day: number, numdays: number, mystr: string) { let mydate = tools.addDays(tools.getDateNow(), day) - let mydateend = tools.addDays(mydate, 7) + let mydateend = tools.addDays(mydate, numdays) mydate = tools.getstrYYMMDDDate(mydate) mydateend = tools.getstrYYMMDDDate(mydateend) let filter = { dateTimeStart: { $gte: mydate, $lte: mydateend } } @@ -1495,9 +1495,9 @@ export const useGlobalStore = defineStore('GlobalStore', { let obj = {} - arr.push(this.getItemDate(1, -7, 'Settimana Scorsa')) - arr.push(this.getItemDate(2, 0, 'Da Oggi a 7 gg.')) - arr.push(this.getItemDate(3, 7, 'La settimana prossima')) + arr.push(this.getItemDate(1, -30, 30, 'Eventi Passati')) + arr.push(this.getItemDate(2, 0, 14, 'Da Oggi a 2 sett.')) + arr.push(this.getItemDate(3, 14, 60, 'Eventi Futuri')) // console.log('Days', arr)