-
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.
Merge pull request #82 from abes-esr/ITEM-91-Migrer-le-stepper-modifi…
…cation Item 91 migrer le stepper modification
- Loading branch information
Showing
21 changed files
with
703 additions
and
215 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<template> | ||
<v-dialog v-model="dialog" width="500"> | ||
<v-skeleton-loader | ||
:loading="isLoading" | ||
class="mx-auto" | ||
elevation="12" | ||
width="500" | ||
type="table-heading, list-item-two-line, table-tfoot" | ||
> | ||
<v-card> | ||
<v-card-title>Suppression</v-card-title> | ||
<v-divider></v-divider> | ||
<v-card-text>Êtes-vous certain de vouloir supprimer définitivement cette demande ?</v-card-text> | ||
<v-card-actions> | ||
|
||
<v-container class="d-flex justify-space-between"> | ||
<v-btn @click="cancel()">Annuler</v-btn> | ||
<v-btn @click="confirm()">Confirmer</v-btn> | ||
</v-container> | ||
</v-card-actions> | ||
</v-card> | ||
</v-skeleton-loader> | ||
</v-dialog> | ||
</template> | ||
<script setup> | ||
import demandesService from '@/service/DemandesService'; | ||
import router from '@/router'; | ||
import { ref } from 'vue'; | ||
const dialog = defineModel(); | ||
const emits = defineEmits(['supp']) | ||
const props = defineProps({ | ||
returnToAccueil: { | ||
required: false, | ||
type: Boolean, | ||
}, | ||
demande: { | ||
required: true, | ||
type: Object | ||
} | ||
}) | ||
const isLoading = ref(false); | ||
function confirm() { | ||
isLoading.value = true; | ||
demandesService.deleteDemande(props.demande.id, props.demande.type) | ||
.then(()=>{ | ||
if(props.returnToAccueil){ | ||
router.push('/accueil'); | ||
} | ||
emits('supp'); | ||
}).finally(() => { | ||
isLoading.value = false; | ||
dialog.value = false; | ||
}) | ||
} | ||
function cancel() { | ||
dialog.value = false; | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<template> | ||
<v-card elevation="0"> | ||
<v-card-title style="background-color: #295494; color: white" class="d-flex justify-space-between"> | ||
<span><slot></slot></span> | ||
<v-btn depressed variant="text" @click="deleted()" prepend-icon="mdi-delete">Supprimer</v-btn> | ||
</v-card-title> | ||
<v-card-actions class="py-6"> | ||
<v-spacer></v-spacer> | ||
<v-btn | ||
rounded | ||
x-large | ||
variant="flat" | ||
color="#295494" | ||
ref="fileLinkBtn" | ||
:href="fileLink" | ||
:disabled="isDisabled" | ||
@click="clicked()" | ||
append-icon="mdi-cloud-download" | ||
:download="fileName">Télécharger le fichier de correspondances PPN/EPN | ||
</v-btn> | ||
<v-spacer></v-spacer> | ||
</v-card-actions> | ||
</v-card> | ||
</template> | ||
<script setup> | ||
const emits = defineEmits(['deleted','clicked']); | ||
const props = defineProps({ | ||
fileName: { | ||
required: true, | ||
type: String | ||
}, | ||
fileLink: { | ||
required: true, | ||
type: String | ||
}, | ||
isDisabled: { | ||
type: Boolean, | ||
default: false | ||
} | ||
}) | ||
function clicked(){ | ||
emits('clicked'); | ||
} | ||
function deleted() { | ||
emits('deleted'); | ||
} | ||
</script> | ||
<style scoped> | ||
v-btn{ | ||
color: red !important; | ||
} | ||
</style> |
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,67 @@ | ||
<template> | ||
<v-card flat :loading="isLoading"> | ||
<v-card-title style="background-color: #295494; color: white" class="d-flex justify-space-between"> | ||
<span>Choix du type de traitement</span> | ||
<v-btn depressed variant="text" @click="deleted()" prepend-icon="mdi-delete">Supprimer</v-btn> | ||
</v-card-title> | ||
|
||
<v-card-text class="pa-0 ma-0"> | ||
<v-hover v-slot="{ isHovering, props }" v-for="traitement in listTraitement" :key="traitement.id"> | ||
<div v-bind="props" :class="`btn-perso elevation-${isHovering ? 6 : 2} pa-5 ma-1 d-flex justify-space-between`" @click="onClick(traitement)"> | ||
<v-row class="align-center"> | ||
<v-col cols="12" sm="3" class="d-flex justify-center"> | ||
<v-icon size="xx-large" dark color="primary">{{ getIcon(traitement) }}</v-icon> | ||
</v-col> | ||
<v-col cols="12" sm="9" class="d-flex justify-start"><p class="group" >{{ traitement.libelle }}</p></v-col> | ||
</v-row> | ||
</div> | ||
</v-hover> | ||
</v-card-text> | ||
</v-card> | ||
</template> | ||
|
||
<script setup> | ||
import { onMounted, ref } from 'vue'; | ||
import DemandesService from '@/service/DemandesService'; | ||
const typeTraitement = defineModel(); | ||
const emits = defineEmits(['clicked', 'deleted']); | ||
const props = defineProps({ isLoading: { type: Boolean } }); | ||
const listTraitement = ref([]); | ||
onMounted(() => { | ||
DemandesService.getTypeTraitement() | ||
.then(response => { | ||
listTraitement.value = response.data; | ||
}); | ||
}); | ||
function getIcon(traitement) { | ||
if (traitement.id === 1) return 'mdi-plus'; | ||
if (traitement.id === 2) return 'mdi-pencil'; | ||
if (traitement.id === 3) return 'mdi-redo'; | ||
if (traitement.id === 4) return 'mdi-close'; | ||
if (traitement.id === 5) return 'mdi-delete'; | ||
return 'mdi-nuke'; | ||
} | ||
function onClick(traitement) { | ||
typeTraitement.value = traitement; | ||
emits('clicked'); | ||
} | ||
function deleted() { | ||
emits('deleted'); | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.btn-perso:hover { | ||
cursor: pointer; | ||
} | ||
.group { | ||
font-size: x-large; | ||
} | ||
</style> |
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
File renamed without changes.
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
File renamed without changes.
Oops, something went wrong.