next_sgad 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +34 -0
  4. data/Rakefile +37 -0
  5. data/app/assets/config/next_sgad_manifest.js +2 -0
  6. data/app/assets/javascripts/next_sgad/activities.js +2 -0
  7. data/app/assets/javascripts/next_sgad/application.js +108 -0
  8. data/app/assets/javascripts/next_sgad/assessments.js +2 -0
  9. data/app/assets/javascripts/next_sgad/attendances.js +2 -0
  10. data/app/assets/javascripts/next_sgad/configurations.js +2 -0
  11. data/app/assets/javascripts/next_sgad/departments.js +2 -0
  12. data/app/assets/javascripts/next_sgad/employee_goals.js +2 -0
  13. data/app/assets/javascripts/next_sgad/employees.js +2 -0
  14. data/app/assets/javascripts/next_sgad/functions.js +7 -0
  15. data/app/assets/javascripts/next_sgad/goals.js +2 -0
  16. data/app/assets/javascripts/next_sgad/jquery.orgchart.min.js +2 -0
  17. data/app/assets/javascripts/next_sgad/justifications.js +2 -0
  18. data/app/assets/javascripts/next_sgad/positions.js +2 -0
  19. data/app/assets/javascripts/next_sgad/results.js +2 -0
  20. data/app/assets/stylesheets/next_sgad/activities.css +4 -0
  21. data/app/assets/stylesheets/next_sgad/application.css +77 -0
  22. data/app/assets/stylesheets/next_sgad/assessments.css +4 -0
  23. data/app/assets/stylesheets/next_sgad/attendances.css +4 -0
  24. data/app/assets/stylesheets/next_sgad/configurations.css +4 -0
  25. data/app/assets/stylesheets/next_sgad/departments.css +4 -0
  26. data/app/assets/stylesheets/next_sgad/employee_goals.css +4 -0
  27. data/app/assets/stylesheets/next_sgad/employees.css +4 -0
  28. data/app/assets/stylesheets/next_sgad/functions.css +4 -0
  29. data/app/assets/stylesheets/next_sgad/goals.css +4 -0
  30. data/app/assets/stylesheets/next_sgad/jquery.orgchart.min.css +2 -0
  31. data/app/assets/stylesheets/next_sgad/justifications.css +4 -0
  32. data/app/assets/stylesheets/next_sgad/positions.css +4 -0
  33. data/app/assets/stylesheets/next_sgad/results.css +4 -0
  34. data/app/controllers/next_sgad/activities_controller.rb +63 -0
  35. data/app/controllers/next_sgad/application_controller.rb +5 -0
  36. data/app/controllers/next_sgad/assessments_controller.rb +62 -0
  37. data/app/controllers/next_sgad/attendances_controller.rb +62 -0
  38. data/app/controllers/next_sgad/configurations_controller.rb +62 -0
  39. data/app/controllers/next_sgad/departments_controller.rb +62 -0
  40. data/app/controllers/next_sgad/employee_goals_controller.rb +62 -0
  41. data/app/controllers/next_sgad/employees_controller.rb +62 -0
  42. data/app/controllers/next_sgad/functions_controller.rb +62 -0
  43. data/app/controllers/next_sgad/goals_controller.rb +62 -0
  44. data/app/controllers/next_sgad/justifications_controller.rb +62 -0
  45. data/app/controllers/next_sgad/positions_controller.rb +78 -0
  46. data/app/controllers/next_sgad/results_controller.rb +62 -0
  47. data/app/helpers/next_sgad/activities_helper.rb +4 -0
  48. data/app/helpers/next_sgad/application_helper.rb +4 -0
  49. data/app/helpers/next_sgad/assessments_helper.rb +4 -0
  50. data/app/helpers/next_sgad/attendances_helper.rb +4 -0
  51. data/app/helpers/next_sgad/configurations_helper.rb +4 -0
  52. data/app/helpers/next_sgad/departments_helper.rb +4 -0
  53. data/app/helpers/next_sgad/employee_goals_helper.rb +4 -0
  54. data/app/helpers/next_sgad/employees_helper.rb +4 -0
  55. data/app/helpers/next_sgad/functions_helper.rb +4 -0
  56. data/app/helpers/next_sgad/goals_helper.rb +4 -0
  57. data/app/helpers/next_sgad/justifications_helper.rb +4 -0
  58. data/app/helpers/next_sgad/positions_helper.rb +55 -0
  59. data/app/helpers/next_sgad/results_helper.rb +4 -0
  60. data/app/jobs/next_sgad/application_job.rb +4 -0
  61. data/app/mailers/next_sgad/application_mailer.rb +6 -0
  62. data/app/models/next_sgad/activity.rb +4 -0
  63. data/app/models/next_sgad/application_record.rb +18 -0
  64. data/app/models/next_sgad/assessment.rb +128 -0
  65. data/app/models/next_sgad/attendance.rb +70 -0
  66. data/app/models/next_sgad/configuration.rb +4 -0
  67. data/app/models/next_sgad/department.rb +20 -0
  68. data/app/models/next_sgad/employee.rb +28 -0
  69. data/app/models/next_sgad/employee_goal.rb +36 -0
  70. data/app/models/next_sgad/function.rb +8 -0
  71. data/app/models/next_sgad/goal.rb +37 -0
  72. data/app/models/next_sgad/justification.rb +47 -0
  73. data/app/models/next_sgad/position.rb +36 -0
  74. data/app/models/next_sgad/result.rb +27 -0
  75. data/app/models/next_sgad/setting.rb +13 -0
  76. data/app/views/layouts/next_sgad/application.html.erb +14 -0
  77. data/app/views/next_sgad/activities/_form.html.erb +27 -0
  78. data/app/views/next_sgad/activities/edit.html.erb +6 -0
  79. data/app/views/next_sgad/activities/index.html.erb +29 -0
  80. data/app/views/next_sgad/activities/new.html.erb +5 -0
  81. data/app/views/next_sgad/activities/show.html.erb +14 -0
  82. data/app/views/next_sgad/assessments/_form.html.erb +27 -0
  83. data/app/views/next_sgad/assessments/edit.html.erb +6 -0
  84. data/app/views/next_sgad/assessments/index.html.erb +29 -0
  85. data/app/views/next_sgad/assessments/new.html.erb +5 -0
  86. data/app/views/next_sgad/assessments/show.html.erb +14 -0
  87. data/app/views/next_sgad/attendances/_form.html.erb +37 -0
  88. data/app/views/next_sgad/attendances/edit.html.erb +6 -0
  89. data/app/views/next_sgad/attendances/index.html.erb +33 -0
  90. data/app/views/next_sgad/attendances/new.html.erb +5 -0
  91. data/app/views/next_sgad/attendances/show.html.erb +24 -0
  92. data/app/views/next_sgad/configurations/_form.html.erb +32 -0
  93. data/app/views/next_sgad/configurations/edit.html.erb +6 -0
  94. data/app/views/next_sgad/configurations/index.html.erb +31 -0
  95. data/app/views/next_sgad/configurations/new.html.erb +5 -0
  96. data/app/views/next_sgad/configurations/show.html.erb +19 -0
  97. data/app/views/next_sgad/departments/_form.html.erb +32 -0
  98. data/app/views/next_sgad/departments/edit.html.erb +6 -0
  99. data/app/views/next_sgad/departments/index.html.erb +33 -0
  100. data/app/views/next_sgad/departments/new.html.erb +5 -0
  101. data/app/views/next_sgad/departments/show.html.erb +24 -0
  102. data/app/views/next_sgad/employee_goals/_form.html.erb +42 -0
  103. data/app/views/next_sgad/employee_goals/edit.html.erb +6 -0
  104. data/app/views/next_sgad/employee_goals/index.html.erb +35 -0
  105. data/app/views/next_sgad/employee_goals/new.html.erb +5 -0
  106. data/app/views/next_sgad/employee_goals/show.html.erb +29 -0
  107. data/app/views/next_sgad/employees/_form.html.erb +27 -0
  108. data/app/views/next_sgad/employees/_organigrama.html.erb +7 -0
  109. data/app/views/next_sgad/employees/edit.html.erb +6 -0
  110. data/app/views/next_sgad/employees/index.html.erb +31 -0
  111. data/app/views/next_sgad/employees/new.html.erb +5 -0
  112. data/app/views/next_sgad/employees/show.html.erb +19 -0
  113. data/app/views/next_sgad/functions/_form.html.erb +22 -0
  114. data/app/views/next_sgad/functions/edit.html.erb +6 -0
  115. data/app/views/next_sgad/functions/index.html.erb +27 -0
  116. data/app/views/next_sgad/functions/new.html.erb +5 -0
  117. data/app/views/next_sgad/functions/show.html.erb +9 -0
  118. data/app/views/next_sgad/goals/_form.html.erb +62 -0
  119. data/app/views/next_sgad/goals/edit.html.erb +6 -0
  120. data/app/views/next_sgad/goals/index.html.erb +41 -0
  121. data/app/views/next_sgad/goals/new.html.erb +5 -0
  122. data/app/views/next_sgad/goals/show.html.erb +49 -0
  123. data/app/views/next_sgad/justifications/_form.html.erb +22 -0
  124. data/app/views/next_sgad/justifications/edit.html.erb +6 -0
  125. data/app/views/next_sgad/justifications/index.html.erb +27 -0
  126. data/app/views/next_sgad/justifications/new.html.erb +5 -0
  127. data/app/views/next_sgad/justifications/show.html.erb +9 -0
  128. data/app/views/next_sgad/positions/_form.html.erb +43 -0
  129. data/app/views/next_sgad/positions/edit.html.erb +6 -0
  130. data/app/views/next_sgad/positions/index.html.erb +94 -0
  131. data/app/views/next_sgad/positions/new.html.erb +5 -0
  132. data/app/views/next_sgad/positions/organigram.html.erb +1 -0
  133. data/app/views/next_sgad/positions/show.html.erb +34 -0
  134. data/app/views/next_sgad/results/_form.html.erb +37 -0
  135. data/app/views/next_sgad/results/edit.html.erb +6 -0
  136. data/app/views/next_sgad/results/index.html.erb +33 -0
  137. data/app/views/next_sgad/results/new.html.erb +5 -0
  138. data/app/views/next_sgad/results/show.html.erb +24 -0
  139. data/config/initializers/core_extentions.rb +1 -0
  140. data/config/initializers/initializer.rb +1 -0
  141. data/config/initializers/m.rb +1 -0
  142. data/config/initializers/semper.rb +1 -0
  143. data/config/routes.rb +16 -0
  144. data/db/migrate/20171014174705_create_next_sgad_departments.rb +11 -0
  145. data/db/migrate/20171014175212_create_next_sgad_employees.rb +11 -0
  146. data/db/migrate/20171014175507_create_next_sgad_positions.rb +13 -0
  147. data/db/migrate/20171014183337_create_next_sgad_configurations.rb +11 -0
  148. data/db/migrate/20171015073528_add_next_sgad_department_to_department.rb +6 -0
  149. data/db/migrate/20171019142918_remove_table_configurations.rb +5 -0
  150. data/db/migrate/20171019143336_create_next_sgad_settings.rb +11 -0
  151. data/db/migrate/20171022113005_add_paygrade_to_next_sgad_employee.rb +6 -0
  152. data/db/migrate/20171024154422_create_next_sgad_assessments.rb +10 -0
  153. data/db/migrate/20171024172007_create_next_sgad_goals.rb +18 -0
  154. data/db/migrate/20171024181227_create_next_sgad_employee_goals.rb +16 -0
  155. data/db/migrate/20171024192907_corrects_references.rb +8 -0
  156. data/db/migrate/20171024193750_copies_info_from_old_references.rb +8 -0
  157. data/db/migrate/20171025093224_change_column_year_from_assessments.rb +6 -0
  158. data/db/migrate/20171025134655_add_goal_type_to_employee_goals.rb +8 -0
  159. data/db/migrate/20171025135319_addname_to_next_sgad_employee_goals.rb +5 -0
  160. data/db/migrate/20171025153545_add_position_reference_to_goals.rb +4 -0
  161. data/db/migrate/20171026055530_add_position_to_next_sgad_goals.rb +5 -0
  162. data/db/migrate/20171026060110_add_position_to_next_sgad_employee.rb +5 -0
  163. data/db/migrate/20171026060351_copies_posiiton_id_to_employees.rb +9 -0
  164. data/db/migrate/20171026061315_remove_old_reference_columns.rb +8 -0
  165. data/db/migrate/20171026115447_add_description_to_next_sgad_goals.rb +6 -0
  166. data/db/migrate/20171026142240_add_position_to_next_sgad_employee_goals.rb +5 -0
  167. data/db/migrate/20171027210543_create_next_sgad_functions.rb +9 -0
  168. data/db/migrate/20171027210912_add_function_to_next_sgad_positions.rb +5 -0
  169. data/db/migrate/20171027213833_create_join_table_goal_position.rb +8 -0
  170. data/db/migrate/20171027221550_create_join_table_employee_position.rb +8 -0
  171. data/db/migrate/20171027223737_add_efective_to_next_sgad_positions.rb +5 -0
  172. data/db/migrate/20171027230032_remove_position_from_next_sgad_employee.rb +6 -0
  173. data/db/migrate/20171027230033_clear_data.rb +7 -0
  174. data/db/migrate/20171028061909_add_description_to_next_sgad_functions.rb +5 -0
  175. data/db/migrate/20171028140106_add_percentages_to_next_sagad_assessments.rb +6 -0
  176. data/db/migrate/20171029074321_rename_paygrade_and_level_from_employee.rb +7 -0
  177. data/db/migrate/20171029103212_add_email_to_next_sgad_employee.rb +5 -0
  178. data/db/migrate/20171029154047_add_coment_to_next_sgad_employee_goals.rb +6 -0
  179. data/db/migrate/20171029160044_add_amount_to_next_sgad_employee_goals.rb +5 -0
  180. data/db/migrate/20171101112232_change_self_assessment_from_next_sgad_employee_goals.rb +13 -0
  181. data/db/migrate/20171106113735_add_first_name_to_next_sgad_employees.rb +24 -0
  182. data/db/migrate/20171110103155_add_number_to_next_sgad_functions.rb +5 -0
  183. data/db/migrate/20171111081148_create_next_sgad_justifications.rb +9 -0
  184. data/db/migrate/20171111093506_create_next_sgad_attendances.rb +13 -0
  185. data/db/migrate/20171111093524_add_references_to_justifications_and_attendences.rb +10 -0
  186. data/db/migrate/20171111094154_create_join_table_attendance_justification.rb +8 -0
  187. data/db/migrate/20171111121753_create_next_sgad_results.rb +13 -0
  188. data/db/migrate/20171111121935_resolts_relationship.rb +9 -0
  189. data/db/migrate/20171112004221_add_attendance_percentage_to_next_sgad_assessment.rb +14 -0
  190. data/db/migrate/20171112121440_add_status_to_next_sgad_justifications.rb +7 -0
  191. data/db/migrate/20171112172436_add_department_to_attendances.rb +6 -0
  192. data/db/migrate/20171113125224_add_configuration_columns_to_nexts_sgad_assessment.rb +18 -0
  193. data/db/migrate/20171113143825_add_max_number_of_absences_for_five_to_next_sgad_assessments.rb +9 -0
  194. data/db/migrate/20171114135601_change_column_status_from_result.rb +6 -0
  195. data/db/migrate/20171115085324_create_next_sgad_activities.rb +10 -0
  196. data/db/migrate/20171115110522_add_column_nature_and_value_to_results.rb +7 -0
  197. data/db/migrate/20171115111821_remove_unused_columns.rb +19 -0
  198. data/db/migrate/20171115140048_corrects_status.rb +6 -0
  199. data/db/migrate/20171115160122_add_justification_status_to_next_sgad_attendances.rb +5 -0
  200. data/db/migrate/20171115161157_migrate_fill_justification_columns.rb +7 -0
  201. data/lib/concerns/models/employee.rb +25 -0
  202. data/lib/generators/initializer/USAGE +8 -0
  203. data/lib/generators/initializer/initializer_generator.rb +6 -0
  204. data/lib/generators/initializer/templates/initializer.rb +1 -0
  205. data/lib/generators/initializer_generator.rb +6 -0
  206. data/lib/generators/views/USAGE +8 -0
  207. data/lib/generators/views/views_generator.rb +3 -0
  208. data/lib/next_sgad/engine.rb +13 -0
  209. data/lib/next_sgad/version.rb +3 -0
  210. data/lib/next_sgad.rb +5 -0
  211. data/lib/tasks/next_sgad_tasks.rake +4 -0
  212. metadata +268 -0
@@ -0,0 +1,32 @@
1
+ <%= form_with(model: configuration, local: true) do |form| %>
2
+ <% if configuration.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(configuration.errors.count, "error") %> prohibited this configuration from being saved:</h2>
5
+
6
+ <ul>
7
+ <% configuration.errors.full_messages.each do |message| %>
8
+ <li><%= message %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= form.label :name %>
16
+ <%= form.text_field :name, id: :configuration_name %>
17
+ </div>
18
+
19
+ <div class="field">
20
+ <%= form.label :description %>
21
+ <%= form.text_area :description, id: :configuration_description %>
22
+ </div>
23
+
24
+ <div class="field">
25
+ <%= form.label :version %>
26
+ <%= form.text_field :version, id: :configuration_version %>
27
+ </div>
28
+
29
+ <div class="actions">
30
+ <%= form.submit %>
31
+ </div>
32
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing Configuration</h1>
2
+
3
+ <%= render 'form', configuration: @configuration %>
4
+
5
+ <%= link_to 'Show', @configuration %> |
6
+ <%= link_to 'Back', configurations_path %>
@@ -0,0 +1,31 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <h1>Configurations</h1>
4
+
5
+ <table>
6
+ <thead>
7
+ <tr>
8
+ <th>Name</th>
9
+ <th>Description</th>
10
+ <th>Version</th>
11
+ <th colspan="3"></th>
12
+ </tr>
13
+ </thead>
14
+
15
+ <tbody>
16
+ <% @configurations.each do |configuration| %>
17
+ <tr>
18
+ <td><%= configuration.name %></td>
19
+ <td><%= configuration.description %></td>
20
+ <td><%= configuration.version %></td>
21
+ <td><%= link_to 'Show', configuration %></td>
22
+ <td><%= link_to 'Edit', edit_configuration_path(configuration) %></td>
23
+ <td><%= link_to 'Destroy', configuration, method: :delete, data: { confirm: 'Are you sure?' } %></td>
24
+ </tr>
25
+ <% end %>
26
+ </tbody>
27
+ </table>
28
+
29
+ <br>
30
+
31
+ <%= link_to 'New Configuration', new_configuration_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New Configuration</h1>
2
+
3
+ <%= render 'form', configuration: @configuration %>
4
+
5
+ <%= link_to 'Back', configurations_path %>
@@ -0,0 +1,19 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <p>
4
+ <strong>Name:</strong>
5
+ <%= @configuration.name %>
6
+ </p>
7
+
8
+ <p>
9
+ <strong>Description:</strong>
10
+ <%= @configuration.description %>
11
+ </p>
12
+
13
+ <p>
14
+ <strong>Version:</strong>
15
+ <%= @configuration.version %>
16
+ </p>
17
+
18
+ <%= link_to 'Edit', edit_configuration_path(@configuration) %> |
19
+ <%= link_to 'Back', configurations_path %>
@@ -0,0 +1,32 @@
1
+ <%= form_with(model: department, local: true) do |form| %>
2
+ <% if department.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(department.errors.count, "error") %> prohibited this department from being saved:</h2>
5
+
6
+ <ul>
7
+ <% department.errors.full_messages.each do |message| %>
8
+ <li><%= message %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= form.label :name %>
16
+ <%= form.text_field :name, id: :department_name %>
17
+ </div>
18
+
19
+ <div class="field">
20
+ <%= form.label :description %>
21
+ <%= form.text_field :description, id: :department_description %>
22
+ </div>
23
+
24
+ <div class="field">
25
+ <%= form.label :department_id %>
26
+ <%= form.select :department_id, options_for_select(NextSgad::Department.all.map{|v| [v.name, v.id]}) %>
27
+ </div>
28
+
29
+ <div class="actions">
30
+ <%= form.submit %>
31
+ </div>
32
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing Department</h1>
2
+
3
+ <%= render 'form', department: @department %>
4
+
5
+ <%= link_to 'Show', @department %> |
6
+ <%= link_to 'Back', departments_path %>
@@ -0,0 +1,33 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <h1>Departments</h1>
4
+
5
+ <table>
6
+ <thead>
7
+ <tr>
8
+ <th>Name</th>
9
+ <th>Description</th>
10
+ <th>Number</th>
11
+ <th>Department</th>
12
+ <th colspan="3"></th>
13
+ </tr>
14
+ </thead>
15
+
16
+ <tbody>
17
+ <% @departments.each do |department| %>
18
+ <tr>
19
+ <td><%= department.name %></td>
20
+ <td><%= department.description %></td>
21
+ <td><%= department.number %></td>
22
+ <td><%= department.next_sgad_department&.name %></td>
23
+ <td><%= link_to 'Show', department %></td>
24
+ <td><%= link_to 'Edit', edit_department_path(department) %></td>
25
+ <td><%= link_to 'Destroy', department, method: :delete, data: { confirm: 'Are you sure?' } %></td>
26
+ </tr>
27
+ <% end %>
28
+ </tbody>
29
+ </table>
30
+
31
+ <br>
32
+
33
+ <%= link_to 'New Department', new_department_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New Department</h1>
2
+
3
+ <%= render 'form', department: @department %>
4
+
5
+ <%= link_to 'Back', departments_path %>
@@ -0,0 +1,24 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <p>
4
+ <strong>Name:</strong>
5
+ <%= @department.name %>
6
+ </p>
7
+
8
+ <p>
9
+ <strong>Description:</strong>
10
+ <%= @department.description %>
11
+ </p>
12
+
13
+ <p>
14
+ <strong>Number:</strong>
15
+ <%= @department.number %>
16
+ </p>
17
+
18
+ <p>
19
+ <strong>Department:</strong>
20
+ <%= @department.department_id %>
21
+ </p>
22
+
23
+ <%= link_to 'Edit', edit_department_path(@department) %> |
24
+ <%= link_to 'Back', departments_path %>
@@ -0,0 +1,42 @@
1
+ <%= form_with(model: employee_goal, local: true) do |form| %>
2
+ <% if employee_goal.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(employee_goal.errors.count, "error") %> prohibited this employee_goal from being saved:</h2>
5
+
6
+ <ul>
7
+ <% employee_goal.errors.full_messages.each do |message| %>
8
+ <li><%= message %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= form.label :self_assessment %>
16
+ <%= form.number_field :self_assessment, id: :employee_goal_self_assessment %>
17
+ </div>
18
+
19
+ <div class="field">
20
+ <%= form.label :supervisor_assessment %>
21
+ <%= form.number_field :supervisor_assessment, id: :employee_goal_supervisor_assessment %>
22
+ </div>
23
+
24
+ <div class="field">
25
+ <%= form.label :final_assessment %>
26
+ <%= form.number_field :final_assessment, id: :employee_goal_final_assessment %>
27
+ </div>
28
+
29
+ <div class="field">
30
+ <%= form.label :status %>
31
+ <%= form.number_field :status, id: :employee_goal_status %>
32
+ </div>
33
+
34
+ <div class="field">
35
+ <%= form.label :percentage %>
36
+ <%= form.text_field :percentage, id: :employee_goal_percentage %>
37
+ </div>
38
+
39
+ <div class="actions">
40
+ <%= form.submit %>
41
+ </div>
42
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing Employee Goal</h1>
2
+
3
+ <%= render 'form', employee_goal: @employee_goal %>
4
+
5
+ <%= link_to 'Show', @employee_goal %> |
6
+ <%= link_to 'Back', employee_goals_path %>
@@ -0,0 +1,35 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <h1>Employee Goals</h1>
4
+
5
+ <table>
6
+ <thead>
7
+ <tr>
8
+ <th>Self assessment</th>
9
+ <th>Supervisor assessment</th>
10
+ <th>Final assessment</th>
11
+ <th>State</th>
12
+ <th>Percentage</th>
13
+ <th colspan="3"></th>
14
+ </tr>
15
+ </thead>
16
+
17
+ <tbody>
18
+ <% @employee_goals.each do |employee_goal| %>
19
+ <tr>
20
+ <td><%= employee_goal.self_assessment %></td>
21
+ <td><%= employee_goal.supervisor_assessment %></td>
22
+ <td><%= employee_goal.final_assessment %></td>
23
+ <td><%= employee_goal.status %></td>
24
+ <td><%= employee_goal.percentage %></td>
25
+ <td><%= link_to 'Show', employee_goal %></td>
26
+ <td><%= link_to 'Edit', edit_employee_goal_path(employee_goal) %></td>
27
+ <td><%= link_to 'Destroy', employee_goal, method: :delete, data: { confirm: 'Are you sure?' } %></td>
28
+ </tr>
29
+ <% end %>
30
+ </tbody>
31
+ </table>
32
+
33
+ <br>
34
+
35
+ <%= link_to 'New Employee Goal', new_employee_goal_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New Employee Goal</h1>
2
+
3
+ <%= render 'form', employee_goal: @employee_goal %>
4
+
5
+ <%= link_to 'Back', employee_goals_path %>
@@ -0,0 +1,29 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <p>
4
+ <strong>Self assessment:</strong>
5
+ <%= @employee_goal.self_assessment %>
6
+ </p>
7
+
8
+ <p>
9
+ <strong>Supervisor assessment:</strong>
10
+ <%= @employee_goal.supervisor_assessment %>
11
+ </p>
12
+
13
+ <p>
14
+ <strong>Final assessment:</strong>
15
+ <%= @employee_goal.final_assessment %>
16
+ </p>
17
+
18
+ <p>
19
+ <strong>State:</strong>
20
+ <%= @employee_goal.status %>
21
+ </p>
22
+
23
+ <p>
24
+ <strong>Percentage:</strong>
25
+ <%= @employee_goal.percentage %>
26
+ </p>
27
+
28
+ <%= link_to 'Edit', edit_employee_goal_path(@employee_goal) %> |
29
+ <%= link_to 'Back', employee_goals_path %>
@@ -0,0 +1,27 @@
1
+ <%= form_with(model: employee, local: true) do |form| %>
2
+ <% if employee.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(employee.errors.count, "error") %> prohibited this employee from being saved:</h2>
5
+
6
+ <ul>
7
+ <% employee.errors.full_messages.each do |message| %>
8
+ <li><%= message %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= form.label :name %>
16
+ <%= form.text_field :name, id: :employee_name %>
17
+ </div>
18
+
19
+ <div class="field">
20
+ <% form.label :level %>
21
+ <% form.number_field :level, id: :employee_level %>
22
+ </div>
23
+
24
+ <div class="actions">
25
+ <%= form.submit %>
26
+ </div>
27
+ <% end %>
@@ -0,0 +1,7 @@
1
+ <ul>
2
+ <%@departments.each do |department|%>
3
+
4
+
5
+ <%end%>
6
+
7
+ </ul>
@@ -0,0 +1,6 @@
1
+ <h1>Editing Employee</h1>
2
+
3
+ <%= render 'form', employee: @employee %>
4
+
5
+ <%= link_to 'Show', @employee %> |
6
+ <%= link_to 'Back', employees_path %>
@@ -0,0 +1,31 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <h1>Employees</h1>
4
+
5
+ <table>
6
+ <thead>
7
+ <tr>
8
+ <th>Name</th>
9
+ <th>Number</th>
10
+ <th>Level</th>
11
+ <th colspan="3"></th>
12
+ </tr>
13
+ </thead>
14
+
15
+ <tbody>
16
+ <% @employees.each do |employee| %>
17
+ <tr>
18
+ <td><%= employee.name %></td>
19
+ <td><%= employee.number %></td>
20
+ <td><%= employee.level %></td>
21
+ <td><%= link_to 'Show', employee %></td>
22
+ <td><%= link_to 'Edit', edit_employee_path(employee) %></td>
23
+ <td><%= link_to 'Destroy', employee, method: :delete, data: { confirm: 'Are you sure?' } %></td>
24
+ </tr>
25
+ <% end %>
26
+ </tbody>
27
+ </table>
28
+
29
+ <br>
30
+
31
+ <%= link_to 'New Employee', new_employee_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New Employee</h1>
2
+
3
+ <%= render 'form', employee: @employee %>
4
+
5
+ <%= link_to 'Back', employees_path %>
@@ -0,0 +1,19 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <p>
4
+ <strong>Name:</strong>
5
+ <%= @employee.full_name %>
6
+ </p>
7
+
8
+ <p>
9
+ <strong>Number:</strong>
10
+ <%= @employee.number %>
11
+ </p>
12
+
13
+ <p>
14
+ <strong>Level:</strong>
15
+ <%= @employee.level %>
16
+ </p>
17
+
18
+ <%= link_to 'Edit', edit_employee_path(@employee) %> |
19
+ <%= link_to 'Back', employees_path %>
@@ -0,0 +1,22 @@
1
+ <%= form_with(model: function, local: true) do |form| %>
2
+ <% if function.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(function.errors.count, "error") %> prohibited this function from being saved:</h2>
5
+
6
+ <ul>
7
+ <% function.errors.full_messages.each do |message| %>
8
+ <li><%= message %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= form.label :name %>
16
+ <%= form.text_field :name, id: :function_name %>
17
+ </div>
18
+
19
+ <div class="actions">
20
+ <%= form.submit %>
21
+ </div>
22
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing Function</h1>
2
+
3
+ <%= render 'form', function: @function %>
4
+
5
+ <%= link_to 'Show', @function %> |
6
+ <%= link_to 'Back', functions_path %>
@@ -0,0 +1,27 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <h1>Functions</h1>
4
+
5
+ <table>
6
+ <thead>
7
+ <tr>
8
+ <th>Name</th>
9
+ <th colspan="3"></th>
10
+ </tr>
11
+ </thead>
12
+
13
+ <tbody>
14
+ <% @functions.each do |function| %>
15
+ <tr>
16
+ <td><%= function.name %></td>
17
+ <td><%= link_to 'Show', function %></td>
18
+ <td><%= link_to 'Edit', edit_function_path(function) %></td>
19
+ <td><%= link_to 'Destroy', function, method: :delete, data: { confirm: 'Are you sure?' } %></td>
20
+ </tr>
21
+ <% end %>
22
+ </tbody>
23
+ </table>
24
+
25
+ <br>
26
+
27
+ <%= link_to 'New Function', new_function_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New Function</h1>
2
+
3
+ <%= render 'form', function: @function %>
4
+
5
+ <%= link_to 'Back', functions_path %>
@@ -0,0 +1,9 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <p>
4
+ <strong>Name:</strong>
5
+ <%= @function.name %>
6
+ </p>
7
+
8
+ <%= link_to 'Edit', edit_function_path(@function) %> |
9
+ <%= link_to 'Back', functions_path %>
@@ -0,0 +1,62 @@
1
+ <%= form_with(model: goal, local: true) do |form| %>
2
+ <% if goal.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(goal.errors.count, "error") %> prohibited this goal from being saved:</h2>
5
+
6
+ <ul>
7
+ <% goal.errors.full_messages.each do |message| %>
8
+ <li><%= message %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= form.label :name %>
16
+ <%= form.text_field :name, id: :goal_name %>
17
+ </div>
18
+
19
+ <div class="field">
20
+ <%= form.label :references %>
21
+ <%= form.text_field :references, id: :goal_references %>
22
+ </div>
23
+
24
+ <div class="field">
25
+ <%= form.label :goal_type %>
26
+ <%= form.number_field :goal_type, id: :goal_goal_type %>
27
+ </div>
28
+
29
+ <div class="field">
30
+ <%= form.label :status %>
31
+ <%= form.number_field :status, id: :goal_status %>
32
+ </div>
33
+
34
+ <div class="field">
35
+ <%= form.label :nature %>
36
+ <%= form.number_field :nature, id: :goal_nature %>
37
+ </div>
38
+
39
+ <div class="field">
40
+ <%= form.label :unit %>
41
+ <%= form.number_field :unit, id: :goal_unit %>
42
+ </div>
43
+
44
+ <div class="field">
45
+ <%= form.label :target %>
46
+ <%= form.text_field :target, id: :goal_target %>
47
+ </div>
48
+
49
+ <div class="field">
50
+ <%= form.label :percentage_on_the_type %>
51
+ <%= form.text_field :percentage_on_the_type, id: :goal_percentage_on_the_type %>
52
+ </div>
53
+
54
+ <div class="field">
55
+ <%= form.label :percentage %>
56
+ <%= form.text_field :percentage, id: :goal_percentage %>
57
+ </div>
58
+
59
+ <div class="actions">
60
+ <%= form.submit %>
61
+ </div>
62
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing Goal</h1>
2
+
3
+ <%= render 'form', goal: @goal %>
4
+
5
+ <%= link_to 'Show', @goal %> |
6
+ <%= link_to 'Back', goals_path %>
@@ -0,0 +1,41 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <h1>Goals</h1>
4
+
5
+ <table>
6
+ <thead>
7
+ <tr>
8
+ <th>Name</th>
9
+ <th>Goal type</th>
10
+ <th>State</th>
11
+ <th>Nature</th>
12
+ <th>Unit</th>
13
+ <th>Target</th>
14
+ <th>Percentage on the type</th>
15
+ <th>Percentage</th>
16
+ <th colspan="3"></th>
17
+ </tr>
18
+ </thead>
19
+
20
+ <tbody>
21
+ <% @goals.each do |goal| %>
22
+ <tr>
23
+ <td><%= goal.name %></td>
24
+ <td><%= goal.goal_type %></td>
25
+ <td><%= goal.status %></td>
26
+ <td><%= goal.nature %></td>
27
+ <td><%= goal.unit %></td>
28
+ <td><%= goal.target %></td>
29
+ <td><%= goal.percentage_on_the_type %></td>
30
+ <td><%= goal.percentage %></td>
31
+ <td><%= link_to 'Show', goal %></td>
32
+ <td><%= link_to 'Edit', edit_goal_path(goal) %></td>
33
+ <td><%= link_to 'Destroy', goal, method: :delete, data: { confirm: 'Are you sure?' } %></td>
34
+ </tr>
35
+ <% end %>
36
+ </tbody>
37
+ </table>
38
+
39
+ <br>
40
+
41
+ <%= link_to 'New Goal', new_goal_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New Goal</h1>
2
+
3
+ <%= render 'form', goal: @goal %>
4
+
5
+ <%= link_to 'Back', goals_path %>