Project

General

Profile

Feature #27166 » job-schedule-shift-ui-mockup.html

UI Mockup: Job Schedule - Shift Dropdown - Suphawan Phiwngam, 05/22/2026 06:27 PM

 
1
<!DOCTYPE html>
2
<html lang="th">
3
<head>
4
    <meta charset="UTF-8">
5
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
    <title>Job Schedule - Shift Dropdown UI Mockup</title>
7
    <style>
8
        * { margin: 0; padding: 0; box-sizing: border-box; }
9
        body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f5; padding: 24px; color: #333; }
10
        .container { max-width: 680px; margin: 0 auto; }
11
        h1 { font-size: 18px; margin-bottom: 24px; color: #1a1a1a; }
12
        h2 { font-size: 15px; margin-bottom: 12px; color: #555; font-weight: 600; }
13
        .card { background: #fff; border-radius: 8px; padding: 24px; margin-bottom: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
14
        .card-title { font-size: 13px; color: #888; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.5px; }
15
        .form-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
16
        .form-label { font-size: 14px; color: #555; min-width: 90px; text-align: right; }
17
        .input-date { border: 1px solid #d9d9d9; border-radius: 4px; padding: 6px 12px; font-size: 14px; width: 160px; background: #fff; }
18
        .input-select { border: 1px solid #d9d9d9; border-radius: 4px; padding: 6px 12px; font-size: 14px; width: 160px; background: #fff; appearance: auto; }
19
        .btn-icon { width: 28px; height: 28px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; }
20
        .btn-add { background: none; color: #1890ff; font-size: 20px; }
21
        .btn-remove { background: none; color: #ff4d4f; font-size: 20px; }
22
        .btn-add:hover { color: #40a9ff; }
23
        .btn-remove:hover { color: #ff7875; }
24
        .arrow { color: #bbb; font-size: 16px; }
25
        .divider { border: none; border-top: 1px dashed #e8e8e8; margin: 20px 0; }
26
        .note { font-size: 12px; color: #999; margin-top: 8px; padding-left: 102px; }
27
        .badge { display: inline-block; background: #e6f7ff; color: #1890ff; font-size: 11px; padding: 2px 8px; border-radius: 10px; margin-left: 8px; }
28
        .section-label { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 12px; }
29

    
30
        /* Option A */
31
        .option-a .form-row { margin-bottom: 8px; }
32
        .range-separator { font-size: 14px; color: #999; padding: 0 4px; }
33

    
34
        /* Popup */
35
        .popup-overlay { background: rgba(0,0,0,0.3); border-radius: 8px; padding: 24px; margin-top: 16px; }
36
        .popup { background: #fff; border-radius: 8px; padding: 20px; max-width: 440px; margin: 0 auto; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
37
        .popup-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
38
        .popup-icon { color: #faad14; font-size: 18px; }
39
        .popup-body { font-size: 13px; color: #555; line-height: 1.6; margin-bottom: 16px; }
40
        .popup-actions { display: flex; justify-content: flex-end; gap: 8px; }
41
        .btn { padding: 6px 16px; border-radius: 4px; font-size: 13px; cursor: pointer; border: 1px solid #d9d9d9; background: #fff; }
42
        .btn-primary { background: #1890ff; color: #fff; border-color: #1890ff; }
43
        .btn-primary:hover { background: #40a9ff; }
44
        .highlight { background: #fffbe6; border: 1px solid #ffe58f; border-radius: 4px; padding: 8px 12px; font-size: 12px; color: #ad6800; margin-top: 8px; }
45
    </style>
46
</head>
47
<body>
48
    <div class="container">
49
        <h1>UI Mockup: Job Schedule — Shift Dropdown</h1>
50

    
51
        <!-- Single Slot -->
52
        <div class="card">
53
            <div class="card-title">แบบ 1 Slot (ใช้งานหลัก)</div>
54
            <div class="section-label">Job Schedule</div>
55
            <div class="form-row">
56
                <input type="date" class="input-date" value="2026-05-22">
57
                <span class="arrow"></span>
58
                <select class="input-select">
59
                    <option>Shift-1 (08:00)</option>
60
                    <option>Shift-2 (16:55)</option>
61
                    <option>Shift-3 (00:30)</option>
62
                </select>
63
                <button class="btn-icon btn-add" title="เพิ่ม slot"></button>
64
            </div>
65
            <div class="note">start_ts = 2026-05-22 08:00:00 → end_ts = 2026-05-22 16:55:00</div>
66
        </div>
67

    
68
        <!-- Multi Slot -->
69
        <div class="card">
70
            <div class="card-title">แบบหลาย Slot (เพิ่มได้)</div>
71
            <div class="section-label">Job Schedule</div>
72
            <div class="form-row">
73
                <input type="date" class="input-date" value="2026-05-22">
74
                <span class="arrow"></span>
75
                <select class="input-select">
76
                    <option selected>Shift-1 (08:00)</option>
77
                    <option>Shift-2 (16:55)</option>
78
                    <option>Shift-3 (00:30)</option>
79
                </select>
80
                <button class="btn-icon btn-add" title="เพิ่ม slot"></button>
81
                <button class="btn-icon btn-remove" title="ลบ slot"></button>
82
            </div>
83
            <div class="form-row">
84
                <input type="date" class="input-date" value="2026-05-22">
85
                <span class="arrow"></span>
86
                <select class="input-select">
87
                    <option>Shift-1 (08:00)</option>
88
                    <option selected>Shift-2 (16:55)</option>
89
                    <option>Shift-3 (00:30)</option>
90
                </select>
91
                <button class="btn-icon btn-add" title="เพิ่ม slot"></button>
92
                <button class="btn-icon btn-remove" title="ลบ slot"></button>
93
            </div>
94
            <div class="form-row">
95
                <input type="date" class="input-date" value="2026-05-23">
96
                <span class="arrow"></span>
97
                <select class="input-select">
98
                    <option selected>Shift-1 (08:00)</option>
99
                    <option>Shift-2 (16:55)</option>
100
                    <option>Shift-3 (00:30)</option>
101
                </select>
102
                <button class="btn-icon btn-add" title="เพิ่ม slot"></button>
103
                <button class="btn-icon btn-remove" title="ลบ slot"></button>
104
            </div>
105
            <div class="note">สร้าง ms_job_plan 3 records (แต่ละ row = 1 record)</div>
106
        </div>
107

    
108
        <!-- Option A: Date Range -->
109
        <div class="card option-a">
110
            <div class="card-title">Option A: เลือก Range วันที่ + กะ (สร้าง plan ทุกวันอัตโนมัติ)</div>
111
            <div class="section-label">Job Schedule</div>
112
            <div class="form-row">
113
                <input type="date" class="input-date" value="2026-05-22">
114
                <span class="range-separator">~</span>
115
                <input type="date" class="input-date" value="2026-05-26">
116
                <span class="arrow"></span>
117
                <select class="input-select">
118
                    <option selected>Shift-1 (08:00)</option>
119
                    <option>Shift-2 (16:55)</option>
120
                    <option>Shift-3 (00:30)</option>
121
                </select>
122
            </div>
123
            <div class="highlight">
124
                ⚡ สร้าง plan อัตโนมัติ 5 วัน: 22, 23, 24, 25, 26 พ.ค. → Shift-1 ทุกวัน (5 records)
125
            </div>
126
        </div>
127

    
128
        <!-- Cross-day shift -->
129
        <div class="card">
130
            <div class="card-title">กะข้ามวัน (Shift-3)</div>
131
            <div class="section-label">Job Schedule</div>
132
            <div class="form-row">
133
                <input type="date" class="input-date" value="2026-05-22">
134
                <span class="arrow"></span>
135
                <select class="input-select">
136
                    <option>Shift-1 (08:00)</option>
137
                    <option>Shift-2 (16:55)</option>
138
                    <option selected>Shift-3 (00:30)</option>
139
                </select>
140
            </div>
141
            <div class="note">start_ts = 2026-05-22 00:30:00 → end_ts = 2026-05-22 08:00:00 (Shift-1 start ของวันเดียวกัน)</div>
142
        </div>
143

    
144
        <hr class="divider">
145

    
146
        <!-- Popup Confirm -->
147
        <div class="card">
148
            <div class="card-title">Popup Confirm — เมื่อแก้เวลา Master Shift</div>
149
            <div class="popup-overlay">
150
                <div class="popup">
151
                    <div class="popup-title">
152
                        <span class="popup-icon">⚠️</span>
153
                        ยืนยันการแก้ไขเวลากะ
154
                    </div>
155
                    <div class="popup-body">
156
                        การแก้ไขเวลา <strong>Shift-1</strong> (08:00 → 08:30) จะอัปเดต Job Plan ในอนาคต <strong>12 รายการ</strong> (plan_date ≥ วันนี้)<br><br>
157
                        Plan ที่ผ่านไปแล้วจะไม่ถูกแก้ไข
158
                    </div>
159
                    <div class="popup-actions">
160
                        <button class="btn">ยกเลิก</button>
161
                        <button class="btn btn-primary">ยืนยัน</button>
162
                    </div>
163
                </div>
164
            </div>
165
        </div>
166

    
167
    </div>
168
</body>
169
</html>
(1-1/4)