Finalisation réception marchandise, ajout de composant UI et ajout de fixtures (!7)
| Numéro du ticket | Titre du ticket | |------------------|-----------------| | | | ## 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: https://gitea.malio.fr/MALIO-DEV/Ferme/pulls/7 Co-authored-by: tristan <tristan@yuno.malio.fr> Co-committed-by: tristan <tristan@yuno.malio.fr>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user