print permissions list

This commit is contained in:
Philippe PITTOLI 2019-12-07 18:15:57 +01:00
parent e21f373454
commit 8612f0ab8b

View File

@ -12,14 +12,14 @@ ProjectCreationModal = (project, todod-ws) ->
for col in project.extra_properties.columns for col in project.extra_properties.columns
new-col = {} new-col = {}
for k,v of col for k,v of col
console.log "element : ", k, "value: ", v # console.log "element : ", k, "value: ", v
new-col[k] = v new-col[k] = v
columns-copy ++= [ new-col ] columns-copy ++= [ new-col ]
self = { self = {
title: project.title || "" title: project.title || ""
# TODO XXX FIXME permissions: project.permissions || [[]]
new-user: "Coucou 2 le retour" new-user: "New user"
new-column-input: { new-column-input: {
title: "New column !" title: "New column !"
} }
@ -39,14 +39,13 @@ ProjectCreationModal = (project, todod-ws) ->
} }
bulma.field [ bulma.field [
console.log "THEAFOEIOEAI JOAEJFOI JOJFOAEJ USER NAME: " + self.new-user # console.log "NEW USER NAME: " + self.new-user
bulma.label "Valeur actuelle : " + self.new-user # bulma.label "Valeur actuelle : " + self.new-user
bulma.label "Adding a user" bulma.label "Adding a user"
bulma.input { bulma.input {
value: self.new-user value: self.new-user
oninput: (e) -> oninput: (e) ->
self.new-user := e.target.value self.new-user := e.target.value
console.log "NEW USER NAME: " + self.new-user
name: \new-user name: \new-user
id: \user-add id: \user-add
@ -59,6 +58,18 @@ ProjectCreationModal = (project, todod-ws) ->
self.title := e.target.value 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 \aside.menu [
h \p.menu-label [ "Choose the columns" ] h \p.menu-label [ "Choose the columns" ]