Members, Circuits

This commit is contained in:
Paolo Arena
2022-10-21 21:25:54 +02:00
parent 9d40649af3
commit 6c306b36f3
73 changed files with 4424 additions and 93 deletions

View File

@@ -212,6 +212,7 @@ export const costanti = {
CMD_DELETE: 1,
CMD_MODIFY: 2,
CMD_SHOW_PAGE: 3,
CMD_OPEN_PAGE: 4,
SHOW_ALL: 50,

View File

@@ -2605,6 +2605,12 @@ export const colTableCircuit = [
AddCol({ name: 'regulation', label_trans: 'circuit.regulation', fieldtype: costanti.FieldType.html, required: true }),
AddCol({ name: 'deperimento', label_trans: 'circuit.deperimento', fieldtype: costanti.FieldType.boolean, disable: true }),
AddCol({ name: 'transactionsEnabled', label_trans: 'circuit.transactionsEnabled', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'status', label_trans: 'circuit.status',
fieldtype: costanti.FieldType.select,
jointable: 'statuscircuit',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
}
),
AddCol({ name: 'data_costituz', label_trans: 'circuit.data_costituz', fieldtype: costanti.FieldType.date }),
AddCol({
name: 'photos',
@@ -2649,6 +2655,7 @@ export const colTableNotifCoins = [
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
}),
AddCol({ name: 'extrarec.qty', field: 'extrarec', subfield: 'qty', label_trans: 'movement.amount', fieldtype: costanti.FieldType.currency }),
AddCol({ name: 'extrarec.causal', field: 'extrarec', subfield: 'causal', label_trans: 'movement.causal', tipovisu: costanti.TipoVisu.TESTO_BORDATO }),
]
@@ -3016,6 +3023,15 @@ export const fieldsTable = {
colicon: 'icon',
noshow: true,
},
{
value: 'statuscircuit',
label: 'Stato Circuito',
columns: colTableGeneric,
colkey: 'value',
collabel: 'label',
colicon: 'icon',
noshow: true,
},
{
value: 'pub_to_share',
label: 'Visibilità',

View File

@@ -3717,6 +3717,16 @@ export const tools = {
return mystr.replace(/\s+/g, '')
},
removespaces_slash(mystr: string) {
mystr = mystr.replace(/\s+/g, '')
mystr = mystr.replace(/\//g, '')
mystr = mystr.replace(/:/g, '')
mystr = mystr.replace(/./g, '')
mystr = mystr.replace(/,/g, '')
mystr = mystr.replace(/'/g, '')
return mystr
},
copyStringToClipboard(myq: any, mystr: string, show: boolean) {
copyToClipboard(mystr).then(() => {
@@ -5899,6 +5909,7 @@ export const tools = {
color: '#ff5500',
deperimento: false,
transactionsEnabled: false,
status: shared_consts.CIRCUIT_STATUS.FASE1_CREAZIONE_GRUPPO,
symbol: 'RIS',
fido_scoperto_default: 100,
qta_max_default: 200,
@@ -5966,13 +5977,16 @@ export const tools = {
},
getFullFileName(arrimage: IImgGallery[], table: string, username: string, groupname: string) {
console.log('arrimage', arrimage)
if (shared_consts.TABLES_DIRECTORY_A_PARTE.includes(table)) {
return `upload/${table}/` + groupname + '/' + arrimage[0].imagefile
} else if (shared_consts.TABLES_DIRECTORY_SINGLE_IMG.includes(table)) {
return `upload/${table}/` + groupname + '/' + arrimage[0].imagefile
} else {
console.log('username', username, 'table', table)
if (arrimage && arrimage.length > 0) {
return 'upload/profile/' + username + '/' + table + '/' + arrimage[0].imagefile
return `upload/profile/${username}/${table}` + arrimage[0].imagefile
} else {
return ''
}