From bcaf28723592225ad7292db8321823e063eb6419 Mon Sep 17 00:00:00 2001 From: isUnknown Date: Mon, 27 Jan 2025 18:22:03 +0100 Subject: [PATCH] user role client : give access to panel account --- public/site/blueprints/users/0_client.yml | 11 ---- public/site/blueprints/users/1_pochet.yml | 21 -------- public/site/blueprints/users/client.yml | 17 +++++- public/site/config/menu.php | 42 +++++---------- src/components/Menu.vue | 2 +- src/components/ProjectRequestDialog.vue | 63 ++++++++++++++++------- src/views/Home.vue | 12 ++++- 7 files changed, 84 insertions(+), 84 deletions(-) delete mode 100644 public/site/blueprints/users/0_client.yml delete mode 100644 public/site/blueprints/users/1_pochet.yml diff --git a/public/site/blueprints/users/0_client.yml b/public/site/blueprints/users/0_client.yml deleted file mode 100644 index cf2109b..0000000 --- a/public/site/blueprints/users/0_client.yml +++ /dev/null @@ -1,11 +0,0 @@ -title: Client -description: Ne peut pas accéder au Panel, peut accéder aux Projets auxquels il est assigné côté front. -permissions: - access: - panel: false - -fields: - projects: - label: Projets - type: pages - query: page('projects').children diff --git a/public/site/blueprints/users/1_pochet.yml b/public/site/blueprints/users/1_pochet.yml deleted file mode 100644 index bd66784..0000000 --- a/public/site/blueprints/users/1_pochet.yml +++ /dev/null @@ -1,21 +0,0 @@ -title: Interne Pochet -description: Peux accéder au Panel mais pas aux Utilisateurs, peut accéder aux Projets auxquels il est assigné par un Admin. -home: /panel/pages/projects -permissions: - access: - users: false - -fields: - job: - label: Métier - type: select - options: - - Project Manager - - Sales Manager - default: Project Panager - width: 1/4 - projects: - label: Projets - type: pages - query: page('projects').children - width: 3/4 diff --git a/public/site/blueprints/users/client.yml b/public/site/blueprints/users/client.yml index 8114170..53976a8 100644 --- a/public/site/blueprints/users/client.yml +++ b/public/site/blueprints/users/client.yml @@ -2,7 +2,22 @@ title: Client description: Ne peut pas accéder au Panel, peut accéder aux Projets auxquels il est assigné côté front. permissions: access: - panel: false + *: false + panel: true + account: true + projects: false + clients: false + design-to-light: false + inspirations: false + materials: false + creations: false + pages: false + +options: + update: + client: false + changeRole: false + delete: false fields: client: diff --git a/public/site/config/menu.php b/public/site/config/menu.php index 6917d3b..b2bae42 100644 --- a/public/site/config/menu.php +++ b/public/site/config/menu.php @@ -1,24 +1,15 @@ [ - // 'label' => 'Dashboard', - // 'icon' => 'dashboard', - // 'current' => function (string $current): bool { - // // the links of all your custom menu entries - // $links = [ - // 'pages/clients', - // 'pages/projects', - // 'pages/inspirations', - // 'pages/notifications', - // 'pages/reunions' - // ]; - // $path = Kirby\Cms\App::instance()->path(); - // return - // $current === 'site' && - // A::every($links, fn ($link) => Str::contains($path, $link) === false); - // } - // ], +$menu = [ + 'website' => [ + "label" => "Ouvrir le site", + "icon" => "open", + "link" => "https://designtopack.morphozbygroupepochet.com", + 'current' => function (string $current): bool { + return false; + } + ], + "-", 'projects' => [ 'label' => 'Projets', 'icon' => 'folder', @@ -76,16 +67,9 @@ return [ } ], '-', - // 'reunions' => [ - // 'label' => 'Réunions', - // 'icon' => 'calendar', - // 'link' => 'pages/reunions', - // 'current' => function (string $current): bool { - // $path = Kirby\Cms\App::instance()->path(); - // return Str::contains($path, 'pages/reunions'); - // } - // ], '-', 'users', 'system' -]; \ No newline at end of file +]; + +return $menu; \ No newline at end of file diff --git a/src/components/Menu.vue b/src/components/Menu.vue index 2c98683..2197a96 100644 --- a/src/components/Menu.vue +++ b/src/components/Menu.vue @@ -94,7 +94,7 @@