Skip to content
Snippets Groups Projects
Commit 288b78ec authored by Benoit Alessandroni's avatar Benoit Alessandroni
Browse files

Merge branch 'feature/fix-login-workflow' into 'master'

Feature/fix login workflow

See merge request startinblox/applications/coop-starter/coopstarter-front!15
parents 1c45eb81 47e511b6
No related branches found
No related tags found
1 merge request!15Feature/fix login workflow
sib-router(default-route='account-creation-index')
sib-route(name='account-creation-index')
sib-route(name='mentor-new-account')
sib-route(name='entrepreneur-new-account')
#account-creation-index(hidden).flex
figure(class="logo")
img(src="../images/logo.png" alt="Coopstarter logo")
h2.title_lead Welcome to our international index of resources for cooperative mentors and entrepreneurs
sib-link.block_log(next='mentor-new-account')
div
figure.img_log
img(src="../images/mentor.png"
alt="Create your account as mentor")
h2.button_base I am a mentor
sib-link.block_log(next='entrepreneur-new-account')
div
figure.img_log
img(src="../images/fusee.png"
alt="Create your account as entrepreneur")
h2.button_base I am an entrepreneur
#mentor-new-account(hidden).no-sidebar.container
include mentor/create.pug
#entrepreneur-new-account(hidden).no-sidebar.container
include entrepreneur/create.pug
......@@ -35,20 +35,9 @@ sib-widget(name='cs-action')
next="\${value}"
) ${label}
sib-widget(name='cs-form-password')
template
label
div ${label}
input(
type='password'
value="${value}"
name="${name}"
)
sib-widget(name='cs-section_introduction')
template
div
h2 ${label}
h2.title_form ${label}
p Informations will appear on your profile to inform entrepreneurs about your skills and activities. We will also use those information to address specific resources for validation.
\ No newline at end of file
include ../components/widgets
h2 Create an entrepreneur account
h2.title_form Complete your entrepreneur account
sib-form(
data-src=`${endpoints.entrepreneurs}`
fields="user.username, user.last_name, user.first_name, organisation,\
user.email, user.password, user.password_confirmation"
bind-user
fields="last_name, first_name, entrepreneur_profile.organisation, username"
range-organisation=`${endpoints.organisations}`
label-user.first_name="Surname"
label-user.last_name="Name"
label-user.username="Username"
label-user.email="Email"
label-organisation="Organisation *"
label-user.password="Password"
label-user.password_confirmation="Password confirmation"
range-entrepreneur_profile.organisation=`${endpoints.organisations}`
label-first_name="Surname"
label-last_name="Name"
label-entrepreneur_profile.organisation="Organisation *"
class-organisation='form-label is-dark'
multiple-organisation='sib-multiple-select'
widget-organisation='sib-form-auto-completion'
class-entrepreneur_profile.organisation='form-label is-dark'
multiple-entrepreneur_profile.organisation='sib-multiple-select'
widget-entrepreneur_profile.organisation='sib-form-auto-completion'
widget-user.password='cs-form-password'
widget-user.password_confirmation='cs-form-password'
widget-username='sib-form-hidden'
submit-button="CREATE AN ACCOUNT"
submit-button="COMPLETE YOUR ACCOUNT"
next="entrepreneur-dashboard"
)
h2 I am an entrepreneur
cs-login(bind-user)
button(id='entrepreneur_login') Login as entrepreneur
sib-link(next='entrepreneur-new-account')
div Create an account
\ No newline at end of file
......@@ -11,17 +11,16 @@ figure.logo.img_log
h2.title_form Complete your mentor account
sib-form(
data-src=`${endpoints.mentors}`
fields="account_information(user.username, user.last_name, user.first_name, organisation,\
user.email, phone, language,\
user.password, user.password_confirmation, account.picture),\
about_you(header_about_you, headline, city, country,\
biography, skills),\
social_media(header_social_media, linkedin, twitter)"
bind-user
fields="account_information(last_name, first_name, mentor_profile.organisation,\
mentor_profile.phone, mentor_profile.language),\
about_you(header_about_you, account.picture, mentor_profile.headline, mentor_profile.city, mentor_profile.country,\
mentor_profile.biography, mentor_profile.skills),\
social_media(header_social_media, mentor_profile.linkedin, mentor_profile.twitter), username"
range-organisation=`${endpoints.organisations}`
range-language=`${endpoints.languages}`
range-mentor_profile.organisation=`${endpoints.organisations}`
range-mentor_profile.language=`${endpoints.languages}`
label-header_about_you="About you"
label-header_social_media="Social medias"
......@@ -29,36 +28,32 @@ sib-form(
widget-header_social_media="cs-section_header"
widget-header_about_you="cs-section_introduction"
label-user.username="Username"
label-user.first_name="Surname"
label-user.last_name="Name"
label-user.email="Email"
label-organisation="Organisation"
label-phone="Phone number"
label-user.password="Password"
label-user.password_confirmation="Password confirmation"
label-language="Language"
label-first_name="Surname"
label-last_name="Name"
label-mentor_profile.organisation="Organisation"
label-mentor_profile.phone="Phone number"
label-mentor_profile.language="Language"
label-account.picture="Photo"
label-headline="Headline or current position"
label-city="City"
label-country="Country"
label-biography="Tell us more about your activities"
label-skills="What skills can you share with our entrepreneurs ?"
label-linkedin="Linkedin"
label-twitter="Twitter"
widget-skills="sib-form-textarea"
widget-biography="sib-form-textarea"
widget-user.password_confirmation="cs-form-password"
widget-user.password="cs-form-password"
class-organisation='form-label is-dark'
multiple-organisation='sib-multiple-select'
widget-organisation='sib-form-auto-completion'
class-language='form-label is-dark'
multiple-language='sib-multiple-select'
widget-language='sib-form-auto-completion'
submit-button="CREATE AN ACCOUNT"
label-mentor_profile.headline="Headline or current position"
label-mentor_profile.city="City"
label-mentor_profile.country="Country"
label-mentor_profile.biography="Tell us more about your activities"
label-mentor_profile.skills="What skills can you share with our entrepreneurs ?"
label-mentor_profile.linkedin="Linkedin"
label-mentor_profile.twitter="Twitter"
widget-mentor_profile.skills="sib-form-textarea"
widget-mentor_profile.biography="sib-form-textarea"
widget-username="sib-form-hidden"
class-mentor_profile.organisation='form-label is-dark'
multiple-mentor_profile.organisation='sib-multiple-select'
widget-mentor_profile.organisation='sib-form-auto-completion'
class-mentor_profile.language='form-label is-dark'
multiple-mentor_profile.language='sib-multiple-select'
widget-mentor_profile.language='sib-form-auto-completion'
submit-button="COMPLETE YOUR ACCOUNT"
next='mentor-dashboard'
)
figure.img_log
img(src="../images/mentor.png"
alt="Connect as mentor")
cs-login(bind-user)
button#mentor_login.button_base Login as mentor
sib-link(next='mentor-new-account')
div.button_base Create an account
sib-router(default-route='splash-index')
sib-route(name='splash-index')
sib-route(name='mentor-login')
sib-route(name='entrepreneur-login')
figure(class="logo")
img(src="../images/logo.png" alt="Coopstarter logo")
h2.title_lead Welcome to our international index of resources for cooperative mentors and entrepreneurs
#splash-index(hidden).flex
sib-link.block_log(next='mentor-login')
div
figure.img_log
img(src="../images/mentor.png"
alt="Connect as mentor")
h2.button_base I am a mentor
#splash-index(hidden).no-sidebar.block_log.flex
figure.img_log
img(src="../images/mentor.png"
alt="Connect as mentor")
sib-link.block_log(next='entrepreneur-login')
div
figure.img_log
img(src="../images/fusee.png"
alt="Connect as entrepreneur")
h2.button_base I am an entrepreneur
#mentor-login(hidden).no-sidebar.block_log.flex
include mentor/login.pug
#entrepreneur-login(hidden).no-sidebar.block_log.flex
include entrepreneur/login.pug
cs-login(bind-user)
button#mentor_login.button_base Connect to the knowledge base
\ No newline at end of file
......@@ -4,8 +4,7 @@ html
sib-router(default-route='splash')
sib-route(name='splash')
sib-route(name='mentor-new-account')
sib-route(name='entrepreneur-new-account')
sib-route(name='account-creation')
sib-route(name='mentor-dashboard')
sib-route(name='entrepreneur-dashboard')
......@@ -19,11 +18,8 @@ html
#splash(hidden).no-sidebar.container
include includes/splash.pug
#mentor-new-account(hidden).no-sidebar.container
include includes/mentor/create.pug
#entrepreneur-new-account(hidden).no-sidebar.container
include includes/entrepreneur/create.pug
#account-creation(hidden).no-sidebar.container
include includes/account-creation.pug
sib-auth
sib-auth-provider(
......@@ -39,7 +35,6 @@ script(type='module').
class CoopStarterLoginComponent extends HTMLElement {
async connectedCallback() {
mentor_login.onclick = () => this.triggerLogin();
entrepreneur_login.onclick = () => this.triggerLogin();
this.update();
}
......@@ -64,6 +59,10 @@ script(type='module').
window.dispatchEvent(
new CustomEvent('requestNavigation', { detail: { route: 'entrepreneur-dashboard' } })
);
} else {
window.dispatchEvent(
new CustomEvent('requestNavigation', { detail: { route: 'account-creation' } })
);
}
}
empty(){}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment