update: adding project admin & creation

This commit is contained in:
Jean-Baptiste Pasquier 2019-12-09 18:23:47 +01:00
parent 49e8fe9fee
commit 2e3be21cdc
No known key found for this signature in database
GPG Key ID: F2702E6D22ED4D62
9 changed files with 155 additions and 81 deletions

View File

@ -32,5 +32,6 @@ script(data-default-context, type="application/ld+json")
| "account": "http://happy-dev.fr/owl/#account",
| "jabberID": "foaf:jabberID",
| "firstName": "http://happy-dev.fr/owl/#first_name",
| "lastName": "http://happy-dev.fr/owl/#last_name"
| "lastName": "http://happy-dev.fr/owl/#last_name",
| "isAdmin": "http://happy-dev.fr/owl/#is_admin"
| }

View File

@ -29,8 +29,8 @@ html(lang="en")
//- sib-link(class="backlink", next="job-offers") Back
//- include page-job-offer-edit.pug
//- #project(hidden).with-sidebar
//- include page-project.pug
#project(hidden).with-sidebar
include page-project.pug
#circle(hidden).with-sidebar
include page-circle.pug

View File

@ -19,28 +19,29 @@ nav#main__menu
//- sib-route(name='job-offer-create', hidden)
//- sib-route(name='job-offer-edit', use-id, hidden)
//- div.divider
//- div.menu-wrapper
//- div.menu
//- div.menu-chevron
//- div.menu-icon.icon-arrow-up
//- div.menu-label Projects
//- div.menu-icon.icon-folder-alt
//- sib-route(name='project', rdf-type='hd:project', use-id='', hidden)
//- div.sub-menu.menu-notification
//- sib-display(
//- data-src=`${endpoints.projects}`
//- fields='project(customer.name, dash, name), badge'
//- empty-widget='hd-create'
//- empty-value='project'
//- value-dash=' - '
//- search-fields='team'
//- search-widget-team='sib-form-hidden'
//- search-value-team='-'
//- hd-inherit-user-id='search-value-team'
//- hd-inherit-widgets
//- widget-badge='hd-counter'
//- action-badge='badge'
//- )
div.menu-wrapper
div.menu
div.menu-chevron
sib-link(next='admin-project-list')
div.menu-icon.icon-arrow-right
div.menu-label Projects
div.menu-icon.icon-folder-alt
sib-route(name='project', rdf-type='hd:project', use-id='', hidden)
div.sub-menu.menu-notification
sib-display(
data-src=`${endpoints.projects}`
fields='project(customer.name, dash, name), badge'
empty-widget='hd-create'
empty-value='project'
value-dash=' - '
search-fields='team'
search-widget-team='sib-form-hidden'
search-value-team='-'
hd-inherit-user-id='search-value-team'
hd-inherit-widgets
widget-badge='hd-counter'
action-badge='badge'
)
div.divider
div.menu-wrapper
div.menu

View File

@ -0,0 +1,46 @@
div.content-box__info
sib-link(class="backlink" next='admin-project-list') Back
h1 New project
p.center Here you can create a new project according to your interests, what you want to share, etc.
sib-form.block(
data-src=`${endpoints.projects}`
fields='line-1(customer.name, name), line-2(customer.logo), line-3(project.description), line-4(businessProvider.name, businessProvider.fee), line-5(customer.companyRegister), line-6(customer.address), line-7(customer.firstName, customer.lastName), line-8(customer.role), line-9(customer.email, customer.phone), line-10(captain)'
label-customer.name='Customer\'s name*'
label-name='Project\'s name*'
label-customer.logo='Customer\'s logo'
label-description='Project description'
widget-description='sib-form-textarea'
label-businessProvider.name='Business provider*'
label-businessProvider.fee='Amount of the contribution'
label-customer.companyregister='Company register'
label-customer.address='Address'
widget-customer.address='sib-form-textarea'
label-customer.firstName='Name of the contact'
label-customer.lastName='Firstname of the contact'
label-customer.role='Role within the company'
label-customer.email='Email'
label-customer.phone='Phone'
range-captain=`${endpoints.users}`
next='admin-project-list'
submit-button='Save'
)

View File

@ -3,8 +3,85 @@
sib-route(name='admin-project-list')
sib-route(name='admin-project-create')
div.content-box__header.with-description
div
p.name Administration
#admin-project-list(hidden)
include templates/hd-user-avatar.pug
div.content-box__info
div.admin-header
div.admin-header__title Projects
sib-link(
class='button text-bold text-uppercase reversed button-yellow bordered with-icon icon-plus'
next='admin-project-create'
) Create a new project
#admin-project-create(hidden)
.table
div.table-header.grey-color
div Name
div Admins
div Captain
div Leave
sib-widget(name="admin-project-leave-button")
template
sib-delete(
class='button btn-margin-left text-bold text-uppercase reversed button-dark bordered with-icon icon-close'
data-src="${src}"
data-label='Leave'
)
sib-widget(name='project-captain')
template
sib-display(
data-src='${await value}'
fields='account.picture, sup(name), sub(username)'
widget-account.picture='hd-user-avatar'
)
sib-widget(name='project-admins')
template
sib-display(
data-src='${value}'
fields='user'
search-fields='isAdmin'
search-value-isAdmin='true'
search-widget-isAdmin='sib-form-hidden'
widget-user='project-captain'
)
sib-widget(name="admin-project-buttons")
template
sib-display(
data-src='${src}'
nested-field='members'
fields='relation'
action-relation='relation'
widget-relation='admin-project-leave-button'
search-fields='user'
search-widget-user='sib-form-hidden'
search-value-user="-"
hd-inherit-user-id="search-value-user"
hd-inherit-widgets
)
sib-display(
class='table-body'
data-src=`${endpoints.projects}`
fields='name, members, captain, buttons'
widget-buttons="admin-project-buttons"
action-buttons="buttons"
hd-inherit-widgets
hd-inherit-widgets-multiple
widget-captain='project-captain'
widget-members='project-admins'
)
#admin-project-create(hidden)
include page-admin-projects-create.pug

View File

@ -1,10 +1,10 @@
.views-container
#admin-circles(hidden)
include page-admin-circles.pug
#admin-projects(hidden)
include page-admin-projects.pug
//- #admin-users(hidden)
//- include page-admin-users.pug
//- #admin-projects(hidden)
//- include page-admin-projects.pug
nav.jsRightMenu(role='navigation')
sib-router(default-route='admin-circles')
ul
@ -16,6 +16,6 @@ nav.jsRightMenu(role='navigation')
sib-route(name='admin-circles')
li
a Circles
//- sib-route(name='admin-projects')
sib-route(name='admin-projects')
li
a Projects

View File

@ -1,30 +0,0 @@
.content-box.with-padding.with-form.full-width
h1 New project
p Here you can create your project, add members and assign them a job.
sib-form.block(
data-src=`${endpoints.projects}`,
range-members=`${endpoints.users}`,
range-team=`${endpoints.users}`,
fields='block-project__info(customer.name, name, customer.logo, description), block-project__fee(fieldset-fee, businessProvider, businessProviderFee), block-project__customer(fieldset-customer, customer.companyRegister, customer.address, customer.firstName, customer.lastName, customer.role, customer.email, customer.phone)',
label-customer.name='Customer\'s name',
label-name='Project\'s name',
label-customer.logo='Customer\'s logo',
label-description='Project description',
widget-fieldset-fee='hd-template-project-title',
label-businessProvider='Business provider',
label-businessProviderFee='Amount of the contribution',
widget-fieldset-customer='hd-template-project-title',
label-customer.companyRegister='Company register',
label-customer.address='Address',
label-customer.firstName='Name of the contact at the customer\'s premises',
label-customer.lastName='Firstname of the contact at the customer\'s premises',
label-customer.role='Role within the company',
label-customer.email='Email',
label-customer.phone='Phone'
)

View File

@ -1,11 +0,0 @@
sib-widget(name='hd-drive')
template
iframe.drive.chat-view(
src='https://drive.google.com/embeddedfolderview?id=${value}'
)
.content-box.with-padding.full-width.chat-view
sib-display(
bind-resources=""
fields="driveID"
widget-driveID='hd-drive'
)

View File

@ -5,10 +5,6 @@
include page-project-profile.pug
#project-edit
include page-project-edit.pug
#project-create
include page-project-create.pug
#project-drive
include page-project-drive.pug
nav.jsRightMenu(role='navigation')
sib-router(default-route='project-chat')
ul
@ -20,12 +16,6 @@ nav.jsRightMenu(role='navigation')
sib-route(name='project-profile', use-id)
li
a Information
sib-route(name='project-drive', use-id)
li
a Drive
sib-route(name='project-edit', use-id)
li
a Edit
sib-route(name='project-create', use-id)
//- li
//- a Add new
a Edit