From f2d81c46da9933c736eeff68d394c20c37da43df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 3 Jul 2024 12:45:10 +0200 Subject: [PATCH] fixes from default configuration --- composer.json | 1 + composer.lock | 34 +- config/packages/lexik_jwt_authentication.yaml | 2 +- .../lexik_jwt_authentication_chill.yaml | 8 + config/packages/translation.yaml | 3 - config/packages/workflow.yaml | 291 +++++++++++++++++- symfony.lock | 22 ++ 7 files changed, 355 insertions(+), 6 deletions(-) create mode 100644 config/packages/lexik_jwt_authentication_chill.yaml diff --git a/composer.json b/composer.json index 5dcbba7..72dded4 100644 --- a/composer.json +++ b/composer.json @@ -10,6 +10,7 @@ "champs-libres/wopi-bundle": "dev-master@dev", "champs-libres/wopi-lib": "dev-master@dev", "chill-project/chill-bundles": "v3.0.0-RC3", + "chill-project/chill-deploy": "^1.0", "symfony/console": "5.4.*", "symfony/dotenv": "5.4.*", "symfony/flex": "^1.17|^2", diff --git a/composer.lock b/composer.lock index 39da54f..0fe1320 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ff6df1a73b9d5656e2e4a9c02d2bcdcf", + "content-hash": "e29db7665f176385c33add162f4ca1be", "packages": [ { "name": "brick/math", @@ -330,6 +330,38 @@ }, "time": "2024-06-24T14:23:47+00:00" }, + { + "name": "chill-project/chill-deploy", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://gitlab.com/Chill-Projet/chill-deploy.git", + "reference": "761bbdc59190b076b1b16d699c27be57d6b47d8a" + }, + "dist": { + "type": "zip", + "url": "https://gitlab.com/api/v4/projects/Chill-Projet%2Fchill-deploy/repository/archive.zip?sha=761bbdc59190b076b1b16d699c27be57d6b47d8a", + "reference": "761bbdc59190b076b1b16d699c27be57d6b47d8a", + "shasum": "" + }, + "type": "metapackage", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AGPL-3.0-only" + ], + "authors": [ + { + "name": "Julien Fastré", + "email": "julien.fastre@champs-libres.coop" + } + ], + "description": "A meta-package which will trigger installation of opiniated files to deploy chill using docker, and running ci", + "support": { + "issues": "https://gitlab.com/Chill-Projet/chill-deploy/-/issues", + "source": "https://gitlab.com/Chill-Projet/chill-deploy/-/tree/1.0.0" + }, + "time": "2024-05-02T16:15:41+00:00" + }, { "name": "composer/package-versions-deprecated", "version": "1.11.99.5", diff --git a/config/packages/lexik_jwt_authentication.yaml b/config/packages/lexik_jwt_authentication.yaml index edfb69d..b5cadd7 100644 --- a/config/packages/lexik_jwt_authentication.yaml +++ b/config/packages/lexik_jwt_authentication.yaml @@ -1,4 +1,4 @@ lexik_jwt_authentication: secret_key: '%env(resolve:JWT_SECRET_KEY)%' public_key: '%env(resolve:JWT_PUBLIC_KEY)%' - pass_phrase: '%env(JWT_PASSPHRASE)%' + pass_phrase: '%env(JWT_PASSPHRASE)%' \ No newline at end of file diff --git a/config/packages/lexik_jwt_authentication_chill.yaml b/config/packages/lexik_jwt_authentication_chill.yaml new file mode 100644 index 0000000..0c9b61f --- /dev/null +++ b/config/packages/lexik_jwt_authentication_chill.yaml @@ -0,0 +1,8 @@ +lexik_jwt_authentication: + # required for wopi - recommended duration + token_ttl: 36000 + + token_extractors: + query_parameter: + enabled: true + name: access_token diff --git a/config/packages/translation.yaml b/config/packages/translation.yaml index b3f8f9c..674dea7 100644 --- a/config/packages/translation.yaml +++ b/config/packages/translation.yaml @@ -1,7 +1,4 @@ framework: - default_locale: en translator: default_path: '%kernel.project_dir%/translations' - fallbacks: - - en providers: diff --git a/config/packages/workflow.yaml b/config/packages/workflow.yaml index 855df59..983f5a1 100644 --- a/config/packages/workflow.yaml +++ b/config/packages/workflow.yaml @@ -1,2 +1,291 @@ framework: - workflows: null + workflows: + vendee_internal: + type: state_machine + metadata: + related_entity: + - Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocument + - Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork + - Chill\DocStoreBundle\Entity\AccompanyingCourseDocument + label: + fr: 'Suivi' + support_strategy: Chill\MainBundle\Workflow\RelatedEntityWorkflowSupportsStrategy + initial_marking: 'initial' + places: + initial: + metadata: + label: + fr: Étape initiale + attenteModification: + metadata: + label: + fr: En attente de modification du document + validationFilterInputLabels: + forward: {fr: Modification effectuée} + backward: {fr: Pas de modification effectuée} + neutral: {fr: Autre} + attenteMiseEnForme: + metadata: + label: + fr: En attente de mise en forme + validationFilterInputLabels: + forward: {fr: Mise en forme terminée} + backward: {fr: Pas de mise en forme effectuée} + neutral: {fr: Autre} + attenteVisa: + metadata: + label: + fr: En attente de visa + validationFilterInputLabels: + forward: {fr: Visa accordé} + backward: {fr: Visa refusé} + neutral: {fr: Autre} + attenteSignature: + metadata: + label: + fr: En attente de signature + validationFilterInputLabels: + forward: {fr: Signature accordée} + backward: {fr: Signature refusée} + neutral: {fr: Autre} + attenteTraitement: + metadata: + label: + fr: En attente de traitement + validationFilterInputLabels: + forward: {fr: Traitement terminé favorablement} + backward: {fr: Traitement terminé défavorablement} + neutral: {fr: Autre} + attenteEnvoi: + metadata: + label: + fr: En attente d'envoi + validationFilterInputLabels: + forward: {fr: Document envoyé} + backward: {fr: Document non envoyé} + neutral: {fr: Autre} + attenteValidationMiseEnForme: + metadata: + label: + fr: En attente de validation de la mise en forme + validationFilterInputLabels: + forward: {fr: Validation de la mise en forme} + backward: {fr: Refus de validation de la mise en forme} + neutral: {fr: Autre} + annule: + metadata: + isFinal: true + isFinalPositive: false + label: + fr: Annulé + final: + metadata: + isFinal: true + isFinalPositive: true + label: + fr: Finalisé + transitions: + # transition qui avancent + demandeModificationDocument: + from: + - initial + to: attenteModification + metadata: + label: + fr: Demande de modification du document + isForward: true + demandeMiseEnForme: + from: + - initial + - attenteModification + to: attenteMiseEnForme + metadata: + label: + fr: Demande de mise en forme + isForward: true + demandeValidationMiseEnForme: + from: + - attenteMiseEnForme + to: attenteValidationMiseEnForme + metadata: + label: + fr: Demande de validation de la mise en forme + isForward: true + demandeVisa: + from: + - initial + - attenteModification + - attenteMiseEnForme + - attenteValidationMiseEnForme + to: attenteVisa + metadata: + label: + fr: Demande de visa + isForward: true + demandeSignature: + from: + - initial + - attenteModification + - attenteMiseEnForme + - attenteValidationMiseEnForme + - attenteVisa + to: attenteSignature + metadata: + label: {fr: Demande de signature} + isForward: true + demandeTraitement: + from: + - initial + - attenteModification + - attenteMiseEnForme + - attenteValidationMiseEnForme + - attenteVisa + - attenteSignature + to: attenteTraitement + metadata: + label: {fr: Demande de traitement} + isForward: true + demandeEnvoi: + from: + - initial + - attenteModification + - attenteMiseEnForme + - attenteValidationMiseEnForme + - attenteVisa + - attenteSignature + - attenteTraitement + to: attenteEnvoi + metadata: + label: {fr: Demande d'envoi} + isForward: true + annulation: + from: + - initial + - attenteModification + - attenteMiseEnForme + - attenteValidationMiseEnForme + - attenteVisa + - attenteSignature + - attenteTraitement + - attenteEnvoi + to: annule + metadata: + label: {fr: Annulation} + isForward: false + # transitions qui répètent l'étape + demandeMiseEnFormeSupplementaire: + from: + - attenteMiseEnForme + - attenteValidationMiseEnForme + to: attenteMiseEnForme + metadata: + label: {fr: Demande de mise en forme supplémentaire} + demandeVisaSupplementaire: + from: + - attenteVisa + to: attenteVisa + metadata: + label: {fr: Demande de visa supplémentaire} + isForward: true + demandeSignatureSupplementaire: + from: + - attenteSignature + to: attenteSignature + metadata: + label: {fr: Demande de signature supplémentaire} + demandeTraitementSupplementaire: + from: + - attenteTraitement + to: attenteTraitement + metadata: + label: {fr: Demande de traitement supplémentaire} + # transitions qui renvoient vers une étape précédente + refusEtModificationDocument: + from: + - attenteVisa + - attenteSignature + - attenteTraitement + - attenteEnvoi + to: attenteModification + metadata: + label: + fr: Refus et demande de modification du document + isForward: false + refusEtDemandeMiseEnForme: + from: + - attenteVisa + - attenteSignature + - attenteTraitement + - attenteEnvoi + to: attenteMiseEnForme + metadata: + label: {fr: Refus et demande de mise en forme} + isForward: false + refusEtDemandeVisa: + from: + - attenteSignature + - attenteTraitement + - attenteEnvoi + to: attenteVisa + metadata: + label: {fr: Refus et demande de visa} + isForward: false + refusEtDemandeSignature: + from: + - attenteTraitement + - attenteEnvoi + to: attenteSignature + metadata: + label: {fr: Refus et demande de signature} + isForward: false + refusEtDemandeTraitement: + from: + - attenteEnvoi + to: attenteTraitement + metadata: + label: {fr: Refus et demande de traitement} + isForward: false + # transition vers final + initialToFinal: + from: + - initial + to: final + metadata: + label: {fr: Clotûre immédiate et cloture positive} + isForward: true + attenteMiseEnFormeToFinal: + from: + - attenteMiseEnForme + - attenteValidationMiseEnForme + to: final + metadata: + label: {fr: Mise en forme terminée et cloture positive} + isForward: true + attenteVisaToFinal: + from: + - attenteVisa + to: final + metadata: + label: {fr: Accorde le visa et cloture positive} + isForward: true + attenteSignatureToFinal: + from: + - attenteSignature + to: final + metadata: + label: {fr: Accorde la signature et cloture positive} + isForward: true + attenteTraitementToFinal: + from: + - attenteTraitement + to: final + metadata: + label: {fr: Traitement terminé et cloture postive} + isForward: true + attenteEnvoiToFinal: + from: + - attenteEnvoi + to: final + metadata: + label: {fr: Envoyé et cloture postive} + isForward: true diff --git a/symfony.lock b/symfony.lock index 9747113..b910d92 100644 --- a/symfony.lock +++ b/symfony.lock @@ -35,6 +35,28 @@ "post-install-chill.sh" ] }, + "chill-project/chill-deploy": { + "version": "1.0", + "recipe": { + "repo": "gitlab.com/Chill-Projet/chill-recipes", + "branch": "main", + "version": "1.0", + "ref": "2d916e260041fca4852a8887ff113667c6297046" + }, + "files": [ + ".gitea/workflows/release/update-composer-lock.yaml", + "docker/db/docker-entrypoint-initdb.d/0000-add-extensions.sql", + "docker/logstash/Dockerfile", + "docker/logstash/pipeline/logstash.conf", + "docker/nginx/Dockerfile", + "docker/nginx/default.conf", + "docker/nginx/nginx.with-collabora.conf", + "Dockerfile", + ".dockerignore", + "entrypoint.sh", + ".drone.yml" + ] + }, "doctrine/annotations": { "version": "1.14", "recipe": {