Skip to content

Commit

Permalink
frontend : message pour poids de l'animal obligatoire en français (do…
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminpochat committed Mar 14, 2024
1 parent 4088675 commit e2132cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
15 changes: 0 additions & 15 deletions frontend/app/src/domains/customer/views/CustomersList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Typography } from "@mui/material"
import { DataGrid, GridRowsProp, GridColDef, GridToolbar } from '@mui/x-data-grid';

import { useKeycloak } from '@react-keycloak/web'
import { ApiBuilder } from '../../../api/ApiBuilder.ts'
import { ApiInvoker } from '../../../api/ApiInvoker.ts';

export default function CustomersList({producer: producer}) {
Expand All @@ -18,21 +17,7 @@ export default function CustomersList({producer: producer}) {
}, [keycloak])

function loadCustomers() {

apiInvoker.callApiAuthenticatedly(keycloak, api => api.getProducerCustomers, producer.id, setCustomers, console.error)

// apiBuilder.getAuthenticatedApi(keycloak).then(api => {
// apiBuilder.invokeAuthenticatedApi(() => {
// api.getProducerCustomers((error, data, response) => {
// if (error) {
// console.error(error)
// } else {
// console.log('api.getProducerCustomers called successfully. Returned data: ' + data)
// setCustomers(data)
// }
// })
// }, keycloak)
// })
}

const rows: GridRowsProp = customers.map(customer => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ export function SlaughterPropertiesForm({
<SliderElement
name='warmCarcassWeight'
label="Poids estimé de l'animal"
required
max={500}
step={10}
disabled={disabled}/>
disabled={disabled}
rules={{ required: 'Champ obligatoire' }}/>
<div>
<span>Poids de l'animal vivant : {BeefProductionService.getLiveWeight(warmCarcassWeight || initialWarmCarcassWeight)} kg</span>
</div>
Expand Down

0 comments on commit e2132cb

Please sign in to comment.