mirror of
https://github.com/donpat1to/Schichtenplaner.git
synced 2025-12-01 15:05:45 +01:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8f96368f5a | |||
| 636b892ece | |||
| 8be6a7b474 | |||
| a2b2b76665 | |||
| 6d00ab695c | |||
| 2608acc2d9 | |||
| 4dacf94077 | |||
| 5e7c5aabfb | |||
| 05fa87c638 | |||
| 875db3aeb7 | |||
| 809a838e27 | |||
| 8d020a0dac |
7
.gitignore
vendored
7
.gitignore
vendored
@@ -109,4 +109,9 @@ Thumbs.db
|
|||||||
.npm
|
.npm
|
||||||
|
|
||||||
# Optional eslint cache
|
# Optional eslint cache
|
||||||
.eslintcache
|
.eslintcache
|
||||||
|
|
||||||
|
# Ignore contents of premium folder in public repo
|
||||||
|
premium/*
|
||||||
|
!premium/README-PREMIUM.md
|
||||||
|
!premium/.gitkeep
|
||||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "premium"]
|
||||||
|
path = premium
|
||||||
|
url = https://github.com/donpat1to/Schichtenplaner-Pro.git
|
||||||
42
Dockerfile
42
Dockerfile
@@ -1,7 +1,7 @@
|
|||||||
# Multi-stage build for combined frontend + backend
|
# Multi-stage build for combined frontend + backend
|
||||||
FROM node:20-bullseye AS backend-builder
|
FROM node:20-bullseye AS backend-builder
|
||||||
|
|
||||||
WORKDIR /app/backend
|
WORKDIR /app
|
||||||
|
|
||||||
# Install Python + OR-Tools
|
# Install Python + OR-Tools
|
||||||
RUN apt-get update && apt-get install -y python3 python3-pip build-essential \
|
RUN apt-get update && apt-get install -y python3 python3-pip build-essential \
|
||||||
@@ -10,21 +10,22 @@ RUN apt-get update && apt-get install -y python3 python3-pip build-essential \
|
|||||||
# Create symlink so python3 is callable as python
|
# Create symlink so python3 is callable as python
|
||||||
RUN ln -sf /usr/bin/python3 /usr/bin/python
|
RUN ln -sf /usr/bin/python3 /usr/bin/python
|
||||||
|
|
||||||
# Copy backend files
|
# Copy ALL package files (root + backend)
|
||||||
COPY backend/package*.json ./
|
COPY package*.json ./
|
||||||
COPY backend/tsconfig.json ./
|
COPY backend/package.json ./backend/
|
||||||
|
|
||||||
# Install backend dependencies
|
# Install dependencies using workspaces
|
||||||
RUN npm ci
|
RUN npm ci --workspace=backend
|
||||||
|
|
||||||
# Copy backend source
|
# Copy backend source
|
||||||
COPY backend/src/ ./src/
|
COPY backend/src/ ./backend/src/
|
||||||
|
COPY backend/tsconfig.json ./backend/
|
||||||
|
|
||||||
# Build backend
|
# Build backend
|
||||||
RUN npm run build
|
RUN npm run build --workspace=backend
|
||||||
|
|
||||||
# Copy database files manually
|
# Copy database files manually
|
||||||
RUN cp -r src/database/ dist/database/
|
RUN cp -r backend/src/database/ backend/dist/database/
|
||||||
|
|
||||||
# Verify Python and OR-Tools installation
|
# Verify Python and OR-Tools installation
|
||||||
RUN python -c "from ortools.sat.python import cp_model; print('OR-Tools installed successfully')"
|
RUN python -c "from ortools.sat.python import cp_model; print('OR-Tools installed successfully')"
|
||||||
@@ -32,21 +33,22 @@ RUN python -c "from ortools.sat.python import cp_model; print('OR-Tools installe
|
|||||||
# Frontend build stage
|
# Frontend build stage
|
||||||
FROM node:20-bullseye AS frontend-builder
|
FROM node:20-bullseye AS frontend-builder
|
||||||
|
|
||||||
WORKDIR /app/frontend
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy frontend files
|
# Copy ALL package files (root + frontend)
|
||||||
COPY frontend/package*.json ./
|
COPY package*.json ./
|
||||||
COPY frontend/tsconfig.json ./
|
COPY frontend/package.json ./frontend/
|
||||||
|
|
||||||
# Install frontend dependencies
|
# Install dependencies using workspaces
|
||||||
RUN npm ci
|
RUN npm ci --workspace=frontend
|
||||||
|
|
||||||
# Copy frontend source
|
# Copy frontend source
|
||||||
COPY frontend/src/ ./src/
|
COPY frontend/src/ ./frontend/src/
|
||||||
COPY frontend/public/ ./public/
|
COPY frontend/public/ ./frontend/public/
|
||||||
|
COPY frontend/tsconfig.json ./frontend/
|
||||||
|
|
||||||
# Build frontend
|
# Build frontend
|
||||||
RUN npm run build
|
RUN npm run build --workspace=frontend
|
||||||
|
|
||||||
# Production stage
|
# Production stage
|
||||||
FROM node:20-bookworm
|
FROM node:20-bookworm
|
||||||
@@ -60,9 +62,9 @@ RUN npm install -g pm2
|
|||||||
RUN mkdir -p /app/data
|
RUN mkdir -p /app/data
|
||||||
|
|
||||||
# Copy backend built files
|
# Copy backend built files
|
||||||
COPY --from=backend-builder /app/backend/package*.json ./
|
|
||||||
COPY --from=backend-builder /app/backend/dist/ ./dist/
|
COPY --from=backend-builder /app/backend/dist/ ./dist/
|
||||||
COPY --from=backend-builder /app/backend/node_modules/ ./node_modules/
|
COPY --from=backend-builder /app/node_modules/ ./node_modules/
|
||||||
|
COPY --from=backend-builder /app/backend/package.json ./
|
||||||
|
|
||||||
# Copy frontend built files
|
# Copy frontend built files
|
||||||
COPY --from=frontend-builder /app/frontend/build/ ./frontend-build/
|
COPY --from=frontend-builder /app/frontend/build/ ./frontend-build/
|
||||||
|
|||||||
@@ -33,4 +33,4 @@
|
|||||||
"typescript": "^5.0.0",
|
"typescript": "^5.0.0",
|
||||||
"tsx": "^4.0.0"
|
"tsx": "^4.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,19 +1,22 @@
|
|||||||
// backend/tsconfig.json
|
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
"module": "NodeNext",
|
"module": "NodeNext",
|
||||||
"moduleResolution": "NodeNext",
|
"moduleResolution": "NodeNext",
|
||||||
"allowSyntheticDefaultImports": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"allowJs": true,
|
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"resolveJsonModule": true
|
"resolveJsonModule": true,
|
||||||
|
"allowSyntheticDefaultImports": true
|
||||||
},
|
},
|
||||||
"include": ["src/**/*"],
|
"include": [
|
||||||
"exclude": ["node_modules", "dist"]
|
"src/**/*"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"node_modules",
|
||||||
|
"dist"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
# frontend/.env.development
|
|
||||||
BROWSER=none
|
|
||||||
FAST_REFRESH=true
|
|
||||||
DANGEROUSLY_DISABLE_HOST_CHECK=true
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "frontend",
|
"name": "frontend",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"proxy": "http://localhost:3002",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@testing-library/dom": "^10.4.1",
|
"@testing-library/dom": "^10.4.1",
|
||||||
"@testing-library/jest-dom": "^6.9.1",
|
"@testing-library/jest-dom": "^6.9.1",
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
"react": "^19.2.0",
|
"react": "^19.2.0",
|
||||||
"react-dom": "^19.2.0",
|
"react-dom": "^19.2.0",
|
||||||
"react-router-dom": "^7.9.3",
|
"react-router-dom": "^7.9.3",
|
||||||
|
"react-scripts": "5.0.1",
|
||||||
"typescript": "^4.9.5",
|
"typescript": "^4.9.5",
|
||||||
"web-vitals": "^2.1.4"
|
"web-vitals": "^2.1.4"
|
||||||
},
|
},
|
||||||
@@ -42,9 +43,5 @@
|
|||||||
"last 1 firefox version",
|
"last 1 firefox version",
|
||||||
"last 1 safari version"
|
"last 1 safari version"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"http-proxy-middleware": "^3.0.5",
|
|
||||||
"react-scripts": "^5.0.1"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"short_name": "React App",
|
"short_name": "SP",
|
||||||
"name": "Create React App Sample",
|
"name": "schichtenplaner",
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "favicon.ico",
|
"src": "favicon.ico",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// frontend/src/App.tsx - KORRIGIERT MIT LAYOUT
|
// frontend/src/App.tsx - ONE-REPO SAFE WITHOUT DYNAMIC IMPORTS
|
||||||
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';
|
||||||
@@ -16,6 +16,38 @@ import Settings from './pages/Settings/Settings';
|
|||||||
import Help from './pages/Help/Help';
|
import Help from './pages/Help/Help';
|
||||||
import Setup from './pages/Setup/Setup';
|
import Setup from './pages/Setup/Setup';
|
||||||
|
|
||||||
|
// Free Footer Link Pages (always available)
|
||||||
|
import FAQ from './components/Layout/FooterLinks/FAQ/FAQ';
|
||||||
|
import About from './components/Layout/FooterLinks/About/About';
|
||||||
|
import Features from './components/Layout/FooterLinks/Features/Features';
|
||||||
|
import { CommunityContact, CommunityLegalPage } from './components/Layout/FooterLinks/CommunityLinks/communityLinks';
|
||||||
|
|
||||||
|
// Feature flag from environment
|
||||||
|
const ENABLE_PRO = process.env.ENABLE_PRO === 'true';
|
||||||
|
|
||||||
|
// Conditional Premium Components
|
||||||
|
let PremiumContact: React.FC = CommunityContact;
|
||||||
|
let PremiumPrivacy: React.FC = () => <CommunityLegalPage title="Datenschutz" />;
|
||||||
|
let PremiumImprint: React.FC = () => <CommunityLegalPage title="Impressum" />;
|
||||||
|
let PremiumTerms: React.FC = () => <CommunityLegalPage title="AGB" />;
|
||||||
|
|
||||||
|
// Load premium components only when ENABLE_PRO is true
|
||||||
|
if (ENABLE_PRO) {
|
||||||
|
try {
|
||||||
|
// Use require with type assertions to avoid dynamic import issues
|
||||||
|
const premiumModule = require('@premium-frontend/components/FooterLinks');
|
||||||
|
|
||||||
|
if (premiumModule.Contact) PremiumContact = premiumModule.Contact;
|
||||||
|
if (premiumModule.Privacy) PremiumPrivacy = premiumModule.Privacy;
|
||||||
|
if (premiumModule.Imprint) PremiumImprint = premiumModule.Imprint;
|
||||||
|
if (premiumModule.Terms) PremiumTerms = premiumModule.Terms;
|
||||||
|
|
||||||
|
console.log('✅ Premium components loaded successfully');
|
||||||
|
} catch (error) {
|
||||||
|
console.warn('⚠️ Premium components not available, using community fallbacks:', error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Protected Route Component
|
// Protected Route Component
|
||||||
const ProtectedRoute: React.FC<{ children: React.ReactNode; roles?: string[] }> = ({
|
const ProtectedRoute: React.FC<{ children: React.ReactNode; roles?: string[] }> = ({
|
||||||
children,
|
children,
|
||||||
@@ -49,11 +81,27 @@ const ProtectedRoute: React.FC<{ children: React.ReactNode; roles?: string[] }>
|
|||||||
return <Layout>{children}</Layout>;
|
return <Layout>{children}</Layout>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Public Route Component (without Layout for footer pages)
|
||||||
|
const PublicRoute: React.FC<{ children: React.ReactNode }> = ({ children }) => {
|
||||||
|
const { user, loading } = useAuth();
|
||||||
|
|
||||||
|
if (loading) {
|
||||||
|
return (
|
||||||
|
<div style={{ textAlign: 'center', padding: '40px' }}>
|
||||||
|
<div>⏳ Lade Anwendung...</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return user ? <Layout>{children}</Layout> : <>{children}</>;
|
||||||
|
};
|
||||||
|
|
||||||
// Main App Content
|
// Main App Content
|
||||||
const AppContent: React.FC = () => {
|
const AppContent: React.FC = () => {
|
||||||
const { loading, needsSetup, user } = useAuth();
|
const { loading, needsSetup, user } = useAuth();
|
||||||
|
|
||||||
console.log('🏠 AppContent rendering - loading:', loading, 'needsSetup:', needsSetup, 'user:', user);
|
console.log('🏠 AppContent rendering - loading:', loading, 'needsSetup:', needsSetup, 'user:', user);
|
||||||
|
console.log('🎯 Premium features enabled:', ENABLE_PRO);
|
||||||
|
|
||||||
// Während des Ladens
|
// Während des Ladens
|
||||||
if (loading) {
|
if (loading) {
|
||||||
@@ -80,52 +128,32 @@ const AppContent: React.FC = () => {
|
|||||||
console.log('✅ Showing protected routes for user:', user.email);
|
console.log('✅ Showing protected routes for user:', user.email);
|
||||||
return (
|
return (
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="/" element={
|
{/* Protected Routes (require login) */}
|
||||||
<ProtectedRoute>
|
<Route path="/" element={<ProtectedRoute><Dashboard /></ProtectedRoute>} />
|
||||||
<Dashboard />
|
<Route path="/shift-plans" element={<ProtectedRoute><ShiftPlanList /></ProtectedRoute>} />
|
||||||
</ProtectedRoute>
|
<Route path="/shift-plans/new" element={<ProtectedRoute roles={['admin', 'maintenance']}><ShiftPlanCreate /></ProtectedRoute>} />
|
||||||
} />
|
<Route path="/shift-plans/:id/edit" element={<ProtectedRoute roles={['admin', 'maintenance']}><ShiftPlanEdit /></ProtectedRoute>} />
|
||||||
<Route path="/shift-plans" element={
|
<Route path="/shift-plans/:id" element={<ProtectedRoute><ShiftPlanView /></ProtectedRoute>} />
|
||||||
<ProtectedRoute>
|
<Route path="/employees" element={<ProtectedRoute roles={['admin', 'maintenance']}><EmployeeManagement /></ProtectedRoute>} />
|
||||||
<ShiftPlanList />
|
<Route path="/settings" element={<ProtectedRoute><Settings /></ProtectedRoute>} />
|
||||||
</ProtectedRoute>
|
<Route path="/help" element={<ProtectedRoute><Help /></ProtectedRoute>} />
|
||||||
} />
|
|
||||||
<Route path="/shift-plans/new" element={
|
{/* Public Footer Link Pages (always available) */}
|
||||||
<ProtectedRoute roles={['admin', 'maintenance']}>
|
<Route path="/faq" element={<PublicRoute><FAQ /></PublicRoute>} />
|
||||||
<ShiftPlanCreate />
|
<Route path="/about" element={<PublicRoute><About /></PublicRoute>} />
|
||||||
</ProtectedRoute>
|
<Route path="/features" element={<PublicRoute><Features /></PublicRoute>} />
|
||||||
} />
|
|
||||||
<Route path="/shift-plans/:id/edit" element={
|
{/* PREMIUM Footer Link Pages (conditionally available) */}
|
||||||
<ProtectedRoute roles={['admin', 'maintenance']}>
|
<Route path="/contact" element={<PublicRoute><PremiumContact /></PublicRoute>} />
|
||||||
<ShiftPlanEdit />
|
<Route path="/privacy" element={<PublicRoute><PremiumPrivacy /></PublicRoute>} />
|
||||||
</ProtectedRoute>
|
<Route path="/imprint" element={<PublicRoute><PremiumImprint /></PublicRoute>} />
|
||||||
} />
|
<Route path="/terms" element={<PublicRoute><PremiumTerms /></PublicRoute>} />
|
||||||
<Route path="/shift-plans/:id" element={
|
|
||||||
<ProtectedRoute>
|
{/* Auth Routes */}
|
||||||
<ShiftPlanView />
|
|
||||||
</ProtectedRoute>
|
|
||||||
} />
|
|
||||||
<Route path="/employees" element={
|
|
||||||
<ProtectedRoute roles={['admin', 'maintenance']}>
|
|
||||||
<EmployeeManagement />
|
|
||||||
</ProtectedRoute>
|
|
||||||
} />
|
|
||||||
<Route path="/settings" element={
|
|
||||||
<ProtectedRoute>
|
|
||||||
<Settings />
|
|
||||||
</ProtectedRoute>
|
|
||||||
} />
|
|
||||||
<Route path="/help" element={
|
|
||||||
<ProtectedRoute>
|
|
||||||
<Help />
|
|
||||||
</ProtectedRoute>
|
|
||||||
} />
|
|
||||||
<Route path="/login" element={<Login />} />
|
<Route path="/login" element={<Login />} />
|
||||||
<Route path="*" element={
|
|
||||||
<ProtectedRoute>
|
{/* Catch-all Route */}
|
||||||
<Dashboard />
|
<Route path="*" element={<ProtectedRoute><Dashboard /></ProtectedRoute>} />
|
||||||
</ProtectedRoute>
|
|
||||||
} />
|
|
||||||
</Routes>
|
</Routes>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -182,20 +182,6 @@ const Footer: React.FC = () => {
|
|||||||
>
|
>
|
||||||
Funktionen
|
Funktionen
|
||||||
</a>
|
</a>
|
||||||
<a
|
|
||||||
href="/pricing"
|
|
||||||
style={styles.footerLink}
|
|
||||||
onMouseEnter={(e) => {
|
|
||||||
e.currentTarget.style.color = '#FBFAF6';
|
|
||||||
e.currentTarget.style.transform = 'translateX(4px)';
|
|
||||||
}}
|
|
||||||
onMouseLeave={(e) => {
|
|
||||||
e.currentTarget.style.color = 'rgba(251, 250, 246, 0.7)';
|
|
||||||
e.currentTarget.style.transform = 'translateX(0)';
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Preise
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
76
frontend/src/components/Layout/FooterLinks/About/About.tsx
Normal file
76
frontend/src/components/Layout/FooterLinks/About/About.tsx
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
// frontend/src/pages/About/About.tsx
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
const About: React.FC = () => {
|
||||||
|
return (
|
||||||
|
<div style={{ padding: '40px 20px', maxWidth: '800px', margin: '0 auto' }}>
|
||||||
|
<h1>👨💻 Über uns</h1>
|
||||||
|
|
||||||
|
<div style={{
|
||||||
|
backgroundColor: 'white',
|
||||||
|
borderRadius: '12px',
|
||||||
|
padding: '30px',
|
||||||
|
marginTop: '20px',
|
||||||
|
boxShadow: '0 4px 6px rgba(0,0,0,0.1)',
|
||||||
|
border: '1px solid #e0e0e0',
|
||||||
|
lineHeight: 1.6
|
||||||
|
}}>
|
||||||
|
<h2 style={{ color: '#2c3e50' }}>Unser Team</h2>
|
||||||
|
|
||||||
|
<div style={{ display: 'flex', alignItems: 'center', marginTop: '20px', padding: '20px', backgroundColor: '#f8f9fa', borderRadius: '8px' }}>
|
||||||
|
<div style={{ marginRight: '20px' }}>
|
||||||
|
<div style={{
|
||||||
|
width: '80px',
|
||||||
|
height: '80px',
|
||||||
|
backgroundColor: '#3498db',
|
||||||
|
borderRadius: '50%',
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
color: 'white',
|
||||||
|
fontSize: '2rem',
|
||||||
|
fontWeight: 'bold'
|
||||||
|
}}>
|
||||||
|
P
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h3 style={{ color: '#2c3e50', margin: '0 0 5px 0' }}>Patrick</h3>
|
||||||
|
<p style={{ color: '#6c757d', margin: '0 0 10px 0' }}>
|
||||||
|
Full-Stack Developer & Projektleiter
|
||||||
|
</p>
|
||||||
|
<p style={{ margin: 0, fontSize: '0.9rem' }}>
|
||||||
|
GitHub: <a href="https://github.com/donpat1to" style={{ color: '#3498db' }}>donpat1to</a><br/>
|
||||||
|
E-Mail: <a href="mailto:dev.patrick@inca-vikingo.de" style={{ color: '#3498db' }}>dev.patrick@inca-vikingo.de</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3 style={{ color: '#3498db', marginTop: '30px' }}>🚀 Unsere Mission</h3>
|
||||||
|
<p>
|
||||||
|
Wir entwickeln intelligente Lösungen für die Personalplanung,
|
||||||
|
die Zeit sparen und faire Schichtverteilung gewährleisten.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3 style={{ color: '#3498db', marginTop: '25px' }}>💻 Technologie</h3>
|
||||||
|
<p>
|
||||||
|
Unser Stack umfasst moderne Technologien:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>Frontend: React, TypeScript</li>
|
||||||
|
<li>Backend: Node.js, Express</li>
|
||||||
|
<li>Optimierung: Google OR-Tools CP-SAT</li>
|
||||||
|
<li>Datenbank: SQLite/PostgreSQL</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3 style={{ color: '#3498db', marginTop: '25px' }}>📈 Entwicklung</h3>
|
||||||
|
<p>
|
||||||
|
Schichtenplaner wird kontinuierlich weiterentwickelt und
|
||||||
|
basiert auf Feedback unserer Nutzer.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default About;
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
export const CommunityContact: React.FC = () => (
|
||||||
|
<div style={{ padding: '40px 20px', maxWidth: '800px', margin: '0 auto' }}>
|
||||||
|
<h1>📞 Kontakt</h1>
|
||||||
|
<div style={{ backgroundColor: 'white', borderRadius: '12px', padding: '30px', marginTop: '20px' }}>
|
||||||
|
<h2 style={{ color: '#2c3e50' }}>Community Edition</h2>
|
||||||
|
<p>Kontaktfunktionen sind in der Premium Edition verfügbar.</p>
|
||||||
|
<p>
|
||||||
|
<a href="/features" style={{ color: '#3498db' }}>
|
||||||
|
➡️ Zu den Features
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
|
export const CommunityLegalPage: React.FC<{ title: string }> = ({ title }) => (
|
||||||
|
<div style={{ padding: '40px 20px', maxWidth: '800px', margin: '0 auto' }}>
|
||||||
|
<h1>📄 {title}</h1>
|
||||||
|
<div style={{ backgroundColor: 'white', borderRadius: '12px', padding: '30px', marginTop: '20px' }}>
|
||||||
|
<h2 style={{ color: '#2c3e50' }}>Community Edition</h2>
|
||||||
|
<p>Rechtliche Dokumentation ist in der Premium Edition verfügbar.</p>
|
||||||
|
<p>
|
||||||
|
<a href="/features" style={{ color: '#3498db' }}>
|
||||||
|
➡️ Erfahren Sie mehr über Premium
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
|
// Optional: Barrel export für einfachere Imports
|
||||||
|
export default {
|
||||||
|
CommunityContact,
|
||||||
|
CommunityLegalPage
|
||||||
|
};
|
||||||
103
frontend/src/components/Layout/FooterLinks/FAQ/FAQ.tsx
Normal file
103
frontend/src/components/Layout/FooterLinks/FAQ/FAQ.tsx
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
// frontend/src/pages/FAQ/FAQ.tsx
|
||||||
|
import React, { useState } from 'react';
|
||||||
|
|
||||||
|
const FAQ: React.FC = () => {
|
||||||
|
const [openItems, setOpenItems] = useState<number[]>([]);
|
||||||
|
|
||||||
|
const toggleItem = (index: number) => {
|
||||||
|
setOpenItems(prev =>
|
||||||
|
prev.includes(index)
|
||||||
|
? prev.filter(i => i !== index)
|
||||||
|
: [...prev, index]
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const faqItems = [
|
||||||
|
{
|
||||||
|
question: "Wie funktioniert der Scheduling-Algorithmus?",
|
||||||
|
answer: "Unser System verwendet Google's OR-Tools CP-SAT Solver, um optimale Schichtzuweisungen basierend auf Verfügbarkeiten, Vertragstypen und Geschäftsregeln zu berechnen."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question: "Was bedeuten die Verfügbarkeits-Level 1, 2 und 3?",
|
||||||
|
answer: "Level 1: Bevorzugt (Mitarbeiter möchte diese Schicht), Level 2: Verfügbar (kann arbeiten), Level 3: Nicht verfügbar (kann nicht arbeiten)."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question: "Wie werden Vertragstypen berücksichtigt?",
|
||||||
|
answer: "Kleine Verträge: 1 Schicht pro Woche, Große Verträge: 2 Schichten pro Woche. Das System weist genau diese Anzahl zu."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question: "Kann ich manuelle Anpassungen vornehmen?",
|
||||||
|
answer: "Ja, nach dem automatischen Scheduling können Sie Zuordnungen manuell anpassen und optimieren."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question: "Was passiert bei unterbesetzten Schichten?",
|
||||||
|
answer: "Das System zeigt eine Warnung an und versucht, alternative Lösungen zu finden. In kritischen Fällen müssen manuelle Anpassungen vorgenommen werden."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question: "Wie lange dauert die Planungserstellung?",
|
||||||
|
answer: "Typischerweise 30-105 Sekunden, abhängig von der Anzahl der Mitarbeiter und Schichten."
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div style={{ padding: '40px 20px', maxWidth: '800px', margin: '0 auto' }}>
|
||||||
|
<h1>❓ Häufige Fragen (FAQ)</h1>
|
||||||
|
|
||||||
|
<div style={{
|
||||||
|
backgroundColor: 'white',
|
||||||
|
borderRadius: '12px',
|
||||||
|
marginTop: '20px',
|
||||||
|
boxShadow: '0 4px 6px rgba(0,0,0,0.1)',
|
||||||
|
border: '1px solid #e0e0e0'
|
||||||
|
}}>
|
||||||
|
{faqItems.map((item, index) => (
|
||||||
|
<div key={index} style={{
|
||||||
|
borderBottom: index < faqItems.length - 1 ? '1px solid #e0e0e0' : 'none',
|
||||||
|
padding: '20px 30px'
|
||||||
|
}}>
|
||||||
|
<div
|
||||||
|
onClick={() => toggleItem(index)}
|
||||||
|
style={{
|
||||||
|
cursor: 'pointer',
|
||||||
|
display: 'flex',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
alignItems: 'center'
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<h3 style={{
|
||||||
|
color: '#2c3e50',
|
||||||
|
margin: 0,
|
||||||
|
fontSize: '1.1rem'
|
||||||
|
}}>
|
||||||
|
{item.question}
|
||||||
|
</h3>
|
||||||
|
<span style={{
|
||||||
|
fontSize: '1.5rem',
|
||||||
|
color: '#3498db',
|
||||||
|
transform: openItems.includes(index) ? 'rotate(45deg)' : 'rotate(0)',
|
||||||
|
transition: 'transform 0.2s ease'
|
||||||
|
}}>
|
||||||
|
+
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{openItems.includes(index) && (
|
||||||
|
<div style={{
|
||||||
|
marginTop: '15px',
|
||||||
|
padding: '15px',
|
||||||
|
backgroundColor: '#f8f9fa',
|
||||||
|
borderRadius: '8px',
|
||||||
|
color: '#6c757d',
|
||||||
|
lineHeight: 1.6
|
||||||
|
}}>
|
||||||
|
{item.answer}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default FAQ;
|
||||||
111
frontend/src/components/Layout/FooterLinks/Features/Features.tsx
Normal file
111
frontend/src/components/Layout/FooterLinks/Features/Features.tsx
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
// frontend/src/pages/Features/Features.tsx
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
const Features: React.FC = () => {
|
||||||
|
const features = [
|
||||||
|
{
|
||||||
|
icon: "🤖",
|
||||||
|
title: "Automatisches Scheduling",
|
||||||
|
description: "Intelligenter Algorithmus erstellt optimale Schichtpläne basierend auf Verfügbarkeiten und Regeln"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "⚡",
|
||||||
|
title: "Schnelle Berechnung",
|
||||||
|
description: "Google OR-Tools CP-SAT Solver findet Lösungen in 30-105 Sekunden"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "👥",
|
||||||
|
title: "Flexible Regelkonfiguration",
|
||||||
|
description: "Anpassbare Geschäftsregeln für Trainee-Betreuung, Alleinarbeit, Vertragstypen"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "📊",
|
||||||
|
title: "Echtzeit-Validierung",
|
||||||
|
description: "Automatische Erkennung von Regelverletzungen und Konflikten"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "🔒",
|
||||||
|
title: "Lokale Datenspeicherung",
|
||||||
|
description: "Alle Daten bleiben in Ihrer Infrastruktur - volle Kontrolle und Datenschutz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "🎯",
|
||||||
|
title: "Präferenz-basiert",
|
||||||
|
description: "Berücksichtigt Mitarbeiterwünsche für höhere Zufriedenheit"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div style={{ padding: '40px 20px', maxWidth: '1000px', margin: '0 auto' }}>
|
||||||
|
<h1>✨ Funktionen</h1>
|
||||||
|
|
||||||
|
<div style={{
|
||||||
|
backgroundColor: 'white',
|
||||||
|
borderRadius: '12px',
|
||||||
|
padding: '30px',
|
||||||
|
marginTop: '20px',
|
||||||
|
boxShadow: '0 4px 6px rgba(0,0,0,0.1)',
|
||||||
|
border: '1px solid #e0e0e0'
|
||||||
|
}}>
|
||||||
|
<h2 style={{ color: '#2c3e50', textAlign: 'center', marginBottom: '40px' }}>
|
||||||
|
Alles, was Sie für die perfekte Schichtplanung benötigen
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div style={{
|
||||||
|
display: 'grid',
|
||||||
|
gridTemplateColumns: 'repeat(auto-fit, minmax(300px, 1fr))',
|
||||||
|
gap: '30px'
|
||||||
|
}}>
|
||||||
|
{features.map((feature, index) => (
|
||||||
|
<div key={index} style={{
|
||||||
|
padding: '25px',
|
||||||
|
backgroundColor: '#f8f9fa',
|
||||||
|
borderRadius: '12px',
|
||||||
|
border: '2px solid #e9ecef',
|
||||||
|
textAlign: 'center',
|
||||||
|
transition: 'transform 0.2s ease, box-shadow 0.2s ease'
|
||||||
|
}}>
|
||||||
|
<div style={{
|
||||||
|
fontSize: '3rem',
|
||||||
|
marginBottom: '15px'
|
||||||
|
}}>
|
||||||
|
{feature.icon}
|
||||||
|
</div>
|
||||||
|
<h3 style={{
|
||||||
|
color: '#2c3e50',
|
||||||
|
margin: '0 0 15px 0'
|
||||||
|
}}>
|
||||||
|
{feature.title}
|
||||||
|
</h3>
|
||||||
|
<p style={{
|
||||||
|
color: '#6c757d',
|
||||||
|
margin: 0,
|
||||||
|
lineHeight: 1.5
|
||||||
|
}}>
|
||||||
|
{feature.description}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style={{
|
||||||
|
marginTop: '40px',
|
||||||
|
padding: '25px',
|
||||||
|
backgroundColor: '#e8f4fd',
|
||||||
|
borderRadius: '12px',
|
||||||
|
border: '2px solid #b8d4f0',
|
||||||
|
textAlign: 'center'
|
||||||
|
}}>
|
||||||
|
<h3 style={{ color: '#2980b9', margin: '0 0 15px 0' }}>
|
||||||
|
🚀 Starter Sie durch
|
||||||
|
</h3>
|
||||||
|
<p style={{ color: '#2c3e50', margin: 0 }}>
|
||||||
|
Erstellen Sie Ihren ersten optimierten Schichtplan in wenigen Minuten.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Features;
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
"esnext"
|
"esnext"
|
||||||
],
|
],
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
@@ -24,4 +25,4 @@
|
|||||||
"include": [
|
"include": [
|
||||||
"src"
|
"src"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
31492
frontend/package-lock.json → package-lock.json
generated
31492
frontend/package-lock.json → package-lock.json
generated
File diff suppressed because it is too large
Load Diff
23
package.json
Normal file
23
package.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"name": "schichtenplaner-monorepo",
|
||||||
|
"private": true,
|
||||||
|
"workspaces": [
|
||||||
|
"frontend",
|
||||||
|
"backend",
|
||||||
|
"premium"
|
||||||
|
],
|
||||||
|
"scripts": {
|
||||||
|
"dev:frontend": "cd frontend && npm run dev",
|
||||||
|
"dev:backend": "cd backend && npm run dev",
|
||||||
|
"build:all": "npm run build:premium && npm run build:backend && npm run build:frontend",
|
||||||
|
"build:premium": "cd premium && npm run build",
|
||||||
|
"build:backend": "cd backend && npm run build",
|
||||||
|
"build:frontend": "cd frontend && npm run build",
|
||||||
|
"type-check": "npm run type-check:all",
|
||||||
|
"type-check:all": "cd premium && npx tsc --noEmit && cd ../backend && npx tsc --noEmit && cd ../frontend && npx tsc --noEmit",
|
||||||
|
"clean": "rm -rf premium/dist backend/dist frontend/dist"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"typescript": "^5.3.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
1
premium
Submodule
1
premium
Submodule
Submodule premium added at ce4b3fd6e0
52
tsconfig.base.json
Normal file
52
tsconfig.base.json
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
/* LANGUAGE AND ENVIRONMENT */
|
||||||
|
"target": "ES2022",
|
||||||
|
"lib": ["ES2022"],
|
||||||
|
|
||||||
|
/* MODULES */
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
|
||||||
|
/* TYPE CHECKING */
|
||||||
|
"strict": true,
|
||||||
|
"noImplicitAny": true,
|
||||||
|
"noImplicitReturns": true,
|
||||||
|
"noImplicitThis": true,
|
||||||
|
"noUnusedLocals": false,
|
||||||
|
"noUnusedParameters": false,
|
||||||
|
"exactOptionalPropertyTypes": true,
|
||||||
|
"noUncheckedIndexedAccess": true,
|
||||||
|
"noImplicitOverride": true,
|
||||||
|
|
||||||
|
/* EMIT */
|
||||||
|
"declaration": true,
|
||||||
|
"declarationMap": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"removeComments": false,
|
||||||
|
|
||||||
|
/* INTEROP CONSTRAINTS */
|
||||||
|
"allowJs": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
|
||||||
|
/* COMPATIBILITY */
|
||||||
|
"isolatedModules": true,
|
||||||
|
|
||||||
|
"types": ["vite/client", "node"]
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"/premium/**/*"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"node_modules",
|
||||||
|
"dist",
|
||||||
|
"build",
|
||||||
|
"coverage",
|
||||||
|
"*.test.*",
|
||||||
|
"*.spec.*"
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user