Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
684 lines (629 loc) · 43.8 KB
/
Copy pathindex.html
File metadata and controls
684 lines (629 loc) · 43.8 KB
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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>QMAS - CPSC eFiling Interactive Guide</title>
<script src="https://cdn.tailwindcss.com"></script>
<!-- 新增:設定 Tailwind 自訂顏色主題,以 #005EFF 作為主色調 -->
<script>
tailwind.config = {
theme: {
extend: {
colors: {
qmas: {
50: '#edf4ff',
100: '#dce8ff',
200: '#baccff',
300: '#8baaff',
400: '#5c87ff',
500: '#2d63ff',
600: '#005EFF', /* Primary QMAS Brand Color */
700: '#004be6', /* Darker for hover states */
800: '#0038b3',
900: '#002680',
}
}
}
}
}
</script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
.chart-container {
position: relative;
width: 100%;
max-width: 250px;
margin-left: auto;
margin-right: auto;
height: 250px;
max-height: 250px;
}
.step-item {
transition: all 0.3s ease;
}
.step-content-enter {
animation: fadeIn 0.4s ease-out forwards;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
body {
background-color: #faf9f6;
color: #334155;
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
background: #94a3b8;
}
</style>
</head>
<body class="min-h-screen flex flex-col font-sans selection:bg-qmas-200 selection:text-qmas-900">
<!-- Chosen Palette: Warm Neutrals with QMAS Blue Accents -->
<!-- Application Structure Plan: The SPA uses a dashboard-style "Stepper" layout. The left column provides a complete overview of the 11-step process, allowing users to jump directly to any step. The main content area dynamically updates to show the specific instructions and important notes for the selected step. This structure was chosen because procedural guides are best consumed sequentially, but users also need the ability to review specific steps without scrolling through a long document. A Chart.js donut chart serves as a visual progress indicator to motivate completion and provide instant context on where the user is within the overall flow. -->
<!-- Visualization & Content Choices: Process Progress -> Inform & Motivate -> Donut Chart (Chart.js) -> Updates dynamically as user navigates steps -> Provides immediate visual feedback on completion percentage without overwhelming the text content -> Chart.js is used to satisfy library requirements and provides smooth animation; HTML/CSS list is used for the stepper to organize the complex sequential data without relying on SVG or Mermaid. -->
<!-- CONFIRMATION: NO SVG graphics used. NO Mermaid JS used. -->
<header class="bg-white border-b border-stone-200 shadow-sm sticky top-0 z-10">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
<div class="flex items-center mb-1">
<!-- 公司 Logo:請將你的 Logo 檔案改名為 logo.png 並上傳,或者修改下方 src="你的檔案名.png/jpg" -->
<img src="logo.png" alt="Company Logo" class="h-9 w-auto mr-4" onerror="this.onerror=null; this.src='data:image/svg+xml;charset=UTF-8,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'80\' height=\'32\' viewBox=\'0 0 80 32\'%3E%3Crect width=\'80\' height=\'32\' rx=\'6\' fill=\'%23e2e8f0\'/%3E%3Ctext x=\'40\' y=\'21\' font-family=\'sans-serif\' font-size=\'14\' font-weight=\'bold\' fill=\'%2364748b\' text-anchor=\'middle\'%3ELOGO%3C/text%3E%3C/svg%3E'">
<h1 class="text-3xl font-bold text-qmas-600 tracking-tight">QMAS - CPSC eFiling Interactive Guide</h1>
</div>
<p class="mt-2 text-slate-600 max-w-3xl text-sm leading-relaxed">
Welcome to the interactive guide for eFiling product data from the QMAS system to the CPSC (U.S. Consumer Product Safety Commission).
Use the step-by-step navigator below to explore the complete process. This interactive format helps you track your progress and highlights critical prerequisites and rules to ensure a smooth submission.
</p>
</div>
</header>
<main class="flex-grow max-w-[90rem] mx-auto px-4 sm:px-6 lg:px-8 py-8 w-full">
<div class="flex flex-col lg:flex-row gap-6 lg:gap-10 items-start">
<nav class="w-full lg:w-[320px] flex-shrink-0 bg-white rounded-xl shadow-sm border border-stone-100 p-4 h-[calc(100vh-200px)] overflow-y-auto sticky top-32" aria-label="Progress Stepper">
<h2 class="text-xs font-bold uppercase tracking-wider text-slate-400 mb-4 px-2">Submission Flow</h2>
<ul id="stepper-list" class="space-y-2">
</ul>
</nav>
<section class="w-full flex-1 flex flex-col min-w-0 gap-6">
<div class="bg-white rounded-xl shadow-sm border border-stone-100 p-6 sm:p-8 flex flex-col md:flex-row items-center gap-8">
<div class="flex-1">
<h2 class="text-xl font-semibold text-slate-800 mb-2">Progress Tracker</h2>
<p class="text-sm text-slate-500 mb-4">Track your position in the eFiling process. Completing the flow sequentially ensures no prerequisites are missed.</p>
<div class="text-3xl font-bold text-qmas-600" id="progress-text">Step 1 of 11</div>
</div>
<div class="chart-container">
<canvas id="progressChart"></canvas>
</div>
</div>
<article class="bg-white rounded-xl shadow-sm border border-stone-100 p-6 sm:p-10 min-h-[400px] flex flex-col relative" id="main-content-area">
<div class="mb-4">
<span class="inline-flex items-center justify-center px-3 py-1 rounded-full bg-qmas-100 text-qmas-700 text-sm font-bold mb-4" id="content-step-badge">Step 1</span>
<h2 class="text-3xl font-bold text-slate-800 mb-6" id="content-title">Choose Product</h2>
</div>
<div class="prose prose-slate max-w-none flex-grow" id="content-body">
</div>
<div id="content-note" class="mt-8 hidden bg-amber-50 border-l-4 border-amber-500 p-4 rounded-r-md">
<div class="flex items-start">
<span class="text-amber-500 text-xl mr-3 font-bold">⚠</span>
<div>
<h4 class="text-amber-800 font-semibold text-sm uppercase tracking-wide mb-1">Important Note</h4>
<div class="text-amber-700 text-sm leading-relaxed" id="content-note-text"></div>
</div>
</div>
</div>
<div class="mt-12 pt-6 border-t border-stone-100 flex justify-between items-center">
<button id="btn-prev" class="px-5 py-2.5 border border-slate-300 rounded-lg text-slate-600 hover:bg-slate-50 hover:text-slate-800 font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed">
← Previous Step
</button>
<button id="btn-next" class="px-5 py-2.5 bg-qmas-600 hover:bg-qmas-700 text-white rounded-lg font-medium transition-colors shadow-sm disabled:opacity-50 disabled:cursor-not-allowed">
Next Step →
</button>
</div>
</article>
</section>
</div>
</main>
<!-- Image Lightbox Modal -->
<div id="image-modal" class="fixed inset-0 z-[100] hidden bg-slate-900/95 backdrop-blur-sm flex items-center justify-center p-4 cursor-zoom-out opacity-0 transition-opacity duration-300">
<img id="modal-image" src="" class="max-w-full max-h-[95vh] rounded-lg shadow-2xl transform scale-95 transition-transform duration-300 object-contain" alt="Enlarged view">
<!-- 新增:用來顯示圖片說明的 Caption 區塊 -->
<div id="modal-caption" class="absolute bottom-20 left-1/2 transform -translate-x-1/2 text-white bg-slate-800/90 backdrop-blur-md px-6 py-3 rounded-xl text-lg font-medium tracking-wide text-center shadow-lg border border-white/10 max-w-[90%] w-max hidden"></div>
<div class="absolute top-4 right-4 text-white/70 hover:text-white bg-black/20 hover:bg-black/40 rounded-full p-2 transition-colors cursor-pointer">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" /></svg>
</div>
<div class="absolute bottom-6 left-1/2 transform -translate-x-1/2 text-white/80 bg-black/50 px-5 py-2 rounded-full text-sm font-medium tracking-wide">
Click anywhere to close
</div>
</div>
<script>
const stepsData = [
{
id: 1,
title: "Choose Product",
content: `<p class="text-lg text-slate-700 mb-6">Go to the <strong>"Product Management"</strong> page in the system and select a product from the list that you want to eFile.</p>
<div class="overflow-hidden rounded-xl border border-slate-200 shadow-sm bg-stone-50">
<img src="1.jpg" alt="Product Management" class="w-full h-auto object-cover hover:scale-[1.01] transition-transform duration-300">
</div>`,
note: null
},
{
id: 2,
title: "Access the eFiling Page",
content: `<p class="text-lg text-slate-700">After entering the <strong>"Product Profile"</strong> for the selected product, click on the <strong class="text-qmas-600">"CPSC eFiling"</strong> tab at the top.</p><p class="text-lg text-slate-700 mt-4 mb-6">Then, click the <strong class="text-qmas-600">"eFiling"</strong> button on the screen to start the process.</p>
<div class="overflow-hidden rounded-xl border border-slate-200 shadow-sm bg-stone-50">
<img src="2.jpg" alt="CPSC eFiling Tab" class="w-full h-auto object-cover hover:scale-[1.01] transition-transform duration-300">
</div>`,
note: null
},
{
id: 3,
title: "Set Up API Credentials (Prerequisite)",
content: `<p class="text-lg text-slate-700 mb-4">If a warning appears, you must first go to the <strong>"Company Profile"</strong> to complete the API key setup:</p>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8 mt-6">
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm">
<img src="3.jpg" alt="No Certifier ID Warning" class="w-full h-auto object-cover">
</div>
<span class="text-xs text-slate-500 text-center font-medium uppercase tracking-wide">1. Warning Pop-up</span>
</div>
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm">
<img src="3.1.jpg" alt="Company Profile Add Certifier" class="w-full h-auto object-cover">
</div>
<span class="text-xs text-slate-500 text-center font-medium uppercase tracking-wide">2. Add Certifier ID</span>
</div>
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm">
<img src="3.2.jpg" alt="Empty Form" class="w-full h-auto object-cover">
</div>
<span class="text-xs text-slate-500 text-center font-medium uppercase tracking-wide">3. Fill in API & Secret Key</span>
</div>
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm">
<img src="3.4.jpg" alt="Completed Form" class="w-full h-auto object-cover">
</div>
<span class="text-xs text-slate-500 text-center font-medium uppercase tracking-wide">4. Setup Completed</span>
</div>
</div>
<ol class="list-decimal pl-6 mt-4 space-y-3 text-slate-700 bg-slate-50 p-6 rounded-lg border border-slate-100">
<li>Go to the CPSC eFiling section in the Company Profile (initially an Empty State).</li>
<li>Click <strong>"Add Token"</strong>.</li>
<li>Enter your Certifier ID, API Key, and Secret Key.</li>
<li>After saving, the status will show as Done, and you can continue with the eFiling process.</li>
</ol>`,
note: "If you haven't set up the Certifier ID Token in the system, a warning will pop up when you click eFiling."
},
{
id: 4,
title: "Quick Select eFiling Information",
content: `<p class="text-lg text-slate-700">A quick select window will pop up. Please select the following in order:</p>
<ul class="list-disc pl-6 mt-4 space-y-2 text-slate-700">
<li><strong>Certifier ID</strong></li>
<li><strong>Test data (Citation)</strong></li>
<li><strong>Other data (Exclusion)</strong></li>
</ul>
<div class="mt-6 mb-6 overflow-hidden rounded-xl border border-slate-200 shadow-sm">
<img src="4.jpg" alt="Quick Select Form" class="w-full h-auto object-cover hover:scale-[1.01] transition-transform duration-300">
</div>
<p class="text-lg text-slate-700 mt-8 mb-4">After making your selections, click <strong>"Done"</strong>.</p>
<div class="overflow-hidden rounded-xl border border-slate-200 shadow-sm md:w-2/3">
<img src="4.1.jpg" alt="Quick Select Completed" class="w-full h-auto object-cover">
</div>`,
note: null
},
{
id: 5,
title: "Fill in Mandatory eFiling Information",
content: `<p class="text-lg text-slate-700 mb-4">Enter the first step of the eFiling flow (Flow Step 1).</p>
<p class="text-lg text-slate-700 mb-6">Please <strong>fill in all mandatory fields</strong> in the form. Once completed with no warnings from the system, click <strong>"Next"</strong> to proceed to the next step.</p>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm">
<img src="5.jpg" alt="Missing Information Alert" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300">
</div>
<span class="text-xs text-rose-500 text-center font-medium uppercase tracking-wide">1. Missing Info Alert</span>
</div>
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm">
<img src="5.1.jpg" alt="Filled Information Form" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300">
</div>
<span class="text-xs text-emerald-600 text-center font-medium uppercase tracking-wide">2. Properly Filled Form</span>
</div>
</div>`,
note: null
},
{
id: 6,
title: "Fill in Lab Information",
content: `<p class="text-lg text-slate-700 mb-4">In this step (Flow Step 2 - Lab Citation), you need to specify the relevant testing laboratory:</p>
<ul class="list-disc pl-6 mt-4 mb-6 space-y-2 text-slate-700">
<li><strong>Select an existing lab:</strong> You can select "CPSC Lab" or "Other Lab" from the dropdown menu.</li>
<li><strong>Add a new lab:</strong> If you select "creating new lab" from the dropdown, the system will require you to fill in more details, such as the lab's location.</li>
</ul>
<div class="space-y-6">
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-xl border border-slate-200 shadow-sm bg-stone-50 md:w-4/5 mx-auto">
<img src="6.jpg" alt="Select CPSC Lab" class="w-full h-auto object-cover hover:scale-[1.01] transition-transform duration-300">
</div>
<span class="text-xs text-slate-500 text-center font-medium uppercase tracking-wide">1. Select CPSC Lab from Dropdown </span>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm">
<img src="6.1.jpg" alt="Select Other Lab From Dropdown" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300">
</div>
<span class="text-xs text-slate-500 text-center font-medium uppercase tracking-wide">2. Select other Lab </span>
</div>
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm">
<img src="6.2.jpg" alt="Filled New Created Lab Details" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300">
</div>
<span class="text-xs text-slate-500 text-center font-medium uppercase tracking-wide">3. Need to fill Lab Details if user create new lab name in other lab </span>
</div>
</div>
</div>`,
note: null
},
{
id: 7,
title: "Add Citation and Exclusion",
content: `<p class="text-lg text-slate-700">Next, you need to add applicable regulatory standards or exclusions:</p>
<div class="space-y-8 mt-6">
<div>
<h4 class="font-bold text-slate-800 mb-3 flex items-center"><span class="text-qmas-500 mr-2">✓</span> Add Citation</h4>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm bg-white"><img src="7.jpg" alt="Empty Citation List" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300"></div>
<span class="text-xs text-slate-500 text-center font-medium uppercase tracking-wide">1. Empty State</span>
</div>
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm bg-white"><img src="7.1.jpg" alt="Selected Citations" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300"></div>
<span class="text-xs text-emerald-600 text-center font-medium uppercase tracking-wide">2. Selected Citations</span>
</div>
</div>
</div>
<div>
<h4 class="font-bold text-slate-800 mb-3 flex items-center"><span class="text-qmas-500 mr-2">✓</span> Add Exclusion</h4>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm bg-white"><img src="7.2.jpg" alt="Empty Exclusion List" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300"></div>
<span class="text-xs text-slate-500 text-center font-medium uppercase tracking-wide">1. Empty State</span>
</div>
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm bg-white"><img src="7.3.jpg" alt="Selected Exclusions" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300"></div>
<span class="text-xs text-emerald-600 text-center font-medium uppercase tracking-wide">2. Selected Exclusions</span>
</div>
</div>
</div>
<div class="bg-slate-50 p-5 rounded-xl border border-slate-200">
<h4 class="font-bold text-slate-800 mb-2 flex items-center"><span class="text-qmas-500 mr-2">✓</span> Or Select "Not Applicable"</h4>
<p class="text-sm text-slate-600 mb-4">If your product does not have any exclusions, check the <strong>"Not Applicable"</strong> checkbox. Once checked, the Add button will be disabled.</p>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm bg-white"><img src="7.4.jpg" alt="Checkbox Unchecked" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300"></div>
<span class="text-xs text-slate-500 text-center font-medium uppercase tracking-wide">Default (Unchecked)</span>
</div>
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm bg-white"><img src="7.5.jpg" alt="Checkbox Checked" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300"></div>
<span class="text-xs text-emerald-600 text-center font-medium uppercase tracking-wide">Checked & Disabled</span>
</div>
</div>
</div>
</div>`,
note: null
},
{
id: 8,
title: "Preview and Confirm",
content: `<p class="text-lg text-slate-700">When all lab information, citations, and exclusions are filled out, the system will enter the preview screen.</p>
<p class="text-lg text-slate-700 mt-4 mb-6 text-qmas-800 bg-qmas-50 p-4 rounded-lg border border-qmas-100">Please carefully <strong>check all field data</strong>. You can click on the blue links on the screen to view the details of Citations and Test Exclusions.</p>
<div class="space-y-6">
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-xl border border-slate-200 shadow-sm">
<img src="8.jpg" alt="Preview Main Screen" class="w-full h-auto object-cover hover:scale-[1.01] transition-transform duration-300">
</div>
<span class="text-xs text-slate-500 text-center font-medium uppercase tracking-wide">Main Preview Screen</span>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm bg-stone-100">
<img src="8.1.jpg" alt="Citations Pop-up" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300">
</div>
<span class="text-xs text-slate-500 text-center font-medium uppercase tracking-wide">Citations Pop-up</span>
</div>
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm bg-stone-100">
<img src="8.2.jpg" alt="Exclusion Pop-up" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300">
</div>
<span class="text-xs text-slate-500 text-center font-medium uppercase tracking-wide">Test Exclusion Pop-up</span>
</div>
</div>
</div>`,
note: null
},
{
id: 9,
title: "Send to CPSC",
content: `<p class="text-lg text-slate-700">After confirming the data is correct and submitting, the system will show a Loading Icon and begin sending the data to the CPSC.</p>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mt-6 mb-8">
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm bg-stone-100">
<img src="9.jpg" alt="Submitting Data Loading" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300">
</div>
<span class="text-xs text-slate-500 text-center font-medium uppercase tracking-wide">1. Submitting (Loading)</span>
</div>
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm bg-stone-100">
<img src="9.1.jpg" alt="Submission Completed" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300">
</div>
<span class="text-xs text-emerald-600 text-center font-medium uppercase tracking-wide">2. Success Confirmation</span>
</div>
</div>
<div class="mt-6 grid grid-cols-1 sm:grid-cols-2 gap-4">
<div class="bg-emerald-50 border border-emerald-200 p-4 rounded-lg">
<h4 class="font-bold text-emerald-800 mb-2">Success</h4>
<p class="text-emerald-700 text-sm">Once the transmission is complete, an "Ok - Completed" success screen will be displayed.</p>
</div>
<div class="bg-rose-50 border border-rose-200 p-4 rounded-lg">
<h4 class="font-bold text-rose-800 mb-2">Failure / Warning</h4>
<p class="text-rose-700 text-sm">If the CPSC returns any error (Error from CPSC), the system will display a warning prompt. Please follow the prompt to make corrections.</p>
</div>
</div>`,
note: null
},
{
id: 10,
title: "View Transmission Log",
content: `<p class="text-lg text-slate-700 mb-4">After the transmission is complete, you can return to the Product Profile to view the status log of the eFiling:</p>
<ul class="space-y-6">
<li class="bg-slate-50 p-5 rounded-xl border border-slate-200">
<span class="inline-block bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded font-bold mb-2 tracking-wide uppercase">eFiling Awaiting Certification</span>
<p class="text-slate-600 text-sm mb-4">In this status, the data has been sent, and you can only click "View" to see the details (read-only mode).</p>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm"><img src="10.jpg" alt="Awaiting Certification Status" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300"></div>
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm"><img src="10.1.jpg" alt="View Detail (Read Only)" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300"></div>
</div>
</li>
<li class="bg-slate-50 p-5 rounded-xl border border-slate-200">
<span class="inline-block bg-stone-200 text-stone-800 text-xs px-2 py-1 rounded font-bold mb-2 tracking-wide uppercase">eFiling Draft</span>
<p class="text-slate-600 text-sm mb-4">If it hasn't been sent yet, you can click "Back to edit" to continue editing. (The button to add a new eFiling will be disabled at this point).</p>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm"><img src="10.2.jpg" alt="Draft Status" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300"></div>
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm"><img src="10.3.jpg" alt="Edit Draft" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300"></div>
</div>
</li>
<li class="bg-slate-50 p-5 rounded-xl border border-slate-200">
<span class="inline-block bg-red-100 text-red-800 text-xs px-2 py-1 rounded font-bold mb-2 tracking-wide uppercase">Cancel from CPSC</span>
<p class="text-slate-600 text-sm mb-4">If the case is canceled, the system will have a clear label (Chip) indicating it is canceled.</p>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm"><img src="10.4.jpg" alt="Cancelled Status" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300"></div>
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm"><img src="10.5.jpg" alt="View Cancelled Detail" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300"></div>
</div>
</li>
</ul>`,
note: null
},
{
id: 11,
title: "Resend / Edit Submitted eFiling",
content: `<p class="text-lg text-slate-700 mb-6">If the data has already been sent to the CPSC (status is Awaiting Certification), but you need to modify or resend it, please click the <strong>"Add eFiling"</strong> button to edit the eFiling content.</p>
<div class="overflow-hidden rounded-xl border border-slate-200 shadow-sm mb-8">
<img src="11.jpg" alt="Click Add eFiling" class="w-full h-auto object-cover hover:scale-[1.01] transition-transform duration-300">
</div>
<h3 class="font-bold text-slate-800 text-lg mb-4">Important rules regarding the Version ID:</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
<div class="flex flex-col gap-3">
<div class="flex">
<div class="flex-shrink-0 flex items-center justify-center w-8 h-8 rounded-full bg-amber-100 text-amber-600 font-bold mr-3">1</div>
<div>
<h4 class="font-semibold text-slate-800">Modifications within 48 hours</h4>
<p class="text-slate-600 text-sm mt-1">Filling in the <strong>same</strong> Version ID will overwrite your original submission. You can also choose to create a completely new Version ID.</p>
</div>
</div>
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm bg-white mt-2">
<img src="11.1.jpg" alt="Within 48 hours warning" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300">
</div>
<span class="text-xs text-amber-600 text-center font-medium uppercase tracking-wide">Within 48 hours warning</span>
</div>
</div>
<div class="flex flex-col gap-3">
<div class="flex">
<div class="flex-shrink-0 flex items-center justify-center w-8 h-8 rounded-full bg-qmas-100 text-qmas-600 font-bold mr-3">2</div>
<div>
<h4 class="font-semibold text-slate-800">Modifications after 48 hours</h4>
<p class="text-slate-600 text-sm mt-1">You must create a <strong>completely new</strong> Version ID to submit.</p>
</div>
</div>
<div class="flex flex-col gap-2">
<div class="overflow-hidden rounded-lg border border-slate-200 shadow-sm bg-white mt-2">
<img src="11.2.jpg" alt="After 48 hours requirement" class="w-full h-auto object-cover hover:scale-[1.02] transition-transform duration-300">
</div>
<span class="text-xs text-qmas-600 text-center font-medium uppercase tracking-wide">After 48 hours requirement</span>
</div>
</div>
</div>`,
note: null
}
];
let currentStep = 1;
const totalSteps = stepsData.length;
let progressChartInstance = null;
const stepperList = document.getElementById('stepper-list');
const contentTitle = document.getElementById('content-title');
const contentBody = document.getElementById('content-body');
const contentNote = document.getElementById('content-note');
const contentNoteText = document.getElementById('content-note-text');
const contentBadge = document.getElementById('content-step-badge');
const mainContentArea = document.getElementById('main-content-area');
const btnPrev = document.getElementById('btn-prev');
const btnNext = document.getElementById('btn-next');
const progressText = document.getElementById('progress-text');
function initStepper() {
stepperList.innerHTML = '';
stepsData.forEach(step => {
const li = document.createElement('li');
const button = document.createElement('button');
button.className = `step-item w-full text-left px-4 py-3 rounded-lg flex items-center border ${currentStep === step.id ? 'bg-qmas-50 border-qmas-200 shadow-sm' : 'bg-transparent border-transparent hover:bg-stone-50'} focus:outline-none focus:ring-2 focus:ring-qmas-500`;
button.onclick = () => loadStep(step.id);
const numberCircle = document.createElement('span');
numberCircle.className = `flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold mr-3 transition-colors ${currentStep === step.id ? 'bg-qmas-600 text-white' : (step.id < currentStep ? 'bg-emerald-100 text-emerald-600' : 'bg-stone-100 text-slate-400')}`;
numberCircle.innerHTML = step.id < currentStep ? '✓' : step.id;
const titleSpan = document.createElement('span');
titleSpan.className = `text-sm font-medium ${currentStep === step.id ? 'text-qmas-900' : 'text-slate-600'}`;
titleSpan.textContent = step.title;
button.appendChild(numberCircle);
button.appendChild(titleSpan);
li.appendChild(button);
stepperList.appendChild(li);
});
}
function initChart() {
const ctx = document.getElementById('progressChart').getContext('2d');
progressChartInstance = new Chart(ctx, {
type: 'doughnut',
data: {
labels: ['Completed', 'Remaining'],
datasets: [{
data: [currentStep, totalSteps - currentStep],
backgroundColor: ['#005EFF', '#e2e8f0'],
borderWidth: 0,
hoverOffset: 4
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
cutout: '75%',
plugins: {
legend: { display: false },
tooltip: {
callbacks: {
label: function(context) {
let label = context.label || '';
if (label) { label += ': '; }
if (context.parsed !== null) { label += context.parsed + ' Steps'; }
return label;
}
}
}
},
animation: { animateScale: true, animateRotate: true }
}
});
}
function updateChart() {
if(progressChartInstance) {
progressChartInstance.data.datasets[0].data = [currentStep, totalSteps - currentStep];
if (currentStep === totalSteps) {
progressChartInstance.data.datasets[0].backgroundColor = ['#10b981', '#e2e8f0'];
} else {
progressChartInstance.data.datasets[0].backgroundColor = ['#005EFF', '#e2e8f0'];
}
progressChartInstance.update();
}
}
function loadStep(stepId) {
currentStep = stepId;
const stepData = stepsData.find(s => s.id === stepId);
mainContentArea.classList.remove('step-content-enter');
void mainContentArea.offsetWidth;
mainContentArea.classList.add('step-content-enter');
contentBadge.textContent = `Step ${stepData.id}`;
contentTitle.textContent = stepData.title;
contentBody.innerHTML = stepData.content;
if (stepData.note) {
contentNoteText.textContent = stepData.note;
contentNote.classList.remove('hidden');
} else {
contentNote.classList.add('hidden');
}
btnPrev.disabled = currentStep === 1;
btnNext.disabled = currentStep === totalSteps;
if (currentStep === totalSteps) {
btnNext.innerHTML = '✓ Process Complete';
btnNext.classList.remove('bg-qmas-600', 'hover:bg-qmas-700');
btnNext.classList.add('bg-emerald-600', 'hover:bg-emerald-700');
contentBadge.classList.replace('bg-qmas-100', 'bg-emerald-100');
contentBadge.classList.replace('text-qmas-700', 'text-emerald-700');
} else {
btnNext.innerHTML = 'Next Step →';
btnNext.classList.add('bg-qmas-600', 'hover:bg-qmas-700');
btnNext.classList.remove('bg-emerald-600', 'hover:bg-emerald-700');
contentBadge.classList.replace('bg-emerald-100', 'bg-qmas-100');
contentBadge.classList.replace('text-emerald-700', 'text-qmas-700');
}
progressText.textContent = `Step ${currentStep} of ${totalSteps}`;
if(currentStep === totalSteps) {
progressText.classList.replace('text-qmas-600', 'text-emerald-600');
} else {
progressText.classList.replace('text-emerald-600', 'text-qmas-600');
}
initStepper();
updateChart();
// Add Lightbox functionality to all images in the content
const contentImages = mainContentArea.querySelectorAll('img');
contentImages.forEach(img => {
img.classList.add('cursor-zoom-in');
img.title = "Click to enlarge";
// 更新:將 img.alt 一齊傳入 openModal 函數
img.addEventListener('click', () => openModal(img.src, img.alt));
});
if(window.innerWidth < 1024) {
mainContentArea.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
}
btnPrev.addEventListener('click', () => {
if (currentStep > 1) loadStep(currentStep - 1);
});
btnNext.addEventListener('click', () => {
if (currentStep < totalSteps) loadStep(currentStep + 1);
});
document.addEventListener('DOMContentLoaded', () => {
initStepper();
initChart();
loadStep(1);
});
// Lightbox Logic
const imageModal = document.getElementById('image-modal');
const modalImage = document.getElementById('modal-image');
const modalCaption = document.getElementById('modal-caption');
// 更新:接收 alt 參數並控制顯示
function openModal(src, alt) {
modalImage.src = src;
if (alt) {
modalCaption.textContent = alt;
modalCaption.classList.remove('hidden');
} else {
modalCaption.classList.add('hidden');
}
imageModal.classList.remove('hidden');
// Trigger reflow for transition
void imageModal.offsetWidth;
imageModal.classList.remove('opacity-0');
modalImage.classList.remove('scale-95');
modalImage.classList.add('scale-100');
document.body.style.overflow = 'hidden'; // Prevent background scrolling
}
imageModal.addEventListener('click', () => {
imageModal.classList.add('opacity-0');
modalImage.classList.remove('scale-100');
modalImage.classList.add('scale-95');
setTimeout(() => {
imageModal.classList.add('hidden');
document.body.style.overflow = ''; // Restore scrolling
}, 300);
});
</script>
</body>
</html>