Commit 485158dd authored by Ben Wais's avatar Ben Wais
Browse files

debugging

parent b1ef36b5
Loading
Loading
Loading
Loading
+2.46 KiB

File added.

No diff preview for this file type.

+4 −1
Original line number Diff line number Diff line
ortools
fastapi
uvicorn[standard]
pydantic
+3 −10
Original line number Diff line number Diff line
@@ -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(),
@@ -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
@@ -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))
@@ -75,8 +70,6 @@ function App() {
        </a>
      </div>
      <h1>Pfannkuchentorte</h1>      
      <p>das Dienstlama</p>
      
      <section id="inputs">

        <p>Schichten pro Tag: {shiftCount}</p>
+1 −1
Original line number Diff line number Diff line
@@ -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"]
+1 −1
Original line number Diff line number Diff line
@@ -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