Fix dynamic API base path for server deployment
This commit is contained in:
+29
-15
@@ -5,10 +5,12 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>TPU Survey - อาจารย์/เจ้าของโครงการ</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,8 +39,8 @@
|
||||
<div class="sidebar-header">
|
||||
<img src="pic/logo.png" alt="TPU Logo" class="sidebar-logo-img">
|
||||
<div>
|
||||
<h2 class="text-white font-bold text-sm leading-tight">คณะนวัตกรรมดิจิทัลเทคโนโลยี</h2>
|
||||
<small class="text-yellow-300 font-medium">มหาวิทยาลัยตาปี</small>
|
||||
|
||||
<span class="text-white font-bold text-sm leading-tight">มหาวิทยาลัยตาปี</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -83,14 +85,20 @@
|
||||
<div id="view-mySurveys" class="view-section space-y-4">
|
||||
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 mb-4">
|
||||
<div>
|
||||
<h2 class="text-xl font-bold text-blue-900"><i class="fas fa-tasks mr-2 text-yellow-500"></i>แบบสอบถามของฉัน</h2>
|
||||
<p class="text-xs text-gray-500 font-medium">จัดการและตรวจสอบแบบสอบถามประเมินผลโครงการในระบบ</p>
|
||||
<h2 class="text-xl font-bold text-blue-900"><i
|
||||
class="fas fa-tasks mr-2 text-yellow-500"></i>แบบสอบถามของฉัน</h2>
|
||||
<p class="text-xs text-gray-500 font-medium">จัดการและตรวจสอบแบบสอบถามประเมินผลโครงการในระบบ
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<button class="btn-yellow px-4 py-2 rounded text-xs font-bold shadow-sm flex items-center gap-1.5 transition-all" onclick="showTeacherCreateModal()">
|
||||
<button
|
||||
class="btn-yellow px-4 py-2 rounded text-xs font-bold shadow-sm flex items-center gap-1.5 transition-all"
|
||||
onclick="showTeacherCreateModal()">
|
||||
<i class="fas fa-plus"></i> สร้างแบบสอบถาม
|
||||
</button>
|
||||
<button class="bg-green-600 hover:bg-green-700 text-white border border-black px-4 py-2 rounded text-xs font-bold shadow-sm flex items-center gap-1.5 transition-all" onclick="showImportGoogleFormModal()">
|
||||
<button
|
||||
class="bg-green-600 hover:bg-green-700 text-white border border-black px-4 py-2 rounded text-xs font-bold shadow-sm flex items-center gap-1.5 transition-all"
|
||||
onclick="showImportGoogleFormModal()">
|
||||
<i class="fas fa-file-import"></i> นำเข้าจาก Google Forms
|
||||
</button>
|
||||
</div>
|
||||
@@ -116,7 +124,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,#e8a838,#f0c040);color:#fff;font-size:36px;font-weight:700;display:flex;align-items:center;justify-content:center;margin:0 auto 16px;">T</div>
|
||||
<div id="profileAvatar"
|
||||
style="width:80px;height:80px;border-radius:50%;background:linear-gradient(135deg,#e8a838,#f0c040);color:#fff;font-size:36px;font-weight:700;display:flex;align-items:center;justify-content:center;margin:0 auto 16px;">
|
||||
T</div>
|
||||
<h3 id="profileDisplayName" style="margin-bottom:4px;">—</h3>
|
||||
<span class="text-muted text-sm" id="profileDisplayRole">อาจารย์</span>
|
||||
<div style="margin-top:12px;">
|
||||
@@ -124,7 +134,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>
|
||||
|
||||
@@ -139,7 +150,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>
|
||||
@@ -174,8 +186,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