feat: 모든 카테고리(HW, SW, SW 사용자) DB 일괄 덮어쓰기 저장 기능 구현

This commit is contained in:
2026-04-17 15:07:54 +09:00
parent a805d9ce06
commit c5c6acea6a
27 changed files with 2863 additions and 996 deletions

View File

@@ -6,40 +6,14 @@
--text-muted: #6B7280;
--border-color: #E5E7EB;
--bg-color: #F9FAFB;
--sidebar-bg: #ffffff;
--white: #FFFFFF;
--danger: #dc2626;
--dash-primary: #6cc020;
--dash-light: #f2f9ec;
--dash-danger: #cf222e;
}
.shadow-sm {
box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
}
.rounded-lg {
border-radius: 8px;
}
.dashboard-card {
background-color: var(--white);
border: 1px solid var(--border-color);
border-radius: 8px;
box-shadow: none;
padding: 1.5rem;
display: flex;
flex-direction: column;
}
.dashboard-layout-2col {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1.5rem;
}
@media (max-width: 768px) {
.dashboard-layout-2col {
grid-template-columns: 1fr;
}
--header-height: 52px;
}
* {
@@ -55,336 +29,141 @@ body {
line-height: 1.5;
letter-spacing: -0.02em;
font-size: 14px;
}
/* App Layout - Sidebar & Main Content */
.app-layout {
display: flex;
min-height: 100vh;
width: 100%;
}
.sidebar {
width: 260px;
background-color: var(--sidebar-bg);
border-right: 1px solid var(--border-color);
display: flex;
flex-direction: column;
flex-shrink: 0;
}
.sidebar-header {
padding: 1.5rem;
border-bottom: 1px solid var(--border-color);
}
.sidebar-header h1 {
font-size: 1.5rem;
font-weight: 700;
color: var(--text-main);
}
.sidebar-header h1 span {
color: var(--primary-color);
}
.nav-section {
padding: 1.5rem 0 0.5rem;
}
.nav-section h3 {
padding: 0 1.5rem;
font-size: 0.75rem;
font-weight: 600;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.05em;
margin-bottom: 0.5rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.nav-section h3 i {
width: 14px;
height: 14px;
}
.nav-list {
list-style: none;
}
.nav-list li {
padding: 0.75rem 1.5rem;
margin: 0.25rem 0.75rem;
border-radius: 6px;
cursor: pointer;
display: flex;
align-items: center;
gap: 0.75rem;
color: var(--text-main);
font-weight: 500;
transition: all 0.2s;
}
.nav-list li i {
width: 18px;
height: 18px;
color: var(--text-muted);
}
.nav-list li:hover {
background-color: var(--bg-color);
}
.nav-list li.active {
background-color: var(--primary-light);
color: var(--primary-color);
}
.nav-list li.active i {
color: var(--primary-color);
}
/* Main Content Wrapper */
.main-wrapper {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
}
/* Header */
.top-header {
.app-layout {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1.5rem 2rem;
flex-direction: column;
height: 100vh;
width: 100%;
}
/* --- Main Header & GNB/LNB --- */
.main-header {
background-color: var(--white);
border-bottom: 1px solid var(--border-color);
z-index: 100;
height: var(--header-height);
}
.header-title h2 {
font-size: 1.25rem;
font-weight: 600;
color: var(--text-main);
}
.header-actions {
.header-container {
height: 100%;
display: flex;
align-items: center;
padding: 0 1.5rem;
gap: 1.5rem;
}
.brand h1 {
font-size: 1.2rem;
font-weight: 800;
color: var(--text-main);
white-space: nowrap;
margin-right: 1rem;
}
.brand h1 span { color: var(--primary-color); }
.integrated-nav {
flex: 1;
height: 100%;
display: flex;
align-items: center;
gap: 0.5rem;
}
.content-area {
padding: 2rem;
flex: 1;
overflow-y: auto;
}
/* Dashboard Grid */
.dashboard-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 1.5rem;
margin-bottom: 2rem;
}
.stat-card {
background-color: var(--white);
padding: 1.5rem;
border: 1px solid var(--border-color);
border-radius: 8px;
.nav-group {
display: flex;
flex-direction: column;
align-items: center;
height: 100%;
}
.stat-card .title {
font-size: 0.875rem;
color: var(--text-muted);
font-weight: 500;
}
.stat-card .value {
font-size: 2rem;
.gnb-trigger {
font-size: 14px;
font-weight: 700;
color: var(--text-main);
margin-top: 0.5rem;
padding: 0 1rem;
cursor: pointer;
height: 100%;
display: flex;
align-items: center;
white-space: nowrap;
}
/* Buttons */
.lnb-shelf {
display: none;
align-items: center;
gap: 0.25rem;
padding: 0 0.75rem;
height: 60%;
border-left: 1px solid var(--border-color);
margin-left: 0.25rem;
animation: fadeIn 0.2s ease-out;
}
.nav-group:hover .lnb-shelf,
.nav-group.is-showing-shelf .lnb-shelf {
display: flex;
}
.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;
}
.lnb-item:hover { color: var(--primary-color); background-color: var(--bg-color); }
.lnb-item.active {
color: var(--primary-color);
background-color: var(--primary-light);
font-weight: 700;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateX(-5px); }
to { opacity: 1; transform: translateX(0); }
}
/* --- Global Actions & Buttons --- */
.header-actions { display: flex; gap: 0.3rem; align-items: center; }
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 0.5rem 1.25rem; /* 표준 사이즈로 통일 */
font-size: 0.875rem;
font-weight: 500;
gap: 0.35rem;
padding: 0 0.8rem;
font-size: 12px;
font-weight: 600;
border-radius: 4px;
cursor: pointer;
transition: all 0.2s;
height: 28px;
line-height: 1;
min-width: 80px; /* 버튼의 최소 너비 확보 */
}
.btn-sm {
padding: 0.25rem 0.5rem;
font-size: 0.75rem;
min-width: auto;
.btn i, .btn svg { width: 12px !important; height: 12px !important; }
.btn-primary { background-color: var(--primary-color); color: var(--white); border: 1px solid var(--primary-color); }
.btn-outline { background-color: transparent; color: var(--text-muted); border: 1px solid var(--border-color); }
.btn-danger { color: var(--danger) !important; border-color: var(--danger) !important; }
/* --- Layout Frame --- */
.content-area {
flex: 1;
padding: 2rem;
overflow-y: auto;
}
.btn i { width: 16px; height: 16px; }
.btn-primary {
background-color: var(--primary-color);
color: var(--white);
border: 1px solid var(--primary-color);
}
.btn-primary:hover {
background-color: var(--primary-hover);
border-color: var(--primary-hover);
}
.btn-outline {
background-color: transparent;
color: var(--primary-color);
border: 1px solid var(--primary-color);
white-space: nowrap;
}
.btn-outline:hover {
background-color: var(--primary-light);
border-color: var(--primary-color);
}
.text-nowrap {
white-space: nowrap;
}
.btn-danger {
color: var(--danger);
border-color: #fca5a5;
}
.btn-danger:hover {
background-color: #fef2f2;
}
.btn-icon {
background: none;
border: none;
color: inherit;
cursor: pointer;
padding: 0.25rem;
}
/* Table */
.table-container {
background-color: var(--white);
border: 1px solid var(--border-color);
border-radius: 8px;
overflow: auto; /* 가로/세로 스크롤 허용 */
max-height: calc(100vh - 180px); /* 화면 높이에 맞춰 제한 (가로 스크롤바 노출용) */
position: relative;
}
table {
.view-container {
width: 100%;
border-collapse: separate; /* sticky border 유지를 위해 separate 설정 */
border-spacing: 0;
text-align: left;
}
th, td {
padding: 1rem 1.25rem;
border-bottom: 1px solid var(--border-color);
}
th {
font-weight: 600;
color: var(--text-muted);
font-size: 0.875rem;
white-space: nowrap;
background-color: #FAFAFA;
position: sticky;
top: 0;
z-index: 10;
box-shadow: inset 0 -1px 0 var(--border-color); /* sticky 시 경계선 유지 */
}
td {
font-size: 0.875rem;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background-color: var(--bg-color); }
.empty-row td { text-align: center; padding: 3rem; color: var(--text-muted); }
.sw-table td {
text-align: center;
}
/* Search Filter Bar */
.search-bar {
display: flex;
flex-wrap: wrap;
gap: 1rem;
background-color: var(--white);
padding: 1.25rem;
border: 1px solid var(--border-color);
border-radius: 8px;
margin-bottom: 2rem;
align-items: flex-end;
}
.search-item {
display: flex;
flex-direction: column;
gap: 0.5rem;
min-width: 180px;
gap: 1.5rem;
}
.search-item.flex-1 {
flex: 1;
min-width: 250px;
}
.search-item label {
font-size: 0.75rem;
font-weight: 600;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.05em;
}
.search-item input,
.search-item select {
padding: 0.5rem 0.75rem;
border: 1px solid var(--border-color);
border-radius: 4px;
font-size: 0.875rem;
outline: none;
transition: all 0.2s;
background-color: var(--white);
}
.search-item input:focus,
.search-item select:focus {
border-color: var(--primary-color);
box-shadow: 0 0 0 2px rgba(30, 81, 73, 0.1);
}
.btn-reset {
height: 36px;
padding: 0 1rem;
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.875rem;
color: var(--text-muted);
}
.hidden {
display: none !important;
}
.hidden { display: none !important; }
.text-nowrap { white-space: nowrap; }

59
src/styles/dashboard.css Normal file
View File

@@ -0,0 +1,59 @@
/* --- Dashboard View Specific Styles --- */
.dashboard-section-title {
padding: 0 0 1rem 0;
font-size: 1.1rem;
font-weight: 700;
color: var(--text-main);
}
.dashboard-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 1.5rem;
margin-bottom: 2rem;
}
.stat-card {
background-color: var(--white);
padding: 1.5rem;
border: 1px solid var(--border-color);
border-radius: 8px;
display: flex;
flex-direction: column;
}
.stat-card .title {
font-size: 0.875rem;
color: var(--text-muted);
font-weight: 600;
}
.stat-card .value {
font-size: 2.2rem;
font-weight: 800;
color: var(--primary-color);
margin-top: 0.5rem;
}
.dashboard-layout-2col {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1.5rem;
}
.dashboard-card {
background-color: var(--white);
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 1.5rem;
display: flex;
flex-direction: column;
min-height: 360px;
}
.dashboard-card canvas {
flex: 1;
width: 100% !important;
max-height: 280px;
}

View File

@@ -47,13 +47,21 @@
}
.modal-header .btn-icon {
color: var(--white);
opacity: 0.8;
transition: opacity 0.2s;
color: #FFFFFF !important;
cursor: pointer;
background: none !important;
border: none !important;
}
.modal-header .btn-icon i,
.modal-header .btn-icon svg {
width: 20px !important; /* Original natural size */
height: 20px !important;
stroke: #FFFFFF !important;
}
.modal-header .btn-icon:hover {
opacity: 1;
background: none !important;
}
.modal-body {

104
src/styles/table.css Normal file
View File

@@ -0,0 +1,104 @@
/* --- Table View & Filter Styles --- */
.search-bar {
display: flex;
flex-wrap: wrap;
gap: 1.25rem;
background-color: var(--white);
padding: 1.5rem;
border: 1px solid var(--border-color);
border-radius: 8px;
align-items: flex-end;
}
.search-item {
display: flex;
flex-direction: column;
gap: 0.4rem;
}
.search-item.flex-1 {
flex: 1;
}
.search-item label {
font-size: 11px;
font-weight: 800;
color: var(--text-muted);
}
.search-item input,
.search-item select {
height: 38px;
padding: 0 1rem;
border: 1px solid var(--border-color);
border-radius: 4px;
font-size: 14px;
outline: none;
}
.search-item select {
padding-right: 2.5rem;
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-9'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 0.75rem center;
}
.btn-reset {
height: 38px !important;
padding: 0 0.8rem !important;
font-size: 12px !important;
display: inline-flex !important;
align-items: center !important;
gap: 0.35rem !important;
border-radius: 4px !important;
}
.table-container {
background-color: var(--white);
border-top: 1px solid var(--border-color);
border-bottom: 1px solid var(--border-color);
border-left: none;
border-right: none;
overflow: auto;
max-height: calc(100vh - 240px);
}
table {
width: 100%;
border-collapse: collapse;
}
th, td {
padding: 1rem 1.5rem;
border-bottom: 1px solid var(--border-color);
text-align: left;
white-space: nowrap;
}
th {
background-color: #FAFAFA;
font-weight: 700;
color: var(--text-muted);
font-size: 12px;
position: sticky;
top: 0;
z-index: 10;
box-shadow: inset 0 -1px 0 var(--border-color);
text-transform: uppercase;
}
td {
font-size: 14px;
}
tbody tr:hover {
background-color: #F9FAFB;
}
.btn-sm {
padding: 0.25rem 0.5rem;
font-size: 11px;
height: 24px;
}