x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
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
240
241
242
<div class="w-full"> <div class="relative overflow-x-auto shadow ring-1 ring-gray-300 rounded-lg mb-5"> <turbo-frame target="_top"> <table class="w-full text-sm text-left divide-y divide-gray-300" data-controller="data-table-sortable"> <thead class="bg-gray-50"> <tr> <th scope="col" class="whitespace-nowrap px-3 py-4 text-sm"> Product </th> <th scope="col" class="whitespace-nowrap px-3 py-4 text-sm"> Product </th> <th scope="col" class="whitespace-nowrap px-3 py-4 text-sm"> Brand </th> <th scope="col" class="whitespace-nowrap px-3 py-4 text-sm"> Net quantity </th> <th scope="col" class="whitespace-nowrap px-3 py-4 text-sm"> Description </th> <th scope="col" class="flex whitespace-nowrap px-3 py-4 text-sm"> Actions </th> </tr> </thead> <tbody id="data-table-content-sortable" class="divide-y divide-gray-200 bg-white text-gray-600"> <tr data-action="drop->data-table-sortable#moved" class="rounded hover:bg-gray-50"> <th scope="row" class="whitespace-nowrap px-3 py-4 text-sm"> Smartphone </th> <td class="whitespace-nowrap px-3 py-4 text-sm"> <span title="1000" class=""> 1 000 € </span> </td> <td class="whitespace-nowrap px-3 py-4 text-sm"> Apple </td> <td class="whitespace-nowrap px-3 py-4 text-sm"> 500 </td> <td class="whitespace-nowrap px-3 py-4 text-sm"> Sleek, advanced, and powerful. </td> <td class="flex whitespace-nowrap px-3 py-4 text-sm"> <button type="button" class="elevate-button elevate-button--default elevate-button--size-s elevate-button--align-center mx-1"> Show </button> <button type="button" class="elevate-button elevate-button--default elevate-button--size-s elevate-button--align-center mx-1"> Edit </button> <button type="button" class="elevate-button elevate-button--danger elevate-button--size-s elevate-button--align-center mx-1"> Delete </button> </td> </tr> <tr data-action="drop->data-table-sortable#moved" class="rounded hover:bg-gray-50"> <th scope="row" class="whitespace-nowrap px-3 py-4 text-sm"> Laptop </th> <td class="whitespace-nowrap px-3 py-4 text-sm"> <span title="1500" class=""> 1 500 € </span> </td> <td class="whitespace-nowrap px-3 py-4 text-sm"> Apple </td> <td class="whitespace-nowrap px-3 py-4 text-sm"> 300 </td> <td class="whitespace-nowrap px-3 py-4 text-sm"> Productivity and creativity redefined. </td> <td class="flex whitespace-nowrap px-3 py-4 text-sm"> <button type="button" class="elevate-button elevate-button--default elevate-button--size-s elevate-button--align-center mx-1"> Show </button> <button type="button" class="elevate-button elevate-button--default elevate-button--size-s elevate-button--align-center mx-1"> Edit </button> <button type="button" class="elevate-button elevate-button--danger elevate-button--size-s elevate-button--align-center mx-1"> Delete </button> </td> </tr> <tr data-action="drop->data-table-sortable#moved" class="rounded hover:bg-gray-50"> <th scope="row" class="whitespace-nowrap px-3 py-4 text-sm"> Refrigerator </th> <td class="whitespace-nowrap px-3 py-4 text-sm"> <span title="2500" class=""> 2 500 € </span> </td> <td class="whitespace-nowrap px-3 py-4 text-sm"> LG </td> <td class="whitespace-nowrap px-3 py-4 text-sm"> 200 </td> <td class="whitespace-nowrap px-3 py-4 text-sm"> Stylish, spacious, and efficient. </td> <td class="flex whitespace-nowrap px-3 py-4 text-sm"> <button type="button" class="elevate-button elevate-button--default elevate-button--size-s elevate-button--align-center mx-1"> Show </button> <button type="button" class="elevate-button elevate-button--default elevate-button--size-s elevate-button--align-center mx-1"> Edit </button> <button type="button" class="elevate-button elevate-button--danger elevate-button--size-s elevate-button--align-center mx-1"> Delete </button> </td> </tr> <tr data-action="drop->data-table-sortable#moved" class="rounded hover:bg-gray-50"> <th scope="row" class="whitespace-nowrap px-3 py-4 text-sm"> Sneakers </th> <td class="whitespace-nowrap px-3 py-4 text-sm"> <span title="150" class=""> 150 € </span> </td> <td class="whitespace-nowrap px-3 py-4 text-sm"> Nike </td> <td class="whitespace-nowrap px-3 py-4 text-sm"> 1000 </td> <td class="whitespace-nowrap px-3 py-4 text-sm"> Comfortable, high-performance athletic footwear. </td> <td class="flex whitespace-nowrap px-3 py-4 text-sm"> <button type="button" class="elevate-button elevate-button--default elevate-button--size-s elevate-button--align-center mx-1"> Show </button> <button type="button" class="elevate-button elevate-button--default elevate-button--size-s elevate-button--align-center mx-1"> Edit </button> <button type="button" class="elevate-button elevate-button--danger elevate-button--size-s elevate-button--align-center mx-1"> Delete </button> </td> </tr> <tr data-action="drop->data-table-sortable#moved" class="rounded hover:bg-gray-50"> <th scope="row" class="whitespace-nowrap px-3 py-4 text-sm"> Coffee maker </th> <td class="whitespace-nowrap px-3 py-4 text-sm"> <span title="100" class=""> 100 € </span> </td> <td class="whitespace-nowrap px-3 py-4 text-sm"> Nespresso </td> <td class="whitespace-nowrap px-3 py-4 text-sm"> 400 </td> <td class="whitespace-nowrap px-3 py-4 text-sm"> Fast, flavorful espresso machine. </td> <td class="flex whitespace-nowrap px-3 py-4 text-sm"> <button type="button" class="elevate-button elevate-button--default elevate-button--size-s elevate-button--align-center mx-1"> Show </button> <button type="button" class="elevate-button elevate-button--default elevate-button--size-s elevate-button--align-center mx-1"> Edit </button> <button type="button" class="elevate-button elevate-button--danger elevate-button--size-s elevate-button--align-center mx-1"> Delete </button> </td> </tr> </tbody> <tfoot class="bg-gray-50"> <tr> <th scope="row" class="whitespace-nowrap px-3 py-4 text-sm"> Totals </th> <td class="whitespace-nowrap px-3 py-4 text-sm"> <span title="5250" class=""> 5 250 € </span> </td> <td class="whitespace-nowrap px-3 py-4 text-sm"> </td> <td class="whitespace-nowrap px-3 py-4 text-sm"> 2400 </td> <td class="whitespace-nowrap px-3 py-4 text-sm"> </td> <td class="flex whitespace-nowrap px-3 py-4 text-sm"> </td> </tr> </tfoot> </table> </turbo-frame> </div></div>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<% total_price = elevate_formatted_number(value: data.pluck(:price).sum, unit: '€') %><div class="w-full"> <%= elevate_datatable(data, totals_in_footer: true) do |table| %> <% table.with_column(total: 'Totals') do |col| %> Product <% col.with_row do |row| %> <%= row[:product] %> <% end %> <% end %> <% table.with_column(total: total_price) do |col| %> Product <% col.with_row do |row| %> <%= elevate_formatted_number(value: row[:price], unit: '€') %> <% end %> <% end %> <% table.with_column do |col| %> Brand <% col.with_row do |row| %> <%= row[:brand] %> <% end %> <% end %> <% table.with_column(total: data.pluck(:quantity).sum) do |col| %> Net quantity <% col.with_row do |row| %> <%= row[:quantity] %> <% end %> <% end %> <% table.with_column do |col| %> Description <% col.with_row do |row| %> <%= row[:description] %> <% end %> <% end %> <% table.with_column(classes: 'flex') do |col| %> Actions <% col.with_row do %> <%= elevate_button(classes: "mx-1") { 'Show ' } %> <%= elevate_button(classes: "mx-1") { 'Edit ' } %> <%= elevate_button(scheme: :danger, classes: "mx-1") { 'Delete ' } %> <% end %> <% end %> <% end %></div>No notes provided.
No params configured.