Compare commits

..

7 Commits

Author SHA1 Message Date
299ea84e87 fix : auto-tag-develop.yml
All checks were successful
Auto Tag Develop / tag (push) Successful in 4s
Build Release Artefact / build (push) Successful in 1m9s
2026-02-06 10:40:57 +01:00
bb0b0092da fix : auto-tag-develop.yml 2026-02-06 10:38:32 +01:00
33d21f6ae6 feat : update numéro de version 2026-02-06 10:30:27 +01:00
98ee62294d feat : ajout d'un numéro de version automatique via la CI 2026-02-06 10:25:54 +01:00
820386b87b Layout admin panel (!13)
All checks were successful
Auto Tag Develop / tag (push) Successful in 5s
Build Release Artefact / build (push) Successful in 1m13s
| Numéro du ticket | Layout admin panel |
|------------------|-----------------|
|                  |                 |

## Description de la PR

## Modification du .env

## Check list

- [x] Pas de régression
- [ ] TU/TI/TF rédigée
- [x] TU/TI/TF OK
- [ ] CHANGELOG modifié

Reviewed-on: #13
Co-authored-by: Matteo <matteo@yuno.malio.fr>
Co-committed-by: Matteo <matteo@yuno.malio.fr>
2026-02-06 08:22:08 +00:00
c17f7aa08a fix : logo centré en mod mobile
All checks were successful
Auto Tag Develop / tag (push) Successful in 4s
Build Release Artefact / build (push) Successful in 1m8s
2026-02-05 17:55:05 +01:00
4a0d38d307 feat : ajout du responsive sur la navbar et la page d'accueil
All checks were successful
Auto Tag Develop / tag (push) Successful in 4s
Build Release Artefact / build (push) Successful in 1m10s
2026-02-05 17:28:49 +01:00
8 changed files with 236 additions and 117 deletions

View File

@@ -16,30 +16,50 @@ jobs:
token: ${{ secrets.RELEASE_TOKEN }} token: ${{ secrets.RELEASE_TOKEN }}
persist-credentials: true persist-credentials: true
- name: Create next tag v0.0.X - name: Create next tag from config/version.yaml
shell: bash shell: bash
run: | run: |
set -euo pipefail set -euo pipefail
# Skip if current commit already has a v0.0.* tag # Skip if current commit already has a vX.Y.Z tag
if git tag --points-at HEAD | grep -qE '^v0\.0\.'; then if git tag --points-at HEAD | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+$'; then
echo "Tag already exists on this commit. Skipping." echo "Tag already exists on this commit. Skipping."
exit 0 exit 0
fi fi
last_tag="$(git tag -l 'v0.0.*' --sort=-v:refname | head -n1 || true)" changed_version=false
if [ -z "$last_tag" ]; then if git diff --name-only "${{ gitea.event.before }}" "${{ gitea.event.after }}" | grep -q '^config/version\.yaml$'; then
next_tag="v0.0.1" changed_version=true
else
patch="${last_tag##v0.0.}"
if ! [[ "$patch" =~ ^[0-9]+$ ]]; then
echo "Unexpected tag format: $last_tag" >&2
exit 1
fi
next_tag="v0.0.$((patch + 1))"
fi fi
git config user.name "gitea-actions" read_version() {
git config user.email "gitea-actions@local" awk -F': *' '/app\.version:/{print $2}' config/version.yaml | tr -d '[:space:]' | tr -d "'\""
git tag "$next_tag" }
git push origin "$next_tag"
if $changed_version; then
version="$(read_version)"
if ! [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Invalid version in version.yaml: $version" >&2
exit 1
fi
else
last_tag="$(git tag -l 'v*' --sort=-v:refname | head -n1 || true)"
if [ -z "$last_tag" ]; then
version="0.1.0"
else
base="${last_tag#v}"
IFS='.' read -r major minor patch <<< "$base"
version="${major}.${minor}.$((patch + 1))"
fi
printf "parameters:\\n app.version: '%s'\\n" "$version" > config/version.yaml
git config user.name "gitea-actions"
git config user.email "gitea-actions@local"
git add config/version.yaml
git commit -m "chore: bump version to v$version" || true
git push origin develop || true
fi
tag="v$version"
git tag "$tag"
git push origin "$tag"

136
.idea/workspace.xml generated
View File

@@ -4,7 +4,7 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="7c107abe-5995-4428-8429-b146aaca8386" name="Changes" comment="feat : layout administration"> <list default="true" id="7c107abe-5995-4428-8429-b146aaca8386" name="Changes" comment="feat : update numéro de version">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
@@ -19,7 +19,6 @@
<component name="CopilotPersistence"> <component name="CopilotPersistence">
<persistenceIdMap> <persistenceIdMap>
<entry key="_//wsl.localhost/Ubuntu-24.04/home/kevin/Stage/Ferme" value="381AhnCm9yPeOiWgMObKHhtgv2C" /> <entry key="_//wsl.localhost/Ubuntu-24.04/home/kevin/Stage/Ferme" value="381AhnCm9yPeOiWgMObKHhtgv2C" />
<entry key="_//wsl.localhost/Ubuntu-24.04/home/matte/Ferme" value="39Hm3FYoXtuEebfTK1u7vmLhPVv" />
</persistenceIdMap> </persistenceIdMap>
</component> </component>
<component name="EmbeddingIndexingInfo"> <component name="EmbeddingIndexingInfo">
@@ -29,15 +28,15 @@
<component name="FileTemplateManagerImpl"> <component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES"> <option name="RECENT_TEMPLATES">
<list> <list>
<option value="TypeScript File" />
<option value="Vue Composition API Component" /> <option value="Vue Composition API Component" />
<option value="TypeScript File" />
</list> </list>
</option> </option>
</component> </component>
<component name="Git.Settings"> <component name="Git.Settings">
<option name="RECENT_BRANCH_BY_REPOSITORY"> <option name="RECENT_BRANCH_BY_REPOSITORY">
<map> <map>
<entry key="$PROJECT_DIR$" value="develop" /> <entry key="$PROJECT_DIR$" value="feat/256-reception-etape-3-bovin" />
</map> </map>
</option> </option>
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
@@ -55,7 +54,7 @@
</server> </server>
</servers> </servers>
</component> </component>
<component name="PhpWorkspaceProjectConfiguration" interpreter_name="C:/php/php.exe"> <component name="PhpWorkspaceProjectConfiguration" interpreter_name="C:/php-8.4.3/php.exe">
<include_path> <include_path>
<path value="$PROJECT_DIR$/vendor/psr/log" /> <path value="$PROJECT_DIR$/vendor/psr/log" />
<path value="$PROJECT_DIR$/vendor/psr/event-dispatcher" /> <path value="$PROJECT_DIR$/vendor/psr/event-dispatcher" />
@@ -218,39 +217,36 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent"><![CDATA[{ <component name="PropertiesComponent">{
"keyToString": { &quot;keyToString&quot;: {
"RunOnceActivity.MCP Project settings loaded": "true", &quot;RunOnceActivity.MCP Project settings loaded&quot;: &quot;true&quot;,
"RunOnceActivity.ShowReadmeOnStart": "true", &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true", &quot;RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252&quot;: &quot;true&quot;,
"RunOnceActivity.git.unshallow": "true", &quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
"RunOnceActivity.typescript.service.memoryLimit.init": "true", &quot;RunOnceActivity.typescript.service.memoryLimit.init&quot;: &quot;true&quot;,
"com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1": "true", &quot;git-widget-placeholder&quot;: &quot;develop&quot;,
"git-widget-placeholder": "feat/front-end-layout-admin", &quot;last_opened_file_path&quot;: &quot;/home/sroy/Documents/test/Ferme&quot;,
"junie.onboarding.icon.badge.shown": "true", &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
"last_opened_file_path": "/home/sroy/Documents/test/Ferme", &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
"node.js.detected.package.eslint": "true", &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
"node.js.detected.package.tslint": "true", &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
"node.js.selected.package.eslint": "(autodetect)", &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
"node.js.selected.package.tslint": "(autodetect)", &quot;settings.editor.selected.configurable&quot;: &quot;configurable.tailwindcss&quot;,
"nodejs_package_manager_path": "npm", &quot;ts.external.directory.path&quot;: &quot;/opt/phpstorm/plugins/javascript-plugin/jsLanguageServicesImpl/external&quot;,
"settings.editor.selected.configurable": "preferences.keymap", &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
"to.speed.mode.migration.done": "true",
"ts.external.directory.path": "/opt/phpstorm/plugins/javascript-plugin/jsLanguageServicesImpl/external",
"vue.rearranger.settings.migration": "true"
}, },
"keyToStringList": { &quot;keyToStringList&quot;: {
"DatabaseDriversLRU": [ &quot;DatabaseDriversLRU&quot;: [
"postgresql" &quot;postgresql&quot;
], ],
"com.intellij.ide.scratch.ScratchImplUtil$2/New Scratch File": [ &quot;com.intellij.ide.scratch.ScratchImplUtil$2/New Scratch File&quot;: [
"TEXT" &quot;TEXT&quot;
], ],
"vue.recent.templates": [ &quot;vue.recent.templates&quot;: [
"Vue Composition API Component" &quot;Vue Composition API Component&quot;
] ]
} }
}]]></component> }</component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS"> <key name="MoveFile.RECENT_KEYS">
<recent name="\\wsl.localhost\Ubuntu-24.04\home\m-tristan\workspace\Ferme" /> <recent name="\\wsl.localhost\Ubuntu-24.04\home\m-tristan\workspace\Ferme" />
@@ -297,23 +293,6 @@
<workItem from="1770195718952" duration="215000" /> <workItem from="1770195718952" duration="215000" />
<workItem from="1770195959162" duration="18915000" /> <workItem from="1770195959162" duration="18915000" />
<workItem from="1770274844804" duration="3940000" /> <workItem from="1770274844804" duration="3940000" />
<workItem from="1770361168045" duration="2902000" />
</task>
<task id="LOCAL-00004" summary="feat : update du fichier AGENTS.md">
<option name="closed" value="true" />
<created>1768316965511</created>
<option name="number" value="00004" />
<option name="presentableId" value="LOCAL-00004" />
<option name="project" value="LOCAL" />
<updated>1768316965511</updated>
</task>
<task id="LOCAL-00005" summary="feat : update du fichier README.md et CHANGELOG.md">
<option name="closed" value="true" />
<created>1768317786187</created>
<option name="number" value="00005" />
<option name="presentableId" value="LOCAL-00005" />
<option name="project" value="LOCAL" />
<updated>1768317786187</updated>
</task> </task>
<task id="LOCAL-00006" summary="fix : correction du useApi pour qu'il n'y ait plus de retry lors d'une erreur 500 par exemple"> <task id="LOCAL-00006" summary="fix : correction du useApi pour qu'il n'y ait plus de retry lors d'une erreur 500 par exemple">
<option name="closed" value="true" /> <option name="closed" value="true" />
@@ -667,31 +646,47 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1770217875423</updated> <updated>1770217875423</updated>
</task> </task>
<task id="LOCAL-00050" summary="feat : layout administration (WIP)"> <task id="LOCAL-00050" summary="feat : Ajout de la sélection des bovins étape 3 d'une réception (WIP)">
<option name="closed" value="true" /> <option name="closed" value="true" />
<created>1770296486375</created> <created>1770283622425</created>
<option name="number" value="00050" /> <option name="number" value="00050" />
<option name="presentableId" value="LOCAL-00050" /> <option name="presentableId" value="LOCAL-00050" />
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1770296486375</updated> <updated>1770283622425</updated>
</task> </task>
<task id="LOCAL-00051" summary="feat : layout administration (WIP)"> <task id="LOCAL-00051" summary="feat : ajout du responsive sur la navbar et la page d'accueil">
<option name="closed" value="true" /> <option name="closed" value="true" />
<created>1770306414981</created> <created>1770308927948</created>
<option name="number" value="00051" /> <option name="number" value="00051" />
<option name="presentableId" value="LOCAL-00051" /> <option name="presentableId" value="LOCAL-00051" />
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1770306414982</updated> <updated>1770308927948</updated>
</task> </task>
<task id="LOCAL-00052" summary="feat : layout administration"> <task id="LOCAL-00052" summary="fix : logo centré en mod mobile">
<option name="closed" value="true" /> <option name="closed" value="true" />
<created>1770362009861</created> <created>1770310504254</created>
<option name="number" value="00052" /> <option name="number" value="00052" />
<option name="presentableId" value="LOCAL-00052" /> <option name="presentableId" value="LOCAL-00052" />
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1770362009861</updated> <updated>1770310504254</updated>
</task> </task>
<option name="localTasksCounter" value="53" /> <task id="LOCAL-00053" summary="feat : ajout d'un numéro de version automatique via la CI">
<option name="closed" value="true" />
<created>1770369945257</created>
<option name="number" value="00053" />
<option name="presentableId" value="LOCAL-00053" />
<option name="project" value="LOCAL" />
<updated>1770369945257</updated>
</task>
<task id="LOCAL-00054" summary="feat : update numéro de version">
<option name="closed" value="true" />
<created>1770370216428</created>
<option name="number" value="00054" />
<option name="presentableId" value="LOCAL-00054" />
<option name="project" value="LOCAL" />
<updated>1770370216428</updated>
</task>
<option name="localTasksCounter" value="55" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
@@ -741,8 +736,6 @@
</option> </option>
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<MESSAGE value="fix : affiche plus détail dans les logs en recette/prod" />
<MESSAGE value="fix : modification du script de déploiement pour corriger le problème d'écriture des logs de prod" />
<MESSAGE value="fix : doc de déploiement" /> <MESSAGE value="fix : doc de déploiement" />
<MESSAGE value="fix : doc et script de déploiement" /> <MESSAGE value="fix : doc et script de déploiement" />
<MESSAGE value="fix : gitea workflow" /> <MESSAGE value="fix : gitea workflow" />
@@ -764,20 +757,11 @@
<MESSAGE value="feat : ajout de colonne pour les Supplier, Address. Modification du numéro de réception et ajout de fixtures" /> <MESSAGE value="feat : ajout de colonne pour les Supplier, Address. Modification du numéro de réception et ajout de fixtures" />
<MESSAGE value="feat : mise à jour du bon de réception" /> <MESSAGE value="feat : mise à jour du bon de réception" />
<MESSAGE value="feat : Ajout de la sélection des bovins étape 3 d'une réception (WIP)" /> <MESSAGE value="feat : Ajout de la sélection des bovins étape 3 d'une réception (WIP)" />
<MESSAGE value="feat : layout administration (WIP)" /> <MESSAGE value="feat : ajout du responsive sur la navbar et la page d'accueil" />
<MESSAGE value="feat : layout administration" /> <MESSAGE value="fix : logo centré en mod mobile" />
<option name="LAST_COMMIT_MESSAGE" value="feat : layout administration" /> <MESSAGE value="feat : ajout d'un numéro de version automatique via la CI" />
</component> <MESSAGE value="feat : update numéro de version" />
<component name="XDebuggerManager"> <option name="LAST_COMMIT_MESSAGE" value="feat : update numéro de version" />
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" type="php">
<url>file://$PROJECT_DIR$/src/Entity/ReceptionPelletBuilding.php</url>
<line>6</line>
<option name="timeStamp" value="3" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component> </component>
<component name="XSLT-Support.FileAssociations.UIState"> <component name="XSLT-Support.FileAssociations.UIState">
<expand /> <expand />

View File

@@ -8,6 +8,9 @@
# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration # https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration
parameters: parameters:
imports:
- { resource: version.yaml }
services: services:
# default configuration for services in *this* file # default configuration for services in *this* file
_defaults: _defaults:

2
config/version.yaml Normal file
View File

@@ -0,0 +1,2 @@
parameters:
app.version: '0.0.30'

View File

@@ -1,15 +1,16 @@
<template> <template>
<div class="min-h-screen bg-white text-neutral-900"> <div class="min-h-screen bg-white text-neutral-900">
<header class="w-full border-b border-neutral-200 bg-primary-500"> <header class="w-full border-b border-neutral-200 bg-primary-500">
<div class="flex w-full items-center px-6 py-4"> <div class="flex w-full items-center justify-center px-6 py-4">
<NuxtLink to="/" class="flex items-center gap-3"> <button
<span type="button"
class="flex items-center justify-center bg-white text-xl font-bold uppercase text-primary-500 p-4" class="inline-flex items-center justify-center text-3xl text-white md:hidden"
> aria-label="Ouvrir le menu"
LOGO @click="toggleMenu"
</span> >
</NuxtLink> <span aria-hidden="true" class="flex items-center"><Icon name="mdi:menu" size="44"/></span>
<nav class="mx-8 flex flex-1 gap-8 text-2xl font-bold uppercase text-white"> </button>
<nav class="ml-4 hidden items-center gap-8 text-2xl font-bold uppercase text-white md:flex">
<NuxtLink to="/" custom v-slot="{ href, navigate, isExactActive }"> <NuxtLink to="/" custom v-slot="{ href, navigate, isExactActive }">
<a <a
:href="href" :href="href"
@@ -19,35 +20,84 @@
Accueil Accueil
</a> </a>
</NuxtLink> </NuxtLink>
<NuxtLink to="/reception" custom v-slot="{ href, navigate, isActive }">
<a
:href="href"
@click="navigate"
:class="isReceptionActive ? 'opacity-100' : 'opacity-50'"
>
Reception
</a>
</NuxtLink>
<NuxtLink to="/admin/dashboard" custom v-slot="{ href, navigate, isActive }"> <NuxtLink to="/admin/dashboard" custom v-slot="{ href, navigate, isActive }">
<a <a
:href="href" :href="href"
@click="navigate" @click="navigate"
:class="isReceptionActive ? 'opacity-100' : 'opacity-50'"
> >
Admin Admin
</a> </a>
</NuxtLink> </NuxtLink>
</nav> </nav>
<NuxtLink to="/" class="flex flex-1 items-center justify-center gap-3">
<span
class="flex items-center justify-center bg-white text-xl font-bold uppercase text-primary-500 p-4"
>
LOGO
</span>
</NuxtLink>
<div class="w-[44px] md:hidden"></div>
<button <button
type="button" type="button"
class="ml-auto text-xl font-bold uppercase text-white transition hover:opacity-80" class="ml-auto hidden text-xl font-bold uppercase text-white transition hover:opacity-80 md:inline-flex"
@click="handleLogout" @click="handleLogout"
> >
Déconnexion Déconnexion
</button> </button>
</div> </div>
<transition
enter-active-class="transition duration-200 ease-out"
enter-from-class="opacity-0"
enter-to-class="opacity-100"
leave-active-class="transition duration-150 ease-in"
leave-from-class="opacity-100"
leave-to-class="opacity-0"
>
<div
v-if="isMenuOpen"
class="fixed inset-0 z-40 bg-black/40 md:hidden"
@click="closeMenu"
/>
</transition>
<transition
enter-active-class="transition duration-200 ease-out"
enter-from-class="-translate-x-full"
enter-to-class="translate-x-0"
leave-active-class="transition duration-150 ease-in"
leave-from-class="translate-x-0"
leave-to-class="-translate-x-full"
>
<aside
v-if="isMenuOpen"
class="fixed left-0 top-0 z-50 h-full w-full bg-primary-600 px-6 pb-8 pt-6 text-white shadow-xl md:hidden"
role="dialog"
aria-modal="true"
>
<div class="flex items-center justify-between">
<span class="text-2xl font-bold uppercase">Menu</span>
<button
type="button"
class="text-2xl"
aria-label="Fermer le menu"
@click="closeMenu"
>
<Icon name="mdi:close" size="44"/>
</button>
</div>
<nav class="mt-8 flex flex-col gap-6 text-xl font-bold uppercase">
<NuxtLink to="/" class="opacity-100" @click="closeMenu">Accueil</NuxtLink>
</nav>
<button
type="button"
class="mt-5 text-xl font-bold uppercase"
@click="handleLogout"
>
Déconnexion
</button>
</aside>
</transition>
</header> </header>
<main class="mx-auto w-full max-w-[1280px] px-6 pt-[85px] pb-0"> <main class="mx-auto w-full max-w-[1280px] pb-0">
<slot/> <slot/>
</main> </main>
</div> </div>
@@ -58,12 +108,21 @@ import { useAuthStore } from '~/stores/auth'
const route = useRoute() const route = useRoute()
const auth = useAuthStore() const auth = useAuthStore()
const isReceptionActive = computed(() => route.path.startsWith('/reception')) const isMenuOpen = ref(false)
const closeMenu = () => {
isMenuOpen.value = false
}
const toggleMenu = () => {
isMenuOpen.value = !isMenuOpen.value
}
const handleLogout = async () => { const handleLogout = async () => {
try { try {
await auth.logout() await auth.logout()
} finally { } finally {
closeMenu()
await navigateTo('/login') await navigateTo('/login')
} }
} }

View File

@@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
</script> </script>
<template> <template>
<div class="grid grid-cols-3 gap-x-20 gap-y-10 "> <div class="flex flex-wrap justify-center mt-8 gap-8 mb-8 md:mb-0">
<card-link label="NOUVELLE RÉCEPTION" link="/reception" iconName="mdi:truck-outline" /> <card-link label="NOUVELLE RÉCEPTION" link="/reception" iconName="mdi:truck-outline" />
<card-link label="NOUVELLE EXPÉDITION" link="/" iconName="mdi:truck-fast-outline" /> <card-link label="NOUVELLE EXPÉDITION" link="/" iconName="mdi:truck-fast-outline" />
<card-link label="PLAN DE SITE" link="/" iconName="mdi:warehouse" /> <card-link label="PLAN DE SITE" link="/" iconName="mdi:warehouse" />
@@ -11,6 +11,5 @@
<card-link label="RÉCEPTIONS FINIES" link="/reception/finish-reception" iconName="mdi:truck-check-outline" /> <card-link label="RÉCEPTIONS FINIES" link="/reception/finish-reception" iconName="mdi:truck-check-outline" />
<card-link label="EXPÉDITIONS FINIES" link="/" iconName="mdi:truck-delivery-outline" /> <card-link label="EXPÉDITIONS FINIES" link="/" iconName="mdi:truck-delivery-outline" />
<card-link label="PASSEPORT DU BOVIN" link="/" iconName="mdi:cow" /> <card-link label="PASSEPORT DU BOVIN" link="/" iconName="mdi:cow" />
</div> </div>
</template> </template>

26
src/Dto/AppVersion.php Normal file
View File

@@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
namespace App\Dto;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use App\State\AppVersionProvider;
use Symfony\Component\Serializer\Attribute\Groups;
#[ApiResource(
operations: [
new Get(
uriTemplate: '/version',
normalizationContext: ['groups' => ['version:read']],
provider: AppVersionProvider::class,
),
],
security: "is_granted('ROLE_USER')",
)]
final class AppVersion
{
#[Groups(['version:read'])]
public string $version = '';
}

View File

@@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
namespace App\State;
use ApiPlatform\Metadata\Operation;
use ApiPlatform\State\ProviderInterface;
use App\Dto\AppVersion;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
final readonly class AppVersionProvider implements ProviderInterface
{
public function __construct(
#[Autowire('%app.version%')]
private string $version,
) {}
public function provide(Operation $operation, array $uriVariables = [], array $context = []): AppVersion
{
$dto = new AppVersion();
$dto->version = $this->version;
return $dto;
}
}