Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Item 445 front beaucoup derreurs warning sur les formulaire a lauthentification #199

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,647 changes: 2,647 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/components/ButtonsActions/BtnArchive.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<template>
<div v-bind="$attrs">
<v-tooltip v-if="canArchive(demande)" text="Archiver">
<template v-slot:activator="{ props }">
<v-btn v-bind="props"
Expand All @@ -9,6 +10,7 @@
aria-label="Archiver"></v-btn>
</template>
</v-tooltip>
</div>
</template>
<script setup>
import itemService from '@/service/ItemService';
Expand Down
6 changes: 6 additions & 0 deletions src/components/ButtonsActions/BtnRestore.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<template>
<div v-bind="$attrs">
<v-tooltip v-if="demande.etatDemande === 'Archivé'" text="Restaurer">
<template v-slot:activator="{ props }">
<v-btn v-bind="props"
Expand All @@ -8,10 +9,15 @@
@click="restaurerDemande(demande)"></v-btn>
</template>
</v-tooltip>
</div>
</template>
<script setup>
import itemService from '@/service/ItemService';

defineOptions({
inheritAttrs: false
});

const emits = defineEmits(['clicked', 'onError']);
const props = defineProps({
demande: {
Expand Down
6 changes: 6 additions & 0 deletions src/components/ButtonsActions/BtnStop.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<template>
<div v-bind="$attrs">
<v-tooltip v-if="canStop(demande)" text="Annuler">
<template v-slot:activator="{ props }">
<v-btn v-bind="props"
Expand All @@ -11,11 +12,16 @@
</v-tooltip>
<dialog-confirmation-stop v-model="dialog" :id="demande.id" @clicked="emits('clicked')" @on-error="throwError">
</dialog-confirmation-stop>
</div>
</template>
<script setup>
import DialogConfirmationStop from '@/components/Dialog/DialogConfirmationStop.vue';
import { ref } from 'vue';

defineOptions({
inheritAttrs: false
});

const emits = defineEmits(['clicked', 'onError']);
const props = defineProps({
demande: {
Expand Down
34 changes: 23 additions & 11 deletions src/components/ButtonsActions/BtnSuppression.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
<template>
<v-tooltip v-if="canCancel(demande)" text="Supprimer">
<template v-slot:activator="{ props }">
<v-btn v-bind="props"
icon="mdi-delete"
variant="text"
@click="dialog = true">
</v-btn>
</template>
</v-tooltip>
<dialog-suppression v-model="dialog" :demande="demande" @supp="emits('clicked')" @on-error="throwError">
</dialog-suppression>
<!-- Wrapper div pour recevoir les attributs -->
<div v-bind="$attrs">
<v-tooltip v-if="canCancel(demande)" text="Supprimer">
<template v-slot:activator="{ props }">
<v-btn v-bind="props"
icon="mdi-delete"
variant="text"
@click="dialog = true">
</v-btn>
</template>
</v-tooltip>
<dialog-suppression
v-model="dialog"
:demande="demande"
@supp="emits('clicked')"
@on-error="throwError">
</dialog-suppression>
</div>
</template>

<script setup>
import { ref } from 'vue';
import DialogSuppression from '@/components/Dialog/DialogSuppression.vue';

defineOptions({
inheritAttrs: false
});

const emits = defineEmits(['clicked', 'onError']);
const props = defineProps({
demande: {
Expand Down
1 change: 1 addition & 0 deletions src/components/Home/BtnAccueil.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import router from '@/router';

const props = defineProps({
id: { type: String, required: true },
icon: { type: String, required: true },
route: { type: String, required: true }
})
Expand Down
2 changes: 1 addition & 1 deletion src/components/Rcr.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
A<template>
<template>
<v-card elevation="0">
<v-card-title class="custom-card-title">
<span>Sélection du RCR</span>
Expand Down
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ const pinia = createPinia()

registerPlugins(app)

app.use(router).use(vuetify).use(pinia)
app.use(router).use(pinia)
app.mount('#app')
23 changes: 18 additions & 5 deletions src/views/Exemplarisation/ExempSteps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,17 @@ import DialogSuppression from '@/components/Dialog/DialogSuppression.vue';
import RecapDemande from '@/components/RecapDemande.vue';

const emits = defineEmits(['backendError', 'backendSuccess', 'login-success']);
const props = defineProps({ id: { type: String } });
const props = defineProps({
id: { type: String }
});

const demande = ref();
const demande = ref({
id: null,
rcr: '',
typeExemp: '',
etatDemande: '',
type: 'EXEMP'
});
const currentStep = ref(0);
const typeDocumentSelected = ref();
const rcrSelected = ref();
Expand Down Expand Up @@ -191,9 +199,12 @@ function cleanPath() {
}

function createDemande() {
if (demande.value && (rcrSelected.value === demande.value.rcr)) {
// Si la demande existe déjà et le RCR est le même
if (demande.value?.id && rcrSelected.value === demande.value.rcr) {
next();
} else if (demande.value) {
}
// Si la demande existe et le RCR est différent
else if (demande.value?.id) {
isLoading.value = true;
itemService.modifierRcrDemande(demande.value.id, rcrSelected.value, 'EXEMP')
.then(response => {
Expand All @@ -206,7 +217,9 @@ function createDemande() {
.finally(() => {
isLoading.value = false;
});
} else {
}
// Si c'est une nouvelle demande
else {
isLoading.value = true;
itemService.creerDemande(rcrSelected.value, 'EXEMP')
.then(response => {
Expand Down
159 changes: 110 additions & 49 deletions src/views/Exemplarisation/ExempTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,52 +31,111 @@
:loading="!isDataLoaded" show-expand :sort-by="sortBy"
item-key="id"
>
<template v-slot:body.prepend>
<tr>
<td></td>
<td>
<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>
</td>
<td>
<v-text-field v-model="dateModificationSearchField" hide-details @input="filterItems"
variant="underlined" append-inner-icon="mdi-magnify"></v-text-field>
</td>
<td>
<v-text-field v-model="ilnSearchField" hide-details @input="filterItems" variant="underlined"
append-inner-icon="mdi-magnify"></v-text-field>
</td>
<td>
<v-text-field v-model="rcrSearchField" hide-details @input="filterItems" variant="underlined"
append-inner-icon="mdi-magnify"></v-text-field>
</td>
<td>
<v-select
v-model="typeExempSearchField" hide-details variant="underlined" :items="listTypeExemp"
@update:menu="filterItems"
@click:clear="filterItems" clearable clear-icon="mdi-close" no-data-text="Aucun type d'exemplaire trouvé."
aria-label="Recherche par type d'exemplaire"
></v-select>
</td>
<td>
<v-text-field v-model="indexRechercheSearchField" @input="filterItems" hide-details
variant="underlined" append-inner-icon="mdi-magnify"></v-text-field>
</td>
<td>
<v-select :items="listStatut" variant="underlined" hide-details @update:menu="filterItems"
@click:clear="filterItems" aria-label="Recherche par statut" clearable clear-icon="mdi-close"
no-data-text="Aucun statut trouvé." v-model="statutSearchField"></v-select>
</td>
</tr>
</template>
<template v-slot:body.prepend>
<tr>
<td></td>
<td>
<v-text-field
v-model="numDemandeSearchField"
id="search-num-demande"
hide-details
@input="filterItems"
variant="underlined"
append-inner-icon="mdi-magnify"
></v-text-field>
</td>
<td>
<v-text-field
v-model="nbExemplairesSearchField"
id="search-nb-exemplaires"
hide-details
@input="filterItems"
variant="underlined"
append-inner-icon="mdi-magnify"
></v-text-field>
</td>
<td>
<v-text-field
v-model="dateCreationSearchField"
id="search-date-creation"
hide-details
@input="filterItems"
variant="underlined"
append-inner-icon="mdi-magnify"
></v-text-field>
</td>
<td>
<v-text-field
v-model="dateModificationSearchField"
id="search-date-modification"
hide-details
@input="filterItems"
variant="underlined"
append-inner-icon="mdi-magnify"
></v-text-field>
</td>
<td>
<v-text-field
v-model="ilnSearchField"
id="search-iln"
hide-details
@input="filterItems"
variant="underlined"
append-inner-icon="mdi-magnify"
></v-text-field>
</td>
<td>
<v-text-field
v-model="rcrSearchField"
id="search-rcr"
hide-details
@input="filterItems"
variant="underlined"
append-inner-icon="mdi-magnify"
></v-text-field>
</td>
<td>
<v-select
v-model="typeExempSearchField"
id="search-type-exemp"
hide-details
variant="underlined"
:items="listTypeExemp"
@update:menu="filterItems"
@click:clear="filterItems"
clearable
clear-icon="mdi-close"
no-data-text="Aucun type d'exemplaire trouvé."
aria-label="Recherche par type d'exemplaire"
></v-select>
</td>
<td>
<v-text-field
v-model="indexRechercheSearchField"
id="search-index"
hide-details
@input="filterItems"
variant="underlined"
append-inner-icon="mdi-magnify"
></v-text-field>
</td>
<td>
<v-select
v-model="statutSearchField"
id="search-statut"
:items="listStatut"
variant="underlined"
hide-details
@update:menu="filterItems"
@click:clear="filterItems"
clearable
clear-icon="mdi-close"
no-data-text="Aucun statut trouvé."
aria-label="Recherche par statut"
></v-select>
</td>
</tr>
</template>

<template v-slot:item="{ item, expand }">
<tr :class="{ 'highlighted-row': item.highlighted }" style="cursor: pointer;">
Expand Down Expand Up @@ -120,12 +179,14 @@
</td>
<td class="text-center">
<!-- Colonne Action -->
<btn-archive :demande="item" @clicked="loadItems(item.type)"
<v-btn-group>
<btn-archive v-bind="$attrs" :demande="item" @clicked="loadItems(item.type)"
@on-error="throwError" aria-label="Archiver"></btn-archive>
<btn-suppression :demande="item" @clicked="loadItems(item.type)"
<btn-suppression v-bind="$attrs" :demande="item" @clicked="loadItems(item.type)"
@on-error="throwError" aria-label="Supprimer"></btn-suppression>
<btn-restore :demande="item" @clicked="loadItems(item.type)"
<btn-restore v-bind="$attrs" :demande="item" @clicked="loadItems(item.type)"
@on-error="throwError" aria-label="Restaurer"></btn-restore>
</v-btn-group>
</td>
</tr>
</template>
Expand Down
Loading
Loading