Feat/disable services 662 (#671)
* disable button for services * add button to disable services * fix account services links * fixup! fix account services links --------- Co-authored-by: Sarahshr <sarah@les-tilleuls.coop>
This commit is contained in:
parent
9f661ebe0a
commit
b1e3a5150c
3 changed files with 108 additions and 102 deletions
|
|
@ -4,6 +4,8 @@ App\Entity\Configuration:
|
|||
|
||||
features (extends configuration_template):
|
||||
configuration:
|
||||
services:
|
||||
servicesEnabled: true
|
||||
notificationsSender:
|
||||
notificationsSenderEmail: info@example.com
|
||||
notificationsSenderName: Contact
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class Configuration
|
|||
*/
|
||||
public function getServices(): array
|
||||
{
|
||||
/** @var array<bool> $services */
|
||||
/** @var array<string, bool> $services */
|
||||
$services = $this->configuration['services'] ?? [];
|
||||
|
||||
return $services;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
{% set my_account_links = [
|
||||
{
|
||||
section: 'Messagerie',
|
||||
enable: true,
|
||||
links: [
|
||||
{
|
||||
name: 'Mes emprunts',
|
||||
|
|
@ -36,6 +37,7 @@
|
|||
},
|
||||
{
|
||||
section: 'Mes objets',
|
||||
enable: true,
|
||||
links: [
|
||||
{
|
||||
name: 'Voir mes objets',
|
||||
|
|
@ -53,7 +55,7 @@
|
|||
},
|
||||
{
|
||||
section: 'Mes services',
|
||||
disable: servicesConfig,
|
||||
enable: servicesConfig,
|
||||
links: [
|
||||
{
|
||||
name: 'Voir mes services',
|
||||
|
|
@ -71,6 +73,7 @@
|
|||
},
|
||||
{
|
||||
section: 'Mes groupes',
|
||||
enable: true,
|
||||
links: [
|
||||
{
|
||||
name: 'Voir mes groupes',
|
||||
|
|
@ -94,6 +97,7 @@
|
|||
},
|
||||
{
|
||||
section: 'Compte',
|
||||
enable: true,
|
||||
links: [
|
||||
{
|
||||
name: 'Mon adresse',
|
||||
|
|
@ -134,7 +138,7 @@
|
|||
} %}
|
||||
<div class="row flex-wrap">
|
||||
{% for my_account_link in my_account_links %}
|
||||
{% if my_account_link.disable is not defined %}
|
||||
{% if my_account_link.enable %}
|
||||
<div class="col-12 col-md-4">
|
||||
<nav class="myAccount d-flex flex-column mt-3 mt-md-5">
|
||||
<div class="myAccount-header w-100 rounded-2">
|
||||
|
|
|
|||
Loading…
Reference in a new issue