new version Visualizzazione Service

This commit is contained in:
Surya Paolo
2023-04-04 15:27:03 +02:00
parent 0365c58326
commit edcd244397
35 changed files with 841 additions and 55 deletions

View File

@@ -3177,6 +3177,17 @@ export const tools = {
return ''
},
getstrDateMonthTimeLong(mytimestamp: Date | number | string | undefined) {
// console.log('getstrDate', mytimestamp)
if (mytimestamp) return date.formatDate(mytimestamp, 'DD MMM YY - HH:mm')
return ''
},
getstrDateMonthLong(mytimestamp: Date | number | string | undefined) {
// console.log('getstrDate', mytimestamp)
if (mytimestamp) return date.formatDate(mytimestamp, 'DD MMMM YYYY')
return ''
},
getstrDateMonthWeekTimeShort(mytimestamp: Date | number | string | undefined) {
// console.log('getstrDate', mytimestamp)
if (mytimestamp) return `${this.getDayOfWeek(mytimestamp)} ${date.formatDate(mytimestamp, 'DD MMM - HH:mm')}`
@@ -6827,7 +6838,6 @@ export const tools = {
getdefaultnewrec_MySkill(): any {
return {
_id: 0,
idSector: tools.getSelectionByTable('sectors', 0, true),
idSkill: tools.getSelectionByTable('skills', 0, true),
idStatusSkill: tools.getSelectionByTable('statusSkills', [1]),
@@ -6846,8 +6856,6 @@ export const tools = {
getdefaultnewrec_MyGoods(): any {
return {
_id: 0,
// idSectorGood: 0,
// idGood: 0,
// idStatusSkill: [],
@@ -6877,7 +6885,6 @@ export const tools = {
getdefaultnewrec_MyGroup(): any {
return {
_id: 0,
groupname: '',
photos: [],
visibility: 0,
@@ -6912,7 +6919,6 @@ export const tools = {
getdefaultnewrec_MyBacheca(): any {
return {
_id: 0,
idSector: tools.getSelectionByTable('sectors', 0, true),
idSkill: tools.getSelectionByTable('skills', 0, true),
idStatusSkill: tools.getSelectionByTable('statusSkills', []),
@@ -6935,7 +6941,6 @@ export const tools = {
getdefaultnewrec_MyHosp(): any {
return {
visibile: true,
_id: 0,
typeHosp: tools.getSelectionByTable(toolsext.TABTYPEHOSP, 2),
idContribType: tools.getSelectionByTable('contribtypes', []),
idCity: this.getCitySel(),
@@ -7749,6 +7754,18 @@ export const tools = {
getPagination(table: string): IPagination {
return { sortBy: 'desc', descending: true, page: 1, rowsNumber: 0, rowsPerPage: 10 }
},
getNumTabByTable(table: string) {
return shared_consts.MYTABS.findIndex((rec: any) => rec.table === table)
},
removeItemOnce(arr: any, value: any) {
const index = arr.indexOf(value)
if (index > -1) {
arr.splice(index, 1)
}
return arr;
}
// FINE !