Compare commits

...

9 Commits

Author SHA1 Message Date
gitea-actions
6766985713 chore: bump version to v0.0.57
All checks were successful
Auto Tag Develop / tag (push) Successful in 4s
Build Release Artefact / build (push) Successful in 1m16s
2026-02-26 08:10:21 +00:00
c0d05264df [#334] Correctifs (!32)
All checks were successful
Auto Tag Develop / tag (push) Successful in 5s
| Numéro du ticket | Titre du ticket |
|------------------|-----------------|
| 334 |   Correctifs  |

## Description de la PR

## Modification du .env

## Check list

- [x] Pas de régression
- [ ] TU/TI/TF rédigée
- [x] TU/TI/TF OK
- [x] CHANGELOG modifié

Reviewed-on: #32
Co-authored-by: Matteo <matteo@yuno.malio.fr>
Co-committed-by: Matteo <matteo@yuno.malio.fr>
2026-02-26 08:10:15 +00:00
gitea-actions
9505201499 chore: bump version to v0.0.56
All checks were successful
Auto Tag Develop / tag (push) Successful in 4s
Build Release Artefact / build (push) Successful in 1m23s
2026-02-26 07:42:10 +00:00
624591c096 feat : finalisation du tableau d'estimation des poids bovin
All checks were successful
Auto Tag Develop / tag (push) Successful in 7s
2026-02-26 08:41:56 +01:00
gitea-actions
e31bdce713 chore: bump version to v0.0.55
All checks were successful
Auto Tag Develop / tag (push) Successful in 4s
Build Release Artefact / build (push) Successful in 1m14s
2026-02-25 14:48:38 +00:00
5d72beaf8d Merge remote-tracking branch 'origin/develop' into develop
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
2026-02-25 15:48:19 +01:00
43f34015c6 fix : app seed 2026-02-25 15:39:05 +01:00
gitea-actions
ac5ce07e61 chore: bump version to v0.0.54
All checks were successful
Auto Tag Develop / tag (push) Successful in 4s
Build Release Artefact / build (push) Successful in 1m15s
2026-02-25 14:31:35 +00:00
e9fb36cc24 fix : suppression des repositories qui ne servent à rien
All checks were successful
Auto Tag Develop / tag (push) Successful in 5s
2026-02-25 15:31:26 +01:00
39 changed files with 162 additions and 379 deletions

View File

@@ -8,6 +8,7 @@ Project overview
Backend conventions
- Use English for code identifiers/messages; keep “pont-bascule” as domain term.
- API Platform operations are defined on Doctrine entities.
- No custom repository classes are used (`src/Repository` removed); use default Doctrine repositories via `EntityManagerInterface`.
- Reception entity is in `src/Entity/Reception.php`, with custom weigh endpoint `/receptions/weigh`.
- Reception fields: `date_reception`, `license_plate`, `current_step` (default 0), `is_valid` (default false).
- Reception also has `identification_number` (auto `N-BR-####`), `merchandise_type`, `merchandise_detail`, `buildings` (M2M), and `pellet_buildings` (via `reception_pellet_building`).
@@ -17,6 +18,13 @@ Backend conventions
- Custom exception: `App\Exception\PontBasculeException` with French messages, mapped to 500 in provider.
- Parsing of pont-bascule payload is in `src/Service/PontBasculePayloadDecoder.php`.
- `config/reference.php` is auto-generated; keep it.
- Bovine storage:
- `src/Entity/Bovine.php` with fields `nationalNumber` (unique), `receivedWeight`, `arrivalDate`, and `buildingCase` (ManyToOne).
- `src/Entity/BuildingCase.php` has `bovines` (OneToMany).
- Case PDF report:
- Endpoint: `GET /building_cases/{id}/weights-report` (provider: `App\State\BuildingCaseWeightsReportProvider`).
- Template: `templates/case_weights_report.html.twig`.
- Projection logic is done in backend from `arrivalDate`; daily gain is currently fixed at `1.3 kg/day` for all races.
Frontend conventions
- Nuxt SSR disabled; Tailwind used.
@@ -36,6 +44,7 @@ Frontend conventions
- Service layer lives in `frontend/services/` with typed DTOs in `frontend/services/dto/`.
- Reception service uses `receptions`, `receptions/{id}`, `receptions/weigh` and supports success/error toast keys.
- Reception receipt endpoint is `receptions/{id}/receipt` (PDF) via `frontend/composables/usePdfPrinter.ts`.
- Infrastructure case page prints the case weight report PDF from `frontend/pages/infrastructure/case.vue` using `usePdfPrinter('/building_cases/{id}/weights-report')`.
Environment & routing
- Frontend dev server: `npm run dev` in `frontend/`.
@@ -47,6 +56,11 @@ Environment & routing
Notes
- Do not add a GET that creates resources; use POST + PATCH.
- Keep endpoints in plural (API Platform convention).
- Seed and fixtures conventions:
- `app:seed` now seeds infrastructure (`statut`, `building_layout`, `building_case`, `building_case_position`) and bovines.
- `app:seed` uses intermediate flushes (after buildings and after infrastructure) so find queries can resolve just-created records.
- Bovine seed rows use a legacy case token mapping to building-case code (`B{building}-C{case}`) before fallback to direct id lookup.
- Fixtures include `BuildingInfrastructureFixtures` + `BovineFixtures` (via `AppFixtures` dependencies).
- New reference data added:
- Reception types (`reception_type`, fields: `label`, `code`), selectable on reception form.
- Merchandise types (`merchandise_type`, fields: `label`, `code`) and pellet types (`pellet_type`, fields: `label`, `code`).

View File

@@ -51,7 +51,7 @@ Ajouter dans le fichier .env du frontend
* Creation page admin ajout/modification bovins
* [#331] Mettre à jour l'entité Shipment et bovin_shipment
* [#278] Plan du site
* [#334] Correctifs
### Changed
### Fixed

View File

@@ -1,2 +1,2 @@
parameters:
app.version: '0.0.53'
app.version: '0.0.57'

View File

@@ -8,11 +8,12 @@
</div>
<button
class="text-xl uppercase bg-primary-500 text-white h-[50px] w-[272px]"
class="inline-flex items-center justify-center text-xl text-white uppercase bg-primary-500 h-[50px] px-8 rounded hover:opacity-80 gap-2"
type="submit"
:disabled="isLoading"
>
{{ props.address? "Sauvegarder" : "Ajouter" }}
<Icon :name="props.address ? 'mdi:check' : 'mdi:plus'" size="28" />
{{ props.address? "Valider" : "Ajouter" }}
</button>
</div>
@@ -22,7 +23,7 @@
<UiTextInput id="address-street2" v-model="form.street2" label="Complément" />
<UiTextInput id="address-postalCode" v-model="form.postalCode" label="Code postal" />
<UiTextInput id="address-city" v-model="form.city" label="Ville" />
<UiTextInput id="address-country" v-model="form.countryCode" label="Pays" />
<UiTextInput id="address-country" v-model="form.countryCode" label="Pays (code)" />
</div>
</form>
</template>

View File

@@ -27,11 +27,14 @@
/>
</div>
</div>
<button
class="text-xl uppercase bg-primary-500 text-white h-[50px] w-[272px]"
@click="goNext"
>Valider
</button>
<div class="flex justify-center">
<UiButton
type="submit"
class="text-xl uppercase bg-primary-500 text-white h-[50px] w-[272px] justify-self-end"
@click="goNext"
>Valider
</UiButton>
</div>
</div>
</template>
<script setup lang="ts">

View File

@@ -64,11 +64,14 @@
</div>
</div>
</div>
<button
class="text-xl uppercase bg-primary-500 text-white h-[50px] w-[272px]"
@click="goNext"
>Valider
</button>
<div class="flex justify-center">
<UiButton
type="submit"
class="text-xl uppercase bg-primary-500 text-white h-[50px] w-[272px] justify-self-end"
@click="goNext"
>Valider
</UiButton>
</div>
</div>
</template>

View File

@@ -92,7 +92,7 @@
<!-- Plaque d'immatriculation (hors LIOT) -->
<div v-if="!isLiotCarrier" class="col-start-2 row-start-4">
<UiLicensePlateInput
v-model="form.licencePlate"
v-model="form.licensePlate"
v-model:allowAny="allowAnyLicensePlate"
/>
</div>
@@ -193,7 +193,7 @@ const form = reactive<ShipmentFormData>({
carrierId: '',
driverId: '',
vehicleId: '',
licencePlate: '',
licensePlate: '',
})
// Adresses liées au client sélectionné
const customerAddresses = computed<AddressData[]>(() => {
@@ -315,7 +315,7 @@ watch(
() => shipmentStore.current,
(shipment) => {
isHydrating.value = true
form.licencePlate = shipment?.licencePlate ?? ''
form.licensePlate = shipment?.licensePlate ?? ''
form.shipmentDate = shipment?.shipmentDate ?? new Date().toISOString().slice(0, 10)
form.userId = shipment?.user?.id ? String(shipment.user.id) :
form.userId
@@ -441,19 +441,19 @@ watch(
(vehicle) => String(vehicle.id) === form.vehicleId
)
if (selected) {
form.licencePlate = selected.plate
form.licensePlate = selected.plate
allowAnyLicensePlate.value = false
}
}
)
watch(
() => [form.licencePlate, form.carrierId, vehicles.value],
() => [form.licensePlate, form.carrierId, vehicles.value],
() => {
if (!isLiotCarrier.value || form.vehicleId) {
return
}
const match = filteredVehicles.value.find(
(vehicle) => vehicle.plate === form.licencePlate
(vehicle) => vehicle.plate === form.licensePlate
)
if (match) {
form.vehicleId = String(match.id)
@@ -462,7 +462,7 @@ watch(
)
const buildPayload = () => {
const normalizedLicensePlate = form.licencePlate.trim()
const normalizedLicensePlate = form.licensePlate.trim()
const normalizedShipmentDate = form.shipmentDate.trim()
const normalizedCustomerId = form.customerId.trim()
const normalizedTruckId = form.truckId.trim()
@@ -498,7 +498,7 @@ const buildPayload = () => {
Math.trunc(rawQuantity)) : 0
return {
licencePlate: normalizedLicensePlate,
licensePlate: normalizedLicensePlate,
shipmentDate: normalizedShipmentDate,
customer: customerIri,
truck: truckIri,

View File

@@ -75,7 +75,7 @@ const printReceipt = async () => {
await saveWeight()
const shipment = shipmentStore.current
const filename = `${shipment.identificationNumber ?? shipment.id}_${shipment.customer?.label ?? 'client'}_${shipment.licencePlate ?? 'immat'}.pdf`
const filename = `${shipment.identificationNumber ?? shipment.id}_${shipment.customer?.label ?? 'client'}_${shipment.licensePlate ?? 'immat'}.pdf`
await printPdf(`/shipments/${shipment.id}/receipt`, filename)
// Laisse le temps a la boite de dialogue d'impression de s'ouvrir.

View File

@@ -111,7 +111,7 @@ export const useWeighingShipment = ({
const displayWeight = computed(() => weightData.value?.weight ?? currentWeightEntry.value?.weight ?? null)
const displayDsd = computed(() => weightData.value?.dsd ?? currentWeightEntry.value?.dsd ?? '-')
const title = computed(() => (modeShipment === 'gross' ? 'Pesée à plein' : 'Pesée à vide'))
const title = computed(() => (modeShipment === 'gross' ? 'Pesée à vide' : 'Pesée à plein'))
const showLoadingBox = computed(
() => isFetching.value || (displayWeight.value === null && currentWeightEntry.value === null)
)

View File

@@ -8,10 +8,10 @@
<UiButton
type="submit"
:disabled="isLoading || isHydrating"
class="text-xl uppercase bg-primary-500 text-white h-[50px] w-[272px] hover:opacity-80"
class="inline-flex items-center justify-center text-xl text-white uppercase bg-primary-500 h-[50px] px-8 rounded hover:opacity-80 gap-2"
>
<Icon name="mdi:check" size="28" />
{{ isEdit ? 'Modifier' : 'Ajouter' }}
<Icon :name="isEdit ? 'mdi:check' : 'mdi:plus'" size="28" />
{{ isEdit ? 'Valider' : 'Ajouter' }}
</UiButton>
</div>

View File

@@ -8,8 +8,10 @@
<UiButton
type="submit"
class="text-xl uppercase bg-primary-500 text-white h-[50px] w-[272px] justify-self-end"
>Enregistrer
class="inline-flex items-center justify-center text-xl text-white uppercase bg-primary-500 h-[50px] px-8 rounded hover:opacity-80 gap-2 justify-self-end"
>
<Icon name="mdi:check" size="28" />
Valider
</UiButton>
</div>
@@ -52,10 +54,6 @@ const form = reactive<CarrierFormData>({
name:''
})
definePageMeta({
layout: 'default'
})
const hydrateFromUser = (carrier: CarrierData | null) => {
if (!carrier) {
return

View File

@@ -4,7 +4,7 @@
<h1 class="text-3xl font-bold uppercase text-primary-500">listes des transporteurs</h1>
<NuxtLink
to="/admin/carrier"
class="inline-flex items-center justify-center gap-2 text-xl uppercase bg-primary-500 text-white h-[50px] px-8 rounded"
class="inline-flex items-center justify-center text-xl text-white uppercase bg-primary-500 h-[50px] px-8 rounded hover:opacity-80 gap-2"
>
<Icon name="mdi:plus" size="28" />
Ajouter
@@ -43,10 +43,6 @@ const goToCarrier = (id: number) => {
router.push(`/admin/carrier/${id}`)
}
definePageMeta({
layout: 'default'
})
onMounted(async () => {
carrierList.value = await getCarrierList(false)
})

View File

@@ -6,11 +6,12 @@
</h1>
<UiButton
class="text-xl uppercase bg-primary-500 text-white h-[50px] w-[272px]"
class="inline-flex items-center justify-center text-xl text-white uppercase bg-primary-500 h-[50px] px-8 rounded hover:opacity-80 gap-2"
type="submit"
:disabled="isLoading || !auth.isAdmin"
>
{{ customerId ? "Sauvegarder" : "Ajouter" }}
<Icon :name="customerId ? 'mdi:check' : 'mdi:plus'" size="28" />
{{ customerId ? "Valider" : "Ajouter" }}
</UiButton>
</div>
@@ -25,10 +26,11 @@
<h2 class="text-3xl font-bold uppercase">Adresses client</h2>
<UiButton
type="button"
class="text-xl uppercase bg-primary-500 text-white h-[50px] w-[272px]"
class="inline-flex items-center justify-center text-xl text-white uppercase bg-primary-500 h-[50px] px-8 rounded hover:opacity-80 gap-2"
:disabled="customerId === null || !auth.isAdmin"
@click="goToAddAddress"
>
<Icon name="mdi:plus" size="28" />
Ajouter
</UiButton>
</div>
@@ -80,8 +82,6 @@ import {createCustomer, getCustomer, updateCustomer} from "~/services/customer"
import type {CustomerData, CustomerFormData, CustomerPayload} from "~/services/dto/customer-data"
import {useAuthStore} from "~/stores/auth"
definePageMeta({layout: "default"})
const route = useRoute()
const router = useRouter()
const auth = useAuthStore()

View File

@@ -8,8 +8,6 @@ import { createAddress, getAddress, updateAddress } from "~/services/address"
import { getCustomer, updateCustomer } from "~/services/customer"
import type { CustomerData } from "~/services/dto/customer-data"
definePageMeta({ layout: "default" })
const route = useRoute()
const router = useRouter()
const customerId = computed(() => Number(route.query.customerId))

View File

@@ -3,7 +3,7 @@
<h1 class="text-3xl font-bold uppercase text-primary-500">Liste des Clients</h1>
<NuxtLink
to="/admin/customer"
class="inline-flex items-center justify-center gap-2 text-xl uppercase bg-primary-500 text-white h-[50px] px-8 rounded-md"
class="inline-flex items-center justify-center text-xl text-white uppercase bg-primary-500 h-[50px] px-8 rounded hover:opacity-80 gap-2"
:class="auth.isAdmin ? '' : 'cursor-not-allowed opacity-60'"
@click="handleAddClick"
>
@@ -94,8 +94,6 @@ import { getCustomerList } from "~/services/customer"
import type { CustomerData } from "~/services/dto/customer-data"
import { useAuthStore } from "~/stores/auth"
definePageMeta({ layout: "default" })
const customerList = ref<CustomerData[]>([])
const router = useRouter()
const auth = useAuthStore()

View File

@@ -1,7 +0,0 @@
<template>
</template>
<script setup lang="ts">
definePageMeta({
layout: 'default'
})
</script>

View File

@@ -6,11 +6,12 @@
</h1>
<UiButton
class="text-xl uppercase bg-primary-500 text-white h-[50px] w-[272px]"
class="inline-flex items-center justify-center text-xl text-white uppercase bg-primary-500 h-[50px] px-8 rounded hover:opacity-80 gap-2"
type="submit"
:disabled="isLoading || !auth.isAdmin"
>
{{ supplierId ? "Sauvegarder" : "Ajouter" }}
<Icon :name="supplierId ? 'mdi:check' : 'mdi:plus'" size="28" />
{{ supplierId ? "Valider" : "Ajouter" }}
</UiButton>
</div>
@@ -25,10 +26,11 @@
<h2 class="text-3xl font-bold uppercase">Adresses fournisseur</h2>
<UiButton
type="button"
class="text-xl uppercase bg-primary-500 text-white h-[50px] w-[272px]"
class="inline-flex items-center justify-center text-xl text-white uppercase bg-primary-500 h-[50px] px-8 rounded hover:opacity-80 gap-2"
:disabled="supplierId === null || !auth.isAdmin"
@click="goToAddAddress"
>
<Icon name="mdi:plus" size="28" />
Ajouter
</UiButton>
</div>
@@ -80,8 +82,6 @@ import {createSupplier, getSupplier, updateSupplier} from "~/services/supplier"
import type {SupplierData, SupplierFormData, SupplierPayload} from "~/services/dto/supplier-data"
import {useAuthStore} from "~/stores/auth"
definePageMeta({layout: "default"})
const route = useRoute()
const router = useRouter()
const auth = useAuthStore()

View File

@@ -8,8 +8,6 @@ import {createAddress, getAddress, updateAddress} from "~/services/address";
import {getSupplier, updateSupplier} from "~/services/supplier";
import type {SupplierData} from "~/services/dto/supplier-data";
definePageMeta({ layout: "default" })
const route = useRoute()
const router = useRouter()
const supplierId = computed(() => { return Number(route.query.supplierId) })

View File

@@ -3,7 +3,7 @@
<h1 class="text-3xl font-bold uppercase text-primary-500">Liste des fournisseurs</h1>
<NuxtLink
to="/admin/supplier"
class="inline-flex items-center justify-center gap-2 text-xl uppercase bg-primary-500 text-white h-[50px] px-8 rounded"
class="inline-flex items-center justify-center text-xl text-white uppercase bg-primary-500 h-[50px] px-8 rounded hover:opacity-80 gap-2"
:class="auth.isAdmin ? '' : 'cursor-not-allowed opacity-60'"
@click="handleAddClick"
>
@@ -90,8 +90,6 @@ import { getSupplierList } from "~/services/supplier"
import type { SupplierData } from "~/services/dto/supplier-data"
import { useAuthStore } from "~/stores/auth"
definePageMeta({ layout: "default" })
const supplierList = ref<SupplierData[]>([])
const router = useRouter()
const auth = useAuthStore()

View File

@@ -6,10 +6,11 @@
{{ userId ? "Modifications de l'utilisateur" : "Ajout d'un utilisateur" }}
</h1>
<UiButton
class="text-xl uppercase bg-primary-500 text-white h-[50px] w-[272px]"
class="inline-flex items-center justify-center text-xl text-white uppercase bg-primary-500 h-[50px] px-8 rounded hover:opacity-80 gap-2"
type="submit"
>
{{ userId ? 'Sauvegarder' : 'Ajouter' }}
<Icon :name="userId ? 'mdi:check' : 'mdi:plus'" size="28" />
{{ userId ? 'Valider' : 'Ajouter' }}
</UiButton>
</div>
@@ -38,10 +39,6 @@
</form>
</template>
<script setup lang="ts">
definePageMeta({
layout: 'default'
})
import {computed, reactive, ref, watch} from 'vue'
import {ROLE} from '~/utils/constants'
import {createUser, updateUser, getUser} from '~/services/auth'

View File

@@ -2,8 +2,8 @@
<div class="flex items-center justify-between">
<h1 class="text-3xl font-bold uppercase text-primary-500">Liste des utilisateurs</h1>
<NuxtLink
class="inline-flex items-center justify-center gap-2 text-xl uppercase bg-primary-500 text-white h-[50px] px-8 rounded-md"
@click="router.push('/admin/user/')"
to="/admin/user"
class="inline-flex items-center justify-center text-xl text-white uppercase bg-primary-500 h-[50px] px-8 rounded hover:opacity-80 gap-2"
>
<Icon name="mdi:plus" size="28" />
Ajouter
@@ -38,10 +38,6 @@
<script setup lang="ts">
definePageMeta({
layout: 'default'
})
import type {UserData} from "~/services/dto/user-data";
import {getAdminUsers} from "~/services/auth";
import {ROLE} from "~/utils/constants";

View File

@@ -5,7 +5,7 @@
:disabled="!hasCaseId"
@click="printCaseReport"
>
Imprimer case {{ caseId || '-' }}
Imprimer
</UiButton>
</div>
</template>

View File

@@ -118,10 +118,10 @@
<UiButton
v-if="auth.isAdmin"
type="submit"
class="text-xl uppercase bg-primary-500 text-white h-[50px] w-[272px] mb-16"
class="inline-flex items-center justify-center text-xl text-white uppercase bg-primary-500 h-[50px] px-8 rounded hover:opacity-80 gap-2 mb-16"
>
Enregistrer
<Icon name="mdi:check" size="28" />
Valider
</UiButton>
</div>
<div class="flex justify-evenly gap-y-8 gap-x-40 mb-8 border-b border-slate-400">

View File

@@ -38,7 +38,7 @@
</template>
</div>
<div>{{ shipment.carrier?.name }}</div>
<div>{{ shipment.licencePlate }}</div>
<div>{{ shipment.licensePlate }}</div>
</div>
</div>
</div>

View File

@@ -12,7 +12,7 @@ export interface ShipmentTypeData {
export type ShipmentData = {
id: number
identificationNumber?: string | null
licencePlate: string | null
licensePlate: string | null
shipmentDate: string
currentStep: number
isValid: boolean
@@ -43,11 +43,11 @@ export type ShipmentFormData = {
carrierId: string,
driverId: string,
vehicleId: string,
licencePlate: string,
licensePlate: string,
}
export type ShipmentPayload = {
licencePlate?: string | null
licensePlate?: string | null
shipmentDate?: string
currentStep?: number
isValid?: boolean

View File

@@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20260225110000 extends AbstractMigration
{
public function getDescription(): string
{
return 'Rename shipment.licence_plate to license_plate';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE shipment RENAME COLUMN licence_plate TO license_plate');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE shipment RENAME COLUMN license_plate TO licence_plate');
}
}

View File

@@ -58,7 +58,11 @@ class SeedCommand extends Command
$this->seedMerchandiseTypes();
$this->seedPelletTypes();
$this->seedBuildings();
$this->entityManager->flush();
$this->seedBuildingInfrastructure();
$this->entityManager->flush();
$this->seedBovines($io);
$this->seedReceptionTypes();
$this->seedBovineTypes();

View File

@@ -7,7 +7,6 @@ namespace App\Entity;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\OpenApi\Model\Operation as OpenApiOperation;
use App\Repository\BuildingCaseRepository;
use App\State\BuildingCaseWeightsReportProvider;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
@@ -15,7 +14,7 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Attribute\Groups;
use Symfony\Component\Serializer\Attribute\SerializedName;
#[ORM\Entity(repositoryClass: BuildingCaseRepository::class)]
#[ORM\Entity]
#[ApiResource(
operations: [
new Get(

View File

@@ -4,12 +4,11 @@ declare(strict_types=1);
namespace App\Entity;
use App\Repository\BuildingCasePositionRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Attribute\Groups;
use Symfony\Component\Serializer\Attribute\SerializedName;
#[ORM\Entity(repositoryClass: BuildingCasePositionRepository::class)]
#[ORM\Entity]
class BuildingCasePosition
{
#[ORM\Id]

View File

@@ -4,14 +4,13 @@ declare(strict_types=1);
namespace App\Entity;
use App\Repository\BuildingLayoutRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Attribute\Groups;
use Symfony\Component\Serializer\Attribute\SerializedName;
#[ORM\Entity(repositoryClass: BuildingLayoutRepository::class)]
#[ORM\Entity]
class BuildingLayout
{
#[ORM\Id]

View File

@@ -80,7 +80,7 @@ class Shipment
#[ORM\Column(length: 255)]
#[Groups(['shipment:read', 'shipment:write'])]
private ?string $licencePlate = null;
private ?string $licensePlate = null;
#[ORM\Column(length: 20, unique: true, nullable: true)]
#[Groups(['shipment:read'])]
@@ -162,14 +162,14 @@ class Shipment
return $this->id;
}
public function getLicencePlate(): ?string
public function getLicensePlate(): ?string
{
return $this->licencePlate;
return $this->licensePlate;
}
public function setLicencePlate(?string $licencePlate): void
public function setLicensePlate(?string $licensePlate): void
{
$this->licencePlate = $licencePlate;
$this->licensePlate = $licensePlate;
}
public function getIdentificationNumber(): ?string

View File

@@ -7,14 +7,13 @@ namespace App\Entity;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use App\Repository\StatutRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Attribute\Groups;
use Symfony\Component\Serializer\Attribute\SerializedName;
#[ORM\Entity(repositoryClass: StatutRepository::class)]
#[ORM\Entity]
#[ApiResource(
operations: [
new Get(

View File

@@ -1,45 +0,0 @@
<?php
declare(strict_types=1);
namespace App\Repository;
use App\Entity\BuildingCasePosition;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<BuildingCasePosition>
*/
class BuildingCasePositionRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, BuildingCasePosition::class);
}
// /**
// * @return BuildingCasePosition[] Returns an array of BuildingCasePosition objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('b')
// ->andWhere('b.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('b.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?BuildingCasePosition
// {
// return $this->createQueryBuilder('b')
// ->andWhere('b.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@@ -1,45 +0,0 @@
<?php
declare(strict_types=1);
namespace App\Repository;
use App\Entity\BuildingCase;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<BuildingCase>
*/
class BuildingCaseRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, BuildingCase::class);
}
// /**
// * @return BuildingCase[] Returns an array of BuildingCase objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('b')
// ->andWhere('b.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('b.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?BuildingCase
// {
// return $this->createQueryBuilder('b')
// ->andWhere('b.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@@ -1,45 +0,0 @@
<?php
declare(strict_types=1);
namespace App\Repository;
use App\Entity\BuildingLayout;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<BuildingLayout>
*/
class BuildingLayoutRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, BuildingLayout::class);
}
// /**
// * @return BuildingLayout[] Returns an array of BuildingLayout objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('b')
// ->andWhere('b.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('b.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?BuildingLayout
// {
// return $this->createQueryBuilder('b')
// ->andWhere('b.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@@ -1,45 +0,0 @@
<?php
declare(strict_types=1);
namespace App\Repository;
use App\Entity\Statut;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<Statut>
*/
class StatutRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Statut::class);
}
// /**
// * @return Statut[] Returns an array of Statut objects
// */
// public function findByExampleField($value): array
// {
// return $this->createQueryBuilder('s')
// ->andWhere('s.exampleField = :val')
// ->setParameter('val', $value)
// ->orderBy('s.id', 'ASC')
// ->setMaxResults(10)
// ->getQuery()
// ->getResult()
// ;
// }
// public function findOneBySomeField($value): ?Statut
// {
// return $this->createQueryBuilder('s')
// ->andWhere('s.exampleField = :val')
// ->setParameter('val', $value)
// ->getQuery()
// ->getOneOrNullResult()
// ;
// }
}

View File

@@ -150,11 +150,7 @@ final readonly class BuildingCaseWeightsReportProvider implements ProviderInterf
private function resolveDailyGainKg(?string $breedCode): float
{
return match ($breedCode) {
'34' => 1.3, // Limousin
'38' => 1.5, // Charolais
default => 1.4, // Other breeds
};
return 1.3;
}
/**

View File

@@ -178,39 +178,9 @@
/* =========================
FOOTER VACCINS / NOTES
========================= */
.footer {
margin-top: 6px;
}
.footer th {
background: #ffffff;
font-size: 9px;
font-weight: 700;
padding: 2px;
}
.footer td {
font-size: 8px;
padding: 2px;
height: 18px;
}
.footer .small {
font-size: 8px;
}
/* Ligne méta */
.meta {
margin-top: 3px;
text-align: right;
font-size: 8px;
color: #444;
line-height: 1.2;
}
/* Petits ajustements dompdf */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.footer {
font-size: 12px;
}
/* Header droit sans bordures par défaut */
.header-right-free,
@@ -363,68 +333,46 @@
{% endfor %}
</tbody>
</table>
<!-- =========================
FOOTER (traitements / vaccins)
========================= -->
{# <table class="footer">#}
{# <colgroup>#}
{# #}{# 14 colonnes pour gérer proprement les colspan #}
{# <col style="width:12.5%">#}
{# <col style="width:8%">#}
{# <col style="width:12.5%">#}
{# <col style="width:8%">#}
{# <col style="width:12.5%">#}
{# <col style="width:8%">#}
{# <col style="width:12.5%">#}
{# <col style="width:8%">#}
{# <col style="width:8%">#}
{# <col style="width:6%">#}
{# <col style="width:8%">#}
{# <col style="width:8%">#}
{# <col style="width:6%">#}
{# <col style="width:8%">#}
{# </colgroup>#}
{# <tr>#}
{# <th colspan="2">Date</th>#}
{# <th colspan="2">Antibiotique</th>#}
{# <th colspan="2">Date</th>#}
{# <th colspan="2">Antero</th>#}
{# <th colspan="3">Grippe</th>#}
{# <th colspan="3">Protivity</th>#}
{# </tr>#}
{# <tr>#}
{# <td colspan="2"></td>#}
{# <td colspan="2"></td>#}
{# <td colspan="2"></td>#}
{# <td colspan="2"></td>#}
{# <td class="small">Date</td>#}
{# <td colspan="2" class="small">Intranasale</td>#}
{# <td class="small">Date</td>#}
{# <td colspan="2" class="small">Rappel 30 jours</td>#}
{# </tr>#}
{# <tr>#}
{# <td colspan="2"></td>#}
{# <td colspan="2"></td>#}
{# <td colspan="2"></td>#}
{# <td colspan="2" class="small">Rappel 30 jours</td>#}
{# <td></td>#}
{# <td colspan="2" class="small">Rappel 90 jours</td>#}
{# <td></td>#}
{# <td colspan="2" class="small">3 semaines</td>#}
{# </tr>#}
{# </table>#}
{# <div class="meta">#}
{# Édité le {{ printedAt|date('d/m/Y H:i') }} - Case {{ buildingCase.code ?? '' }}#}
{# </div>#}
FOOTER (traitements / vaccins)
========================= -->
<table class="footer" style="border-collapse:collapse; margin-top: 32px">
<tr>
<td style="height: 20px; border: 0" colspan="4"></td>
<td style="font-weight: 700" colspan="2">Grippe</td>
<td style="font-weight: 700" colspan="2">Protivity</td>
</tr>
<tr>
<td style="height: 20px">Date</td>
<td>Antibiotique</td>
<td>Date</td>
<td>Antero</td>
<td>Date</td>
<td>Intranasale</td>
<td>Date</td>
<td>Rappel 30 jours</td>
</tr>
<tr>
<td style="height: 20px"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td style="height: 20px"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div>
</body>
</html>

View File

@@ -275,7 +275,7 @@
<div class="meta">
<p>Transporteur : {{ shipment.carrier ? shipment.carrier.name : '-' }}</p>
<p>Mode d'expédition : {{ shipment.truck ? shipment.truck.name : '-' }}</p>
<p>Immatriculation : {{ shipment.licencePlate ?? '-' }}</p>
<p>Immatriculation : {{ shipment.licensePlate ?? '-' }}</p>
</div>
</td>