mirror of
https://github.com/donpat1to/Schichtenplaner.git
synced 2025-12-01 06:55:45 +01:00
Compare commits
6 Commits
v1.0.0
...
bc73fcebd3
| Author | SHA1 | Date | |
|---|---|---|---|
| bc73fcebd3 | |||
| 82533ae616 | |||
| 840b4384a5 | |||
| 5a8b7e89d7 | |||
| 289c80eea1 | |||
| 1884a16220 |
4
.env.production
Normal file
4
.env.production
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# .env.production example
|
||||||
|
NODE_ENV=production
|
||||||
|
JWT_SECRET=your-super-secure-minimum-32-character-secret-key-here
|
||||||
|
DATABASE_PATH=/app/data/production.db
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -64,6 +64,7 @@ build/
|
|||||||
.env.development.local
|
.env.development.local
|
||||||
.env.test.local
|
.env.test.local
|
||||||
.env.production.local
|
.env.production.local
|
||||||
|
.env.production
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
database/*.db
|
database/*.db
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
"@types/bcrypt": "^6.0.0",
|
"@types/bcrypt": "^6.0.0",
|
||||||
"bcrypt": "^6.0.0",
|
"bcrypt": "^6.0.0",
|
||||||
"bcryptjs": "^2.4.3",
|
"bcryptjs": "^2.4.3",
|
||||||
"cors": "^2.8.5",
|
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"jsonwebtoken": "^9.0.2",
|
"jsonwebtoken": "^9.0.2",
|
||||||
"sqlite3": "^5.1.6",
|
"sqlite3": "^5.1.6",
|
||||||
@@ -24,7 +23,6 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/bcryptjs": "^2.4.2",
|
"@types/bcryptjs": "^2.4.2",
|
||||||
"@types/cors": "^2.8.13",
|
|
||||||
"@types/express": "^4.17.17",
|
"@types/express": "^4.17.17",
|
||||||
"@types/jsonwebtoken": "^9.0.2",
|
"@types/jsonwebtoken": "^9.0.2",
|
||||||
"@types/uuid": "^9.0.2",
|
"@types/uuid": "^9.0.2",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// backend/src/controllers/employeeController.ts
|
// backend/src/controllers/employeeController.ts
|
||||||
import { Request, Response } from 'express';
|
import { Response } from 'express';
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
import bcrypt from 'bcryptjs';
|
import bcrypt from 'bcryptjs';
|
||||||
import { db } from '../services/databaseService.js';
|
import { db } from '../services/databaseService.js';
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// backend/src/controllers/setupController.ts
|
// backend/src/controllers/setupController.ts
|
||||||
import { Request, Response } from 'express';
|
import { Request, Response } from 'express';
|
||||||
import bcrypt from 'bcrypt';
|
import bcrypt from 'bcrypt';
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
|
||||||
import { randomUUID } from 'crypto';
|
import { randomUUID } from 'crypto';
|
||||||
import { db } from '../services/databaseService.js';
|
import { db } from '../services/databaseService.js';
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,9 @@ import { db } from '../services/databaseService.js';
|
|||||||
import {
|
import {
|
||||||
CreateShiftPlanRequest,
|
CreateShiftPlanRequest,
|
||||||
UpdateShiftPlanRequest,
|
UpdateShiftPlanRequest,
|
||||||
ShiftPlan
|
|
||||||
} from '../models/ShiftPlan.js';
|
} from '../models/ShiftPlan.js';
|
||||||
import { AuthRequest } from '../middleware/auth.js';
|
import { AuthRequest } from '../middleware/auth.js';
|
||||||
import { createPlanFromPreset, TEMPLATE_PRESETS } from '../models/defaults/shiftPlanDefaults.js';
|
import { TEMPLATE_PRESETS } from '../models/defaults/shiftPlanDefaults.js';
|
||||||
|
|
||||||
async function getPlanWithDetails(planId: string) {
|
async function getPlanWithDetails(planId: string) {
|
||||||
const plan = await db.get<any>(`
|
const plan = await db.get<any>(`
|
||||||
|
|||||||
@@ -149,3 +149,9 @@ CREATE INDEX IF NOT EXISTS idx_scheduled_shifts_required_employees ON scheduled_
|
|||||||
CREATE INDEX IF NOT EXISTS idx_shift_assignments_employee ON shift_assignments(employee_id);
|
CREATE INDEX IF NOT EXISTS idx_shift_assignments_employee ON shift_assignments(employee_id);
|
||||||
CREATE INDEX IF NOT EXISTS idx_shift_assignments_shift ON shift_assignments(scheduled_shift_id);
|
CREATE INDEX IF NOT EXISTS idx_shift_assignments_shift ON shift_assignments(scheduled_shift_id);
|
||||||
CREATE INDEX IF NOT EXISTS idx_employee_availability_employee_plan ON employee_availability(employee_id, plan_id);
|
CREATE INDEX IF NOT EXISTS idx_employee_availability_employee_plan ON employee_availability(employee_id, plan_id);
|
||||||
|
|
||||||
|
PRAGMA journal_mode = WAL;
|
||||||
|
PRAGMA synchronous = NORMAL;
|
||||||
|
PRAGMA foreign_keys = ON;
|
||||||
|
PRAGMA secure_delete = ON;
|
||||||
|
PRAGMA auto_vacuum = INCREMENTAL;
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
// backend/src/routes/setup.ts
|
// backend/src/routes/setup.ts
|
||||||
import express from 'express';
|
import express from 'express';
|
||||||
import bcrypt from 'bcryptjs';
|
|
||||||
import { checkSetupStatus, setupAdmin } from '../controllers/setupController.js';
|
import { checkSetupStatus, setupAdmin } from '../controllers/setupController.js';
|
||||||
|
|
||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { spawn } from 'child_process';
|
import { spawn } from 'child_process';
|
||||||
import path from 'path';
|
|
||||||
|
|
||||||
export function runPythonScript(scriptPath, args = []) {
|
export function runPythonScript(scriptPath, args = []) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|||||||
@@ -13,9 +13,6 @@ import setupRoutes from './routes/setup.js';
|
|||||||
import scheduledShifts from './routes/scheduledShifts.js';
|
import scheduledShifts from './routes/scheduledShifts.js';
|
||||||
import schedulingRoutes from './routes/scheduling.js';
|
import schedulingRoutes from './routes/scheduling.js';
|
||||||
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
|
||||||
const __dirname = path.dirname(__filename);
|
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
const PORT = 3002;
|
const PORT = 3002;
|
||||||
|
|
||||||
@@ -39,37 +36,18 @@ app.get('/api/health', (req: any, res: any) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// 🆕 FIXED STATIC FILE SERVING
|
// 🆕 STATIC FILE SERVING
|
||||||
// Use absolute path that matches Docker container structure
|
// Use absolute path that matches Docker container structure
|
||||||
const frontendBuildPathEnv = process.env.FRONTEND_BUILD_PATH;
|
|
||||||
console.log('📁 Frontend build path from the env', frontendBuildPathEnv);
|
|
||||||
const frontendBuildPath = path.resolve('/app/frontend-build');
|
const frontendBuildPath = path.resolve('/app/frontend-build');
|
||||||
console.log('📁 Frontend build path:', frontendBuildPath);
|
console.log('📁 Frontend build path:', frontendBuildPath);
|
||||||
console.log('📁 Current __dirname:', __dirname);
|
|
||||||
|
|
||||||
// Check multiple possible locations for frontend build
|
if (frontendBuildPath) {
|
||||||
const possiblePaths = [
|
|
||||||
'/app/frontend-build', // Docker production path
|
|
||||||
path.join(__dirname, '../../frontend-build'), // Relative from dist
|
|
||||||
path.join(process.cwd(), 'frontend-build'), // From current working directory
|
|
||||||
];
|
|
||||||
|
|
||||||
let actualFrontendPath = null;
|
|
||||||
for (const testPath of possiblePaths) {
|
|
||||||
if (fs.existsSync(testPath)) {
|
|
||||||
actualFrontendPath = testPath;
|
|
||||||
console.log('✅ Found frontend build at:', testPath);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (actualFrontendPath) {
|
|
||||||
// Serviere statische Dateien
|
// Serviere statische Dateien
|
||||||
app.use(express.static(actualFrontendPath));
|
app.use(express.static(frontendBuildPath));
|
||||||
|
|
||||||
// List files for debugging
|
// List files for debugging
|
||||||
try {
|
try {
|
||||||
const files = fs.readdirSync(actualFrontendPath);
|
const files = fs.readdirSync(frontendBuildPath);
|
||||||
console.log('📄 Files in frontend-build:', files);
|
console.log('📄 Files in frontend-build:', files);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log('❌ Could not read frontend-build directory:', err);
|
console.log('❌ Could not read frontend-build directory:', err);
|
||||||
@@ -78,16 +56,15 @@ if (actualFrontendPath) {
|
|||||||
console.log('✅ Static file serving configured');
|
console.log('✅ Static file serving configured');
|
||||||
} else {
|
} else {
|
||||||
console.log('❌ Frontend build directory NOT FOUND in any location');
|
console.log('❌ Frontend build directory NOT FOUND in any location');
|
||||||
console.log('❌ Checked paths:', possiblePaths);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Root route
|
// Root route
|
||||||
app.get('/', (req, res) => {
|
app.get('/', (req, res) => {
|
||||||
if (!actualFrontendPath) {
|
if (!frontendBuildPath) {
|
||||||
return res.status(500).send('Frontend build not found');
|
return res.status(500).send('Frontend build not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
const indexPath = path.join(actualFrontendPath, 'index.html');
|
const indexPath = path.join(frontendBuildPath, 'index.html');
|
||||||
console.log('📄 Serving index.html from:', indexPath);
|
console.log('📄 Serving index.html from:', indexPath);
|
||||||
|
|
||||||
if (fs.existsSync(indexPath)) {
|
if (fs.existsSync(indexPath)) {
|
||||||
@@ -105,11 +82,11 @@ app.get('*', (req, res) => {
|
|||||||
return res.status(404).json({ error: 'API endpoint not found' });
|
return res.status(404).json({ error: 'API endpoint not found' });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!actualFrontendPath) {
|
if (!frontendBuildPath) {
|
||||||
return res.status(500).json({ error: 'Frontend application not available' });
|
return res.status(500).json({ error: 'Frontend application not available' });
|
||||||
}
|
}
|
||||||
|
|
||||||
const indexPath = path.join(actualFrontendPath, 'index.html');
|
const indexPath = path.join(frontendBuildPath, 'index.html');
|
||||||
console.log('🔄 Client-side routing for:', req.path, '->', indexPath);
|
console.log('🔄 Client-side routing for:', req.path, '->', indexPath);
|
||||||
|
|
||||||
if (fs.existsSync(indexPath)) {
|
if (fs.existsSync(indexPath)) {
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
import { Worker } from 'worker_threads';
|
import { Worker } from 'worker_threads';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { fileURLToPath } from 'url';
|
import { fileURLToPath } from 'url';
|
||||||
import { Employee, EmployeeAvailability } from '../models/Employee.js';
|
import { ShiftPlan } from '../models/ShiftPlan.js';
|
||||||
import { ShiftPlan, ScheduledShift } from '../models/ShiftPlan.js';
|
|
||||||
import { ScheduleRequest, ScheduleResult, Availability, Constraint } from '../models/scheduling.js';
|
import { ScheduleRequest, ScheduleResult, Availability, Constraint } from '../models/scheduling.js';
|
||||||
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
import { parentPort, workerData } from 'worker_threads';
|
import { parentPort, workerData } from 'worker_threads';
|
||||||
import { CPModel, CPSolver } from './cp-sat-wrapper.js';
|
import { CPModel, CPSolver } from './cp-sat-wrapper.js';
|
||||||
import { ShiftPlan, Shift } from '../models/ShiftPlan.js';
|
import { ShiftPlan, Shift } from '../models/ShiftPlan.js';
|
||||||
import { Employee, EmployeeAvailability } from '../models/Employee.js';
|
import { Employee } from '../models/Employee.js';
|
||||||
import { Availability, Constraint, Violation, SolverOptions, Solution, Assignment } from '../models/scheduling.js';
|
import { Availability, Constraint } from '../models/scheduling.js';
|
||||||
|
|
||||||
interface WorkerData {
|
interface WorkerData {
|
||||||
shiftPlan: ShiftPlan;
|
shiftPlan: ShiftPlan;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// src/App.tsx - UPDATED FOR VITE
|
// src/App.tsx
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
|
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
|
||||||
import { AuthProvider, useAuth } from './contexts/AuthContext';
|
import { AuthProvider, useAuth } from './contexts/AuthContext';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// frontend/src/components/Layout/Footer.tsx - ELEGANT WHITE DESIGN
|
// frontend/src/components/Layout/Footer.tsx
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
const Footer: React.FC = () => {
|
const Footer: React.FC = () => {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// frontend/src/pages/About/About.tsx
|
// frontend/src/components/Layout/FooterLinks/About/About.tsx
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
const About: React.FC = () => {
|
const About: React.FC = () => {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// frontend/src/components/Layout/FooterLinks/CommunityLinks/communityLinks.tsx
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
export const CommunityContact: React.FC = () => (
|
export const CommunityContact: React.FC = () => (
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// frontend/src/pages/FAQ/FAQ.tsx
|
// frontend/src/components/Layout/FooterLinks/FAQ/FAQ.tsx
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
|
|
||||||
const FAQ: React.FC = () => {
|
const FAQ: React.FC = () => {
|
||||||
|
|||||||
@@ -1,220 +0,0 @@
|
|||||||
/* Layout.css - Professionelles Design */
|
|
||||||
.layout {
|
|
||||||
min-height: 100vh;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Header */
|
|
||||||
.header {
|
|
||||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
||||||
color: white;
|
|
||||||
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
z-index: 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-content {
|
|
||||||
max-width: 1200px;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 0 20px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
height: 70px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo h1 {
|
|
||||||
margin: 0;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Desktop Navigation */
|
|
||||||
.desktop-nav {
|
|
||||||
display: flex;
|
|
||||||
gap: 2rem;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-link {
|
|
||||||
color: white;
|
|
||||||
text-decoration: none;
|
|
||||||
padding: 0.5rem 1rem;
|
|
||||||
border-radius: 6px;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-link:hover {
|
|
||||||
background: rgba(255, 255, 255, 0.1);
|
|
||||||
transform: translateY(-1px);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* User Menu */
|
|
||||||
.user-menu {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-info {
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logout-btn {
|
|
||||||
background: rgba(255, 255, 255, 0.1);
|
|
||||||
color: white;
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
||||||
padding: 0.5rem 1rem;
|
|
||||||
border-radius: 6px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logout-btn:hover {
|
|
||||||
background: rgba(255, 255, 255, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Mobile Menu Button */
|
|
||||||
.mobile-menu-btn {
|
|
||||||
display: none;
|
|
||||||
background: none;
|
|
||||||
border: none;
|
|
||||||
color: white;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
cursor: pointer;
|
|
||||||
padding: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Mobile Navigation */
|
|
||||||
.mobile-nav {
|
|
||||||
display: none;
|
|
||||||
flex-direction: column;
|
|
||||||
background: white;
|
|
||||||
padding: 1rem;
|
|
||||||
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.mobile-nav-link {
|
|
||||||
color: #333;
|
|
||||||
text-decoration: none;
|
|
||||||
padding: 1rem;
|
|
||||||
border-bottom: 1px solid #eee;
|
|
||||||
transition: background-color 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mobile-nav-link:hover {
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mobile-user-info {
|
|
||||||
padding: 1rem;
|
|
||||||
border-top: 1px solid #eee;
|
|
||||||
margin-top: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mobile-logout-btn {
|
|
||||||
background: #667eea;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
padding: 0.5rem 1rem;
|
|
||||||
border-radius: 6px;
|
|
||||||
cursor: pointer;
|
|
||||||
margin-top: 0.5rem;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Main Content */
|
|
||||||
.main-content {
|
|
||||||
flex: 1;
|
|
||||||
background-color: #f8f9fa;
|
|
||||||
min-height: calc(100vh - 140px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.content-container {
|
|
||||||
max-width: 1200px;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 2rem 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Footer */
|
|
||||||
.footer {
|
|
||||||
background: #2c3e50;
|
|
||||||
color: white;
|
|
||||||
margin-top: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-content {
|
|
||||||
max-width: 1200px;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 2rem 20px;
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
|
||||||
gap: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-section h3,
|
|
||||||
.footer-section h4 {
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
color: #ecf0f1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-section a {
|
|
||||||
color: #bdc3c7;
|
|
||||||
text-decoration: none;
|
|
||||||
display: block;
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
transition: color 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-section a:hover {
|
|
||||||
color: #3498db;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-bottom {
|
|
||||||
border-top: 1px solid #34495e;
|
|
||||||
padding: 1rem 20px;
|
|
||||||
text-align: center;
|
|
||||||
color: #95a5a6;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Responsive Design */
|
|
||||||
@media (max-width: 768px) {
|
|
||||||
.desktop-nav,
|
|
||||||
.user-menu {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mobile-menu-btn {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mobile-nav {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-content {
|
|
||||||
padding: 0 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content-container {
|
|
||||||
padding: 1rem 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-content {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 480px) {
|
|
||||||
.logo h1 {
|
|
||||||
font-size: 1.2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content-container {
|
|
||||||
padding: 1rem 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// frontend/src/components/Layout/Layout.tsx - ELEGANT WHITE DESIGN
|
// frontend/src/components/Layout/Layout.tsx
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Navigation from './Navigation';
|
import Navigation from './Navigation';
|
||||||
import Footer from './Footer';
|
import Footer from './Footer';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// frontend/src/components/Layout/Navigation.tsx - ELEGANT WHITE DESIGN
|
// frontend/src/components/Layout/Navigation.tsx
|
||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { useAuth } from '../../contexts/AuthContext';
|
import { useAuth } from '../../contexts/AuthContext';
|
||||||
import PillNav from '../PillNav/PillNav';
|
import PillNav from '../PillNav/PillNav';
|
||||||
|
|||||||
@@ -1,88 +0,0 @@
|
|||||||
/* frontend/src/components/PillNav/PillNav.module.css */
|
|
||||||
.pillNavContainer {
|
|
||||||
display: flex;
|
|
||||||
gap: 8px;
|
|
||||||
overflow-x: auto;
|
|
||||||
padding: 4px;
|
|
||||||
scrollbar-width: none;
|
|
||||||
-ms-overflow-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pillNavContainer::-webkit-scrollbar {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pill {
|
|
||||||
padding: 8px 16px;
|
|
||||||
border-radius: 9999px;
|
|
||||||
border: 1px solid;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 500;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.2s ease-in-out;
|
|
||||||
white-space: nowrap;
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pill:focus-visible {
|
|
||||||
outline: 2px solid #3b82f6;
|
|
||||||
outline-offset: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Solid Variant */
|
|
||||||
.pillSolid {
|
|
||||||
background-color: transparent;
|
|
||||||
color: #6b7280;
|
|
||||||
border-color: #d1d5db;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pillSolidActive {
|
|
||||||
background-color: #2563eb;
|
|
||||||
color: white;
|
|
||||||
border-color: #2563eb;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pillSolid:hover:not(.pillSolidActive) {
|
|
||||||
background-color: #f3f4f6;
|
|
||||||
color: #374151;
|
|
||||||
border-color: #9ca3af;
|
|
||||||
transform: translateY(-1px);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Outline Variant */
|
|
||||||
.pillOutline {
|
|
||||||
background-color: transparent;
|
|
||||||
color: #6b7280;
|
|
||||||
border-color: #d1d5db;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pillOutlineActive {
|
|
||||||
color: #2563eb;
|
|
||||||
border-color: #2563eb;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pillOutline:hover:not(.pillOutlineActive) {
|
|
||||||
background-color: #f3f4f6;
|
|
||||||
color: #374151;
|
|
||||||
border-color: #9ca3af;
|
|
||||||
transform: translateY(-1px);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Ghost Variant */
|
|
||||||
.pillGhost {
|
|
||||||
background-color: transparent;
|
|
||||||
color: #6b7280;
|
|
||||||
border-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pillGhostActive {
|
|
||||||
background-color: #f3f4f6;
|
|
||||||
color: #111827;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pillGhost:hover:not(.pillGhostActive) {
|
|
||||||
background-color: #f9fafb;
|
|
||||||
color: #374151;
|
|
||||||
transform: translateY(-1px);
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// frontend/src/components/PillNav/PillNav.tsx - ELEGANT WHITE DESIGN
|
// frontend/src/components/PillNav/PillNav.tsx
|
||||||
import React, { useEffect, useRef } from 'react';
|
import React, { useEffect, useRef } from 'react';
|
||||||
|
|
||||||
export interface PillNavItem {
|
export interface PillNavItem {
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
// frontend/src/components/PillNav/index.ts
|
|
||||||
export { default } from './PillNav';
|
|
||||||
export type { PillNavProps, PillNavItem } from './PillNav';
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// frontend/src/design/DesignSystem.tsx
|
// frontend/src/design/DesignSystem.txt
|
||||||
export const designTokens = {
|
export const designTokens = {
|
||||||
colors: {
|
colors: {
|
||||||
// Primary Colors
|
// Primary Colors
|
||||||
@@ -333,7 +333,7 @@ const Setup: React.FC = () => {
|
|||||||
disabled={loading}
|
disabled={loading}
|
||||||
style={{
|
style={{
|
||||||
padding: '0.75rem 2rem',
|
padding: '0.75rem 2rem',
|
||||||
backgroundColor: loading ? '#6c757d' : '#007bff',
|
backgroundColor: loading ? '#6c757d' : '#51258f',
|
||||||
color: 'white',
|
color: 'white',
|
||||||
border: 'none',
|
border: 'none',
|
||||||
borderRadius: '6px',
|
borderRadius: '6px',
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// frontend/src/services/shiftPlanService.ts
|
// frontend/src/services/shiftPlanService.ts
|
||||||
import { authService } from './authService';
|
import { authService } from './authService';
|
||||||
import { ShiftPlan, CreateShiftPlanRequest, ScheduledShift, CreateShiftFromTemplateRequest } from '../models/ShiftPlan';
|
import { ShiftPlan, CreateShiftPlanRequest } from '../models/ShiftPlan';
|
||||||
import { TEMPLATE_PRESETS } from '../models/defaults/shiftPlanDefaults';
|
import { TEMPLATE_PRESETS } from '../models/defaults/shiftPlanDefaults';
|
||||||
|
|
||||||
const API_BASE_URL = '/api/shift-plans';
|
const API_BASE_URL = '/api/shift-plans';
|
||||||
|
|||||||
3856
package-lock.json
generated
3856
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user