feat: Implement unified Vue SPA with granular service control
Consolidate Reports and Data Entry apps into a single Vue.js SPA with: Architecture: - Module-based structure with lazy-loaded routes (@reports, @data-entry) - Error boundaries per module to prevent cascade failures - Dual API proxy in Vite for microservices (reports:8001, data-entry:8003) - Pinia store factories for shared auth, company, and period stores - Vite path aliases for clear module boundaries (@shared, @reports, @data-entry) Service Management: - Granular service control scripts (backend-reports.sh, backend-data-entry.sh, bot.sh, frontend.sh) - 87% faster frontend restart: 7s vs 53s full restart - 38% faster full startup: 33s vs 53s via parallel backend initialization - Enhanced start-dev.sh with proper service timeouts (OCR: 30s, Vite: 15s, Bot: 10s) - status.sh for comprehensive health checks Features: - Auto-select first company on login with period auto-load - Hamburger menu with feature toggle support - JWT token auto-injection via axios interceptors - Unified header with company/period selectors - IIS web.config for production deployment with multi-API routing UX Improvements: - Vue watchers for reactive company/period loading - Lazy store initialization with graceful error handling - Period persistence per user+company in localStorage - Feature flags for optional modules Deployment: - Single IIS site serves unified frontend with API proxy rules - Maintains separate backend processes for microservices - Windows line ending fixes (.env CRLF → LF conversion) Stats: 112 files changed, 38,342 insertions(+), 2,342 deletions(-) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
167
src/shared/styles/layout/header.css
Normal file
167
src/shared/styles/layout/header.css
Normal file
@@ -0,0 +1,167 @@
|
||||
/* Shared Header Styles - ROA2WEB */
|
||||
|
||||
/* Header Container */
|
||||
.header-container {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: var(--z-header, 100);
|
||||
background: var(--color-bg, #fff);
|
||||
border-bottom: 1px solid var(--color-border, #e5e7eb);
|
||||
height: var(--header-height, 60px);
|
||||
padding: 0 var(--space-lg, 24px);
|
||||
}
|
||||
|
||||
/* Gradient Header Variant */
|
||||
.header-container--gradient {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.header-container--gradient .header-brand {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.header-container--gradient .hamburger-line {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
/* Header Navigation */
|
||||
.header-nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-width: 1600px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Header Left Section */
|
||||
.header-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-md, 16px);
|
||||
}
|
||||
|
||||
/* Brand/Logo */
|
||||
.header-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-sm, 8px);
|
||||
font-size: var(--text-lg, 18px);
|
||||
font-weight: var(--font-semibold, 600);
|
||||
color: var(--color-primary, #2563eb);
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.header-brand:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
/* Header Actions (right side) */
|
||||
.header-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-md, 16px);
|
||||
}
|
||||
|
||||
/* Hamburger Button */
|
||||
.hamburger-btn {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: 4px;
|
||||
z-index: 10;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.hamburger-btn:hover {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.hamburger-line {
|
||||
width: 100%;
|
||||
height: 3px;
|
||||
background-color: var(--color-primary, #2563eb);
|
||||
border-radius: 2px;
|
||||
transition: all 0.3s ease;
|
||||
transform-origin: center;
|
||||
}
|
||||
|
||||
/* Hamburger Animation - X state */
|
||||
.hamburger-btn.active .hamburger-line:nth-child(1) {
|
||||
transform: translateY(9px) rotate(45deg);
|
||||
}
|
||||
|
||||
.hamburger-btn.active .hamburger-line:nth-child(2) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.hamburger-btn.active .hamburger-line:nth-child(3) {
|
||||
transform: translateY(-9px) rotate(-45deg);
|
||||
}
|
||||
|
||||
/* Header User Menu */
|
||||
.header-user {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-sm, 8px);
|
||||
padding: var(--space-sm, 8px);
|
||||
border-radius: var(--radius-md, 6px);
|
||||
cursor: pointer;
|
||||
transition: background-color 0.15s ease;
|
||||
color: var(--color-text, #111827);
|
||||
}
|
||||
|
||||
.header-user:hover {
|
||||
background-color: var(--color-bg-secondary, #f9fafb);
|
||||
}
|
||||
|
||||
/* Gradient header user menu */
|
||||
.header-container--gradient .header-user {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.header-container--gradient .header-user:hover {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
/* Mobile Responsive */
|
||||
@media (max-width: 768px) {
|
||||
.header-container {
|
||||
padding: 0 var(--space-md, 12px);
|
||||
}
|
||||
|
||||
.header-left {
|
||||
gap: var(--space-sm, 8px);
|
||||
}
|
||||
|
||||
.header-actions {
|
||||
gap: var(--space-sm, 8px);
|
||||
}
|
||||
|
||||
.header-brand {
|
||||
font-size: var(--text-base, 16px);
|
||||
}
|
||||
|
||||
/* Hide text-only elements on mobile */
|
||||
.desktop-only {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.header-brand span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.header-brand i {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
151
src/shared/styles/layout/navigation.css
Normal file
151
src/shared/styles/layout/navigation.css
Normal file
@@ -0,0 +1,151 @@
|
||||
/* Shared Navigation Styles - ROA2WEB */
|
||||
|
||||
/* Slide-out Menu */
|
||||
.slide-menu {
|
||||
position: fixed;
|
||||
top: var(--header-height, 60px);
|
||||
left: 0;
|
||||
width: var(--sidebar-width, 280px);
|
||||
height: calc(100vh - var(--header-height, 60px));
|
||||
background: var(--color-bg, #fff);
|
||||
border-right: 1px solid var(--color-border, #e5e7eb);
|
||||
box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
|
||||
transform: translateX(-100%);
|
||||
transition: transform 0.3s ease;
|
||||
z-index: var(--z-modal, 1000);
|
||||
overflow-y: auto;
|
||||
/* Flex container for profile section at bottom */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.slide-menu.open {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
/* Menu Overlay */
|
||||
.slide-menu-overlay {
|
||||
position: fixed;
|
||||
top: var(--header-height, 60px);
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: all 0.3s ease;
|
||||
z-index: var(--z-modal-backdrop, 999);
|
||||
}
|
||||
|
||||
.slide-menu-overlay.open {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
/* Menu Sections */
|
||||
.menu-section {
|
||||
padding: var(--space-lg, 24px);
|
||||
border-bottom: 1px solid var(--color-border, #e5e7eb);
|
||||
}
|
||||
|
||||
.menu-section:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* Profile section at bottom */
|
||||
.menu-section.menu-profile {
|
||||
margin-top: auto;
|
||||
border-top: 1px solid var(--color-border, #e5e7eb);
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.menu-title {
|
||||
font-size: var(--text-sm, 14px);
|
||||
font-weight: var(--font-semibold, 600);
|
||||
color: var(--color-text-secondary, #6b7280);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
margin-bottom: var(--space-md, 12px);
|
||||
}
|
||||
|
||||
.menu-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
margin-bottom: var(--space-xs, 4px);
|
||||
}
|
||||
|
||||
.menu-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-sm, 8px);
|
||||
padding: var(--space-sm, 8px) var(--space-md, 12px);
|
||||
color: var(--color-text, #111827);
|
||||
text-decoration: none;
|
||||
border-radius: var(--radius-md, 6px);
|
||||
transition: all 0.15s ease;
|
||||
font-size: var(--text-sm, 14px);
|
||||
}
|
||||
|
||||
.menu-link:hover,
|
||||
.menu-link.active {
|
||||
background-color: var(--color-bg-secondary, #f9fafb);
|
||||
color: var(--color-primary, #2563eb);
|
||||
}
|
||||
|
||||
.menu-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
flex-shrink: 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* Profile Info */
|
||||
.profile-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-sm, 8px);
|
||||
padding: var(--space-sm, 8px) var(--space-md, 12px);
|
||||
margin-bottom: var(--space-sm, 8px);
|
||||
font-weight: var(--font-medium, 500);
|
||||
color: var(--color-text, #111827);
|
||||
}
|
||||
|
||||
.profile-info i {
|
||||
font-size: 1.25rem;
|
||||
color: var(--color-primary, #2563eb);
|
||||
}
|
||||
|
||||
/* Badge for menu items */
|
||||
.menu-badge {
|
||||
margin-left: auto;
|
||||
background: var(--color-danger, #ef4444);
|
||||
color: white;
|
||||
font-size: var(--text-xs, 12px);
|
||||
font-weight: var(--font-semibold, 600);
|
||||
padding: 2px 6px;
|
||||
border-radius: var(--radius-full, 9999px);
|
||||
min-width: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Mobile Responsive */
|
||||
@media (max-width: 768px) {
|
||||
.slide-menu {
|
||||
width: 280px;
|
||||
}
|
||||
|
||||
.menu-section {
|
||||
padding: var(--space-md, 12px);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.slide-menu {
|
||||
width: 100vw;
|
||||
max-width: 320px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user