Compare commits
6 Commits
67e3be028b
...
HW_Dashboa
| Author | SHA1 | Date | |
|---|---|---|---|
| d1378d127a | |||
| f656f0a439 | |||
| 1d32a0350b | |||
| abc531a41e | |||
| 8451101325 | |||
| 3e69e74bc9 |
18
server.js
18
server.js
@@ -41,11 +41,19 @@ const pool = mysql.createPool({
|
|||||||
ram_standard VARCHAR(100),
|
ram_standard VARCHAR(100),
|
||||||
gpu_standard VARCHAR(100),
|
gpu_standard VARCHAR(100),
|
||||||
min_score INT DEFAULT 0,
|
min_score INT DEFAULT 0,
|
||||||
|
required_grade VARCHAR(50) DEFAULT '중급',
|
||||||
remarks TEXT,
|
remarks TEXT,
|
||||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
`);
|
`);
|
||||||
|
|
||||||
|
// 테이블이 이미 존재할 경우를 대비하여 required_grade 컬럼 안전 추가
|
||||||
|
try {
|
||||||
|
await connection.query("ALTER TABLE job_spec_standards ADD COLUMN required_grade VARCHAR(50) DEFAULT '중급'");
|
||||||
|
} catch (err) {
|
||||||
|
// 이미 컬럼이 존재하면 에러가 나므로 통과합니다.
|
||||||
|
}
|
||||||
console.log('✅ job_spec_standards table verification completed.');
|
console.log('✅ job_spec_standards table verification completed.');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('❌ Failed to verify/create job_spec_standards table:', err);
|
console.error('❌ Failed to verify/create job_spec_standards table:', err);
|
||||||
@@ -586,19 +594,19 @@ app.get('/api/job-specs', async (req, res) => {
|
|||||||
|
|
||||||
// 6.7.2. Save Job Spec Standard (Add or Update)
|
// 6.7.2. Save Job Spec Standard (Add or Update)
|
||||||
app.post('/api/job-specs/save', async (req, res) => {
|
app.post('/api/job-specs/save', async (req, res) => {
|
||||||
const { id, job_name, cpu_standard, ram_standard, gpu_standard, min_score, remarks } = req.body;
|
const { id, job_name, cpu_standard, ram_standard, gpu_standard, min_score, required_grade, remarks } = req.body;
|
||||||
let connection;
|
let connection;
|
||||||
try {
|
try {
|
||||||
connection = await pool.getConnection();
|
connection = await pool.getConnection();
|
||||||
if (id) {
|
if (id) {
|
||||||
await connection.query(
|
await connection.query(
|
||||||
'UPDATE job_spec_standards SET job_name = ?, cpu_standard = ?, ram_standard = ?, gpu_standard = ?, min_score = ?, remarks = ? WHERE id = ?',
|
'UPDATE job_spec_standards SET job_name = ?, cpu_standard = ?, ram_standard = ?, gpu_standard = ?, min_score = ?, required_grade = ?, remarks = ? WHERE id = ?',
|
||||||
[job_name, cpu_standard, ram_standard, gpu_standard, min_score, remarks, id]
|
[job_name, cpu_standard || '', ram_standard || '', gpu_standard || '', min_score || 0, required_grade || '중급', remarks || '', id]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
await connection.query(
|
await connection.query(
|
||||||
'INSERT INTO job_spec_standards (job_name, cpu_standard, ram_standard, gpu_standard, min_score, remarks) VALUES (?, ?, ?, ?, ?, ?)',
|
'INSERT INTO job_spec_standards (job_name, cpu_standard, ram_standard, gpu_standard, min_score, required_grade, remarks) VALUES (?, ?, ?, ?, ?, ?, ?)',
|
||||||
[job_name, cpu_standard, ram_standard, gpu_standard, min_score, remarks]
|
[job_name, cpu_standard || '', ram_standard || '', gpu_standard || '', min_score || 0, required_grade || '중급', remarks || '']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
res.json({ success: true });
|
res.json({ success: true });
|
||||||
|
|||||||
@@ -10,93 +10,47 @@ class JobSpecModal extends BaseModal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected renderFrameHTML(): string {
|
protected renderFrameHTML(): string {
|
||||||
const sharedStyle = 'height: 38px !important; box-sizing: border-box !important; font-size: 13px; margin: 0;';
|
|
||||||
const inputStyle = sharedStyle;
|
|
||||||
|
|
||||||
return `
|
return `
|
||||||
<div id="job-spec-asset-modal" class="modal-overlay hidden">
|
<div id="job-spec-asset-modal" class="modal-overlay hidden">
|
||||||
<style>
|
<div class="modal-content narrow">
|
||||||
.autocomplete-list {
|
|
||||||
position: absolute;
|
|
||||||
top: 100%;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
max-height: 150px;
|
|
||||||
overflow-y: auto;
|
|
||||||
background-color: white;
|
|
||||||
border: 1px solid var(--border-color, #E2E8F0);
|
|
||||||
border-top: none;
|
|
||||||
border-radius: 0 0 4px 4px;
|
|
||||||
z-index: 1000;
|
|
||||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
.autocomplete-item {
|
|
||||||
padding: 8px 12px;
|
|
||||||
font-size: 13px;
|
|
||||||
color: #334155;
|
|
||||||
cursor: pointer;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
.autocomplete-item:hover {
|
|
||||||
background-color: #F1F5F9;
|
|
||||||
color: #1E5149;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
.hidden {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<div class="modal-content" style="max-width: 500px; width: 100%;">
|
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h2 id="job-spec-modal-title" style="margin: 0; font-size: 18px; font-weight: 800; color: white;">\${this.title}</h2>
|
<div class="header-left">
|
||||||
<button id="btn-close-job-spec-modal" class="btn-icon" aria-label="닫기" style="font-size: 28px; color: white; background: none; border: none; cursor: pointer; line-height: 1;">×</button>
|
<h2 id="job-spec-modal-title" class="modal-title">\${this.title}</h2>
|
||||||
|
<div id="job-spec-header-identity" class="header-identity"></div>
|
||||||
|
</div>
|
||||||
|
<button id="btn-close-job-spec-modal" class="btn-icon" aria-label="닫기">×</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" style="padding: 24px; overflow-y: auto;">
|
<div class="modal-body">
|
||||||
<form id="job-spec-asset-form" class="grid-form" style="display: flex; flex-direction: column; gap: 16px;">
|
<form id="job-spec-asset-form" class="grid-form vertical-form">
|
||||||
<input type="hidden" id="job-spec-id" name="id" />
|
<input type="hidden" id="job-spec-id" name="id" />
|
||||||
|
|
||||||
<div class="form-group" style="display: flex; flex-direction: column; gap: 6px;">
|
<div class="form-group">
|
||||||
<label style="font-size: 11px; font-weight: 700; color: var(--text-muted);">직무명</label>
|
<label>직무명</label>
|
||||||
<input type="text" id="job-spec-job-name" name="job_name" placeholder="예: BIM 모델러, 개발자, 엔지니어" required style="\${inputStyle} width: 100%;" />
|
<input type="text" id="job-spec-job-name" name="job_name" placeholder="예: BIM 모델러, 개발자, 엔지니어" required />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" style="display: flex; flex-direction: column; gap: 6px; position: relative;">
|
<div class="form-group">
|
||||||
<label style="font-size: 11px; font-weight: 700; color: var(--text-muted);">권장 CPU 사양</label>
|
<label>요구 PC 등급</label>
|
||||||
<input type="text" id="job-spec-cpu-standard" name="cpu_standard" placeholder="CPU 검색..." required style="\${inputStyle} width: 100%;" autocomplete="off" />
|
<select id="job-spec-required-grade" name="required_grade" style="width: 100%; padding: 8px 12px; border: 1px solid var(--border-color, #E2E8F0); border-radius: 6px; background-color: white; font-size: 14px; font-weight: 600; color: #334155;" required>
|
||||||
<div id="job-spec-cpu-autocomplete" class="autocomplete-list hidden"></div>
|
<option value="최상급">최상급 (85점 이상)</option>
|
||||||
|
<option value="상급" selected>상급 (70점 이상)</option>
|
||||||
|
<option value="중급">중급 (40점 이상)</option>
|
||||||
|
<option value="보급">보급 (20점 이상)</option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" style="display: flex; flex-direction: column; gap: 6px; position: relative;">
|
<div class="form-group">
|
||||||
<label style="font-size: 11px; font-weight: 700; color: var(--text-muted);">권장 RAM 사양</label>
|
<label>비고 (메모)</label>
|
||||||
<input type="text" id="job-spec-ram-standard" name="ram_standard" placeholder="RAM 검색..." required style="\${inputStyle} width: 100%;" autocomplete="off" />
|
<textarea id="job-spec-remarks" name="remarks" placeholder="기타 필요 사양 및 안내 사항" rows="3"></textarea>
|
||||||
<div id="job-spec-ram-autocomplete" class="autocomplete-list hidden"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group" style="display: flex; flex-direction: column; gap: 6px; position: relative;">
|
|
||||||
<label style="font-size: 11px; font-weight: 700; color: var(--text-muted);">권장 GPU 사양</label>
|
|
||||||
<input type="text" id="job-spec-gpu-standard" name="gpu_standard" placeholder="GPU 검색..." required style="\${inputStyle} width: 100%;" autocomplete="off" />
|
|
||||||
<div id="job-spec-gpu-autocomplete" class="autocomplete-list hidden"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group" style="display: flex; flex-direction: column; gap: 6px;">
|
|
||||||
<label style="font-size: 11px; font-weight: 700; color: var(--text-muted);">성능 기준 점수 (이상, 자동 계산됨)</label>
|
|
||||||
<input type="number" id="job-spec-min-score" name="min_score" placeholder="자동 계산 대기..." required style="\${inputStyle} width: 100%;" readonly />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group" style="display: flex; flex-direction: column; gap: 6px;">
|
|
||||||
<label style="font-size: 11px; font-weight: 700; color: var(--text-muted);">비고 (메모)</label>
|
|
||||||
<textarea id="job-spec-remarks" name="remarks" placeholder="기타 필요 사양 및 안내 사항" style="box-sizing: border-box !important; font-size: 13px; margin: 0; min-height: 80px; width: 100%; padding: 8px; border: 1px solid var(--border-color); border-radius: 4px; resize: vertical;"></textarea>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer" style="display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; background: #f8fafc; border-top: 1px solid var(--border-color);">
|
<div class="modal-footer">
|
||||||
<button id="btn-delete-job-spec-asset" class="btn btn-outline btn-danger" style="height: 42px;">삭제</button>
|
<button id="btn-delete-job-spec-asset" class="btn btn-outline btn-danger">삭제</button>
|
||||||
<div class="footer-actions" style="display: flex; gap: 8px;">
|
<div class="footer-actions">
|
||||||
<button id="btn-revert-job-spec-edit" class="btn btn-outline hidden" style="height: 42px;">수정 취소</button>
|
<button id="btn-revert-job-spec-edit" class="btn btn-outline hidden">수정 취소</button>
|
||||||
<button id="btn-cancel-job-spec-modal" class="btn btn-outline" style="height: 42px;">닫기</button>
|
<button id="btn-cancel-job-spec-modal" class="btn btn-outline">닫기</button>
|
||||||
<button id="btn-save-job-spec-asset" class="btn btn-primary" style="height: 42px;">수정</button>
|
<button id="btn-save-job-spec-asset" class="btn btn-primary">수정</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -118,10 +72,7 @@ class JobSpecModal extends BaseModal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const jobName = (document.getElementById('job-spec-job-name') as HTMLInputElement).value.trim();
|
const jobName = (document.getElementById('job-spec-job-name') as HTMLInputElement).value.trim();
|
||||||
const cpuStd = (document.getElementById('job-spec-cpu-standard') as HTMLInputElement).value.trim();
|
const requiredGrade = (document.getElementById('job-spec-required-grade') as HTMLSelectElement).value;
|
||||||
const ramStd = (document.getElementById('job-spec-ram-standard') as HTMLInputElement).value.trim();
|
|
||||||
const gpuStd = (document.getElementById('job-spec-gpu-standard') as HTMLInputElement).value.trim();
|
|
||||||
const minScoreStr = (document.getElementById('job-spec-min-score') as HTMLInputElement).value;
|
|
||||||
const remarks = (document.getElementById('job-spec-remarks') as HTMLTextAreaElement).value.trim();
|
const remarks = (document.getElementById('job-spec-remarks') as HTMLTextAreaElement).value.trim();
|
||||||
|
|
||||||
if (!jobName) {
|
if (!jobName) {
|
||||||
@@ -132,10 +83,11 @@ class JobSpecModal extends BaseModal {
|
|||||||
const updated = {
|
const updated = {
|
||||||
id: this.currentAsset.id || null,
|
id: this.currentAsset.id || null,
|
||||||
job_name: jobName,
|
job_name: jobName,
|
||||||
cpu_standard: cpuStd,
|
cpu_standard: '',
|
||||||
ram_standard: ramStd,
|
ram_standard: '',
|
||||||
gpu_standard: gpuStd,
|
gpu_standard: '',
|
||||||
min_score: minScoreStr !== '' ? parseInt(minScoreStr, 10) : 0,
|
min_score: 0,
|
||||||
|
required_grade: requiredGrade,
|
||||||
remarks: remarks
|
remarks: remarks
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -159,86 +111,14 @@ class JobSpecModal extends BaseModal {
|
|||||||
onSave(); this.close(); closeModals();
|
onSave(); this.close(); closeModals();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 자동완성 바인딩
|
|
||||||
this.bindAutocomplete('job-spec-cpu-standard', 'job-spec-cpu-autocomplete', 'CPU');
|
|
||||||
this.bindAutocomplete('job-spec-ram-standard', 'job-spec-ram-autocomplete', 'RAM');
|
|
||||||
this.bindAutocomplete('job-spec-gpu-standard', 'job-spec-gpu-autocomplete', 'GPU');
|
|
||||||
|
|
||||||
// 실시간 점수 계산 이벤트 바인딩
|
|
||||||
const inputs = ['job-spec-cpu-standard', 'job-spec-ram-standard', 'job-spec-gpu-standard'];
|
|
||||||
inputs.forEach(id => {
|
|
||||||
const el = document.getElementById(id);
|
|
||||||
el?.addEventListener('input', () => this.updateMinScore());
|
|
||||||
el?.addEventListener('change', () => this.updateMinScore());
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private bindAutocomplete(inputId: string, autocompleteId: string, category: string) {
|
|
||||||
const input = document.getElementById(inputId) as HTMLInputElement;
|
|
||||||
const list = document.getElementById(autocompleteId) as HTMLDivElement;
|
|
||||||
if (!input || !list) return;
|
|
||||||
|
|
||||||
const showList = (filterText: string = '') => {
|
|
||||||
if (!this.isEditMode) return;
|
|
||||||
const items = (state.masterData.partsMaster || []).filter((c: any) => c.category === category);
|
|
||||||
const filtered = filterText
|
|
||||||
? items.filter((c: any) => c.component_name.toLowerCase().includes(filterText.toLowerCase()))
|
|
||||||
: items;
|
|
||||||
|
|
||||||
if (filtered.length === 0) {
|
|
||||||
list.innerHTML = '<div class="autocomplete-item" style="color: #94a3b8; cursor: default;">검색 결과 없음</div>';
|
|
||||||
} else {
|
|
||||||
list.innerHTML = filtered.map((c: any) => `<div class="autocomplete-item" data-val="${c.component_name}">${c.component_name}</div>`).join('');
|
|
||||||
}
|
|
||||||
list.classList.remove('hidden');
|
|
||||||
};
|
|
||||||
|
|
||||||
input.addEventListener('focus', () => {
|
|
||||||
showList(input.value);
|
|
||||||
});
|
|
||||||
|
|
||||||
input.addEventListener('input', () => {
|
|
||||||
showList(input.value);
|
|
||||||
});
|
|
||||||
|
|
||||||
list.addEventListener('mousedown', (e) => {
|
|
||||||
const item = (e.target as HTMLElement).closest('.autocomplete-item');
|
|
||||||
if (item && item.getAttribute('data-val')) {
|
|
||||||
input.value = item.getAttribute('data-val') || '';
|
|
||||||
list.classList.add('hidden');
|
|
||||||
this.updateMinScore();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
document.addEventListener('mousedown', (e) => {
|
|
||||||
if (e.target !== input && !list.contains(e.target as Node)) {
|
|
||||||
list.classList.add('hidden');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private updateMinScore(): void {
|
|
||||||
const cpu = (document.getElementById('job-spec-cpu-standard') as HTMLInputElement)?.value || '';
|
|
||||||
const ram = (document.getElementById('job-spec-ram-standard') as HTMLInputElement)?.value || '';
|
|
||||||
const gpu = (document.getElementById('job-spec-gpu-standard') as HTMLInputElement)?.value || '';
|
|
||||||
|
|
||||||
const score = calculatePcScoreDeductive(cpu, ram, gpu, '');
|
|
||||||
|
|
||||||
const minScoreEl = document.getElementById('job-spec-min-score') as HTMLInputElement;
|
|
||||||
if (minScoreEl) {
|
|
||||||
minScoreEl.value = score.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected fillFormData(asset: any): void {
|
protected fillFormData(asset: any): void {
|
||||||
setFieldValue('job-spec-id', asset.id || '');
|
setFieldValue('job-spec-id', asset.id || '');
|
||||||
setFieldValue('job-spec-job-name', asset.job_name || '');
|
setFieldValue('job-spec-job-name', asset.job_name || '');
|
||||||
setFieldValue('job-spec-cpu-standard', asset.cpu_standard || '');
|
setFieldValue('job-spec-required-grade', asset.required_grade || '중급');
|
||||||
setFieldValue('job-spec-ram-standard', asset.ram_standard || '');
|
|
||||||
setFieldValue('job-spec-gpu-standard', asset.gpu_standard || '');
|
|
||||||
setFieldValue('job-spec-min-score', asset.min_score !== undefined ? asset.min_score.toString() : '100');
|
|
||||||
setFieldValue('job-spec-remarks', asset.remarks || '');
|
setFieldValue('job-spec-remarks', asset.remarks || '');
|
||||||
|
this.updateHeaderIdentity(asset);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected onAfterOpen(asset: any, mode: string): void {
|
protected onAfterOpen(asset: any, mode: string): void {
|
||||||
@@ -257,19 +137,32 @@ class JobSpecModal extends BaseModal {
|
|||||||
|
|
||||||
deleteBtn.style.display = (mode === 'add') ? 'none' : 'block';
|
deleteBtn.style.display = (mode === 'add') ? 'none' : 'block';
|
||||||
|
|
||||||
if (mode === 'add') {
|
if (mode === 'add' || mode === 'edit') {
|
||||||
this.setEditLockMode('edit');
|
saveBtn.textContent = (mode === 'add') ? '등록' : '저장';
|
||||||
this.isEditMode = true;
|
|
||||||
saveBtn.textContent = '등록';
|
|
||||||
saveBtn.style.display = 'block';
|
saveBtn.style.display = 'block';
|
||||||
} else {
|
} else {
|
||||||
this.setEditLockMode('view');
|
|
||||||
this.isEditMode = false;
|
|
||||||
saveBtn.textContent = '수정';
|
saveBtn.textContent = '수정';
|
||||||
saveBtn.style.display = 'block';
|
saveBtn.style.display = 'block';
|
||||||
}
|
}
|
||||||
|
this.updateHeaderIdentity(asset);
|
||||||
|
}
|
||||||
|
|
||||||
|
private updateHeaderIdentity(asset: any) {
|
||||||
|
const container = document.getElementById('job-spec-header-identity');
|
||||||
|
if (!container) return;
|
||||||
|
|
||||||
this.updateMinScore();
|
if (this.currentMode === 'add') {
|
||||||
|
container.innerHTML = '<span class="badge badge-primary">신규 등록</span>';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const jobName = asset.job_name || '';
|
||||||
|
const reqGrade = asset.required_grade || '중급';
|
||||||
|
|
||||||
|
container.innerHTML = `
|
||||||
|
<span class="asset-code-title">${jobName}</span>
|
||||||
|
<span class="service-type-badge">${reqGrade} 요구</span>
|
||||||
|
`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,55 +10,57 @@ class UserModal extends BaseModal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected renderFrameHTML(): string {
|
protected renderFrameHTML(): string {
|
||||||
const sharedStyle = 'height: 38px !important; box-sizing: border-box !important; font-size: 13px; margin: 0;';
|
|
||||||
const inputStyle = sharedStyle;
|
|
||||||
|
|
||||||
return `
|
return `
|
||||||
<div id="user-asset-modal" class="modal-overlay hidden">
|
<div id="user-asset-modal" class="modal-overlay hidden">
|
||||||
<div class="modal-content" style="max-width: 500px; width: 100%;">
|
<div class="modal-content narrow">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h2 id="user-modal-title" style="margin: 0; font-size: 18px; font-weight: 800; color: white;">\${this.title}</h2>
|
<div class="header-left">
|
||||||
<button id="btn-close-user-modal" class="btn-icon" aria-label="닫기" style="font-size: 28px; color: white; background: none; border: none; cursor: pointer; line-height: 1;">×</button>
|
<h2 id="user-modal-title" class="modal-title">${this.title}</h2>
|
||||||
|
<div id="user-header-identity" class="header-identity"></div>
|
||||||
|
</div>
|
||||||
|
<button id="btn-close-user-modal" class="btn-icon" aria-label="닫기">×</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" style="padding: 24px; overflow-y: auto;">
|
<div class="modal-body">
|
||||||
<form id="user-asset-form" class="grid-form" style="display: flex; flex-direction: column; gap: 16px;">
|
<form id="user-asset-form" class="grid-form vertical-form">
|
||||||
<input type="hidden" id="user-id" name="id" />
|
<input type="hidden" id="user-id" name="id" />
|
||||||
|
|
||||||
<div class="form-group" style="display: flex; flex-direction: column; gap: 6px;">
|
<div class="form-group">
|
||||||
<label style="font-size: 11px; font-weight: 700; color: var(--text-muted);">사번</label>
|
<label>사번</label>
|
||||||
<input type="text" id="user-emp-no" name="emp_no" placeholder="예: HM202601" required style="\${inputStyle} width: 100%;" />
|
<input type="text" id="user-emp-no" name="emp_no" placeholder="예: HM202601" required />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" style="display: flex; flex-direction: column; gap: 6px;">
|
<div class="form-group">
|
||||||
<label style="font-size: 11px; font-weight: 700; color: var(--text-muted);">사용자명</label>
|
<label>사용자명</label>
|
||||||
<input type="text" id="user-name-input" name="user_name" placeholder="예: 홍길동" required style="\${inputStyle} width: 100%;" />
|
<input type="text" id="user-name-input" name="user_name" placeholder="예: 홍길동" required />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" style="display: flex; flex-direction: column; gap: 6px;">
|
<div class="form-group">
|
||||||
<label style="font-size: 11px; font-weight: 700; color: var(--text-muted);">사용조직 (부서)</label>
|
<label>사용조직 (부서)</label>
|
||||||
<input type="text" id="user-dept" name="dept_name" placeholder="예: 기술개발센터" required style="\${inputStyle} width: 100%;" />
|
<input type="text" id="user-dept" name="dept_name" placeholder="예: 기술개발센터" required />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" style="display: flex; flex-direction: column; gap: 6px;">
|
<div class="form-group">
|
||||||
<label style="font-size: 11px; font-weight: 700; color: var(--text-muted);">직무 (직급)</label>
|
<label>직무</label>
|
||||||
<input type="text" id="user-position-input" name="position" placeholder="예: BIM모델러" required style="\${inputStyle} width: 100%;" />
|
<select id="user-position-input" name="position" required>
|
||||||
|
<option value="">직무 선택</option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" style="display: flex; flex-direction: column; gap: 6px;">
|
<div class="form-group">
|
||||||
<label style="font-size: 11px; font-weight: 700; color: var(--text-muted);">상태</label>
|
<label>상태</label>
|
||||||
<select id="user-status" name="status" style="\${sharedStyle}">
|
<select id="user-status" name="status">
|
||||||
<option value="재직">재직</option>
|
<option value="재직">재직</option>
|
||||||
<option value="퇴직">퇴직</option>
|
<option value="퇴직">퇴직</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer" style="display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; background: #f8fafc; border-top: 1px solid var(--border-color);">
|
<div class="modal-footer">
|
||||||
<button id="btn-delete-user-asset" class="btn btn-outline btn-danger" style="height: 42px;">삭제</button>
|
<button id="btn-delete-user-asset" class="btn btn-outline btn-danger">삭제</button>
|
||||||
<div class="footer-actions" style="display: flex; gap: 8px;">
|
<div class="footer-actions">
|
||||||
<button id="btn-revert-user-edit" class="btn btn-outline hidden" style="height: 42px;">수정 취소</button>
|
<button id="btn-revert-user-edit" class="btn btn-outline hidden">수정 취소</button>
|
||||||
<button id="btn-cancel-user-modal" class="btn btn-outline" style="height: 42px;">닫기</button>
|
<button id="btn-cancel-user-modal" class="btn btn-outline">닫기</button>
|
||||||
<button id="btn-save-user-asset" class="btn btn-primary" style="height: 42px;">수정</button>
|
<button id="btn-save-user-asset" class="btn btn-primary">수정</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -82,7 +84,7 @@ class UserModal extends BaseModal {
|
|||||||
const empNo = (document.getElementById('user-emp-no') as HTMLInputElement).value.trim();
|
const empNo = (document.getElementById('user-emp-no') as HTMLInputElement).value.trim();
|
||||||
const userName = (document.getElementById('user-name-input') as HTMLInputElement).value.trim();
|
const userName = (document.getElementById('user-name-input') as HTMLInputElement).value.trim();
|
||||||
const deptName = (document.getElementById('user-dept') as HTMLInputElement).value.trim();
|
const deptName = (document.getElementById('user-dept') as HTMLInputElement).value.trim();
|
||||||
const position = (document.getElementById('user-position-input') as HTMLInputElement).value.trim();
|
const position = (document.getElementById('user-position-input') as HTMLSelectElement).value.trim();
|
||||||
const status = (document.getElementById('user-status') as HTMLSelectElement).value;
|
const status = (document.getElementById('user-status') as HTMLSelectElement).value;
|
||||||
|
|
||||||
if (!empNo || !userName || !deptName || !position) {
|
if (!empNo || !userName || !deptName || !position) {
|
||||||
@@ -119,53 +121,75 @@ class UserModal extends BaseModal {
|
|||||||
onSave(); this.close(); closeModals();
|
onSave(); this.close(); closeModals();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
createIcons({ icons: { Save, X } });
|
||||||
}
|
}
|
||||||
|
|
||||||
protected fillFormData(asset: any): void {
|
protected fillFormData(asset: any): void {
|
||||||
|
const positionSelect = document.getElementById('user-position-input') as HTMLSelectElement;
|
||||||
|
if (positionSelect) {
|
||||||
|
positionSelect.innerHTML = '<option value="">직무 선택</option>';
|
||||||
|
if (state.masterData.jobSpecs) {
|
||||||
|
state.masterData.jobSpecs.forEach((spec: any) => {
|
||||||
|
const option = document.createElement('option');
|
||||||
|
option.value = spec.job_name;
|
||||||
|
option.textContent = spec.job_name;
|
||||||
|
positionSelect.appendChild(option);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setFieldValue('user-id', asset.id || '');
|
setFieldValue('user-id', asset.id || '');
|
||||||
setFieldValue('user-emp-no', asset.emp_no || '');
|
setFieldValue('user-emp-no', asset.emp_no || '');
|
||||||
setFieldValue('user-name-input', asset.user_name || '');
|
setFieldValue('user-name-input', asset.user_name || '');
|
||||||
setFieldValue('user-dept', asset.dept_name || '');
|
setFieldValue('user-dept', asset.dept_name || '');
|
||||||
setFieldValue('user-position-input', asset.position || '');
|
setFieldValue('user-position-input', asset.position || '');
|
||||||
setFieldValue('user-status', asset.status || '재직');
|
setFieldValue('user-status', asset.status || '재직');
|
||||||
|
this.updateHeaderIdentity(asset);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected onAfterOpen(asset: any, mode: string): void {
|
protected onAfterOpen(asset: any, mode: string): void {
|
||||||
const titleEl = document.getElementById('user-modal-title');
|
const titleEl = document.getElementById('user-modal-title');
|
||||||
|
|
||||||
if (titleEl) {
|
if (titleEl) {
|
||||||
if (mode === 'add') {
|
titleEl.textContent = (mode === 'add') ? '신규 임직원 등록' : '임직원 정보 수정';
|
||||||
titleEl.textContent = '신규 임직원 등록';
|
|
||||||
} else {
|
|
||||||
titleEl.textContent = '임직원 정보 수정';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const deleteBtn = document.getElementById('btn-delete-user-asset')!;
|
const deleteBtn = document.getElementById('btn-delete-user-asset')!;
|
||||||
const saveBtn = document.getElementById('btn-save-user-asset')!;
|
const saveBtn = document.getElementById('btn-save-user-asset')!;
|
||||||
|
|
||||||
deleteBtn.style.display = (mode === 'add') ? 'none' : 'block';
|
deleteBtn.style.display = (mode === 'add') ? 'none' : 'block';
|
||||||
|
|
||||||
if (mode === 'add') {
|
if (mode === 'add' || mode === 'edit') {
|
||||||
this.setEditLockMode('edit');
|
saveBtn.textContent = mode === 'add' ? '등록' : '저장';
|
||||||
this.isEditMode = true;
|
|
||||||
saveBtn.textContent = '등록';
|
|
||||||
saveBtn.style.display = 'block';
|
saveBtn.style.display = 'block';
|
||||||
} else {
|
} else {
|
||||||
this.setEditLockMode('view');
|
|
||||||
this.isEditMode = false;
|
|
||||||
saveBtn.textContent = '수정';
|
saveBtn.textContent = '수정';
|
||||||
saveBtn.style.display = 'block';
|
saveBtn.style.display = 'block';
|
||||||
}
|
}
|
||||||
|
this.updateHeaderIdentity(asset);
|
||||||
|
}
|
||||||
|
|
||||||
|
private updateHeaderIdentity(asset: any) {
|
||||||
|
const container = document.getElementById('user-header-identity');
|
||||||
|
if (!container) return;
|
||||||
|
|
||||||
|
if (this.currentMode === 'add') {
|
||||||
|
container.innerHTML = '<span class="badge badge-primary">신규 등록</span>';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const empNo = asset.emp_no || '';
|
||||||
|
const userName = asset.user_name || '';
|
||||||
|
const dept = asset.dept_name || '';
|
||||||
|
|
||||||
|
container.innerHTML = `
|
||||||
|
<span class="asset-code-title">${userName}</span>
|
||||||
|
<span class="service-type-badge">${empNo}</span>
|
||||||
|
<span class="asset-type-label">${dept}</span>
|
||||||
|
`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const userModal = new UserModal();
|
export const userModal = new UserModal();
|
||||||
|
export function initUserModal(onSave: () => void, closeModals: () => void) { userModal.init(onSave, closeModals); }
|
||||||
export function initUserModal(onSave: () => void, closeModals: () => void) {
|
export function openUserModal(asset: any, mode: 'view' | 'edit' | 'add' = 'view') { userModal.open(asset, mode); }
|
||||||
userModal.init(onSave, closeModals);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function openUserModal(asset: any, mode: 'view' | 'edit' | 'add' = 'view') {
|
|
||||||
userModal.open(asset, mode);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { ASSET_SCHEMA, UI_TEXT } from './schema';
|
import { ASSET_SCHEMA, UI_TEXT } from './schema';
|
||||||
import { getActionButtonsHTML } from './utils';
|
|
||||||
import { generateOptionsHTML } from '../components/Modal/ModalUtils';
|
import { generateOptionsHTML } from '../components/Modal/ModalUtils';
|
||||||
import { CORP_LIST } from '../components/Modal/SharedData';
|
import { CORP_LIST } from '../components/Modal/SharedData';
|
||||||
|
|
||||||
@@ -16,9 +15,18 @@ export interface FilterOptions {
|
|||||||
showField?: boolean;
|
showField?: boolean;
|
||||||
showType?: boolean;
|
showType?: boolean;
|
||||||
showStatus?: boolean;
|
showStatus?: boolean;
|
||||||
|
showPosition?: boolean;
|
||||||
extraHTML?: string;
|
extraHTML?: string;
|
||||||
onFilterChange: (filters: any) => void;
|
onFilterChange: (filters: any) => void;
|
||||||
initialFilters?: any;
|
initialFilters?: any;
|
||||||
|
fullList?: any[]; // For populating dynamic filters
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 전역 액션 버튼 그룹 생성 (자산 추가 등)
|
||||||
|
*/
|
||||||
|
export function getActionButtonsHTML(): string {
|
||||||
|
return `<div id="filter-bar-actions" class="header-action-group"></div>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function renderFilterBar(container: HTMLElement, options: FilterOptions) {
|
export function renderFilterBar(container: HTMLElement, options: FilterOptions) {
|
||||||
@@ -30,11 +38,31 @@ export function renderFilterBar(container: HTMLElement, options: FilterOptions)
|
|||||||
showField = false,
|
showField = false,
|
||||||
showType = false,
|
showType = false,
|
||||||
showStatus = false,
|
showStatus = false,
|
||||||
|
showPosition = false,
|
||||||
extraHTML = '',
|
extraHTML = '',
|
||||||
onFilterChange,
|
onFilterChange,
|
||||||
initialFilters = { keyword: '', corp: '', dept: '', loc: '', field: '', type: '', status: '' }
|
initialFilters = { keyword: '', corp: '', dept: '', loc: '', field: '', type: '', status: '', position: '' },
|
||||||
|
fullList = []
|
||||||
} = options;
|
} = options;
|
||||||
|
|
||||||
|
container.classList.add('search-bar'); // Restored class
|
||||||
|
|
||||||
|
// Helper to get unique sorted values
|
||||||
|
const getUnique = (key: keyof typeof ASSET_SCHEMA | string) => {
|
||||||
|
const schemaItem = (ASSET_SCHEMA as any)[key];
|
||||||
|
const fieldKey = schemaItem ? schemaItem.key : key;
|
||||||
|
const dbKey = schemaItem ? schemaItem.db : null;
|
||||||
|
return Array.from(new Set(fullList.map(item => {
|
||||||
|
const val = item[fieldKey];
|
||||||
|
if (val !== undefined && val !== null) return val;
|
||||||
|
if (dbKey) return item[dbKey];
|
||||||
|
return null;
|
||||||
|
}).filter(Boolean))).sort() as string[];
|
||||||
|
};
|
||||||
|
|
||||||
|
const hasDeptName = fullList.some(item => 'dept_name' in item);
|
||||||
|
const deptUniqueKey = hasDeptName ? 'dept_name' : 'CURRENT_DEPT';
|
||||||
|
|
||||||
container.innerHTML = `
|
container.innerHTML = `
|
||||||
<div class="search-item flex-1">
|
<div class="search-item flex-1">
|
||||||
<label>${keywordLabel}</label>
|
<label>${keywordLabel}</label>
|
||||||
@@ -45,6 +73,7 @@ export function renderFilterBar(container: HTMLElement, options: FilterOptions)
|
|||||||
<label>${ASSET_SCHEMA.ASSET_TYPE.ui}</label>
|
<label>${ASSET_SCHEMA.ASSET_TYPE.ui}</label>
|
||||||
<select id="filter-type">
|
<select id="filter-type">
|
||||||
<option value="">전체 유형</option>
|
<option value="">전체 유형</option>
|
||||||
|
${getUnique('ASSET_TYPE').map(v => `<option value="${v}" ${initialFilters.type === v ? 'selected' : ''}>${v}</option>`).join('')}
|
||||||
</select>
|
</select>
|
||||||
</div>` : ''}
|
</div>` : ''}
|
||||||
${showStatus ? `
|
${showStatus ? `
|
||||||
@@ -52,6 +81,7 @@ export function renderFilterBar(container: HTMLElement, options: FilterOptions)
|
|||||||
<label>${ASSET_SCHEMA.HW_STATUS.ui}</label>
|
<label>${ASSET_SCHEMA.HW_STATUS.ui}</label>
|
||||||
<select id="filter-status">
|
<select id="filter-status">
|
||||||
<option value="">전체 상태</option>
|
<option value="">전체 상태</option>
|
||||||
|
${getUnique('HW_STATUS').map(v => `<option value="${v}" ${initialFilters.status === v ? 'selected' : ''}>${v}</option>`).join('')}
|
||||||
</select>
|
</select>
|
||||||
</div>` : ''}
|
</div>` : ''}
|
||||||
${showField ? `
|
${showField ? `
|
||||||
@@ -73,16 +103,30 @@ export function renderFilterBar(container: HTMLElement, options: FilterOptions)
|
|||||||
${showLoc ? `
|
${showLoc ? `
|
||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<label>${ASSET_SCHEMA.LOCATION.ui}</label>
|
<label>${ASSET_SCHEMA.LOCATION.ui}</label>
|
||||||
<select id="filter-loc"><option value="">전체 위치</option></select>
|
<select id="filter-loc">
|
||||||
|
<option value="">전체 위치</option>
|
||||||
|
${getUnique('LOCATION').map(v => `<option value="${v}" ${initialFilters.loc === v ? 'selected' : ''}>${v}</option>`).join('')}
|
||||||
|
</select>
|
||||||
</div>` : ''}
|
</div>` : ''}
|
||||||
${showDept ? `
|
${showDept ? `
|
||||||
<div class="search-item">
|
<div class="search-item">
|
||||||
<label>${ASSET_SCHEMA.CURRENT_DEPT.ui}</label>
|
<label>조직</label>
|
||||||
<select id="filter-dept"><option value="">전체 조직</option></select>
|
<select id="filter-dept">
|
||||||
|
<option value="">전체 조직</option>
|
||||||
|
${getUnique(deptUniqueKey).map(v => `<option value="${v}" ${initialFilters.dept === v ? 'selected' : ''}>${v}</option>`).join('')}
|
||||||
|
</select>
|
||||||
|
</div>` : ''}
|
||||||
|
${showPosition ? `
|
||||||
|
<div class="search-item">
|
||||||
|
<label>직무</label>
|
||||||
|
<select id="filter-position">
|
||||||
|
<option value="">전체 직무</option>
|
||||||
|
${getUnique('position').map(v => `<option value="${v}" ${initialFilters.position === v ? 'selected' : ''}>${v}</option>`).join('')}
|
||||||
|
</select>
|
||||||
</div>` : ''}
|
</div>` : ''}
|
||||||
${extraHTML}
|
${extraHTML}
|
||||||
<button id="btn-reset-filters" class="btn btn-outline btn-reset">
|
<button id="btn-reset-filters" class="btn btn-outline btn-reset">
|
||||||
<i data-lucide="refresh-ccw"></i> ${UI_TEXT.ACTION.RESET_FILTER}
|
<i data-lucide="refresh-ccw" class="icon-sm"></i> ${UI_TEXT.ACTION.RESET_FILTER}
|
||||||
</button>
|
</button>
|
||||||
${getActionButtonsHTML()}
|
${getActionButtonsHTML()}
|
||||||
`;
|
`;
|
||||||
@@ -96,7 +140,8 @@ export function renderFilterBar(container: HTMLElement, options: FilterOptions)
|
|||||||
loc: (container.querySelector('#filter-loc') as HTMLSelectElement)?.value || '',
|
loc: (container.querySelector('#filter-loc') as HTMLSelectElement)?.value || '',
|
||||||
field: (container.querySelector('#filter-field') as HTMLSelectElement)?.value || '',
|
field: (container.querySelector('#filter-field') as HTMLSelectElement)?.value || '',
|
||||||
type: (container.querySelector('#filter-type') as HTMLSelectElement)?.value || '',
|
type: (container.querySelector('#filter-type') as HTMLSelectElement)?.value || '',
|
||||||
status: (container.querySelector('#filter-status') as HTMLSelectElement)?.value || ''
|
status: (container.querySelector('#filter-status') as HTMLSelectElement)?.value || '',
|
||||||
|
position: (container.querySelector('#filter-position') as HTMLSelectElement)?.value || ''
|
||||||
};
|
};
|
||||||
onFilterChange(filters);
|
onFilterChange(filters);
|
||||||
};
|
};
|
||||||
@@ -108,9 +153,10 @@ export function renderFilterBar(container: HTMLElement, options: FilterOptions)
|
|||||||
container.querySelector('#filter-field')?.addEventListener('change', triggerChange);
|
container.querySelector('#filter-field')?.addEventListener('change', triggerChange);
|
||||||
container.querySelector('#filter-type')?.addEventListener('change', triggerChange);
|
container.querySelector('#filter-type')?.addEventListener('change', triggerChange);
|
||||||
container.querySelector('#filter-status')?.addEventListener('change', triggerChange);
|
container.querySelector('#filter-status')?.addEventListener('change', triggerChange);
|
||||||
|
container.querySelector('#filter-position')?.addEventListener('change', triggerChange);
|
||||||
|
|
||||||
container.querySelector('#btn-reset-filters')?.addEventListener('click', () => {
|
container.querySelector('#btn-reset-filters')?.addEventListener('click', () => {
|
||||||
['filter-keyword', 'filter-corp', 'filter-dept', 'filter-loc', 'filter-field', 'filter-type', 'filter-status'].forEach(id => {
|
['filter-keyword', 'filter-corp', 'filter-dept', 'filter-loc', 'filter-field', 'filter-type', 'filter-status', 'filter-position'].forEach(id => {
|
||||||
const el = container.querySelector(`#${id}`);
|
const el = container.querySelector(`#${id}`);
|
||||||
if (el) (el as any).value = '';
|
if (el) (el as any).value = '';
|
||||||
});
|
});
|
||||||
@@ -121,18 +167,37 @@ export function renderFilterBar(container: HTMLElement, options: FilterOptions)
|
|||||||
/**
|
/**
|
||||||
* 공통 필터링 로직
|
* 공통 필터링 로직
|
||||||
*/
|
*/
|
||||||
export function applyCommonFilters(list: any[], filters: any, searchKeys: (keyof typeof ASSET_SCHEMA)[]) {
|
export function applyCommonFilters(list: any[], filters: any, searchKeys: any[]) {
|
||||||
return list.filter(item => {
|
return list.filter(item => {
|
||||||
const matchKeyword = !filters.keyword || searchKeys.some(key =>
|
// 1. 키워드 검색
|
||||||
String(item[ASSET_SCHEMA[key].key] || item[ASSET_SCHEMA[key].db] || '').toLowerCase().includes(filters.keyword)
|
const matchKeyword = !filters.keyword || searchKeys.some(key => {
|
||||||
);
|
const schemaItem = (ASSET_SCHEMA as any)[key];
|
||||||
|
if (schemaItem) {
|
||||||
|
return String(item[schemaItem.key] || item[schemaItem.db] || '').toLowerCase().includes(filters.keyword);
|
||||||
|
}
|
||||||
|
return String(item[key] || '').toLowerCase().includes(filters.keyword);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 2. 부서 필터링 (사용자 페이지 dept_name, 자산 페이지 current_dept)
|
||||||
|
let matchDept = true;
|
||||||
|
if (filters.dept) {
|
||||||
|
const itemDept = item.dept_name || item[ASSET_SCHEMA.CURRENT_DEPT.key] || item[ASSET_SCHEMA.CURRENT_DEPT.db];
|
||||||
|
matchDept = itemDept === filters.dept;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 직무 필터링
|
||||||
|
let matchPosition = true;
|
||||||
|
if (filters.position) {
|
||||||
|
matchPosition = item.position === filters.position;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. 나머지 필터링
|
||||||
const matchCorp = !filters.corp || (item[ASSET_SCHEMA.PURCHASE_CORP.key] || item[ASSET_SCHEMA.PURCHASE_CORP.db]) === filters.corp;
|
const matchCorp = !filters.corp || (item[ASSET_SCHEMA.PURCHASE_CORP.key] || item[ASSET_SCHEMA.PURCHASE_CORP.db]) === filters.corp;
|
||||||
const matchDept = !filters.dept || (item[ASSET_SCHEMA.CURRENT_DEPT.key] || item[ASSET_SCHEMA.CURRENT_DEPT.db]) === filters.dept;
|
|
||||||
const matchLoc = !filters.loc || (item[ASSET_SCHEMA.LOCATION.key] || item[ASSET_SCHEMA.LOCATION.db]) === filters.loc;
|
const matchLoc = !filters.loc || (item[ASSET_SCHEMA.LOCATION.key] || item[ASSET_SCHEMA.LOCATION.db]) === filters.loc;
|
||||||
const matchField = !filters.field || (item[ASSET_SCHEMA.SW_FIELD.key] || item[ASSET_SCHEMA.SW_FIELD.db]) === filters.field;
|
const matchField = !filters.field || (item[ASSET_SCHEMA.SW_FIELD.key] || item[ASSET_SCHEMA.SW_FIELD.db]) === filters.field;
|
||||||
const matchType = !filters.type || (item[ASSET_SCHEMA.ASSET_TYPE.key] || item[ASSET_SCHEMA.ASSET_TYPE.db]) === filters.type;
|
const matchType = !filters.type || (item[ASSET_SCHEMA.ASSET_TYPE.key] || item[ASSET_SCHEMA.ASSET_TYPE.db]) === filters.type;
|
||||||
const matchStatus = !filters.status || (item[ASSET_SCHEMA.HW_STATUS.key] || item[ASSET_SCHEMA.HW_STATUS.db]) === filters.status;
|
const matchStatus = !filters.status || (item[ASSET_SCHEMA.HW_STATUS.key] || item[ASSET_SCHEMA.HW_STATUS.db]) === filters.status;
|
||||||
|
|
||||||
return matchKeyword && matchCorp && matchDept && matchLoc && matchField && matchType && matchStatus;
|
return matchKeyword && matchCorp && matchDept && matchLoc && matchField && matchType && matchStatus && matchPosition;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,7 +242,8 @@ export function calculatePcScoreDeductive(cpu: string, ram: string, gpu: string,
|
|||||||
gpuDeduction = 0;
|
gpuDeduction = 0;
|
||||||
} else if (
|
} else if (
|
||||||
gpuUpper.includes('RTX 3070') || gpuUpper.includes('RTX 3060') || gpuUpper.includes('RTX 2060') ||
|
gpuUpper.includes('RTX 3070') || gpuUpper.includes('RTX 3060') || gpuUpper.includes('RTX 2060') ||
|
||||||
gpuUpper.includes('RTX A2000') || gpuUpper.includes('RTX A3000') || gpuUpper.includes('QUADRO')
|
gpuUpper.includes('RTX A2000') || gpuUpper.includes('RTX A3000') || gpuUpper.includes('QUADRO') ||
|
||||||
|
gpuUpper.includes('RTX 4060') || gpuUpper.includes('RTX 4050')
|
||||||
) {
|
) {
|
||||||
gpuDeduction = 5;
|
gpuDeduction = 5;
|
||||||
} else if (
|
} else if (
|
||||||
@@ -289,10 +290,12 @@ export function calculatePcScoreDeductive(cpu: string, ram: string, gpu: string,
|
|||||||
* 성능 점수 기준 등급 뱃지 메타 정보 가져오기
|
* 성능 점수 기준 등급 뱃지 메타 정보 가져오기
|
||||||
*/
|
*/
|
||||||
export function getPcGrade(score: number, isWin11Incompatible?: boolean): { name: string; class: string; color: string } {
|
export function getPcGrade(score: number, isWin11Incompatible?: boolean): { name: string; class: string; color: string } {
|
||||||
|
// Windows 11 업그레이드 불가 PC는 성능 점수와 무관하게 교체 대상으로 분류
|
||||||
|
if (isWin11Incompatible) return { name: '교체 대상', class: 'badge-danger', color: '#EF4444' };
|
||||||
if (score >= 85) return { name: '최상급', class: 'b-purple', color: '#7C3AED' };
|
if (score >= 85) return { name: '최상급', class: 'b-purple', color: '#7C3AED' };
|
||||||
if (score >= 70) return { name: '상급', class: 'b-primary', color: '#4F46E5' };
|
if (score >= 70) return { name: '상급', class: 'b-primary', color: '#4F46E5' };
|
||||||
if (score >= 40) return { name: '중급', class: 'b-green', color: '#10B981' };
|
if (score >= 40) return { name: '중급', class: 'b-green', color: '#10B981' };
|
||||||
if (score >= 20 && !isWin11Incompatible) return { name: '보급', class: 'b-yellow', color: '#F59E0B' };
|
if (score >= 20) return { name: '보급', class: 'b-yellow', color: '#F59E0B' };
|
||||||
return { name: '교체 대상', class: 'badge-danger', color: '#EF4444' };
|
return { name: '교체 대상', class: 'badge-danger', color: '#EF4444' };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,51 +1,48 @@
|
|||||||
:root {
|
:root {
|
||||||
/* --- System Colors --- */
|
/* --- Vercel Stark Palette --- */
|
||||||
--color-red: #F21D0D;
|
--primary: #171717;
|
||||||
--color-pink: #E8175E;
|
--on-primary: #ffffff;
|
||||||
--color-magenta: #B92ED1;
|
--body: #4d4d4d;
|
||||||
--color-purple: #6D3DC2;
|
--mute: #888888;
|
||||||
--color-navy: #4255bd;
|
--hairline: #ebebeb;
|
||||||
--color-blue: #0D8DF2;
|
--hairline-strong: #a1a1a1;
|
||||||
--color-cyan: #03AEFC;
|
--canvas: #ffffff;
|
||||||
--color-green: #4DB251;
|
--canvas-soft: #fafafa;
|
||||||
--color-yellow: #FFBF00;
|
--canvas-soft-2: #f5f5f5;
|
||||||
--color-orange: #FF9800;
|
|
||||||
--color-dahong: #FF3D00;
|
/* --- Brand Accents --- */
|
||||||
--color-brown: #A0705F;
|
--color-blue: #0070f3;
|
||||||
--color-iron: #7F7F7F;
|
--color-cyan: #50e3c2;
|
||||||
--color-steel: #688897;
|
--color-pink: #ff0080;
|
||||||
|
--color-violet: #7928ca;
|
||||||
|
--color-orange: #f5a623;
|
||||||
|
|
||||||
/* --- Primary Brand Levels --- */
|
/* --- Semantic Alignment --- */
|
||||||
--primary-lv-0: #E9EEED;
|
--primary-color: var(--primary);
|
||||||
--primary-lv-1: #D2DCDB;
|
--primary-hover: #000000;
|
||||||
--primary-lv-2: #A5B9B6;
|
--primary-light: var(--canvas-soft-2);
|
||||||
--primary-lv-3: #789792;
|
--text-main: var(--primary);
|
||||||
--primary-lv-4: #4B746D;
|
--text-muted: var(--body);
|
||||||
--primary-lv-5: #35635C;
|
--border-color: var(--hairline);
|
||||||
--primary-lv-6: #1E5149;
|
--bg-color: var(--canvas-soft);
|
||||||
--primary-lv-7: #1B443D;
|
--bg-light: var(--canvas-soft-2);
|
||||||
--primary-lv-8: #193833;
|
|
||||||
--primary-lv-9: #162A27;
|
|
||||||
|
|
||||||
/* --- Semantic Colors --- */
|
|
||||||
--primary-color: var(--primary-lv-6);
|
|
||||||
--primary-hover: var(--primary-lv-5);
|
|
||||||
--primary-light: var(--primary-lv-0);
|
|
||||||
|
|
||||||
--edit-mode-color: var(--color-dahong);
|
|
||||||
--edit-mode-light: rgba(255, 61, 0, 0.1);
|
|
||||||
--edit-mode-focus: rgba(255, 61, 0, 0.3);
|
|
||||||
--edit-mode-dark: #cc3100;
|
|
||||||
|
|
||||||
--text-main: #111827;
|
|
||||||
--text-muted: #6B7280;
|
|
||||||
--border-color: #E5E7EB;
|
|
||||||
--bg-color: #F9FAFB;
|
|
||||||
--bg-light: #FAFAFA;
|
|
||||||
--white: #FFFFFF;
|
--white: #FFFFFF;
|
||||||
--danger: var(--color-red);
|
--danger: #ee0000;
|
||||||
--success: var(--color-green);
|
--success: #0070f3;
|
||||||
--header-height: 52px;
|
--header-height: 64px;
|
||||||
|
|
||||||
|
/* --- Global Typography Scale (Tighter Clamps) --- */
|
||||||
|
--fs-xs: clamp(10px, 1vmin + 0.1vw, 13px);
|
||||||
|
--fs-sm: clamp(12px, 1.2vmin + 0.2vw, 15px);
|
||||||
|
--fs-base: clamp(13px, 1.4vmin + 0.2vw, 16px);
|
||||||
|
--fs-md: clamp(16px, 2vmin + 0.3vw, 24px);
|
||||||
|
--fs-lg: clamp(20px, 3vmin + 0.4vw, 32px);
|
||||||
|
--fs-xl: clamp(28px, 5vmin + 0.6vw, 48px);
|
||||||
|
|
||||||
|
/* --- Layout Units --- */
|
||||||
|
--header-height: 64px;
|
||||||
|
--spacing-base: 1.5rem;
|
||||||
|
--radius-base: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
@@ -56,12 +53,26 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: 'Pretendard Variable', Pretendard, sans-serif;
|
font-family: 'Pretendard Variable', 'Pretendard', -apple-system, sans-serif;
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
background-color: var(--bg-color);
|
background-color: var(--bg-color);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
font-size: 14px;
|
font-size: var(--fs-base);
|
||||||
|
height: 100vh;
|
||||||
|
width: 100vw;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
input, textarea {
|
||||||
|
-webkit-user-select: text;
|
||||||
|
-moz-user-select: text;
|
||||||
|
-ms-user-select: text;
|
||||||
|
user-select: text;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-layout {
|
.app-layout {
|
||||||
@@ -69,67 +80,52 @@ body {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --- Header --- */
|
/* --- Header --- */
|
||||||
.main-header {
|
.main-header {
|
||||||
background-color: var(--white);
|
background-color: var(--canvas);
|
||||||
border-bottom: 1px solid var(--border-color);
|
border-bottom: 1px solid var(--border-color);
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
height: var(--header-height);
|
height: var(--header-height);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
|
||||||
|
|
||||||
.header-container {
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 1.5rem;
|
padding: 0 1.5rem;
|
||||||
gap: 1.5rem;
|
}
|
||||||
|
|
||||||
|
.header-container {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.brand { display: flex; align-items: center; gap: 0.75rem; }
|
.brand { display: flex; align-items: center; gap: 0.75rem; }
|
||||||
.main-logo { height: 34px; width: auto; }
|
.main-logo { height: clamp(28px, 4vmin, 40px); width: auto; }
|
||||||
.brand h1 { font-size: 1.1rem; font-weight: 800; color: var(--text-main); white-space: nowrap; }
|
.brand h1 { font-size: clamp(0.85rem, 1.4vmin, 1.05rem); font-weight: 600; color: var(--text-main); }
|
||||||
.brand h1 .sub-title { font-size: 0.85rem; color: var(--primary-color); font-weight: 600; margin-left: 0.25rem; }
|
|
||||||
|
|
||||||
.integrated-nav { flex: 1; height: 100%; display: flex; align-items: center; gap: 0.25rem; overflow: hidden; }
|
.integrated-nav { flex: 1; display: flex; align-items: center; margin-left: 2rem; gap: 0.5rem; }
|
||||||
.nav-group { display: flex; align-items: center; height: 100%; position: relative; flex-shrink: 0; }
|
.gnb-trigger {
|
||||||
.gnb-trigger { font-size: 14px; font-weight: 700; color: var(--text-muted); padding: 0 0.75rem; cursor: pointer; height: 100%; display: flex; align-items: center; white-space: nowrap; transition: color 0.2s; }
|
font-size: var(--fs-xs);
|
||||||
.nav-group.active .gnb-trigger, .nav-group:hover .gnb-trigger { color: var(--text-main); }
|
font-weight: 500;
|
||||||
.lnb-shelf { display: none; align-items: center; gap: 0.2rem; padding: 0 0.5rem; height: 60%; border-left: 1px solid var(--border-color); margin-left: 0.2rem; }
|
color: var(--text-muted);
|
||||||
|
padding: 0.4rem 0.75rem;
|
||||||
/* 기본적으로 활성 탭의 서브메뉴 표시 */
|
cursor: pointer;
|
||||||
.nav-group.active.is-showing-shelf .lnb-shelf { display: flex; }
|
border-radius: 9999px;
|
||||||
|
transition: all 0.2s;
|
||||||
/* GNB 전체 영역에 마우스가 올라가면 활성 탭의 서브메뉴를 일단 숨김 (다른 메뉴 탐색 우선) */
|
}
|
||||||
.integrated-nav:hover .nav-group.active.is-showing-shelf .lnb-shelf { display: none; }
|
.gnb-trigger:hover { color: var(--text-main); background: var(--canvas-soft-2); }
|
||||||
|
.gnb-trigger.active { color: var(--text-main); font-weight: 600; background: var(--canvas-soft-2); }
|
||||||
/* 마우스가 올라간 메뉴의 서브메뉴만 표시 */
|
|
||||||
.nav-group:hover .lnb-shelf { display: flex !important; }
|
|
||||||
|
|
||||||
.lnb-item { font-size: 13px; font-weight: 500; color: var(--text-muted); cursor: pointer; padding: 0.2rem 0.6rem; border-radius: 4px; white-space: nowrap; transition: all 0.2s; }
|
|
||||||
.lnb-item:hover { color: var(--primary-color); background-color: var(--primary-light); }
|
|
||||||
.lnb-item.active { color: var(--primary-color); background-color: var(--primary-light); font-weight: 700; }
|
|
||||||
|
|
||||||
.header-actions { display: flex; align-items: center; gap: 1rem; }
|
|
||||||
.role-switcher { display: flex; align-items: center; gap: 0.75rem; padding: 0 0.75rem; border-right: 1px solid var(--border-color); height: 24px; }
|
|
||||||
.role-label { font-size: 11px; font-weight: 700; color: var(--text-muted); }
|
|
||||||
.role-label.active { color: var(--primary-color); }
|
|
||||||
.switch { position: relative; display: inline-block; width: 34px; height: 18px; }
|
|
||||||
.switch input { opacity: 0; width: 0; height: 0; }
|
|
||||||
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
|
|
||||||
.slider:before { position: absolute; content: ""; height: 12px; width: 12px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
|
|
||||||
input:checked + .slider { background-color: var(--color-orange); }
|
|
||||||
input:checked + .slider:before { transform: translateX(16px); }
|
|
||||||
|
|
||||||
/* --- Layout Content --- */
|
/* --- Layout Content --- */
|
||||||
.content-area {
|
.content-area {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 1.25rem 2rem 0;
|
padding: 0;
|
||||||
overflow: hidden;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.view-container {
|
.view-container {
|
||||||
@@ -142,163 +138,507 @@ input:checked + .slider:before { transform: translateX(16px); }
|
|||||||
|
|
||||||
.view-content-wrapper {
|
.view-content-wrapper {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
display: flex;
|
||||||
padding-bottom: 2rem;
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --- View Toggle --- */
|
/* --- View Toggle (Vercel Tab Style) --- */
|
||||||
.view-toggle-container { margin-bottom: 1rem; display: flex; justify-content: flex-start; }
|
.view-toggle {
|
||||||
.view-toggle { display: inline-flex; background-color: var(--primary-lv-0); padding: 4px; border-radius: 8px; border: 1px solid var(--border-color); }
|
display: inline-flex;
|
||||||
.toggle-btn { padding: 6px 16px; font-size: 13px; font-weight: 600; color: var(--text-muted); background: none; border: none; border-radius: 6px; cursor: pointer; }
|
background: var(--canvas-soft-2);
|
||||||
.toggle-btn.active { background-color: var(--white); color: var(--primary-color); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
|
padding: 0.2rem;
|
||||||
|
border: 1px solid var(--hairline);
|
||||||
|
gap: 0.1rem;
|
||||||
|
border-radius: var(--radius-base);
|
||||||
|
}
|
||||||
|
|
||||||
/* --- System Status List (Docker Style) --- */
|
.toggle-btn {
|
||||||
.system-status-list { display: flex; flex-direction: column; gap: 0.5rem; }
|
padding: 0.35rem 1rem;
|
||||||
.system-list-header { display: flex; align-items: center; padding: 0.75rem 1.25rem; background-color: var(--bg-light); border-bottom: 1px solid var(--border-color); font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
|
border: none;
|
||||||
.system-row { display: flex; align-items: center; padding: 1rem 1.25rem; background-color: var(--white); border: 1px solid var(--border-color); border-radius: 6px; transition: all 0.2s; }
|
background: transparent;
|
||||||
.system-row:hover { border-color: var(--primary-lv-3); box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
|
font-size: var(--fs-xs);
|
||||||
.col-status { width: 100px; display: flex; align-items: center; gap: 0.5rem; }
|
font-weight: 500;
|
||||||
.col-info { flex: 1.5; }
|
color: var(--text-muted);
|
||||||
.col-network { flex: 1; }
|
cursor: pointer;
|
||||||
.col-remote { flex: 1; display: flex; align-items: center; gap: 0.5rem; }
|
transition: all 0.1s;
|
||||||
.col-traffic { flex: 1.2; }
|
border-radius: calc(var(--radius-base) - 2px);
|
||||||
.col-actions { width: 120px; display: flex; justify-content: flex-end; }
|
}
|
||||||
.status-dot { width: 10px; height: 10px; border-radius: 50%; }
|
|
||||||
.status-dot.online { background-color: var(--success); box-shadow: 0 0 6px var(--success); }
|
|
||||||
.status-text { font-size: 11px; font-weight: 600; color: var(--success); }
|
|
||||||
.asset-primary { font-weight: 700; font-size: 14px; }
|
|
||||||
.asset-secondary { font-size: 12px; color: var(--text-muted); }
|
|
||||||
.ip-address { font-weight: 600; font-family: monospace; color: var(--primary-color); }
|
|
||||||
.traffic-mini-chart { display: flex; flex-direction: column; gap: 4px; }
|
|
||||||
.traffic-info { display: flex; justify-content: space-between; font-size: 11px; }
|
|
||||||
.progress-bg { height: 4px; background: var(--primary-lv-0); border-radius: 2px; overflow: hidden; }
|
|
||||||
.progress-fill { height: 100%; background: var(--primary-color); }
|
|
||||||
.icon-btn { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 4px; border: 1px solid var(--border-color); background: var(--white); color: var(--text-muted); cursor: pointer; }
|
|
||||||
.icon-btn:hover { background-color: var(--primary-light); border-color: var(--primary-color); color: var(--primary-color); }
|
|
||||||
|
|
||||||
/* --- Footer --- */
|
.toggle-btn:hover { color: var(--text-main); }
|
||||||
.main-footer {
|
.toggle-btn.active {
|
||||||
height: 28px;
|
background: var(--canvas);
|
||||||
background-color: var(--white);
|
color: var(--text-main);
|
||||||
border-top: 1px solid var(--border-color);
|
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- Role Toggle Switch --- */
|
||||||
|
.role-toggle-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-end;
|
gap: 0.75rem;
|
||||||
padding: 0 1.5rem;
|
background: var(--canvas-soft-2);
|
||||||
flex-shrink: 0;
|
padding: 0.35rem 0.75rem;
|
||||||
|
border-radius: 9999px;
|
||||||
|
border: 1px solid var(--hairline);
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-footer p {
|
.role-label {
|
||||||
font-family: 'Pretendard Variable', Pretendard, sans-serif;
|
font-size: var(--fs-xs);
|
||||||
font-size: 0.75rem;
|
font-weight: 500;
|
||||||
font-weight: 300;
|
color: var(--mute);
|
||||||
line-height: 1.25rem;
|
transition: all 0.2s;
|
||||||
letter-spacing: -0.0175rem;
|
}
|
||||||
color: #777777;
|
|
||||||
user-select: none;
|
.role-label.active {
|
||||||
pointer-events: all;
|
color: var(--primary);
|
||||||
-webkit-user-drag: none;
|
font-weight: 700;
|
||||||
margin: 0;
|
}
|
||||||
padding: 0;
|
|
||||||
|
.role-toggle {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
width: 40px;
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.role-toggle input {
|
||||||
|
opacity: 0;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.role-slider {
|
||||||
|
position: absolute;
|
||||||
|
cursor: pointer;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: var(--hairline-strong);
|
||||||
|
transition: .4s;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.role-slider:before {
|
||||||
|
position: absolute;
|
||||||
|
content: "";
|
||||||
|
height: 16px;
|
||||||
|
width: 16px;
|
||||||
|
left: 2px;
|
||||||
|
bottom: 2px;
|
||||||
|
background-color: white;
|
||||||
|
transition: .4s;
|
||||||
|
border-radius: 50%;
|
||||||
|
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
input:checked + .role-slider {
|
||||||
|
background-color: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
input:checked + .role-slider:before {
|
||||||
|
transform: translateX(20px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- Utility Styles (The Standard) --- */
|
||||||
|
.btn {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 0.4rem;
|
||||||
|
padding: 0 1.25rem;
|
||||||
|
font-size: var(--fs-xs);
|
||||||
|
font-weight: 500;
|
||||||
|
border-radius: 9999px;
|
||||||
|
cursor: pointer;
|
||||||
|
height: clamp(32px, 4.5vmin, 44px);
|
||||||
|
transition: all 0.2s;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary { background-color: var(--primary); color: var(--on-primary); }
|
||||||
|
.btn-primary:hover { background-color: #000; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
|
||||||
|
|
||||||
|
.btn-outline { background-color: var(--canvas); color: var(--text-main); border: 1px solid var(--hairline); }
|
||||||
|
.btn-outline:hover { border-color: var(--hairline-strong); background: var(--canvas-soft); }
|
||||||
|
|
||||||
|
.btn-sm { height: clamp(28px, 3.5vmin, 36px); padding: 0 1rem; font-size: var(--fs-xs); }
|
||||||
|
.btn-danger { color: var(--danger) !important; border-color: var(--danger) !important; }
|
||||||
|
|
||||||
|
/* --- Form Elements --- */
|
||||||
|
.form-select-sm {
|
||||||
|
height: clamp(28px, 3.5vmin, 36px);
|
||||||
|
padding: 0 0.5rem;
|
||||||
|
border: 1px solid var(--hairline);
|
||||||
|
border-radius: 6px;
|
||||||
|
font-size: var(--fs-xs);
|
||||||
|
outline: none;
|
||||||
|
background-color: var(--canvas);
|
||||||
|
color: var(--primary);
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-select-sm:focus {
|
||||||
|
border-color: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 2px 8px;
|
||||||
|
border-radius: 9999px;
|
||||||
|
font-size: var(--fs-xs);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.badge-primary { background-color: var(--primary); color: var(--on-primary); }
|
||||||
|
|
||||||
|
/* --- Badge Color Variants (성능 등급 등 컬러 뱃지) --- */
|
||||||
|
.b-purple { background-color: #EDE9FE; color: #6D28D9; } /* 최상급 - 보라 */
|
||||||
|
.b-primary { background-color: #E0E7FF; color: #3730A3; } /* 상급 - 인디고 */
|
||||||
|
.b-green { background-color: #D1FAE5; color: #065F46; } /* 중급 - 초록 */
|
||||||
|
.b-yellow { background-color: #FEF3C7; color: #B45309; } /* 보급 - 노랑/주황 */
|
||||||
|
.badge-danger { background-color: #FFE4E6; color: #BE123C; } /* 교체대상 - 빨강 */
|
||||||
|
.badge-muted { background-color: #F1F5F9; color: #64748B; } /* 폐기 - 회색 */
|
||||||
|
.badge-light { background-color: #F8FAFC; color: #94A3B8; } /* 기타 - 연회색 */
|
||||||
|
|
||||||
|
/* --- Form Elements Extra --- */
|
||||||
|
.input-with-icon {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-with-icon input {
|
||||||
|
padding-left: 2.5rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-with-icon i,
|
||||||
|
.input-with-icon .icon-sm {
|
||||||
|
position: absolute;
|
||||||
|
left: 12px;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
color: var(--mute);
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.autocomplete-list {
|
||||||
|
position: absolute;
|
||||||
|
top: 100%;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
max-height: 250px;
|
||||||
|
overflow-y: auto;
|
||||||
|
background: var(--canvas);
|
||||||
|
border: 1px solid var(--hairline);
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 12px 30px rgba(0,0,0,0.12);
|
||||||
|
z-index: 1100;
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.autocomplete-item {
|
||||||
|
padding: 10px 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
border-bottom: 1px solid var(--hairline-soft, #f5f5f5);
|
||||||
|
transition: background 0.1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.autocomplete-item:hover {
|
||||||
|
background: var(--canvas-soft-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.autocomplete-item-empty {
|
||||||
|
padding: 1rem;
|
||||||
|
color: var(--mute);
|
||||||
|
font-size: var(--fs-xs);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.suggestion-name {
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: var(--fs-xs);
|
||||||
|
color: var(--primary);
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.suggestion-meta {
|
||||||
|
font-size: var(--fs-xs);
|
||||||
|
color: var(--mute);
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- Summary & Selection Cards --- */
|
||||||
|
.summary-info-card {
|
||||||
|
padding: 1.25rem;
|
||||||
|
background: var(--canvas-soft);
|
||||||
|
border: 1px solid var(--hairline);
|
||||||
|
border-radius: 8px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-pc-selection-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.5rem;
|
||||||
|
max-height: 250px;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-pc-item {
|
||||||
|
padding: 12px;
|
||||||
|
border: 1px solid var(--hairline);
|
||||||
|
border-radius: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
background: var(--canvas);
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-pc-item:hover {
|
||||||
|
border-color: var(--hairline-strong);
|
||||||
|
background: var(--canvas-soft);
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-pc-item.selected {
|
||||||
|
border-color: var(--primary);
|
||||||
|
background: var(--primary-light);
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-item-code {
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: var(--fs-xs);
|
||||||
|
color: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.pc-item-meta {
|
||||||
|
font-size: var(--fs-xs);
|
||||||
|
color: var(--mute);
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-list-message {
|
||||||
|
font-size: var(--fs-xs);
|
||||||
|
color: var(--mute);
|
||||||
|
padding: 1rem 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- Global Utilities --- */
|
||||||
|
.hidden { display: none !important; }
|
||||||
|
.clickable { cursor: pointer; transition: opacity 0.2s; }
|
||||||
|
.clickable:hover { opacity: 0.8; }
|
||||||
|
|
||||||
|
/* Flexbox & Grid Utilities */
|
||||||
|
.flex { display: flex; }
|
||||||
|
.flex-col { display: flex; flex-direction: column; }
|
||||||
|
.flex-row { display: flex; flex-direction: row; }
|
||||||
|
.items-center { align-items: center; }
|
||||||
|
.justify-between { justify-content: space-between; }
|
||||||
|
.justify-center { justify-content: center; }
|
||||||
|
.gap-1 { gap: 0.25rem; }
|
||||||
|
.gap-2 { gap: 0.5rem; }
|
||||||
|
.gap-3 { gap: 0.75rem; }
|
||||||
|
.gap-4 { gap: 1rem; }
|
||||||
|
.gap-6 { gap: 1.5rem; }
|
||||||
|
.gap-y-3 { row-gap: 0.75rem; }
|
||||||
|
.gap-x-4 { column-gap: 1rem; }
|
||||||
|
.mb-0 { margin-bottom: 0 !important; }
|
||||||
|
.mb-4 { margin-bottom: 1rem !important; }
|
||||||
|
.mb-6 { margin-bottom: 1.5rem !important; }
|
||||||
|
.pb-4 { padding-bottom: 1rem !important; }
|
||||||
|
.p-4 { padding: 1rem !important; }
|
||||||
|
.p-2 { padding: 0.5rem !important; }
|
||||||
|
.p-8 { padding: 2rem !important; }
|
||||||
|
.ml-auto { margin-left: auto !important; }
|
||||||
|
.self-end { align-self: flex-end !important; }
|
||||||
|
.font-medium { font-weight: 500; }
|
||||||
|
.text-muted { color: var(--mute) !important; }
|
||||||
|
.mt-12 { margin-top: 3rem !important; }
|
||||||
|
.icon-sm { width: 16px; height: 16px; }
|
||||||
|
.h-90vh { height: 90vh !important; }
|
||||||
|
.pt-0 { padding-top: 0 !important; }
|
||||||
|
.font-semibold { font-weight: 600; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.w-full { width: 100%; }
|
||||||
|
.h-full { height: 100%; }
|
||||||
|
|
||||||
|
/* Text Utilities */
|
||||||
|
.text-center { text-align: center !important; }
|
||||||
|
.text-right { text-align: right !important; }
|
||||||
|
.text-left { text-align: left !important; }
|
||||||
|
.font-bold { font-weight: 700; }
|
||||||
|
.bg-primary-light { background-color: var(--primary-light) !important; }
|
||||||
|
.text-success { color: var(--success) !important; }
|
||||||
|
.text-danger { color: var(--danger) !important; }
|
||||||
|
.text-blue { color: var(--color-blue) !important; }
|
||||||
|
.text-orange { color: var(--color-orange) !important; }
|
||||||
|
/* --- Unified Search & Filter Bar --- */
|
||||||
|
.search-bar {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: var(--spacing-base);
|
||||||
|
padding: 1.25rem var(--spacing-base);
|
||||||
|
border-bottom: 1px solid var(--hairline);
|
||||||
|
align-items: flex-end;
|
||||||
|
background: var(--canvas);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hidden {
|
.search-item {
|
||||||
display: none !important;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.5rem;
|
||||||
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-nowrap {
|
.search-item.flex-1 {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-item label {
|
||||||
|
font-size: var(--fs-xs);
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--mute);
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: -0.02em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-item input,
|
||||||
|
.search-item select {
|
||||||
|
height: clamp(34px, 4.5vmin, 44px);
|
||||||
|
padding: 0 0.75rem;
|
||||||
|
border: 1px solid var(--hairline);
|
||||||
|
border-radius: 6px;
|
||||||
|
font-size: var(--fs-sm);
|
||||||
|
outline: none;
|
||||||
|
background-color: var(--canvas);
|
||||||
|
color: var(--primary);
|
||||||
|
transition: border-color 0.2s;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-item select {
|
||||||
|
cursor: pointer;
|
||||||
|
min-width: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-item input:focus,
|
||||||
|
.search-item select:focus {
|
||||||
|
border-color: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-action-group {
|
||||||
|
margin-left: auto;
|
||||||
|
align-self: flex-end;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-view-toggle-label {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
cursor: pointer;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--primary);
|
||||||
|
height: clamp(34px, 4.5vmin, 44px);
|
||||||
|
padding: 0 0.5rem;
|
||||||
|
font-size: var(--fs-sm);
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-view-toggle-label input[type="checkbox"] {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.map-pagination-group {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.75rem;
|
||||||
|
margin-left: 0.5rem;
|
||||||
|
padding-left: 1rem;
|
||||||
|
border-left: 1px solid var(--hairline);
|
||||||
|
height: clamp(34px, 4.5vmin, 44px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-info {
|
||||||
|
font-size: var(--fs-xs);
|
||||||
|
color: var(--mute);
|
||||||
|
font-weight: 500;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --- Utility Styles --- */
|
|
||||||
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; padding: 0 0.8rem; font-size: 12px; font-weight: 600; border-radius: 4px; cursor: pointer; height: 28px; }
|
|
||||||
.btn-primary { background-color: var(--primary-color); color: var(--white); border: none; }
|
|
||||||
.btn-outline { background-color: transparent; color: var(--text-muted); border: 1px solid var(--border-color); }
|
|
||||||
|
|
||||||
.badge {
|
/* --- Modal & View Header Layouts --- */
|
||||||
padding: 2px 6px;
|
.header-left {
|
||||||
border-radius: 4px;
|
display: flex;
|
||||||
font-size: 16px;
|
align-items: center;
|
||||||
font-weight: 700;
|
gap: 1rem;
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge-primary {
|
/* --- Asset Identity & Header Styling (Global) --- */
|
||||||
background-color: var(--primary-color);
|
.header-identity {
|
||||||
color: white;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
flex: 1;
|
||||||
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge-muted {
|
.asset-code-title {
|
||||||
background-color: #9CA3AF;
|
font-size: var(--fs-md);
|
||||||
color: white;
|
font-weight: 600;
|
||||||
|
color: var(--primary);
|
||||||
|
letter-spacing: -0.02em;
|
||||||
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge-light {
|
.service-type-badge {
|
||||||
background: var(--bg-color);
|
font-size: var(--fs-xs);
|
||||||
color: var(--text-muted);
|
font-weight: 600;
|
||||||
border: 1px solid var(--border-color);
|
color: var(--on-primary);
|
||||||
|
background: var(--primary);
|
||||||
|
padding: 4px 8px;
|
||||||
|
border-radius: 9999px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PC 성능 등급 뱃지 컬러 스타일 */
|
.asset-type-label {
|
||||||
.badge.b-purple {
|
font-size: var(--fs-sm);
|
||||||
background-color: #EDE9FE;
|
font-weight: 500;
|
||||||
color: #7C3AED;
|
color: var(--mute);
|
||||||
border: 1px solid #DDD6FE;
|
line-height: 1;
|
||||||
font-size: 11px;
|
|
||||||
padding: 2px 6px;
|
|
||||||
}
|
|
||||||
.badge.b-primary {
|
|
||||||
background-color: #DBEAFE;
|
|
||||||
color: #1D4ED8;
|
|
||||||
border: 1px solid #BFDBFE;
|
|
||||||
font-size: 11px;
|
|
||||||
padding: 2px 6px;
|
|
||||||
}
|
|
||||||
.badge.b-green {
|
|
||||||
background-color: #D1FAE5;
|
|
||||||
color: #047857;
|
|
||||||
border: 1px solid #A7F3D0;
|
|
||||||
font-size: 11px;
|
|
||||||
padding: 2px 6px;
|
|
||||||
}
|
|
||||||
.badge.b-yellow {
|
|
||||||
background-color: #FEF3C7;
|
|
||||||
color: #D97706;
|
|
||||||
border: 1px solid #FDE68A;
|
|
||||||
font-size: 11px;
|
|
||||||
padding: 2px 6px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-tag {
|
.main-footer {
|
||||||
color: var(--text-muted);
|
border-top: 1px solid var(--border-color);
|
||||||
font-size: 16px;
|
background-color: var(--canvas);
|
||||||
padding: 1px 5px;
|
color: var(--mute);
|
||||||
border: 1px solid var(--border-color);
|
padding: 1rem 2rem;
|
||||||
border-radius: 3px;
|
text-align: right;
|
||||||
background-color: var(--bg-light);
|
font-size: var(--fs-xs);
|
||||||
|
flex-shrink: 0;
|
||||||
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
.font-bold {
|
.main-footer p {
|
||||||
font-weight: 700;
|
margin: 0;
|
||||||
|
letter-spacing: -0.02em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --- Responsive Design (Tablet & Mobile) --- */
|
|
||||||
@media (max-width: 1200px) {
|
|
||||||
.header-container { gap: 0.75rem; padding: 0 1rem; }
|
|
||||||
.brand h1 { font-size: 1rem; }
|
|
||||||
.brand h1 .sub-title { font-size: 0.75rem; }
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 992px) {
|
|
||||||
.main-header { height: auto; padding: 0.5rem 0; }
|
|
||||||
.header-container { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
|
|
||||||
.integrated-nav { width: 100%; justify-content: flex-start; border-top: 1px solid var(--border-color); padding-top: 0.5rem; }
|
|
||||||
.header-actions { width: 100%; justify-content: flex-end; padding-top: 0.5rem; }
|
|
||||||
.content-area { padding: 0 1rem; }
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
|
||||||
.brand h1 .sub-title { display: none; }
|
|
||||||
.header-actions .btn span { display: none; }
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,526 +1,503 @@
|
|||||||
/* --- Premium Executive Dashboard View Specific Styles --- */
|
/* --- Vercel Inspired Premium Dashboard --- */
|
||||||
.dashboard-section-title {
|
.dashboard-section-title {
|
||||||
padding: 0 0 0 8px;
|
padding: 0;
|
||||||
font-size: 1.55rem;
|
font-size: var(--fs-lg);
|
||||||
font-weight: 800;
|
font-weight: 600;
|
||||||
color: var(--text-main);
|
color: var(--primary);
|
||||||
letter-spacing: -0.02em;
|
letter-spacing: -0.02em;
|
||||||
border-left: 4px solid var(--primary-color);
|
margin-bottom: clamp(0.5rem, 1.5vmin, 1.5rem);
|
||||||
margin-bottom: 1rem;
|
line-height: 1;
|
||||||
line-height: 1.2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-grid {
|
/* Background Mesh Gradient for Stats Row */
|
||||||
display: grid;
|
.dashboard-stats-row {
|
||||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
display: flex;
|
||||||
gap: 1.5rem;
|
flex-wrap: wrap;
|
||||||
margin-bottom: 2rem;
|
border-bottom: 1px solid var(--hairline);
|
||||||
|
padding: 0;
|
||||||
|
margin-bottom: clamp(1rem, 2vmin, 2rem);
|
||||||
|
background: radial-gradient(at 0% 0%, rgba(80, 227, 194, 0.05) 0px, transparent 50%),
|
||||||
|
radial-gradient(at 100% 0%, rgba(121, 40, 202, 0.05) 0px, transparent 50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Premium Executive Divider-based Style (Line-based Division) */
|
.stat-group-item {
|
||||||
.dashboard-card, .stat-card {
|
flex: 1;
|
||||||
background: transparent;
|
min-width: 250px;
|
||||||
backdrop-filter: none;
|
|
||||||
-webkit-backdrop-filter: none;
|
|
||||||
border: none;
|
|
||||||
border-bottom: 1px solid var(--border-color);
|
|
||||||
box-shadow: none;
|
|
||||||
border-radius: 0;
|
|
||||||
padding: 1.5rem 0.5rem;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
transition: opacity 0.2s ease;
|
padding: var(--spacing-base);
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-card:hover, .stat-card:hover {
|
.stat-group-item.bordered {
|
||||||
transform: none;
|
border-left: 1px solid var(--hairline);
|
||||||
box-shadow: none;
|
|
||||||
opacity: 0.85;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-layout-2col {
|
.stat-group-item .stat-label {
|
||||||
display: grid;
|
font-size: var(--fs-xs);
|
||||||
grid-template-columns: repeat(2, 1fr);
|
font-weight: 500;
|
||||||
|
color: var(--mute);
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: -0.02em;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-group-item .stat-value {
|
||||||
|
font-size: var(--fs-xl);
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--primary);
|
||||||
|
line-height: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-group-item .stat-value span {
|
||||||
|
font-size: var(--fs-base);
|
||||||
|
font-weight: 400;
|
||||||
|
margin-left: 6px;
|
||||||
|
color: var(--mute);
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-group-item .stat-sub {
|
||||||
|
display: flex;
|
||||||
gap: 1.5rem;
|
gap: 1.5rem;
|
||||||
|
font-size: var(--fs-sm);
|
||||||
|
color: var(--body);
|
||||||
|
margin-top: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-layout-3col {
|
/* --- Technical Data Alignment --- */
|
||||||
display: grid;
|
.text-primary {
|
||||||
grid-template-columns: repeat(3, 1fr);
|
color: var(--color-blue) !important;
|
||||||
gap: 1.5rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-card {
|
.detail-stat-header {
|
||||||
min-height: 380px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-card canvas {
|
|
||||||
flex: 1;
|
|
||||||
width: 100% !important;
|
|
||||||
max-height: 280px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Premium KPI Value Styling */
|
|
||||||
.stat-value {
|
|
||||||
font-size: 2.41rem;
|
|
||||||
font-weight: 800;
|
|
||||||
background: linear-gradient(135deg, #1E5149 0%, #3B82F6 100%);
|
|
||||||
-webkit-background-clip: text;
|
|
||||||
-webkit-text-fill-color: transparent;
|
|
||||||
margin-top: 0.5rem;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 0.75rem;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-value-danger {
|
.stat-title {
|
||||||
background: linear-gradient(135deg, #E11D48 0%, #F59E0B 100%);
|
font-size: var(--fs-base);
|
||||||
-webkit-background-clip: text;
|
|
||||||
-webkit-text-fill-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-label {
|
|
||||||
font-size: 1.36rem;
|
|
||||||
color: var(--text-muted);
|
|
||||||
font-weight: 700;
|
|
||||||
text-transform: uppercase;
|
|
||||||
letter-spacing: 0.05em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-icon {
|
|
||||||
width: 48px;
|
|
||||||
height: 48px;
|
|
||||||
border-radius: 12px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-blue { background: rgba(59, 130, 246, 0.1); color: #3B82F6; }
|
|
||||||
.icon-green { background: rgba(30, 81, 73, 0.1); color: #1E5149; }
|
|
||||||
.icon-red { background: rgba(225, 29, 72, 0.1); color: #E11D48; }
|
|
||||||
.icon-yellow { background: rgba(245, 158, 11, 0.1); color: #F59E0B; }
|
|
||||||
|
|
||||||
.table-premium {
|
|
||||||
background: white;
|
|
||||||
border-radius: 12px;
|
|
||||||
box-shadow: 0 4px 15px rgba(0,0,0,0.05);
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-premium table {
|
|
||||||
width: 100%;
|
|
||||||
border-collapse: collapse;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-premium th {
|
|
||||||
background: #F8FAFC;
|
|
||||||
color: #475569;
|
|
||||||
font-weight: 700;
|
|
||||||
padding: 1rem;
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-size: 0.96rem;
|
|
||||||
letter-spacing: 0.05em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-premium td {
|
|
||||||
padding: 1rem;
|
|
||||||
border-bottom: 1px solid #E2E8F0;
|
|
||||||
color: #1E293B;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-premium tr:hover td {
|
|
||||||
background: #F1F5F9;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* --- Slider/Carousel Specific Styles --- */
|
|
||||||
.dashboard-header-wrapper {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slider-controls {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slider-nav-btn {
|
|
||||||
background: white;
|
|
||||||
border: 1px solid var(--border-color);
|
|
||||||
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
|
|
||||||
border-radius: 50%;
|
|
||||||
width: 36px;
|
|
||||||
height: 36px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
cursor: pointer;
|
|
||||||
color: var(--text-main);
|
|
||||||
transition: all 0.2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slider-nav-btn:hover {
|
|
||||||
background: var(--primary-color);
|
|
||||||
color: white;
|
|
||||||
border-color: var(--primary-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.slider-nav-btn:disabled {
|
|
||||||
opacity: 0.5;
|
|
||||||
cursor: not-allowed;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-info {
|
|
||||||
font-size: 0.96rem;
|
|
||||||
color: var(--text-muted);
|
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
color: var(--primary);
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-btns button {
|
.detail-stat-body {
|
||||||
padding: 0.3rem 0.75rem;
|
|
||||||
border: 1px solid var(--border-color);
|
|
||||||
background: var(--white);
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 0.96rem;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-btns button:disabled {
|
|
||||||
opacity: 0.5;
|
|
||||||
cursor: not-allowed;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slider-indicator {
|
|
||||||
font-weight: 700;
|
|
||||||
color: var(--text-muted);
|
|
||||||
font-size: 1.41rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-slider-viewport {
|
|
||||||
width: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
padding: 0.5rem 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-slider-track {
|
|
||||||
display: flex;
|
|
||||||
transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
||||||
width: 400%; /* For 4 pages */
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard-slide {
|
|
||||||
width: 25%; /* 100% / 4 pages */
|
|
||||||
flex-shrink: 0;
|
|
||||||
padding: 0 2px; /* Slight padding to avoid cutting off box-shadows */
|
|
||||||
height: calc(100vh - 150px);
|
|
||||||
min-height: 520px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
box-sizing: border-box;
|
gap: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --- Location View Styles --- */
|
.loc-summary {
|
||||||
.location-layout {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1.2fr 1fr;
|
|
||||||
gap: 2rem;
|
|
||||||
height: calc(100vh - 180px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.map-section, .asset-section {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.section-title {
|
|
||||||
font-size: 1.125rem;
|
|
||||||
font-weight: 700;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
color: var(--text-main);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.map-wrapper {
|
|
||||||
flex: 1;
|
|
||||||
background: #f8fafc;
|
|
||||||
box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
|
|
||||||
}
|
|
||||||
|
|
||||||
.location-box {
|
|
||||||
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
||||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.location-box:hover {
|
|
||||||
background: rgba(30, 81, 73, 0.2) !important;
|
|
||||||
transform: scale(1.02);
|
|
||||||
z-index: 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
.location-box:active {
|
|
||||||
transform: scale(0.98);
|
|
||||||
}
|
|
||||||
|
|
||||||
.asset-section .table-container {
|
|
||||||
flex: 1;
|
|
||||||
overflow-y: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-tag {
|
|
||||||
display: inline-block;
|
|
||||||
padding: 0.25rem 0.625rem;
|
|
||||||
border-radius: 9999px;
|
|
||||||
font-size: 0.75rem;
|
|
||||||
font-weight: 600;
|
|
||||||
background: #ecfdf5;
|
|
||||||
color: #059669;
|
|
||||||
border: 1px solid #d1fae5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.view-toggle-btn:hover {
|
|
||||||
border-color: var(--primary-color) !important;
|
|
||||||
color: var(--primary-color) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.view-toggle-btn.active:hover {
|
|
||||||
color: white !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* --- View Toggle Header --- */
|
|
||||||
.view-header {
|
|
||||||
padding: 0.5rem 1.5rem;
|
|
||||||
background: var(--white);
|
|
||||||
border-bottom: 1px solid var(--border-color);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: flex-start;
|
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.view-toggle-container {
|
.loc-summary span {
|
||||||
display: flex;
|
font-size: var(--fs-sm);
|
||||||
background: #f1f5f9;
|
color: var(--mute);
|
||||||
padding: 0.25rem;
|
|
||||||
border-radius: 8px;
|
|
||||||
gap: 0.25rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mode-toggle-btn {
|
.loc-summary span strong {
|
||||||
padding: 0.5rem 1rem;
|
color: var(--primary);
|
||||||
border: none;
|
font-size: var(--fs-base);
|
||||||
background: transparent;
|
|
||||||
border-radius: 6px;
|
|
||||||
font-size: 0.8125rem;
|
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--text-muted);
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.2s ease;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mode-toggle-btn:hover {
|
.type-summary {
|
||||||
color: var(--text-main);
|
display: flex;
|
||||||
|
gap: 0.8rem;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
opacity: 0.9;
|
||||||
|
border-top: 1px dashed var(--hairline);
|
||||||
|
padding-top: 8px;
|
||||||
|
margin-top: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mode-toggle-btn.active {
|
.type-summary span {
|
||||||
background: var(--white);
|
cursor: help;
|
||||||
color: var(--primary-color);
|
font-size: var(--fs-xs);
|
||||||
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
color: var(--mute);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --- Enhanced Location View --- */
|
.type-summary span strong {
|
||||||
|
color: var(--primary);
|
||||||
|
font-size: var(--fs-sm);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --- Enhanced Location View Layout --- */
|
||||||
.location-view-wrapper {
|
.location-view-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: calc(100vh - 120px);
|
height: 100%;
|
||||||
|
background: var(--canvas);
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.location-filter-bar {
|
.location-filter-bar {
|
||||||
padding: 1rem 1.5rem;
|
/* Inherit from .search-bar in common.css */
|
||||||
background: var(--white);
|
|
||||||
border-bottom: 1px solid var(--border-color);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 2rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.filter-group {
|
.filter-group label {
|
||||||
|
font-size: var(--fs-xs);
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--mute);
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: -0.02em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.75rem;
|
gap: 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.filter-group label {
|
|
||||||
font-size: 0.8125rem;
|
|
||||||
font-weight: 700;
|
|
||||||
color: var(--text-main);
|
|
||||||
}
|
|
||||||
|
|
||||||
.filter-group select {
|
|
||||||
padding: 0.4rem 0.75rem;
|
|
||||||
border: 1px solid var(--border-color);
|
|
||||||
border-radius: 6px;
|
|
||||||
font-size: 0.8125rem;
|
|
||||||
color: var(--text-main);
|
|
||||||
background: var(--white);
|
|
||||||
min-width: 140px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.map-pagination {
|
|
||||||
margin-left: auto;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.location-main-content {
|
.location-main-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1.4fr 1fr;
|
grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
|
||||||
gap: 1.5rem;
|
background: var(--canvas);
|
||||||
padding: 1.5rem;
|
gap: 0;
|
||||||
|
padding: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
align-items: stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.map-container-section {
|
.map-container-section {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
align-items: center;
|
||||||
overflow: auto;
|
justify-content: center;
|
||||||
|
background: var(--canvas);
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.map-frame-wrapper {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.map-image {
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
object-fit: contain;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.map-overlay {
|
||||||
|
position: absolute;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-map-message {
|
||||||
|
padding: 5rem;
|
||||||
|
text-align: center;
|
||||||
|
color: var(--mute);
|
||||||
|
font-size: var(--fs-base);
|
||||||
}
|
}
|
||||||
|
|
||||||
.location-box-point {
|
.location-box-point {
|
||||||
|
position: absolute;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
transition: all 0.2s ease;
|
transition: all 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-label-text {
|
/* --- Asset Detail Sidebar --- */
|
||||||
font-size: 0.65rem;
|
|
||||||
font-weight: 800;
|
|
||||||
color: var(--primary-color);
|
|
||||||
pointer-events: none;
|
|
||||||
text-shadow: 0 0 2px white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.asset-list-section {
|
.asset-list-section {
|
||||||
background: var(--white);
|
|
||||||
border-radius: 12px;
|
|
||||||
border: 1px solid var(--border-color);
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
background: var(--canvas);
|
||||||
}
|
}
|
||||||
|
|
||||||
.asset-list-section .section-header {
|
.section-header {
|
||||||
padding: 1rem 1.25rem;
|
padding: 1.5rem;
|
||||||
border-bottom: 1px solid var(--border-color);
|
border-bottom: 1px solid var(--hairline);
|
||||||
background: #f8fafc;
|
background: var(--canvas);
|
||||||
}
|
flex-shrink: 0;
|
||||||
|
|
||||||
.asset-list-section h4 {
|
|
||||||
margin: 0;
|
|
||||||
font-size: 0.9375rem;
|
|
||||||
color: var(--text-main);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mini-table-wrapper {
|
.mini-table-wrapper {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.compact-table {
|
.sidebar-title {
|
||||||
width: 100%;
|
margin: 0;
|
||||||
border-collapse: collapse;
|
font-size: var(--fs-base);
|
||||||
}
|
|
||||||
|
|
||||||
.compact-table th {
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
background: var(--white);
|
|
||||||
padding: 0.75rem 1rem;
|
|
||||||
text-align: left;
|
|
||||||
font-size: 0.75rem;
|
|
||||||
font-weight: 700;
|
|
||||||
color: var(--text-muted);
|
|
||||||
border-bottom: 1px solid var(--border-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.compact-table td {
|
|
||||||
padding: 0.75rem 1rem;
|
|
||||||
font-size: 0.8125rem;
|
|
||||||
border-bottom: 1px solid #f1f5f9;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
max-width: 150px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.compact-table tr.clickable-row:hover {
|
|
||||||
background: #f1f5f9;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* --- Asset Detail Sidebar (LocationView) --- */
|
|
||||||
.asset-detail-sidebar {
|
|
||||||
padding-top: 1rem;
|
|
||||||
background: var(--white);
|
|
||||||
height: 100%;
|
|
||||||
overflow-y: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detail-section {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
padding: 0 1.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detail-section-title {
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 700;
|
|
||||||
color: var(--primary-color);
|
|
||||||
border-bottom: 1px solid var(--border-color);
|
|
||||||
padding-bottom: 6px;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detail-grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(2, minmax(80px, auto) 1fr);
|
|
||||||
gap: 8px 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detail-label {
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--text-muted);
|
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
display: flex;
|
color: var(--primary);
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detail-value {
|
|
||||||
font-size: 14px;
|
|
||||||
color: var(--text-main);
|
|
||||||
font-weight: 500;
|
|
||||||
word-break: break-all;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-header-actions {
|
.detail-header-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
justify-content: space-between;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
gap: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-header-title {
|
.header-identity {
|
||||||
|
display: flex;
|
||||||
|
align-items: center; /* Changed from baseline to center for perfect vertical alignment */
|
||||||
|
gap: 8px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-size: 0.95rem;
|
flex-wrap: wrap; /* Allow wrapping on very small screens */
|
||||||
|
}
|
||||||
|
|
||||||
|
.asset-code-title {
|
||||||
|
font-size: var(--fs-md);
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--primary);
|
||||||
|
letter-spacing: -0.02em;
|
||||||
|
line-height: 1; /* Reset line-height to prevent baseline shifts */
|
||||||
|
}
|
||||||
|
|
||||||
|
.service-type-badge {
|
||||||
|
font-size: var(--fs-xs);
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--on-primary);
|
||||||
|
background: var(--primary);
|
||||||
|
padding: 4px 8px; /* Adjusted padding for better vertical centering */
|
||||||
|
border-radius: 9999px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
line-height: 1; /* Match line-height */
|
||||||
|
}
|
||||||
|
|
||||||
|
.asset-type-label {
|
||||||
|
font-size: var(--fs-sm);
|
||||||
|
font-weight: 500;
|
||||||
|
color: var(--mute);
|
||||||
|
line-height: 1; /* Match line-height */
|
||||||
|
}
|
||||||
|
|
||||||
|
.asset-detail-sidebar {
|
||||||
|
padding: 1.5rem 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-section {
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
padding: 0 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-section-title {
|
||||||
|
font-size: var(--fs-xs);
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--mute);
|
||||||
|
border-bottom: 1px solid var(--hairline);
|
||||||
|
padding-bottom: 8px;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: -0.02em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-grid-2col {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
gap: 1rem 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-item.full-width {
|
||||||
|
grid-column: span 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-label-sm {
|
||||||
|
font-size: var(--fs-xs);
|
||||||
|
color: var(--mute);
|
||||||
|
font-weight: 500;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard-layout-2col {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
gap: 0;
|
||||||
|
padding: 0 2rem 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard-card {
|
||||||
|
background: var(--canvas);
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
padding: 2rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1rem;
|
||||||
|
transition: all 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard-card.clickable:hover {
|
||||||
|
background-color: var(--canvas-soft-2);
|
||||||
|
border-color: var(--hairline-strong);
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-progress-bar {
|
||||||
|
height: 8px;
|
||||||
|
background: var(--canvas-soft-2);
|
||||||
|
border-radius: 9999px;
|
||||||
|
overflow: hidden;
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-fill {
|
||||||
|
height: 100%;
|
||||||
|
background: var(--primary);
|
||||||
|
border-radius: 9999px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard-card .stat-label {
|
||||||
|
font-size: var(--fs-xs);
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--mute);
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: -0.02em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard-card .stat-value {
|
||||||
|
font-size: var(--fs-xl);
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard-card .stat-sub {
|
||||||
|
font-size: var(--fs-sm);
|
||||||
|
color: var(--body);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-soft {
|
||||||
|
background-color: var(--canvas-soft) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chart-placeholder {
|
||||||
|
width: 140px;
|
||||||
|
height: 140px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.circular-progress {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: conic-gradient(var(--primary) calc(var(--val) * 1%), var(--hairline) 0);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.circular-progress::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
width: 70px;
|
||||||
|
height: 70px;
|
||||||
|
background: var(--canvas);
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.circular-progress::after {
|
||||||
|
content: attr(style); /* This is a hack to get the value, but we'll use innerHTML in TS if needed */
|
||||||
|
position: absolute;
|
||||||
|
font-size: var(--fs-sm);
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.system-dashboard {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.warning-badge-orange { background-color: var(--color-orange); color: var(--white); padding: 2px 8px; border-radius: 9999px; font-size: var(--fs-xs); font-weight: 600; }
|
||||||
|
.warning-badge { background-color: var(--danger); color: var(--white); padding: 2px 8px; border-radius: 9999px; font-size: var(--fs-xs); font-weight: 600; }
|
||||||
|
|
||||||
|
.list-section {
|
||||||
|
flex: 1.3;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: 0;
|
||||||
|
padding: 1rem 1.5rem 0 0;
|
||||||
|
border-right: 1px solid var(--hairline);
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-panel {
|
||||||
|
flex: 0.7;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: 0;
|
||||||
|
padding: 1rem 0 0 1.5rem;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-empty-state {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color: var(--mute);
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-photo-wrapper {
|
||||||
|
width: 100%;
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
position: relative;
|
||||||
|
border: 1px solid var(--hairline);
|
||||||
|
background: #f0f0f0;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-photo-state {
|
||||||
|
padding: 3rem;
|
||||||
|
text-align: center;
|
||||||
|
color: var(--mute);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Responsive Overrides */
|
||||||
|
@media (max-width: 1440px) {
|
||||||
|
.location-main-content {
|
||||||
|
grid-template-columns: 1.5fr 1fr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1024px) {
|
||||||
|
.location-main-content {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
grid-template-rows: auto 1fr;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
.map-container-section {
|
||||||
|
height: 400px;
|
||||||
|
border-right: none;
|
||||||
|
border-bottom: 1px solid var(--hairline);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -13,13 +13,13 @@ export function renderSwDashboard(container: HTMLElement) {
|
|||||||
// 통합 SW 데이터
|
// 통합 SW 데이터
|
||||||
const allSw = [...state.masterData.swExternal, ...state.masterData.swInternal];
|
const allSw = [...state.masterData.swExternal, ...state.masterData.swInternal];
|
||||||
|
|
||||||
allSw.forEach(sw => {
|
allSw.forEach((sw: any) => {
|
||||||
const assigned = state.masterData.swUsers.filter(u => u.sw_id === sw.id).length;
|
const assigned = state.masterData.swUsers.filter(u => u.sw_id === sw.id).length;
|
||||||
const qty = typeof sw[ASSET_SCHEMA.ASSET_COUNT.key] === 'number' ? sw[ASSET_SCHEMA.ASSET_COUNT.key] : parseInt(sw[ASSET_SCHEMA.ASSET_COUNT.key]||'0', 10);
|
const qty = typeof sw[ASSET_SCHEMA.ASSET_COUNT.key] === 'number' ? sw[ASSET_SCHEMA.ASSET_COUNT.key] : parseInt(sw[ASSET_SCHEMA.ASSET_COUNT.key]||'0', 10);
|
||||||
const priceStr = sw[ASSET_SCHEMA.PURCHASE_AMOUNT.key] ? String(sw[ASSET_SCHEMA.PURCHASE_AMOUNT.key]).replace(/,/g, '') : '0';
|
const priceStr = sw[ASSET_SCHEMA.PURCHASE_AMOUNT.key] ? String(sw[ASSET_SCHEMA.PURCHASE_AMOUNT.key]).replace(/,/g, '') : '0';
|
||||||
const price = parseInt(priceStr, 10) || 0;
|
const price = parseInt(priceStr, 10) || 0;
|
||||||
|
|
||||||
if (sw.asset_type === '외부SW' || sw.type === '외부SW') {
|
if (sw.asset_type === '외부SW') {
|
||||||
extQty += qty; extUsed += assigned; extTotal++;
|
extQty += qty; extUsed += assigned; extTotal++;
|
||||||
if (isSWExpiring(sw)) extExp++;
|
if (isSWExpiring(sw)) extExp++;
|
||||||
if (sw[ASSET_SCHEMA.PURCHASE_DATE.key]?.startsWith('2026')) extCost2026 += price;
|
if (sw[ASSET_SCHEMA.PURCHASE_DATE.key]?.startsWith('2026')) extCost2026 += price;
|
||||||
@@ -33,38 +33,38 @@ export function renderSwDashboard(container: HTMLElement) {
|
|||||||
const intPer = intQty > 0 ? Math.round((intUsed/intQty)*100) : 0;
|
const intPer = intQty > 0 ? Math.round((intUsed/intQty)*100) : 0;
|
||||||
|
|
||||||
container.innerHTML = `
|
container.innerHTML = `
|
||||||
<div class="view-container">
|
<div class="view-container" style="background-color: var(--canvas); padding: 1.5rem 0;">
|
||||||
<h3 class="dashboard-section-title">소프트웨어 라이선스 현황</h3>
|
<h3 class="dashboard-section-title" style="padding: 0 2rem; margin-bottom: 1rem;">소프트웨어 라이선스 현황</h3>
|
||||||
|
|
||||||
<div class="dashboard-layout-2col" style="margin-bottom: 1.5rem;">
|
<div class="dashboard-layout-2col mb-6">
|
||||||
<div class="dashboard-card" data-action="ext-usage" style="cursor:pointer; min-height:auto;">
|
<div class="dashboard-card clickable" data-action="ext-usage">
|
||||||
<span style="font-size:1.21rem; font-weight:700; color:var(--text-main);">외부 소프트웨어 사용율</span>
|
<div class="stat-label">외부 소프트웨어 사용율</div>
|
||||||
<div style="font-size: 1.02rem; color:var(--text-muted); margin-bottom: 1rem;">${extQty}카피 중 ${extUsed}개 할당</div>
|
<div class="stat-sub">${extQty}카피 중 ${extUsed}개 할당</div>
|
||||||
<div style="font-size: 2.21rem; font-weight:700; color:var(--dash-primary);">${extPer}%</div>
|
<div class="stat-value text-primary">${extPer}%</div>
|
||||||
<div style="width: 100%; height: 4px; background-color: var(--border-color); border-radius: 2px; overflow: hidden; margin-top: 0.5rem;">
|
<div class="stat-progress-bar">
|
||||||
<div style="width: ${extPer}%; height: 100%; background-color: var(--dash-primary);"></div>
|
<div class="progress-fill" style="width: ${extPer}%;"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-card" data-action="int-usage" style="cursor:pointer; min-height:auto;">
|
<div class="dashboard-card clickable" data-action="int-usage">
|
||||||
<span style="font-size:1.21rem; font-weight:700; color:var(--text-main);">내부 소프트웨어 현황</span>
|
<div class="stat-label">내부 소프트웨어 현황</div>
|
||||||
<div style="font-size: 1.02rem; color:var(--text-muted); margin-bottom: 1rem;">등록된 내부 솔루션: ${intTotal}개</div>
|
<div class="stat-sub">등록된 내부 솔루션: ${intTotal}개</div>
|
||||||
<div style="font-size: 2.21rem; font-weight:700; color:var(--dash-primary);">${intPer}%</div>
|
<div class="stat-value text-primary">${intPer}%</div>
|
||||||
<div style="width: 100%; height: 4px; background-color: var(--border-color); border-radius: 2px; overflow: hidden; margin-top: 0.5rem;">
|
<div class="stat-progress-bar">
|
||||||
<div style="width: ${intPer}%; height: 100%; background-color: var(--dash-primary);"></div>
|
<div class="progress-fill" style="width: ${intPer}%;"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3 class="dashboard-section-title">2026년 누적 도입 비용 분석</h3>
|
<h3 class="dashboard-section-title" style="padding: 0 2rem; margin-bottom: 1rem;">2026년 누적 도입 비용 분석</h3>
|
||||||
|
|
||||||
<div style="display:grid; grid-template-columns: repeat(2, 1fr); gap:1.5rem; margin-bottom:1.5rem;">
|
<div class="dashboard-layout-2col">
|
||||||
<div class="dashboard-card" style="min-height:auto;">
|
<div class="dashboard-card">
|
||||||
<span style="font-size:1.21rem; font-weight:700; color:var(--text-main);">외부 SW 누적 비용 (2026)</span>
|
<div class="stat-label">외부 SW 누적 비용 (2026)</div>
|
||||||
<div style="font-size: 2.21rem; font-weight:700; color:var(--dash-primary);">₩ ${extCost2026.toLocaleString()}</div>
|
<div class="stat-value text-primary">₩ ${extCost2026.toLocaleString()}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-card" style="min-height:auto;">
|
<div class="dashboard-card">
|
||||||
<span style="font-size:1.21rem; font-weight:700; color:var(--text-main);">내부 SW 누적 비용 (2026)</span>
|
<div class="stat-label">내부 SW 누적 비용 (2026)</div>
|
||||||
<div style="font-size: 2.21rem; font-weight:700; color:#3b82f6;">₩ ${intCost2026.toLocaleString()}</div>
|
<div class="stat-value text-blue">₩ ${intCost2026.toLocaleString()}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -34,9 +34,9 @@ export function renderPartsMasterList(container: HTMLElement) {
|
|||||||
width: '15%',
|
width: '15%',
|
||||||
render: c => {
|
render: c => {
|
||||||
let badgeClass = 'badge-primary';
|
let badgeClass = 'badge-primary';
|
||||||
if (c.category === 'CPU') badgeClass = 'b-primary';
|
if (c.category === 'CPU') badgeClass = 'badge-primary';
|
||||||
else if (c.category === 'GPU') badgeClass = 'b-purple';
|
else if (c.category === 'GPU') badgeClass = 'badge-success';
|
||||||
else if (c.category === 'RAM') badgeClass = 'b-green';
|
else if (c.category === 'RAM') badgeClass = 'badge-warning';
|
||||||
return `<span class="badge ${badgeClass}">${c.category}</span>`;
|
return `<span class="badge ${badgeClass}">${c.category}</span>`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -90,36 +90,35 @@ export function renderPartsMasterList(container: HTMLElement) {
|
|||||||
{
|
{
|
||||||
header: '직무명',
|
header: '직무명',
|
||||||
sortKey: 'job_name',
|
sortKey: 'job_name',
|
||||||
width: '15%',
|
width: '25%',
|
||||||
render: j => `<strong style="color: var(--primary-color); font-size: 14px;">${formatInline(j.job_name || '-')}</strong>`
|
render: j => `<strong style="color: var(--primary-color); font-size: 14px;">${formatInline(j.job_name || '-')}</strong>`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
header: '권장 CPU 사양',
|
header: '요구 PC 등급',
|
||||||
sortKey: 'cpu_standard',
|
sortKey: 'required_grade',
|
||||||
render: j => formatInline(j.cpu_standard || '-')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
header: '권장 RAM 사양',
|
|
||||||
sortKey: 'ram_standard',
|
|
||||||
width: '12%',
|
|
||||||
render: j => formatInline(j.ram_standard || '-')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
header: '권장 GPU 사양',
|
|
||||||
sortKey: 'gpu_standard',
|
|
||||||
render: j => formatInline(j.gpu_standard || '-')
|
|
||||||
},
|
|
||||||
{
|
|
||||||
header: '기준 점수',
|
|
||||||
sortKey: 'min_score',
|
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '10%',
|
width: '20%',
|
||||||
render: j => `<span style="font-weight: 700;">${j.min_score || 0}점 이상</span>`
|
render: j => {
|
||||||
|
const grade = j.required_grade || '중급';
|
||||||
|
let badgeClass = 'b-green';
|
||||||
|
let style = 'background-color: #10B981; color: white;';
|
||||||
|
if (grade === '최상급') {
|
||||||
|
badgeClass = 'b-purple';
|
||||||
|
style = 'background-color: #7C3AED; color: white;';
|
||||||
|
} else if (grade === '상급') {
|
||||||
|
badgeClass = 'b-primary';
|
||||||
|
style = 'background-color: #4F46E5; color: white;';
|
||||||
|
} else if (grade === '보급') {
|
||||||
|
badgeClass = 'b-yellow';
|
||||||
|
style = 'background-color: #F59E0B; color: white;';
|
||||||
|
}
|
||||||
|
return `<span class="badge ${badgeClass}" style="${style} padding: 4px 10px; font-size: 0.85rem; font-weight: 700;">${grade}</span>`;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
header: '비고',
|
header: '비고',
|
||||||
sortKey: 'remarks',
|
sortKey: 'remarks',
|
||||||
width: '20%',
|
width: '50%',
|
||||||
render: j => formatInline(j.remarks || '-')
|
render: j => formatInline(j.remarks || '-')
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -130,26 +129,36 @@ export function renderPartsMasterList(container: HTMLElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderSubTabs(container: HTMLElement) {
|
function renderSubTabs(container: HTMLElement) {
|
||||||
const header = container.querySelector('.page-header');
|
const searchBar = container.querySelector('.search-bar');
|
||||||
if (!header) return;
|
if (!searchBar) return;
|
||||||
|
|
||||||
|
// 기존에 생성된 탭 바가 있다면 제거하여 중복 방지 (스타일만 수정하는 최소 침습 방식)
|
||||||
|
const existingTabs = container.querySelector('.sub-tab-container');
|
||||||
|
if (existingTabs) existingTabs.remove();
|
||||||
|
|
||||||
const tabContainer = document.createElement('div');
|
const tabContainer = document.createElement('div');
|
||||||
tabContainer.className = 'sub-tab-container';
|
tabContainer.className = 'sub-tab-container';
|
||||||
tabContainer.style.cssText = 'display: flex; gap: 16px; margin-top: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border-color); padding-bottom: 0;';
|
tabContainer.style.cssText = 'display: flex; justify-content: space-between; align-items: center; padding: 0 2rem; border-bottom: 1px solid var(--hairline); background: var(--canvas);';
|
||||||
|
|
||||||
const tab1Active = activePartsMasterSubTab === 'parts-master';
|
const tab1Active = activePartsMasterSubTab === 'parts-master';
|
||||||
const tab2Active = activePartsMasterSubTab === 'job-spec';
|
const tab2Active = activePartsMasterSubTab === 'job-spec';
|
||||||
|
|
||||||
tabContainer.innerHTML = `
|
tabContainer.innerHTML = `
|
||||||
<button id="tab-parts-master" class="sub-tab-btn ${tab1Active ? 'active' : ''}" style="padding: 10px 16px; border: none; background: none; font-size: 14px; font-weight: 600; cursor: pointer; color: ${tab1Active ? 'var(--primary-color)' : 'var(--text-muted)'}; position: relative; border-bottom: 3px solid ${tab1Active ? 'var(--primary-color)' : 'transparent'};">
|
<div style="display: flex; gap: 1rem;">
|
||||||
부품 표준 등급
|
<button id="tab-parts-master" class="sub-tab-btn ${tab1Active ? 'active' : ''}" style="padding: 1rem 0.5rem; border: none; background: none; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; color: ${tab1Active ? 'var(--primary)' : 'var(--mute)'}; position: relative; border-bottom: 2px solid ${tab1Active ? 'var(--primary)' : 'transparent'}; margin-bottom: -1px;">
|
||||||
</button>
|
부품 표준 등급
|
||||||
<button id="tab-job-spec" class="sub-tab-btn ${tab2Active ? 'active' : ''}" style="padding: 10px 16px; border: none; background: none; font-size: 14px; font-weight: 600; cursor: pointer; color: ${tab2Active ? 'var(--primary-color)' : 'var(--text-muted)'}; position: relative; border-bottom: 3px solid ${tab2Active ? 'var(--primary-color)' : 'transparent'};">
|
</button>
|
||||||
직무별 기준 사양
|
<button id="tab-job-spec" class="sub-tab-btn ${tab2Active ? 'active' : ''}" style="padding: 1rem 0.5rem; border: none; background: none; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; color: ${tab2Active ? 'var(--primary)' : 'var(--mute)'}; position: relative; border-bottom: 2px solid ${tab2Active ? 'var(--primary)' : 'transparent'}; margin-bottom: -1px;">
|
||||||
</button>
|
직무별 기준 사양
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 0.8rem; color: #4B5563; font-weight: 700; display: flex; align-items: center; gap: 4px; background: #F3F4F6; padding: 5px 12px; border-radius: 6px; border: 1px dashed #D1D5DB; margin-bottom: 4px;">
|
||||||
|
<span>💡</span>
|
||||||
|
<span>${tab2Active ? '우측 상단의 [기준 사양 추가] 버튼을 누르거나, 테이블의 행을 클릭하여 관리할 수 있습니다.' : '우측 상단의 [표준 부품 추가] 버튼을 누르거나, 테이블의 행을 클릭하여 관리할 수 있습니다.'}</span>
|
||||||
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
header.parentNode!.insertBefore(tabContainer, header.nextSibling);
|
searchBar.parentNode!.insertBefore(tabContainer, searchBar);
|
||||||
|
|
||||||
const tabPartsMaster = tabContainer.querySelector('#tab-parts-master')!;
|
const tabPartsMaster = tabContainer.querySelector('#tab-parts-master')!;
|
||||||
const tabJobSpec = tabContainer.querySelector('#tab-job-spec')!;
|
const tabJobSpec = tabContainer.querySelector('#tab-job-spec')!;
|
||||||
@@ -168,4 +177,3 @@ function renderSubTabs(container: HTMLElement) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,9 +9,10 @@ export function renderUserList(container: HTMLElement) {
|
|||||||
dataSource: () => state.masterData.users || [],
|
dataSource: () => state.masterData.users || [],
|
||||||
searchKeys: ['emp_no', 'user_name', 'dept_name', 'position', 'status'],
|
searchKeys: ['emp_no', 'user_name', 'dept_name', 'position', 'status'],
|
||||||
filterOptions: {
|
filterOptions: {
|
||||||
keywordLabel: '사번/이름/부서/직급 검색',
|
keywordLabel: '사번/이름/조직/직무 검색',
|
||||||
showCorp: false,
|
showCorp: false,
|
||||||
showDept: true,
|
showDept: true,
|
||||||
|
showPosition: true,
|
||||||
showType: false
|
showType: false
|
||||||
},
|
},
|
||||||
onRowClick: (user) => openUserModal(user, 'view'),
|
onRowClick: (user) => openUserModal(user, 'view'),
|
||||||
@@ -38,7 +39,7 @@ export function renderUserList(container: HTMLElement) {
|
|||||||
render: u => formatInline(u.dept_name || '-')
|
render: u => formatInline(u.dept_name || '-')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
header: '직급 (직무)',
|
header: '직무',
|
||||||
sortKey: 'position',
|
sortKey: 'position',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: '25%',
|
width: '25%',
|
||||||
|
|||||||
Reference in New Issue
Block a user