Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6766985713 | ||
| c0d05264df | |||
|
|
9505201499 | ||
| 624591c096 | |||
|
|
e31bdce713 | ||
| 5d72beaf8d | |||
| 43f34015c6 |
14
AGENTS.md
14
AGENTS.md
@@ -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`).
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
parameters:
|
||||
app.version: '0.0.54'
|
||||
app.version: '0.0.57'
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
)
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<template>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
layout: 'default'
|
||||
})
|
||||
</script>
|
||||
@@ -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()
|
||||
|
||||
@@ -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) })
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
:disabled="!hasCaseId"
|
||||
@click="printCaseReport"
|
||||
>
|
||||
Imprimer case {{ caseId || '-' }}
|
||||
Imprimer
|
||||
</UiButton>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</template>
|
||||
</div>
|
||||
<div>{{ shipment.carrier?.name }}</div>
|
||||
<div>{{ shipment.licencePlate }}</div>
|
||||
<div>{{ shipment.licensePlate }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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
|
||||
|
||||
26
migrations/Version20260225110000.php
Normal file
26
migrations/Version20260225110000.php
Normal 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');
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user