Loading 01_backend/__pycache__/main.cpython-39.pyc 0 → 100644 +2.46 KiB File added.No diff preview for this file type. View file 01_backend/requirements.txt +4 −1 Original line number Diff line number Diff line ortools fastapi uvicorn[standard] pydantic 02_frontend/src/App.jsx +3 −10 Original line number Diff line number Diff line Loading @@ -10,8 +10,6 @@ function App() { const sendConstraints = (e) => { e.preventDefault(); const formData = new FormData(formRef.current); console.log(formData) console.log(formData.get("TU01")) const data = { shiftCount: shiftCount.toString(), Loading @@ -36,15 +34,12 @@ function App() { const days = ["MO", "TU", "WE", "TH", "FR", "SA", "SO"]; days.forEach((day) => { console.log(`formData.get(${day}0${i})`) console.log(formData.get(`${day}0${i}`)) if (formData.get(`${day}${i}`)=="on") { if (formData.get(`${day}0${i}`)=="on") { availableDays.push(day); } }); data.employees.push({ name: formData.get(`name${i}`), capacity: formData.get(`capacity${i}`), availableDays Loading @@ -58,7 +53,7 @@ function App() { headers: { "Content-Type": "application/json", }, body: JSON.stringify({}) body: data }) .then((res) => res.json()) .then((err) => console.error("Error: ", err)) Loading @@ -75,8 +70,6 @@ function App() { </a> </div> <h1>Pfannkuchentorte</h1> <p>das Dienstlama</p> <section id="inputs"> <p>Schichten pro Tag: {shiftCount}</p> Loading Dockerfile.backend +1 −1 Original line number Diff line number Diff line Loading @@ -27,4 +27,4 @@ COPY 01_backend/ . # Die CMD-Anweisung im Dockerfile wird durch die 'command' Anweisung in docker-compose.yml # überschrieben, wenn du docker-compose verwendest. Du kannst sie kommentiert lassen # oder entfernen, wenn du sie nur mit docker-compose starten willst. CMD ["python", "main.py"] No newline at end of file CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] Dockerfile.frontend +1 −1 Original line number Diff line number Diff line Loading @@ -14,5 +14,5 @@ COPY 02_frontend/ ./ RUN npm run build FROM nginx:stable-alpine COPY --from=build /app/dist /usr/share/nginx/html COPY --from=build /app/build /usr/share/nginx/html COPY 00_nginx/default.conf /etc/nginx/conf.d/default.conf No newline at end of file Loading
01_backend/__pycache__/main.cpython-39.pyc 0 → 100644 +2.46 KiB File added.No diff preview for this file type. View file
01_backend/requirements.txt +4 −1 Original line number Diff line number Diff line ortools fastapi uvicorn[standard] pydantic
02_frontend/src/App.jsx +3 −10 Original line number Diff line number Diff line Loading @@ -10,8 +10,6 @@ function App() { const sendConstraints = (e) => { e.preventDefault(); const formData = new FormData(formRef.current); console.log(formData) console.log(formData.get("TU01")) const data = { shiftCount: shiftCount.toString(), Loading @@ -36,15 +34,12 @@ function App() { const days = ["MO", "TU", "WE", "TH", "FR", "SA", "SO"]; days.forEach((day) => { console.log(`formData.get(${day}0${i})`) console.log(formData.get(`${day}0${i}`)) if (formData.get(`${day}${i}`)=="on") { if (formData.get(`${day}0${i}`)=="on") { availableDays.push(day); } }); data.employees.push({ name: formData.get(`name${i}`), capacity: formData.get(`capacity${i}`), availableDays Loading @@ -58,7 +53,7 @@ function App() { headers: { "Content-Type": "application/json", }, body: JSON.stringify({}) body: data }) .then((res) => res.json()) .then((err) => console.error("Error: ", err)) Loading @@ -75,8 +70,6 @@ function App() { </a> </div> <h1>Pfannkuchentorte</h1> <p>das Dienstlama</p> <section id="inputs"> <p>Schichten pro Tag: {shiftCount}</p> Loading
Dockerfile.backend +1 −1 Original line number Diff line number Diff line Loading @@ -27,4 +27,4 @@ COPY 01_backend/ . # Die CMD-Anweisung im Dockerfile wird durch die 'command' Anweisung in docker-compose.yml # überschrieben, wenn du docker-compose verwendest. Du kannst sie kommentiert lassen # oder entfernen, wenn du sie nur mit docker-compose starten willst. CMD ["python", "main.py"] No newline at end of file CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
Dockerfile.frontend +1 −1 Original line number Diff line number Diff line Loading @@ -14,5 +14,5 @@ COPY 02_frontend/ ./ RUN npm run build FROM nginx:stable-alpine COPY --from=build /app/dist /usr/share/nginx/html COPY --from=build /app/build /usr/share/nginx/html COPY 00_nginx/default.conf /etc/nginx/conf.d/default.conf No newline at end of file