Skip to content

Commit

Permalink
- Adaptation des tables pour récupération du nombre d'exemplaire par …
Browse files Browse the repository at this point in the history
…demande
  • Loading branch information
jvk88511334 committed Nov 8, 2024
1 parent e504d05 commit bc12157
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
11 changes: 10 additions & 1 deletion src/views/Exemplarisation/ExempTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ const headingsDemandes = [
align: 'center',
display: true,
},
{
title: 'Nb d\'exemplaires',
key: 'nbex',
align: 'center',
display: true,
},
{
title: 'Crée le',
key: 'dateCreation',
Expand Down Expand Up @@ -264,6 +270,7 @@ const sortBy = ref([{
const isDataLoaded = ref(false);
//Search fields columns
const numDemandeSearchField = ref('');
const nbExemplairesSearchField = ref('');
const dateCreationSearchField = ref('');
const dateModificationSearchField = ref('');
const ilnSearchField = ref('');
Expand Down Expand Up @@ -331,6 +338,8 @@ function filterItems() {
contentsDemandesFrontFiltered.value = contentsDemandesFromServer.value.filter(demande => {
const matchesNumDemande = numDemandeSearchField.value === '' || demande.id.toString()
.includes(numDemandeSearchField.value);
const matchesNbExemplaires = nbExemplairesSearchField.value === '' || demande.nbex.toString()
.includes(nbExemplairesSearchField.value);
const matchesDateCreation = dateCreationSearchField.value === '' || demande.dateCreation.toString()
.includes(dateCreationSearchField.value);
const matchesDateModification = dateModificationSearchField.value === '' || demande.dateModification.toString()
Expand All @@ -343,7 +352,7 @@ function filterItems() {
const matchesIndexSearch = indexRechercheSearchField.value === '' || demande.indexRecherche && demande.indexRecherche.includes(indexRechercheSearchField.value);
const matchesEtatDemande = statutSearchField.value === undefined || statutSearchField.value === null || statutSearchField.value === '' || demande.etatDemande.toString()
.includes(statutSearchField.value) || ((statutSearchField.value === 'En saisie') && (demande.etatDemande === 'En simulation' || demande.etatDemande === 'En préparation' || demande.etatDemande === 'A compléter'));
return matchesNumDemande && matchesDateCreation && matchesDateModification && matchesRCR && matchesILN && matchesTypeExemp && matchesIndexSearch && matchesEtatDemande;
return matchesNumDemande && matchesNbExemplaires && matchesDateCreation && matchesDateModification && matchesRCR && matchesILN && matchesTypeExemp && matchesIndexSearch && matchesEtatDemande;
});
}
Expand Down
11 changes: 10 additions & 1 deletion src/views/Modification/ModifTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ const headingsDemandes = [
align: 'center',
display: true,
},
{
title: 'Nb d\'exemplaires',
key: 'nbex',
align: 'center',
display: true,
},
{
title: 'Crée le',
key: 'dateCreation',
Expand Down Expand Up @@ -262,6 +268,7 @@ const isDataLoaded = ref(false);
//Search fields columns
const numDemandeSearchField = ref('');
const nbExemplairesSearchField = ref('');
const dateCreationSearchField = ref('');
const dateModificationSearchField = ref('');
const ilnSearchField = ref('');
Expand Down Expand Up @@ -330,6 +337,8 @@ function filterItems() {
contentsDemandesFrontFiltered.value = contentsDemandesFromServer.value.filter(demande => {
const matchesNumDemande = numDemandeSearchField.value === '' || demande.id.toString()
.includes(numDemandeSearchField.value);
const matchesNbExemplaires = nbExemplairesSearchField.value === '' || demande.nbex.toString()
.includes(nbExemplairesSearchField.value);
const matchesDateCreation = dateCreationSearchField.value === '' || demande.dateCreation.toString()
.includes(dateCreationSearchField.value);
const matchesDateModification = dateModificationSearchField.value === '' || demande.dateModification.toString()
Expand All @@ -342,7 +351,7 @@ function filterItems() {
const matchesTraitement = traitementSearchField.value === undefined || traitementSearchField.value === null || traitementSearchField.value === '' || (demande.traitement && demande.traitement.includes(traitementSearchField.value)) || (!demande.traitement && traitementSearchField.value === 'Non défini');
const matchesEtatDemande = statutSearchField.value === undefined || statutSearchField.value === null || statutSearchField.value === '' || demande.etatDemande.toString()
.includes(statutSearchField.value) || ((statutSearchField.value === 'En saisie') && (demande.etatDemande === 'En simulation' || demande.etatDemande === 'En préparation' || demande.etatDemande === 'Préparée' || demande.etatDemande === 'A compléter'));
return matchesNumDemande && matchesDateCreation && matchesDateModification && matchesRCR && matchesILN && matchesZone && matchesTraitement && matchesEtatDemande;
return matchesNumDemande && matchesNbExemplaires && matchesDateCreation && matchesDateModification && matchesRCR && matchesILN && matchesZone && matchesTraitement && matchesEtatDemande;
});
}
Expand Down
13 changes: 11 additions & 2 deletions src/views/Suppression/SuppTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ const headingsDemandes = [
align: 'center',
display: true,
},
{
title: 'Nb d\'exemplaires',
key: 'nbex',
align: 'center',
display: true,
},
{
title: 'Crée le',
key: 'dateCreation',
Expand Down Expand Up @@ -237,6 +243,7 @@ const isDataLoaded = ref(false);
//Search fields columns
const numDemandeSearchField = ref('');
const nbExemplairesSearchField = ref('');
const dateCreationSearchField = ref('');
const dateModificationSearchField = ref('');
const ilnSearchField = ref('');
Expand Down Expand Up @@ -290,7 +297,6 @@ async function loadItems(type, archive) {
contentsDemandesFrontFiltered.value = response.data.map((item) => ({
...item,
expanded: false,
}));
isDataLoaded.value = true;
Expand All @@ -305,6 +311,8 @@ function filterItems() {
contentsDemandesFrontFiltered.value = contentsDemandesFromServer.value.filter(demande => {
const matchesNumDemande = numDemandeSearchField.value === '' || demande.id.toString()
.includes(numDemandeSearchField.value);
const matchesNbExemplaires = nbExemplairesSearchField.value === '' || demande.nbex.toString()
.includes(nbExemplairesSearchField.value);
const matchesDateCreation = dateCreationSearchField.value === '' || demande.dateCreation.toString()
.includes(dateCreationSearchField.value);
const matchesDateModification = dateModificationSearchField.value === '' || demande.dateModification.toString()
Expand All @@ -317,7 +325,7 @@ function filterItems() {
const matchesTraitement = traitementSearchField.value === undefined || traitementSearchField.value === null || traitementSearchField.value === '' || (demande.traitement && demande.traitement.includes(traitementSearchField.value)) || (!demande.traitement && traitementSearchField.value === 'Non défini');
const matchesEtatDemande = statutSearchField.value === undefined || statutSearchField.value === null || statutSearchField.value === '' || demande.etatDemande.toString()
.includes(statutSearchField.value) || ((statutSearchField.value === 'En saisie') && (demande.etatDemande === 'En simulation' || demande.etatDemande === 'En préparation' || demande.etatDemande === 'Préparée' || demande.etatDemande === 'A compléter'));
return matchesNumDemande && matchesDateCreation && matchesDateModification && matchesRCR && matchesILN && matchesZone && matchesTraitement && matchesEtatDemande;
return matchesNumDemande && matchesNbExemplaires && matchesDateCreation && matchesDateModification && matchesRCR && matchesILN && matchesZone && matchesTraitement && matchesEtatDemande;
});
}
Expand Down Expand Up @@ -389,6 +397,7 @@ function colorProgressBar(item) {
</script>

<style scoped>
.highlighted-row {
background-color: #f5f5f5;
}
Expand Down

0 comments on commit bc12157

Please sign in to comment.