backup: 完成 HR_position_ 表格前綴重命名與欄位對照表整理
變更內容: - 所有資料表加上 HR_position_ 前綴 - 整理完整欄位顯示名稱與 ID 對照表 - 模組化 JS 檔案 (admin.js, ai.js, csv.js 等) - 專案結構優化 (docs/, scripts/, tests/ 等) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,25 +1,37 @@
|
||||
/**
|
||||
* Layout Styles - 布局樣式
|
||||
* 包含容器、整體布局、Header、模組切換器
|
||||
* Two-Column Layout: 左側導航 + 右側內容
|
||||
*/
|
||||
|
||||
/* ==================== Container ==================== */
|
||||
/* ==================== Main Layout ==================== */
|
||||
.app-container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 24px;
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
background: var(--bg);
|
||||
}
|
||||
|
||||
/* ==================== User Info Bar ==================== */
|
||||
.user-info-bar {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border-radius: var(--radius);
|
||||
padding: 12px 20px;
|
||||
margin-bottom: 20px;
|
||||
/* ==================== Sidebar (左側導航欄) ==================== */
|
||||
.sidebar {
|
||||
width: 240px;
|
||||
min-width: 240px;
|
||||
background: linear-gradient(180deg, #1a1f2e 0%, #2d3748 100%);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-shadow: var(--shadow);
|
||||
flex-direction: column;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 100;
|
||||
box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
/* ==================== User Info (側邊欄頂部) ==================== */
|
||||
.user-info-bar {
|
||||
padding: 20px 16px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
@@ -30,117 +42,147 @@
|
||||
}
|
||||
|
||||
.user-avatar {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 10px;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
font-size: 1.1rem;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.user-details {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.user-name {
|
||||
font-weight: 600;
|
||||
font-size: 1rem;
|
||||
font-size: 0.95rem;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.user-role {
|
||||
font-size: 0.85rem;
|
||||
opacity: 0.9;
|
||||
font-size: 0.75rem;
|
||||
opacity: 0.7;
|
||||
color: #a0aec0;
|
||||
}
|
||||
|
||||
.logout-btn {
|
||||
padding: 8px 20px;
|
||||
border: 2px solid rgba(255, 255, 255, 0.3);
|
||||
border-radius: 6px;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
color: #ffffff;
|
||||
width: 100%;
|
||||
padding: 10px 16px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.15);
|
||||
border-radius: 8px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
color: #e2e8f0;
|
||||
font-family: inherit;
|
||||
font-size: 0.9rem;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.logout-btn:hover {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border-color: rgba(255, 255, 255, 0.5);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.logout-btn svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
/* ==================== Module Selector ==================== */
|
||||
.module-selector {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
margin-bottom: 20px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.module-btn {
|
||||
flex: 1;
|
||||
min-width: 200px;
|
||||
padding: 14px 20px;
|
||||
border: 2px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
background: var(--bg-card);
|
||||
font-family: inherit;
|
||||
font-size: 0.95rem;
|
||||
font-weight: 500;
|
||||
color: var(--text-secondary);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
transition: all 0.3s ease;
|
||||
gap: 8px;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.logout-btn:hover {
|
||||
background: rgba(239, 68, 68, 0.2);
|
||||
border-color: rgba(239, 68, 68, 0.4);
|
||||
color: #fca5a5;
|
||||
}
|
||||
|
||||
.logout-btn svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
/* ==================== Module Selector (垂直導航選單) ==================== */
|
||||
.module-selector {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 16px 12px;
|
||||
gap: 6px;
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.module-btn {
|
||||
width: 100%;
|
||||
padding: 12px 14px;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
color: #a0aec0;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
transition: all 0.2s ease;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.module-btn:hover {
|
||||
border-color: var(--primary-light);
|
||||
color: var(--primary);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: var(--shadow);
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
color: #e2e8f0;
|
||||
}
|
||||
|
||||
.module-btn.active {
|
||||
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
|
||||
border-color: var(--primary);
|
||||
background: linear-gradient(135deg, var(--module-position) 0%, var(--module-position-dark) 100%);
|
||||
color: white;
|
||||
box-shadow: 0 4px 15px rgba(26, 82, 118, 0.3);
|
||||
box-shadow: 0 4px 12px var(--module-position-shadow);
|
||||
}
|
||||
|
||||
.module-btn.active.job-active {
|
||||
background: linear-gradient(135deg, var(--accent) 0%, #d35400 100%);
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
|
||||
background: linear-gradient(135deg, var(--module-job) 0%, var(--module-job-dark) 100%);
|
||||
box-shadow: 0 4px 12px var(--module-job-shadow);
|
||||
}
|
||||
|
||||
.module-btn.active.deptfunc-active {
|
||||
background: linear-gradient(135deg, var(--module-deptfunc) 0%, var(--module-deptfunc-dark) 100%);
|
||||
box-shadow: 0 4px 12px var(--module-deptfunc-shadow);
|
||||
}
|
||||
|
||||
.module-btn.active.desc-active {
|
||||
background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
|
||||
border-color: var(--green);
|
||||
box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
|
||||
background: linear-gradient(135deg, var(--module-desc) 0%, var(--module-desc-dark) 100%);
|
||||
box-shadow: 0 4px 12px var(--module-desc-shadow);
|
||||
}
|
||||
|
||||
.module-btn.active.list-active {
|
||||
background: linear-gradient(135deg, var(--module-list) 0%, var(--module-list-dark) 100%);
|
||||
box-shadow: 0 4px 12px var(--module-list-shadow);
|
||||
}
|
||||
|
||||
.module-btn.active.admin-active {
|
||||
background: linear-gradient(135deg, var(--module-admin) 0%, var(--module-admin-dark) 100%);
|
||||
box-shadow: 0 4px 12px var(--module-admin-shadow);
|
||||
}
|
||||
|
||||
.module-btn svg {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
fill: currentColor;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* ==================== Main Content (右側內容區) ==================== */
|
||||
.main-content {
|
||||
flex: 1;
|
||||
margin-left: 240px;
|
||||
padding: 24px 32px;
|
||||
min-height: 100vh;
|
||||
background: var(--bg);
|
||||
}
|
||||
|
||||
.module-content {
|
||||
@@ -159,17 +201,29 @@
|
||||
gap: 16px;
|
||||
margin-bottom: 24px;
|
||||
padding: 20px 28px;
|
||||
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
|
||||
background: linear-gradient(135deg, var(--module-position) 0%, var(--module-position-dark) 100%);
|
||||
border-radius: var(--radius);
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.app-header.job-header {
|
||||
background: linear-gradient(135deg, var(--accent) 0%, #d35400 100%);
|
||||
background: linear-gradient(135deg, var(--module-job) 0%, var(--module-job-dark) 100%);
|
||||
}
|
||||
|
||||
.app-header.deptfunc-header {
|
||||
background: linear-gradient(135deg, var(--module-deptfunc) 0%, var(--module-deptfunc-dark) 100%);
|
||||
}
|
||||
|
||||
.app-header.desc-header {
|
||||
background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
|
||||
background: linear-gradient(135deg, var(--module-desc) 0%, var(--module-desc-dark) 100%);
|
||||
}
|
||||
|
||||
.app-header.list-header {
|
||||
background: linear-gradient(135deg, var(--module-list) 0%, var(--module-list-dark) 100%);
|
||||
}
|
||||
|
||||
.app-header.admin-header {
|
||||
background: linear-gradient(135deg, var(--module-admin) 0%, var(--module-admin-dark) 100%);
|
||||
}
|
||||
|
||||
.app-header .icon {
|
||||
@@ -255,3 +309,214 @@
|
||||
height: 1px;
|
||||
background: linear-gradient(to right, var(--border), transparent);
|
||||
}
|
||||
|
||||
/* ==================== Sidebar Footer ==================== */
|
||||
.sidebar-footer {
|
||||
padding: 16px;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
||||
font-size: 0.75rem;
|
||||
color: #64748b;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* ==================== Responsive Design ==================== */
|
||||
|
||||
/* Large Tablets & Small Desktops (1024px) */
|
||||
@media (max-width: 1024px) {
|
||||
.sidebar {
|
||||
width: 200px;
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
margin-left: 200px;
|
||||
padding: 20px 24px;
|
||||
}
|
||||
|
||||
.app-header {
|
||||
padding: 16px 20px;
|
||||
}
|
||||
|
||||
.app-header h1 {
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* Tablets (768px) */
|
||||
@media (max-width: 768px) {
|
||||
.app-container {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
min-width: 100%;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
padding: 12px;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.user-info-bar {
|
||||
width: 100%;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 12px;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.logout-btn {
|
||||
width: auto;
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
.module-selector {
|
||||
width: 100%;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
padding: 8px 0;
|
||||
gap: 8px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.module-btn {
|
||||
flex: 1;
|
||||
min-width: calc(33.33% - 8px);
|
||||
padding: 10px;
|
||||
justify-content: center;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.module-btn span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
margin-left: 0;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.app-header {
|
||||
padding: 16px;
|
||||
margin-bottom: 16px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.app-header .icon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.app-header .icon svg {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.app-header h1 {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.app-header .subtitle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sidebar-footer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.section-body {
|
||||
padding: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile Phones (480px) */
|
||||
@media (max-width: 480px) {
|
||||
.sidebar {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.user-info-bar {
|
||||
padding: 8px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.user-avatar {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.user-name {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.user-role {
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
|
||||
.logout-btn {
|
||||
padding: 6px 12px;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.logout-btn span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.module-selector {
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.module-btn {
|
||||
min-width: calc(50% - 6px);
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.module-btn svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.app-header {
|
||||
padding: 12px;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.app-header .icon {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.app-header .icon svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.app-header h1 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.section-box {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
padding: 10px 12px;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.section-body {
|
||||
padding: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user