-
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.
Showing
9 changed files
with
215 additions
and
41 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
21 changes: 11 additions & 10 deletions
21
src/components/TypeExemp.vue → src/components/Exemp/TypeExemp.vue
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,63 @@ | ||
<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> | ||
.group { | ||
font-size: x-large; | ||
} | ||
</style> |
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
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