Skip to content

Commit

Permalink
- Adaptation à la branche ITEM-342-back-modifier-dto-et-requete
Browse files Browse the repository at this point in the history
- Correction relatives au champ de recherche
  • Loading branch information
jvk88511334 committed Nov 12, 2024
1 parent cf16423 commit 172fdf9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 14 deletions.
12 changes: 5 additions & 7 deletions src/service/ItemService.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class ItemService {

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

return this.client.post(`signin`, {username: login, password: password})
.then((response) => {
Expand Down Expand Up @@ -56,27 +56,26 @@ export class ItemService {
}

fetchDemandes(type, archive, extensionIln) {
console.info('appel: ' + import.meta.env.VITE_API_URL + `demandes/${type}?archive=${archive}&extension=${extensionIln}`)
//console.info('appel: ' + import.meta.env.VITE_API_URL + `demandes/${type}?archive=${archive}&extension=${extensionIln}`)
return this.client.get(`demandes/${type}?archive=${archive}&extension=${extensionIln}`)
}
archiverDemande(type, numDemande) {
const url = `archiverDemande/${type}/${numDemande}`;
console.info('appel: ' + import.meta.env.VITE_API_URL + url);
//console.info('appel: ' + import.meta.env.VITE_API_URL + url);
return this.client.get(url);
}

checkToken(){
const url = `checkToken`;
console.info('appel: ' + import.meta.env.VITE_API_URL + url);
//console.info('appel: ' + import.meta.env.VITE_API_URL + url);
return this.client.get(url)
}

//TODO MAJ STORE
modifierEmail(id, email){
const config = { headers: {'Content-Type': 'text/plain'} };
return this.client.patch(`utilisateurs/${id}`, email, config);
}
//TODO MAJ STORE

creerEmail(id, email){
const config = { headers: {'Content-Type': 'text/plain'} };
return this.client.post(`utilisateurs/${id}`, email, config);
Expand Down Expand Up @@ -165,7 +164,6 @@ export class ItemService {

async getHealthOfServices(){
return this.client.get('applicationStatutServices').then(response => {
console.log(response.data)
return response.data
})
}
Expand Down
10 changes: 7 additions & 3 deletions src/views/Exemplarisation/ExempTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
<v-text-field v-model="numDemandeSearchField" hide-details @input="filterItems"
variant="underlined" append-inner-icon="mdi-magnify"></v-text-field>
</td>
<td>
<v-text-field v-model="nbExemplairesSearchField" hide-details @input="filterItems"
variant="underlined" append-inner-icon="mdi-magnify"></v-text-field>
</td>
<td>
<v-text-field v-model="dateCreationSearchField" hide-details @input="filterItems"
variant="underlined" append-inner-icon="mdi-magnify"></v-text-field>
Expand Down Expand Up @@ -83,6 +87,7 @@
</v-btn>
</td>
<td @click="onRowClick(item)" class="text-center">{{ item.id }}</td>
<td @click="onRowClick(item)" class="text-center">{{ item.nbExemplaires }}</td>
<td @click="onRowClick(item)" class="text-center">{{ item.dateCreation }}</td>
<td @click="onRowClick(item)" class="text-center">{{ item.dateModification }}</td>
<td @click="onRowClick(item)" class="text-center">{{ item.iln }}</td>
Expand Down Expand Up @@ -157,7 +162,7 @@ const headingsDemandes = [
},
{
title: 'Nb d\'exemplaires',
key: 'nbex',
key: 'nbExemplaires',
align: 'center',
display: true,
},
Expand Down Expand Up @@ -325,7 +330,6 @@ async function loadItems(type, archive) {
...item,
expanded: false
}));
isDataLoaded.value = true;
emit('backendSuccess');
} catch (error) {
Expand All @@ -338,7 +342,7 @@ 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()
const matchesNbExemplaires = nbExemplairesSearchField.value === '' || demande.nbExemplaires.toString()
.includes(nbExemplairesSearchField.value);
const matchesDateCreation = dateCreationSearchField.value === '' || demande.dateCreation.toString()
.includes(dateCreationSearchField.value);
Expand Down
9 changes: 7 additions & 2 deletions src/views/Modification/ModifTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
<v-text-field v-model="numDemandeSearchField" hide-details @input="filterItems"
variant="underlined" append-inner-icon="mdi-magnify"></v-text-field>
</td>
<td>
<v-text-field v-model="nbExemplairesSearchField" hide-details @input="filterItems"
variant="underlined" append-inner-icon="mdi-magnify"></v-text-field>
</td>
<td>
<v-text-field v-model="dateCreationSearchField" hide-details @input="filterItems"
variant="underlined" append-inner-icon="mdi-magnify"></v-text-field>
Expand Down Expand Up @@ -83,6 +87,7 @@
</v-btn>
</td>
<td @click="onRowClick(item)" class="text-center">{{ item.id }}</td>
<td @click="onRowClick(item)" class="text-center">{{ item.nbExemplaires }}</td>
<td @click="onRowClick(item)" class="text-center">{{ item.dateCreation }}</td>
<td @click="onRowClick(item)" class="text-center">{{ item.dateModification }}</td>
<td @click="onRowClick(item)" class="text-center">{{ item.iln }}</td>
Expand Down Expand Up @@ -155,7 +160,7 @@ const headingsDemandes = [
},
{
title: 'Nb d\'exemplaires',
key: 'nbex',
key: 'nbExemplaires',
align: 'center',
display: true,
},
Expand Down Expand Up @@ -337,7 +342,7 @@ 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()
const matchesNbExemplaires = nbExemplairesSearchField.value === '' || demande.nbExemplaires.toString()
.includes(nbExemplairesSearchField.value);
const matchesDateCreation = dateCreationSearchField.value === '' || demande.dateCreation.toString()
.includes(dateCreationSearchField.value);
Expand Down
9 changes: 7 additions & 2 deletions src/views/Suppression/SuppTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
<v-text-field v-model="numDemandeSearchField" hide-details @input="filterItems"
variant="underlined" append-inner-icon="mdi-magnify"></v-text-field>
</td>
<td>
<v-text-field v-model="nbExemplairesSearchField" hide-details @input="filterItems"
variant="underlined" append-inner-icon="mdi-magnify"></v-text-field>
</td>
<td>
<v-text-field v-model="dateCreationSearchField" hide-details @input="filterItems"
variant="underlined" append-inner-icon="mdi-magnify"></v-text-field>
Expand Down Expand Up @@ -70,6 +74,7 @@
</v-btn>
</td>
<td @click="onRowClick(item)" class="text-center">{{ item.id }}</td>
<td @click="onRowClick(item)" class="text-center">{{ item.nbExemplaires }}</td>
<td @click="onRowClick(item)" class="text-center">{{ item.dateCreation }}</td>
<td @click="onRowClick(item)" class="text-center">{{ item.dateModification }}</td>
<td @click="onRowClick(item)" class="text-center">{{ item.iln }}</td>
Expand Down Expand Up @@ -142,7 +147,7 @@ const headingsDemandes = [
},
{
title: 'Nb d\'exemplaires',
key: 'nbex',
key: 'nbExemplaires',
align: 'center',
display: true,
},
Expand Down Expand Up @@ -311,7 +316,7 @@ 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()
const matchesNbExemplaires = nbExemplairesSearchField.value === '' || demande.nbExemplaires.toString()
.includes(nbExemplairesSearchField.value);
const matchesDateCreation = dateCreationSearchField.value === '' || demande.dateCreation.toString()
.includes(dateCreationSearchField.value);
Expand Down

0 comments on commit 172fdf9

Please sign in to comment.