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

develop to main #177

Merged
merged 13 commits into from
Nov 27, 2024
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 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Item",
"version": "3.2.0",
"version": "3.2.1-SNAPSHOT",
"scripts": {
"dev": "vite",
"build": "vite build",
Expand Down
68 changes: 35 additions & 33 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
<template>
<v-app class="h-100 overflow-hidden">
<Header @logout-success="onLogout" @toggle-drawer="toggleDrawer"/>
<Navbar :drawer="drawer" @close="drawer = false"/>
<v-main class="d-flex flex-column overflow-auto">
<div class="error-stack">
<v-alert
v-for="(error, index) in errorStack"
:key="index"
color="error"
icon="$error"
:title="error.message"
variant="flat"
border="start"
class="mb-2 custom-alert"
closable
@click:close="closeAlert(index)"
>
{{ error.description }}
</v-alert>
</div>
<div style="flex-grow: 10;">
<router-view v-slot="{ Component }">
<component
:is="Component"
@backendError="addError"
@backendSuccess="clearErrors"
/>
</router-view>
</div>
<InfoAppBanner v-if="!authenticated" />
<Footer style="flex-basis: 0;" />
</v-main>
</v-app>
<v-app class="h-100 overflow-hidden">
<nav>
<Header @logout-success="onLogout" @toggle-drawer="toggleDrawer"/>
<Navbar :drawer="drawer" @close="drawer = false" />
</nav>
<v-main class="d-flex flex-column overflow-auto">
<div class="error-stack">
<v-alert
v-for="(error, index) in errorStack"
:key="index"
color="error"
icon="$error"
:title="error.message"
variant="flat"
border="start"
class="mb-2 custom-alert"
closable
@click:close="closeAlert(index)"
>
{{ error.description }}
</v-alert>
</div>
<div style="flex-grow: 10;">
<router-view v-slot="{ Component }">
<component
:is="Component"
@backendError="addError"
@backendSuccess="clearErrors"
/>
</router-view>
</div>
<InfoAppBanner v-if="!authenticated" />
<Footer style="flex-basis: 0;" />
</v-main>
</v-app>
</template>

<script setup>
Expand Down
41 changes: 37 additions & 4 deletions src/components/Structure/Navbar.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-navigation-drawer v-if="authStore.isAuthenticated && drawer" width="18em" temporary>
<v-navigation-drawer v-if="authStore.isAuthenticated" v-model="drawerInside">
<v-list-item three-line>
<v-list-item>
<v-list-item-title class="text-h6 text-wrap">
Expand Down Expand Up @@ -63,7 +63,7 @@

<v-list density="compact" nav>
<v-list-item>
<v-list-item-title class="text-h6 pb-1">Creations</v-list-item-title>
<v-list-item-title class="text-h6 pb-1">Créations</v-list-item-title>
</v-list-item>

<v-list-item @click="navigateTo('exemplarisation')">
Expand Down Expand Up @@ -128,11 +128,32 @@

</v-list>

<v-divider></v-divider>

<v-list>
<v-list-item class="ma-0 pa-0">
<v-row class="pl-2">
<v-col class="d-flex flex-row ml-1 pl-0 pr-0" cols="3">
<v-switch
class="ml-3 mr-0 v-input--expand"
v-model="fixNavBarModel"
hide-details
color="primary"
>
</v-switch>
</v-col>
<v-col class="d-flex flex-column justify-center pl-1">
<span class="labelSwitchNavBar">Encrer le menu de navigation</span>
</v-col>
</v-row>
</v-list-item>
</v-list>

</v-navigation-drawer>
</template>

<script setup>
import { computed } from 'vue'
import {computed, ref} from 'vue'
import { useRouter } from 'vue-router'
import { useTheme } from 'vuetify'
import { useAuthStore } from '@/store/authStore'
Expand All @@ -144,6 +165,12 @@ const props = defineProps({
},
})

const fixNavBarModel = ref(false)

const drawerInside = computed(() => {
return props.drawer;
})

const router = useRouter()
const theme = useTheme()
const authStore = useAuthStore()
Expand All @@ -152,7 +179,7 @@ const emit = defineEmits(['close'])

function navigateTo(routeName) {
router.push({ name: routeName }).catch(err => {})
emit('close')
fixNavBarModel.value ? '' : emit('close')
}

function toggleTheme() {
Expand Down Expand Up @@ -192,4 +219,10 @@ de l'ILN ${user.iln}`
p {
white-space: pre-line;
}

.labelSwitchNavBar {
font-size: 0.8em;
font-weight: 500;
text-decoration-color: black;
}
</style>
68 changes: 40 additions & 28 deletions src/components/Supp/TypeFile.vue
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
<template>
<v-card flat :loading="isLoading">
<v-card-title class="d-flex justify-space-between custom-card-title">
<span>Choix du type de fichier</span>
<v-btn depressed variant="text" @click="deleted()" prepend-icon="mdi-delete">Supprimer</v-btn>
</v-card-title>
<v-card-text class="pa-0 ma-0">
<v-overlay v-if="isLoading" v-model="overlay" class="justify-center align-center" contained>
<v-progress-circular
color="info"
indeterminate
></v-progress-circular>
</v-overlay>
<v-hover v-slot="{ isHovering, props }" v-for="type in types" :key="type">
<div v-bind="props" :class="`btn-perso elevation-${isHovering ? 6 : 2} pa-5 ma-1 d-flex justify-space-between`" @click="onClick(type)">
<v-row class="align-center">
<v-col cols="12" sm="3" class="d-flex justify-center">
<v-icon size="x-large" dark color="primary"> mdi-file-document-outline </v-icon>
</v-col>
<v-col cols="12" sm="9" class="d-flex justify-start">
<span class="group large-text">Fichier {{ type }}</span>
</v-col>
</v-row>
</div>
</v-hover>
<v-card flat :loading="isLoading">
<v-card-title class="d-flex justify-space-between custom-card-title">
<span>Choix du type de fichier</span>
<v-btn depressed variant="text" @click="deleted()" prepend-icon="mdi-delete">Supprimer</v-btn>
</v-card-title>
<v-card-text class="pa-0 ma-0">
<v-overlay v-if="isLoading" v-model="overlay" class="justify-center align-center" contained>
<v-progress-circular color="info" indeterminate></v-progress-circular>
</v-overlay>
<v-row justify="space-between" class="mt-4 mb-4 ml-1 mr-1">
<!-- Création des boutons -->
<v-hover v-slot="{isHovering, props}" v-for="type in types" :key="type">
<v-col>
<v-row class="pl-1">
<span style="font-size: 1.3em; font-weight: 500; color: #326bb1">{{ type.message }}</span>
</v-row>
<v-row>
<v-col v-bind="props" :class="`btn-perso d-flex justify-center elevation-${isHovering ? 6 : 2} pa-5 ma-1 d-flex`" @click="onClick(type.type)">
<v-row class="align-center">
<v-col cols="12" sm="3" class="d-flex justify-center">
<v-icon size="x-large" dark color="primary"> mdi-file-document-outline </v-icon>
</v-col>
<v-col cols="12" sm="9" class="d-flex justify-start">
<span class="group large-text">Fichier {{ type.type }}</span>
</v-col>
</v-row>
</v-col>
</v-row>
</v-col>
<!-- Placement d'une barre à droite de chaque bouton s'il ne sagit pas du dernier -->
<div class="ml-3 mr-1" v-if="types.indexOf(type) < types.length-1" style="width: 10px; border-left: solid 4px #295494"></div>
</v-hover>
</v-row>
</v-card-text>
</v-card>
</v-card>
</template>
<script setup>

Expand All @@ -37,9 +46,12 @@ const props = defineProps({
default: false
}
})
const model = defineModel();
const types = ['PPN','EPN'];
const overlay = ref(true);
const model = defineModel()
const types = [
{type: 'PPN', message: 'Numéro de notice :'},
{type: 'EPN', message: "Numéro d'exemplaire :"}
]
const overlay = ref(true)

function onClick(type) {
model.value = type;
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/vuetify.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,8 @@ export default createVuetify({
itemDarkTheme,
itemRngTheme
},
},
icons: {
defaultSet: 'mdi',
}
})
5 changes: 2 additions & 3 deletions src/views/Exemplarisation/ExempTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

<v-container fluid>
<v-chip :variant="isActiveDemandesDisplayed ? 'plain' : 'tonal'" style="margin-right: 10px"
@click="switchArchiveActiveDisplay(!isActiveDemandesDisplayed)">Créations d'exemplaires
@click="switchArchiveActiveDisplay(!isActiveDemandesDisplayed)">Demandes d'exemplarisation
</v-chip>
<v-chip :variant="!isActiveDemandesDisplayed ? 'plain' : 'tonal'"
@click="switchArchiveActiveDisplay(!isActiveDemandesDisplayed)">Créations
d'exemplaires archivées
@click="switchArchiveActiveDisplay(!isActiveDemandesDisplayed)">Demandes d'exemplarisation archivées
</v-chip>
<v-chip variant="text">
<v-tooltip v-if="isAdmin" activator="parent" location="bottom">
Expand Down
5 changes: 2 additions & 3 deletions src/views/Modification/ModifTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
<v-container fluid>
<!--:variant="isActiveDemandesDisplayed ? 'plain' : 'tonal'" -->
<v-chip :variant="isActiveDemandesDisplayed ? 'plain' : 'tonal'" style="margin-right: 10px"
@click="switchArchiveActiveDisplay(!isActiveDemandesDisplayed)">Modification d'exemplaires
@click="switchArchiveActiveDisplay(!isActiveDemandesDisplayed)">Demandes de modification
</v-chip>
<v-chip :variant="!isActiveDemandesDisplayed ? 'plain' : 'tonal'"
@click="switchArchiveActiveDisplay(!isActiveDemandesDisplayed)">Modification
d'exemplaires archivées
@click="switchArchiveActiveDisplay(!isActiveDemandesDisplayed)">Demandes de modification archivées
</v-chip>
<v-chip variant="text">
<v-tooltip v-if="isAdmin" activator="parent" location="bottom">
Expand Down
5 changes: 2 additions & 3 deletions src/views/Recouvrement/RecouvTable.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<template>
<v-container fluid>
<v-chip :variant="isActiveDemandesDisplayed ? 'plain' : 'tonal'" style="margin-right: 10px"
@click="switchArchiveActiveDisplay(!isActiveDemandesDisplayed)">Calculs de taux de recouvrement
@click="switchArchiveActiveDisplay(!isActiveDemandesDisplayed)">Demandes de recouvrement
</v-chip>
<v-chip :variant="!isActiveDemandesDisplayed ? 'plain' : 'tonal'"
@click="switchArchiveActiveDisplay(!isActiveDemandesDisplayed)">Calculs de taux
de recouvrement archivés
@click="switchArchiveActiveDisplay(!isActiveDemandesDisplayed)">Demandes de recouvrement archivées
</v-chip>
<v-chip variant="text">
<v-tooltip v-if="isAdmin" activator="parent" location="bottom">
Expand Down
4 changes: 2 additions & 2 deletions src/views/Suppression/SuppTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<v-container fluid>
<v-chip :variant="isArchiveDemandesDisplayed ? 'plain' : 'tonal'" style="margin-right: 10px"
@click="switchArchiveActiveDisplay(!isArchiveDemandesDisplayed)">
Suppression d'exemplaires
Demandes de suppression
</v-chip>
<v-chip :variant="!isArchiveDemandesDisplayed ? 'plain' : 'tonal'"
@click="switchArchiveActiveDisplay(!isArchiveDemandesDisplayed)">
Demandes archivées
Demandes de suppression archivées
</v-chip>
<v-chip variant="text">
<v-tooltip v-if="isAdmin" activator="parent" location="bottom">
Expand Down
Loading