Fix dynamic API base path for server deployment
This commit is contained in:
+29
-20
@@ -5,10 +5,12 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>TPU Survey - Admin Dashboard</title>
|
||||
<meta name="description" content="แดชบอร์ดผู้ดูแลระบบ สำหรับจัดการแบบสอบถามและผู้ใช้ คณะนวัตกรรมดิจิทัลเทคโนโลยี มหาวิทยาลัยตาปี">
|
||||
<meta name="description"
|
||||
content="แดชบอร์ดผู้ดูแลระบบ สำหรับจัดการแบบสอบถามและผู้ใช้ คณะนวัตกรรมดิจิทัลเทคโนโลยี มหาวิทยาลัยตาปี">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700;800;900&display=swap"
|
||||
rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<script>
|
||||
@@ -19,8 +21,8 @@
|
||||
'thai': ['"Noto Sans Thai"', 'sans-serif']
|
||||
},
|
||||
colors: {
|
||||
'primary': { 50:'#eff6ff',100:'#dbeafe',200:'#bfdbfe',300:'#93c5fd',400:'#60a5fa',500:'#3b82f6',600:'#2563eb',700:'#1d4ed8',800:'#1e40af',900:'#1e3a8a' },
|
||||
'accent': { 50:'#fffbeb',100:'#fef3c7',200:'#fde68a',300:'#fcd34d',400:'#fbbf24',500:'#f59e0b',600:'#d97706',700:'#b45309',800:'#92400e',900:'#78350f' }
|
||||
'primary': { 50: '#eff6ff', 100: '#dbeafe', 200: '#bfdbfe', 300: '#93c5fd', 400: '#60a5fa', 500: '#3b82f6', 600: '#2563eb', 700: '#1d4ed8', 800: '#1e40af', 900: '#1e3a8a' },
|
||||
'accent': { 50: '#fffbeb', 100: '#fef3c7', 200: '#fde68a', 300: '#fcd34d', 400: '#fbbf24', 500: '#f59e0b', 600: '#d97706', 700: '#b45309', 800: '#92400e', 900: '#78350f' }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,11 +39,10 @@
|
||||
<!-- Sidebar -->
|
||||
<aside class="sidebar">
|
||||
<div class="sidebar-header">
|
||||
<img src="pic/logo.png" alt="TPU Logo" class="sidebar-logo-img"
|
||||
onerror="this.style.display='none'">
|
||||
<img src="pic/logo.png" alt="TPU Logo" class="sidebar-logo-img" onerror="this.style.display='none'">
|
||||
<div>
|
||||
<h2 class="text-white font-bold text-sm leading-tight">คณะนวัตกรรมดิจิทัลเทคโนโลยี</h2>
|
||||
<span class="text-yellow-300 text-xs font-medium">มหาวิทยาลัยตาปี</span>
|
||||
|
||||
<span class="text-white font-bold text-sm leading-tight">มหาวิทยาลัยตาปี</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -157,8 +158,8 @@
|
||||
<div class="status-chart-row">
|
||||
<div class="status-chart-label">📝 ร่าง</div>
|
||||
<div class="status-chart-bar-track">
|
||||
<div class="status-chart-bar-fill draft" id="chartDraft"
|
||||
style="width: 0%"></div>
|
||||
<div class="status-chart-bar-fill draft" id="chartDraft" style="width: 0%">
|
||||
</div>
|
||||
</div>
|
||||
<div class="status-chart-count" id="chartDraftCount">0</div>
|
||||
</div>
|
||||
@@ -233,9 +234,8 @@
|
||||
<button class="filter-tab" data-filter="active"
|
||||
onclick="filterSurveys('active', this)">🟢 เปิด <span class="tab-count"
|
||||
id="countActive">0</span></button>
|
||||
<button class="filter-tab" data-filter="draft"
|
||||
onclick="filterSurveys('draft', this)">📝 ร่าง <span class="tab-count"
|
||||
id="countDraft">0</span></button>
|
||||
<button class="filter-tab" data-filter="draft" onclick="filterSurveys('draft', this)">📝
|
||||
ร่าง <span class="tab-count" id="countDraft">0</span></button>
|
||||
<button class="filter-tab" data-filter="closed"
|
||||
onclick="filterSurveys('closed', this)">🔴 ปิด <span class="tab-count"
|
||||
id="countClosed">0</span></button>
|
||||
@@ -247,8 +247,11 @@
|
||||
<input type="text" id="surveySearchInput" placeholder="ค้นหาแบบสอบถาม..."
|
||||
oninput="filterSurveysBySearch()">
|
||||
</div>
|
||||
<button class="btn btn-primary btn-sm" onclick="showCreateSurveyModal()">➕ สร้างแบบสอบถาม</button>
|
||||
<button class="btn btn-primary btn-sm" style="background-color:#16a34a;border-color:#16a34a;" onclick="showImportGoogleFormModal()">📥 นำเข้าจาก Google Forms</button>
|
||||
<button class="btn btn-primary btn-sm" onclick="showCreateSurveyModal()">➕
|
||||
สร้างแบบสอบถาม</button>
|
||||
<button class="btn btn-primary btn-sm"
|
||||
style="background-color:#16a34a;border-color:#16a34a;"
|
||||
onclick="showImportGoogleFormModal()">📥 นำเข้าจาก Google Forms</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -277,7 +280,9 @@
|
||||
<!-- Profile Card -->
|
||||
<div class="card" style="text-align:center;">
|
||||
<div class="card-body" style="padding:32px 24px;">
|
||||
<div id="profileAvatar" style="width:80px;height:80px;border-radius:50%;background:linear-gradient(135deg,#1e3a8a,#2563eb);color:#fff;font-size:36px;font-weight:700;display:flex;align-items:center;justify-content:center;margin:0 auto 16px;">A</div>
|
||||
<div id="profileAvatar"
|
||||
style="width:80px;height:80px;border-radius:50%;background:linear-gradient(135deg,#1e3a8a,#2563eb);color:#fff;font-size:36px;font-weight:700;display:flex;align-items:center;justify-content:center;margin:0 auto 16px;">
|
||||
A</div>
|
||||
<h3 id="profileDisplayName" style="margin-bottom:4px;">—</h3>
|
||||
<span class="text-muted text-sm" id="profileDisplayRole">ผู้ดูแลระบบ</span>
|
||||
<div style="margin-top:12px;">
|
||||
@@ -285,7 +290,8 @@
|
||||
</div>
|
||||
<hr style="border-color:var(--border-color);margin:20px 0;">
|
||||
<div class="text-sm text-muted">🆔 รหัสบุคลากร</div>
|
||||
<div style="font-size:18px;font-weight:600;margin-top:4px;" id="profilePersonnelCode">—</div>
|
||||
<div style="font-size:18px;font-weight:600;margin-top:4px;" id="profilePersonnelCode">—
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -300,7 +306,8 @@
|
||||
<label class="form-label">รหัสบุคลากร</label>
|
||||
<input type="text" class="form-input" id="profileCode" disabled
|
||||
style="background:var(--bg-secondary);cursor:not-allowed;opacity:0.7;">
|
||||
<small class="text-muted" style="display:block;margin-top:4px;">🔒 ไม่สามารถแก้ไขได้ — ติดต่อผู้ดูแลระบบ</small>
|
||||
<small class="text-muted" style="display:block;margin-top:4px;">🔒
|
||||
ไม่สามารถแก้ไขได้ — ติดต่อผู้ดูแลระบบ</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label">ชื่อ-นามสกุล *</label>
|
||||
@@ -335,8 +342,10 @@
|
||||
placeholder="พิมพ์รหัสผ่านใหม่อีกครั้ง">
|
||||
</div>
|
||||
<div style="display:flex;gap:12px;justify-content:flex-end;margin-top:24px;">
|
||||
<button type="button" class="btn btn-secondary" onclick="loadProfile()">🔄 รีเซ็ต</button>
|
||||
<button type="button" class="btn btn-primary" onclick="saveProfile()">💾 บันทึกข้อมูล</button>
|
||||
<button type="button" class="btn btn-secondary" onclick="loadProfile()">🔄
|
||||
รีเซ็ต</button>
|
||||
<button type="button" class="btn btn-primary" onclick="saveProfile()">💾
|
||||
บันทึกข้อมูล</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user