imbric-theme 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. package/Dockerfile +18 -0
  2. package/atoms/Checkbox/Checkbox.js +1 -1
  3. package/atoms/Icon/constants.js +55 -2
  4. package/atoms/Input/Input.js +5 -5
  5. package/atoms/Input/Input.stories.js +1 -1
  6. package/atoms/Input/constants.js +1 -1
  7. package/atoms/Toggle/Toggle.js +56 -0
  8. package/atoms/Toggle/Toggle.module.css +41 -0
  9. package/atoms/Toggle/Toggle.stories.js +21 -0
  10. package/atoms/Toggle/constants.js +1 -0
  11. package/atoms/Toggle/index.js +3 -0
  12. package/index.js +4 -0
  13. package/molecules/CardProductTypesBooking/CardProductTypesBooking.js +5 -3
  14. package/molecules/CardProductTypesBooking/CardProductTypesBooking.module.css +5 -1
  15. package/molecules/CardServiceDetail/CardServiceDetail.js +367 -0
  16. package/molecules/CardServiceDetail/CardServiceDetail.module.css +222 -0
  17. package/molecules/CardServiceDetail/CardServiceDetail.stories.js +23 -0
  18. package/molecules/CardServiceDetail/constants.js +1 -0
  19. package/molecules/CardServiceDetail/index.js +3 -0
  20. package/molecules/CardServices/CardServices.js +175 -45
  21. package/molecules/CardServices/CardServices.module.css +116 -4
  22. package/molecules/ColumnTable/ColumnTable.js +5 -3
  23. package/molecules/ColumnTable/ColumnTable.module.css +12 -0
  24. package/molecules/Dropdown/Dropdown.js +1 -1
  25. package/molecules/RowTable/RowTable.js +59 -22
  26. package/molecules/RowTable/RowTable.module.css +4 -0
  27. package/molecules/RowTable/constants.js +5 -2
  28. package/package.json +2 -1
  29. package/public/static/images/bank-cash-dollar-finance-money-payment-2-svgrepo-com.svg +13 -0
  30. package/public/static/images/buy-ecommerce-label-money-price-sale-svgrepo-com.svg +13 -0
  31. package/public/static/images/distance-svgrepo-com.svg +21 -0
  32. package/public/static/images/message-svgrepo-com.svg +15 -0
  33. package/public/static/images/pin-distance-svgrepo-com.svg +13 -0
  34. package/.eslintcache +0 -1
  35. package/storybook-static/0.263f852f.iframe.bundle.js +0 -1
  36. package/storybook-static/0.91dbd3f3aa2099d25061.manager.bundle.js +0 -1
  37. package/storybook-static/1.17e9ac7e.iframe.bundle.js +0 -3
  38. package/storybook-static/1.17e9ac7e.iframe.bundle.js.LICENSE.txt +0 -8
  39. package/storybook-static/1.17e9ac7e.iframe.bundle.js.map +0 -1
  40. package/storybook-static/2.cc4000c2.iframe.bundle.js +0 -1
  41. package/storybook-static/3.e9f95d01.iframe.bundle.js +0 -1
  42. package/storybook-static/4.be0a752c9f5176d6eec1.manager.bundle.js +0 -2
  43. package/storybook-static/4.be0a752c9f5176d6eec1.manager.bundle.js.LICENSE.txt +0 -8
  44. package/storybook-static/5.8efdde123acaf8fbb100.manager.bundle.js +0 -1
  45. package/storybook-static/6.2f82294ae0b087aecb24.manager.bundle.js +0 -2
  46. package/storybook-static/6.2f82294ae0b087aecb24.manager.bundle.js.LICENSE.txt +0 -12
  47. package/storybook-static/7.97068037.iframe.bundle.js +0 -1
  48. package/storybook-static/7.fa9452d2609e8a00f314.manager.bundle.js +0 -1
  49. package/storybook-static/8.66f5ef1c66fc4628f127.manager.bundle.js +0 -1
  50. package/storybook-static/8.b545d602.iframe.bundle.js +0 -3
  51. package/storybook-static/8.b545d602.iframe.bundle.js.LICENSE.txt +0 -12
  52. package/storybook-static/8.b545d602.iframe.bundle.js.map +0 -1
  53. package/storybook-static/9.269ed917.iframe.bundle.js +0 -1
  54. package/storybook-static/favicon.ico +0 -0
  55. package/storybook-static/iframe.html +0 -348
  56. package/storybook-static/index.html +0 -59
  57. package/storybook-static/main.157061c9.iframe.bundle.js +0 -1
  58. package/storybook-static/main.5a07347846ccf2d7e5dc.manager.bundle.js +0 -1
  59. package/storybook-static/runtime~main.a14e6e62.iframe.bundle.js +0 -1
  60. package/storybook-static/runtime~main.f78c3fae275fc212c109.manager.bundle.js +0 -1
  61. package/storybook-static/static/logo.svg +0 -19
  62. package/storybook-static/static/logologin.svg +0 -16
  63. package/storybook-static/static/logotipo.svg +0 -50
  64. package/storybook-static/static/logotipoS.svg +0 -26
  65. package/storybook-static/vendors~main.720e76f4.iframe.bundle.js +0 -3
  66. package/storybook-static/vendors~main.720e76f4.iframe.bundle.js.LICENSE.txt +0 -110
  67. package/storybook-static/vendors~main.720e76f4.iframe.bundle.js.map +0 -1
  68. package/storybook-static/vendors~main.fcd0b2a3431ddf75f5f7.manager.bundle.js +0 -2
  69. package/storybook-static/vendors~main.fcd0b2a3431ddf75f5f7.manager.bundle.js.LICENSE.txt +0 -101
@@ -1,5 +1,6 @@
1
- import React from 'react'
1
+ import React, { useState } from 'react'
2
2
  import PropTypes from 'prop-types'
3
+ import ReactTooltip from 'react-tooltip'
3
4
  import { Horizontal, Vertical } from '../../layout/Spacer/components'
4
5
  import Label from '../../atoms/Label'
5
6
  import Icon from '../../atoms/Icon'
@@ -8,7 +9,6 @@ import styles from './CardServices.module.css'
8
9
  import { options } from './constants'
9
10
  import withStyles from '../../hocs/withStyles'
10
11
 
11
-
12
12
  export const handleClick = ({ onClick }) => (event) => {
13
13
  onClick(event)
14
14
  }
@@ -24,15 +24,40 @@ export const CardServices = ({
24
24
  txtUserService,
25
25
  txtRefService,
26
26
  txtUserNumberService,
27
+ onClickUserView,
28
+ txtTootipUserView,
27
29
  onClickReturnOrder,
28
-
30
+ txtTootipReturnOrder,
31
+ onClickRepeatOrder,
32
+ txtTootipRepeatOrder,
33
+ onClickEdit,
34
+ txtTootipEdit,
35
+ onClickTrash,
36
+ txtTootipTrash,
37
+ selectCard,
38
+ statusService,
29
39
  }) => {
40
+
41
+ // STATE TOOLTIP
42
+ const [isToolTipMounted, setIsToolTipMounted] = useState(false)
43
+
44
+ // TOOLTIP
45
+ const handleMouseEnter = () => {
46
+ setIsToolTipMounted(true)
47
+ }
48
+ const handleMouseLeave = () => {
49
+ setIsToolTipMounted(false)
50
+ }
51
+
52
+
30
53
  return (
31
54
  <div
32
55
  onClick={onClick && handleClick({ onClick })}
33
- className={getStyles('card-services', {
34
- 'is-clickable': isClickable,
35
- })}
56
+ className={getStyles('card-services',
57
+ { 'is-clickable': isClickable, },
58
+ { 'selectCard': selectCard },
59
+ // { 'flip-out-hor-bottom': selectCard }
60
+ )}
36
61
  >
37
62
 
38
63
  <div>
@@ -178,82 +203,165 @@ export const CardServices = ({
178
203
  </div>
179
204
 
180
205
  </div>
181
- {/* <Vertical size="xs" /> */}
182
206
 
183
207
  <div className={getStyles('card-content-action')}>
184
208
 
185
209
  <div className={getStyles('card-subcontent-action')}>
186
210
 
187
- <Icon
188
- name="userView"
189
- onClick={function noRefCheck() { }}
190
- size="sm"
191
- />
211
+ <span
212
+ data-tip
213
+ data-for='userView'
214
+ onMouseEnter={handleMouseEnter}
215
+ onMouseLeave={handleMouseLeave}
216
+ >
217
+ <Icon
218
+ color="highlight"
219
+ id='userViewIcon'
220
+ isClickable
221
+ name="userView"
222
+ onClick={onClickUserView}
223
+ size="sm"
224
+ className={getStyles('icon-view')}
225
+ />
226
+
227
+ </span>
228
+
229
+ {isToolTipMounted ? (
230
+ <ReactTooltip id='userView' type='error'>
231
+ <span>{txtTootipUserView}</span>
232
+ </ReactTooltip>
233
+ ) : null}
192
234
 
193
235
  </div>
194
236
 
195
-
196
-
197
237
  <div className={getStyles('card-subcontent-action')}>
198
238
 
199
- <Icon
200
- name="returnOrder"
201
- onClick={onClickReturnOrder}
202
- size="sm"
203
- />
239
+ <span
240
+ data-tip
241
+ data-for='returnOrder'
242
+ onMouseEnter={handleMouseEnter}
243
+ onMouseLeave={handleMouseLeave}
244
+ >
245
+ <Icon
246
+ color="highlight"
247
+ id='returnOrderIcon'
248
+ isClickable
249
+ name="returnOrder"
250
+ onClick={onClickReturnOrder}
251
+ size="sm"
252
+ className={getStyles('icon-view')}
253
+ />
254
+
255
+ </span>
256
+
257
+ {isToolTipMounted ? (
258
+ <ReactTooltip id='returnOrder' type='error'>
259
+ <span>{txtTootipReturnOrder}</span>
260
+ </ReactTooltip>
261
+ ) : null}
204
262
 
205
263
  </div>
206
264
 
207
-
208
-
209
265
  <div className={getStyles('card-subcontent-action')}>
210
266
 
211
- <Icon
212
- name="repeatOrder"
213
- onClick={function noRefCheck() { }}
214
- size="sm"
215
- />
216
-
217
- </div>
267
+ <span
268
+ data-tip
269
+ data-for='repeatOrder'
270
+ onMouseEnter={handleMouseEnter}
271
+ onMouseLeave={handleMouseLeave}
272
+ >
273
+ <Icon
274
+ color="highlight"
275
+ id='repeatOrderIcon'
276
+ isClickable
277
+ name="repeatOrder"
278
+ onClick={onClickRepeatOrder}
279
+ size="sm"
280
+ className={getStyles('icon-view')}
281
+ />
282
+
283
+ </span>
284
+
285
+ {isToolTipMounted ? (
286
+ <ReactTooltip id='repeatOrder' type='error'>
287
+ <span>{txtTootipRepeatOrder}</span>
288
+ </ReactTooltip>
289
+ ) : null}
218
290
 
219
291
 
292
+ </div>
220
293
 
221
294
  <div className={getStyles('card-subcontent-action')}>
222
295
 
223
- <Icon
224
- name="edit"
225
- onClick={function noRefCheck() { }}
226
- size="sm"
227
- />
228
-
229
- </div>
296
+ <span
297
+ data-tip
298
+ data-for='edit'
299
+ onMouseEnter={handleMouseEnter}
300
+ onMouseLeave={handleMouseLeave}
301
+ >
302
+ <Icon
303
+ color="highlight"
304
+ id='editIcon'
305
+ isClickable
306
+ name="edit"
307
+ onClick={onClickEdit}
308
+ size="sm"
309
+ className={getStyles('icon-view')}
310
+ />
311
+
312
+ </span>
313
+
314
+ {isToolTipMounted ? (
315
+ <ReactTooltip id='edit' type='error'>
316
+ <span>{txtTootipEdit}</span>
317
+ </ReactTooltip>
318
+ ) : null}
230
319
 
231
320
 
321
+ </div>
232
322
 
233
323
  <div className={getStyles('card-subcontent-action')}>
234
324
 
235
- <Icon
236
- name="trash"
237
- onClick={function noRefCheck() { }}
238
- size="sm"
239
- />
325
+ <span
326
+ data-tip
327
+ data-for='trash'
328
+ onMouseEnter={handleMouseEnter}
329
+ onMouseLeave={handleMouseLeave}
330
+ >
331
+ <Icon
332
+ color="highlight"
333
+ id='trashIcon'
334
+ isClickable
335
+ name="trash"
336
+ onClick={onClickTrash}
337
+ size="sm"
338
+ className={getStyles('icon-view-delete')}
339
+ />
340
+
341
+ </span>
342
+
343
+ {isToolTipMounted ? (
344
+ <ReactTooltip id='trash' type='error'>
345
+ <span>{txtTootipTrash}</span>
346
+ </ReactTooltip>
347
+ ) : null}
240
348
 
241
349
  </div>
242
350
 
243
-
244
-
245
351
  <div className={getStyles('card-subcontent-action')}>
246
352
 
247
353
  <Icon
354
+ className={getStyles(
355
+ { 'icon-view-status10': statusService === 10 || -30 },
356
+ { 'icon-view-status20': statusService === 20 },
357
+ // { 'icon-view-status30': statusService === 30 || -20 || -40 },
358
+ )}
248
359
  name="circleStatus"
249
- onClick={function noRefCheck() { }}
250
360
  size="sm"
251
361
  />
252
362
 
253
363
  </div>
254
364
 
255
-
256
-
257
365
  </div>
258
366
 
259
367
  {/* {children} */}
@@ -272,7 +380,18 @@ CardServices.propTypes = {
272
380
  txtUserService: PropTypes.string,
273
381
  txtRefService: PropTypes.string,
274
382
  txtUserNumberService: PropTypes.string,
383
+ onClickUserView: PropTypes.func,
384
+ txtTootipUserView: PropTypes.string,
275
385
  onClickReturnOrder: PropTypes.func,
386
+ txtTootipReturnOrder: PropTypes.string,
387
+ onClickRepeatOrder: PropTypes.func,
388
+ txtTootipRepeatOrder: PropTypes.string,
389
+ onClickEdit: PropTypes.func,
390
+ txtTootipEdit: PropTypes.string,
391
+ onClickTrash: PropTypes.func,
392
+ txtTootipTrash: PropTypes.string,
393
+ selectCard: PropTypes.bool,
394
+ statusService: PropTypes.number,
276
395
  }
277
396
 
278
397
  CardServices.defaultProps = {
@@ -284,7 +403,18 @@ CardServices.defaultProps = {
284
403
  txtUserService: 'Alberto Alvarez',
285
404
  txtRefService: '1946980768',
286
405
  txtUserNumberService: 'WF3941',
406
+ onClickUserView: () => { },
407
+ txtTootipUserView: 'Ver detalle del servicio',
287
408
  onClickReturnOrder: () => { },
409
+ txtTootipReturnOrder: 'Crear retorno del servicio',
410
+ onClickRepeatOrder: () => { },
411
+ txtTootipRepeatOrder: 'Repetir servicio',
412
+ onClickEdit: () => { },
413
+ txtTootipEdit: 'Editar servicio (solo se puede editar 60min. antes)',
414
+ onClickTrash: () => { },
415
+ txtTootipTrash: 'Cancelar servicio',
416
+ selectCard: false,
417
+ statusService: 10,
288
418
  }
289
419
 
290
420
  export default withStyles(styles)(CardServices)
@@ -2,7 +2,7 @@
2
2
  /* display: flex; */
3
3
  width: 100%;
4
4
  align-items: center;
5
- padding: 10px;
5
+ padding: 2px 10px;
6
6
  border: var(--border-width-thin) solid var(--color-base-transparent);
7
7
  border-radius: var(--card-border-radius);
8
8
  box-shadow: 0px 2px 1px -1px rgb(0 0 0 / 20%), 0px 1px 1px 0px rgb(0 0 0 / 14%), 0px 1px 3px 0px rgb(0 0 0 / 12%);
@@ -11,13 +11,13 @@
11
11
  background-color: #fff;
12
12
  margin: 0;
13
13
  cursor: auto;
14
- max-width: 450px;
15
- min-width: 450px;
14
+ max-width: 360px;
15
+ min-width: 360px;
16
16
 
17
17
  align-items: center;
18
18
  align-content: center;
19
19
  justify-content: space-around;
20
- margin-right: 10px;
20
+ margin-bottom: 10px;
21
21
  display: flex;
22
22
 
23
23
  }
@@ -90,4 +90,116 @@
90
90
  .card-services.is-clickable:active,
91
91
  .card-services.is-draggable:active {
92
92
  box-shadow: var(--box-shadow-xs);
93
+ }
94
+
95
+ .selectCard {
96
+ border-top: 4px solid #39b54a;
97
+ border-bottom: 4px solid #00a3ff;
98
+ border-left: 1px solid #39b54a;
99
+ border-right: 1px solid #00a3ff;
100
+ -webkit-box-sizing: border-box;
101
+ -moz-box-sizing: border-box;
102
+ box-sizing: border-box;
103
+ background-position: 0 0, 100% 0;
104
+ background-repeat: no-repeat;
105
+ -webkit-background-size: 4px 100%;
106
+ -moz-background-size: 4px 100%;
107
+ background-size: 4px 100%;
108
+ background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMSAxIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIj48bGluZWFyR3JhZGllbnQgaWQ9Imxlc3NoYXQtZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiMzYWNmZDUiIHN0b3Atb3BhY2l0eT0iMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzNhNGVkNSIgc3RvcC1vcGFjaXR5PSIxIi8+PC9saW5lYXJHcmFkaWVudD48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2xlc3NoYXQtZ2VuZXJhdGVkKSIgLz48L3N2Zz4=),url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMSAxIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIj48bGluZWFyR3JhZGllbnQgaWQ9Imxlc3NoYXQtZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiMzYWNmZDUiIHN0b3Atb3BhY2l0eT0iMSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzNhNGVkNSIgc3RvcC1vcGFjaXR5PSIxIi8+PC9saW5lYXJHcmFkaWVudD48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2xlc3NoYXQtZ2VuZXJhdGVkKSIgLz48L3N2Zz4=);
109
+ background-image: -webkit-linear-gradient(top, #39b54a 0%, #00a3ff 100%), -webkit-linear-gradient(top, #39b54a 0%, #00a3ff 100%);
110
+ background-image: -moz-linear-gradient(top, #39b54a 0%, #00a3ff 100%), -moz-linear-gradient(top, #39b54a 0%, #00a3ff 100%);
111
+ background-image: -o-linear-gradient(top, #39b54a 0%, #00a3ff 100%), -o-linear-gradient(top, #39b54a 0%, #00a3ff 100%);
112
+ background-image: linear-gradient(to bottom, #39b54a 0%, #00a3ff 100%), linear-gradient(to bottom, #39b54a 0%, #00a3ff 100%);
113
+ }
114
+
115
+ .flip-out-hor-bottom {
116
+ -webkit-animation: flip-out-hor-bottom 0.45s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
117
+ animation: flip-out-hor-bottom 0.45s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
118
+ }
119
+
120
+ .flip-in-hor-bottom {
121
+ -webkit-animation: flip-in-hor-bottom 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
122
+ animation: flip-in-hor-bottom 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
123
+ }
124
+
125
+ /**
126
+ * ----------------------------------------
127
+ * animation flip-out-hor-bottom
128
+ * ----------------------------------------
129
+ */
130
+ @-webkit-keyframes flip-out-hor-bottom {
131
+ 0% {
132
+ -webkit-transform: rotateX(0);
133
+ transform: rotateX(0);
134
+ opacity: 1;
135
+ }
136
+ 100% {
137
+ -webkit-transform: rotateX(-70deg);
138
+ transform: rotateX(-70deg);
139
+ opacity: 0;
140
+ }
141
+ }
142
+ @keyframes flip-out-hor-bottom {
143
+ 0% {
144
+ -webkit-transform: rotateX(0);
145
+ transform: rotateX(0);
146
+ opacity: 1;
147
+ }
148
+ 100% {
149
+ -webkit-transform: rotateX(-70deg);
150
+ transform: rotateX(-70deg);
151
+ opacity: 0;
152
+ }
153
+ }
154
+
155
+
156
+ /**
157
+ * ----------------------------------------
158
+ * animation flip-in-hor-bottom
159
+ * ----------------------------------------
160
+ */
161
+ @-webkit-keyframes flip-in-hor-bottom {
162
+ 0% {
163
+ -webkit-transform: rotateX(80deg);
164
+ transform: rotateX(80deg);
165
+ opacity: 0;
166
+ }
167
+ 100% {
168
+ -webkit-transform: rotateX(0);
169
+ transform: rotateX(0);
170
+ opacity: 1;
171
+ }
172
+ }
173
+ @keyframes flip-in-hor-bottom {
174
+ 0% {
175
+ -webkit-transform: rotateX(80deg);
176
+ transform: rotateX(80deg);
177
+ opacity: 0;
178
+ }
179
+ 100% {
180
+ -webkit-transform: rotateX(0);
181
+ transform: rotateX(0);
182
+ opacity: 1;
183
+ }
184
+ }
185
+
186
+
187
+ .icon-view:hover svg path {
188
+ fill: var(--color-primary-muted);
189
+ }
190
+
191
+ .icon-view-delete:hover svg path {
192
+ fill: var(--color-secondary-muted);
193
+ }
194
+
195
+ .icon-view-status10 svg circle {
196
+ fill: #00a3ff;
197
+ }
198
+
199
+ .icon-view-status20 svg circle {
200
+ fill: #39b54a;
201
+ }
202
+
203
+ .icon-view-status30 svg circle {
204
+ fill: #8F12FE;
93
205
  }
@@ -51,9 +51,11 @@ export const ColumnTable = ({ getStyles, handleSorting, columnUppercase, onChang
51
51
  // setAccessor()
52
52
  (<th
53
53
  key={item.idInput}
54
- className={getStyles('column-table', {
55
- 'column-uppercase': columnUppercase,
56
- })}>
54
+ className={getStyles('column-table',
55
+ {'column-uppercase': columnUppercase},
56
+ {'thacction': item.accessor === 'iconUrl' } ,
57
+ {'thcheckbox': item.isCheckbox }
58
+ )}>
57
59
 
58
60
  <span onClick={item.sortable ? () => handleSortingChange(item.accessor) : null}>
59
61
  <Paragraph
@@ -21,4 +21,16 @@
21
21
  /* background-color: -webkit-linear-gradient(left, #25c481, #25b7c4);
22
22
  background-color: linear-gradient(to right, #25c481, #25b7c4); */
23
23
  border: 1px solid rgba(0, 0, 0, 0.1);
24
+ }
25
+
26
+ .thacction {
27
+ max-width: 80px;
28
+ min-width: 80px;
29
+ width: 80px;
30
+ }
31
+
32
+ .thcheckbox {
33
+ max-width: 80px;
34
+ min-width: 80px;
35
+ width: 80px;
24
36
  }
@@ -16,13 +16,13 @@ export const Dropdown = ({
16
16
  }) => {
17
17
  return (
18
18
  <div
19
- id={id}
20
19
  className={getStyles('dropdown', {
21
20
  'is-inline': isInline,
22
21
  })}
23
22
  >
24
23
  <Icon className="dropdown-icon" name="angleDown" background="transparent" />
25
24
  <select
25
+ id={id}
26
26
  className={getStyles('dropdown-select')}
27
27
  onChange={(event) => onChange(event?.currentTarget?.value)}
28
28
  value={value}
@@ -9,6 +9,9 @@ import Moment from 'react-moment'
9
9
  import Icon from '../../atoms/Icon'
10
10
  import Picture from '../../atoms/Picture'
11
11
  import Check from '../../atoms/Check'
12
+ import Toggle from '../../atoms/Toggle'
13
+
14
+
12
15
  import { Horizontal, Vertical } from '../../layout/Spacer/components'
13
16
 
14
17
  export const RowTable = ({
@@ -31,7 +34,7 @@ export const RowTable = ({
31
34
  }) => {
32
35
 
33
36
 
34
-
37
+ const [loading, setLoading] = useState(false)
35
38
 
36
39
  // const handleEditStaff = (e, item) => {
37
40
  // console.log(item)
@@ -39,17 +42,45 @@ export const RowTable = ({
39
42
  // }
40
43
 
41
44
 
42
- // const handleClick = () => () => {
43
- // // onClick()
45
+ const handleClickCheckbox = (e, item) => {
44
46
 
45
- // isChecked ? setIsChecked(false) : setIsChecked(true)
46
47
 
47
- // }
48
+ for (const iterator of slice) {
49
+
50
+ if (iterator.id === item.id) {
51
+ item.isSelected ? iterator.isSelected = false : iterator.isSelected = true
52
+
53
+ iterator.isSelected = item.isSelected
54
+ }
55
+
56
+ }
57
+
58
+ setLoading(true)
59
+
60
+ hola()
61
+
62
+ // return slice
63
+
64
+ // console.log(e, item)
65
+ }
66
+
67
+ const hola = () => {
68
+
69
+ setTimeout(() => {
70
+ setLoading(false)
71
+ }, 100)
72
+
73
+
74
+
75
+ }
76
+
48
77
 
49
78
 
50
79
  return (
51
80
  <div className={getStyles('tbl-content')}>
52
81
  <table className={getStyles('table')} cellPadding="0" cellSpacing="0" border="0">
82
+
83
+
53
84
  <tbody>
54
85
  {slice.map((item, index) => (
55
86
 
@@ -59,22 +90,27 @@ export const RowTable = ({
59
90
  itemTd.activeView ?
60
91
  (
61
92
 
62
-
63
93
  itemTd.isCheckbox
64
94
 
65
95
  ?
66
- <td
67
- className={getStyles('td', 'tdacction')}
68
- key={[itemTd.accessor]}
69
- onClick={(e) => {
70
- onClickCheckbox(e, item)
71
- // isChecked ? setIsChecked(false) : setIsChecked(true)
72
- }}>
73
-
74
- <Check id={item[itemTd.accessor]} isChecked={isCheckedCheckbox}
75
-
76
- />
77
- </td>
96
+ !loading ? (
97
+ <td
98
+ className={getStyles('td', 'tdacction')}
99
+ key={[itemTd.accessor]}
100
+ >
101
+
102
+ {/* <Check id={item[itemTd.accessor]} isChecked={item.isSelected} /> */}
103
+
104
+ <Toggle
105
+ id={item[itemTd.accessor]}
106
+ checked={item.isSelected}
107
+ label=""
108
+ onChangeCheckbox={(e) => { handleClickCheckbox(e, item) }}
109
+ />
110
+
111
+ </td>
112
+ )
113
+ : null
78
114
  :
79
115
 
80
116
 
@@ -93,7 +129,7 @@ export const RowTable = ({
93
129
 
94
130
  ?
95
131
 
96
- <td className={getStyles('td')} key={[itemTd.accessor]}>
132
+ <td className={getStyles('td', 'tdacctionIcons')} key={[itemTd.accessor]}>
97
133
 
98
134
  {itemTd.viewUserView ?
99
135
  <>
@@ -118,7 +154,7 @@ export const RowTable = ({
118
154
  </>
119
155
  : null}
120
156
 
121
- {itemTd.viewListXLS ?
157
+ {itemTd.viewListXLS && item.fileType === 'xls' ?
122
158
  <>
123
159
  <Icon
124
160
  background="base"
@@ -129,7 +165,7 @@ export const RowTable = ({
129
165
  </>
130
166
  : null}
131
167
 
132
- {itemTd.viewListCSV ?
168
+ {itemTd.viewListCSV && item.fileType === 'xml' ?
133
169
  <>
134
170
  <Icon
135
171
  background="base"
@@ -140,7 +176,7 @@ export const RowTable = ({
140
176
  </>
141
177
  : null}
142
178
 
143
- {itemTd.viewListPDF ?
179
+ {itemTd.viewListPDF && item.fileType === 'pdf' ?
144
180
  <>
145
181
  <Icon
146
182
  background="base"
@@ -264,6 +300,7 @@ export const RowTable = ({
264
300
  ))}
265
301
  </tbody>
266
302
  </table>
303
+
267
304
  </div>
268
305
  )
269
306
  }
@@ -27,6 +27,10 @@
27
27
  width: 80px;
28
28
  }
29
29
 
30
+ .tdacctionIcons {
31
+ text-align: right;
32
+ }
33
+
30
34
  .tr-content:hover {
31
35
  background-color: #edf1fe;
32
36
  cursor: pointer;
@@ -72,7 +72,8 @@ export const options = {
72
72
  authorizationBreakValue6: "U0193271095",
73
73
  authorizationBreakValue7: "FACILITIES",
74
74
  iconUrl: "https://resources.callcenter.cab/img/travelprograms/imbric_taxi_satin.png",
75
- idCheckbox: 'checkbox1'
75
+ idCheckbox: 'checkbox1',
76
+ isSelected: true,
76
77
  },
77
78
  {
78
79
  id: 346248955,
@@ -140,6 +141,7 @@ export const options = {
140
141
  authorizationBreakValue7: "FACILITIES",
141
142
  iconUrl: "https://resources.callcenter.cab/img/travelprograms/imbric_taxi_satin.png",
142
143
  idCheckbox: 'checkbox2',
144
+ isSelected: true,
143
145
  },
144
146
  {
145
147
  id: 346248954,
@@ -206,7 +208,8 @@ export const options = {
206
208
  authorizationBreakValue6: "U0193271095",
207
209
  authorizationBreakValue7: "FACILITIES",
208
210
  iconUrl: "https://resources.callcenter.cab/img/travelprograms/imbric_taxi_satin.png",
209
- idCheckbox: 'checkbox3'
211
+ idCheckbox: 'checkbox3',
212
+ isSelected: true,
210
213
  }
211
214
  ],
212
215