imbric-theme 0.4.5 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- package/.dockerignore +14 -0
- package/.eslintignore +1 -0
- package/.prettierignore +1 -0
- package/Dockerfile +18 -0
- package/atoms/Button/Button.js +8 -0
- package/atoms/Button/Button.module.css +8 -0
- package/atoms/Checkbox/Checkbox.js +1 -1
- package/atoms/Icon/constants.js +84 -2
- package/atoms/Input/Input.js +5 -5
- package/atoms/Input/Input.stories.js +1 -1
- package/atoms/Input/constants.js +1 -1
- package/atoms/Toggle/Toggle.js +56 -0
- package/atoms/Toggle/Toggle.module.css +41 -0
- package/atoms/Toggle/Toggle.stories.js +21 -0
- package/atoms/Toggle/constants.js +1 -0
- package/atoms/Toggle/index.js +3 -0
- package/index.js +5 -0
- package/molecules/Accordion/Accordion.js +2 -0
- package/molecules/CardDefault/CardDefault.module.css +1 -0
- package/molecules/CardProductTypesBooking/CardProductTypesBooking.js +5 -3
- package/molecules/CardProductTypesBooking/CardProductTypesBooking.module.css +5 -1
- package/molecules/CardServiceDetail/CardServiceDetail.js +367 -0
- package/molecules/CardServiceDetail/CardServiceDetail.module.css +222 -0
- package/molecules/CardServiceDetail/CardServiceDetail.stories.js +23 -0
- package/molecules/CardServiceDetail/constants.js +1 -0
- package/molecules/CardServiceDetail/index.js +3 -0
- package/molecules/CardServices/CardServices.js +176 -46
- package/molecules/CardServices/CardServices.module.css +124 -4
- package/molecules/CardServicesFinalized/CardServicesFinalized.js +363 -0
- package/molecules/CardServicesFinalized/CardServicesFinalized.module.css +213 -0
- package/molecules/CardServicesFinalized/CardServicesFinalized.stories.js +23 -0
- package/molecules/CardServicesFinalized/constants.js +1 -0
- package/molecules/CardServicesFinalized/index.js +3 -0
- package/molecules/ColumnTable/ColumnTable.js +5 -3
- package/molecules/ColumnTable/ColumnTable.module.css +12 -0
- package/molecules/Dropdown/Dropdown.js +1 -1
- package/molecules/RowTable/RowTable.js +213 -154
- package/molecules/RowTable/RowTable.module.css +4 -0
- package/molecules/RowTable/constants.js +388 -2
- package/package.json +2 -1
- package/public/static/images/bank-cash-dollar-finance-money-payment-2-svgrepo-com.svg +13 -0
- package/public/static/images/buy-ecommerce-label-money-price-sale-svgrepo-com.svg +13 -0
- package/public/static/images/distance-svgrepo-com.svg +21 -0
- package/public/static/images/message-svgrepo-com.svg +15 -0
- package/public/static/images/pin-distance-svgrepo-com.svg +13 -0
- package/public/static/images/second-page-svgrepo-com copia.svg +18 -0
- package/public/static/images/second-page-svgrepo-com.svg +17 -0
- package/.eslintcache +0 -1
- package/storybook-static/0.263f852f.iframe.bundle.js +0 -1
- package/storybook-static/0.91dbd3f3aa2099d25061.manager.bundle.js +0 -1
- package/storybook-static/1.17e9ac7e.iframe.bundle.js +0 -3
- package/storybook-static/1.17e9ac7e.iframe.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/1.17e9ac7e.iframe.bundle.js.map +0 -1
- package/storybook-static/2.cc4000c2.iframe.bundle.js +0 -1
- package/storybook-static/3.e9f95d01.iframe.bundle.js +0 -1
- package/storybook-static/4.be0a752c9f5176d6eec1.manager.bundle.js +0 -2
- package/storybook-static/4.be0a752c9f5176d6eec1.manager.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/5.8efdde123acaf8fbb100.manager.bundle.js +0 -1
- package/storybook-static/6.2f82294ae0b087aecb24.manager.bundle.js +0 -2
- package/storybook-static/6.2f82294ae0b087aecb24.manager.bundle.js.LICENSE.txt +0 -12
- package/storybook-static/7.97068037.iframe.bundle.js +0 -1
- package/storybook-static/7.fa9452d2609e8a00f314.manager.bundle.js +0 -1
- package/storybook-static/8.66f5ef1c66fc4628f127.manager.bundle.js +0 -1
- package/storybook-static/8.b545d602.iframe.bundle.js +0 -3
- package/storybook-static/8.b545d602.iframe.bundle.js.LICENSE.txt +0 -12
- package/storybook-static/8.b545d602.iframe.bundle.js.map +0 -1
- package/storybook-static/9.269ed917.iframe.bundle.js +0 -1
- package/storybook-static/favicon.ico +0 -0
- package/storybook-static/iframe.html +0 -348
- package/storybook-static/index.html +0 -59
- package/storybook-static/main.157061c9.iframe.bundle.js +0 -1
- package/storybook-static/main.5a07347846ccf2d7e5dc.manager.bundle.js +0 -1
- package/storybook-static/runtime~main.a14e6e62.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.f78c3fae275fc212c109.manager.bundle.js +0 -1
- package/storybook-static/static/logo.svg +0 -19
- package/storybook-static/static/logologin.svg +0 -16
- package/storybook-static/static/logotipo.svg +0 -50
- package/storybook-static/static/logotipoS.svg +0 -26
- package/storybook-static/vendors~main.720e76f4.iframe.bundle.js +0 -3
- package/storybook-static/vendors~main.720e76f4.iframe.bundle.js.LICENSE.txt +0 -110
- package/storybook-static/vendors~main.720e76f4.iframe.bundle.js.map +0 -1
- package/storybook-static/vendors~main.fcd0b2a3431ddf75f5f7.manager.bundle.js +0 -2
- package/storybook-static/vendors~main.fcd0b2a3431ddf75f5f7.manager.bundle.js.LICENSE.txt +0 -101
@@ -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
|
-
|
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,203 +90,230 @@ export const RowTable = ({
|
|
59
90
|
itemTd.activeView ?
|
60
91
|
(
|
61
92
|
|
62
|
-
|
63
93
|
itemTd.isCheckbox
|
64
94
|
|
65
95
|
?
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
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
|
|
81
|
-
itemTd.
|
117
|
+
itemTd.isArrayObject
|
82
118
|
|
83
119
|
?
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
120
|
+
|
121
|
+
<td className={getStyles('td')} key={[itemTd.accessor]}>
|
122
|
+
|
123
|
+
{item[itemTd.accessor].map((itemTdObj, index, array) => (
|
124
|
+
|
125
|
+
<span key={itemTdObj.id}>{itemTdObj[itemTd.subAccessor]}
|
126
|
+
|
127
|
+
{array.length - 1 !== index ?
|
128
|
+
<span>, </span> : null }
|
129
|
+
|
130
|
+
</span>
|
131
|
+
|
132
|
+
))}
|
133
|
+
|
89
134
|
</td>
|
90
|
-
:
|
91
135
|
|
92
|
-
|
136
|
+
:
|
93
137
|
|
94
|
-
?
|
95
138
|
|
96
|
-
|
97
|
-
|
98
|
-
{itemTd.viewUserView ?
|
99
|
-
<>
|
100
|
-
<Icon
|
101
|
-
background="base"
|
102
|
-
name="userView"
|
103
|
-
onClick={(e) => { onClickActionUserView(e, item) }}
|
104
|
-
/>
|
105
|
-
<Horizontal size="xs" />
|
106
|
-
</>
|
107
|
-
: null}
|
108
|
-
|
109
|
-
|
110
|
-
{itemTd.viewListInvoice ?
|
111
|
-
<>
|
112
|
-
<Icon
|
113
|
-
background="base"
|
114
|
-
name="listInvoice"
|
115
|
-
onClick={(e) => { onClickActionListInvoice(e, item) }}
|
116
|
-
/>
|
117
|
-
<Horizontal size="xs" />
|
118
|
-
</>
|
119
|
-
: null}
|
120
|
-
|
121
|
-
{itemTd.viewListXLS ?
|
122
|
-
<>
|
123
|
-
<Icon
|
124
|
-
background="base"
|
125
|
-
name="listXLS"
|
126
|
-
onClick={(e) => { onClickActionListXLS(e, item) }}
|
127
|
-
/>
|
128
|
-
<Horizontal size="xs" />
|
129
|
-
</>
|
130
|
-
: null}
|
131
|
-
|
132
|
-
{itemTd.viewListCSV ?
|
133
|
-
<>
|
134
|
-
<Icon
|
135
|
-
background="base"
|
136
|
-
name="listCSV"
|
137
|
-
onClick={(e) => { onClickActionListCSV(e, item) }}
|
138
|
-
/>
|
139
|
-
<Horizontal size="xs" />
|
140
|
-
</>
|
141
|
-
: null}
|
142
|
-
|
143
|
-
{itemTd.viewListPDF ?
|
144
|
-
<>
|
145
|
-
<Icon
|
146
|
-
background="base"
|
147
|
-
name="listPDF"
|
148
|
-
onClick={(e) => { onClickActionListPDF(e, item) }}
|
149
|
-
/>
|
150
|
-
<Horizontal size="xs" />
|
151
|
-
</>
|
152
|
-
: null}
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
{itemTd.viewEdit ?
|
157
|
-
<>
|
158
|
-
<Icon
|
159
|
-
background="base"
|
160
|
-
name="edit"
|
161
|
-
onClick={(e) => { onClickActionEdit(e, item) }}
|
162
|
-
/>
|
163
|
-
<Horizontal size="xs" />
|
164
|
-
</>
|
165
|
-
: null}
|
166
|
-
|
167
|
-
{itemTd.viewEmailSend ?
|
168
|
-
<>
|
169
|
-
<Icon
|
170
|
-
background="base"
|
171
|
-
name="sendEmail"
|
172
|
-
// onClick={(e) => onClickEdit(e, item)}
|
173
|
-
onClick={e => { onClickActionSendEmail(e, item) }}
|
174
|
-
/>
|
175
|
-
<Horizontal size="xs" />
|
176
|
-
</>
|
177
|
-
: null}
|
178
|
-
|
179
|
-
{itemTd.viewTrash ?
|
180
|
-
<>
|
181
|
-
<Icon
|
182
|
-
background="base"
|
183
|
-
name="trash"
|
184
|
-
// onClick={(e) => onClickEdit(e, item)}
|
185
|
-
onClick={e => { onClickActionDelete(e, item) }}
|
186
|
-
/>
|
187
|
-
<Horizontal size="xs" />
|
188
|
-
</>
|
189
|
-
: null}
|
139
|
+
itemTd.isPicture
|
190
140
|
|
141
|
+
?
|
142
|
+
<td className={getStyles('td', 'tdacction')} key={[itemTd.accessor]}>
|
143
|
+
<Picture
|
144
|
+
src={item[itemTd.accessor]}
|
145
|
+
width={50}
|
146
|
+
/>
|
191
147
|
</td>
|
192
|
-
|
193
148
|
:
|
194
149
|
|
195
|
-
itemTd.subAccessor
|
150
|
+
itemTd.subAccessor === 'action'
|
196
151
|
|
197
152
|
?
|
198
153
|
|
199
|
-
<td className={getStyles('td')} key={[itemTd.accessor]}>
|
154
|
+
<td className={getStyles('td', 'tdacctionIcons')} key={[itemTd.accessor]}>
|
155
|
+
|
156
|
+
{itemTd.viewUserView ?
|
157
|
+
<>
|
158
|
+
<Icon
|
159
|
+
background="base"
|
160
|
+
name="userView"
|
161
|
+
onClick={(e) => { onClickActionUserView(e, item) }}
|
162
|
+
/>
|
163
|
+
<Horizontal size="xs" />
|
164
|
+
</>
|
165
|
+
: null}
|
166
|
+
|
167
|
+
|
168
|
+
{itemTd.viewListInvoice ?
|
169
|
+
<>
|
170
|
+
<Icon
|
171
|
+
background="base"
|
172
|
+
name="listInvoice"
|
173
|
+
onClick={(e) => { onClickActionListInvoice(e, item) }}
|
174
|
+
/>
|
175
|
+
<Horizontal size="xs" />
|
176
|
+
</>
|
177
|
+
: null}
|
178
|
+
|
179
|
+
{itemTd.viewListXLS && item.fileType === 'xls' ?
|
180
|
+
<>
|
181
|
+
<Icon
|
182
|
+
background="base"
|
183
|
+
name="listXLS"
|
184
|
+
onClick={(e) => { onClickActionListXLS(e, item) }}
|
185
|
+
/>
|
186
|
+
<Horizontal size="xs" />
|
187
|
+
</>
|
188
|
+
: null}
|
189
|
+
|
190
|
+
{itemTd.viewListCSV && item.fileType === 'xml' ?
|
191
|
+
<>
|
192
|
+
<Icon
|
193
|
+
background="base"
|
194
|
+
name="listCSV"
|
195
|
+
onClick={(e) => { onClickActionListCSV(e, item) }}
|
196
|
+
/>
|
197
|
+
<Horizontal size="xs" />
|
198
|
+
</>
|
199
|
+
: null}
|
200
|
+
|
201
|
+
{itemTd.viewListPDF && item.fileType === 'pdf' ?
|
202
|
+
<>
|
203
|
+
<Icon
|
204
|
+
background="base"
|
205
|
+
name="listPDF"
|
206
|
+
onClick={(e) => { onClickActionListPDF(e, item) }}
|
207
|
+
/>
|
208
|
+
<Horizontal size="xs" />
|
209
|
+
</>
|
210
|
+
: null}
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
{itemTd.viewEdit ?
|
215
|
+
<>
|
216
|
+
<Icon
|
217
|
+
background="base"
|
218
|
+
name="edit"
|
219
|
+
onClick={(e) => { onClickActionEdit(e, item) }}
|
220
|
+
/>
|
221
|
+
<Horizontal size="xs" />
|
222
|
+
</>
|
223
|
+
: null}
|
224
|
+
|
225
|
+
{itemTd.viewEmailSend ?
|
226
|
+
<>
|
227
|
+
<Icon
|
228
|
+
background="base"
|
229
|
+
name="sendEmail"
|
230
|
+
// onClick={(e) => onClickEdit(e, item)}
|
231
|
+
onClick={e => { onClickActionSendEmail(e, item) }}
|
232
|
+
/>
|
233
|
+
<Horizontal size="xs" />
|
234
|
+
</>
|
235
|
+
: null}
|
236
|
+
|
237
|
+
{itemTd.viewTrash ?
|
238
|
+
<>
|
239
|
+
<Icon
|
240
|
+
background="base"
|
241
|
+
name="trash"
|
242
|
+
// onClick={(e) => onClickEdit(e, item)}
|
243
|
+
onClick={e => { onClickActionDelete(e, item) }}
|
244
|
+
/>
|
245
|
+
<Horizontal size="xs" />
|
246
|
+
</>
|
247
|
+
: null}
|
248
|
+
|
249
|
+
</td>
|
200
250
|
|
201
251
|
:
|
202
252
|
|
203
|
-
itemTd.
|
253
|
+
itemTd.subAccessor !== ''
|
204
254
|
|
205
255
|
?
|
206
256
|
|
207
|
-
<td className={getStyles('td')} key={[itemTd.accessor]}>
|
208
|
-
<Moment format="DD/MM/YYYY hh:mm:ss">
|
209
|
-
{item[itemTd.accessor]}
|
210
|
-
</Moment>
|
211
|
-
</td>
|
257
|
+
<td className={getStyles('td')} key={[itemTd.accessor]}>{item[itemTd.accessor][itemTd.subAccessor]}</td>
|
212
258
|
|
213
259
|
:
|
214
260
|
|
215
|
-
itemTd.typeFilter === '
|
261
|
+
itemTd.typeFilter === 'date'
|
216
262
|
|
217
263
|
?
|
218
264
|
|
219
|
-
|
265
|
+
<td className={getStyles('td')} key={[itemTd.accessor]}>
|
266
|
+
<Moment format="DD/MM/YYYY hh:mm:ss">
|
267
|
+
{item[itemTd.accessor]}
|
268
|
+
</Moment>
|
269
|
+
</td>
|
220
270
|
|
271
|
+
:
|
221
272
|
|
222
|
-
|
273
|
+
itemTd.typeFilter === 'select'
|
223
274
|
|
224
|
-
|
225
|
-
{itemSelect.label}
|
226
|
-
</td>
|
275
|
+
?
|
227
276
|
|
228
|
-
|
277
|
+
itemTd.optionsSelect.map((itemSelect) => (
|
229
278
|
|
230
|
-
null
|
231
|
-
))
|
232
279
|
|
233
|
-
|
280
|
+
item[itemTd.accessor] === itemSelect.value ?
|
234
281
|
|
235
|
-
|
282
|
+
<td className={getStyles('td')} key={[itemTd.accessor]}>
|
283
|
+
{itemSelect.label}
|
284
|
+
</td>
|
236
285
|
|
237
|
-
|
286
|
+
:
|
238
287
|
|
239
|
-
|
288
|
+
null
|
289
|
+
))
|
290
|
+
|
291
|
+
:
|
292
|
+
|
293
|
+
itemTd.typeFilter === 'number'
|
240
294
|
|
241
295
|
?
|
242
296
|
|
243
|
-
itemTd.
|
297
|
+
itemTd.subTypeFilter
|
298
|
+
|
244
299
|
?
|
245
|
-
|
300
|
+
|
301
|
+
itemTd.characterExtra === 'km'
|
302
|
+
?
|
303
|
+
<td className={getStyles('td')} key={[itemTd.accessor]}>{(item[itemTd.accessor] / 1000).toString().replace(/\./g, ',')} {itemTd.characterExtra}</td>
|
304
|
+
:
|
305
|
+
<td className={getStyles('td')} key={[itemTd.accessor]}>{item[itemTd.accessor].toFixed(2).toString().replace(/\./g, ',')} {itemTd.characterExtra}</td>
|
246
306
|
:
|
247
|
-
<td className={getStyles('td')} key={[itemTd.accessor]}>{item[itemTd.accessor]
|
248
|
-
:
|
249
|
-
<td className={getStyles('td')} key={[itemTd.accessor]}>{item[itemTd.accessor]}</td>
|
307
|
+
<td className={getStyles('td')} key={[itemTd.accessor]}>{item[itemTd.accessor]}</td>
|
250
308
|
|
251
|
-
|
309
|
+
:
|
252
310
|
|
253
|
-
|
311
|
+
itemTd.subTypeFilter
|
254
312
|
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
313
|
+
?
|
314
|
+
<td className={getStyles('td')} key={[itemTd.accessor]}>{Number(item[itemTd.accessor]).toFixed(2).toString().replace(/\./g, ',')} {itemTd.characterExtra}</td>
|
315
|
+
:
|
316
|
+
<td className={getStyles('td')} key={[itemTd.accessor]}>{item[itemTd.accessor]}</td>
|
259
317
|
|
260
318
|
) : null
|
261
319
|
))}
|
@@ -264,6 +322,7 @@ export const RowTable = ({
|
|
264
322
|
))}
|
265
323
|
</tbody>
|
266
324
|
</table>
|
325
|
+
|
267
326
|
</div>
|
268
327
|
)
|
269
328
|
}
|