Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6766985713 | ||
| c0d05264df | |||
|
|
9505201499 | ||
| 624591c096 | |||
|
|
e31bdce713 | ||
| 5d72beaf8d | |||
| 43f34015c6 | |||
|
|
ac5ce07e61 | ||
| e9fb36cc24 |
14
AGENTS.md
14
AGENTS.md
@@ -8,6 +8,7 @@ Project overview
|
|||||||
Backend conventions
|
Backend conventions
|
||||||
- Use English for code identifiers/messages; keep “pont-bascule” as domain term.
|
- Use English for code identifiers/messages; keep “pont-bascule” as domain term.
|
||||||
- API Platform operations are defined on Doctrine entities.
|
- 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 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 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`).
|
- 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.
|
- Custom exception: `App\Exception\PontBasculeException` with French messages, mapped to 500 in provider.
|
||||||
- Parsing of pont-bascule payload is in `src/Service/PontBasculePayloadDecoder.php`.
|
- Parsing of pont-bascule payload is in `src/Service/PontBasculePayloadDecoder.php`.
|
||||||
- `config/reference.php` is auto-generated; keep it.
|
- `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
|
Frontend conventions
|
||||||
- Nuxt SSR disabled; Tailwind used.
|
- Nuxt SSR disabled; Tailwind used.
|
||||||
@@ -36,6 +44,7 @@ Frontend conventions
|
|||||||
- Service layer lives in `frontend/services/` with typed DTOs in `frontend/services/dto/`.
|
- 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 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`.
|
- 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
|
Environment & routing
|
||||||
- Frontend dev server: `npm run dev` in `frontend/`.
|
- Frontend dev server: `npm run dev` in `frontend/`.
|
||||||
@@ -47,6 +56,11 @@ Environment & routing
|
|||||||
Notes
|
Notes
|
||||||
- Do not add a GET that creates resources; use POST + PATCH.
|
- Do not add a GET that creates resources; use POST + PATCH.
|
||||||
- Keep endpoints in plural (API Platform convention).
|
- 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:
|
- New reference data added:
|
||||||
- Reception types (`reception_type`, fields: `label`, `code`), selectable on reception form.
|
- 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`).
|
- 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
|
* Creation page admin ajout/modification bovins
|
||||||
* [#331] Mettre à jour l'entité Shipment et bovin_shipment
|
* [#331] Mettre à jour l'entité Shipment et bovin_shipment
|
||||||
* [#278] Plan du site
|
* [#278] Plan du site
|
||||||
|
* [#334] Correctifs
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
parameters:
|
parameters:
|
||||||
app.version: '0.0.53'
|
app.version: '0.0.57'
|
||||||
|
|||||||
@@ -8,11 +8,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button
|
<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"
|
type="submit"
|
||||||
:disabled="isLoading"
|
:disabled="isLoading"
|
||||||
>
|
>
|
||||||
{{ props.address? "Sauvegarder" : "Ajouter" }}
|
<Icon :name="props.address ? 'mdi:check' : 'mdi:plus'" size="28" />
|
||||||
|
{{ props.address? "Valider" : "Ajouter" }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -22,7 +23,7 @@
|
|||||||
<UiTextInput id="address-street2" v-model="form.street2" label="Complément" />
|
<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-postalCode" v-model="form.postalCode" label="Code postal" />
|
||||||
<UiTextInput id="address-city" v-model="form.city" label="Ville" />
|
<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>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -27,11 +27,14 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<div class="flex justify-center">
|
||||||
class="text-xl uppercase bg-primary-500 text-white h-[50px] w-[272px]"
|
<UiButton
|
||||||
@click="goNext"
|
type="submit"
|
||||||
>Valider
|
class="text-xl uppercase bg-primary-500 text-white h-[50px] w-[272px] justify-self-end"
|
||||||
</button>
|
@click="goNext"
|
||||||
|
>Valider
|
||||||
|
</UiButton>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|||||||
@@ -64,11 +64,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<div class="flex justify-center">
|
||||||
class="text-xl uppercase bg-primary-500 text-white h-[50px] w-[272px]"
|
<UiButton
|
||||||
@click="goNext"
|
type="submit"
|
||||||
>Valider
|
class="text-xl uppercase bg-primary-500 text-white h-[50px] w-[272px] justify-self-end"
|
||||||
</button>
|
@click="goNext"
|
||||||
|
>Valider
|
||||||
|
</UiButton>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
<!-- Plaque d'immatriculation (hors LIOT) -->
|
<!-- Plaque d'immatriculation (hors LIOT) -->
|
||||||
<div v-if="!isLiotCarrier" class="col-start-2 row-start-4">
|
<div v-if="!isLiotCarrier" class="col-start-2 row-start-4">
|
||||||
<UiLicensePlateInput
|
<UiLicensePlateInput
|
||||||
v-model="form.licencePlate"
|
v-model="form.licensePlate"
|
||||||
v-model:allowAny="allowAnyLicensePlate"
|
v-model:allowAny="allowAnyLicensePlate"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -193,7 +193,7 @@ const form = reactive<ShipmentFormData>({
|
|||||||
carrierId: '',
|
carrierId: '',
|
||||||
driverId: '',
|
driverId: '',
|
||||||
vehicleId: '',
|
vehicleId: '',
|
||||||
licencePlate: '',
|
licensePlate: '',
|
||||||
})
|
})
|
||||||
// Adresses liées au client sélectionné
|
// Adresses liées au client sélectionné
|
||||||
const customerAddresses = computed<AddressData[]>(() => {
|
const customerAddresses = computed<AddressData[]>(() => {
|
||||||
@@ -315,7 +315,7 @@ watch(
|
|||||||
() => shipmentStore.current,
|
() => shipmentStore.current,
|
||||||
(shipment) => {
|
(shipment) => {
|
||||||
isHydrating.value = true
|
isHydrating.value = true
|
||||||
form.licencePlate = shipment?.licencePlate ?? ''
|
form.licensePlate = shipment?.licensePlate ?? ''
|
||||||
form.shipmentDate = shipment?.shipmentDate ?? new Date().toISOString().slice(0, 10)
|
form.shipmentDate = shipment?.shipmentDate ?? new Date().toISOString().slice(0, 10)
|
||||||
form.userId = shipment?.user?.id ? String(shipment.user.id) :
|
form.userId = shipment?.user?.id ? String(shipment.user.id) :
|
||||||
form.userId
|
form.userId
|
||||||
@@ -441,19 +441,19 @@ watch(
|
|||||||
(vehicle) => String(vehicle.id) === form.vehicleId
|
(vehicle) => String(vehicle.id) === form.vehicleId
|
||||||
)
|
)
|
||||||
if (selected) {
|
if (selected) {
|
||||||
form.licencePlate = selected.plate
|
form.licensePlate = selected.plate
|
||||||
allowAnyLicensePlate.value = false
|
allowAnyLicensePlate.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
watch(
|
watch(
|
||||||
() => [form.licencePlate, form.carrierId, vehicles.value],
|
() => [form.licensePlate, form.carrierId, vehicles.value],
|
||||||
() => {
|
() => {
|
||||||
if (!isLiotCarrier.value || form.vehicleId) {
|
if (!isLiotCarrier.value || form.vehicleId) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const match = filteredVehicles.value.find(
|
const match = filteredVehicles.value.find(
|
||||||
(vehicle) => vehicle.plate === form.licencePlate
|
(vehicle) => vehicle.plate === form.licensePlate
|
||||||
)
|
)
|
||||||
if (match) {
|
if (match) {
|
||||||
form.vehicleId = String(match.id)
|
form.vehicleId = String(match.id)
|
||||||
@@ -462,7 +462,7 @@ watch(
|
|||||||
)
|
)
|
||||||
|
|
||||||
const buildPayload = () => {
|
const buildPayload = () => {
|
||||||
const normalizedLicensePlate = form.licencePlate.trim()
|
const normalizedLicensePlate = form.licensePlate.trim()
|
||||||
const normalizedShipmentDate = form.shipmentDate.trim()
|
const normalizedShipmentDate = form.shipmentDate.trim()
|
||||||
const normalizedCustomerId = form.customerId.trim()
|
const normalizedCustomerId = form.customerId.trim()
|
||||||
const normalizedTruckId = form.truckId.trim()
|
const normalizedTruckId = form.truckId.trim()
|
||||||
@@ -498,7 +498,7 @@ const buildPayload = () => {
|
|||||||
Math.trunc(rawQuantity)) : 0
|
Math.trunc(rawQuantity)) : 0
|
||||||
|
|
||||||
return {
|
return {
|
||||||
licencePlate: normalizedLicensePlate,
|
licensePlate: normalizedLicensePlate,
|
||||||
shipmentDate: normalizedShipmentDate,
|
shipmentDate: normalizedShipmentDate,
|
||||||
customer: customerIri,
|
customer: customerIri,
|
||||||
truck: truckIri,
|
truck: truckIri,
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ const printReceipt = async () => {
|
|||||||
|
|
||||||
await saveWeight()
|
await saveWeight()
|
||||||
const shipment = shipmentStore.current
|
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)
|
await printPdf(`/shipments/${shipment.id}/receipt`, filename)
|
||||||
|
|
||||||
// Laisse le temps a la boite de dialogue d'impression de s'ouvrir.
|
// 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 displayWeight = computed(() => weightData.value?.weight ?? currentWeightEntry.value?.weight ?? null)
|
||||||
const displayDsd = computed(() => weightData.value?.dsd ?? currentWeightEntry.value?.dsd ?? '-')
|
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(
|
const showLoadingBox = computed(
|
||||||
() => isFetching.value || (displayWeight.value === null && currentWeightEntry.value === null)
|
() => isFetching.value || (displayWeight.value === null && currentWeightEntry.value === null)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,10 +8,10 @@
|
|||||||
<UiButton
|
<UiButton
|
||||||
type="submit"
|
type="submit"
|
||||||
:disabled="isLoading || isHydrating"
|
: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" />
|
<Icon :name="isEdit ? 'mdi:check' : 'mdi:plus'" size="28" />
|
||||||
{{ isEdit ? 'Modifier' : 'Ajouter' }}
|
{{ isEdit ? 'Valider' : 'Ajouter' }}
|
||||||
</UiButton>
|
</UiButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,10 @@
|
|||||||
|
|
||||||
<UiButton
|
<UiButton
|
||||||
type="submit"
|
type="submit"
|
||||||
class="text-xl uppercase bg-primary-500 text-white h-[50px] w-[272px] justify-self-end"
|
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"
|
||||||
>Enregistrer
|
>
|
||||||
|
<Icon name="mdi:check" size="28" />
|
||||||
|
Valider
|
||||||
</UiButton>
|
</UiButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -52,10 +54,6 @@ const form = reactive<CarrierFormData>({
|
|||||||
name:''
|
name:''
|
||||||
})
|
})
|
||||||
|
|
||||||
definePageMeta({
|
|
||||||
layout: 'default'
|
|
||||||
})
|
|
||||||
|
|
||||||
const hydrateFromUser = (carrier: CarrierData | null) => {
|
const hydrateFromUser = (carrier: CarrierData | null) => {
|
||||||
if (!carrier) {
|
if (!carrier) {
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<h1 class="text-3xl font-bold uppercase text-primary-500">listes des transporteurs</h1>
|
<h1 class="text-3xl font-bold uppercase text-primary-500">listes des transporteurs</h1>
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
to="/admin/carrier"
|
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" />
|
<Icon name="mdi:plus" size="28" />
|
||||||
Ajouter
|
Ajouter
|
||||||
@@ -43,10 +43,6 @@ const goToCarrier = (id: number) => {
|
|||||||
router.push(`/admin/carrier/${id}`)
|
router.push(`/admin/carrier/${id}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
definePageMeta({
|
|
||||||
layout: 'default'
|
|
||||||
})
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
carrierList.value = await getCarrierList(false)
|
carrierList.value = await getCarrierList(false)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -6,11 +6,12 @@
|
|||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<UiButton
|
<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"
|
type="submit"
|
||||||
:disabled="isLoading || !auth.isAdmin"
|
:disabled="isLoading || !auth.isAdmin"
|
||||||
>
|
>
|
||||||
{{ customerId ? "Sauvegarder" : "Ajouter" }}
|
<Icon :name="customerId ? 'mdi:check' : 'mdi:plus'" size="28" />
|
||||||
|
{{ customerId ? "Valider" : "Ajouter" }}
|
||||||
</UiButton>
|
</UiButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -25,10 +26,11 @@
|
|||||||
<h2 class="text-3xl font-bold uppercase">Adresses client</h2>
|
<h2 class="text-3xl font-bold uppercase">Adresses client</h2>
|
||||||
<UiButton
|
<UiButton
|
||||||
type="button"
|
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"
|
:disabled="customerId === null || !auth.isAdmin"
|
||||||
@click="goToAddAddress"
|
@click="goToAddAddress"
|
||||||
>
|
>
|
||||||
|
<Icon name="mdi:plus" size="28" />
|
||||||
Ajouter
|
Ajouter
|
||||||
</UiButton>
|
</UiButton>
|
||||||
</div>
|
</div>
|
||||||
@@ -80,8 +82,6 @@ import {createCustomer, getCustomer, updateCustomer} from "~/services/customer"
|
|||||||
import type {CustomerData, CustomerFormData, CustomerPayload} from "~/services/dto/customer-data"
|
import type {CustomerData, CustomerFormData, CustomerPayload} from "~/services/dto/customer-data"
|
||||||
import {useAuthStore} from "~/stores/auth"
|
import {useAuthStore} from "~/stores/auth"
|
||||||
|
|
||||||
definePageMeta({layout: "default"})
|
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const auth = useAuthStore()
|
const auth = useAuthStore()
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ import { createAddress, getAddress, updateAddress } from "~/services/address"
|
|||||||
import { getCustomer, updateCustomer } from "~/services/customer"
|
import { getCustomer, updateCustomer } from "~/services/customer"
|
||||||
import type { CustomerData } from "~/services/dto/customer-data"
|
import type { CustomerData } from "~/services/dto/customer-data"
|
||||||
|
|
||||||
definePageMeta({ layout: "default" })
|
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const customerId = computed(() => Number(route.query.customerId))
|
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>
|
<h1 class="text-3xl font-bold uppercase text-primary-500">Liste des Clients</h1>
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
to="/admin/customer"
|
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'"
|
:class="auth.isAdmin ? '' : 'cursor-not-allowed opacity-60'"
|
||||||
@click="handleAddClick"
|
@click="handleAddClick"
|
||||||
>
|
>
|
||||||
@@ -94,8 +94,6 @@ import { getCustomerList } from "~/services/customer"
|
|||||||
import type { CustomerData } from "~/services/dto/customer-data"
|
import type { CustomerData } from "~/services/dto/customer-data"
|
||||||
import { useAuthStore } from "~/stores/auth"
|
import { useAuthStore } from "~/stores/auth"
|
||||||
|
|
||||||
definePageMeta({ layout: "default" })
|
|
||||||
|
|
||||||
const customerList = ref<CustomerData[]>([])
|
const customerList = ref<CustomerData[]>([])
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const auth = useAuthStore()
|
const auth = useAuthStore()
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
<template>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
definePageMeta({
|
|
||||||
layout: 'default'
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
@@ -6,11 +6,12 @@
|
|||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<UiButton
|
<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"
|
type="submit"
|
||||||
:disabled="isLoading || !auth.isAdmin"
|
:disabled="isLoading || !auth.isAdmin"
|
||||||
>
|
>
|
||||||
{{ supplierId ? "Sauvegarder" : "Ajouter" }}
|
<Icon :name="supplierId ? 'mdi:check' : 'mdi:plus'" size="28" />
|
||||||
|
{{ supplierId ? "Valider" : "Ajouter" }}
|
||||||
</UiButton>
|
</UiButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -25,10 +26,11 @@
|
|||||||
<h2 class="text-3xl font-bold uppercase">Adresses fournisseur</h2>
|
<h2 class="text-3xl font-bold uppercase">Adresses fournisseur</h2>
|
||||||
<UiButton
|
<UiButton
|
||||||
type="button"
|
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"
|
:disabled="supplierId === null || !auth.isAdmin"
|
||||||
@click="goToAddAddress"
|
@click="goToAddAddress"
|
||||||
>
|
>
|
||||||
|
<Icon name="mdi:plus" size="28" />
|
||||||
Ajouter
|
Ajouter
|
||||||
</UiButton>
|
</UiButton>
|
||||||
</div>
|
</div>
|
||||||
@@ -80,8 +82,6 @@ import {createSupplier, getSupplier, updateSupplier} from "~/services/supplier"
|
|||||||
import type {SupplierData, SupplierFormData, SupplierPayload} from "~/services/dto/supplier-data"
|
import type {SupplierData, SupplierFormData, SupplierPayload} from "~/services/dto/supplier-data"
|
||||||
import {useAuthStore} from "~/stores/auth"
|
import {useAuthStore} from "~/stores/auth"
|
||||||
|
|
||||||
definePageMeta({layout: "default"})
|
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const auth = useAuthStore()
|
const auth = useAuthStore()
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ import {createAddress, getAddress, updateAddress} from "~/services/address";
|
|||||||
import {getSupplier, updateSupplier} from "~/services/supplier";
|
import {getSupplier, updateSupplier} from "~/services/supplier";
|
||||||
import type {SupplierData} from "~/services/dto/supplier-data";
|
import type {SupplierData} from "~/services/dto/supplier-data";
|
||||||
|
|
||||||
definePageMeta({ layout: "default" })
|
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const supplierId = computed(() => { return Number(route.query.supplierId) })
|
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>
|
<h1 class="text-3xl font-bold uppercase text-primary-500">Liste des fournisseurs</h1>
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
to="/admin/supplier"
|
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'"
|
:class="auth.isAdmin ? '' : 'cursor-not-allowed opacity-60'"
|
||||||
@click="handleAddClick"
|
@click="handleAddClick"
|
||||||
>
|
>
|
||||||
@@ -90,8 +90,6 @@ import { getSupplierList } from "~/services/supplier"
|
|||||||
import type { SupplierData } from "~/services/dto/supplier-data"
|
import type { SupplierData } from "~/services/dto/supplier-data"
|
||||||
import { useAuthStore } from "~/stores/auth"
|
import { useAuthStore } from "~/stores/auth"
|
||||||
|
|
||||||
definePageMeta({ layout: "default" })
|
|
||||||
|
|
||||||
const supplierList = ref<SupplierData[]>([])
|
const supplierList = ref<SupplierData[]>([])
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const auth = useAuthStore()
|
const auth = useAuthStore()
|
||||||
|
|||||||
@@ -6,10 +6,11 @@
|
|||||||
{{ userId ? "Modifications de l'utilisateur" : "Ajout d'un utilisateur" }}
|
{{ userId ? "Modifications de l'utilisateur" : "Ajout d'un utilisateur" }}
|
||||||
</h1>
|
</h1>
|
||||||
<UiButton
|
<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"
|
type="submit"
|
||||||
>
|
>
|
||||||
{{ userId ? 'Sauvegarder' : 'Ajouter' }}
|
<Icon :name="userId ? 'mdi:check' : 'mdi:plus'" size="28" />
|
||||||
|
{{ userId ? 'Valider' : 'Ajouter' }}
|
||||||
</UiButton>
|
</UiButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -38,10 +39,6 @@
|
|||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
definePageMeta({
|
|
||||||
layout: 'default'
|
|
||||||
})
|
|
||||||
|
|
||||||
import {computed, reactive, ref, watch} from 'vue'
|
import {computed, reactive, ref, watch} from 'vue'
|
||||||
import {ROLE} from '~/utils/constants'
|
import {ROLE} from '~/utils/constants'
|
||||||
import {createUser, updateUser, getUser} from '~/services/auth'
|
import {createUser, updateUser, getUser} from '~/services/auth'
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<h1 class="text-3xl font-bold uppercase text-primary-500">Liste des utilisateurs</h1>
|
<h1 class="text-3xl font-bold uppercase text-primary-500">Liste des utilisateurs</h1>
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
class="inline-flex items-center justify-center gap-2 text-xl uppercase bg-primary-500 text-white h-[50px] px-8 rounded-md"
|
to="/admin/user"
|
||||||
@click="router.push('/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" />
|
<Icon name="mdi:plus" size="28" />
|
||||||
Ajouter
|
Ajouter
|
||||||
@@ -38,10 +38,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
definePageMeta({
|
|
||||||
layout: 'default'
|
|
||||||
})
|
|
||||||
|
|
||||||
import type {UserData} from "~/services/dto/user-data";
|
import type {UserData} from "~/services/dto/user-data";
|
||||||
import {getAdminUsers} from "~/services/auth";
|
import {getAdminUsers} from "~/services/auth";
|
||||||
import {ROLE} from "~/utils/constants";
|
import {ROLE} from "~/utils/constants";
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
:disabled="!hasCaseId"
|
:disabled="!hasCaseId"
|
||||||
@click="printCaseReport"
|
@click="printCaseReport"
|
||||||
>
|
>
|
||||||
Imprimer case {{ caseId || '-' }}
|
Imprimer
|
||||||
</UiButton>
|
</UiButton>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -118,10 +118,10 @@
|
|||||||
<UiButton
|
<UiButton
|
||||||
v-if="auth.isAdmin"
|
v-if="auth.isAdmin"
|
||||||
type="submit"
|
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>
|
</UiButton>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-evenly gap-y-8 gap-x-40 mb-8 border-b border-slate-400">
|
<div class="flex justify-evenly gap-y-8 gap-x-40 mb-8 border-b border-slate-400">
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div>{{ shipment.carrier?.name }}</div>
|
<div>{{ shipment.carrier?.name }}</div>
|
||||||
<div>{{ shipment.licencePlate }}</div>
|
<div>{{ shipment.licensePlate }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export interface ShipmentTypeData {
|
|||||||
export type ShipmentData = {
|
export type ShipmentData = {
|
||||||
id: number
|
id: number
|
||||||
identificationNumber?: string | null
|
identificationNumber?: string | null
|
||||||
licencePlate: string | null
|
licensePlate: string | null
|
||||||
shipmentDate: string
|
shipmentDate: string
|
||||||
currentStep: number
|
currentStep: number
|
||||||
isValid: boolean
|
isValid: boolean
|
||||||
@@ -43,11 +43,11 @@ export type ShipmentFormData = {
|
|||||||
carrierId: string,
|
carrierId: string,
|
||||||
driverId: string,
|
driverId: string,
|
||||||
vehicleId: string,
|
vehicleId: string,
|
||||||
licencePlate: string,
|
licensePlate: string,
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ShipmentPayload = {
|
export type ShipmentPayload = {
|
||||||
licencePlate?: string | null
|
licensePlate?: string | null
|
||||||
shipmentDate?: string
|
shipmentDate?: string
|
||||||
currentStep?: number
|
currentStep?: number
|
||||||
isValid?: boolean
|
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->seedMerchandiseTypes();
|
||||||
$this->seedPelletTypes();
|
$this->seedPelletTypes();
|
||||||
$this->seedBuildings();
|
$this->seedBuildings();
|
||||||
|
$this->entityManager->flush();
|
||||||
|
|
||||||
$this->seedBuildingInfrastructure();
|
$this->seedBuildingInfrastructure();
|
||||||
|
$this->entityManager->flush();
|
||||||
|
|
||||||
$this->seedBovines($io);
|
$this->seedBovines($io);
|
||||||
$this->seedReceptionTypes();
|
$this->seedReceptionTypes();
|
||||||
$this->seedBovineTypes();
|
$this->seedBovineTypes();
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ namespace App\Entity;
|
|||||||
use ApiPlatform\Metadata\ApiResource;
|
use ApiPlatform\Metadata\ApiResource;
|
||||||
use ApiPlatform\Metadata\Get;
|
use ApiPlatform\Metadata\Get;
|
||||||
use ApiPlatform\OpenApi\Model\Operation as OpenApiOperation;
|
use ApiPlatform\OpenApi\Model\Operation as OpenApiOperation;
|
||||||
use App\Repository\BuildingCaseRepository;
|
|
||||||
use App\State\BuildingCaseWeightsReportProvider;
|
use App\State\BuildingCaseWeightsReportProvider;
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
use Doctrine\Common\Collections\Collection;
|
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\Groups;
|
||||||
use Symfony\Component\Serializer\Attribute\SerializedName;
|
use Symfony\Component\Serializer\Attribute\SerializedName;
|
||||||
|
|
||||||
#[ORM\Entity(repositoryClass: BuildingCaseRepository::class)]
|
#[ORM\Entity]
|
||||||
#[ApiResource(
|
#[ApiResource(
|
||||||
operations: [
|
operations: [
|
||||||
new Get(
|
new Get(
|
||||||
|
|||||||
@@ -4,12 +4,11 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace App\Entity;
|
namespace App\Entity;
|
||||||
|
|
||||||
use App\Repository\BuildingCasePositionRepository;
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Symfony\Component\Serializer\Attribute\Groups;
|
use Symfony\Component\Serializer\Attribute\Groups;
|
||||||
use Symfony\Component\Serializer\Attribute\SerializedName;
|
use Symfony\Component\Serializer\Attribute\SerializedName;
|
||||||
|
|
||||||
#[ORM\Entity(repositoryClass: BuildingCasePositionRepository::class)]
|
#[ORM\Entity]
|
||||||
class BuildingCasePosition
|
class BuildingCasePosition
|
||||||
{
|
{
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
|
|||||||
@@ -4,14 +4,13 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace App\Entity;
|
namespace App\Entity;
|
||||||
|
|
||||||
use App\Repository\BuildingLayoutRepository;
|
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Symfony\Component\Serializer\Attribute\Groups;
|
use Symfony\Component\Serializer\Attribute\Groups;
|
||||||
use Symfony\Component\Serializer\Attribute\SerializedName;
|
use Symfony\Component\Serializer\Attribute\SerializedName;
|
||||||
|
|
||||||
#[ORM\Entity(repositoryClass: BuildingLayoutRepository::class)]
|
#[ORM\Entity]
|
||||||
class BuildingLayout
|
class BuildingLayout
|
||||||
{
|
{
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ class Shipment
|
|||||||
|
|
||||||
#[ORM\Column(length: 255)]
|
#[ORM\Column(length: 255)]
|
||||||
#[Groups(['shipment:read', 'shipment:write'])]
|
#[Groups(['shipment:read', 'shipment:write'])]
|
||||||
private ?string $licencePlate = null;
|
private ?string $licensePlate = null;
|
||||||
|
|
||||||
#[ORM\Column(length: 20, unique: true, nullable: true)]
|
#[ORM\Column(length: 20, unique: true, nullable: true)]
|
||||||
#[Groups(['shipment:read'])]
|
#[Groups(['shipment:read'])]
|
||||||
@@ -162,14 +162,14 @@ class Shipment
|
|||||||
return $this->id;
|
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
|
public function getIdentificationNumber(): ?string
|
||||||
|
|||||||
@@ -7,14 +7,13 @@ namespace App\Entity;
|
|||||||
use ApiPlatform\Metadata\ApiResource;
|
use ApiPlatform\Metadata\ApiResource;
|
||||||
use ApiPlatform\Metadata\Get;
|
use ApiPlatform\Metadata\Get;
|
||||||
use ApiPlatform\Metadata\GetCollection;
|
use ApiPlatform\Metadata\GetCollection;
|
||||||
use App\Repository\StatutRepository;
|
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Symfony\Component\Serializer\Attribute\Groups;
|
use Symfony\Component\Serializer\Attribute\Groups;
|
||||||
use Symfony\Component\Serializer\Attribute\SerializedName;
|
use Symfony\Component\Serializer\Attribute\SerializedName;
|
||||||
|
|
||||||
#[ORM\Entity(repositoryClass: StatutRepository::class)]
|
#[ORM\Entity]
|
||||||
#[ApiResource(
|
#[ApiResource(
|
||||||
operations: [
|
operations: [
|
||||||
new Get(
|
new Get(
|
||||||
|
|||||||
@@ -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()
|
|
||||||
// ;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
@@ -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()
|
|
||||||
// ;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
@@ -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()
|
|
||||||
// ;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
@@ -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()
|
|
||||||
// ;
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
@@ -150,11 +150,7 @@ final readonly class BuildingCaseWeightsReportProvider implements ProviderInterf
|
|||||||
|
|
||||||
private function resolveDailyGainKg(?string $breedCode): float
|
private function resolveDailyGainKg(?string $breedCode): float
|
||||||
{
|
{
|
||||||
return match ($breedCode) {
|
return 1.3;
|
||||||
'34' => 1.3, // Limousin
|
|
||||||
'38' => 1.5, // Charolais
|
|
||||||
default => 1.4, // Other breeds
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -178,39 +178,9 @@
|
|||||||
/* =========================
|
/* =========================
|
||||||
FOOTER VACCINS / NOTES
|
FOOTER VACCINS / NOTES
|
||||||
========================= */
|
========================= */
|
||||||
.footer {
|
.footer {
|
||||||
margin-top: 6px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.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; }
|
|
||||||
|
|
||||||
/* Header droit sans bordures par défaut */
|
/* Header droit sans bordures par défaut */
|
||||||
.header-right-free,
|
.header-right-free,
|
||||||
@@ -363,68 +333,46 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!-- =========================
|
<!-- =========================
|
||||||
FOOTER (traitements / vaccins)
|
FOOTER (traitements / vaccins)
|
||||||
========================= -->
|
========================= -->
|
||||||
{# <table class="footer">#}
|
<table class="footer" style="border-collapse:collapse; margin-top: 32px">
|
||||||
{# <colgroup>#}
|
<tr>
|
||||||
{# #}{# 14 colonnes pour gérer proprement les colspan #}
|
<td style="height: 20px; border: 0" colspan="4"></td>
|
||||||
{# <col style="width:12.5%">#}
|
<td style="font-weight: 700" colspan="2">Grippe</td>
|
||||||
{# <col style="width:8%">#}
|
<td style="font-weight: 700" colspan="2">Protivity</td>
|
||||||
{# <col style="width:12.5%">#}
|
</tr>
|
||||||
{# <col style="width:8%">#}
|
<tr>
|
||||||
{# <col style="width:12.5%">#}
|
<td style="height: 20px">Date</td>
|
||||||
{# <col style="width:8%">#}
|
<td>Antibiotique</td>
|
||||||
{# <col style="width:12.5%">#}
|
<td>Date</td>
|
||||||
{# <col style="width:8%">#}
|
<td>Antero</td>
|
||||||
{# <col style="width:8%">#}
|
<td>Date</td>
|
||||||
{# <col style="width:6%">#}
|
<td>Intranasale</td>
|
||||||
{# <col style="width:8%">#}
|
<td>Date</td>
|
||||||
{# <col style="width:8%">#}
|
<td>Rappel 30 jours</td>
|
||||||
{# <col style="width:6%">#}
|
</tr>
|
||||||
{# <col style="width:8%">#}
|
<tr>
|
||||||
{# </colgroup>#}
|
<td style="height: 20px"></td>
|
||||||
|
<td></td>
|
||||||
{# <tr>#}
|
<td></td>
|
||||||
{# <th colspan="2">Date</th>#}
|
<td></td>
|
||||||
{# <th colspan="2">Antibiotique</th>#}
|
<td></td>
|
||||||
{# <th colspan="2">Date</th>#}
|
<td></td>
|
||||||
{# <th colspan="2">Antero</th>#}
|
<td></td>
|
||||||
{# <th colspan="3">Grippe</th>#}
|
<td></td>
|
||||||
{# <th colspan="3">Protivity</th>#}
|
</tr>
|
||||||
{# </tr>#}
|
<tr>
|
||||||
|
<td style="height: 20px"></td>
|
||||||
{# <tr>#}
|
<td></td>
|
||||||
{# <td colspan="2"></td>#}
|
<td></td>
|
||||||
{# <td colspan="2"></td>#}
|
<td></td>
|
||||||
{# <td colspan="2"></td>#}
|
<td></td>
|
||||||
{# <td colspan="2"></td>#}
|
<td></td>
|
||||||
|
<td></td>
|
||||||
{# <td class="small">Date</td>#}
|
<td></td>
|
||||||
{# <td colspan="2" class="small">Intranasale</td>#}
|
</tr>
|
||||||
|
</table>
|
||||||
{# <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>#}
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -275,7 +275,7 @@
|
|||||||
<div class="meta">
|
<div class="meta">
|
||||||
<p>Transporteur : {{ shipment.carrier ? shipment.carrier.name : '-' }}</p>
|
<p>Transporteur : {{ shipment.carrier ? shipment.carrier.name : '-' }}</p>
|
||||||
<p>Mode d'expédition : {{ shipment.truck ? shipment.truck.name : '-' }}</p>
|
<p>Mode d'expédition : {{ shipment.truck ? shipment.truck.name : '-' }}</p>
|
||||||
<p>Immatriculation : {{ shipment.licencePlate ?? '-' }}</p>
|
<p>Immatriculation : {{ shipment.licensePlate ?? '-' }}</p>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user