feat: add employee management, backend health check, and UI improvements

This commit is contained in:
2026-05-07 11:50:10 +08:00
parent a5db09f41e
commit c00db75c13
59 changed files with 3926 additions and 5796 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -0,0 +1,71 @@
.backend-unavailable {
min-height: 100vh;
display: grid;
place-items: center;
padding: 32px;
background:
radial-gradient(circle at top, rgba(16, 185, 129, 0.16), transparent 32%),
linear-gradient(180deg, #08130f 0%, #0f1f18 100%);
}
.backend-card {
width: min(520px, 100%);
display: grid;
gap: 18px;
padding: 32px 30px;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 20px;
background: rgba(7, 18, 13, 0.9);
box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
text-align: center;
}
.backend-badge {
width: 72px;
height: 72px;
display: grid;
place-items: center;
margin: 0 auto;
border-radius: 20px;
background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.28));
color: #4ade80;
font-size: 32px;
}
.backend-card h1 {
color: #f8fafc;
font-size: 28px;
font-weight: 800;
}
.backend-card p {
color: rgba(226, 232, 240, 0.8);
font-size: 14px;
line-height: 1.7;
}
.backend-actions {
display: flex;
justify-content: center;
}
.retry-btn {
min-height: 42px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 0 18px;
border: 1px solid rgba(16, 185, 129, 0.2);
border-radius: 10px;
background: #059669;
color: #fff;
font-size: 14px;
font-weight: 760;
box-shadow: 0 16px 30px rgba(5, 150, 105, 0.2);
}
.retry-btn:disabled {
opacity: 0.72;
cursor: wait;
}

View File

@@ -21,9 +21,11 @@
}
.employee-list {
display: grid;
grid-template-rows: auto auto auto minmax(0, 1fr);
padding: 18px 20px;
display: flex;
flex-direction: column;
min-height: 0;
padding: 16px 18px;
overflow: hidden;
}
.employee-detail {
@@ -34,22 +36,26 @@
.status-tabs {
display: flex;
gap: 18px;
padding-bottom: 12px;
border-bottom: 1px solid #edf2f7;
gap: 28px;
margin-top: 14px;
border-bottom: 1px solid #dbe4ee;
}
.status-tabs button {
position: relative;
min-height: 36px;
display: inline-flex;
align-items: center;
gap: 8px;
border: 0;
background: transparent;
color: #64748b;
font-size: 14px;
font-weight: 760;
font-weight: 750;
}
.status-tabs button.active {
color: #0f172a;
color: #059669;
}
.status-tabs button.active::after {
@@ -57,30 +63,51 @@
position: absolute;
left: 0;
right: 0;
bottom: -13px;
bottom: -1px;
height: 3px;
border-radius: 999px;
border-radius: 999px 999px 0 0;
background: #10b981;
}
.status-tabs button small {
min-width: 24px;
min-height: 22px;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0 7px;
border-radius: 999px;
background: #f1f5f9;
color: #475569;
font-size: 11px;
font-weight: 800;
}
.status-tabs button.active small {
background: rgba(16, 185, 129, 0.12);
color: #059669;
}
.list-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 14px 0 10px;
margin-top: 14px;
}
.filter-set {
display: flex;
gap: 10px;
flex-wrap: wrap;
align-items: center;
gap: 12px;
flex: 1 1 auto;
flex-wrap: wrap;
}
.list-search {
position: relative;
width: 240px;
width: 280px;
max-width: 100%;
}
.list-search .mdi {
@@ -103,23 +130,156 @@
font-size: 13px;
}
.filter-btn,
.create-btn,
.row-action {
min-height: 36px;
border-radius: 8px;
font-size: 13px;
font-weight: 760;
.list-search input::placeholder {
color: #94a3b8;
}
.filter-btn {
.list-search input:focus {
outline: none;
border-color: rgba(16, 185, 129, 0.6);
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}
.picker-trigger,
.ghost-filter-btn,
.create-btn,
.row-action {
min-height: 38px;
border-radius: 8px;
font-size: 14px;
font-weight: 750;
}
.picker-filter {
position: relative;
}
.picker-trigger {
min-width: 132px;
display: inline-flex;
align-items: center;
gap: 6px;
padding: 0 12px;
justify-content: space-between;
gap: 9px;
padding: 0 34px 0 12px;
border: 1px solid #d7e0ea;
border-radius: 8px;
background: #fff;
color: #334155;
white-space: nowrap;
}
.picker-label {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.picker-trigger .mdi {
position: absolute;
right: 12px;
top: 50%;
transform: translateY(-50%);
color: #64748b;
pointer-events: none;
}
.picker-trigger:hover,
.picker-filter.open .picker-trigger {
border-color: rgba(16, 185, 129, 0.34);
background: #f6fffb;
color: #0f9f78;
}
.toolbar-actions {
display: flex;
align-items: center;
gap: 10px;
}
.picker-popover {
position: absolute;
top: calc(100% + 8px);
left: 0;
width: 224px;
z-index: 40;
display: grid;
gap: 14px;
padding: 16px;
border: 1px solid #d7e0ea;
border-radius: 12px;
background: #fff;
box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}
.picker-popover header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.picker-popover header strong {
color: #0f172a;
font-size: 15px;
}
.picker-popover header button {
width: 30px;
height: 30px;
display: grid;
place-items: center;
border: 0;
border-radius: 8px;
background: transparent;
color: #64748b;
}
.picker-popover header button:hover {
background: #f1f5f9;
color: #0f172a;
}
.picker-option-list {
display: grid;
gap: 8px;
max-height: 240px;
overflow-y: auto;
}
.picker-option {
min-height: 36px;
display: inline-flex;
align-items: center;
padding: 0 12px;
border: 1px solid #d7e0ea;
border-radius: 8px;
background: #fff;
color: #334155;
font-size: 13px;
font-weight: 750;
text-align: left;
}
.picker-option:hover {
border-color: rgba(16, 185, 129, 0.28);
background: #f0fdf4;
color: #047857;
}
.picker-option.active {
border-color: #10b981;
background: #10b981;
color: #fff;
}
.ghost-filter-btn {
display: inline-flex;
align-items: center;
gap: 7px;
padding: 0 14px;
border: 1px solid rgba(5, 150, 105, 0.16);
background: #f8fffb;
color: #047857;
}
.create-btn {
@@ -137,22 +297,237 @@
display: inline-flex;
align-items: center;
gap: 6px;
margin: 0 0 12px;
margin-top: 10px;
color: #64748b;
font-size: 13px;
}
.active-filter-strip {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 10px;
}
.active-filter-chip {
min-height: 28px;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0 10px;
border-radius: 999px;
background: #eff6ff;
color: #2563eb;
font-size: 12px;
font-weight: 800;
}
.table-wrap {
flex: 1 1 auto;
min-height: 0;
overflow: auto;
overflow-x: auto;
overflow-y: auto;
margin-top: 10px;
border: 1px solid #edf2f7;
border-radius: 12px;
}
.list-foot {
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
gap: 16px;
margin-top: 24px;
}
.page-summary {
color: #64748b;
font-size: 14px;
font-weight: 650;
}
.pager {
display: inline-flex;
justify-content: center;
gap: 6px;
padding: 4px;
border: 1px solid #e2e8f0;
border-radius: 12px;
background: #f8fafc;
}
.pager button {
width: 32px;
height: 32px;
border: 0;
border-radius: 9px;
background: transparent;
color: #334155;
font-size: 14px;
font-weight: 800;
transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.pager button:hover:not(.active) {
background: #fff;
color: #059669;
box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.pager button.active {
background: #059669;
color: #fff;
box-shadow: 0 8px 16px rgba(5, 150, 105, 0.2);
}
.page-nav {
color: #64748b;
}
.page-size {
min-height: 38px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 9px;
min-width: 112px;
padding: 0 14px;
border: 1px solid #d7e0ea;
border-radius: 10px;
background: #fff;
color: #334155;
font-size: 14px;
font-weight: 750;
white-space: nowrap;
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.page-size:hover {
border-color: rgba(16, 185, 129, 0.32);
color: #0f9f78;
}
.page-size-wrap {
position: relative;
justify-self: end;
}
.page-size-dropdown {
position: absolute;
bottom: calc(100% + 6px);
right: 0;
z-index: 40;
display: grid;
border: 1px solid #d7e0ea;
border-radius: 10px;
background: #fff;
box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
overflow: hidden;
}
.page-size-dropdown button {
height: 36px;
display: grid;
place-items: center;
border: 0;
border-radius: 0;
background: transparent;
color: #334155;
font-size: 13px;
font-weight: 750;
white-space: nowrap;
padding: 0 20px;
transition: background 120ms ease, color 120ms ease;
}
.page-size-dropdown button:hover {
background: #f0fdf4;
color: #059669;
}
.page-size-dropdown button.active {
background: #059669;
color: #fff;
}
.table-state {
min-height: 220px;
display: grid;
place-items: center;
gap: 10px;
padding: 28px 20px;
color: #64748b;
text-align: center;
}
.table-state i {
font-size: 26px;
color: #059669;
}
.table-state.error i {
color: #dc2626;
}
.table-state.empty i {
color: #94a3b8;
}
.table-state p {
max-width: 420px;
font-size: 13px;
line-height: 1.6;
}
.state-action {
min-height: 36px;
padding: 0 14px;
border: 1px solid rgba(5, 150, 105, 0.22);
border-radius: 8px;
background: #ecfdf5;
color: #047857;
font-size: 13px;
font-weight: 760;
}
table {
height: 100%;
width: 100%;
min-width: 1320px;
min-width: 1180px;
border-collapse: collapse;
table-layout: fixed;
}
colgroup col.col-employee {
width: 22%;
}
colgroup col.col-employee-no {
width: 11%;
}
colgroup col.col-department {
width: 12%;
}
colgroup col.col-position {
width: 12%;
}
colgroup col.col-grade {
width: 9%;
}
colgroup col.col-role {
width: 16%;
}
colgroup col.col-status {
width: 8%;
}
colgroup col.col-updated {
width: 10%;
}
th,
@@ -161,15 +536,25 @@ td {
border-bottom: 1px solid #edf2f7;
text-align: center;
vertical-align: middle;
color: #334155;
font-size: 12px;
color: #24324a;
font-size: 14px;
line-height: 1.35;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
th {
background: #f8fafc;
position: sticky;
top: 0;
z-index: 1;
background: #f7fafc;
color: #64748b;
font-size: 13px;
font-weight: 800;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
tbody tr {
@@ -185,6 +570,10 @@ tbody tr.spotlight {
background: linear-gradient(90deg, rgba(16, 185, 129, 0.05), rgba(59, 130, 246, 0.03));
}
tbody tr:last-child td {
border-bottom: 0;
}
.employee-cell {
display: grid;
grid-template-columns: 38px minmax(0, 1fr);
@@ -646,10 +1035,29 @@ tbody tr.spotlight {
overflow-x: auto;
}
.list-foot {
grid-template-columns: 1fr;
justify-items: stretch;
}
.list-search {
width: 100%;
}
.picker-filter,
.picker-trigger {
width: 100%;
}
.picker-popover {
width: min(280px, calc(100vw - 64px));
}
.page-size,
.pager {
justify-self: stretch;
}
.hero-stats,
.form-grid,
.role-grid {