Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Company registration and login #63

Merged
merged 1 commit into from
Feb 22, 2018
Merged

Company registration and login #63

merged 1 commit into from
Feb 22, 2018

Conversation

duduribeiro
Copy link
Member

@duduribeiro duduribeiro commented Feb 21, 2018

This is the very beginning part of the company dashboard.
This commit adds the company registration and login and requires login to
register a new job.

Closes #64

image

image

How to test

  • Visit the root page

  • Click on Anunciar Vaga button.
    It should redirect to the login page

  • Click on Registrar link, and set a new account.
    It should create your account and login for you.

  • Crate a new Job.
    It should create a new job, redirect to the job page. The page should contain the company information (from the Registration page)

  • Click on Logout
    It should log out with success.

You should visit the job show page without login.

@duduribeiro duduribeiro self-assigned this Feb 21, 2018
@duduribeiro duduribeiro temporarily deployed to openjobs-staging-pr-63 February 21, 2018 00:26 Inactive
.error_list {
border: 1px solid #B94A48;
color: #B94A48;
background-color: #F2DEDE;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color literals like #F2DEDE should only be used in variable declarations; they should be referred to via variable everywhere else.

.error_list {
border: 1px solid #B94A48;
color: #B94A48;
background-color: #F2DEDE;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color #F2DEDE should be written as #f2dede

Read more about it here.


.error_list {
border: 1px solid #B94A48;
color: #B94A48;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color literals like #B94A48 should only be used in variable declarations; they should be referred to via variable everywhere else.


.error_list {
border: 1px solid #B94A48;
color: #B94A48;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color #B94A48 should be written as #b94a48

Read more about it here.

@@ -215,3 +216,9 @@ body {
margin-top: 0;
}
}

.error_list {
border: 1px solid #B94A48;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color literals like #B94A48 should only be used in variable declarations; they should be referred to via variable everywhere else.

background-color: $primary-color;
border: none;
-webkit-box-shadow: 0 5px 0 $dark-primary-color;
-moz-box-shadow: 0 5px 0 $dark-primary-color;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid vendor prefixes.

Read more about it here.

color: white;
background-color: $primary-color;
border: none;
-webkit-box-shadow: 0 5px 0 $dark-primary-color;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid vendor prefixes.

Read more about it here.

margin: 30px auto 30px;
color: white;
background-color: $primary-color;
border: none;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

border: 0 is preferred over border: none

Read more about it here.

height: 50px;
display: block;
margin: 30px auto 30px;
color: white;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color white should be written in hexadecimal form as #ffffff

Read more about it here.

height: 50px;
display: block;
margin: 30px auto 30px;
color: white;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color literals like white should only be used in variable declarations; they should be referred to via variable everywhere else.

@duduribeiro duduribeiro temporarily deployed to openjobs-staging-pr-63 February 21, 2018 00:37 Inactive
width: 85%;
height: 50px;
display: block;
margin: 30px auto 30px;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shorthand form for property margin should be written more concisely as 30px auto instead of 30px auto 30px

Read more about it here.

}

.btn-sign {
position: relative;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered background-color, border, -moz-box-shadow, -webkit-box-shadow, box-shadow, color, display, height, margin, position, width

Read more about it here.

-webkit-box-shadow: 0 0 0 1000px white inset;
}

.btn-sign {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule set contains (11/10) properties

}

.field:-webkit-autofill {
-webkit-box-shadow: 0 0 0 1000px white inset;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color literals like white should only be used in variable declarations; they should be referred to via variable everywhere else.

}

.field:-webkit-autofill {
-webkit-box-shadow: 0 0 0 1000px white inset;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color white should be written in hexadecimal form as #ffffff

Read more about it here.

font-weight: 300;
}

h1, input {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each selector in a comma sequence should be on its own single line

Read more about it here.

h1 {
text-align: center;
font-size: 175%;
color: #757575;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color literals like #757575 should only be used in variable declarations; they should be referred to via variable everywhere else.

}

h1 {
text-align: center;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered color, font-size, font-weight, text-align

Read more about it here.

}

::-moz-selection {
background-color: #8ac7d8;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color literals like #8ac7d8 should only be used in variable declarations; they should be referred to via variable everywhere else.

background-color: #b5e2e7;
}

::-moz-selection {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid vendor prefixes.

Read more about it here.

@duduribeiro duduribeiro temporarily deployed to openjobs-staging-pr-63 February 21, 2018 00:39 Inactive
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);

::selection {
background-color: #b5e2e7;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color literals like #b5e2e7 should only be used in variable declarations; they should be referred to via variable everywhere else.

background-color: #fff;
-webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
-moz-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color literals like rgba(0, 0, 0, 0.25) should only be used in variable declarations; they should be referred to via variable everywhere else.

width: 340px;
background-color: #fff;
-webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
-moz-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color literals like rgba(0, 0, 0, 0.25) should only be used in variable declarations; they should be referred to via variable everywhere else.

width: 340px;
background-color: #fff;
-webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
-moz-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid vendor prefixes.

Read more about it here.

margin: 50px auto;
width: 340px;
background-color: #fff;
-webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color literals like rgba(0, 0, 0, 0.25) should only be used in variable declarations; they should be referred to via variable everywhere else.

margin: 50px auto;
width: 340px;
background-color: #fff;
-webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid vendor prefixes.

Read more about it here.

padding: 10px;
margin: 50px auto;
width: 340px;
background-color: #fff;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color literals like #fff should only be used in variable declarations; they should be referred to via variable everywhere else.

}

.sign-box {
padding: 10px;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered background-color, -moz-box-shadow, -webkit-box-shadow, box-shadow, margin, padding, width

Read more about it here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

life's to short for this :(

@@ -1,6 +1,8 @@
# frozen_string_literal: true

class VacanciesController < ApplicationController
before_action :require_login, except: [:index, :show]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use %i or %I for an array of symbols.

@duduribeiro duduribeiro temporarily deployed to openjobs-staging-pr-63 February 21, 2018 12:52 Inactive
@@ -215,3 +218,9 @@ body {
margin-top: 0;
}
}

.error-list {
border: 1px solid $error-color;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered background-color, border, color

Read more about it here.

@duduribeiro duduribeiro temporarily deployed to openjobs-staging-pr-63 February 21, 2018 12:55 Inactive
@duduribeiro duduribeiro temporarily deployed to openjobs-staging-pr-63 February 21, 2018 12:57 Inactive
@sourcelevel-bot
Copy link

Ebert has finished reviewing this Pull Request and has found:

  • 2 fixed issues! 🎉

You can see more details about this review at https://ebertapp.io/github/opensanca/opensanca_jobs/pulls/63.

@@ -1,6 +1,8 @@
# frozen_string_literal: true

class VacanciesController < ApplicationController
before_action :require_login, except: %i[index show]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its funny how i like the old way more, like: except: [:index, :show]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer using %i. I can omit the :. And this is the styleguide

@@ -0,0 +1,11 @@
# frozen_string_literal: true

class SetupUserWorker
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not WelcomeUserWorker ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@duduribeiro duduribeiro temporarily deployed to openjobs-staging-pr-63 February 21, 2018 15:16 Inactive
@duduribeiro duduribeiro temporarily deployed to openjobs-staging-pr-63 February 21, 2018 15:27 Inactive
@duduribeiro duduribeiro removed the WIP label Feb 21, 2018
@duduribeiro duduribeiro changed the title [WIP] Company registration and login Company registration and login Feb 21, 2018
@duduribeiro duduribeiro temporarily deployed to openjobs-staging-pr-63 February 21, 2018 17:48 Inactive
@duduribeiro duduribeiro temporarily deployed to openjobs-staging-pr-63 February 21, 2018 18:14 Inactive
@duduribeiro duduribeiro temporarily deployed to openjobs-staging-pr-63 February 21, 2018 18:28 Inactive
@duduribeiro duduribeiro force-pushed the company-login branch 2 times, most recently from 75a4a6e to f696052 Compare February 21, 2018 19:26
@duduribeiro duduribeiro temporarily deployed to openjobs-staging-pr-63 February 21, 2018 19:26 Inactive
@duduribeiro duduribeiro temporarily deployed to openjobs-staging February 21, 2018 19:35 Inactive
@duduribeiro duduribeiro temporarily deployed to openjobs-staging-pr-63 February 21, 2018 19:36 Inactive
@duduribeiro duduribeiro temporarily deployed to openjobs-staging February 21, 2018 19:38 Inactive
This is the very beginning part of the company dashboard.
This commit adds the company registration and login and requires login to
register a new job.
@duduribeiro duduribeiro merged commit f3921e1 into master Feb 22, 2018
@duduribeiro duduribeiro deleted the company-login branch February 22, 2018 11:44
duduribeiro added a commit that referenced this pull request Mar 5, 2018
After #63, we don't need this fields anymore, since they are saved on
the Company model
duduribeiro added a commit that referenced this pull request Mar 5, 2018
After #63, we don't need this fields anymore, since they are saved on
the Company model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants