imbric-theme 1.1.0 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- package/atoms/Icon/Icon.js +36 -45
- package/atoms/Icon/constants.js +591 -261
- package/atoms/Icon/parking-sv.svg +12 -0
- package/atoms/Label/Label.module.css +1 -0
- package/atoms/Modal/Modal.js +68 -11
- package/atoms/Paragraph/Paragraph.module.css +5 -1
- package/atoms/Paragraph/constants.js +1 -1
- package/atoms/Textarea/Textarea.js +5 -1
- package/hook/useStateDate.js +7 -14
- package/layout/DynamicTable/DynamicTable.js +16 -4
- package/molecules/RowTable/RowTable.js +1005 -1132
- package/package.json +1 -1
- package/styles/GrupoMutua.css +1 -0
- package/styles/default.css +1 -0
- package/styles/radiotaxiaragon.css +1 -0
- package/styles/spartan.css +1 -0
- package/styles/tagos.css +2 -0
- package/styles/taxisvalencia.css +1 -0
@@ -11,7 +11,6 @@ import Icon from '../../atoms/Icon'
|
|
11
11
|
import Picture from '../../atoms/Picture'
|
12
12
|
import Toggle from '../../atoms/Toggle'
|
13
13
|
|
14
|
-
|
15
14
|
import { Horizontal, Vertical } from '../../layout/Spacer/components'
|
16
15
|
|
17
16
|
export const RowTable = ({
|
@@ -46,10 +45,8 @@ export const RowTable = ({
|
|
46
45
|
txtTootipIconClone,
|
47
46
|
txtTootipIconCheckbox,
|
48
47
|
onClickCheckboxRow,
|
49
|
-
txtTootipIconPlusCircle
|
48
|
+
txtTootipIconPlusCircle,
|
50
49
|
}) => {
|
51
|
-
|
52
|
-
|
53
50
|
const [loading, setLoading] = useState(false)
|
54
51
|
|
55
52
|
// const handleEditStaff = (e, item) => {
|
@@ -57,18 +54,15 @@ export const RowTable = ({
|
|
57
54
|
// console.log(e)
|
58
55
|
// }
|
59
56
|
|
60
|
-
|
61
57
|
const handleClickCheckbox = (e, item) => {
|
62
|
-
|
63
|
-
|
64
58
|
for (const iterator of slice) {
|
65
|
-
|
66
59
|
if (iterator.id === item.id) {
|
67
|
-
item.isSelected
|
60
|
+
item.isSelected
|
61
|
+
? (iterator.isSelected = false)
|
62
|
+
: (iterator.isSelected = true)
|
68
63
|
|
69
64
|
iterator.isSelected = item.isSelected
|
70
65
|
}
|
71
|
-
|
72
66
|
}
|
73
67
|
|
74
68
|
setLoading(true)
|
@@ -81,13 +75,9 @@ export const RowTable = ({
|
|
81
75
|
}
|
82
76
|
|
83
77
|
const hola = () => {
|
84
|
-
|
85
78
|
setTimeout(() => {
|
86
79
|
setLoading(false)
|
87
80
|
}, 100)
|
88
|
-
|
89
|
-
|
90
|
-
|
91
81
|
}
|
92
82
|
|
93
83
|
// STATE TOOLTIP
|
@@ -101,1122 +91,1006 @@ export const RowTable = ({
|
|
101
91
|
setIsToolTipMounted(false)
|
102
92
|
}
|
103
93
|
|
104
|
-
|
105
|
-
|
106
94
|
return (
|
107
95
|
// <div className={getStyles('tbl-content')}>
|
108
96
|
// <table className={getStyles('table')} cellPadding="0" cellSpacing="0" border="0">
|
109
97
|
|
110
|
-
|
111
98
|
<tbody>
|
112
99
|
{slice.map((item, index) => (
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
{
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
100
|
+
<tr
|
101
|
+
style={{ background: item.colorRow }}
|
102
|
+
className={getStyles({ 'tr-content': isClickRow }, 'tr')}
|
103
|
+
onClick={(e) => {
|
104
|
+
onClickRow(e, item)
|
105
|
+
}}
|
106
|
+
key={index}
|
107
|
+
>
|
108
|
+
{columnsData.map((itemTd, indexTd) =>
|
109
|
+
itemTd.activeView ? (
|
110
|
+
itemTd.isLocation ? (
|
111
|
+
!loading ? (
|
112
|
+
item[itemTd.accessor] ? (
|
113
|
+
<td
|
114
|
+
className={getStyles('td', 'tdacction')}
|
115
|
+
style={{ color: item.colorTxtRow }}
|
116
|
+
key={[itemTd.accessor] + (indexTd + index)}
|
117
|
+
>
|
118
|
+
<a
|
119
|
+
href={
|
120
|
+
'http://maps.google.com/?q=' +
|
121
|
+
item[itemTd.accessor] +
|
122
|
+
',' +
|
123
|
+
item[itemTd.accessorSecond]
|
124
|
+
}
|
125
|
+
target="_black"
|
126
|
+
>
|
127
|
+
<Icon
|
128
|
+
name="distance"
|
129
|
+
// onClick={function noRefCheck() { }}
|
130
|
+
/>
|
131
|
+
</a>
|
132
|
+
</td>
|
133
|
+
) : (
|
134
|
+
<td
|
135
|
+
className={getStyles('td', 'tdacction')}
|
136
|
+
style={{ color: item.colorTxtRow }}
|
137
|
+
key={[itemTd.accessor] + (indexTd + index)}
|
138
|
+
></td>
|
139
|
+
)
|
140
|
+
) : null
|
141
|
+
) : itemTd.isBoolean ? (
|
142
|
+
!loading ? (
|
143
|
+
item[itemTd.accessor] ? (
|
144
|
+
<td
|
145
|
+
className={getStyles('td', 'tdacction')}
|
146
|
+
style={{ color: item.colorTxtRow }}
|
147
|
+
key={[itemTd.accessor] + (indexTd + index)}
|
148
|
+
>
|
149
|
+
SI
|
150
|
+
{/* {String(item[itemTd.accessor])} */}
|
151
|
+
</td>
|
152
|
+
) : (
|
153
|
+
<td
|
154
|
+
className={getStyles('td', 'tdacction')}
|
155
|
+
style={{ color: item.colorTxtRow }}
|
156
|
+
key={[itemTd.accessor] + (indexTd + index)}
|
157
|
+
>
|
158
|
+
{/* {String(item[itemTd.accessor])} */}
|
159
|
+
NO
|
160
|
+
</td>
|
161
|
+
)
|
162
|
+
) : null
|
163
|
+
) : itemTd.isCheckbox ? (
|
164
|
+
!loading ? (
|
165
|
+
<td
|
166
|
+
className={getStyles('td', 'tdacction')}
|
167
|
+
style={{ color: item.colorTxtRow }}
|
168
|
+
key={[itemTd.accessor] + (indexTd + index)}
|
169
|
+
>
|
170
|
+
{/* <Check id={item[itemTd.accessor]} isChecked={item.isSelected} /> */}
|
171
|
+
|
172
|
+
<Toggle
|
173
|
+
id={'idToggle' + item.id}
|
174
|
+
checked={item.isSelected}
|
175
|
+
label=""
|
176
|
+
disabled={itemTd.disabled}
|
177
|
+
onChangeCheckbox={(e) => {
|
178
|
+
handleClickCheckbox(e, item),
|
179
|
+
onClickCheckboxRow(e, item)
|
180
|
+
}}
|
181
|
+
/>
|
182
|
+
</td>
|
183
|
+
) : null
|
184
|
+
) : itemTd.isArrayObject ? (
|
185
|
+
<td
|
186
|
+
style={{ color: item.colorTxtRow }}
|
187
|
+
className={getStyles('td')}
|
188
|
+
key={[itemTd.accessor] + (indexTd + index)}
|
189
|
+
>
|
190
|
+
{console.log('TD: ' + [itemTd.accessor] + (indexTd + index))}
|
191
|
+
|
192
|
+
{item[itemTd.accessor].map((itemTdObj, indexAcc, array) => (
|
193
|
+
<>
|
194
|
+
<span
|
195
|
+
className={getStyles('tdlabelAlt')}
|
196
|
+
key={itemTdObj.id + 'label' + (indexAcc + index)}
|
197
|
+
>
|
198
|
+
{console.log(
|
199
|
+
'A: ' + itemTdObj.id + 'label' + (indexAcc + index)
|
200
|
+
)}
|
201
|
+
{itemTdObj[itemTd.subAccessorAlt]}
|
202
|
+
{array.length - 1 !== indexAcc ? <span>, </span> : null}
|
203
|
+
:
|
204
|
+
</span>
|
205
|
+
|
206
|
+
<span key={itemTdObj.id + 'Tdlabel' + (indexAcc + index)}>
|
207
|
+
{console.log(
|
208
|
+
'B: ' + itemTdObj.id + 'Tdlabel' + (indexAcc + index)
|
209
|
+
)}
|
210
|
+
|
211
|
+
{itemTdObj[itemTd.subAccessor]}
|
212
|
+
|
213
|
+
{array.length - 1 !== indexAcc ? <span>, </span> : null}
|
214
|
+
</span>
|
215
|
+
</>
|
216
|
+
))}
|
217
|
+
</td>
|
218
|
+
) : itemTd.isIcon ? (
|
219
|
+
<td
|
220
|
+
className={getStyles('td', 'tdacction')}
|
221
|
+
style={{ color: item.colorTxtRow }}
|
222
|
+
key={[itemTd.accessor] + (indexTd + index)}
|
223
|
+
>
|
224
|
+
{itemTd.isIcon ? (
|
225
|
+
item.isIcon === undefined ? (
|
226
|
+
<>
|
227
|
+
<span
|
228
|
+
data-tip
|
229
|
+
data-for={item.nameIcon}
|
230
|
+
onMouseEnter={handleMouseEnter}
|
231
|
+
onMouseLeave={handleMouseLeave}
|
133
232
|
>
|
134
|
-
|
135
|
-
<a href={'http://maps.google.com/?q=' + item[itemTd.accessor] + ',' + item[itemTd.accessorSecond]} target='_black'>
|
233
|
+
<>
|
136
234
|
<Icon
|
137
|
-
|
138
|
-
|
235
|
+
id={item.nameIcon + (indexTd + index)}
|
236
|
+
background="base"
|
237
|
+
name={item.nameIcon}
|
238
|
+
// onClick={(e) => { onClickActionListInvoice(e, item) }}
|
139
239
|
/>
|
140
|
-
|
141
|
-
|
142
|
-
</
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
>
|
150
|
-
</td>
|
151
|
-
)
|
152
|
-
: null
|
153
|
-
:
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
itemTd.isBoolean
|
159
|
-
|
160
|
-
?
|
161
|
-
!loading ?
|
162
|
-
|
163
|
-
item[itemTd.accessor] ?
|
164
|
-
|
165
|
-
(
|
166
|
-
<td
|
167
|
-
className={getStyles('td', 'tdacction')}
|
168
|
-
style={{ color: item.colorTxtRow }}
|
169
|
-
key={[itemTd.accessor] + (indexTd + index)}
|
240
|
+
<Horizontal size="xs" />
|
241
|
+
</>
|
242
|
+
</span>
|
243
|
+
|
244
|
+
{isToolTipMounted ? (
|
245
|
+
<ReactTooltip
|
246
|
+
id={item.nameIcon}
|
247
|
+
type="error"
|
248
|
+
place="left"
|
170
249
|
>
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
250
|
+
<span>{item.txtTootipNameIcon}</span>
|
251
|
+
</ReactTooltip>
|
252
|
+
) : null}
|
253
|
+
</>
|
254
|
+
) : item.isIcon ? (
|
255
|
+
<>
|
256
|
+
<span
|
257
|
+
data-tip
|
258
|
+
data-for={item.nameIcon}
|
259
|
+
onMouseEnter={handleMouseEnter}
|
260
|
+
onMouseLeave={handleMouseLeave}
|
261
|
+
>
|
262
|
+
<>
|
263
|
+
<Icon
|
264
|
+
id={item.nameIcon + (indexTd + index)}
|
265
|
+
background="base"
|
266
|
+
name={item.nameIcon}
|
267
|
+
// onClick={(e) => { onClickActionListInvoice(e, item) }}
|
268
|
+
/>
|
269
|
+
<Horizontal size="xs" />
|
270
|
+
</>
|
271
|
+
</span>
|
272
|
+
|
273
|
+
{isToolTipMounted ? (
|
274
|
+
<ReactTooltip id={item.nameIcon} type="error">
|
275
|
+
<span>{item.txtTootipNameIcon}</span>
|
276
|
+
</ReactTooltip>
|
277
|
+
) : null}
|
278
|
+
</>
|
279
|
+
) : null
|
280
|
+
) : null}
|
281
|
+
</td>
|
282
|
+
) : itemTd.isPicture ? (
|
283
|
+
<td
|
284
|
+
className={getStyles('td', 'tdacction')}
|
285
|
+
style={{ color: item.colorTxtRow }}
|
286
|
+
key={[itemTd.accessor] + (indexTd + index)}
|
287
|
+
>
|
288
|
+
<Picture src={item[itemTd.accessor]} width={50} />
|
289
|
+
</td>
|
290
|
+
) : itemTd.subAccessor === 'action' ? (
|
291
|
+
<td
|
292
|
+
style={{ color: item.colorTxtRow }}
|
293
|
+
className={getStyles('td', 'tdacctionIcons')}
|
294
|
+
key={[itemTd.accessor] + (indexTd + index)}
|
295
|
+
>
|
296
|
+
{itemTd.viewListInvoice ? (
|
297
|
+
item.viewListInvoice === undefined ? (
|
298
|
+
<>
|
299
|
+
<span
|
300
|
+
data-tip
|
301
|
+
data-for="listInvoice"
|
302
|
+
onMouseEnter={handleMouseEnter}
|
303
|
+
onMouseLeave={handleMouseLeave}
|
304
|
+
>
|
305
|
+
<>
|
306
|
+
<Icon
|
307
|
+
id={'listInvoice' + (indexTd + index)}
|
308
|
+
background="base"
|
309
|
+
name="listInvoice"
|
310
|
+
onClick={(e) => {
|
311
|
+
onClickActionListInvoice(e, item)
|
312
|
+
}}
|
313
|
+
/>
|
314
|
+
<Horizontal size="xs" />
|
315
|
+
</>
|
316
|
+
</span>
|
317
|
+
|
318
|
+
{isToolTipMounted ? (
|
319
|
+
<ReactTooltip
|
320
|
+
id="listInvoice"
|
321
|
+
type="error"
|
322
|
+
place="left"
|
182
323
|
>
|
183
|
-
{
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
!loading ? (
|
195
|
-
<td
|
196
|
-
className={getStyles('td', 'tdacction')}
|
197
|
-
style={{ color: item.colorTxtRow }}
|
198
|
-
key={[itemTd.accessor] + (indexTd + index)}
|
324
|
+
<span>{txtTootipIconListInvoice}</span>
|
325
|
+
</ReactTooltip>
|
326
|
+
) : null}
|
327
|
+
</>
|
328
|
+
) : item.viewListInvoice ? (
|
329
|
+
<>
|
330
|
+
<span
|
331
|
+
data-tip
|
332
|
+
data-for="listInvoice"
|
333
|
+
onMouseEnter={handleMouseEnter}
|
334
|
+
onMouseLeave={handleMouseLeave}
|
199
335
|
>
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
336
|
+
<>
|
337
|
+
<Icon
|
338
|
+
id={'listInvoice' + (indexTd + index)}
|
339
|
+
background="base"
|
340
|
+
name="listInvoice"
|
341
|
+
onClick={(e) => {
|
342
|
+
onClickActionListInvoice(e, item)
|
343
|
+
}}
|
344
|
+
/>
|
345
|
+
<Horizontal size="xs" />
|
346
|
+
</>
|
347
|
+
</span>
|
348
|
+
|
349
|
+
{isToolTipMounted ? (
|
350
|
+
<ReactTooltip id="listInvoice" type="error">
|
351
|
+
<span>{txtTootipIconListInvoice}</span>
|
352
|
+
</ReactTooltip>
|
353
|
+
) : null}
|
354
|
+
</>
|
355
|
+
) : null
|
356
|
+
) : null}
|
357
|
+
|
358
|
+
{itemTd.viewListXLS && item.fileType === 'xls' ? (
|
359
|
+
<>
|
360
|
+
<span
|
361
|
+
data-tip
|
362
|
+
data-for="listXLS"
|
363
|
+
onMouseEnter={handleMouseEnter}
|
364
|
+
onMouseLeave={handleMouseLeave}
|
365
|
+
>
|
366
|
+
<>
|
367
|
+
<Icon
|
368
|
+
id={'listXLS' + (indexTd + index)}
|
369
|
+
background="base"
|
370
|
+
name="listXLS"
|
371
|
+
onClick={(e) => {
|
372
|
+
onClickActionListXLS(e, item)
|
373
|
+
}}
|
209
374
|
/>
|
375
|
+
<Horizontal size="xs" />
|
376
|
+
</>
|
377
|
+
</span>
|
378
|
+
|
379
|
+
{isToolTipMounted ? (
|
380
|
+
<ReactTooltip id="listXLS" type="error">
|
381
|
+
<span>{txtTootipIconListListXLS}</span>
|
382
|
+
</ReactTooltip>
|
383
|
+
) : null}
|
384
|
+
</>
|
385
|
+
) : null}
|
386
|
+
|
387
|
+
{itemTd.viewListCSV && item.fileType === 'xml' ? (
|
388
|
+
<>
|
389
|
+
<span
|
390
|
+
data-tip
|
391
|
+
data-for="listCSV"
|
392
|
+
onMouseEnter={handleMouseEnter}
|
393
|
+
onMouseLeave={handleMouseLeave}
|
394
|
+
>
|
395
|
+
<>
|
396
|
+
<Icon
|
397
|
+
id={'listCSV' + (indexTd + index)}
|
398
|
+
background="base"
|
399
|
+
name="listCSV"
|
400
|
+
onClick={(e) => {
|
401
|
+
onClickActionListCSV(e, item)
|
402
|
+
}}
|
403
|
+
/>
|
404
|
+
<Horizontal size="xs" />
|
405
|
+
</>
|
406
|
+
</span>
|
407
|
+
|
408
|
+
{isToolTipMounted ? (
|
409
|
+
<ReactTooltip id="listCSV" type="error">
|
410
|
+
<span>{txtTootipIconListListCSV}</span>
|
411
|
+
</ReactTooltip>
|
412
|
+
) : null}
|
413
|
+
</>
|
414
|
+
) : null}
|
415
|
+
|
416
|
+
{itemTd.viewListPDF && item.fileType === 'pdf' ? (
|
417
|
+
<>
|
418
|
+
<span
|
419
|
+
data-tip
|
420
|
+
data-for="listPDF"
|
421
|
+
onMouseEnter={handleMouseEnter}
|
422
|
+
onMouseLeave={handleMouseLeave}
|
423
|
+
>
|
424
|
+
<>
|
425
|
+
<Icon
|
426
|
+
id={'listPDF' + (indexTd + index)}
|
427
|
+
background="base"
|
428
|
+
name="listPDF"
|
429
|
+
onClick={(e) => {
|
430
|
+
onClickActionListPDF(e, item)
|
431
|
+
}}
|
432
|
+
/>
|
433
|
+
<Horizontal size="xs" />
|
434
|
+
</>
|
435
|
+
</span>
|
436
|
+
|
437
|
+
{isToolTipMounted ? (
|
438
|
+
<ReactTooltip id="listPDF" type="error">
|
439
|
+
<span>{txtTootipIconListListPDF}</span>
|
440
|
+
</ReactTooltip>
|
441
|
+
) : null}
|
442
|
+
</>
|
443
|
+
) : null}
|
444
|
+
|
445
|
+
{itemTd.viewEdit ? (
|
446
|
+
item.viewEdit === undefined ? (
|
447
|
+
<>
|
448
|
+
<span
|
449
|
+
data-tip
|
450
|
+
data-for="edit"
|
451
|
+
onMouseEnter={handleMouseEnter}
|
452
|
+
onMouseLeave={handleMouseLeave}
|
453
|
+
>
|
454
|
+
<>
|
455
|
+
<Icon
|
456
|
+
id={'edit' + (indexTd + index)}
|
457
|
+
background="base"
|
458
|
+
name="edit"
|
459
|
+
onClick={(e) => {
|
460
|
+
onClickActionEdit(e, item)
|
461
|
+
}}
|
462
|
+
/>
|
463
|
+
<Horizontal size="xs" />
|
464
|
+
</>
|
465
|
+
</span>
|
466
|
+
|
467
|
+
{isToolTipMounted ? (
|
468
|
+
<ReactTooltip id="edit" type="error">
|
469
|
+
<span>{txtTootipIconEdit}</span>
|
470
|
+
</ReactTooltip>
|
471
|
+
) : null}
|
472
|
+
</>
|
473
|
+
) : item.viewEdit ? (
|
474
|
+
<>
|
475
|
+
<span
|
476
|
+
data-tip
|
477
|
+
data-for="edit"
|
478
|
+
onMouseEnter={handleMouseEnter}
|
479
|
+
onMouseLeave={handleMouseLeave}
|
480
|
+
>
|
481
|
+
<>
|
482
|
+
<Icon
|
483
|
+
id={'edit' + (indexTd + index)}
|
484
|
+
background="base"
|
485
|
+
name="edit"
|
486
|
+
onClick={(e) => {
|
487
|
+
onClickActionEdit(e, item)
|
488
|
+
}}
|
489
|
+
/>
|
490
|
+
<Horizontal size="xs" />
|
491
|
+
</>
|
492
|
+
</span>
|
493
|
+
|
494
|
+
{isToolTipMounted ? (
|
495
|
+
<ReactTooltip id="edit" type="error">
|
496
|
+
<span>{txtTootipIconEdit}</span>
|
497
|
+
</ReactTooltip>
|
498
|
+
) : null}
|
499
|
+
</>
|
500
|
+
) : null
|
501
|
+
) : null}
|
502
|
+
|
503
|
+
{itemTd.viewEmailSend ? (
|
504
|
+
item.viewEmailSend === undefined ? (
|
505
|
+
<>
|
506
|
+
<span
|
507
|
+
data-tip
|
508
|
+
data-for="sendEmail"
|
509
|
+
onMouseEnter={handleMouseEnter}
|
510
|
+
onMouseLeave={handleMouseLeave}
|
511
|
+
>
|
512
|
+
<>
|
513
|
+
<Icon
|
514
|
+
background="base"
|
515
|
+
name="sendEmail"
|
516
|
+
onClick={(e) => {
|
517
|
+
onClickActionSendEmail(e, item)
|
518
|
+
}}
|
519
|
+
/>
|
520
|
+
<Horizontal size="xs" />
|
521
|
+
</>
|
522
|
+
</span>
|
523
|
+
|
524
|
+
{isToolTipMounted ? (
|
525
|
+
<ReactTooltip id="sendEmail" type="error">
|
526
|
+
<span>{txtTootipIconSendEmail}</span>
|
527
|
+
</ReactTooltip>
|
528
|
+
) : null}
|
529
|
+
</>
|
530
|
+
) : item.viewEmailSend ? (
|
531
|
+
<>
|
532
|
+
<span
|
533
|
+
data-tip
|
534
|
+
data-for="sendEmail"
|
535
|
+
onMouseEnter={handleMouseEnter}
|
536
|
+
onMouseLeave={handleMouseLeave}
|
537
|
+
>
|
538
|
+
<>
|
539
|
+
<Icon
|
540
|
+
background="base"
|
541
|
+
name="sendEmail"
|
542
|
+
onClick={(e) => {
|
543
|
+
onClickActionSendEmail(e, item)
|
544
|
+
}}
|
545
|
+
/>
|
546
|
+
<Horizontal size="xs" />
|
547
|
+
</>
|
548
|
+
</span>
|
549
|
+
|
550
|
+
{isToolTipMounted ? (
|
551
|
+
<ReactTooltip id="sendEmail" type="error">
|
552
|
+
<span>{txtTootipIconSendEmail}</span>
|
553
|
+
</ReactTooltip>
|
554
|
+
) : null}
|
555
|
+
</>
|
556
|
+
) : null
|
557
|
+
) : null}
|
558
|
+
|
559
|
+
{itemTd.viewLink ? (
|
560
|
+
item.viewLink === undefined ? (
|
561
|
+
<>
|
562
|
+
<span
|
563
|
+
data-tip
|
564
|
+
data-for="linkUser"
|
565
|
+
onMouseEnter={handleMouseEnter}
|
566
|
+
onMouseLeave={handleMouseLeave}
|
567
|
+
>
|
568
|
+
<>
|
569
|
+
<Icon
|
570
|
+
background="base"
|
571
|
+
name="linkUser"
|
572
|
+
// onClick={(e) => onClickEdit(e, item)}
|
573
|
+
onClick={(e) => {
|
574
|
+
onClickActionLink(e, item)
|
575
|
+
}}
|
576
|
+
/>
|
577
|
+
<Horizontal size="xs" />
|
578
|
+
</>
|
579
|
+
</span>
|
580
|
+
|
581
|
+
{isToolTipMounted ? (
|
582
|
+
<ReactTooltip id="linkUser" type="error">
|
583
|
+
<span>{txtTootipIconLink}</span>
|
584
|
+
</ReactTooltip>
|
585
|
+
) : null}
|
586
|
+
</>
|
587
|
+
) : item.viewLink ? (
|
588
|
+
<>
|
589
|
+
<span
|
590
|
+
data-tip
|
591
|
+
data-for="linkUser"
|
592
|
+
onMouseEnter={handleMouseEnter}
|
593
|
+
onMouseLeave={handleMouseLeave}
|
594
|
+
>
|
595
|
+
<>
|
596
|
+
<Icon
|
597
|
+
background="base"
|
598
|
+
name="linkUser"
|
599
|
+
// onClick={(e) => onClickEdit(e, item)}
|
600
|
+
onClick={(e) => {
|
601
|
+
onClickActionLink(e, item)
|
602
|
+
}}
|
603
|
+
/>
|
604
|
+
<Horizontal size="xs" />
|
605
|
+
</>
|
606
|
+
</span>
|
607
|
+
|
608
|
+
{isToolTipMounted ? (
|
609
|
+
<ReactTooltip id="linkUser" type="error">
|
610
|
+
<span>{txtTootipIconLink}</span>
|
611
|
+
</ReactTooltip>
|
612
|
+
) : null}
|
613
|
+
</>
|
614
|
+
) : null
|
615
|
+
) : null}
|
616
|
+
|
617
|
+
{itemTd.viewClone ? (
|
618
|
+
item.viewClone === undefined ? (
|
619
|
+
<>
|
620
|
+
<span
|
621
|
+
data-tip
|
622
|
+
data-for="clone"
|
623
|
+
onMouseEnter={handleMouseEnter}
|
624
|
+
onMouseLeave={handleMouseLeave}
|
625
|
+
>
|
626
|
+
<>
|
627
|
+
<Icon
|
628
|
+
background="base"
|
629
|
+
name="cloneDefault"
|
630
|
+
onClick={(e) => {
|
631
|
+
onClickActionClone(e, item)
|
632
|
+
}}
|
633
|
+
/>
|
634
|
+
<Horizontal size="xs" />
|
635
|
+
</>
|
636
|
+
</span>
|
637
|
+
|
638
|
+
{isToolTipMounted ? (
|
639
|
+
<ReactTooltip id="clone" type="error">
|
640
|
+
<span>{txtTootipIconClone}</span>
|
641
|
+
</ReactTooltip>
|
642
|
+
) : null}
|
643
|
+
</>
|
644
|
+
) : item.viewClone ? (
|
645
|
+
<>
|
646
|
+
<span
|
647
|
+
data-tip
|
648
|
+
data-for="clone"
|
649
|
+
onMouseEnter={handleMouseEnter}
|
650
|
+
onMouseLeave={handleMouseLeave}
|
651
|
+
>
|
652
|
+
<>
|
653
|
+
<Icon
|
654
|
+
background="base"
|
655
|
+
name="clone"
|
656
|
+
onClick={(e) => {
|
657
|
+
onClickActionClone(e, item)
|
658
|
+
}}
|
659
|
+
/>
|
660
|
+
<Horizontal size="xs" />
|
661
|
+
</>
|
662
|
+
</span>
|
663
|
+
|
664
|
+
{isToolTipMounted ? (
|
665
|
+
<ReactTooltip id="clone" type="error">
|
666
|
+
<span>{txtTootipIconClone}</span>
|
667
|
+
</ReactTooltip>
|
668
|
+
) : null}
|
669
|
+
</>
|
670
|
+
) : null
|
671
|
+
) : null}
|
672
|
+
|
673
|
+
{itemTd.viewFileDownload ? (
|
674
|
+
item.viewFileDownload === undefined ? (
|
675
|
+
<>
|
676
|
+
<span
|
677
|
+
data-tip
|
678
|
+
data-for="fileDownload"
|
679
|
+
onMouseEnter={handleMouseEnter}
|
680
|
+
onMouseLeave={handleMouseLeave}
|
681
|
+
>
|
682
|
+
<>
|
683
|
+
<Icon
|
684
|
+
id="fileDownload"
|
685
|
+
background="base"
|
686
|
+
name="fileDownload"
|
687
|
+
onClick={(e) => {
|
688
|
+
onClickActionFileDownload(e, item)
|
689
|
+
}}
|
690
|
+
/>
|
691
|
+
<Horizontal size="xs" />
|
692
|
+
</>
|
693
|
+
</span>
|
694
|
+
|
695
|
+
{isToolTipMounted ? (
|
696
|
+
<ReactTooltip id="fileDownload" type="error">
|
697
|
+
<span>{txtTootipIconFileDownload}</span>
|
698
|
+
</ReactTooltip>
|
699
|
+
) : null}
|
700
|
+
</>
|
701
|
+
) : item.viewFileDownload ? (
|
702
|
+
<>
|
703
|
+
<span
|
704
|
+
data-tip
|
705
|
+
data-for="fileDownload"
|
706
|
+
onMouseEnter={handleMouseEnter}
|
707
|
+
onMouseLeave={handleMouseLeave}
|
708
|
+
>
|
709
|
+
<>
|
710
|
+
<Icon
|
711
|
+
id="fileDownload"
|
712
|
+
background="base"
|
713
|
+
name="fileDownload"
|
714
|
+
onClick={(e) => {
|
715
|
+
onClickActionFileDownload(e, item)
|
716
|
+
}}
|
717
|
+
/>
|
718
|
+
<Horizontal size="xs" />
|
719
|
+
</>
|
720
|
+
</span>
|
721
|
+
|
722
|
+
{isToolTipMounted ? (
|
723
|
+
<ReactTooltip id="fileDownload" type="error">
|
724
|
+
<span>{txtTootipIconFileDownload}</span>
|
725
|
+
</ReactTooltip>
|
726
|
+
) : null}
|
727
|
+
</>
|
728
|
+
) : null
|
729
|
+
) : null}
|
730
|
+
|
731
|
+
{itemTd.viewCheckbox ? (
|
732
|
+
item.viewCheckbox === undefined ? (
|
733
|
+
<>
|
734
|
+
<span
|
735
|
+
data-tip
|
736
|
+
data-for="checkbox"
|
737
|
+
onMouseEnter={handleMouseEnter}
|
738
|
+
onMouseLeave={handleMouseLeave}
|
739
|
+
>
|
740
|
+
<>
|
741
|
+
<Toggle
|
742
|
+
id={'idToggle' + item.id}
|
743
|
+
checked={item.isSelected}
|
744
|
+
label=""
|
745
|
+
onChangeCheckbox={(e) => {
|
746
|
+
onClickActionCheckbox(e, item)
|
747
|
+
}}
|
748
|
+
/>
|
210
749
|
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
<span key={itemTdObj.id + 'Tdlabel' + (indexAcc + index)}>
|
240
|
-
|
241
|
-
{console.log('B: ' + itemTdObj.id + 'Tdlabel' + (indexAcc + index))}
|
242
|
-
|
243
|
-
{itemTdObj[itemTd.subAccessor]}
|
244
|
-
|
245
|
-
{array.length - 1 !== indexAcc ?
|
246
|
-
<span>, </span> : null}
|
247
|
-
|
248
|
-
</span>
|
249
|
-
|
250
|
-
</>
|
251
|
-
|
252
|
-
))}
|
253
|
-
|
254
|
-
</td>
|
255
|
-
|
256
|
-
:
|
257
|
-
|
258
|
-
|
259
|
-
itemTd.isIcon
|
260
|
-
|
261
|
-
?
|
262
|
-
<td
|
263
|
-
className={getStyles('td', 'tdacction')}
|
264
|
-
style={{ color: item.colorTxtRow }}
|
265
|
-
key={[itemTd.accessor] + (indexTd + index)}>
|
266
|
-
|
267
|
-
|
268
|
-
{itemTd.isIcon ?
|
269
|
-
|
270
|
-
item.isIcon === undefined ?
|
271
|
-
|
272
|
-
<>
|
273
|
-
<span
|
274
|
-
data-tip
|
275
|
-
data-for={item.nameIcon}
|
276
|
-
onMouseEnter={handleMouseEnter}
|
277
|
-
onMouseLeave={handleMouseLeave}
|
278
|
-
>
|
279
|
-
<>
|
280
|
-
<Icon
|
281
|
-
id={item.nameIcon + (indexTd + index)}
|
282
|
-
background="base"
|
283
|
-
name={item.nameIcon}
|
284
|
-
// onClick={(e) => { onClickActionListInvoice(e, item) }}
|
285
|
-
/>
|
286
|
-
<Horizontal size="xs" />
|
287
|
-
</>
|
288
|
-
|
289
|
-
</span>
|
290
|
-
|
291
|
-
{isToolTipMounted ? (
|
292
|
-
<ReactTooltip id={item.nameIcon} type='error' place='left'>
|
293
|
-
<span>{item.txtTootipNameIcon}</span>
|
294
|
-
</ReactTooltip>
|
295
|
-
) : null}
|
296
|
-
</>
|
297
|
-
|
298
|
-
:
|
299
|
-
|
300
|
-
item.isIcon ?
|
301
|
-
|
302
|
-
<>
|
303
|
-
<span
|
304
|
-
data-tip
|
305
|
-
data-for={item.nameIcon}
|
306
|
-
onMouseEnter={handleMouseEnter}
|
307
|
-
onMouseLeave={handleMouseLeave}
|
308
|
-
>
|
309
|
-
<>
|
310
|
-
<Icon
|
311
|
-
id={item.nameIcon + (indexTd + index)}
|
312
|
-
background="base"
|
313
|
-
name={item.nameIcon}
|
314
|
-
// onClick={(e) => { onClickActionListInvoice(e, item) }}
|
315
|
-
/>
|
316
|
-
<Horizontal size="xs" />
|
317
|
-
</>
|
318
|
-
|
319
|
-
</span>
|
320
|
-
|
321
|
-
{isToolTipMounted ? (
|
322
|
-
<ReactTooltip id={item.nameIcon} type='error'>
|
323
|
-
<span>{item.txtTootipNameIcon}</span>
|
324
|
-
</ReactTooltip>
|
325
|
-
) : null}
|
326
|
-
</>
|
327
|
-
|
328
|
-
: null
|
329
|
-
|
330
|
-
: null}
|
331
|
-
|
332
|
-
</td>
|
333
|
-
:
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
itemTd.isPicture
|
338
|
-
|
339
|
-
?
|
340
|
-
<td
|
341
|
-
className={getStyles('td', 'tdacction')}
|
342
|
-
style={{ color: item.colorTxtRow }}
|
343
|
-
key={[itemTd.accessor] + (indexTd + index)}>
|
344
|
-
<Picture
|
345
|
-
src={item[itemTd.accessor]}
|
346
|
-
width={50}
|
347
|
-
/>
|
348
|
-
</td>
|
349
|
-
:
|
350
|
-
|
351
|
-
itemTd.subAccessor === 'action'
|
352
|
-
|
353
|
-
?
|
354
|
-
|
355
|
-
<td style={{ color: item.colorTxtRow }} className={getStyles('td', 'tdacctionIcons')} key={[itemTd.accessor] + (indexTd + index)}>
|
356
|
-
|
357
|
-
|
358
|
-
{itemTd.viewListInvoice ?
|
359
|
-
|
360
|
-
|
361
|
-
item.viewListInvoice === undefined ?
|
362
|
-
|
363
|
-
<>
|
364
|
-
<span
|
365
|
-
data-tip
|
366
|
-
data-for='listInvoice'
|
367
|
-
onMouseEnter={handleMouseEnter}
|
368
|
-
onMouseLeave={handleMouseLeave}
|
369
|
-
>
|
370
|
-
<>
|
371
|
-
<Icon
|
372
|
-
id={"listInvoice" + (indexTd + index)}
|
373
|
-
background="base"
|
374
|
-
name="listInvoice"
|
375
|
-
onClick={(e) => { onClickActionListInvoice(e, item) }}
|
376
|
-
/>
|
377
|
-
<Horizontal size="xs" />
|
378
|
-
</>
|
379
|
-
|
380
|
-
</span>
|
381
|
-
|
382
|
-
{isToolTipMounted ? (
|
383
|
-
<ReactTooltip id='listInvoice' type='error' place='left'>
|
384
|
-
<span>{txtTootipIconListInvoice}</span>
|
385
|
-
</ReactTooltip>
|
386
|
-
) : null}
|
387
|
-
</>
|
388
|
-
|
389
|
-
:
|
390
|
-
|
391
|
-
item.viewListInvoice ?
|
392
|
-
|
393
|
-
<>
|
394
|
-
<span
|
395
|
-
data-tip
|
396
|
-
data-for='listInvoice'
|
397
|
-
onMouseEnter={handleMouseEnter}
|
398
|
-
onMouseLeave={handleMouseLeave}
|
399
|
-
>
|
400
|
-
<>
|
401
|
-
<Icon
|
402
|
-
id={"listInvoice" + (indexTd + index)}
|
403
|
-
background="base"
|
404
|
-
name="listInvoice"
|
405
|
-
onClick={(e) => { onClickActionListInvoice(e, item) }}
|
406
|
-
/>
|
407
|
-
<Horizontal size="xs" />
|
408
|
-
</>
|
409
|
-
|
410
|
-
</span>
|
411
|
-
|
412
|
-
{isToolTipMounted ? (
|
413
|
-
<ReactTooltip id='listInvoice' type='error'>
|
414
|
-
<span>{txtTootipIconListInvoice}</span>
|
415
|
-
</ReactTooltip>
|
416
|
-
) : null}
|
417
|
-
</>
|
418
|
-
|
419
|
-
: null
|
420
|
-
|
421
|
-
: null}
|
422
|
-
|
423
|
-
{itemTd.viewListXLS && item.fileType === 'xls' ?
|
424
|
-
|
425
|
-
<>
|
426
|
-
<span
|
427
|
-
data-tip
|
428
|
-
data-for='listXLS'
|
429
|
-
onMouseEnter={handleMouseEnter}
|
430
|
-
onMouseLeave={handleMouseLeave}
|
431
|
-
>
|
432
|
-
<>
|
433
|
-
<Icon
|
434
|
-
id={"listXLS" + (indexTd + index)}
|
435
|
-
background="base"
|
436
|
-
name="listXLS"
|
437
|
-
onClick={(e) => { onClickActionListXLS(e, item) }}
|
438
|
-
/>
|
439
|
-
<Horizontal size="xs" />
|
440
|
-
</>
|
441
|
-
|
442
|
-
</span>
|
443
|
-
|
444
|
-
{isToolTipMounted ? (
|
445
|
-
<ReactTooltip id='listXLS' type='error'>
|
446
|
-
<span>{txtTootipIconListListXLS}</span>
|
447
|
-
</ReactTooltip>
|
448
|
-
) : null}
|
449
|
-
</>
|
450
|
-
|
451
|
-
: null}
|
452
|
-
|
453
|
-
{itemTd.viewListCSV && item.fileType === 'xml' ?
|
454
|
-
|
455
|
-
<>
|
456
|
-
<span
|
457
|
-
data-tip
|
458
|
-
data-for='listCSV'
|
459
|
-
onMouseEnter={handleMouseEnter}
|
460
|
-
onMouseLeave={handleMouseLeave}
|
461
|
-
>
|
462
|
-
<>
|
463
|
-
<Icon
|
464
|
-
id={"listCSV" + (indexTd + index)}
|
465
|
-
background="base"
|
466
|
-
name="listCSV"
|
467
|
-
onClick={(e) => { onClickActionListCSV(e, item) }}
|
468
|
-
/>
|
469
|
-
<Horizontal size="xs" />
|
470
|
-
</>
|
471
|
-
|
472
|
-
</span>
|
473
|
-
|
474
|
-
{isToolTipMounted ? (
|
475
|
-
<ReactTooltip id='listCSV' type='error'>
|
476
|
-
<span>{txtTootipIconListListCSV}</span>
|
477
|
-
</ReactTooltip>
|
478
|
-
) : null}
|
479
|
-
</>
|
480
|
-
|
481
|
-
: null}
|
482
|
-
|
483
|
-
{itemTd.viewListPDF && item.fileType === 'pdf' ?
|
484
|
-
|
485
|
-
<>
|
486
|
-
<span
|
487
|
-
data-tip
|
488
|
-
data-for='listPDF'
|
489
|
-
onMouseEnter={handleMouseEnter}
|
490
|
-
onMouseLeave={handleMouseLeave}
|
491
|
-
>
|
492
|
-
<>
|
493
|
-
<Icon
|
494
|
-
id={"listPDF" + (indexTd + index)}
|
495
|
-
background="base"
|
496
|
-
name="listPDF"
|
497
|
-
onClick={(e) => { onClickActionListPDF(e, item) }}
|
498
|
-
/>
|
499
|
-
<Horizontal size="xs" />
|
500
|
-
</>
|
501
|
-
|
502
|
-
</span>
|
503
|
-
|
504
|
-
{isToolTipMounted ? (
|
505
|
-
<ReactTooltip id='listPDF' type='error'>
|
506
|
-
<span>{txtTootipIconListListPDF}</span>
|
507
|
-
</ReactTooltip>
|
508
|
-
) : null}
|
509
|
-
</>
|
510
|
-
|
511
|
-
: null}
|
512
|
-
|
513
|
-
{itemTd.viewEdit ?
|
514
|
-
|
515
|
-
item.viewEdit === undefined ?
|
516
|
-
<>
|
517
|
-
<span
|
518
|
-
data-tip
|
519
|
-
data-for='edit'
|
520
|
-
onMouseEnter={handleMouseEnter}
|
521
|
-
onMouseLeave={handleMouseLeave}
|
522
|
-
>
|
523
|
-
<>
|
524
|
-
<Icon
|
525
|
-
id={"edit" + (indexTd + index)}
|
526
|
-
background="base"
|
527
|
-
name="edit"
|
528
|
-
onClick={(e) => { onClickActionEdit(e, item) }}
|
529
|
-
/>
|
530
|
-
<Horizontal size="xs" />
|
531
|
-
</>
|
532
|
-
|
533
|
-
</span>
|
534
|
-
|
535
|
-
{isToolTipMounted ? (
|
536
|
-
<ReactTooltip id='edit' type='error'>
|
537
|
-
<span>{txtTootipIconEdit}</span>
|
538
|
-
</ReactTooltip>
|
539
|
-
) : null}
|
540
|
-
</>
|
541
|
-
:
|
542
|
-
|
543
|
-
item.viewEdit ?
|
544
|
-
|
545
|
-
<>
|
546
|
-
<span
|
547
|
-
data-tip
|
548
|
-
data-for='edit'
|
549
|
-
onMouseEnter={handleMouseEnter}
|
550
|
-
onMouseLeave={handleMouseLeave}
|
551
|
-
>
|
552
|
-
<>
|
553
|
-
<Icon
|
554
|
-
id={"edit" + (indexTd + index)}
|
555
|
-
background="base"
|
556
|
-
name="edit"
|
557
|
-
onClick={(e) => { onClickActionEdit(e, item) }}
|
558
|
-
/>
|
559
|
-
<Horizontal size="xs" />
|
560
|
-
</>
|
561
|
-
|
562
|
-
</span>
|
563
|
-
|
564
|
-
{isToolTipMounted ? (
|
565
|
-
<ReactTooltip id='edit' type='error'>
|
566
|
-
<span>{txtTootipIconEdit}</span>
|
567
|
-
</ReactTooltip>
|
568
|
-
) : null}
|
569
|
-
</>
|
570
|
-
|
571
|
-
: null
|
572
|
-
|
573
|
-
: null}
|
574
|
-
|
575
|
-
{itemTd.viewEmailSend ?
|
576
|
-
|
577
|
-
item.viewEmailSend === undefined ?
|
578
|
-
|
579
|
-
<>
|
580
|
-
<span
|
581
|
-
data-tip
|
582
|
-
data-for='sendEmail'
|
583
|
-
onMouseEnter={handleMouseEnter}
|
584
|
-
onMouseLeave={handleMouseLeave}
|
585
|
-
>
|
586
|
-
<>
|
587
|
-
<Icon
|
588
|
-
background="base"
|
589
|
-
name="sendEmail"
|
590
|
-
onClick={e => { onClickActionSendEmail(e, item) }}
|
591
|
-
/>
|
592
|
-
<Horizontal size="xs" />
|
593
|
-
</>
|
594
|
-
|
595
|
-
</span>
|
596
|
-
|
597
|
-
{isToolTipMounted ? (
|
598
|
-
<ReactTooltip id='sendEmail' type='error'>
|
599
|
-
<span>{txtTootipIconSendEmail}</span>
|
600
|
-
</ReactTooltip>
|
601
|
-
) : null}
|
602
|
-
</>
|
603
|
-
|
604
|
-
:
|
605
|
-
|
606
|
-
item.viewEmailSend ?
|
607
|
-
|
608
|
-
<>
|
609
|
-
<span
|
610
|
-
data-tip
|
611
|
-
data-for='sendEmail'
|
612
|
-
onMouseEnter={handleMouseEnter}
|
613
|
-
onMouseLeave={handleMouseLeave}
|
614
|
-
>
|
615
|
-
<>
|
616
|
-
<Icon
|
617
|
-
background="base"
|
618
|
-
name="sendEmail"
|
619
|
-
onClick={e => { onClickActionSendEmail(e, item) }}
|
620
|
-
/>
|
621
|
-
<Horizontal size="xs" />
|
622
|
-
</>
|
623
|
-
|
624
|
-
</span>
|
625
|
-
|
626
|
-
{isToolTipMounted ? (
|
627
|
-
<ReactTooltip id='sendEmail' type='error'>
|
628
|
-
<span>{txtTootipIconSendEmail}</span>
|
629
|
-
</ReactTooltip>
|
630
|
-
) : null}
|
631
|
-
</>
|
632
|
-
|
633
|
-
: null
|
634
|
-
|
635
|
-
: null}
|
636
|
-
|
637
|
-
|
638
|
-
{itemTd.viewLink ?
|
639
|
-
|
640
|
-
item.viewLink === undefined ?
|
641
|
-
|
642
|
-
<>
|
643
|
-
<span
|
644
|
-
data-tip
|
645
|
-
data-for='linkUser'
|
646
|
-
onMouseEnter={handleMouseEnter}
|
647
|
-
onMouseLeave={handleMouseLeave}
|
648
|
-
>
|
649
|
-
<>
|
650
|
-
<Icon
|
651
|
-
background="base"
|
652
|
-
name="linkUser"
|
653
|
-
// onClick={(e) => onClickEdit(e, item)}
|
654
|
-
onClick={e => { onClickActionLink(e, item) }}
|
655
|
-
/>
|
656
|
-
<Horizontal size="xs" />
|
657
|
-
</>
|
658
|
-
|
659
|
-
</span>
|
660
|
-
|
661
|
-
{isToolTipMounted ? (
|
662
|
-
<ReactTooltip id='linkUser' type='error'>
|
663
|
-
<span>{txtTootipIconLink}</span>
|
664
|
-
</ReactTooltip>
|
665
|
-
) : null}
|
666
|
-
</>
|
667
|
-
|
668
|
-
:
|
669
|
-
|
670
|
-
item.viewLink ?
|
671
|
-
|
672
|
-
<>
|
673
|
-
<span
|
674
|
-
data-tip
|
675
|
-
data-for='linkUser'
|
676
|
-
onMouseEnter={handleMouseEnter}
|
677
|
-
onMouseLeave={handleMouseLeave}
|
678
|
-
>
|
679
|
-
<>
|
680
|
-
<Icon
|
681
|
-
background="base"
|
682
|
-
name="linkUser"
|
683
|
-
// onClick={(e) => onClickEdit(e, item)}
|
684
|
-
onClick={e => { onClickActionLink(e, item) }}
|
685
|
-
/>
|
686
|
-
<Horizontal size="xs" />
|
687
|
-
</>
|
688
|
-
|
689
|
-
</span>
|
690
|
-
|
691
|
-
{isToolTipMounted ? (
|
692
|
-
<ReactTooltip id='linkUser' type='error'>
|
693
|
-
<span>{txtTootipIconLink}</span>
|
694
|
-
</ReactTooltip>
|
695
|
-
) : null}
|
696
|
-
</>
|
697
|
-
|
698
|
-
: null
|
699
|
-
|
700
|
-
: null}
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
{itemTd.viewClone ?
|
705
|
-
|
706
|
-
item.viewClone === undefined ?
|
707
|
-
|
708
|
-
<>
|
709
|
-
<span
|
710
|
-
data-tip
|
711
|
-
data-for='clone'
|
712
|
-
onMouseEnter={handleMouseEnter}
|
713
|
-
onMouseLeave={handleMouseLeave}
|
714
|
-
>
|
715
|
-
<>
|
716
|
-
<Icon
|
717
|
-
background="base"
|
718
|
-
name="cloneDefault"
|
719
|
-
onClick={e => { onClickActionClone(e, item) }}
|
720
|
-
/>
|
721
|
-
<Horizontal size="xs" />
|
722
|
-
</>
|
723
|
-
|
724
|
-
</span>
|
725
|
-
|
726
|
-
{isToolTipMounted ? (
|
727
|
-
<ReactTooltip id='clone' type='error'>
|
728
|
-
<span>{txtTootipIconClone}</span>
|
729
|
-
</ReactTooltip>
|
730
|
-
) : null}
|
731
|
-
</>
|
732
|
-
|
733
|
-
:
|
734
|
-
|
735
|
-
item.viewClone ?
|
736
|
-
|
737
|
-
<>
|
738
|
-
<span
|
739
|
-
data-tip
|
740
|
-
data-for='clone'
|
741
|
-
onMouseEnter={handleMouseEnter}
|
742
|
-
onMouseLeave={handleMouseLeave}
|
743
|
-
>
|
744
|
-
<>
|
745
|
-
<Icon
|
746
|
-
background="base"
|
747
|
-
name="clone"
|
748
|
-
onClick={e => { onClickActionClone(e, item) }}
|
749
|
-
/>
|
750
|
-
<Horizontal size="xs" />
|
751
|
-
</>
|
752
|
-
|
753
|
-
</span>
|
754
|
-
|
755
|
-
{isToolTipMounted ? (
|
756
|
-
<ReactTooltip id='clone' type='error'>
|
757
|
-
<span>{txtTootipIconClone}</span>
|
758
|
-
</ReactTooltip>
|
759
|
-
) : null}
|
760
|
-
</>
|
761
|
-
|
762
|
-
: null
|
763
|
-
|
764
|
-
: null}
|
765
|
-
|
766
|
-
|
767
|
-
{itemTd.viewFileDownload ?
|
768
|
-
|
769
|
-
item.viewFileDownload === undefined ?
|
770
|
-
|
771
|
-
<>
|
772
|
-
<span
|
773
|
-
data-tip
|
774
|
-
data-for='fileDownload'
|
775
|
-
onMouseEnter={handleMouseEnter}
|
776
|
-
onMouseLeave={handleMouseLeave}
|
777
|
-
>
|
778
|
-
<>
|
779
|
-
<Icon
|
780
|
-
id="fileDownload"
|
781
|
-
background="base"
|
782
|
-
name="fileDownload"
|
783
|
-
onClick={(e) => { onClickActionFileDownload(e, item) }}
|
784
|
-
/>
|
785
|
-
<Horizontal size="xs" />
|
786
|
-
</>
|
787
|
-
|
788
|
-
</span>
|
789
|
-
|
790
|
-
{isToolTipMounted ? (
|
791
|
-
<ReactTooltip id='fileDownload' type='error'>
|
792
|
-
<span>{txtTootipIconFileDownload}</span>
|
793
|
-
</ReactTooltip>
|
794
|
-
) : null}
|
795
|
-
</>
|
796
|
-
|
797
|
-
:
|
798
|
-
|
799
|
-
item.viewFileDownload ?
|
800
|
-
|
801
|
-
<>
|
802
|
-
<span
|
803
|
-
data-tip
|
804
|
-
data-for='fileDownload'
|
805
|
-
onMouseEnter={handleMouseEnter}
|
806
|
-
onMouseLeave={handleMouseLeave}
|
807
|
-
>
|
808
|
-
<>
|
809
|
-
<Icon
|
810
|
-
id="fileDownload"
|
811
|
-
background="base"
|
812
|
-
name="fileDownload"
|
813
|
-
onClick={(e) => { onClickActionFileDownload(e, item) }}
|
814
|
-
/>
|
815
|
-
<Horizontal size="xs" />
|
816
|
-
</>
|
817
|
-
|
818
|
-
</span>
|
819
|
-
|
820
|
-
{isToolTipMounted ? (
|
821
|
-
<ReactTooltip id='fileDownload' type='error'>
|
822
|
-
<span>{txtTootipIconFileDownload}</span>
|
823
|
-
</ReactTooltip>
|
824
|
-
) : null}
|
825
|
-
</>
|
826
|
-
|
827
|
-
: null
|
828
|
-
|
829
|
-
: null}
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
{itemTd.viewCheckbox ?
|
835
|
-
|
836
|
-
item.viewCheckbox === undefined ?
|
837
|
-
|
838
|
-
<>
|
839
|
-
<span
|
840
|
-
data-tip
|
841
|
-
data-for='checkbox'
|
842
|
-
onMouseEnter={handleMouseEnter}
|
843
|
-
onMouseLeave={handleMouseLeave}
|
844
|
-
>
|
845
|
-
<>
|
846
|
-
|
847
|
-
<Toggle
|
848
|
-
id={'idToggle' + item.id}
|
849
|
-
checked={item.isSelected}
|
850
|
-
label=""
|
851
|
-
onChangeCheckbox={(e) => { onClickActionCheckbox(e, item) }}
|
852
|
-
/>
|
853
|
-
|
854
|
-
{/* <Horizontal size="xs" /> */}
|
855
|
-
</>
|
856
|
-
|
857
|
-
</span>
|
858
|
-
|
859
|
-
{isToolTipMounted ? (
|
860
|
-
<ReactTooltip id='checkbox' type='error'>
|
861
|
-
<span>{txtTootipIconCheckbox}</span>
|
862
|
-
</ReactTooltip>
|
863
|
-
) : null}
|
864
|
-
</>
|
865
|
-
|
866
|
-
:
|
867
|
-
|
868
|
-
item.viewCheckbox ?
|
869
|
-
|
870
|
-
<>
|
871
|
-
<span
|
872
|
-
data-tip
|
873
|
-
data-for='checkbox'
|
874
|
-
onMouseEnter={handleMouseEnter}
|
875
|
-
onMouseLeave={handleMouseLeave}
|
876
|
-
>
|
877
|
-
<>
|
878
|
-
<Toggle
|
879
|
-
id={'idToggle' + item.id}
|
880
|
-
checked={item.isSelected}
|
881
|
-
label=""
|
882
|
-
onChangeCheckbox={(e) => { onClickActionCheckbox(e, item) }}
|
883
|
-
/>
|
884
|
-
|
885
|
-
{/* <Horizontal size="xs" /> */}
|
886
|
-
</>
|
887
|
-
|
888
|
-
</span>
|
889
|
-
|
890
|
-
{isToolTipMounted ? (
|
891
|
-
<ReactTooltip id='checkbox' type='error'>
|
892
|
-
<span>{txtTootipIconCheckbox}</span>
|
893
|
-
</ReactTooltip>
|
894
|
-
) : null}
|
895
|
-
</>
|
896
|
-
|
897
|
-
: null
|
898
|
-
|
899
|
-
: null}
|
900
|
-
|
901
|
-
{itemTd.viewUserView ?
|
902
|
-
|
903
|
-
item.viewUserView === undefined ?
|
904
|
-
|
905
|
-
<>
|
906
|
-
<span
|
907
|
-
data-tip
|
908
|
-
data-for='userView'
|
909
|
-
onMouseEnter={handleMouseEnter}
|
910
|
-
onMouseLeave={handleMouseLeave}
|
911
|
-
>
|
912
|
-
<>
|
913
|
-
<Icon
|
914
|
-
id="userView"
|
915
|
-
background="base"
|
916
|
-
name="userView"
|
917
|
-
onClick={(e) => { onClickActionUserView(e, item) }}
|
918
|
-
/>
|
919
|
-
<Horizontal size="xs" />
|
920
|
-
</>
|
921
|
-
|
922
|
-
</span>
|
923
|
-
|
924
|
-
{isToolTipMounted ? (
|
925
|
-
<ReactTooltip id='userView' type='error'>
|
926
|
-
<span>{txtTootipIconUserView}</span>
|
927
|
-
</ReactTooltip>
|
928
|
-
) : null}
|
929
|
-
</>
|
930
|
-
|
931
|
-
:
|
932
|
-
|
933
|
-
item.viewUserView ?
|
934
|
-
|
935
|
-
<>
|
936
|
-
<span
|
937
|
-
data-tip
|
938
|
-
data-for='userView'
|
939
|
-
onMouseEnter={handleMouseEnter}
|
940
|
-
onMouseLeave={handleMouseLeave}
|
941
|
-
>
|
942
|
-
<>
|
943
|
-
<Icon
|
944
|
-
id="userView"
|
945
|
-
background="base"
|
946
|
-
name="userView"
|
947
|
-
onClick={(e) => { onClickActionUserView(e, item) }}
|
948
|
-
/>
|
949
|
-
<Horizontal size="xs" />
|
950
|
-
</>
|
951
|
-
|
952
|
-
</span>
|
953
|
-
|
954
|
-
{isToolTipMounted ? (
|
955
|
-
<ReactTooltip id='userView' type='error'>
|
956
|
-
<span>{txtTootipIconUserView}</span>
|
957
|
-
</ReactTooltip>
|
958
|
-
) : null}
|
959
|
-
</>
|
960
|
-
|
961
|
-
: null
|
962
|
-
|
963
|
-
: null}
|
964
|
-
|
965
|
-
|
966
|
-
{itemTd.viewPlusCircle ?
|
967
|
-
|
968
|
-
item.viewPlusCircle === undefined ?
|
969
|
-
|
970
|
-
<>
|
971
|
-
<span
|
972
|
-
data-tip
|
973
|
-
data-for='plusCircle'
|
974
|
-
onMouseEnter={handleMouseEnter}
|
975
|
-
onMouseLeave={handleMouseLeave}
|
976
|
-
>
|
977
|
-
<>
|
978
|
-
<Icon
|
979
|
-
id="plusCircle"
|
980
|
-
background="base"
|
981
|
-
name="plusCircle"
|
982
|
-
onClick={(e) => { onClickActionPlusCircle(e, item) }}
|
983
|
-
/>
|
984
|
-
<Horizontal size="xs" />
|
985
|
-
</>
|
986
|
-
|
987
|
-
</span>
|
988
|
-
|
989
|
-
{isToolTipMounted ? (
|
990
|
-
<ReactTooltip id='plusCircle' type='error'>
|
991
|
-
<span>{txtTootipIconPlusCircle}</span>
|
992
|
-
</ReactTooltip>
|
993
|
-
) : null}
|
994
|
-
</>
|
995
|
-
|
996
|
-
:
|
997
|
-
|
998
|
-
item.viewPlusCircle ?
|
999
|
-
|
1000
|
-
<>
|
1001
|
-
<span
|
1002
|
-
data-tip
|
1003
|
-
data-for='plusCircle'
|
1004
|
-
onMouseEnter={handleMouseEnter}
|
1005
|
-
onMouseLeave={handleMouseLeave}
|
1006
|
-
>
|
1007
|
-
<>
|
1008
|
-
<Icon
|
1009
|
-
id="plusCircle"
|
1010
|
-
background="base"
|
1011
|
-
name="plusCircle"
|
1012
|
-
onClick={(e) => { onClickActionPlusCircle(e, item) }}
|
1013
|
-
/>
|
1014
|
-
<Horizontal size="xs" />
|
1015
|
-
</>
|
1016
|
-
|
1017
|
-
</span>
|
1018
|
-
|
1019
|
-
{isToolTipMounted ? (
|
1020
|
-
<ReactTooltip id='plusCircle' type='error'>
|
1021
|
-
<span>{txtTootipIconPlusCircle}</span>
|
1022
|
-
</ReactTooltip>
|
1023
|
-
) : null}
|
1024
|
-
</>
|
1025
|
-
|
1026
|
-
: null
|
1027
|
-
|
1028
|
-
: null}
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
{itemTd.viewTrash ?
|
1033
|
-
|
1034
|
-
item.viewTrash === undefined ?
|
1035
|
-
|
1036
|
-
<>
|
1037
|
-
<span
|
1038
|
-
data-tip
|
1039
|
-
data-for='trash'
|
1040
|
-
onMouseEnter={handleMouseEnter}
|
1041
|
-
onMouseLeave={handleMouseLeave}
|
1042
|
-
>
|
1043
|
-
<>
|
1044
|
-
<Icon
|
1045
|
-
background="base"
|
1046
|
-
name="trash"
|
1047
|
-
onClick={e => { onClickActionDelete(e, item) }}
|
1048
|
-
/>
|
1049
|
-
<Horizontal size="xs" />
|
1050
|
-
</>
|
1051
|
-
|
1052
|
-
</span>
|
1053
|
-
|
1054
|
-
{isToolTipMounted ? (
|
1055
|
-
<ReactTooltip id='trash' type='error'>
|
1056
|
-
<span>{txtTootipIconDelete}</span>
|
1057
|
-
</ReactTooltip>
|
1058
|
-
) : null}
|
1059
|
-
</>
|
1060
|
-
|
1061
|
-
:
|
1062
|
-
|
1063
|
-
item.viewTrash ?
|
1064
|
-
|
1065
|
-
<>
|
1066
|
-
<span
|
1067
|
-
data-tip
|
1068
|
-
data-for='trash'
|
1069
|
-
onMouseEnter={handleMouseEnter}
|
1070
|
-
onMouseLeave={handleMouseLeave}
|
1071
|
-
>
|
1072
|
-
<>
|
1073
|
-
<Icon
|
1074
|
-
background="base"
|
1075
|
-
name="trash"
|
1076
|
-
onClick={e => { onClickActionDelete(e, item) }}
|
1077
|
-
/>
|
1078
|
-
<Horizontal size="xs" />
|
1079
|
-
</>
|
1080
|
-
|
1081
|
-
</span>
|
1082
|
-
|
1083
|
-
{isToolTipMounted ? (
|
1084
|
-
<ReactTooltip id='trash' type='error'>
|
1085
|
-
<span>{txtTootipIconDelete}</span>
|
1086
|
-
</ReactTooltip>
|
1087
|
-
) : null}
|
1088
|
-
</>
|
1089
|
-
|
1090
|
-
: null
|
1091
|
-
|
1092
|
-
: null}
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
</td>
|
1099
|
-
|
1100
|
-
:
|
1101
|
-
|
1102
|
-
itemTd.subAccessor !== ''
|
1103
|
-
|
1104
|
-
?
|
1105
|
-
|
1106
|
-
<td style={{ color: item.colorTxtRow }} className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index)}>{item[itemTd.accessor][itemTd.subAccessor]}</td>
|
1107
|
-
|
1108
|
-
:
|
1109
|
-
|
1110
|
-
itemTd.typeFilter === 'date'
|
1111
|
-
|
1112
|
-
?
|
1113
|
-
|
1114
|
-
itemTd.typeFilterSub === 'date_only' ?
|
1115
|
-
|
1116
|
-
<td style={{ color: item.colorTxtRow }} className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index)}>
|
1117
|
-
|
1118
|
-
{item[itemTd.accessor] ? (
|
1119
|
-
|
1120
|
-
<Moment format="DD/MM/YYYY">
|
1121
|
-
{item[itemTd.accessor]}
|
1122
|
-
</Moment>
|
1123
|
-
|
1124
|
-
) : null}
|
1125
|
-
|
1126
|
-
</td>
|
1127
|
-
|
1128
|
-
:
|
1129
|
-
|
1130
|
-
<td style={{ color: item.colorTxtRow }} className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index)}>
|
1131
|
-
{/* <Moment format="DD/MM/YYYY hh:mm:ss"> */}
|
1132
|
-
{item[itemTd.accessor] ? (
|
1133
|
-
|
1134
|
-
<Moment format="DD/MM/YYYY HH:mm">
|
1135
|
-
{item[itemTd.accessor]}
|
1136
|
-
</Moment>
|
1137
|
-
|
1138
|
-
) : null}
|
1139
|
-
</td>
|
1140
|
-
:
|
1141
|
-
|
1142
|
-
itemTd.typeFilter === 'select'
|
1143
|
-
|
1144
|
-
?
|
1145
|
-
|
1146
|
-
itemTd.optionsSelect.map((itemSelect, indexSelect) => (
|
1147
|
-
|
1148
|
-
|
1149
|
-
item[itemTd.accessor] === itemSelect.value ?
|
1150
|
-
|
1151
|
-
<td style={{ color: item.colorTxtRow }} className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index) + indexSelect}>
|
1152
|
-
{itemSelect.label}
|
1153
|
-
</td>
|
1154
|
-
|
1155
|
-
:
|
1156
|
-
|
1157
|
-
null
|
1158
|
-
))
|
1159
|
-
|
1160
|
-
:
|
1161
|
-
|
1162
|
-
itemTd.typeFilter === 'number'
|
1163
|
-
|
1164
|
-
?
|
1165
|
-
|
1166
|
-
itemTd.subTypeFilter
|
1167
|
-
|
1168
|
-
?
|
1169
|
-
|
1170
|
-
itemTd.characterExtra === 'km'
|
1171
|
-
?
|
1172
|
-
<td style={{ color: item.colorTxtRow }} className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index)}>{(item[itemTd.accessor] / 1000).toString().replace(/\./g, ',')} {itemTd.characterExtra}</td>
|
1173
|
-
:
|
1174
|
-
<td style={{ color: item.colorTxtRow }} className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index)}>{item[itemTd.accessor].toFixed(2).toString().replace(/\./g, ',')} {itemTd.characterExtra}</td>
|
1175
|
-
:
|
1176
|
-
<td style={{ color: item.colorTxtRow }} className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index)}>{item[itemTd.accessor]}</td>
|
1177
|
-
|
1178
|
-
:
|
1179
|
-
|
1180
|
-
itemTd.subTypeFilter
|
1181
|
-
|
1182
|
-
?
|
1183
|
-
<td style={{ color: item.colorTxtRow }} className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index)}>{Number(item[itemTd.accessor]).toFixed(2).toString().replace(/\./g, ',')} {itemTd.characterExtra}</td>
|
1184
|
-
:
|
1185
|
-
<td style={{ color: item.colorTxtRow }} className={getStyles('td')} key={[itemTd.accessor] + (indexTd + index)}>{item[itemTd.accessor]}</td>
|
1186
|
-
|
1187
|
-
// <>
|
1188
|
-
|
1189
|
-
// <td
|
1190
|
-
// data-tip
|
1191
|
-
// data-for={'td' + [itemTd.accessor] + index}
|
1192
|
-
// onMouseEnter={handleMouseEnter}
|
1193
|
-
// onMouseLeave={handleMouseLeave}
|
1194
|
-
// className={getStyles('td')}
|
1195
|
-
// key={[itemTd.accessor] + (indexTd + index)}
|
1196
|
-
// >
|
1197
|
-
// {item[itemTd.accessor]}
|
1198
|
-
|
1199
|
-
// {/*
|
1200
|
-
// {isToolTipMounted ? (
|
1201
|
-
// <ReactTooltip id={'td' + [itemTd.accessor] + index} type='info'>
|
1202
|
-
// <span>{item[itemTd.accessor]}</span>
|
1203
|
-
// </ReactTooltip>
|
1204
|
-
// ) : null} */}
|
1205
|
-
|
1206
|
-
// </td>
|
1207
|
-
|
1208
|
-
// </>
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
750
|
+
{/* <Horizontal size="xs" /> */}
|
751
|
+
</>
|
752
|
+
</span>
|
753
|
+
|
754
|
+
{isToolTipMounted ? (
|
755
|
+
<ReactTooltip id="checkbox" type="error">
|
756
|
+
<span>{txtTootipIconCheckbox}</span>
|
757
|
+
</ReactTooltip>
|
758
|
+
) : null}
|
759
|
+
</>
|
760
|
+
) : item.viewCheckbox ? (
|
761
|
+
<>
|
762
|
+
<span
|
763
|
+
data-tip
|
764
|
+
data-for="checkbox"
|
765
|
+
onMouseEnter={handleMouseEnter}
|
766
|
+
onMouseLeave={handleMouseLeave}
|
767
|
+
>
|
768
|
+
<>
|
769
|
+
<Toggle
|
770
|
+
id={'idToggle' + item.id}
|
771
|
+
checked={item.isSelected}
|
772
|
+
label=""
|
773
|
+
onChangeCheckbox={(e) => {
|
774
|
+
onClickActionCheckbox(e, item)
|
775
|
+
}}
|
776
|
+
/>
|
1212
777
|
|
1213
|
-
|
1214
|
-
|
778
|
+
{/* <Horizontal size="xs" /> */}
|
779
|
+
</>
|
780
|
+
</span>
|
781
|
+
|
782
|
+
{isToolTipMounted ? (
|
783
|
+
<ReactTooltip id="checkbox" type="error">
|
784
|
+
<span>{txtTootipIconCheckbox}</span>
|
785
|
+
</ReactTooltip>
|
786
|
+
) : null}
|
787
|
+
</>
|
788
|
+
) : null
|
789
|
+
) : null}
|
790
|
+
|
791
|
+
{itemTd.viewUserView ? (
|
792
|
+
item.viewUserView === undefined ? (
|
793
|
+
<>
|
794
|
+
<span
|
795
|
+
data-tip
|
796
|
+
data-for="userView"
|
797
|
+
onMouseEnter={handleMouseEnter}
|
798
|
+
onMouseLeave={handleMouseLeave}
|
799
|
+
>
|
800
|
+
<>
|
801
|
+
<Icon
|
802
|
+
id="userView"
|
803
|
+
background="base"
|
804
|
+
name="userView"
|
805
|
+
onClick={(e) => {
|
806
|
+
onClickActionUserView(e, item)
|
807
|
+
}}
|
808
|
+
/>
|
809
|
+
<Horizontal size="xs" />
|
810
|
+
</>
|
811
|
+
</span>
|
812
|
+
|
813
|
+
{isToolTipMounted ? (
|
814
|
+
<ReactTooltip id="userView" type="error">
|
815
|
+
<span>{txtTootipIconUserView}</span>
|
816
|
+
</ReactTooltip>
|
817
|
+
) : null}
|
818
|
+
</>
|
819
|
+
) : item.viewUserView ? (
|
820
|
+
<>
|
821
|
+
<span
|
822
|
+
data-tip
|
823
|
+
data-for="userView"
|
824
|
+
onMouseEnter={handleMouseEnter}
|
825
|
+
onMouseLeave={handleMouseLeave}
|
826
|
+
>
|
827
|
+
<>
|
828
|
+
<Icon
|
829
|
+
id="userView"
|
830
|
+
background="base"
|
831
|
+
name="userView"
|
832
|
+
onClick={(e) => {
|
833
|
+
onClickActionUserView(e, item)
|
834
|
+
}}
|
835
|
+
/>
|
836
|
+
<Horizontal size="xs" />
|
837
|
+
</>
|
838
|
+
</span>
|
839
|
+
|
840
|
+
{isToolTipMounted ? (
|
841
|
+
<ReactTooltip id="userView" type="error">
|
842
|
+
<span>{txtTootipIconUserView}</span>
|
843
|
+
</ReactTooltip>
|
844
|
+
) : null}
|
845
|
+
</>
|
846
|
+
) : null
|
847
|
+
) : null}
|
848
|
+
|
849
|
+
{itemTd.viewPlusCircle ? (
|
850
|
+
item.viewPlusCircle === undefined ? (
|
851
|
+
<>
|
852
|
+
<span
|
853
|
+
data-tip
|
854
|
+
data-for="plusCircle"
|
855
|
+
onMouseEnter={handleMouseEnter}
|
856
|
+
onMouseLeave={handleMouseLeave}
|
857
|
+
>
|
858
|
+
<>
|
859
|
+
<Icon
|
860
|
+
id="plusCircle"
|
861
|
+
background="base"
|
862
|
+
name="plusCircle"
|
863
|
+
onClick={(e) => {
|
864
|
+
onClickActionPlusCircle(e, item)
|
865
|
+
}}
|
866
|
+
/>
|
867
|
+
<Horizontal size="xs" />
|
868
|
+
</>
|
869
|
+
</span>
|
870
|
+
|
871
|
+
{isToolTipMounted ? (
|
872
|
+
<ReactTooltip id="plusCircle" type="error">
|
873
|
+
<span>{txtTootipIconPlusCircle}</span>
|
874
|
+
</ReactTooltip>
|
875
|
+
) : null}
|
876
|
+
</>
|
877
|
+
) : item.viewPlusCircle ? (
|
878
|
+
<>
|
879
|
+
<span
|
880
|
+
data-tip
|
881
|
+
data-for="plusCircle"
|
882
|
+
onMouseEnter={handleMouseEnter}
|
883
|
+
onMouseLeave={handleMouseLeave}
|
884
|
+
>
|
885
|
+
<>
|
886
|
+
<Icon
|
887
|
+
id="plusCircle"
|
888
|
+
background="base"
|
889
|
+
name="plusCircle"
|
890
|
+
onClick={(e) => {
|
891
|
+
onClickActionPlusCircle(e, item)
|
892
|
+
}}
|
893
|
+
/>
|
894
|
+
<Horizontal size="xs" />
|
895
|
+
</>
|
896
|
+
</span>
|
897
|
+
|
898
|
+
{isToolTipMounted ? (
|
899
|
+
<ReactTooltip id="plusCircle" type="error">
|
900
|
+
<span>{txtTootipIconPlusCircle}</span>
|
901
|
+
</ReactTooltip>
|
902
|
+
) : null}
|
903
|
+
</>
|
904
|
+
) : null
|
905
|
+
) : null}
|
906
|
+
|
907
|
+
{itemTd.viewTrash ? (
|
908
|
+
item.viewTrash === undefined ? (
|
909
|
+
<>
|
910
|
+
<span
|
911
|
+
data-tip
|
912
|
+
data-for="trash"
|
913
|
+
onMouseEnter={handleMouseEnter}
|
914
|
+
onMouseLeave={handleMouseLeave}
|
915
|
+
>
|
916
|
+
<>
|
917
|
+
<Icon
|
918
|
+
background="base"
|
919
|
+
name="trash"
|
920
|
+
onClick={(e) => {
|
921
|
+
onClickActionDelete(e, item)
|
922
|
+
}}
|
923
|
+
/>
|
924
|
+
<Horizontal size="xs" />
|
925
|
+
</>
|
926
|
+
</span>
|
927
|
+
|
928
|
+
{isToolTipMounted ? (
|
929
|
+
<ReactTooltip id="trash" type="error">
|
930
|
+
<span>{txtTootipIconDelete}</span>
|
931
|
+
</ReactTooltip>
|
932
|
+
) : null}
|
933
|
+
</>
|
934
|
+
) : item.viewTrash ? (
|
935
|
+
<>
|
936
|
+
<span
|
937
|
+
data-tip
|
938
|
+
data-for="trash"
|
939
|
+
onMouseEnter={handleMouseEnter}
|
940
|
+
onMouseLeave={handleMouseLeave}
|
941
|
+
>
|
942
|
+
<>
|
943
|
+
<Icon
|
944
|
+
background="base"
|
945
|
+
name="trash"
|
946
|
+
onClick={(e) => {
|
947
|
+
onClickActionDelete(e, item)
|
948
|
+
}}
|
949
|
+
/>
|
950
|
+
<Horizontal size="xs" />
|
951
|
+
</>
|
952
|
+
</span>
|
953
|
+
|
954
|
+
{isToolTipMounted ? (
|
955
|
+
<ReactTooltip id="trash" type="error">
|
956
|
+
<span>{txtTootipIconDelete}</span>
|
957
|
+
</ReactTooltip>
|
958
|
+
) : null}
|
959
|
+
</>
|
960
|
+
) : null
|
961
|
+
) : null}
|
962
|
+
</td>
|
963
|
+
) : itemTd.subAccessor !== '' ? (
|
964
|
+
<td
|
965
|
+
style={{ color: item.colorTxtRow }}
|
966
|
+
className={getStyles('td')}
|
967
|
+
key={[itemTd.accessor] + (indexTd + index)}
|
968
|
+
>
|
969
|
+
{item[itemTd.accessor][itemTd.subAccessor]}
|
970
|
+
</td>
|
971
|
+
) : itemTd.typeFilter === 'date' ? (
|
972
|
+
itemTd.typeFilterSub === 'date_only' ? (
|
973
|
+
<td
|
974
|
+
style={{ color: item.colorTxtRow }}
|
975
|
+
className={getStyles('td')}
|
976
|
+
key={[itemTd.accessor] + (indexTd + index)}
|
977
|
+
>
|
978
|
+
{item[itemTd.accessor] ? (
|
979
|
+
<Moment format="DD/MM/YYYY">
|
980
|
+
{item[itemTd.accessor]}
|
981
|
+
</Moment>
|
982
|
+
) : null}
|
983
|
+
</td>
|
984
|
+
) : (
|
985
|
+
<td
|
986
|
+
style={{ color: item.colorTxtRow }}
|
987
|
+
className={getStyles('td')}
|
988
|
+
key={[itemTd.accessor] + (indexTd + index)}
|
989
|
+
>
|
990
|
+
{/* <Moment format="DD/MM/YYYY hh:mm:ss"> */}
|
991
|
+
{item[itemTd.accessor] ? (
|
992
|
+
<Moment format="DD/MM/YYYY HH:mm">
|
993
|
+
{item[itemTd.accessor]}
|
994
|
+
</Moment>
|
995
|
+
) : null}
|
996
|
+
</td>
|
997
|
+
)
|
998
|
+
) : itemTd.typeFilter === 'select' ? (
|
999
|
+
itemTd.optionsSelect.map((itemSelect, indexSelect) =>
|
1000
|
+
item[itemTd.accessor] === itemSelect.value ? (
|
1001
|
+
<td
|
1002
|
+
style={{ color: item.colorTxtRow }}
|
1003
|
+
className={getStyles('td')}
|
1004
|
+
key={[itemTd.accessor] + (indexTd + index) + indexSelect}
|
1005
|
+
>
|
1006
|
+
{itemSelect.label}
|
1007
|
+
</td>
|
1008
|
+
) : null
|
1009
|
+
)
|
1010
|
+
) : itemTd.typeFilter === 'number' ? (
|
1011
|
+
itemTd.subTypeFilter ? (
|
1012
|
+
itemTd.characterExtra === 'km' ? (
|
1013
|
+
<td
|
1014
|
+
style={{ color: item.colorTxtRow }}
|
1015
|
+
className={getStyles('td')}
|
1016
|
+
key={[itemTd.accessor] + (indexTd + index)}
|
1017
|
+
>
|
1018
|
+
{(item[itemTd.accessor] / 1000)
|
1019
|
+
.toString()
|
1020
|
+
.replace(/\./g, ',')}{' '}
|
1021
|
+
{itemTd.characterExtra}
|
1022
|
+
</td>
|
1023
|
+
) : (
|
1024
|
+
<td
|
1025
|
+
style={{ color: item.colorTxtRow }}
|
1026
|
+
className={getStyles('td')}
|
1027
|
+
key={[itemTd.accessor] + (indexTd + index)}
|
1028
|
+
>
|
1029
|
+
{item[itemTd.accessor]
|
1030
|
+
?.toFixed(2)
|
1031
|
+
?.toString()
|
1032
|
+
?.replace(/\./g, ',')}{' '}
|
1033
|
+
{item[itemTd.accessor] ? itemTd.characterExtra : ''}
|
1034
|
+
</td>
|
1035
|
+
)
|
1036
|
+
) : (
|
1037
|
+
<td
|
1038
|
+
style={{ color: item.colorTxtRow }}
|
1039
|
+
className={getStyles('td')}
|
1040
|
+
key={[itemTd.accessor] + (indexTd + index)}
|
1041
|
+
>
|
1042
|
+
{item[itemTd.accessor]}
|
1043
|
+
</td>
|
1044
|
+
)
|
1045
|
+
) : itemTd.subTypeFilter ? (
|
1046
|
+
<td
|
1047
|
+
style={{ color: item.colorTxtRow }}
|
1048
|
+
className={getStyles('td')}
|
1049
|
+
key={[itemTd.accessor] + (indexTd + index)}
|
1050
|
+
>
|
1051
|
+
{Number(item[itemTd.accessor])
|
1052
|
+
.toFixed(2)
|
1053
|
+
.toString()
|
1054
|
+
.replace(/\./g, ',')}{' '}
|
1055
|
+
{itemTd.characterExtra}
|
1056
|
+
</td>
|
1057
|
+
) : (
|
1058
|
+
<td
|
1059
|
+
style={{ color: item.colorTxtRow }}
|
1060
|
+
className={getStyles('td')}
|
1061
|
+
key={[itemTd.accessor] + (indexTd + index)}
|
1062
|
+
>
|
1063
|
+
{item[itemTd.accessor]}
|
1064
|
+
</td>
|
1065
|
+
)
|
1066
|
+
) : // <>
|
1067
|
+
|
1068
|
+
// <td
|
1069
|
+
// data-tip
|
1070
|
+
// data-for={'td' + [itemTd.accessor] + index}
|
1071
|
+
// onMouseEnter={handleMouseEnter}
|
1072
|
+
// onMouseLeave={handleMouseLeave}
|
1073
|
+
// className={getStyles('td')}
|
1074
|
+
// key={[itemTd.accessor] + (indexTd + index)}
|
1075
|
+
// >
|
1076
|
+
// {item[itemTd.accessor]}
|
1077
|
+
|
1078
|
+
// {/*
|
1079
|
+
// {isToolTipMounted ? (
|
1080
|
+
// <ReactTooltip id={'td' + [itemTd.accessor] + index} type='info'>
|
1081
|
+
// <span>{item[itemTd.accessor]}</span>
|
1082
|
+
// </ReactTooltip>
|
1083
|
+
// ) : null} */}
|
1084
|
+
|
1085
|
+
// </td>
|
1086
|
+
|
1087
|
+
// </>
|
1088
|
+
|
1089
|
+
null
|
1090
|
+
)}
|
1215
1091
|
</tr>
|
1216
|
-
|
1217
|
-
|
1218
|
-
}
|
1219
|
-
</tbody >
|
1092
|
+
))}
|
1093
|
+
</tbody>
|
1220
1094
|
// </table>
|
1221
1095
|
|
1222
1096
|
// </div>
|
@@ -1254,26 +1128,26 @@ RowTable.propTypes = {
|
|
1254
1128
|
txtTootipIconCheckbox: PropTypes.string,
|
1255
1129
|
txtTootipIconPlusCircle: PropTypes.string,
|
1256
1130
|
colorRow: PropTypes.string,
|
1257
|
-
isCheckedCheckbox: PropTypes.bool
|
1131
|
+
isCheckedCheckbox: PropTypes.bool,
|
1258
1132
|
}
|
1259
1133
|
|
1260
1134
|
RowTable.defaultProps = {
|
1261
|
-
getStyles: () => {
|
1135
|
+
getStyles: () => {},
|
1262
1136
|
isClickRow: false,
|
1263
|
-
onClickRow: () => {
|
1264
|
-
onClickCheckbox: () => {
|
1265
|
-
onClickActionUserView: () => {
|
1266
|
-
onClickActionListInvoice: () => {
|
1267
|
-
onClickActionListXLS: () => {
|
1268
|
-
onClickActionListCSV: () => {
|
1269
|
-
onClickActionListPDF: () => {
|
1270
|
-
onClickActionEdit: () => {
|
1271
|
-
onClickActionSendEmail: () => {
|
1272
|
-
onClickActionDelete: () => {
|
1273
|
-
onClickActionLink: () => {
|
1274
|
-
onClickActionClone: () => {
|
1275
|
-
onClickActionCheckbox: () => {
|
1276
|
-
onClickActionPlusCircle: () => {
|
1137
|
+
onClickRow: () => {},
|
1138
|
+
onClickCheckbox: () => {},
|
1139
|
+
onClickActionUserView: () => {},
|
1140
|
+
onClickActionListInvoice: () => {},
|
1141
|
+
onClickActionListXLS: () => {},
|
1142
|
+
onClickActionListCSV: () => {},
|
1143
|
+
onClickActionListPDF: () => {},
|
1144
|
+
onClickActionEdit: () => {},
|
1145
|
+
onClickActionSendEmail: () => {},
|
1146
|
+
onClickActionDelete: () => {},
|
1147
|
+
onClickActionLink: () => {},
|
1148
|
+
onClickActionClone: () => {},
|
1149
|
+
onClickActionCheckbox: () => {},
|
1150
|
+
onClickActionPlusCircle: () => {},
|
1277
1151
|
txtTootipIconUserView: '',
|
1278
1152
|
txtTootipIconListInvoice: '',
|
1279
1153
|
txtTootipIconListListXLS: '',
|
@@ -1286,8 +1160,7 @@ RowTable.defaultProps = {
|
|
1286
1160
|
txtTootipIconClone: '',
|
1287
1161
|
txtTootipIconCheckbox: '',
|
1288
1162
|
txtTootipIconPlusCircle: '',
|
1289
|
-
isCheckedCheckbox: false
|
1290
|
-
|
1163
|
+
isCheckedCheckbox: false,
|
1291
1164
|
}
|
1292
1165
|
|
1293
1166
|
export default withStyles(styles)(RowTable)
|