|
8 | 8 |
|
9 | 9 | <div style="min-height: 100vh; background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); padding: 2rem 0;"> |
10 | 10 | <div style="max-width: 1000px; margin: 0 auto; padding: 0 1rem;"> |
11 | | - |
| 11 | + |
12 | 12 | <!-- Header Section --> |
13 | 13 | <div style="margin-bottom: 2rem;"> |
14 | 14 | <div style="display: flex; align-items: center; justify-content: between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap;"> |
|
36 | 36 | <% end %> |
37 | 37 | </div> |
38 | 38 | </div> |
39 | | - |
| 39 | + |
40 | 40 | <!-- Breadcrumb --> |
41 | 41 | <nav style="font-size: 0.875rem; color: #6b7280;"> |
42 | 42 | <ol style="display: flex; gap: 0.5rem; list-style: none; padding: 0; margin: 0;"> |
|
51 | 51 |
|
52 | 52 | <!-- Main Content --> |
53 | 53 | <div id="<%= dom_id @import_report %>"> |
54 | | - |
| 54 | + |
55 | 55 | <!-- Import Details Section --> |
56 | 56 | <div style="margin-bottom: 2rem;"> |
57 | 57 | <div style="background: white; border-radius: 1rem; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); overflow: hidden; border: 1px solid #e5e7eb;"> |
58 | | - |
| 58 | + |
59 | 59 | <!-- Card Header --> |
60 | 60 | <div style="background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); padding: 2rem; color: white;"> |
61 | 61 | <div style="display: flex; align-items: center; gap: 1rem; margin-bottom: 0.5rem;"> |
|
66 | 66 | </div> |
67 | 67 | <p style="margin: 0; opacity: 0.9; font-size: 0.875rem;">Import operation information and statistics</p> |
68 | 68 | </div> |
69 | | - |
| 69 | + |
70 | 70 | <!-- Card Body --> |
71 | 71 | <div style="padding: 2rem;"> |
72 | 72 | <div style="display: grid; gap: 1.5rem;"> |
73 | | - |
| 73 | + |
74 | 74 | <!-- Status --> |
75 | 75 | <div style="display: grid; grid-template-columns: 1fr 2fr; gap: 1rem; padding: 1rem; background: #f8fafc; border-radius: 0.5rem; border-left: 4px solid #3b82f6;"> |
76 | 76 | <div style="font-weight: 600; color: #374151; display: flex; align-items: center; gap: 0.5rem;"> |
|
104 | 104 | <% end %> |
105 | 105 | </div> |
106 | 106 | </div> |
107 | | - |
| 107 | + |
108 | 108 | <!-- Import Type --> |
109 | 109 | <div style="display: grid; grid-template-columns: 1fr 2fr; gap: 1rem; padding: 1rem; background: #f8fafc; border-radius: 0.5rem; border-left: 4px solid #3b82f6;"> |
110 | 110 | <div style="font-weight: 600; color: #374151; display: flex; align-items: center; gap: 0.5rem;"> |
|
117 | 117 | <%= @import_report.import_type.humanize %> |
118 | 118 | </div> |
119 | 119 | </div> |
120 | | - |
| 120 | + |
121 | 121 | <!-- Started At --> |
122 | 122 | <div style="display: grid; grid-template-columns: 1fr 2fr; gap: 1rem; padding: 1rem; background: #f8fafc; border-radius: 0.5rem; border-left: 4px solid #3b82f6;"> |
123 | 123 | <div style="font-weight: 600; color: #374151; display: flex; align-items: center; gap: 0.5rem;"> |
|
130 | 130 | <%= @import_report.started_at&.strftime('%B %d, %Y at %I:%M %p') || "Not started" %> |
131 | 131 | </div> |
132 | 132 | </div> |
133 | | - |
| 133 | + |
134 | 134 | <!-- Completed At --> |
135 | 135 | <div style="display: grid; grid-template-columns: 1fr 2fr; gap: 1rem; padding: 1rem; background: #f8fafc; border-radius: 0.5rem; border-left: 4px solid #3b82f6;"> |
136 | 136 | <div style="font-weight: 600; color: #374151; display: flex; align-items: center; gap: 0.5rem;"> |
|
143 | 143 | <%= @import_report.completed_at&.strftime('%B %d, %Y at %I:%M %p') || "Not completed" %> |
144 | 144 | </div> |
145 | 145 | </div> |
146 | | - |
| 146 | + |
147 | 147 | <!-- Created --> |
148 | 148 | <div style="display: grid; grid-template-columns: 1fr 2fr; gap: 1rem; padding: 1rem; background: #f8fafc; border-radius: 0.5rem; border-left: 4px solid #3b82f6;"> |
149 | 149 | <div style="font-weight: 600; color: #374151; display: flex; align-items: center; gap: 0.5rem;"> |
|
156 | 156 | <%= @import_report.created_at.strftime('%B %d, %Y at %I:%M %p') %> |
157 | 157 | </div> |
158 | 158 | </div> |
159 | | - |
| 159 | + |
160 | 160 | <!-- Summary Stats --> |
161 | 161 | <% if @import_report.summary_stats.present? %> |
162 | 162 | <div style="display: grid; grid-template-columns: 1fr 2fr; gap: 1rem; padding: 1rem; background: #f8fafc; border-radius: 0.5rem; border-left: 4px solid #3b82f6;"> |
|
171 | 171 | </div> |
172 | 172 | </div> |
173 | 173 | <% end %> |
174 | | - |
| 174 | + |
175 | 175 | </div> |
176 | 176 | </div> |
177 | 177 | </div> |
|
180 | 180 | <!-- Import Errors Section --> |
181 | 181 | <div style="margin-bottom: 2rem;"> |
182 | 182 | <div style="background: white; border-radius: 1rem; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); overflow: hidden; border: 1px solid #e5e7eb;"> |
183 | | - |
| 183 | + |
184 | 184 | <!-- Card Header --> |
185 | 185 | <div style="background: linear-gradient(135deg, <%= @import_errors.any? ? '#dc2626 0%, #b91c1c 100%' : '#10b981 0%, #059669 100%' %>); padding: 2rem; color: white;"> |
186 | 186 | <div style="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;"> |
|
203 | 203 | </p> |
204 | 204 | </div> |
205 | 205 | </div> |
206 | | - |
| 206 | + |
207 | 207 | <div style="display: flex; gap: 0.75rem; align-items: center;"> |
208 | 208 | <div style="background: rgba(255, 255, 255, 0.1); padding: 0.5rem 1rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 500;"> |
209 | 209 | Total: <%= @import_errors.count %> |
210 | 210 | </div> |
211 | 211 | </div> |
212 | 212 | </div> |
213 | 213 | </div> |
214 | | - |
| 214 | + |
215 | 215 | <!-- Table Content --> |
216 | 216 | <div style="padding: 0;"> |
217 | 217 | <% if @import_errors.any? %> |
|
311 | 311 | transform: translateY(-2px) !important; |
312 | 312 | box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25) !important; |
313 | 313 | } |
314 | | - |
| 314 | + |
315 | 315 | /* Responsive design */ |
316 | 316 | @media (max-width: 768px) { |
317 | 317 | /* Container adjustments */ |
318 | 318 | div[style*="max-width: 1000px"] { |
319 | 319 | padding: 0 1rem !important; |
320 | 320 | margin: 0 auto !important; |
321 | 321 | } |
322 | | - |
| 322 | + |
323 | 323 | /* Page padding adjustments */ |
324 | 324 | div[style*="min-height: 100vh"] { |
325 | 325 | padding: 1rem 0 !important; |
326 | 326 | } |
327 | | - |
| 327 | + |
328 | 328 | /* Header adjustments */ |
329 | 329 | div[style*="justify-content: between"] { |
330 | 330 | flex-direction: column !important; |
331 | 331 | align-items: flex-start !important; |
332 | 332 | gap: 1rem !important; |
333 | 333 | } |
334 | | - |
| 334 | + |
335 | 335 | /* Title adjustments */ |
336 | 336 | h1 { |
337 | 337 | font-size: 1.75rem !important; |
338 | 338 | } |
339 | | - |
| 339 | + |
340 | 340 | /* Card adjustments - prevent overflow */ |
341 | 341 | div[style*="border-radius: 1rem"] { |
342 | 342 | border-radius: 0.5rem !important; |
343 | 343 | margin: 0 !important; |
344 | 344 | max-width: 100% !important; |
345 | 345 | box-sizing: border-box !important; |
346 | 346 | } |
347 | | - |
| 347 | + |
348 | 348 | /* Grid adjustments */ |
349 | 349 | div[style*="grid-template-columns: 1fr 2fr"] { |
350 | 350 | grid-template-columns: 1fr !important; |
351 | 351 | gap: 0.5rem !important; |
352 | 352 | } |
353 | | - |
| 353 | + |
354 | 354 | /* Card padding adjustments */ |
355 | 355 | div[style*="padding: 2rem"] { |
356 | 356 | padding: 1.5rem 1rem !important; |
357 | 357 | } |
358 | | - |
| 358 | + |
359 | 359 | /* Table adjustments */ |
360 | 360 | th, td { |
361 | 361 | padding: 0.75rem 0.5rem !important; |
362 | 362 | font-size: 0.875rem !important; |
363 | 363 | } |
364 | | - |
| 364 | + |
365 | 365 | /* Make tables more responsive */ |
366 | 366 | .table-container { |
367 | 367 | margin: 0 !important; |
368 | 368 | padding: 0 !important; |
369 | 369 | } |
370 | | - |
| 370 | + |
371 | 371 | /* Ensure table fits */ |
372 | 372 | table { |
373 | 373 | min-width: 100% !important; |
374 | 374 | width: 100% !important; |
375 | 375 | } |
376 | 376 | } |
377 | | - |
| 377 | + |
378 | 378 | @media (max-width: 640px) { |
379 | 379 | /* Very small screen adjustments */ |
380 | 380 | div[style*="max-width: 1000px"] { |
381 | 381 | padding: 0 0.5rem !important; |
382 | 382 | } |
383 | | - |
| 383 | + |
384 | 384 | /* Ensure no overflow */ |
385 | 385 | * { |
386 | 386 | max-width: 100% !important; |
387 | 387 | box-sizing: border-box !important; |
388 | 388 | } |
389 | | - |
| 389 | + |
390 | 390 | /* Remove border radius on very small screens */ |
391 | 391 | div[style*="border-radius: 1rem"] { |
392 | 392 | border-radius: 0.25rem !important; |
393 | 393 | margin: 0 !important; |
394 | 394 | } |
395 | | - |
| 395 | + |
396 | 396 | /* More compact padding */ |
397 | 397 | div[style*="padding: 2rem"] { |
398 | 398 | padding: 1rem 0.75rem !important; |
399 | 399 | } |
400 | | - |
| 400 | + |
401 | 401 | div[style*="padding: 1.5rem"] { |
402 | 402 | padding: 1rem !important; |
403 | 403 | } |
404 | | - |
| 404 | + |
405 | 405 | /* More compact table */ |
406 | 406 | th, td { |
407 | 407 | padding: 0.5rem 0.25rem !important; |
408 | 408 | font-size: 0.75rem !important; |
409 | 409 | word-wrap: break-word !important; |
410 | 410 | word-break: break-word !important; |
411 | 411 | } |
412 | | - |
| 412 | + |
413 | 413 | /* Prevent horizontal scroll */ |
414 | 414 | body, html { |
415 | 415 | overflow-x: hidden !important; |
416 | 416 | } |
417 | | - |
| 417 | + |
418 | 418 | /* Ensure cards don't exceed viewport */ |
419 | 419 | div[style*="background: white"] { |
420 | 420 | max-width: calc(100vw - 1rem) !important; |
421 | 421 | overflow: hidden !important; |
422 | 422 | } |
423 | | - |
| 423 | + |
424 | 424 | /* Better pre formatting for small screens */ |
425 | 425 | pre { |
426 | 426 | font-size: 0.625rem !important; |
|
0 commit comments