From 8612f0ab8b7c73e5cfbe53f1ff94dd898882c516 Mon Sep 17 00:00:00 2001 From: Philippe PITTOLI Date: Sat, 7 Dec 2019 18:15:57 +0100 Subject: [PATCH] print permissions list --- client/project-creation-modal.ls | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/client/project-creation-modal.ls b/client/project-creation-modal.ls index 6d8a237..cbe0da0 100644 --- a/client/project-creation-modal.ls +++ b/client/project-creation-modal.ls @@ -12,14 +12,14 @@ ProjectCreationModal = (project, todod-ws) -> for col in project.extra_properties.columns new-col = {} for k,v of col - console.log "element : ", k, "value: ", v + # console.log "element : ", k, "value: ", v new-col[k] = v columns-copy ++= [ new-col ] self = { title: project.title || "" - # TODO XXX FIXME - new-user: "Coucou 2 le retour" + permissions: project.permissions || [[]] + new-user: "New user" new-column-input: { title: "New column !" } @@ -39,14 +39,13 @@ ProjectCreationModal = (project, todod-ws) -> } bulma.field [ - console.log "THEAFOEIOEAI JOAEJFOI JOJFOAEJ USER NAME: " + self.new-user - bulma.label "Valeur actuelle : " + self.new-user + # console.log "NEW USER NAME: " + self.new-user + # bulma.label "Valeur actuelle : " + self.new-user bulma.label "Adding a user" bulma.input { value: self.new-user oninput: (e) -> self.new-user := e.target.value - console.log "NEW USER NAME: " + self.new-user name: \new-user id: \user-add @@ -59,6 +58,18 @@ ProjectCreationModal = (project, todod-ws) -> self.title := e.target.value } + h \aside.menu [ + h \p.menu-label [ "Permissions" ] + h \ul.menu-list self.permissions.map (permission) -> + h \li [ + h \p permission.map (e, index) -> + if index == 0 + "Permissions '" + e + "': " + else + "" + e + ", " + ] + ] + h \aside.menu [ h \p.menu-label [ "Choose the columns" ]