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:
@@ -142,17 +142,25 @@ select {
|
||||
|
||||
/* ==================== Buttons ==================== */
|
||||
.btn {
|
||||
padding: 12px 24px;
|
||||
padding: 10px 20px;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
border-radius: 8px;
|
||||
font-family: inherit;
|
||||
font-size: 0.9rem;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
transition: all 0.2s ease;
|
||||
white-space: nowrap;
|
||||
text-decoration: none;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.btn:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
@@ -162,8 +170,9 @@ select {
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 12px rgba(26, 82, 118, 0.4);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 16px rgba(26, 82, 118, 0.4);
|
||||
filter: brightness(1.05);
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
@@ -173,28 +182,107 @@ select {
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
background: rgba(26, 82, 118, 0.05);
|
||||
background: var(--primary);
|
||||
color: white;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
|
||||
color: white;
|
||||
box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
|
||||
}
|
||||
|
||||
.btn-success:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 16px rgba(39, 174, 96, 0.4);
|
||||
filter: brightness(1.05);
|
||||
}
|
||||
|
||||
.btn-warning {
|
||||
background: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
|
||||
color: white;
|
||||
box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
|
||||
}
|
||||
|
||||
.btn-warning:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 16px rgba(243, 156, 18, 0.4);
|
||||
filter: brightness(1.05);
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
|
||||
color: white;
|
||||
box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
|
||||
}
|
||||
|
||||
.btn-danger:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 16px rgba(231, 76, 60, 0.4);
|
||||
filter: brightness(1.05);
|
||||
}
|
||||
|
||||
.btn-cancel {
|
||||
background: #f0f3f5;
|
||||
color: var(--text-secondary);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.btn-cancel:hover {
|
||||
background: #e5e9ec;
|
||||
color: var(--text-primary);
|
||||
border-color: #d0d5da;
|
||||
}
|
||||
|
||||
/* 特殊漸層按鈕 - 儲存至崗位清單 */
|
||||
.btn-gradient-purple {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: white;
|
||||
box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
|
||||
}
|
||||
|
||||
.btn-gradient-purple:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
|
||||
filter: brightness(1.05);
|
||||
}
|
||||
|
||||
.btn svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
fill: currentColor;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* 小尺寸按鈕 */
|
||||
.btn-sm {
|
||||
padding: 6px 12px;
|
||||
font-size: 0.8rem;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.btn-sm svg {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
/* 大尺寸按鈕 */
|
||||
.btn-lg {
|
||||
padding: 14px 28px;
|
||||
font-size: 1rem;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.btn-lg svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.btn-lookup {
|
||||
padding: 10px 16px;
|
||||
border: 1.5px solid var(--border);
|
||||
border-radius: 6px;
|
||||
border-radius: 8px;
|
||||
background: #f8fafc;
|
||||
color: var(--text-secondary);
|
||||
font-size: 0.85rem;
|
||||
@@ -207,17 +295,19 @@ select {
|
||||
background: var(--primary);
|
||||
color: white;
|
||||
border-color: var(--primary);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.btn-icon {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
padding: 0;
|
||||
border: 1.5px solid var(--border);
|
||||
border-radius: 6px;
|
||||
border-radius: 8px;
|
||||
background: #f8fafc;
|
||||
color: var(--text-secondary);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s ease;
|
||||
@@ -227,6 +317,7 @@ select {
|
||||
background: var(--primary);
|
||||
color: white;
|
||||
border-color: var(--primary);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.btn-icon svg {
|
||||
@@ -265,84 +356,139 @@ select {
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
/* ==================== AI Bags (Three Fortune Bags) ==================== */
|
||||
.ai-bags-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 8px;
|
||||
margin-bottom: 16px;
|
||||
/* ==================== AI Helper (AI 幫我想) ==================== */
|
||||
.ai-helper-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
margin-bottom: 20px;
|
||||
padding: 16px;
|
||||
background: linear-gradient(135deg, rgba(155, 89, 182, 0.08) 0%, rgba(142, 68, 173, 0.05) 100%);
|
||||
border: 1px solid rgba(155, 89, 182, 0.2);
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.ai-bag {
|
||||
position: relative;
|
||||
padding: 8px 12px;
|
||||
.ai-helper-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
width: 100%;
|
||||
padding: 14px 24px;
|
||||
background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
|
||||
border-radius: 6px;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
font-family: inherit;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ai-bag:hover {
|
||||
.ai-helper-btn:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(155, 89, 182, 0.5);
|
||||
box-shadow: 0 6px 20px rgba(155, 89, 182, 0.4);
|
||||
}
|
||||
|
||||
.ai-bag:active {
|
||||
.ai-helper-btn:active {
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.ai-bag .bag-icon {
|
||||
font-size: 1rem;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.ai-bag .bag-title {
|
||||
color: white;
|
||||
font-weight: 600;
|
||||
font-size: 0.75rem;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.ai-bag .bag-subtitle {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
font-size: 0.65rem;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.ai-bag .bag-edit-btn {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 4px;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
padding: 2px 4px;
|
||||
cursor: pointer;
|
||||
font-size: 0.7rem;
|
||||
transition: all 0.2s ease;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.ai-bag .bag-edit-btn:hover {
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.ai-bag.loading {
|
||||
pointer-events: none;
|
||||
.ai-helper-btn:disabled {
|
||||
opacity: 0.7;
|
||||
cursor: not-allowed;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.ai-bag .spinner {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
.ai-helper-btn svg {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Prompt Editor */
|
||||
.ai-prompt-editor {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.prompt-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.prompt-label {
|
||||
font-size: 0.85rem;
|
||||
font-weight: 500;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.prompt-reset-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
padding: 0;
|
||||
background: rgba(155, 89, 182, 0.1);
|
||||
border: 1px solid rgba(155, 89, 182, 0.2);
|
||||
border-radius: 6px;
|
||||
color: #8e44ad;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.prompt-reset-btn:hover {
|
||||
background: rgba(155, 89, 182, 0.2);
|
||||
border-color: rgba(155, 89, 182, 0.3);
|
||||
}
|
||||
|
||||
.prompt-textarea {
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
font-family: 'Monaco', 'Consolas', monospace;
|
||||
font-size: 0.85rem;
|
||||
line-height: 1.5;
|
||||
resize: vertical;
|
||||
background: white;
|
||||
color: var(--text-primary);
|
||||
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.prompt-textarea:focus {
|
||||
outline: none;
|
||||
border-color: #9b59b6;
|
||||
box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.15);
|
||||
}
|
||||
|
||||
.prompt-textarea::placeholder {
|
||||
color: var(--text-secondary);
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
/* AI Helper Loading State */
|
||||
.ai-helper-container.loading .ai-helper-btn {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.ai-helper-container.loading .ai-helper-btn::after {
|
||||
content: '';
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border: 2px solid rgba(255, 255, 255, 0.3);
|
||||
border-top-color: white;
|
||||
border-radius: 50%;
|
||||
animation: spin 0.8s linear infinite;
|
||||
margin: 4px auto;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
/* Legacy: Keep old styles for backward compatibility */
|
||||
.ai-bags-container {
|
||||
display: none; /* Hidden - replaced by ai-helper-container */
|
||||
}
|
||||
|
||||
/* ==================== Old AI Button (Deprecated) ==================== */
|
||||
@@ -640,3 +786,369 @@ select {
|
||||
overflow-x: auto;
|
||||
max-height: 300px;
|
||||
}
|
||||
|
||||
/* ==================== Responsive Design for Components ==================== */
|
||||
|
||||
/* Large Tablets (1024px) */
|
||||
@media (max-width: 1024px) {
|
||||
.form-grid {
|
||||
gap: 16px 24px;
|
||||
}
|
||||
|
||||
.form-grid.three-cols {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
|
||||
.tab-btn {
|
||||
padding: 14px 24px;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.ai-bags-container {
|
||||
gap: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Tablets (768px) */
|
||||
@media (max-width: 768px) {
|
||||
/* Tabs */
|
||||
.tabs {
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.tab-btn {
|
||||
padding: 12px 16px;
|
||||
font-size: 0.85rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
padding: 20px 16px;
|
||||
}
|
||||
|
||||
/* Form Grid */
|
||||
.form-grid,
|
||||
.form-grid.three-cols {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
/* Form Actions */
|
||||
.form-actions {
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
width: 100%;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.action-buttons .btn {
|
||||
flex: 1;
|
||||
min-width: calc(50% - 6px);
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.btn {
|
||||
padding: 10px 16px;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.btn svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.nav-buttons {
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.nav-btn {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
/* AI Bags */
|
||||
.ai-bags-container {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.ai-bag {
|
||||
padding: 6px 8px;
|
||||
}
|
||||
|
||||
.ai-bag .bag-title {
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
|
||||
.ai-bag .bag-subtitle {
|
||||
font-size: 0.6rem;
|
||||
}
|
||||
|
||||
.ai-bag .bag-icon {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
/* Toggle */
|
||||
.toggle-group {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.toggle-switch {
|
||||
width: 46px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.toggle-slider:before {
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
}
|
||||
|
||||
.toggle-switch input:checked + .toggle-slider:before {
|
||||
transform: translateX(22px);
|
||||
}
|
||||
|
||||
/* Checkbox */
|
||||
.checkbox-group {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
/* Modal */
|
||||
.modal {
|
||||
width: 95%;
|
||||
max-width: none;
|
||||
margin: 16px;
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.modal-header h3 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
padding: 12px 16px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.modal-footer .btn {
|
||||
flex: 1;
|
||||
min-width: calc(50% - 6px);
|
||||
}
|
||||
|
||||
/* Toast */
|
||||
.toast {
|
||||
top: 12px;
|
||||
right: 12px;
|
||||
left: 12px;
|
||||
padding: 12px 16px;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.toast svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
/* Data Preview */
|
||||
.data-preview {
|
||||
padding: 16px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.data-preview pre {
|
||||
padding: 12px;
|
||||
font-size: 0.75rem;
|
||||
max-height: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile Phones (480px) */
|
||||
@media (max-width: 480px) {
|
||||
/* Tabs */
|
||||
.tab-btn {
|
||||
padding: 10px 12px;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
padding: 16px 12px;
|
||||
}
|
||||
|
||||
/* Form */
|
||||
.form-group label {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
input[type="number"],
|
||||
input[type="date"],
|
||||
select,
|
||||
textarea {
|
||||
padding: 8px 12px;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.input-wrapper {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.btn-lookup {
|
||||
padding: 8px 12px;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
/* Form Actions */
|
||||
.form-actions {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.action-buttons .btn {
|
||||
width: 100%;
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.btn {
|
||||
padding: 10px 14px;
|
||||
font-size: 0.8rem;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.btn-icon {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
}
|
||||
|
||||
/* AI Bags */
|
||||
.ai-bags-container {
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.ai-bag {
|
||||
padding: 6px 4px;
|
||||
}
|
||||
|
||||
.ai-bag .bag-icon {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.ai-bag .bag-title {
|
||||
font-size: 0.65rem;
|
||||
}
|
||||
|
||||
.ai-bag .bag-subtitle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ai-bag .bag-edit-btn {
|
||||
padding: 1px 3px;
|
||||
font-size: 0.6rem;
|
||||
}
|
||||
|
||||
/* AI Generate Button */
|
||||
.ai-generate-btn {
|
||||
padding: 10px 16px;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
/* Toggle */
|
||||
.toggle-label {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
/* Checkbox */
|
||||
.checkbox-item {
|
||||
padding: 8px 10px;
|
||||
}
|
||||
|
||||
.checkbox-item input {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.checkbox-item label {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
/* Modal */
|
||||
.modal {
|
||||
margin: 8px;
|
||||
width: calc(100% - 16px);
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.modal-header h3 {
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.modal-close {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
padding: 10px 12px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.modal-footer .btn {
|
||||
padding: 8px 12px;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
/* Toast */
|
||||
.toast {
|
||||
top: 8px;
|
||||
right: 8px;
|
||||
left: 8px;
|
||||
padding: 10px 14px;
|
||||
font-size: 0.85rem;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.toast svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
/* Data Preview */
|
||||
.data-preview {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.data-preview h4 {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.data-preview pre {
|
||||
padding: 10px;
|
||||
font-size: 0.7rem;
|
||||
max-height: 150px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user