[#320] Modification réception terminé étape 2 #21
@@ -144,19 +144,7 @@ import type {VehicleData} from '~/services/dto/vehicle-data'
|
|||||||
import {getVehicleList} from '~/services/vehicle'
|
import {getVehicleList} from '~/services/vehicle'
|
||||||
import {RECEPTION_TYPE_CODES, SUPLLIER_CODE} from "~/utils/constants";
|
import {RECEPTION_TYPE_CODES, SUPLLIER_CODE} from "~/utils/constants";
|
||||||
import {deleteReceptionBovine, getReceptionBovineList} from "~/services/reception-bovine";
|
import {deleteReceptionBovine, getReceptionBovineList} from "~/services/reception-bovine";
|
||||||
|
import type {ReceptionFormData} from "~/services/dto/reception-data";
|
||||||
type ReceptionFormData = {
|
|
||||||
licensePlate: string
|
|
||||||
receptionDate: string
|
|
||||||
receptionTypeId: string
|
|
||||||
userId: string
|
|
||||||
supplierId: string
|
|
||||||
addressId: string
|
|
||||||
truckId: string
|
|
||||||
carrierId: string
|
|
||||||
driverId: string
|
|
||||||
vehicleId: string
|
|
||||||
}
|
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const receptionStore = useReceptionStore()
|
const receptionStore = useReceptionStore()
|
||||||
|
|||||||
@@ -124,7 +124,6 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {useReceptionStore} from '~/stores/reception'
|
import {useReceptionStore} from '~/stores/reception'
|
||||||
import type {ReceptionTypeData} from '~/services/dto/reception-type-data'
|
|
||||||
import type {UserData} from '~/services/dto/user-data'
|
import type {UserData} from '~/services/dto/user-data'
|
||||||
import {getUsers} from '~/services/auth'
|
import {getUsers} from '~/services/auth'
|
||||||
import {useAuthStore} from '~/stores/auth'
|
import {useAuthStore} from '~/stores/auth'
|
||||||
@@ -133,29 +132,16 @@ import {getSupplierList} from '~/services/supplier'
|
|||||||
import type {TruckData} from '~/services/dto/truck-data'
|
import type {TruckData} from '~/services/dto/truck-data'
|
||||||
import {getTruckList} from '~/services/truck'
|
import {getTruckList} from '~/services/truck'
|
||||||
import type {CarrierData} from '~/services/dto/carrier-data'
|
import type {CarrierData} from '~/services/dto/carrier-data'
|
||||||
import {getCarrier, getCarrierList} from '~/services/carrier'
|
import {getCarrierList} from '~/services/carrier'
|
||||||
import type {DriverData} from '~/services/dto/driver-data'
|
import type {DriverData} from '~/services/dto/driver-data'
|
||||||
import {getDriverList} from '~/services/driver'
|
import {getDriverList} from '~/services/driver'
|
||||||
import type {VehicleData} from '~/services/dto/vehicle-data'
|
import type {VehicleData} from '~/services/dto/vehicle-data'
|
||||||
import {getVehicleList} from '~/services/vehicle'
|
import {getVehicleList} from '~/services/vehicle'
|
||||||
import {SUPLLIER_CODE} from "~/utils/constants";
|
import {SUPLLIER_CODE} from "~/utils/constants";
|
||||||
import {deleteReceptionBovine, getReceptionBovineList} from "~/services/reception-bovine";
|
import {deleteReceptionBovine, getReceptionBovineList} from "~/services/reception-bovine";
|
||||||
import type {ReceptionData} from "~/services/dto/reception-data";
|
import type {ReceptionData, ReceptionFormData} from "~/services/dto/reception-data";
|
||||||
import {getReception} from "~/services/reception";
|
import {getReception} from "~/services/reception";
|
||||||
|
|
||||||
type ReceptionFormData = {
|
|
||||||
licensePlate: string
|
|
||||||
receptionDate: string
|
|
||||||
receptionTypeId: string
|
|
||||||
userId: string
|
|
||||||
supplierId: string
|
|
||||||
addressId: string
|
|
||||||
truckId: string
|
|
||||||
carrierId: string
|
|
||||||
driverId: string
|
|
||||||
vehicleId: string
|
|
||||||
}
|
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const receptionStore = useReceptionStore()
|
const receptionStore = useReceptionStore()
|
||||||
const form = reactive<ReceptionFormData>({
|
const form = reactive<ReceptionFormData>({
|
||||||
@@ -185,6 +171,7 @@ const isLoadingDrivers = ref(false)
|
|||||||
const vehicles = ref<VehicleData[]>([])
|
const vehicles = ref<VehicleData[]>([])
|
||||||
const isLoadingVehicles = ref(false)
|
const isLoadingVehicles = ref(false)
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
|
|
||||||
// Empêche les watchers de reset des champs pendant le remplissage initial
|
// Empêche les watchers de reset des champs pendant le remplissage initial
|
||||||
const isHydrating = ref(false)
|
const isHydrating = ref(false)
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|||||||
@@ -59,3 +59,16 @@ export type ReceptionPayload = {
|
|||||||
carrier?: string | null
|
carrier?: string | null
|
||||||
driver?: string | null
|
driver?: string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type ReceptionFormData = {
|
||||||
|
licensePlate: string
|
||||||
|
receptionDate: string
|
||||||
|
receptionTypeId: string
|
||||||
|
userId: string
|
||||||
|
supplierId: string
|
||||||
|
addressId: string
|
||||||
|
truckId: string
|
||||||
|
carrierId: string
|
||||||
|
driverId: string
|
||||||
|
vehicleId: string
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user