feat : finalisation de l'étape 1 "Réception" (formulaire)

This commit is contained in:
2026-01-27 16:59:36 +01:00
parent 9ae073e69e
commit f901d52324
46 changed files with 1977 additions and 88 deletions

View File

@@ -1,5 +1,5 @@
import { defineStore } from 'pinia'
import type { ReceptionData } from '~/services/dto/reception-data'
import type { ReceptionData, ReceptionPayload } from '~/services/dto/reception-data'
import { createReception, getReception, updateReception } from '~/services/reception'
const isReceptionData = (value: unknown): value is ReceptionData => {
@@ -31,7 +31,7 @@ export const useReceptionStore = defineStore('reception', {
this.current = result
return result
},
async createReception(payload: Partial<ReceptionData> = {}) {
async createReception(payload: ReceptionPayload = {}) {
this.isLoading = true
const result = await createReception(payload).finally(() => {
this.isLoading = false
@@ -43,7 +43,7 @@ export const useReceptionStore = defineStore('reception', {
this.current = result
return result
},
async updateReception(id: number, payload: Partial<ReceptionData>) {
async updateReception(id: number, payload: ReceptionPayload) {
this.isLoading = true
const result = await updateReception(id, payload).finally(() => {
this.isLoading = false