-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ITEM-366 Ajouter bouton stop dans le tableau de bord et de l'appel au ws
- Loading branch information
SamuelQuetin
committed
Dec 3, 2024
1 parent
04b9abd
commit 3d0469e
Showing
4 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<template> | ||
<v-btn icon="mdi-stop" variant="plain" @click="click"> | ||
</v-btn> | ||
<dialog-confirmation-stop v-model="dialog" :id="id" @stop="emits('stop')"> | ||
</dialog-confirmation-stop> | ||
</template> | ||
<script setup> | ||
import DialogConfirmationStop from "@/components/Supp/DialogConfirmationStop.vue"; | ||
import {ref} from "vue"; | ||
const emits = defineEmits(['stop']) | ||
const props = defineProps({ | ||
id:{ | ||
required:true, | ||
type:Number | ||
} | ||
}) | ||
const dialog = ref(false); | ||
function click() { | ||
dialog.value = true | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<template> | ||
<v-dialog v-model="dialog" width="500"> | ||
<v-card> | ||
<v-card-title>Confirmation</v-card-title> | ||
<v-card-text> | ||
Voulez vous vraiment stopper le traitement sur la demande N°{{id}} ? | ||
</v-card-text> | ||
<v-card-actions> | ||
<v-btn @click="dialog=false">Refuser</v-btn> | ||
<v-btn @click="stopDemande">Confirmer</v-btn> | ||
</v-card-actions> | ||
</v-card> | ||
</v-dialog> | ||
</template> | ||
<script setup> | ||
import itemService from "@/service/ItemService"; | ||
const emits = defineEmits(['stop']) | ||
const dialog = defineModel(); | ||
const props = defineProps({ | ||
id:{ | ||
required:true, | ||
type:Number | ||
} | ||
}) | ||
function stopDemande(){ | ||
itemService.stopDemande(props.id).finally(() => { | ||
dialog.value = false; | ||
emits('stop'); | ||
}); | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters