ajout variable pour activer dolibarr

This commit is contained in:
2020-10-14 17:02:41 +02:00
parent 5ea06c9aec
commit 62e7339057
4 changed files with 6 additions and 1 deletions

View File

@@ -66,5 +66,6 @@ MAILER_URL=
## Sentry DSN
SENTRY_DSN=
DOLIBARR_ACTIVE=false
DOLIBARR_API_KEY=
DOLIBARR_URI=

View File

@@ -21,6 +21,7 @@ parameters:
casFirstname: '%env(resolve:CAS_FIRSTNAME)%'
officeHourStart: '%env(resolve:OFFICE_HOUR_START)%'
officeHourEnd: '%env(resolve:OFFICE_HOUR_END)%'
doliActive: '%env(resolve:DOLIBARR_ACTIVE)%'
doliApiKey: '%env(resolve:DOLIBARR_API_KEY)%'
doliUri: '%env(resolve:DOLIBARR_URI)%'

View File

@@ -35,7 +35,7 @@ class OfferController extends AbstractController
"services" => $services,
"useheader" => true,
"usesidebar" => true,
"fgprint" => true,
"fgprint" => true,
]);
return new PdfResponse(
@@ -48,6 +48,7 @@ class OfferController extends AbstractController
"services" => $services,
"useheader" => true,
"usesidebar" => true,
"doliactive" => $this->getParameter('doliActive'),
]);
}
}

View File

@@ -22,7 +22,9 @@
</h1>
<a class="btn btn-success" href={{ path('app_offer_submit') }}>Ajouter</a>
{% if doliactive %}
<a class="btn btn-success" href={{ path('app_offer_getorders') }}>Récupérer les commandes de Dolibarr</a>
{% endif %}
<div class="custom-control custom-switch float-right">
<input type="checkbox" class="custom-control-input" id="switchactiveproject" {% if app.session.get('activeproject') %} checked {% endif %}>