Skip to content

Commit

Permalink
TEM-371 FEAT : Afficher état dans tableau de bord avec bonne couleur
Browse files Browse the repository at this point in the history
modif theme
  • Loading branch information
SamuelQuetin committed Dec 5, 2024
1 parent 3d0469e commit 5af2751
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
7 changes: 5 additions & 2 deletions src/plugins/vuetify.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ const itemLightTheme = {
disabled: '#808080',
archived: '#795548',
saisised: '#333333',
waited: '#EC6839'
waited: '#FFC400',
stopped: '#EC6839'
},
variables: {
'border-color': '#000000',
Expand Down Expand Up @@ -86,7 +87,8 @@ const itemDarkTheme = {
disabled: '#808080',
archived: '#795548',
saisised: '#333333',
waited: '#EC6839'
waited: '#FFC400',
stopped: '#EC6839'
},
variables: {
'border-color': '#FFFFFF',
Expand Down Expand Up @@ -129,6 +131,7 @@ const itemRngTheme = {
archived: generateRandomHexColor(),
saisised: generateRandomHexColor(),
waited: generateRandomHexColor(),
stopped: generateRandomHexColor()
}
}

Expand Down
1 change: 0 additions & 1 deletion src/service/ItemService.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export class ItemService {
}

login(login, password) {
const url = import.meta.env.VITE_API_URL + `signin`;
//console.info('appel:' + url);

return this.client.post(`signin`, {username: login, password: password})
Expand Down
16 changes: 9 additions & 7 deletions src/views/Suppression/SuppTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
<v-chip color="success" variant="flat" v-else-if="item.etatDemande === 'Terminé'">Terminé</v-chip>
<v-chip color="archived" variant="flat" v-else-if="item.etatDemande === 'Archivé'">Archivé</v-chip>
<v-chip color="error" variant="flat" v-else-if="item.etatDemande === 'En erreur'">En erreur</v-chip>
<v-chip color="stopped" variant="flat" v-else-if="item.etatDemande === 'Interrompue'">Interrompue</v-chip>
<v-chip color="info" variant="flat" v-else>{{ item.etatDemande }}</v-chip>
<!-- Cas : ne correspont à aucun cas -->
</td>
Expand Down Expand Up @@ -232,7 +233,8 @@ const listStatut = [
'En attente',
'En cours de traitement',
'Terminé',
'En erreur'
'En erreur',
'Interrompue'
];
const listTypeTraitement = ref([]);
const contentsDemandesFromServer = ref([]);
Expand Down Expand Up @@ -395,12 +397,12 @@ function throwError(error) {
}
function colorProgressBar(item) {
if (item.pourcentageProgressionTraitement === 100) {
if (item.etatDemande === 'Terminé') {
return 'success';
} else if (item.etatDemande === 'En erreur') {
return 'error';
}
if (item.etatDemande === 'Terminé') {
return 'success';
} else if (item.etatDemande === 'En erreur') {
return 'error';
} else if (item.etatDemande === 'Interrompue') {
return 'stopped';
}
return 'grey-lighten-1';
}
Expand Down

0 comments on commit 5af2751

Please sign in to comment.