jobshop 0.0.131 → 0.0.157
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/Rakefile +16 -9
- data/app/controllers/concerns/jobshop/authentication_handler.rb +15 -0
- data/app/controllers/concerns/jobshop/authorization_handler.rb +29 -0
- data/app/controllers/jobshop/application_controller.rb +5 -32
- data/app/controllers/jobshop/organizations/lookups_controller.rb +18 -0
- data/app/controllers/jobshop/places_controller.rb +1 -1
- data/app/controllers/jobshop/{welcome/registrations_controller.rb → registrations_controller.rb} +2 -7
- data/app/controllers/jobshop/session_activations_controller.rb +1 -1
- data/app/controllers/jobshop/sessions_controller.rb +15 -1
- data/app/controllers/jobshop/users_controller.rb +9 -0
- data/app/mailers/jobshop/application_mailer.rb +2 -2
- data/app/models/jobshop/ability.rb +7 -0
- data/app/models/jobshop/collection.rb +22 -0
- data/app/models/jobshop/company.rb +22 -0
- data/app/models/jobshop/dashboard.rb +1 -1
- data/app/models/jobshop/inspection/boolean_criterion.rb +44 -0
- data/app/models/jobshop/inspection/criterion.rb +22 -0
- data/app/models/jobshop/inspection/deviation_criterion.rb +112 -0
- data/app/models/jobshop/inspection/limit_criterion.rb +114 -0
- data/app/models/jobshop/inspection/report.rb +41 -0
- data/app/models/jobshop/inspection/result.rb +42 -0
- data/app/models/jobshop/inspection/tuple.rb +13 -0
- data/app/models/jobshop/inspection.rb +13 -0
- data/app/models/jobshop/order.rb +41 -0
- data/app/models/jobshop/order_line.rb +13 -0
- data/app/models/jobshop/organization.rb +34 -0
- data/app/models/jobshop/place.rb +6 -4
- data/app/models/jobshop/product.rb +23 -0
- data/app/models/jobshop/registration.rb +14 -10
- data/app/models/jobshop/role.rb +24 -0
- data/app/models/jobshop/role_ability.rb +7 -0
- data/app/models/jobshop/role_assignment.rb +7 -0
- data/app/models/jobshop/routing_process.rb +20 -0
- data/app/models/jobshop/routing_step.rb +11 -0
- data/app/models/jobshop/thing.rb +30 -4
- data/app/models/jobshop/user.rb +23 -25
- data/app/serializers/jobshop/test_user_serializer.rb +10 -0
- data/app/services/jobshop/authentication_service.rb +20 -0
- data/app/services/jobshop/authorization_service.rb +30 -0
- data/app/services/jobshop/jwt_service.rb +17 -0
- data/config/routes.rb +2 -43
- data/db/migrate/20170311194758_initialize_jobshop.rb +1 -106
- data/db/migrate/20171216021339_create_organizations.rb +20 -0
- data/db/migrate/20171216021717_create_users.rb +30 -0
- data/db/migrate/20171216021853_create_companies.rb +25 -0
- data/db/migrate/20171216022020_create_places.rb +22 -0
- data/db/migrate/20171216022135_create_products.rb +27 -0
- data/db/migrate/20171216022605_create_orders.rb +53 -0
- data/db/migrate/20171216023018_create_roles.rb +52 -0
- data/db/migrate/20171216023022_create_sessions.rb +21 -0
- data/db/migrate/20171216035357_create_things.rb +44 -0
- data/db/migrate/20171219022118_create_routing_processes.rb +57 -0
- data/db/migrate/20180107203241_create_inspection.rb +159 -0
- data/{app/assets/stylesheets/jobshop/welcome.scss → db/seeds.rb} +0 -0
- data/lib/generators/jobshop/app/app_generator.rb +36 -3
- data/lib/generators/jobshop/app/templates/config/database.yml.tt +19 -0
- data/lib/generators/jobshop/config/templates/config/initializers/jobshop.rb.tt +0 -2
- data/lib/generators/jobshop/dummy/dummy_generator.rb +3 -14
- data/lib/jobshop/cli/spinner.rb +21 -0
- data/lib/jobshop/cli.rb +44 -24
- data/lib/jobshop/configuration.rb +24 -0
- data/lib/jobshop/dummy_app.rb +155 -0
- data/lib/jobshop/engine.rb +30 -31
- data/lib/jobshop/helpers/migration.rb +55 -0
- data/lib/jobshop/version.rb +2 -2
- data/lib/jobshop.rb +7 -21
- data/lib/tasks/jobshop_tasks.rake +7 -24
- metadata +113 -150
- data/app/assets/config/jobshop_manifest.js +0 -2
- data/app/assets/images/jobshop/logo.svg +0 -50
- data/app/assets/javascripts/jobshop/application.js +0 -34
- data/app/assets/stylesheets/jobshop/application.scss +0 -57
- data/app/assets/stylesheets/jobshop/breakpoints.scss +0 -47
- data/app/assets/stylesheets/jobshop/dialog.scss +0 -43
- data/app/controllers/concerns/registration_token_validation.rb +0 -41
- data/app/controllers/jobshop/teams/lookups_controller.rb +0 -20
- data/app/controllers/jobshop/teams_controller.rb +0 -6
- data/app/controllers/jobshop/welcome/places_controller.rb +0 -42
- data/app/controllers/jobshop/welcome/things_controller.rb +0 -42
- data/app/controllers/jobshop/welcome_controller.rb +0 -11
- data/app/helpers/jobshop/application_helper.rb +0 -14
- data/app/mailers/jobshop/teams_mailer.rb +0 -10
- data/app/models/jobshop/team.rb +0 -36
- data/app/policies/jobshop/application_policy.rb +0 -55
- data/app/views/devise/confirmations/new.html.haml +0 -10
- data/app/views/devise/mailer/confirmation_instructions.html.haml +0 -4
- data/app/views/devise/mailer/password_change.html.haml +0 -3
- data/app/views/devise/mailer/reset_password_instructions.html.haml +0 -6
- data/app/views/devise/mailer/unlock_instructions.html.haml +0 -5
- data/app/views/devise/passwords/edit.html.haml +0 -19
- data/app/views/devise/passwords/new.html.haml +0 -10
- data/app/views/devise/registrations/edit.html.haml +0 -31
- data/app/views/devise/registrations/new.html.haml +0 -21
- data/app/views/devise/sessions/new.html.haml +0 -15
- data/app/views/devise/shared/_links.html.haml +0 -19
- data/app/views/devise/unlocks/new.html.haml +0 -10
- data/app/views/jobshop/dashboards/show.html.haml +0 -140
- data/app/views/jobshop/places/show.html.haml +0 -12
- data/app/views/jobshop/session_activations/destroy.js.erb +0 -1
- data/app/views/jobshop/shared/_authenticated_header.html.haml +0 -8
- data/app/views/jobshop/shared/_unauthenticated_header.html.haml +0 -10
- data/app/views/jobshop/teams/lookups/show.html.haml +0 -14
- data/app/views/jobshop/teams_mailer/found_teams.html.haml +0 -11
- data/app/views/jobshop/teams_mailer/found_teams.text.erb +0 -8
- data/app/views/jobshop/welcome/index.html.haml +0 -21
- data/app/views/jobshop/welcome/places/new.html.haml +0 -22
- data/app/views/jobshop/welcome/registrations/new.html.haml +0 -32
- data/app/views/jobshop/welcome/things/new.html.haml +0 -24
- data/app/views/layouts/jobshop/application.html.haml +0 -15
- data/app/views/layouts/jobshop/unauthenticated.html.haml +0 -6
- data/config/initializers/assets.rb +0 -11
- data/config/initializers/devise.rb +0 -282
- data/config/initializers/field_with_errors.rb +0 -3
- data/config/initializers/simple_form.rb +0 -157
- data/config/locales/devise.en.yml +0 -62
- data/config/locales/simple_form.en.yml +0 -31
- data/db/migrate/keep +0 -0
- data/lib/generators/jobshop/team/USAGE +0 -7
- data/lib/generators/jobshop/team/team_generator.rb +0 -60
- data/lib/jobshop/failure_app.rb +0 -11
@@ -1,140 +0,0 @@
|
|
1
|
-
%div(class="demo-layout mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header")
|
2
|
-
%header(class="demo-header mdl-layout__header mdl-color--grey-100 mdl-color-text--grey-600")
|
3
|
-
%div(class="mdl-layout__header-row")
|
4
|
-
%span(class="mdl-layout-title") Home
|
5
|
-
%div(class="mdl-layout-spacer")
|
6
|
-
%div(class="mdl-textfield mdl-js-textfield mdl-textfield--expandable")
|
7
|
-
%label(class="mdl-button mdl-js-button mdl-button--icon" for="search")
|
8
|
-
%i(class="material-icons") search
|
9
|
-
%div(class="mdl-textfield__expandable-holder")
|
10
|
-
%input(class="mdl-textfield__input" type="text" id="search")
|
11
|
-
%label(class="mdl-textfield__label" for="search") Enter your query...
|
12
|
-
%button(class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon" id="hdrbtn")
|
13
|
-
%i(class="material-icons") more_vert
|
14
|
-
%ul(class="mdl-menu mdl-js-menu mdl-js-ripple-effect mdl-menu--bottom-right" for="hdrbtn")
|
15
|
-
%li(class="mdl-menu__item")= link_to("About", about_path)
|
16
|
-
%li(class="mdl-menu__item") Contact
|
17
|
-
%li(class="mdl-menu__item") Legal information
|
18
|
-
%div(class="demo-drawer mdl-layout__drawer mdl-color--blue-grey-900 mdl-color-text--indigo-50")
|
19
|
-
%header(class="demo-drawer-header")
|
20
|
-
%i(class="material-icons" style="font-size: 48px;") person
|
21
|
-
//%img(class="demo-avatar" src="images/user.jpg")
|
22
|
-
%div(class="demo-avatar-dropdown")
|
23
|
-
%span= current_user.email
|
24
|
-
%div(class="mdl-layout-spacer")
|
25
|
-
%button(id="accbtn" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--icon")
|
26
|
-
%i(class="material-icons" role="presentation") arrow_drop_down
|
27
|
-
%span(class="visuallyhidden") User Actions
|
28
|
-
%ul(class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect" for="accbtn")
|
29
|
-
%li(class="mdl-menu__item")
|
30
|
-
%a(href="#{destroy_user_session_path}" data-method="delete") Sign out
|
31
|
-
%nav(class="demo-navigation mdl-navigation mdl-color--blue-grey-800")
|
32
|
-
%a(class="mdl-navigation__link" href="")
|
33
|
-
%i(class="mdl-color-text--blue-grey-400 material-icons" role="presentation") home
|
34
|
-
Home
|
35
|
-
%a(class="mdl-navigation__link" href="")
|
36
|
-
%i(class="mdl-color-text--blue-grey-400 material-icons" role="presentation") flag
|
37
|
-
Updates
|
38
|
-
%div(class="mdl-layout-spacer")
|
39
|
-
%a(class="mdl-navigation__link" href="")
|
40
|
-
%i(class="mdl-color-text--blue-grey-400 material-icons" role="presentation") help_outline
|
41
|
-
Help
|
42
|
-
|
43
|
-
%main(class="mdl-layout__content mdl-color--grey-100")
|
44
|
-
%div(class="mdl-grid demo-content")
|
45
|
-
%div(class="demo-charts mdl-color--white mdl-shadow--2dp mdl-cell mdl-cell--12-col mdl-grid")
|
46
|
-
%svg(fill="currentColor" width="200px" height="200px" viewBox="0 0 1 1" class="demo-chart mdl-cell mdl-cell--4-col mdl-cell--3-col-desktop")
|
47
|
-
%use(xlink:href="#piechart" mask="url(#piemask)")
|
48
|
-
%text(x="0.5" y="0.5" font-family="Roboto" font-size="0.3" fill="#888" text-anchor="middle" dy="0.1")
|
49
|
-
82
|
50
|
-
%tspan(font-size="0.2" dy="-0.07") %
|
51
|
-
%svg(fill="currentColor" width="200px" height="200px" viewBox="0 0 1 1" class="demo-chart mdl-cell mdl-cell--4-col mdl-cell--3-col-desktop")
|
52
|
-
%use(xlink:href="#piechart" mask="url(#piemask)")
|
53
|
-
%text(x="0.5" y="0.5" font-family="Roboto" font-size="0.3" fill="#888" text-anchor="middle" dy="0.1")
|
54
|
-
82
|
55
|
-
%tspan(dy="-0.07" font-size="0.2") %
|
56
|
-
%svg(fill="currentColor" width="200px" height="200px" viewBox="0 0 1 1" class="demo-chart mdl-cell mdl-cell--4-col mdl-cell--3-col-desktop")
|
57
|
-
%use(xlink:href="#piechart" mask="url(#piemask)")
|
58
|
-
%text(x="0.5" y="0.5" font-family="Roboto" font-size="0.3" fill="#888" text-anchor="middle" dy="0.1")
|
59
|
-
82
|
60
|
-
%tspan(dy="-0.07" font-size="0.2") %
|
61
|
-
%svg(fill="currentColor" width="200px" height="200px" viewBox="0 0 1 1" class="demo-chart mdl-cell mdl-cell--4-col mdl-cell--3-col-desktop")
|
62
|
-
%use(xlink:href="#piechart" mask="url(#piemask)")
|
63
|
-
%text(x="0.5" y="0.5" font-family="Roboto" font-size="0.3" fill="#888" text-anchor="middle" dy="0.1")
|
64
|
-
82
|
65
|
-
%tspan(dy="-0.07" font-size="0.2") %
|
66
|
-
%div(class="mdl-shadow--2dp mdl-color--white mdl-cell mdl-cell--8-col")
|
67
|
-
%h2 Welcome aboard.
|
68
|
-
%div(class="demo-graphs mdl-shadow--2dp mdl-color--white mdl-cell mdl-cell--8-col")
|
69
|
-
%svg(fill="currentColor" viewBox="0 0 500 250" class="demo-graph")
|
70
|
-
%use(xlink:href="#chart")
|
71
|
-
%svg(fill="currentColor" viewBox="0 0 500 250" class="demo-graph")
|
72
|
-
%use(xlink:href="#chart")
|
73
|
-
%div(class="demo-cards mdl-cell mdl-cell--4-col mdl-cell--8-col-tablet mdl-grid mdl-grid--no-spacing")
|
74
|
-
%div(class="demo-options mdl-card mdl-color--orange-500 mdl-shadow--2dp mdl-cell mdl-cell--4-col mdl-cell--3-col-tablet mdl-cell--12-col-desktop")
|
75
|
-
%div(class="mdl-card__supporting-text mdl-color-text--blue-grey-50")
|
76
|
-
%h3 View options
|
77
|
-
%ul
|
78
|
-
%li
|
79
|
-
%label(for="chkbox1" class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect")
|
80
|
-
%input(type="checkbox" id="chkbox1" class="mdl-checkbox__input")
|
81
|
-
%span(class="mdl-checkbox__label") Identify key people
|
82
|
-
%li
|
83
|
-
%label(for="chkbox2" class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect")
|
84
|
-
%input(type="checkbox" id="chkbox2" class="mdl-checkbox__input")
|
85
|
-
%span(class="mdl-checkbox__label") Identify key places
|
86
|
-
%li
|
87
|
-
%label(for="chkbox3" class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect")
|
88
|
-
%input(type="checkbox" id="chkbox3" class="mdl-checkbox__input")
|
89
|
-
%span(class="mdl-checkbox__label") Identify key things
|
90
|
-
%li
|
91
|
-
%label(for="chkbox4" class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect")
|
92
|
-
%input(type="checkbox" id="chkbox4" class="mdl-checkbox__input")
|
93
|
-
%span(class="mdl-checkbox__label") Make something!
|
94
|
-
%div(class="mdl-card__actions mdl-card--border")
|
95
|
-
%a(href="#" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-color-text--blue-grey-50") Lets get started!
|
96
|
-
%div(class="mdl-layout-spacer")
|
97
|
-
%i(class="material-icons") location_on
|
98
|
-
%div(class="demo-separator mdl-cell--1-col")
|
99
|
-
%div(class="demo-updates mdl-card mdl-shadow--2dp mdl-cell mdl-cell--4-col mdl-cell--4-col-tablet mdl-cell--12-col-desktop")
|
100
|
-
%div(class="mdl-card__title mdl-card--expand mdl-color--teal-300")
|
101
|
-
%h2(class="mdl-card__title-text") Updates
|
102
|
-
%div(class="mdl-card__supporting-text mdl-color-text--grey-600")
|
103
|
-
Non dolore elit adipisicing ea reprehenderit consectetur culpa.
|
104
|
-
%div(class="mdl-card__actions mdl-card--border")
|
105
|
-
%a(href="#" class="mdl-button mdl-js-button mdl-js-ripple-effect") Read More
|
106
|
-
|
107
|
-
%svg(style="position: fixed; left: -1000px; height: -1000px;" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink")
|
108
|
-
%defs
|
109
|
-
%mask(id="piemask" maskContentUnits="objectBoundingBox")
|
110
|
-
%circle(cx="0.5" cy="0.5" fill="white" r="0.49")
|
111
|
-
%circle(cx="0.5" cy="0.5" fill="black" r="0.40")
|
112
|
-
%g(id="piechart")
|
113
|
-
%circle(cx="0.5" cy="0.5" r="0.5")
|
114
|
-
%path(d="M 0.5 0.5 0.5 0 A 0.5 0.5 0 0 1 0.95 0.28 z" fill="rgba(255, 255, 255, 0.75)" stroke="none")
|
115
|
-
%svg(version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 500 250" style="position: fixed; left: -1000px; height: -1000px;")
|
116
|
-
%defs
|
117
|
-
%g(id="chart")
|
118
|
-
%g(id="Gridlines")
|
119
|
-
%line(fill="#888888" stroke="#888888" stroke-miterlimit="10" x1="0" y1="27.3" x2="468.3" y2="27.3")
|
120
|
-
%line(fill="#888888" stroke="#888888" stroke-miterlimit="10" x1="0" y1="66.7" x2="468.3" y2="66.7")
|
121
|
-
%line(fill="#888888" stroke="#888888" stroke-miterlimit="10" x1="0" y1="105.3" x2="468.3" y2="105.3")
|
122
|
-
%line(fill="#888888" stroke="#888888" stroke-miterlimit="10" x1="0" y1="144.7" x2="468.3" y2="144.7")
|
123
|
-
%line(fill="#888888" stroke="#888888" stroke-miterlimit="10" x1="0" y1="184.3" x2="468.3" y2="184.3")
|
124
|
-
%g(id="Numbers")
|
125
|
-
%text(transform="matrix(1 0 0 1 485 29.3333)" fill="#888888" font-family="'Roboto'" font-size="9") 500
|
126
|
-
%text(transform="matrix(1 0 0 1 485 69)" fill="#888888" font-family="'Roboto'" font-size="9") 400
|
127
|
-
%text(transform="matrix(1 0 0 1 485 109.3333)" fill="#888888" font-family="'Roboto'" font-size="9") 300
|
128
|
-
%text(transform="matrix(1 0 0 1 485 149)" fill="#888888" font-family="'Roboto'" font-size="9") 200
|
129
|
-
%text(transform="matrix(1 0 0 1 485 188.3333)" fill="#888888" font-family="'Roboto'" font-size="9") 100
|
130
|
-
%text(transform="matrix(1 0 0 1 0 249.0003)" fill="#888888" font-family="'Roboto'" font-size="9") 1
|
131
|
-
%text(transform="matrix(1 0 0 1 78 249.0003)" fill="#888888" font-family="'Roboto'" font-size="9") 2
|
132
|
-
%text(transform="matrix(1 0 0 1 154.6667 249.0003)" fill="#888888" font-family="'Roboto'" font-size="9") 3
|
133
|
-
%text(transform="matrix(1 0 0 1 232.1667 249.0003)" fill="#888888" font-family="'Roboto'" font-size="9") 4
|
134
|
-
%text(transform="matrix(1 0 0 1 309 249.0003)" fill="#888888" font-family="'Roboto'" font-size="9") 5
|
135
|
-
%text(transform="matrix(1 0 0 1 386.6667 249.0003)" fill="#888888" font-family="'Roboto'" font-size="9") 6
|
136
|
-
%text(transform="matrix(1 0 0 1 464.3333 249.0003)" fill="#888888" font-family="'Roboto'" font-size="9") 7
|
137
|
-
%g(id="Layer_5")
|
138
|
-
%polygon(opacity="0.36" stroke-miterlimit="10" points="0,223.3 48,138.5 154.7,169 211,88.5 294.5,80.5 380,165.2 437,75.5 469.5,223.3")
|
139
|
-
%g(id="Layer_4")
|
140
|
-
%polygon(stroke-miterlimit="10" points="469.3,222.7 1,222.7 48.7,166.7 155.7,188.3 212,132.7 296.7,128 380.7,184.3 436.7,125")
|
@@ -1,12 +0,0 @@
|
|
1
|
-
%div.mdl-layout.mdl-js-layout
|
2
|
-
= render partial: "jobshop/shared/authenticated_header"
|
3
|
-
%main.mdl-layout__content
|
4
|
-
.mdl-cell.mdl-cell--12-col
|
5
|
-
%p You are currently logged in at these stations:
|
6
|
-
%table.mdl-data-table.mdl-js-data-table.mdl-data-table--selectable.mdl-shadow--2dp
|
7
|
-
- session_activations.each do |s|
|
8
|
-
%tbody
|
9
|
-
%tr
|
10
|
-
%td= s.id
|
11
|
-
%td= "(current)" if s.activation_token == session[:activation_token]
|
12
|
-
%td= link_to "log this out", revoke_session_path(s), remote: true, method: :delete, data: { confirm: "Are you sure you want to log out of the selected session?" }
|
@@ -1 +0,0 @@
|
|
1
|
-
$("li#<%= revoked_session.id %>").remove();
|
@@ -1,8 +0,0 @@
|
|
1
|
-
%header.static-header.mdl-layout__header.mdl-layout__header--waterfall
|
2
|
-
%div.mdl-layout__header-row
|
3
|
-
%a.mdl-layout-title(href="#{jobshop.root_path}") Jobshop
|
4
|
-
%div.mdl-layout-spacer
|
5
|
-
%div.static-navigation-container
|
6
|
-
%nav.mdl-navigation
|
7
|
-
= link_to destroy_user_session_path, method: :delete, class: %w(mdl-navigation__link mdl-color-text--pink) do
|
8
|
-
Sign out
|
@@ -1,10 +0,0 @@
|
|
1
|
-
%header.static-header.mdl-layout__header.mdl-layout__header--waterfall
|
2
|
-
%div.mdl-layout__header-row
|
3
|
-
%a.mdl-layout-title(href="#{jobshop.root_path}") Jobshop
|
4
|
-
%div.mdl-layout-spacer
|
5
|
-
%div.static-navigation-container
|
6
|
-
%nav.mdl-navigation
|
7
|
-
%a.mdl-navigation__link{ href: jobshop.about_path }
|
8
|
-
About
|
9
|
-
%a.mdl-navigation__link.mdl-color-text--pink{ href: jobshop.teams_lookup_path }
|
10
|
-
Sign In
|
@@ -1,14 +0,0 @@
|
|
1
|
-
%main.mdl-layout__content
|
2
|
-
.dialog-box
|
3
|
-
.dialog-box__content
|
4
|
-
= simple_form_for @lookup, url: teams_lookup_path do |f|
|
5
|
-
.mdl-card__title
|
6
|
-
%h4 Can't find your team?
|
7
|
-
|
8
|
-
.mdl-card__supporting-text
|
9
|
-
%p Enter your email address and we'll send you the link.
|
10
|
-
= f.input :email
|
11
|
-
|
12
|
-
.mdl-card__actions
|
13
|
-
.expand
|
14
|
-
= f.button :submit, "Send the link to my email!"
|
@@ -1,21 +0,0 @@
|
|
1
|
-
.mdl-layout.mdl-js-layout.mdl-layout--fixed-header
|
2
|
-
= render partial: "jobshop/shared/authenticated_header"
|
3
|
-
%main.mdl-layout__content
|
4
|
-
.dialog-box
|
5
|
-
.dialog-box__header
|
6
|
-
%i.material-icons location_city
|
7
|
-
.dialog-box__content
|
8
|
-
.mdl-card__title
|
9
|
-
%h4 Welcome Aboard
|
10
|
-
|
11
|
-
.mdl-card__supporting-text
|
12
|
-
%p
|
13
|
-
To get you up and running quickly, let's walk through making
|
14
|
-
your first product together. We'll track this order as it
|
15
|
-
moves around the shop to discover exactly where time is being
|
16
|
-
spent.
|
17
|
-
|
18
|
-
.mdl-card__actions
|
19
|
-
.expand
|
20
|
-
%a.mdl-button.mdl-button--primary.mdl-button--raised{ href: new_welcome_things_path }
|
21
|
-
Get started »
|
@@ -1,22 +0,0 @@
|
|
1
|
-
.mdl-layout.mdl-js-layout.mdl-layout--fixed-header
|
2
|
-
= render partial: "jobshop/shared/authenticated_header"
|
3
|
-
%main.mdl-layout__content
|
4
|
-
.dialog-box
|
5
|
-
.dialog-box__header
|
6
|
-
%i.material-icons location_city
|
7
|
-
.dialog-box__content
|
8
|
-
= simple_form_for @place, url: welcome_places_path do |f|
|
9
|
-
.mdl-card__title
|
10
|
-
%h4 First Place
|
11
|
-
|
12
|
-
.mdl-card__supporting-text
|
13
|
-
%p
|
14
|
-
Places are how Jobshop manages all the different locations in your
|
15
|
-
shop that a product may visit during its lifetime.
|
16
|
-
|
17
|
-
= hidden_field_tag(:id, @place.id, id: nil) if @place.persisted?
|
18
|
-
= f.input :name, label: "Where are you?", as: :string
|
19
|
-
|
20
|
-
.mdl-card__actions
|
21
|
-
%a.mdl-button.mdl-button--raised.mdl-button--secondary{ href: new_welcome_things_path } « Back
|
22
|
-
= f.button :submit, raw("Next »")
|
@@ -1,32 +0,0 @@
|
|
1
|
-
%main.mdl-layout__content
|
2
|
-
.dialog-box
|
3
|
-
.dialog-box__header
|
4
|
-
%i.material-icons location_city
|
5
|
-
.dialog-box__content
|
6
|
-
= simple_form_for @registration, url: welcome_registration_path do |f|
|
7
|
-
.mdl-card__title
|
8
|
-
%h4.mdl-card__title-text
|
9
|
-
Registration
|
10
|
-
.mdl-card__supporting-text
|
11
|
-
= hidden_field_tag(:team_id, params[:team_id])
|
12
|
-
= hidden_field_tag(:registration_token, params[:registration_token])
|
13
|
-
= f.fields_for(f.object.user) do |uf|
|
14
|
-
= uf.input :forename, label: "First Name"
|
15
|
-
= uf.input :surname, label: "Last Name"
|
16
|
-
= uf.input :email
|
17
|
-
|
18
|
-
= f.fields_for(f.object.team) do |tf|
|
19
|
-
%p
|
20
|
-
Choose a name for your team.
|
21
|
-
= tf.input :name, label: "Team Name"
|
22
|
-
|
23
|
-
= f.fields_for(f.object.user) do |uf|
|
24
|
-
%p
|
25
|
-
Pick a strong password. Ideally it will be longer than eight
|
26
|
-
characters, have mixed upper/lower case, and include numbers
|
27
|
-
and symbols.
|
28
|
-
= uf.input :password
|
29
|
-
= uf.input :password_confirmation
|
30
|
-
.mdl-card__actions
|
31
|
-
.expand
|
32
|
-
= f.button :submit, "Next »".html_safe
|
@@ -1,24 +0,0 @@
|
|
1
|
-
.mdl-layout.mdl-js-layout.mdl-layout--fixed-header
|
2
|
-
= render partial: "jobshop/shared/authenticated_header"
|
3
|
-
%main.mdl-layout__content
|
4
|
-
.dialog-box
|
5
|
-
.dialog-box__header
|
6
|
-
%i.material-icons location_city
|
7
|
-
.dialog-box__content
|
8
|
-
= simple_form_for @thing, url: welcome_things_path do |f|
|
9
|
-
.mdl-card__supporting-text
|
10
|
-
%h4 First Product
|
11
|
-
|
12
|
-
%p
|
13
|
-
How do you identify this particular product? You can enter an
|
14
|
-
<strong>SKU</strong>, a <strong>Part Number</strong> or any other
|
15
|
-
unique identifier your team may be using. We'll use this to look
|
16
|
-
up the product again in the future.
|
17
|
-
|
18
|
-
= hidden_field_tag(:id, @thing.id, id: nil) if @thing.persisted?
|
19
|
-
= f.input :identifier, label: "Product Identifier", as: :string
|
20
|
-
|
21
|
-
.mdl-card__actions
|
22
|
-
.expand
|
23
|
-
= f.button :submit, raw("Next »")
|
24
|
-
|
@@ -1,15 +0,0 @@
|
|
1
|
-
!!!
|
2
|
-
%html{ lang: "en" }
|
3
|
-
%head
|
4
|
-
%meta(charset="UTF-8")
|
5
|
-
%meta(http-equiv="X-UA-Compatible" content="IE=edge")
|
6
|
-
%meta(name="viewport" content="width=device-width, initial-scale=1.0")
|
7
|
-
|
8
|
-
%title Jobshop
|
9
|
-
|
10
|
-
= stylesheet_link_tag "jobshop/application", media: "all", "data-turbolinks-track": "reload"
|
11
|
-
= javascript_include_tag "jobshop/application", "data-turbolinks-track": "reload"
|
12
|
-
= csrf_meta_tags
|
13
|
-
|
14
|
-
%body{ class: body_class }
|
15
|
-
= content_for?(:body) ? yield(:body) : yield
|
@@ -1,11 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Version of your assets, change this if you want to expire all your assets.
|
4
|
-
Rails.application.config.assets.version = "4"
|
5
|
-
|
6
|
-
# Add additional assets to the asset load path
|
7
|
-
# Rails.application.config.assets.paths << Emoji.images_path
|
8
|
-
|
9
|
-
# Precompile additional assets.
|
10
|
-
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
11
|
-
Rails.application.config.assets.precompile += %w( jobshop/logo.svg )
|
@@ -1,282 +0,0 @@
|
|
1
|
-
require "jobshop/failure_app"
|
2
|
-
# Use this hook to configure devise mailer, warden hooks and so forth.
|
3
|
-
# Many of these configuration options can be set straight in your model.
|
4
|
-
Devise.setup do |config|
|
5
|
-
# The secret key used by Devise. Devise uses this key to generate
|
6
|
-
# random tokens. Changing this key will render invalid all existing
|
7
|
-
# confirmation, reset password and unlock tokens in the database.
|
8
|
-
# Devise will use the `secret_key_base` as its `secret_key`
|
9
|
-
# by default. You can change it below and use your own secret key.
|
10
|
-
# config.secret_key = ENV.fetch("DEVISE_SECRET_KEY")
|
11
|
-
|
12
|
-
# ==> Mailer Configuration
|
13
|
-
# Configure the e-mail address which will be shown in Devise::Mailer,
|
14
|
-
# note that it will be overwritten if you use your own mailer class
|
15
|
-
# with default "from" parameter.
|
16
|
-
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
|
17
|
-
|
18
|
-
# Configure the class responsible to send e-mails.
|
19
|
-
# config.mailer = 'Devise::Mailer'
|
20
|
-
|
21
|
-
# Configure the parent class responsible to send e-mails.
|
22
|
-
# config.parent_mailer = 'ActionMailer::Base'
|
23
|
-
|
24
|
-
# ==> ORM configuration
|
25
|
-
# Load and configure the ORM. Supports :active_record (default) and
|
26
|
-
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
27
|
-
# available as additional gems.
|
28
|
-
require 'devise/orm/active_record'
|
29
|
-
|
30
|
-
# ==> Configuration for any authentication mechanism
|
31
|
-
# Configure which keys are used when authenticating a user. The default is
|
32
|
-
# just :email. You can configure it to use [:username, :subdomain], so for
|
33
|
-
# authenticating a user, both parameters are required. Remember that those
|
34
|
-
# parameters are used only when authenticating and not when retrieving from
|
35
|
-
# session. If you need permissions, you should implement that in a before
|
36
|
-
# filter. You can also supply a hash where the value is a boolean determining
|
37
|
-
# whether or not authentication should be aborted when the value is not
|
38
|
-
# present.
|
39
|
-
config.authentication_keys = [ :email, :team_id ]
|
40
|
-
|
41
|
-
# Configure parameters from the request object used for authentication. Each
|
42
|
-
# entry given should be a request method and it will automatically be passed
|
43
|
-
# to the find_for_authentication method and considered in your model lookup.
|
44
|
-
# For instance, if you set :request_keys to [:subdomain], :subdomain will be
|
45
|
-
# used on authentication. The same considerations mentioned for
|
46
|
-
# authentication_keys also apply to request_keys.
|
47
|
-
# config.request_keys = []
|
48
|
-
|
49
|
-
# Configure which authentication keys should be case-insensitive.
|
50
|
-
# These keys will be downcased upon creating or modifying a user and when used
|
51
|
-
# to authenticate or find a user. Default is :email.
|
52
|
-
config.case_insensitive_keys = [:email]
|
53
|
-
|
54
|
-
# Configure which authentication keys should have whitespace stripped. These
|
55
|
-
# keys will have whitespace before and after removed upon creating or
|
56
|
-
# modifying a user and when used to authenticate or find a user.
|
57
|
-
# Default is :email.
|
58
|
-
config.strip_whitespace_keys = [:email]
|
59
|
-
|
60
|
-
# Tell if authentication through request.params is enabled. True by default.
|
61
|
-
# It can be set to an array that will enable params authentication only for
|
62
|
-
# the given strategies, for example,
|
63
|
-
# `config.params_authenticatable = [:database]` will enable it only for
|
64
|
-
# database (email + password) authentication.
|
65
|
-
# config.params_authenticatable = true
|
66
|
-
|
67
|
-
# Tell if authentication through HTTP Auth is enabled. False by default.
|
68
|
-
# It can be set to an array that will enable http authentication only for the
|
69
|
-
# given strategies, for example, `config.http_authenticatable = [:database]` will
|
70
|
-
# enable it only for database authentication. The supported strategies are:
|
71
|
-
# :database = Support basic authentication with authentication key + password
|
72
|
-
# config.http_authenticatable = false
|
73
|
-
|
74
|
-
# If 401 status code should be returned for AJAX requests. True by default.
|
75
|
-
# config.http_authenticatable_on_xhr = true
|
76
|
-
|
77
|
-
# The realm used in Http Basic Authentication. 'Application' by default.
|
78
|
-
# config.http_authentication_realm = 'Application'
|
79
|
-
|
80
|
-
# It will change confirmation, password recovery and other workflows
|
81
|
-
# to behave the same regardless if the e-mail provided was right or wrong.
|
82
|
-
# Does not affect registerable.
|
83
|
-
config.paranoid = true
|
84
|
-
|
85
|
-
# By default Devise will store the user in session. You can skip storage for
|
86
|
-
# particular strategies by setting this option.
|
87
|
-
# Notice that if you are skipping storage for all authentication paths, you
|
88
|
-
# may want to disable generating routes to Devise's sessions controller by
|
89
|
-
# passing skip: :sessions to `devise_for` in your config/routes.rb
|
90
|
-
config.skip_session_storage = [:http_auth]
|
91
|
-
|
92
|
-
# By default, Devise cleans up the CSRF token on authentication to
|
93
|
-
# avoid CSRF token fixation attacks. This means that, when using AJAX
|
94
|
-
# requests for sign in and sign up, you need to get a new CSRF token
|
95
|
-
# from the server. You can disable this option at your own risk.
|
96
|
-
# config.clean_up_csrf_token_on_authentication = true
|
97
|
-
|
98
|
-
# ==> Configuration for :database_authenticatable
|
99
|
-
# For bcrypt, this is the cost for hashing the password and defaults to 11. If
|
100
|
-
# using other algorithms, it sets how many times you want the password to be
|
101
|
-
# hashed.
|
102
|
-
#
|
103
|
-
# Limiting the stretches to just one in testing will increase the performance
|
104
|
-
# of your test suite dramatically. However, it is STRONGLY RECOMMENDED to not
|
105
|
-
# use a value less than 10 in other environments. Note that, for bcrypt (the
|
106
|
-
# default algorithm), the cost increases exponentially with the number of
|
107
|
-
# stretches (e.g. a value of 20 is already extremely slow: approx. 60 seconds
|
108
|
-
# for 1 calculation).
|
109
|
-
config.stretches = Rails.env.test? ? 1 : 11
|
110
|
-
|
111
|
-
# Set up a pepper to generate the hashed password.
|
112
|
-
# config.pepper = '3220c00bce8dc5e166199dabfddef4790570ffdcd79bb3d9f51df02743cd00ae5a19463105d4d764ec03b14140a75777c0ae161a6108f2770c7fa1af12222384'
|
113
|
-
|
114
|
-
# Send a notification email when the user's password is changed
|
115
|
-
config.send_password_change_notification = false
|
116
|
-
|
117
|
-
# ==> Configuration for :confirmable
|
118
|
-
# A period that the user is allowed to access the website even without
|
119
|
-
# confirming their account. For instance, if set to 2.days, the user will be
|
120
|
-
# able to access the website for two days without confirming their account,
|
121
|
-
# access will be blocked just in the third day. Default is 0.days, meaning
|
122
|
-
# the user cannot access the website without confirming their account.
|
123
|
-
# config.allow_unconfirmed_access_for = 2.days
|
124
|
-
|
125
|
-
# A period that the user is allowed to confirm their account before their
|
126
|
-
# token becomes invalid. For example, if set to 3.days, the user can confirm
|
127
|
-
# their account within 3 days after the mail was sent, but on the fourth day
|
128
|
-
# their account can't be confirmed with the token any more.
|
129
|
-
# Default is nil, meaning there is no restriction on how long a user can take
|
130
|
-
# before confirming their account.
|
131
|
-
# config.confirm_within = 3.days
|
132
|
-
|
133
|
-
# If true, requires any email changes to be confirmed (exactly the same way as
|
134
|
-
# initial account confirmation) to be applied. Requires additional
|
135
|
-
# unconfirmed_email db field (see migrations). Until confirmed, new email is
|
136
|
-
# stored in unconfirmed_email column, and copied to email column on successful
|
137
|
-
# confirmation.
|
138
|
-
config.reconfirmable = true
|
139
|
-
|
140
|
-
# Defines which key will be used when confirming an account
|
141
|
-
# config.confirmation_keys = [:email]
|
142
|
-
|
143
|
-
# ==> Configuration for :rememberable
|
144
|
-
# The time the user will be remembered without asking for credentials again.
|
145
|
-
config.remember_for = 1.day
|
146
|
-
|
147
|
-
# Invalidates all the remember me tokens when the user signs out.
|
148
|
-
config.expire_all_remember_me_on_sign_out = false
|
149
|
-
|
150
|
-
# If true, extends the user's remember period when remembered via cookie.
|
151
|
-
# config.extend_remember_period = false
|
152
|
-
|
153
|
-
# Options to be passed to the created cookie. For instance, you can set
|
154
|
-
# secure: true in order to force SSL only cookies.
|
155
|
-
config.rememberable_options = { secure: true }
|
156
|
-
|
157
|
-
# ==> Configuration for :validatable
|
158
|
-
# Range for password length.
|
159
|
-
config.password_length = 8..72
|
160
|
-
|
161
|
-
# Email regex used to validate email formats. It simply asserts that
|
162
|
-
# one (and only one) @ exists in the given string. This is mainly
|
163
|
-
# to give user feedback and not to assert the e-mail validity.
|
164
|
-
config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
|
165
|
-
|
166
|
-
# ==> Configuration for :timeoutable
|
167
|
-
# The time you want to timeout the user session without activity. After this
|
168
|
-
# time the user will be asked for credentials again. Default is 30 minutes.
|
169
|
-
# config.timeout_in = 30.minutes
|
170
|
-
|
171
|
-
# ==> Configuration for :lockable
|
172
|
-
# Defines which strategy will be used to lock an account.
|
173
|
-
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
174
|
-
# :none = No lock strategy. You should handle locking by yourself.
|
175
|
-
# config.lock_strategy = :failed_attempts
|
176
|
-
|
177
|
-
# Defines which key will be used when locking and unlocking an account
|
178
|
-
# config.unlock_keys = [:email]
|
179
|
-
|
180
|
-
# Defines which strategy will be used to unlock an account.
|
181
|
-
# :email = Sends an unlock link to the user email
|
182
|
-
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
183
|
-
# :both = Enables both strategies
|
184
|
-
# :none = No unlock strategy. You should handle unlocking by yourself.
|
185
|
-
# config.unlock_strategy = :both
|
186
|
-
|
187
|
-
# Number of authentication tries before locking an account if lock_strategy
|
188
|
-
# is failed attempts.
|
189
|
-
# config.maximum_attempts = 20
|
190
|
-
|
191
|
-
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
192
|
-
# config.unlock_in = 1.hour
|
193
|
-
|
194
|
-
# Warn on the last attempt before the account is locked.
|
195
|
-
# config.last_attempt_warning = true
|
196
|
-
|
197
|
-
# ==> Configuration for :recoverable
|
198
|
-
#
|
199
|
-
# Defines which key will be used when recovering the password for an account
|
200
|
-
# config.reset_password_keys = [:email]
|
201
|
-
|
202
|
-
# Time interval you can reset your password with a reset password key.
|
203
|
-
# Don't put a too small interval or your users won't have the time to
|
204
|
-
# change their passwords.
|
205
|
-
config.reset_password_within = 6.hours
|
206
|
-
|
207
|
-
# When set to false, does not sign a user in automatically after their password is
|
208
|
-
# reset. Defaults to true, so a user is signed in automatically after a reset.
|
209
|
-
# config.sign_in_after_reset_password = true
|
210
|
-
|
211
|
-
# ==> Configuration for :encryptable
|
212
|
-
# Allow you to use another hashing or encryption algorithm besides bcrypt (default).
|
213
|
-
# You can use :sha1, :sha512 or algorithms from others authentication tools as
|
214
|
-
# :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
|
215
|
-
# for default behavior) and :restful_authentication_sha1 (then you should set
|
216
|
-
# stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
|
217
|
-
#
|
218
|
-
# Require the `devise-encryptable` gem when using anything other than bcrypt
|
219
|
-
# config.encryptor = :sha512
|
220
|
-
|
221
|
-
# ==> Scopes configuration
|
222
|
-
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
223
|
-
# "users/sessions/new". It's turned off by default because it's slower if you
|
224
|
-
# are using only default views.
|
225
|
-
config.scoped_views = true
|
226
|
-
|
227
|
-
# Configure the default scope given to Warden. By default it's the first
|
228
|
-
# devise role declared in your routes (usually :user).
|
229
|
-
# config.default_scope = :user
|
230
|
-
|
231
|
-
# Set this configuration to false if you want /users/sign_out to sign out
|
232
|
-
# only the current scope. By default, Devise signs out all scopes.
|
233
|
-
# config.sign_out_all_scopes = true
|
234
|
-
|
235
|
-
# ==> Navigation configuration
|
236
|
-
# Lists the formats that should be treated as navigational. Formats like
|
237
|
-
# :html, should redirect to the sign in page when the user does not have
|
238
|
-
# access, but formats like :xml or :json, should return 401.
|
239
|
-
#
|
240
|
-
# If you have any extra navigational formats, like :iphone or :mobile, you
|
241
|
-
# should add them to the navigational formats lists.
|
242
|
-
#
|
243
|
-
# The "*/*" below is required to match Internet Explorer requests.
|
244
|
-
# config.navigational_formats = ['*/*', :html]
|
245
|
-
|
246
|
-
# The default HTTP method used to sign out a resource. Default is :delete.
|
247
|
-
config.sign_out_via = :delete
|
248
|
-
|
249
|
-
# ==> OmniAuth
|
250
|
-
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
251
|
-
# up on your models and hooks.
|
252
|
-
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
|
253
|
-
|
254
|
-
# ==> Warden configuration
|
255
|
-
# If you want to use other strategies, that are not supported by Devise, or
|
256
|
-
# change the failure app, you can configure them inside the config.warden block.
|
257
|
-
#
|
258
|
-
config.warden do |manager|
|
259
|
-
manager.failure_app = Jobshop::FailureApp
|
260
|
-
# manager.intercept_401 = false
|
261
|
-
# manager.default_strategies(scope: :user).unshift :some_external_strategy
|
262
|
-
end
|
263
|
-
|
264
|
-
# ==> Mountable engine configurations
|
265
|
-
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
266
|
-
# is mountable, there are some extra configurations to be taken into account.
|
267
|
-
# The following options are available, assuming the engine is mounted as:
|
268
|
-
#
|
269
|
-
# mount MyEngine, at: '/my_engine'
|
270
|
-
#
|
271
|
-
# The router that invoked `devise_for`, in the example above, would be:
|
272
|
-
config.router_name = :jobshop
|
273
|
-
|
274
|
-
# You probably want Devise's controllers to inherit from your engine's
|
275
|
-
# controller and not the main controller.
|
276
|
-
config.parent_controller = "Jobshop::ApplicationController"
|
277
|
-
|
278
|
-
#
|
279
|
-
# When using OmniAuth, Devise cannot automatically set OmniAuth path,
|
280
|
-
# so you need to do it manually. For the users scope, it would be:
|
281
|
-
# config.omniauth_path_prefix = '/my_engine/users/auth'
|
282
|
-
end
|