panel projects - redesign and only show managed project

This commit is contained in:
isUnknown 2024-11-18 14:49:48 +01:00
parent 5c9f450539
commit ec53fae7a0
7 changed files with 104 additions and 29 deletions

View file

@ -1,10 +1,16 @@
/* CSS VARIABLES */
:root {
/* Colors */
--color-l-200: 95%;
--color-l-300: 85%;
--color-l-400: 80%;
--color-l-500: 74%;
}
.k-panel-menu {
background-color: #fff;
}
.k-panel-menu-button[aria-current] {
--button-color-back: #00968f1a;
}

View file

@ -2,7 +2,7 @@ Alt:
----
Favoriteforusers: - user://WWjXgPWk
Favoriteforusers:
----

View file

@ -28,8 +28,8 @@ Comments:
url: file://s0lNtRA0Z7ybTCWG
position:
pageIndex: 1
x: '32.518325137231'
y: '20.46332046332'
x: "32.518325137231"
y: "20.46332046332"
replies: [ ]
text: test
author:
@ -40,4 +40,62 @@ Comments:
date: 2024-11-18T11:59:06+01:00
id: m3mwxzuo
type: comment
isRead: false
-
location:
page:
uri: >
projects/miss-dior-blooming-bouquet/client-brief
title: Brief client
href: >
/projects/miss-dior-blooming-bouquet?dialog=client-brief
project:
title: Miss Dior Blooming Bouquet
uri: projects/miss-dior-blooming-bouquet
file:
uuid: file://s0lNtRA0Z7ybTCWG
url: file://s0lNtRA0Z7ybTCWG
position:
pageIndex: 1
x: "60.383371825251"
y: "50.772200772201"
replies: [ ]
text: Test 2
author:
name: Adrien Payet
email: adrien.payet@outlook.com
uuid: user://WWjXgPWk
role: admin
date: 2024-11-18T14:05:32+01:00
id: m3n1gl8u
type: comment
isRead: false
-
location:
page:
uri: >
projects/miss-dior-blooming-bouquet/client-brief
title: Brief client
href: >
/projects/miss-dior-blooming-bouquet?dialog=client-brief
project:
title: Miss Dior Blooming Bouquet
uri: projects/miss-dior-blooming-bouquet
file:
uuid: file://s0lNtRA0Z7ybTCWG
url: file://s0lNtRA0Z7ybTCWG
position:
pageIndex: 1
x: "20.771295651105"
y: "66.409266409266"
replies: [ ]
text: Test 3
author:
name: Adrien Payet
email: adrien.payet@outlook.com
uuid: user://WWjXgPWk
role: admin
date: 2024-11-18T14:05:45+01:00
id: m3n1gupx
type: comment
isRead: false

View file

@ -1,5 +1,11 @@
title: Projet
icon: page
status:
draft:
label: Brouillon
text: Accessible uniquement aux éditeurs connectés ou via un lien secret
listed: En cours
unlisted: Archivé
tabs:
steps:

View file

@ -5,6 +5,13 @@ tabs:
label: Contenu
columns:
- width: 1/1
sections:
listed:
extends: sections/projects
headline: En cours
status: listed
sortBy: modified desc
- width: 1/2
sections:
drafts:
extends: sections/projects
@ -12,35 +19,21 @@ tabs:
status: draft
- width: 1/2
sections:
yourProjects:
label: Vos projets
type: pages
query: user.projects
create: false
search: true
help: Projets pour lesquels vous êtes nommé chef de projet.
image:
query: page.client.toPage.logo.toFile
listed:
extends: sections/projects
headline: En cours
layout: list
info: "étape : {{ page.getStepLabel }}"
status: listed
- width: 1/2
sections:
modifiedProjects:
extends: sections/projects
create: false
headline: Projets récement modifiés
sortBy: modified desc
layout: list
image:
query: page.client.toPage.logo.toFil
unlisted:
extends: sections/projects
headline: Archivés
status: unlisted
- width: 1/1
sections:
yourProjects:
label: Tous vos projets
type: pages
query: user.projects
sortBy: modified desc
create: false
search: true
image:
query: page.client.toPage.logo.toFile
settings:
label: Réglages

View file

@ -8,6 +8,10 @@ columns:
client: true
currentStep:
label: Étape
value: "{{ page.getStepLabel }}"
managers:
label: Chefs de projet
value: "{{ page.printManagers }}"
empty: Pas encore de projet
image: false
search: true

View file

@ -13,6 +13,10 @@ class ProjectPage extends Page {
return $steps;
}
public function getCurrentStep() {
return $this->getStepsLabel()[$this->currentStep()];
}
private function createStep($child) {
$files = [];
$uri = null;
@ -69,4 +73,8 @@ class ProjectPage extends Page {
return $stepsLabel[$this->currentStep()->value()];
}
public function printManagers() {
return A::implode($this->managers()->toUsers()->pluck('name'), ', ');
}
}