chore: update frontend configuration
This commit is contained in:
@@ -5,7 +5,7 @@ import { useToast } from './useToast'
|
||||
const constructeurs = ref([])
|
||||
const loading = ref(false)
|
||||
|
||||
export function useConstructeurs() {
|
||||
export function useConstructeurs () {
|
||||
const { get, post, patch, delete: del } = useApi()
|
||||
const { showSuccess, showError } = useToast()
|
||||
|
||||
@@ -43,7 +43,7 @@ export function useConstructeurs() {
|
||||
return result
|
||||
} catch (error) {
|
||||
console.error('Erreur lors de la création du constructeur:', error)
|
||||
showError("Impossible de créer le constructeur")
|
||||
showError('Impossible de créer le constructeur')
|
||||
return { success: false, error: error.message }
|
||||
} finally {
|
||||
loading.value = false
|
||||
@@ -66,7 +66,7 @@ export function useConstructeurs() {
|
||||
return result
|
||||
} catch (error) {
|
||||
console.error('Erreur lors de la mise à jour du constructeur:', error)
|
||||
showError("Impossible de mettre à jour le constructeur")
|
||||
showError('Impossible de mettre à jour le constructeur')
|
||||
return { success: false, error: error.message }
|
||||
} finally {
|
||||
loading.value = false
|
||||
@@ -86,14 +86,14 @@ export function useConstructeurs() {
|
||||
return result
|
||||
} catch (error) {
|
||||
console.error('Erreur lors de la suppression du constructeur:', error)
|
||||
showError("Impossible de supprimer le constructeur")
|
||||
showError('Impossible de supprimer le constructeur')
|
||||
return { success: false, error: error.message }
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const getConstructeurById = (id) => constructeurs.value.find(item => item.id === id)
|
||||
const getConstructeurById = id => constructeurs.value.find(item => item.id === id)
|
||||
|
||||
return {
|
||||
constructeurs,
|
||||
@@ -103,6 +103,6 @@ export function useConstructeurs() {
|
||||
createConstructeur,
|
||||
updateConstructeur,
|
||||
deleteConstructeur,
|
||||
getConstructeurById,
|
||||
getConstructeurById
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user