From 98ee62294d598298c133fa0635528436f2c1519e Mon Sep 17 00:00:00 2001 From: tristan Date: Fri, 6 Feb 2026 10:25:54 +0100 Subject: [PATCH 01/10] =?UTF-8?q?feat=20:=20ajout=20d'un=20num=C3=A9ro=20d?= =?UTF-8?q?e=20version=20automatique=20via=20la=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/auto-tag-develop.yml | 57 +++++++++++++++++++-------- .idea/workspace.xml | 27 +++++++------ config/services.yaml | 3 ++ config/version.yaml | 2 + src/Dto/AppVersion.php | 26 ++++++++++++ src/State/AppVersionProvider.php | 26 ++++++++++++ 6 files changed, 111 insertions(+), 30 deletions(-) create mode 100644 config/version.yaml create mode 100644 src/Dto/AppVersion.php create mode 100644 src/State/AppVersionProvider.php diff --git a/.gitea/workflows/auto-tag-develop.yml b/.gitea/workflows/auto-tag-develop.yml index 5bb4ac5..4c4a631 100644 --- a/.gitea/workflows/auto-tag-develop.yml +++ b/.gitea/workflows/auto-tag-develop.yml @@ -16,30 +16,53 @@ jobs: token: ${{ secrets.RELEASE_TOKEN }} persist-credentials: true - - name: Create next tag v0.0.X + - name: Create next tag from config/version.yaml shell: bash run: | set -euo pipefail - # Skip if current commit already has a v0.0.* tag - if git tag --points-at HEAD | grep -qE '^v0\.0\.'; then + # Skip if current commit already has a vX.Y.Z tag + if git tag --points-at HEAD | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+$'; then echo "Tag already exists on this commit. Skipping." exit 0 fi - last_tag="$(git tag -l 'v0.0.*' --sort=-v:refname | head -n1 || true)" - if [ -z "$last_tag" ]; then - next_tag="v0.0.1" - 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))" + changed_version=false + if git diff --name-only "${{ github.event.before }}" "${{ github.sha }}" | grep -q '^config/version\.yaml$'; then + changed_version=true fi - git config user.name "gitea-actions" - git config user.email "gitea-actions@local" - git tag "$next_tag" - git push origin "$next_tag" + read_version() { + awk -F': *' '/app\.version:/{print $2}' config/version.yaml | tr -d '[:space:]' | tr -d "'\"" + } + + 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 + + cat > config/version.yaml < - + + - + @@ -738,7 +739,6 @@ - @@ -763,7 +763,8 @@ - diff --git a/config/services.yaml b/config/services.yaml index 1c52e92..5cfcb7a 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -8,6 +8,9 @@ # https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration parameters: +imports: + - { resource: version.yaml } + services: # default configuration for services in *this* file _defaults: diff --git a/config/version.yaml b/config/version.yaml new file mode 100644 index 0000000..acf5bfb --- /dev/null +++ b/config/version.yaml @@ -0,0 +1,2 @@ +parameters: + app.version: '0.0.29' diff --git a/src/Dto/AppVersion.php b/src/Dto/AppVersion.php new file mode 100644 index 0000000..66f7dea --- /dev/null +++ b/src/Dto/AppVersion.php @@ -0,0 +1,26 @@ + ['version:read']], + provider: AppVersionProvider::class, + ), + ], + security: "is_granted('ROLE_USER')", +)] +final class AppVersion +{ + #[Groups(['version:read'])] + public string $version = ''; +} diff --git a/src/State/AppVersionProvider.php b/src/State/AppVersionProvider.php new file mode 100644 index 0000000..9f14f64 --- /dev/null +++ b/src/State/AppVersionProvider.php @@ -0,0 +1,26 @@ +version = $this->version; + + return $dto; + } +} From 33d21f6ae6fb5594260277c7947bbba5e60d2aa6 Mon Sep 17 00:00:00 2001 From: tristan Date: Fri, 6 Feb 2026 10:30:27 +0100 Subject: [PATCH 02/10] =?UTF-8?q?feat=20:=20update=20num=C3=A9ro=20de=20ve?= =?UTF-8?q?rsion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/version.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/version.yaml b/config/version.yaml index acf5bfb..93fc42f 100644 --- a/config/version.yaml +++ b/config/version.yaml @@ -1,2 +1,2 @@ parameters: - app.version: '0.0.29' + app.version: '0.0.30' From bb0b0092dae2877065154a6fd4251bcaf1d624bc Mon Sep 17 00:00:00 2001 From: tristan Date: Fri, 6 Feb 2026 10:38:32 +0100 Subject: [PATCH 03/10] fix : auto-tag-develop.yml --- .gitea/workflows/auto-tag-develop.yml | 2 +- .idea/workspace.xml | 97 +++++++++++++-------------- 2 files changed, 48 insertions(+), 51 deletions(-) diff --git a/.gitea/workflows/auto-tag-develop.yml b/.gitea/workflows/auto-tag-develop.yml index 4c4a631..02c091e 100644 --- a/.gitea/workflows/auto-tag-develop.yml +++ b/.gitea/workflows/auto-tag-develop.yml @@ -28,7 +28,7 @@ jobs: fi changed_version=false - if git diff --name-only "${{ github.event.before }}" "${{ github.sha }}" | grep -q '^config/version\.yaml$'; then + if git diff --name-only "${{ gitea.event.before }}" "${{ gitea.event.after }}" | grep -q '^config/version\.yaml$'; then changed_version=true fi diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 721b017..a752e69 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,11 +4,8 @@ - - + - - - { + "keyToString": { + "RunOnceActivity.MCP Project settings loaded": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true", + "RunOnceActivity.git.unshallow": "true", + "RunOnceActivity.typescript.service.memoryLimit.init": "true", + "git-widget-placeholder": "develop", + "last_opened_file_path": "/home/sroy/Documents/test/Ferme", + "node.js.detected.package.eslint": "true", + "node.js.detected.package.tslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "node.js.selected.package.tslint": "(autodetect)", + "nodejs_package_manager_path": "npm", + "settings.editor.selected.configurable": "configurable.tailwindcss", + "ts.external.directory.path": "/opt/phpstorm/plugins/javascript-plugin/jsLanguageServicesImpl/external", + "vue.rearranger.settings.migration": "true" }, - "keyToStringList": { - "DatabaseDriversLRU": [ - "postgresql" + "keyToStringList": { + "DatabaseDriversLRU": [ + "postgresql" ], - "com.intellij.ide.scratch.ScratchImplUtil$2/New Scratch File": [ - "TEXT" + "com.intellij.ide.scratch.ScratchImplUtil$2/New Scratch File": [ + "TEXT" ], - "vue.recent.templates": [ - "Vue Composition API Component" + "vue.recent.templates": [ + "Vue Composition API Component" ] } -}]]> +} @@ -297,22 +294,6 @@ - - - - - @@ -739,8 +736,6 @@ - - @@ -764,7 +759,9 @@ - @@ -778,4 +775,4 @@ - + \ No newline at end of file From 299ea84e87d7e6e7cb7dd565f813f8c7b29a33e5 Mon Sep 17 00:00:00 2001 From: tristan Date: Fri, 6 Feb 2026 10:40:57 +0100 Subject: [PATCH 04/10] fix : auto-tag-develop.yml --- .gitea/workflows/auto-tag-develop.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitea/workflows/auto-tag-develop.yml b/.gitea/workflows/auto-tag-develop.yml index 02c091e..48f28d5 100644 --- a/.gitea/workflows/auto-tag-develop.yml +++ b/.gitea/workflows/auto-tag-develop.yml @@ -52,10 +52,7 @@ jobs: version="${major}.${minor}.$((patch + 1))" fi - cat > config/version.yaml < config/version.yaml git config user.name "gitea-actions" git config user.email "gitea-actions@local" git add config/version.yaml From e6bb4ddf6a42accfb14dbf2944e79025c392beda Mon Sep 17 00:00:00 2001 From: tristan Date: Fri, 6 Feb 2026 10:44:43 +0100 Subject: [PATCH 05/10] =?UTF-8?q?feat=20:=20test=20auto-tag-develop.yml=20?= =?UTF-8?q?(auto=20incr=C3=A9ment=20version)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/workspace.xml | 42 ++++++++++++++++++++---------------------- src/Entity/.gitignore | 0 2 files changed, 20 insertions(+), 22 deletions(-) delete mode 100644 src/Entity/.gitignore diff --git a/.idea/workspace.xml b/.idea/workspace.xml index a752e69..ae6787f 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,9 +4,7 @@ - @@ -761,7 +758,8 @@ - diff --git a/src/Entity/.gitignore b/src/Entity/.gitignore deleted file mode 100644 index e69de29..0000000 From 0e905bfcbe1c05e5ac565ab4c896a6e8fb609fc0 Mon Sep 17 00:00:00 2001 From: gitea-actions Date: Fri, 6 Feb 2026 09:44:54 +0000 Subject: [PATCH 06/10] chore: bump version to v0.0.31 --- config/version.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/version.yaml b/config/version.yaml index 93fc42f..5ac205f 100644 --- a/config/version.yaml +++ b/config/version.yaml @@ -1,2 +1,2 @@ parameters: - app.version: '0.0.30' + app.version: '0.0.31' From c010bdc262a88a2bf6a03297174953d8cf8e0461 Mon Sep 17 00:00:00 2001 From: tristan Date: Fri, 6 Feb 2026 11:52:45 +0100 Subject: [PATCH 07/10] =?UTF-8?q?feat=20:=20ajout=20du=20num=C3=A9ro=20de?= =?UTF-8?q?=20version=20de=20l'application=20auth/default=20layout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/workspace.xml | 34 ++++++++++++++++--------- config/packages/security.yaml | 2 ++ frontend/app.vue | 8 ++++++ frontend/composables/useAppVersion.ts | 17 +++++++++++++ frontend/layouts/default.vue | 4 +++ frontend/pages/login.vue | 4 ++- src/{Dto => ApiResource}/AppVersion.php | 3 +-- src/State/AppVersionProvider.php | 2 +- 8 files changed, 58 insertions(+), 16 deletions(-) create mode 100644 frontend/composables/useAppVersion.ts rename src/{Dto => ApiResource}/AppVersion.php (89%) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index ae6787f..c6eee6c 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,7 +4,17 @@ - + + + + + + + + + + + @@ -734,7 +744,6 @@ - @@ -759,7 +768,8 @@ - diff --git a/config/packages/security.yaml b/config/packages/security.yaml index c0859d3..35967a3 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -53,6 +53,8 @@ security: - { path: ^/api/users, roles: PUBLIC_ACCESS, methods: [GET] } # Doc API (swagger) en public - { path: ^/api/docs, roles: PUBLIC_ACCESS } + # Version de l'application en public + - { path: ^/api/version, roles: PUBLIC_ACCESS, methods: [GET] } # Tout le reste nécessite un JWT - { path: ^/, roles: IS_AUTHENTICATED_FULLY } diff --git a/frontend/app.vue b/frontend/app.vue index f8eacfa..c336825 100644 --- a/frontend/app.vue +++ b/frontend/app.vue @@ -3,3 +3,11 @@ + + diff --git a/frontend/composables/useAppVersion.ts b/frontend/composables/useAppVersion.ts new file mode 100644 index 0000000..803278d --- /dev/null +++ b/frontend/composables/useAppVersion.ts @@ -0,0 +1,17 @@ +export const useAppVersion = () => { + const api = useApi() + const version = useState('app-version', () => null) + + const load = async () => { + if (version.value) { + return version.value + } + const response = await api.get<{ version: string }>('version', {}, { + toast: false + }) + version.value = response.version + return version.value + } + + return { version, load } +} diff --git a/frontend/layouts/default.vue b/frontend/layouts/default.vue index bc932da..e978c6d 100644 --- a/frontend/layouts/default.vue +++ b/frontend/layouts/default.vue @@ -100,6 +100,9 @@
+
+

v{{ version }}

+
@@ -109,6 +112,7 @@ import { useAuthStore } from '~/stores/auth' const route = useRoute() const auth = useAuthStore() const isMenuOpen = ref(false) +const { version } = useAppVersion() const closeMenu = () => { isMenuOpen.value = false diff --git a/frontend/pages/login.vue b/frontend/pages/login.vue index cc8c809..21d0c21 100644 --- a/frontend/pages/login.vue +++ b/frontend/pages/login.vue @@ -46,7 +46,8 @@ > Connexion - +

v{{ version }}

+ @@ -57,6 +58,7 @@ import { useAuthStore } from '~/stores/auth' const router = useRouter() const auth = useAuthStore() +const { version } = useAppVersion() definePageMeta({ layout: 'auth' diff --git a/src/Dto/AppVersion.php b/src/ApiResource/AppVersion.php similarity index 89% rename from src/Dto/AppVersion.php rename to src/ApiResource/AppVersion.php index 66f7dea..ba3c071 100644 --- a/src/Dto/AppVersion.php +++ b/src/ApiResource/AppVersion.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace App\Dto; +namespace App\ApiResource; use ApiPlatform\Metadata\ApiResource; use ApiPlatform\Metadata\Get; @@ -17,7 +17,6 @@ use Symfony\Component\Serializer\Attribute\Groups; provider: AppVersionProvider::class, ), ], - security: "is_granted('ROLE_USER')", )] final class AppVersion { diff --git a/src/State/AppVersionProvider.php b/src/State/AppVersionProvider.php index 9f14f64..cc65752 100644 --- a/src/State/AppVersionProvider.php +++ b/src/State/AppVersionProvider.php @@ -6,7 +6,7 @@ namespace App\State; use ApiPlatform\Metadata\Operation; use ApiPlatform\State\ProviderInterface; -use App\Dto\AppVersion; +use App\ApiResource\AppVersion; use Symfony\Component\DependencyInjection\Attribute\Autowire; final readonly class AppVersionProvider implements ProviderInterface From 0d0aa788dbc3c7c89840af85f6208329425ad5ed Mon Sep 17 00:00:00 2001 From: gitea-actions Date: Fri, 6 Feb 2026 10:52:56 +0000 Subject: [PATCH 08/10] chore: bump version to v0.0.32 --- config/version.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/version.yaml b/config/version.yaml index 5ac205f..283b71b 100644 --- a/config/version.yaml +++ b/config/version.yaml @@ -1,2 +1,2 @@ parameters: - app.version: '0.0.31' + app.version: '0.0.32' From 42ce1e2d08d32720349c83552b3a33cd7c9421d2 Mon Sep 17 00:00:00 2001 From: sroy Date: Mon, 9 Feb 2026 09:04:18 +0000 Subject: [PATCH 09/10] [#316] Admin liste transporteur (!15) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit | Numéro du ticket | Titre du ticket | |------------------|-----------------| | #316 | Admin liste transporteur | ## 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 - [x] CHANGELOG modifié Reviewed-on: https://gitea.malio.fr/MALIO-DEV/Ferme/pulls/15 Reviewed-by: Autin Co-authored-by: sroy Co-committed-by: sroy --- CHANGELOG.md | 1 + frontend/layouts/admin.vue | 5 +- frontend/pages/admin/carrier/carrier-list.vue | 51 +++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 frontend/pages/admin/carrier/carrier-list.vue diff --git a/CHANGELOG.md b/CHANGELOG.md index e88d430..4e2ff49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ Ajouter dans le fichier .env du frontend * Finalisation de la partie réception de marchandise * [#267] Lister les réceptions en attente * [#268] Lister les réceptions terminées +* [#316] Admin liste des transporteurs ### Changed diff --git a/frontend/layouts/admin.vue b/frontend/layouts/admin.vue index ffb8938..ffd8694 100644 --- a/frontend/layouts/admin.vue +++ b/frontend/layouts/admin.vue @@ -22,7 +22,10 @@