- updates;
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { head, isNil, pathOr } from 'ramda';
|
||||
import getNumberFormatted from '../../../../../../../helpers/getNumberFormatted';
|
||||
|
||||
const LastRowCell = ({columnId, lastRowCfg, columnMeta = {}, tableValue = []}) => {
|
||||
const cellData = head(lastRowCfg.filter(o => !isNil(o[columnId])));
|
||||
@@ -8,7 +9,7 @@ const LastRowCell = ({columnId, lastRowCfg, columnMeta = {}, tableValue = []}) =
|
||||
cellValue = pathOr(0, ['total'], tableValue);
|
||||
}
|
||||
|
||||
return <td>{cellValue}</td>;
|
||||
return <td>{getNumberFormatted(cellValue)}</td>;
|
||||
};
|
||||
|
||||
export default LastRowCell;
|
||||
@@ -6,7 +6,6 @@ import { head, isEmpty, isNil, pathOr, sum } from 'ramda';
|
||||
// components
|
||||
import DefaultCell from './components/DefaultCell';
|
||||
import LastRowCell from './components/LastRowCell';
|
||||
import getNumberFormatted from '../../../../../helpers/getNumberFormatted';
|
||||
|
||||
const RenderTable = ({ tableValue = {}, columnsCfg, lastRowCfg, setTableValueFn, disabled }) => {
|
||||
const rows = pathOr([], ['rows'], tableValue)
|
||||
@@ -32,7 +31,7 @@ const RenderTable = ({ tableValue = {}, columnsCfg, lastRowCfg, setTableValueFn,
|
||||
.map(v => isEmpty(v) || isNil(v) ? 0 : v);
|
||||
|
||||
if (cellValue === 'sum') {
|
||||
total = getNumberFormatted(sum(getAllRowsValues));
|
||||
total = sum(getAllRowsValues);
|
||||
} else {
|
||||
total = 0;
|
||||
}
|
||||
|
||||
@@ -50,105 +50,195 @@ export const dynamicDataOptions = {
|
||||
export const protocolType = [
|
||||
{
|
||||
'id': 1,
|
||||
'name': 'PROTOCOLLO IN ENTRATA'
|
||||
'name': 'PROTOCOLLO ENTRATA'
|
||||
},
|
||||
{
|
||||
'id': 2,
|
||||
'name': 'PROTOCOLLO IN USCITA'
|
||||
'name': 'PROTOCOLLO USCITA'
|
||||
},
|
||||
{
|
||||
'id': 3,
|
||||
'name': 'DOCUMENTO INTERNO'
|
||||
},
|
||||
{
|
||||
/*{
|
||||
'id': 1003,
|
||||
'name': 'PROTOCOLLO INTERNO '
|
||||
}
|
||||
}*/
|
||||
];
|
||||
|
||||
export const classificationType = [
|
||||
{
|
||||
'idClassificazione': 1,
|
||||
'idClassificazione': 101,
|
||||
'name': 'BILANCIO',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 2,
|
||||
'idClassificazione': 102,
|
||||
'name': 'DICHHIARAZIONE DEI REDDITI',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 3,
|
||||
'idClassificazione': 103,
|
||||
'name': 'SITUAZIONE CONTABILE',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 4,
|
||||
'idClassificazione': 104,
|
||||
'name': 'PROSPETTO CONTO ECONOMICO',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 5,
|
||||
'idClassificazione': 105,
|
||||
'name': 'CENTRALE DEI RISCHI',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 6,
|
||||
'name': 'RELAZIONE AZIENDALE ILLUSTRATIVA (MOD R1C, R1I, R1R, R1R A SECONDO DEI ',
|
||||
'idClassificazione': 106,
|
||||
'name': 'RELAZIONE AZIENDALE ILLUSTRATIVA (MOD R1C, R1I, R1R, R1S A SECONDA DEI SETTORI)',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 7,
|
||||
'idClassificazione': 107,
|
||||
'name': 'DOCUMENTO IDENTITA\'',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 8,
|
||||
'idClassificazione': 108,
|
||||
'name': 'MODELLO SP1',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 9,
|
||||
'idClassificazione': 109,
|
||||
'name': 'PRIVACY',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 10,
|
||||
'name': 'DOCUMENTAZIONE CHE ATTESTA POSSIBILITA\' DI RILASCIARE GAA FAVORE',
|
||||
'idClassificazione': 110,
|
||||
'name': 'DOCUMENTAZIONE CHE ATTESTA POSSIBILITA\' DI RILASCIARE GARANZIE A FAVORE DI TERZI (ES. STATUTO, VISURA…)',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 11,
|
||||
'idClassificazione': 111,
|
||||
'name': 'MODELLO AR1 D.LG 231/2007',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 12,
|
||||
'name': 'DOCUMENTO IDENTITA\' FIRMATORIO DICHHIARAZIONE SOSTITUTIVA',
|
||||
'idClassificazione': 112,
|
||||
'name': 'DOCUMENTO IDENTITA\' FIRMATARIO DICHIARAZIONE SOSTITUTIVA',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 13,
|
||||
'name': 'PRIVACY FIRMATARIO DICHHIARAZIONE SOSTITUTIVA',
|
||||
'idClassificazione': 113,
|
||||
'name': 'PRIVACY FIRMATARIO DICHIARAZIONE SOSTITUTIVA',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 14,
|
||||
'idClassificazione': 114,
|
||||
'name': 'NULLAOSTA ANTIMAFIA',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 1,
|
||||
'name': 'LETTERA ESITO DELIBERA',
|
||||
'idTipoprotocollo': 2
|
||||
'idClassificazione': 115,
|
||||
'name': 'VISURA CRIF',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 2,
|
||||
'idClassificazione': 116,
|
||||
'name': 'DURC',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 117,
|
||||
'name': 'STATO PATRIMONIALE E CONTO ECONOMICO',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 118,
|
||||
'name': 'DOCUMENTAZIONE FISCALE E CONTABILE',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 119,
|
||||
'name': 'BILANCIO GRUPPO IMPRESE',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 121,
|
||||
'name': 'DICHIARAZIONE DEI REDDITI GARANTI',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 122,
|
||||
'name': 'CENTRALE DEI RISCHI GARANTI',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 123,
|
||||
'name': 'BILANCIO / DICHIARAZIONE REDDITI GARANTI',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 125,
|
||||
'name': 'CONTRATTO FIRMATO DAL CLIENTE',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 126,
|
||||
'name': 'CONTRATTO FIRMATO DA GEPAFIN',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 128,
|
||||
'name': 'ALLEGATO 4',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 129,
|
||||
'name': 'ATTESTAZIONE PREGIUDIZIEVOLI',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 130,
|
||||
'name': 'DELIBERA BANCA',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 131,
|
||||
'name': 'ALTRO',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 202,
|
||||
'name': 'LETTERA DI GARANZIA',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 3,
|
||||
'idClassificazione': 127,
|
||||
'name': 'FATTURA',
|
||||
'idTipoprotocollo': 2
|
||||
},
|
||||
{
|
||||
'idClassificazione': 201,
|
||||
'name': 'LETTERA ESITO DELIBERA',
|
||||
'idTipoprotocollo': 2
|
||||
},
|
||||
{
|
||||
'idClassificazione': 204,
|
||||
'name': 'LETTERA TRASPARENZA',
|
||||
'idTipoprotocollo': 2
|
||||
},
|
||||
{
|
||||
'idClassificazione': 205,
|
||||
'name': 'CONTRATTO',
|
||||
'idTipoprotocollo': 1
|
||||
},
|
||||
{
|
||||
'idClassificazione': 124,
|
||||
'name': 'STAMPA PROPOSTA DELIBERA',
|
||||
'idTipoprotocollo': 3
|
||||
},
|
||||
{
|
||||
'idClassificazione': 203,
|
||||
'name': 'GENERICO',
|
||||
'idTipoprotocollo': 3
|
||||
}
|
||||
|
||||
@@ -35,12 +35,12 @@ const ElementSetting = ({ setting, changeFn, updateDataFn, bandoStatus }) => {
|
||||
text: __('Testo formattato', 'gepafin'),
|
||||
table_columns: '',
|
||||
criteria_table_columns: '',
|
||||
variable: __('Variable (only letters and "_")', 'gepafin'),
|
||||
formula: __('Auto calculation formula', 'gepafin')
|
||||
variable: __('Variabile (lettere, cifre e "_"; il primo carattere deve essere una lettera!)', 'gepafin'),
|
||||
formula: __('Formula di calcolo automatico', 'gepafin')
|
||||
}
|
||||
|
||||
const settingDescription = {
|
||||
formula: __('Create formula using previously declared variables. Use these math operators: <code>+</code>, <code>-</code>, <code>*</code>, <code>/</code>. Example of formula: <code>{entrate}+{assicurazione}</code>.', 'gepafin')
|
||||
formula: __('Crea una formula usando variabili dichiarate in precedenza. Utilizza questi operatori matematici: <code>+</code>, <code>-</code>, <code>*</code>, <code>/</code>. Esempio: <code>{entrate}+{assicurazione}</code>.', 'gepafin')
|
||||
}
|
||||
|
||||
const renderHeader = () => {
|
||||
|
||||
@@ -8,7 +8,7 @@ const ElementSettingChips = ({ restrictedValues = [], changeFn, value = [] }) =>
|
||||
const [lastTyped, setLastTyped] = useState([])
|
||||
|
||||
const isValidValue = (newVal) => {
|
||||
const validationRegex = /^[a-zA-Z_]+$/;
|
||||
const validationRegex = /^[a-zA-Z][a-zA-Z0-9_]*$/;
|
||||
return validationRegex.test(newVal);
|
||||
};
|
||||
|
||||
|
||||
@@ -237,7 +237,7 @@ const BuilderElementSettings = ({ closeSettingsFn, bandoStatus }) => {
|
||||
{settings
|
||||
&& settings
|
||||
.filter(o => ['variable', 'formula'].includes(o.name)).length > 0
|
||||
? <TabPanel header={__('Calculation', 'gepafin')}>
|
||||
? <TabPanel header={__('Calcolo', 'gepafin')}>
|
||||
{settings
|
||||
? settings
|
||||
.filter(o => ['variable', 'formula'].includes(o.name))
|
||||
@@ -251,7 +251,10 @@ const BuilderElementSettings = ({ closeSettingsFn, bandoStatus }) => {
|
||||
</TabPanel> : null}
|
||||
</TabView>
|
||||
|
||||
<Button label={__('Salva', 'gepafin')} onClick={saveSettings}/>
|
||||
<div style={{display: 'flex', gap: '0.5rem'}}>
|
||||
<Button label={__('Annulla', 'gepafin')} onClick={closeSettingsFn} severity="danger"/>
|
||||
<Button label={__('Salva', 'gepafin')} onClick={saveSettings}/>
|
||||
</div>
|
||||
</div>
|
||||
: null
|
||||
)
|
||||
|
||||
@@ -56,7 +56,7 @@ const FormBuilder = ({ bandoStatus }) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Sidebar visible={!isEmpty(activeElement)} onHide={closeSettings} className="formBuilder__elementSettings">
|
||||
<Sidebar visible={!isEmpty(activeElement)} onHide={closeSettings} dismissable={false} className="formBuilder__elementSettings">
|
||||
<h2>{__('Impostazioni del campo modulo', 'gepafin')}</h2>
|
||||
{!isEmpty(activeElement) ? <BuilderElementSettings closeSettingsFn={closeSettings} bandoStatus={bandoStatus}/> : null}
|
||||
</Sidebar>
|
||||
|
||||
Reference in New Issue
Block a user