Skip to content

Commit

Permalink
FEAT ITEM-355-front-utiliser-la-couche-service-pour-connaitre-le-role…
Browse files Browse the repository at this point in the history
…-en-boolean-exploiter-ce-booleen-pour-masquer-les-elements-relatif-a-l-iln-dans-le-tableau :

     - modification de l'en-tête des tableaux dans ModifTable.vue, RecouvTable.vue et SuppTable.vue
  • Loading branch information
EryneKL committed Nov 6, 2024
1 parent b0c03ce commit d5e702b
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 36 deletions.
44 changes: 31 additions & 13 deletions src/views/Modification/ModifTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</v-tooltip>
</v-chip>
</v-container>
<v-data-table :headers="headingsDemandes" :items="contentsDemandesFrontFiltered" :items-length="totalItemsFound"
<v-data-table :headers="filteredHeadingsDemandes" :items="contentsDemandesFrontFiltered" :items-length="totalItemsFound"
:loading="!isDataLoaded" show-expand :sort-by="sortBy"
item-key="id">
<template v-slot:body.prepend>
Expand Down Expand Up @@ -132,27 +132,32 @@ import DialogSuppression from '@/components/Dialog/DialogSuppression.vue';
import DialogCommentaire from '@/components/Dialog/DialogCommentaire.vue';
import MenuDownloadFile from '@/components/MenuDownloadFile.vue';
import moment from 'moment/moment';
import {useAuthStore} from "@/store/authStore";
//Emit
const emit = defineEmits(['backendError', 'backendSuccess']);
//Data
const isAdmin = useAuthStore().isAdmin();
const extendedAllILN = ref(false);
const headingsDemandes = ref([
const headingsDemandes = [
{
title: '',
key: 'data-table-expand',
align: 'center'
align: 'center',
display: true,
},
{
title: 'N° de Demande',
key: 'id',
align: 'center'
align: 'center',
display: true,
},
{
title: 'Crée le',
key: 'dateCreation',
align: 'center',
display: true,
sort: (d1, d2) => {
const date1 = moment(d1, 'DD/MM/yyyy HH:mm')
.valueOf();
Expand All @@ -167,6 +172,7 @@ const headingsDemandes = ref([
title: 'Mise à jour',
key: 'dateModification',
align: 'center',
display: true,
sort: (d1, d2) => {
const date1 = moment(d1, 'DD/MM/yyyy HH:mm')
.valueOf();
Expand All @@ -180,47 +186,59 @@ const headingsDemandes = ref([
{
title: 'ILN',
key: 'iln',
align: 'center'
align: 'center',
display: isAdmin,
},
{
title: 'RCR',
key: 'rcr',
align: 'center'
align: 'center',
display: true,
},
{
title: 'Zones et sous zones',
key: 'zone',
align: 'center'
align: 'center',
display: true,
},
{
title: 'Traitement',
key: 'traitement',
align: 'center'
align: 'center',
display: true,
},
{
title: 'Statut',
key: 'etatDemande',
align: 'center'
align: 'center',
display: true,
},
{
title: 'Progression',
key: 'pourcentageProgressionTraitement',
value: 'pourcentageProgressionTraitement',
align: 'center'
align: 'center',
display: true,
},
{
title: 'Fichiers',
key: 'filesToDownload',
value: 'filesToDownload',
align: 'center'
align: 'center',
display: true,
},
{
title: 'Action',
key: 'archiveOrCancel',
value: 'archiveOrCancel',
align: 'center'
align: 'center',
display: true,
}
]);
];
const filteredHeadingsDemandes = computed(() =>
headingsDemandes.filter(heading => heading.display !== false)
)
const listStatut = [
'En saisie',
'En attente',
Expand Down
41 changes: 29 additions & 12 deletions src/views/Recouvrement/RecouvTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</v-tooltip>
</v-chip>
</v-container>
<v-data-table :headers="headingsDemandes" :items="contentsDemandesFrontFiltered" :items-length="totalItemsFound"
<v-data-table :headers="filteredHeadingsDemandes" :items="contentsDemandesFrontFiltered" :items-length="totalItemsFound"
:loading="!isDataLoaded" show-expand :sort-by="sortBy"
item-key="id">
<template v-slot:body.prepend>
Expand Down Expand Up @@ -125,27 +125,32 @@ import DialogSuppression from '@/components/Dialog/DialogSuppression.vue';
import DialogCommentaire from '@/components/Dialog/DialogCommentaire.vue';
import MenuDownloadFile from '@/components/MenuDownloadFile.vue';
import moment from 'moment/moment';
import {useAuthStore} from "@/store/authStore";
//Emit
const emit = defineEmits(['backendError', 'backendSuccess']);
//Data
const isAdmin = useAuthStore().isAdmin();
const extendedAllILN = ref(false);
const headingsDemandes = ref([
const headingsDemandes = [
{
title: '',
key: 'data-table-expand',
align: 'center'
align: 'center',
display: true,
},
{
title: 'N° de Demande',
key: 'id',
align: 'center'
align: 'center',
display: true,
},
{
title: 'Crée le',
key: 'dateCreation',
align: 'center',
display: true,
sort: (d1, d2) => {
const date1 = moment(d1, 'DD/MM/yyyy HH:mm')
.valueOf();
Expand All @@ -160,6 +165,7 @@ const headingsDemandes = ref([
title: 'Mise à jour',
key: 'dateModification',
align: 'center',
display: true,
sort: (d1, d2) => {
const date1 = moment(d1, 'DD/MM/yyyy HH:mm')
.valueOf();
Expand All @@ -173,42 +179,53 @@ const headingsDemandes = ref([
{
title: 'ILN',
key: 'iln',
align: 'center'
align: 'center',
display: isAdmin,
},
{
title: 'RCR',
key: 'rcr',
align: 'center'
align: 'center',
display: true,
},
{
title: 'Index',
key: 'indexRecherche',
align: 'center'
align: 'center',
display: true,
},
{
title: 'Statut',
key: 'etatDemande',
align: 'center'
align: 'center',
display: true,
},
{
title: 'Progression',
key: 'pourcentageProgressionTraitement',
value: 'pourcentageProgressionTraitement',
align: 'center'
align: 'center',
display: true,
},
{
title: 'Fichiers',
key: 'filesToDownload',
value: 'filesToDownload',
align: 'center'
align: 'center',
display: true,
},
{
title: 'Action',
key: 'archiveOrCancel',
value: 'archiveOrCancel',
align: 'center'
align: 'center',
display: true,
}
]);
];
const filteredHeadingsDemandes = computed(() =>
headingsDemandes.filter(heading => heading.display !== false)
)
const listStatut = [
'En saisie',
'En attente',
Expand Down
38 changes: 27 additions & 11 deletions src/views/Suppression/SuppTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</v-tooltip>
</v-chip>
</v-container>
<v-data-table :headers="headingsDemandes" :items="contentsDemandesFrontFiltered" :items-length="totalItemsFound"
<v-data-table :headers="filteredHeadingsDemandes" :items="contentsDemandesFrontFiltered" :items-length="totalItemsFound"
:loading="!isDataLoaded" show-expand :sort-by="sortBy"
item-key="id">
<template v-slot:body.prepend>
Expand Down Expand Up @@ -119,27 +119,32 @@ import DialogSuppression from '@/components/Dialog/DialogSuppression.vue';
import DialogCommentaire from '@/components/Dialog/DialogCommentaire.vue';
import MenuDownloadFile from '@/components/MenuDownloadFile.vue';
import moment from 'moment/moment';
import {useAuthStore} from "@/store/authStore";
//Emit
const emit = defineEmits(['backendError', 'backendSuccess']);
//Data
const isAdmin = useAuthStore().isAdmin();
const extendedAllILN = ref(true); // todo Pour les tests il faut laisser à true/ pour la prod faudra mettre à false
const headingsDemandes = ref([
const headingsDemandes = [
{
title: '',
key: 'data-table-expand',
align: 'center'
align: 'center',
display: true,
},
{
title: 'N° de Demande',
key: 'id',
align: 'center'
align: 'center',
display: true,
},
{
title: 'Crée le',
key: 'dateCreation',
align: 'center',
display: true,
sort: (d1, d2) => {
const date1 = moment(d1, 'DD/MM/yyyy HH:mm')
.valueOf();
Expand All @@ -154,6 +159,7 @@ const headingsDemandes = ref([
title: 'Mise à jour',
key: 'dateModification',
align: 'center',
display: true,
sort: (d1, d2) => {
const date1 = moment(d1, 'DD/MM/yyyy HH:mm')
.valueOf();
Expand All @@ -167,37 +173,47 @@ const headingsDemandes = ref([
{
title: 'ILN',
key: 'iln',
align: 'center'
align: 'center',
display: isAdmin,
},
{
title: 'RCR',
key: 'rcr',
align: 'center'
align: 'center',
display: true,
},
{
title: 'Statut',
key: 'etatDemande',
align: 'center'
align: 'center',
display: true,
},
{
title: 'Progression',
key: 'pourcentageProgressionTraitement',
value: 'pourcentageProgressionTraitement',
align: 'center'
align: 'center',
display: true,
},
{
title: 'Fichiers',
key: 'filesToDownload',
value: 'filesToDownload',
align: 'center'
align: 'center',
display: true,
},
{
title: 'Action',
key: 'archiveOrCancel',
value: 'archiveOrCancel',
align: 'center'
align: 'center',
display: true,
}
]);
];
const filteredHeadingsDemandes = computed(() =>
headingsDemandes.filter(heading => heading.display !== false)
)
const listStatut = [
'En saisie',
'En attente',
Expand Down

0 comments on commit d5e702b

Please sign in to comment.