Skip to content

Commit

Permalink
Merge pull request #112 from abes-esr/fix-loading-pas-assez-visible
Browse files Browse the repository at this point in the history
FIX loading pas assez visible + ajout couleur theme dans le spinner d…
  • Loading branch information
jvk88511334 authored Aug 28, 2024
2 parents 3befdbc + 9ffd871 commit 59cbc67
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/components/Exemp/TypeExemp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
<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-overlay v-if="isLoading" v-model="overlay" class="justify-center align-center" contained>
<v-progress-circular
color="info"
indeterminate
></v-progress-circular>
</v-overlay>
<v-hover v-slot="{ isHovering, props }" v-for="exemp in listExemp" :key="exemp.numTypeExemp">
<div v-bind="props" :class="`btn-perso elevation-${isHovering ? 6 : 2} pa-5 ma-1 d-flex justify-space-between`" @click="onClick(exemp)">
<v-row class="align-center">
Expand All @@ -27,6 +33,7 @@ const typeExemp = defineModel();
const emits = defineEmits(['click', 'deleted']);
const props = defineProps({ isLoading: { type: Boolean } });
const listExemp = ref([]);
const overlay = ref(true);
onMounted(() => {
DemandesService.getTypeExemp()
Expand Down
8 changes: 7 additions & 1 deletion src/components/Modif/TypeTraitement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
</v-card-title>

<v-card-text class="pa-0 ma-0">
<v-overlay v-if="isLoading" v-model="overlay" class="justify-center align-center" contained>
<v-progress-circular
color="info"
indeterminate
></v-progress-circular>
</v-overlay>
<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">
Expand All @@ -28,7 +34,7 @@ const typeTraitement = defineModel();
const emits = defineEmits(['clicked', 'deleted']);
const props = defineProps({ isLoading: { type: Boolean } });
const listTraitement = ref([]);
const overlay = ref(true);
onMounted(() => {
DemandesService.getTypeTraitement()
.then(response => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Simulation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<v-overlay v-model="isLoading" class="justify-center align-center">
<v-progress-circular
color="blue-lighten-3"
color="info"
indeterminate
:size="128"
:width="12"
Expand Down
9 changes: 9 additions & 0 deletions src/components/Supp/TypeFile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
<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-overlay v-if="isLoading" v-model="overlay" class="justify-center align-center" contained>
<v-progress-circular
color="info"
indeterminate
></v-progress-circular>
</v-overlay>
<v-hover v-slot="{ isHovering, props }" v-for="type in types" :key="type">
<div v-bind="props" :class="`btn-perso elevation-${isHovering ? 6 : 2} pa-5 ma-1 d-flex justify-space-between`" @click="onClick(type)">
<v-row class="align-center">
Expand All @@ -22,6 +28,8 @@
</template>
<script setup>
import { ref } from 'vue';
const emits = defineEmits(['clicked','deleted'])
const props = defineProps({
isLoading: {
Expand All @@ -31,6 +39,7 @@ const props = defineProps({
})
const model = defineModel();
const types = ['PPN','EPN'];
const overlay = ref(true);
function onClick(type) {
model.value = type;
Expand Down

0 comments on commit 59cbc67

Please sign in to comment.