Skip to content

Commit

Permalink
first version for package lot edition
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminpochat committed Feb 19, 2024
1 parent adcf92d commit fb3b0a1
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 86 deletions.
4 changes: 3 additions & 1 deletion frontend/app/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@

.lot__package__name {
grid-area: name;
display: flex;
justify-content: space-between;
}

.lot__package:hover {
.lot__package__edit:hover {
cursor: pointer;
background-color: whitesmoke;
}
Expand Down
23 changes: 0 additions & 23 deletions frontend/app/src/domains/production/ProductionController.js

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useEffect, useState } from "react"
import { useKeycloak } from '@react-keycloak/web'
import { ApiBuilder } from '../../../api/ApiBuilder.ts'
import PackageLot from "viandeendirect_eu/dist/model/PackageLot"
import PackageLotsConfigurator from "../components/PackageLotConfigurator"
import PackageLotConfigurator from "../components/PackageLotConfigurator.tsx"


export default function PackageLotsCreator({ production: production, changeProductionCallback: changeProductionCallback }) {
Expand Down Expand Up @@ -40,7 +40,7 @@ export default function PackageLotsCreator({ production: production, changeProdu
}, [keycloak])

return <>
{production.lots?.map(lot => <PackageLotsConfigurator packageLot={lot} changeCallback={changeLotConfiguration}></PackageLotsConfigurator>)}
{production.lots?.map(lot => <PackageLotConfigurator packageLot={lot} changeCallback={changeLotConfiguration}></PackageLotConfigurator>)}
</>

function changeLotConfiguration(lot) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React from "react"
import { useState } from "react"

import { Button, ButtonGroup, Typography, Stepper, Step, StepLabel, StepContent, Slider, StepButton, Alert } from "@mui/material"
import { DatePickerElement, FormContainer, SelectElement, TextFieldElement, SliderElement, useForm } from 'react-hook-form-mui'
import { Button, ButtonGroup, Typography, Stepper, Step, StepContent, StepButton, Alert } from "@mui/material"

import 'dayjs/locale/fr'

Expand All @@ -25,7 +24,8 @@ export default function BeefProductionCreator({ callback }) {
const PRODUCTS_STEP = 3

const { keycloak } = useKeycloak()
const [ activeStep, setActiveStep ] = useState<number>(BREEDING_PROPERTIES_STEP)
//const [ activeStep, setActiveStep ] = useState<number>(BREEDING_PROPERTIES_STEP)
const [ activeStep, setActiveStep ] = useState<number>(PRODUCTS_STEP)
const [ beefProduction, setBeefProduction] = useState<BeefProduction>({ productionType: "BeefProduction"})
const [completedSteps, setCompletedSteps] = useState<Array<number>>([])
const apiBuilder = new ApiBuilder()
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/src/layouts/producer/AuthenticatedLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ApiInvoker } from '../../api/ApiInvoker.ts'
import Dashboard from '../../domains/dashboard/Dashboard.js';
import CustomerController from '../../domains/customer/CustomerController.js';
import GrowerAccount from '../../domains/producer/ProducerAccount.js'
import ProductionController from '../../domains/production/ProductionController.js'
import ProductionController from '../../domains/production/ProductionController.tsx'
import SaleController from '../../domains/sale/SaleController.tsx'
import SideMenu from './SideMenu.js'
import Producer from 'viandeendirect_eu/dist/model/Producer.js';
Expand Down

0 comments on commit fb3b0a1

Please sign in to comment.