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.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +34 -0
- data/Rakefile +37 -0
- data/app/assets/config/next_sgad_manifest.js +2 -0
- data/app/assets/javascripts/next_sgad/activities.js +2 -0
- data/app/assets/javascripts/next_sgad/application.js +108 -0
- data/app/assets/javascripts/next_sgad/assessments.js +2 -0
- data/app/assets/javascripts/next_sgad/attendances.js +2 -0
- data/app/assets/javascripts/next_sgad/configurations.js +2 -0
- data/app/assets/javascripts/next_sgad/departments.js +2 -0
- data/app/assets/javascripts/next_sgad/employee_goals.js +2 -0
- data/app/assets/javascripts/next_sgad/employees.js +2 -0
- data/app/assets/javascripts/next_sgad/functions.js +7 -0
- data/app/assets/javascripts/next_sgad/goals.js +2 -0
- data/app/assets/javascripts/next_sgad/jquery.orgchart.min.js +2 -0
- data/app/assets/javascripts/next_sgad/justifications.js +2 -0
- data/app/assets/javascripts/next_sgad/positions.js +2 -0
- data/app/assets/javascripts/next_sgad/results.js +2 -0
- data/app/assets/stylesheets/next_sgad/activities.css +4 -0
- data/app/assets/stylesheets/next_sgad/application.css +77 -0
- data/app/assets/stylesheets/next_sgad/assessments.css +4 -0
- data/app/assets/stylesheets/next_sgad/attendances.css +4 -0
- data/app/assets/stylesheets/next_sgad/configurations.css +4 -0
- data/app/assets/stylesheets/next_sgad/departments.css +4 -0
- data/app/assets/stylesheets/next_sgad/employee_goals.css +4 -0
- data/app/assets/stylesheets/next_sgad/employees.css +4 -0
- data/app/assets/stylesheets/next_sgad/functions.css +4 -0
- data/app/assets/stylesheets/next_sgad/goals.css +4 -0
- data/app/assets/stylesheets/next_sgad/jquery.orgchart.min.css +2 -0
- data/app/assets/stylesheets/next_sgad/justifications.css +4 -0
- data/app/assets/stylesheets/next_sgad/positions.css +4 -0
- data/app/assets/stylesheets/next_sgad/results.css +4 -0
- data/app/controllers/next_sgad/activities_controller.rb +63 -0
- data/app/controllers/next_sgad/application_controller.rb +5 -0
- data/app/controllers/next_sgad/assessments_controller.rb +62 -0
- data/app/controllers/next_sgad/attendances_controller.rb +62 -0
- data/app/controllers/next_sgad/configurations_controller.rb +62 -0
- data/app/controllers/next_sgad/departments_controller.rb +62 -0
- data/app/controllers/next_sgad/employee_goals_controller.rb +62 -0
- data/app/controllers/next_sgad/employees_controller.rb +62 -0
- data/app/controllers/next_sgad/functions_controller.rb +62 -0
- data/app/controllers/next_sgad/goals_controller.rb +62 -0
- data/app/controllers/next_sgad/justifications_controller.rb +62 -0
- data/app/controllers/next_sgad/positions_controller.rb +78 -0
- data/app/controllers/next_sgad/results_controller.rb +62 -0
- data/app/helpers/next_sgad/activities_helper.rb +4 -0
- data/app/helpers/next_sgad/application_helper.rb +4 -0
- data/app/helpers/next_sgad/assessments_helper.rb +4 -0
- data/app/helpers/next_sgad/attendances_helper.rb +4 -0
- data/app/helpers/next_sgad/configurations_helper.rb +4 -0
- data/app/helpers/next_sgad/departments_helper.rb +4 -0
- data/app/helpers/next_sgad/employee_goals_helper.rb +4 -0
- data/app/helpers/next_sgad/employees_helper.rb +4 -0
- data/app/helpers/next_sgad/functions_helper.rb +4 -0
- data/app/helpers/next_sgad/goals_helper.rb +4 -0
- data/app/helpers/next_sgad/justifications_helper.rb +4 -0
- data/app/helpers/next_sgad/positions_helper.rb +55 -0
- data/app/helpers/next_sgad/results_helper.rb +4 -0
- data/app/jobs/next_sgad/application_job.rb +4 -0
- data/app/mailers/next_sgad/application_mailer.rb +6 -0
- data/app/models/next_sgad/activity.rb +4 -0
- data/app/models/next_sgad/application_record.rb +18 -0
- data/app/models/next_sgad/assessment.rb +128 -0
- data/app/models/next_sgad/attendance.rb +70 -0
- data/app/models/next_sgad/configuration.rb +4 -0
- data/app/models/next_sgad/department.rb +20 -0
- data/app/models/next_sgad/employee.rb +28 -0
- data/app/models/next_sgad/employee_goal.rb +36 -0
- data/app/models/next_sgad/function.rb +8 -0
- data/app/models/next_sgad/goal.rb +37 -0
- data/app/models/next_sgad/justification.rb +47 -0
- data/app/models/next_sgad/position.rb +36 -0
- data/app/models/next_sgad/result.rb +27 -0
- data/app/models/next_sgad/setting.rb +13 -0
- data/app/views/layouts/next_sgad/application.html.erb +14 -0
- data/app/views/next_sgad/activities/_form.html.erb +27 -0
- data/app/views/next_sgad/activities/edit.html.erb +6 -0
- data/app/views/next_sgad/activities/index.html.erb +29 -0
- data/app/views/next_sgad/activities/new.html.erb +5 -0
- data/app/views/next_sgad/activities/show.html.erb +14 -0
- data/app/views/next_sgad/assessments/_form.html.erb +27 -0
- data/app/views/next_sgad/assessments/edit.html.erb +6 -0
- data/app/views/next_sgad/assessments/index.html.erb +29 -0
- data/app/views/next_sgad/assessments/new.html.erb +5 -0
- data/app/views/next_sgad/assessments/show.html.erb +14 -0
- data/app/views/next_sgad/attendances/_form.html.erb +37 -0
- data/app/views/next_sgad/attendances/edit.html.erb +6 -0
- data/app/views/next_sgad/attendances/index.html.erb +33 -0
- data/app/views/next_sgad/attendances/new.html.erb +5 -0
- data/app/views/next_sgad/attendances/show.html.erb +24 -0
- data/app/views/next_sgad/configurations/_form.html.erb +32 -0
- data/app/views/next_sgad/configurations/edit.html.erb +6 -0
- data/app/views/next_sgad/configurations/index.html.erb +31 -0
- data/app/views/next_sgad/configurations/new.html.erb +5 -0
- data/app/views/next_sgad/configurations/show.html.erb +19 -0
- data/app/views/next_sgad/departments/_form.html.erb +32 -0
- data/app/views/next_sgad/departments/edit.html.erb +6 -0
- data/app/views/next_sgad/departments/index.html.erb +33 -0
- data/app/views/next_sgad/departments/new.html.erb +5 -0
- data/app/views/next_sgad/departments/show.html.erb +24 -0
- data/app/views/next_sgad/employee_goals/_form.html.erb +42 -0
- data/app/views/next_sgad/employee_goals/edit.html.erb +6 -0
- data/app/views/next_sgad/employee_goals/index.html.erb +35 -0
- data/app/views/next_sgad/employee_goals/new.html.erb +5 -0
- data/app/views/next_sgad/employee_goals/show.html.erb +29 -0
- data/app/views/next_sgad/employees/_form.html.erb +27 -0
- data/app/views/next_sgad/employees/_organigrama.html.erb +7 -0
- data/app/views/next_sgad/employees/edit.html.erb +6 -0
- data/app/views/next_sgad/employees/index.html.erb +31 -0
- data/app/views/next_sgad/employees/new.html.erb +5 -0
- data/app/views/next_sgad/employees/show.html.erb +19 -0
- data/app/views/next_sgad/functions/_form.html.erb +22 -0
- data/app/views/next_sgad/functions/edit.html.erb +6 -0
- data/app/views/next_sgad/functions/index.html.erb +27 -0
- data/app/views/next_sgad/functions/new.html.erb +5 -0
- data/app/views/next_sgad/functions/show.html.erb +9 -0
- data/app/views/next_sgad/goals/_form.html.erb +62 -0
- data/app/views/next_sgad/goals/edit.html.erb +6 -0
- data/app/views/next_sgad/goals/index.html.erb +41 -0
- data/app/views/next_sgad/goals/new.html.erb +5 -0
- data/app/views/next_sgad/goals/show.html.erb +49 -0
- data/app/views/next_sgad/justifications/_form.html.erb +22 -0
- data/app/views/next_sgad/justifications/edit.html.erb +6 -0
- data/app/views/next_sgad/justifications/index.html.erb +27 -0
- data/app/views/next_sgad/justifications/new.html.erb +5 -0
- data/app/views/next_sgad/justifications/show.html.erb +9 -0
- data/app/views/next_sgad/positions/_form.html.erb +43 -0
- data/app/views/next_sgad/positions/edit.html.erb +6 -0
- data/app/views/next_sgad/positions/index.html.erb +94 -0
- data/app/views/next_sgad/positions/new.html.erb +5 -0
- data/app/views/next_sgad/positions/organigram.html.erb +1 -0
- data/app/views/next_sgad/positions/show.html.erb +34 -0
- data/app/views/next_sgad/results/_form.html.erb +37 -0
- data/app/views/next_sgad/results/edit.html.erb +6 -0
- data/app/views/next_sgad/results/index.html.erb +33 -0
- data/app/views/next_sgad/results/new.html.erb +5 -0
- data/app/views/next_sgad/results/show.html.erb +24 -0
- data/config/initializers/core_extentions.rb +1 -0
- data/config/initializers/initializer.rb +1 -0
- data/config/initializers/m.rb +1 -0
- data/config/initializers/semper.rb +1 -0
- data/config/routes.rb +16 -0
- data/db/migrate/20171014174705_create_next_sgad_departments.rb +11 -0
- data/db/migrate/20171014175212_create_next_sgad_employees.rb +11 -0
- data/db/migrate/20171014175507_create_next_sgad_positions.rb +13 -0
- data/db/migrate/20171014183337_create_next_sgad_configurations.rb +11 -0
- data/db/migrate/20171015073528_add_next_sgad_department_to_department.rb +6 -0
- data/db/migrate/20171019142918_remove_table_configurations.rb +5 -0
- data/db/migrate/20171019143336_create_next_sgad_settings.rb +11 -0
- data/db/migrate/20171022113005_add_paygrade_to_next_sgad_employee.rb +6 -0
- data/db/migrate/20171024154422_create_next_sgad_assessments.rb +10 -0
- data/db/migrate/20171024172007_create_next_sgad_goals.rb +18 -0
- data/db/migrate/20171024181227_create_next_sgad_employee_goals.rb +16 -0
- data/db/migrate/20171024192907_corrects_references.rb +8 -0
- data/db/migrate/20171024193750_copies_info_from_old_references.rb +8 -0
- data/db/migrate/20171025093224_change_column_year_from_assessments.rb +6 -0
- data/db/migrate/20171025134655_add_goal_type_to_employee_goals.rb +8 -0
- data/db/migrate/20171025135319_addname_to_next_sgad_employee_goals.rb +5 -0
- data/db/migrate/20171025153545_add_position_reference_to_goals.rb +4 -0
- data/db/migrate/20171026055530_add_position_to_next_sgad_goals.rb +5 -0
- data/db/migrate/20171026060110_add_position_to_next_sgad_employee.rb +5 -0
- data/db/migrate/20171026060351_copies_posiiton_id_to_employees.rb +9 -0
- data/db/migrate/20171026061315_remove_old_reference_columns.rb +8 -0
- data/db/migrate/20171026115447_add_description_to_next_sgad_goals.rb +6 -0
- data/db/migrate/20171026142240_add_position_to_next_sgad_employee_goals.rb +5 -0
- data/db/migrate/20171027210543_create_next_sgad_functions.rb +9 -0
- data/db/migrate/20171027210912_add_function_to_next_sgad_positions.rb +5 -0
- data/db/migrate/20171027213833_create_join_table_goal_position.rb +8 -0
- data/db/migrate/20171027221550_create_join_table_employee_position.rb +8 -0
- data/db/migrate/20171027223737_add_efective_to_next_sgad_positions.rb +5 -0
- data/db/migrate/20171027230032_remove_position_from_next_sgad_employee.rb +6 -0
- data/db/migrate/20171027230033_clear_data.rb +7 -0
- data/db/migrate/20171028061909_add_description_to_next_sgad_functions.rb +5 -0
- data/db/migrate/20171028140106_add_percentages_to_next_sagad_assessments.rb +6 -0
- data/db/migrate/20171029074321_rename_paygrade_and_level_from_employee.rb +7 -0
- data/db/migrate/20171029103212_add_email_to_next_sgad_employee.rb +5 -0
- data/db/migrate/20171029154047_add_coment_to_next_sgad_employee_goals.rb +6 -0
- data/db/migrate/20171029160044_add_amount_to_next_sgad_employee_goals.rb +5 -0
- data/db/migrate/20171101112232_change_self_assessment_from_next_sgad_employee_goals.rb +13 -0
- data/db/migrate/20171106113735_add_first_name_to_next_sgad_employees.rb +24 -0
- data/db/migrate/20171110103155_add_number_to_next_sgad_functions.rb +5 -0
- data/db/migrate/20171111081148_create_next_sgad_justifications.rb +9 -0
- data/db/migrate/20171111093506_create_next_sgad_attendances.rb +13 -0
- data/db/migrate/20171111093524_add_references_to_justifications_and_attendences.rb +10 -0
- data/db/migrate/20171111094154_create_join_table_attendance_justification.rb +8 -0
- data/db/migrate/20171111121753_create_next_sgad_results.rb +13 -0
- data/db/migrate/20171111121935_resolts_relationship.rb +9 -0
- data/db/migrate/20171112004221_add_attendance_percentage_to_next_sgad_assessment.rb +14 -0
- data/db/migrate/20171112121440_add_status_to_next_sgad_justifications.rb +7 -0
- data/db/migrate/20171112172436_add_department_to_attendances.rb +6 -0
- data/db/migrate/20171113125224_add_configuration_columns_to_nexts_sgad_assessment.rb +18 -0
- data/db/migrate/20171113143825_add_max_number_of_absences_for_five_to_next_sgad_assessments.rb +9 -0
- data/db/migrate/20171114135601_change_column_status_from_result.rb +6 -0
- data/db/migrate/20171115085324_create_next_sgad_activities.rb +10 -0
- data/db/migrate/20171115110522_add_column_nature_and_value_to_results.rb +7 -0
- data/db/migrate/20171115111821_remove_unused_columns.rb +19 -0
- data/db/migrate/20171115140048_corrects_status.rb +6 -0
- data/db/migrate/20171115160122_add_justification_status_to_next_sgad_attendances.rb +5 -0
- data/db/migrate/20171115161157_migrate_fill_justification_columns.rb +7 -0
- data/lib/concerns/models/employee.rb +25 -0
- data/lib/generators/initializer/USAGE +8 -0
- data/lib/generators/initializer/initializer_generator.rb +6 -0
- data/lib/generators/initializer/templates/initializer.rb +1 -0
- data/lib/generators/initializer_generator.rb +6 -0
- data/lib/generators/views/USAGE +8 -0
- data/lib/generators/views/views_generator.rb +3 -0
- data/lib/next_sgad/engine.rb +13 -0
- data/lib/next_sgad/version.rb +3 -0
- data/lib/next_sgad.rb +5 -0
- data/lib/tasks/next_sgad_tasks.rake +4 -0
- metadata +268 -0
@@ -0,0 +1,49 @@
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
2
|
+
|
3
|
+
<p>
|
4
|
+
<strong>Name:</strong>
|
5
|
+
<%= @goal.name %>
|
6
|
+
</p>
|
7
|
+
|
8
|
+
<p>
|
9
|
+
<strong>References:</strong>
|
10
|
+
<%= @goal.references %>
|
11
|
+
</p>
|
12
|
+
|
13
|
+
<p>
|
14
|
+
<strong>Goal type:</strong>
|
15
|
+
<%= @goal.goal_type %>
|
16
|
+
</p>
|
17
|
+
|
18
|
+
<p>
|
19
|
+
<strong>State:</strong>
|
20
|
+
<%= @goal.status %>
|
21
|
+
</p>
|
22
|
+
|
23
|
+
<p>
|
24
|
+
<strong>Nature:</strong>
|
25
|
+
<%= @goal.nature %>
|
26
|
+
</p>
|
27
|
+
|
28
|
+
<p>
|
29
|
+
<strong>Unit:</strong>
|
30
|
+
<%= @goal.unit %>
|
31
|
+
</p>
|
32
|
+
|
33
|
+
<p>
|
34
|
+
<strong>Target:</strong>
|
35
|
+
<%= @goal.target %>
|
36
|
+
</p>
|
37
|
+
|
38
|
+
<p>
|
39
|
+
<strong>Percentage on the type:</strong>
|
40
|
+
<%= @goal.percentage_on_the_type %>
|
41
|
+
</p>
|
42
|
+
|
43
|
+
<p>
|
44
|
+
<strong>Percentage:</strong>
|
45
|
+
<%= @goal.percentage %>
|
46
|
+
</p>
|
47
|
+
|
48
|
+
<%= link_to 'Edit', edit_goal_path(@goal) %> |
|
49
|
+
<%= link_to 'Back', goals_path %>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<%= form_with(model: justification, local: true) do |form| %>
|
2
|
+
<% if justification.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= pluralize(justification.errors.count, "error") %> prohibited this justification from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% justification.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 :documents %>
|
16
|
+
<%= form.text_field :documents, id: :justification_documents %>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="actions">
|
20
|
+
<%= form.submit %>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
2
|
+
|
3
|
+
<h1>Justifications</h1>
|
4
|
+
|
5
|
+
<table>
|
6
|
+
<thead>
|
7
|
+
<tr>
|
8
|
+
<th>Documents</th>
|
9
|
+
<th colspan="3"></th>
|
10
|
+
</tr>
|
11
|
+
</thead>
|
12
|
+
|
13
|
+
<tbody>
|
14
|
+
<% @justifications.each do |justification| %>
|
15
|
+
<tr>
|
16
|
+
<td><%= justification.documents %></td>
|
17
|
+
<td><%= link_to 'Show', justification %></td>
|
18
|
+
<td><%= link_to 'Edit', edit_justification_path(justification) %></td>
|
19
|
+
<td><%= link_to 'Destroy', justification, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
20
|
+
</tr>
|
21
|
+
<% end %>
|
22
|
+
</tbody>
|
23
|
+
</table>
|
24
|
+
|
25
|
+
<br>
|
26
|
+
|
27
|
+
<%= link_to 'New Justification', new_justification_path %>
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<%= form_with(model: position, local: true) do |form| %>
|
2
|
+
<% if position.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= pluralize(position.errors.count, "error") %> prohibited this position from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% position.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: :position_name %>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="field">
|
20
|
+
<%= form.label :description %>
|
21
|
+
<%= form.text_area :description, id: :position_description %>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div class="field">
|
25
|
+
<%= form.label :position_id %>
|
26
|
+
<%= form.select :position_id, options_for_select(NextSgad::Position.all.map{|v| [v.name, v.id]}) %>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div class="field">
|
30
|
+
<%= form.label :department_id %>
|
31
|
+
<%= form.select :department_id, options_for_select(NextSgad::Department.all.map{|v| [v.name, v.id]}) %>
|
32
|
+
</div>
|
33
|
+
|
34
|
+
<div class="field">
|
35
|
+
<%= form.label :employee_id %>
|
36
|
+
<%= form.select :employee_id, options_for_select(NextSgad::Employee.all.map{|v| [v.name, v.id]}) %>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="actions">
|
41
|
+
<%= form.submit %>
|
42
|
+
</div>
|
43
|
+
<% end %>
|
@@ -0,0 +1,94 @@
|
|
1
|
+
<!-- <div id="orgchart" data-orgchart-type="1"></div>
|
2
|
+
<div id="edit-panel" class="">
|
3
|
+
<span id="chart-state-panel" class="radio-panel">
|
4
|
+
<input type="radio" name="chart-state" id="rd-view" value="view" checked="true"><label for="rd-view">View</label>
|
5
|
+
<input type="radio" name="chart-state" id="rd-edit" value="edit"><label for="rd-edit">Edit</label>
|
6
|
+
</span>
|
7
|
+
<label class="selected-node-group">selected node:</label>
|
8
|
+
<input type="text" id="selected-node" class="selected-node-group">
|
9
|
+
<label>new node:</label>
|
10
|
+
<ul id="new-nodelist">
|
11
|
+
<li><input type="text" class="new-node"></li>
|
12
|
+
</ul>
|
13
|
+
<i class="fa fa-plus-circle btn-inputs" id="btn-add-input"></i>
|
14
|
+
<i class="fa fa-minus-circle btn-inputs" id="btn-remove-input"></i>
|
15
|
+
<span id="node-type-panel" class="radio-panel">
|
16
|
+
<input type="radio" name="node-type" id="rd-parent" value="parent"><label for="rd-parent">Parent(root)</label>
|
17
|
+
<input type="radio" name="node-type" id="rd-child" value="children"><label for="rd-child">Child</label>
|
18
|
+
<input type="radio" name="node-type" id="rd-sibling" value="siblings"><label for="rd-sibling">Sibling</label>
|
19
|
+
</span>
|
20
|
+
<button type="button" id="btn-add-nodes">Add</button>
|
21
|
+
<button type="button" id="btn-delete-nodes">Delete</button>
|
22
|
+
<button type="button" id="btn-reset">Reset</button>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<p id="notice"><%= notice %></p> -->
|
26
|
+
|
27
|
+
<h1>Positions</h1>
|
28
|
+
|
29
|
+
|
30
|
+
<table class="mdl-data-table mdl-js-data-table mdl-shadow--2dp">
|
31
|
+
<thead>
|
32
|
+
<tr>
|
33
|
+
<th class="mdl-data-table__cell--non-numeric">Posição</th>
|
34
|
+
<th class="mdl-data-table__cell--non-numeric">Empregado</th>
|
35
|
+
<th class="mdl-data-table__cell--non-numeric">Nível</th>
|
36
|
+
<th class="mdl-data-table__cell--non-numeric">Escalão</th>
|
37
|
+
</tr>
|
38
|
+
</thead>
|
39
|
+
<tbody>
|
40
|
+
<% @positions.each do |position| %>
|
41
|
+
<tr>
|
42
|
+
<td><%= position.name %></td>
|
43
|
+
<td><%= position.description %></td>
|
44
|
+
<td><%= position.next_sgad_position&.name %></td>
|
45
|
+
<td><%= position.department %></td>
|
46
|
+
<td><%= position.employee %></td>
|
47
|
+
<td><%= position.number %></td>
|
48
|
+
<td><%= link_to 'Show', position %></td>
|
49
|
+
<td><%= link_to 'Edit', edit_position_path(position) %></td>
|
50
|
+
<td><%= link_to 'Destroy', position, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
51
|
+
</tr>
|
52
|
+
<% end %>
|
53
|
+
<tr>
|
54
|
+
<td class="mdl-data-table__cell--non-numeric"></td>
|
55
|
+
<td></td>
|
56
|
+
<td></td>
|
57
|
+
</tr>
|
58
|
+
|
59
|
+
</tbody>
|
60
|
+
</table>
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
<table>
|
65
|
+
<thead>
|
66
|
+
<tr>
|
67
|
+
<th>Name</th>
|
68
|
+
<th>Description</th>
|
69
|
+
<th>Position</th>
|
70
|
+
<th>Department</th>
|
71
|
+
<th>Employee</th>
|
72
|
+
<th>Number</th>
|
73
|
+
<th colspan="3"></th>
|
74
|
+
</tr>
|
75
|
+
</thead>
|
76
|
+
|
77
|
+
<tbody>
|
78
|
+
<% @positions.each do |position| %>
|
79
|
+
<tr>
|
80
|
+
<td><%= position.name %></td>
|
81
|
+
<td><%= position.description %></td>
|
82
|
+
<td><%= position.next_sgad_position&.name %></td>
|
83
|
+
<td><%= position.department %></td>
|
84
|
+
<td><%= position.employee %></td>
|
85
|
+
<td><%= position.number %></td>
|
86
|
+
<td><%= link_to 'Show', position %></td>
|
87
|
+
<td><%= link_to 'Edit', edit_position_path(position) %></td>
|
88
|
+
<td><%= link_to 'Destroy', position, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
89
|
+
</tr>
|
90
|
+
<% end %>
|
91
|
+
</tbody>
|
92
|
+
</table>
|
93
|
+
|
94
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
<div id="orgchart" data-orgchart-type="1"></div>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
2
|
+
|
3
|
+
<p>
|
4
|
+
<strong>Name:</strong>
|
5
|
+
<%= @position.name %>
|
6
|
+
</p>
|
7
|
+
|
8
|
+
<p>
|
9
|
+
<strong>Description:</strong>
|
10
|
+
<%= @position.description %>
|
11
|
+
</p>
|
12
|
+
|
13
|
+
<p>
|
14
|
+
<strong>Position:</strong>
|
15
|
+
<%= @position.position_id %>
|
16
|
+
</p>
|
17
|
+
|
18
|
+
<p>
|
19
|
+
<strong>Department:</strong>
|
20
|
+
<%= @position.department %>
|
21
|
+
</p>
|
22
|
+
|
23
|
+
<p>
|
24
|
+
<strong>Employee:</strong>
|
25
|
+
<%= @position.employee %>
|
26
|
+
</p>
|
27
|
+
|
28
|
+
<p>
|
29
|
+
<strong>Number:</strong>
|
30
|
+
<%= @position.number %>
|
31
|
+
</p>
|
32
|
+
|
33
|
+
<%= link_to 'Edit', edit_position_path(@position) %> |
|
34
|
+
<%= link_to 'Back', positions_path %>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<%= form_with(model: result, local: true) do |form| %>
|
2
|
+
<% if result.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= pluralize(result.errors.count, "error") %> prohibited this result from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% result.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 :note %>
|
16
|
+
<%= form.text_field :note, id: :result_note %>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="field">
|
20
|
+
<%= form.label :attachment %>
|
21
|
+
<%= form.text_field :attachment, id: :result_attachment %>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div class="field">
|
25
|
+
<%= form.label :state %>
|
26
|
+
<%= form.number_field :state, id: :result_state %>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div class="field">
|
30
|
+
<%= form.label :result_type %>
|
31
|
+
<%= form.number_field :result_type, id: :result_result_type %>
|
32
|
+
</div>
|
33
|
+
|
34
|
+
<div class="actions">
|
35
|
+
<%= form.submit %>
|
36
|
+
</div>
|
37
|
+
<% end %>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
2
|
+
|
3
|
+
<h1>Results</h1>
|
4
|
+
|
5
|
+
<table>
|
6
|
+
<thead>
|
7
|
+
<tr>
|
8
|
+
<th>Note</th>
|
9
|
+
<th>Attachment</th>
|
10
|
+
<th>State</th>
|
11
|
+
<th>Result type</th>
|
12
|
+
<th colspan="3"></th>
|
13
|
+
</tr>
|
14
|
+
</thead>
|
15
|
+
|
16
|
+
<tbody>
|
17
|
+
<% @results.each do |result| %>
|
18
|
+
<tr>
|
19
|
+
<td><%= result.note %></td>
|
20
|
+
<td><%= result.attachment %></td>
|
21
|
+
<td><%= result.state %></td>
|
22
|
+
<td><%= result.result_type %></td>
|
23
|
+
<td><%= link_to 'Show', result %></td>
|
24
|
+
<td><%= link_to 'Edit', edit_result_path(result) %></td>
|
25
|
+
<td><%= link_to 'Destroy', result, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
26
|
+
</tr>
|
27
|
+
<% end %>
|
28
|
+
</tbody>
|
29
|
+
</table>
|
30
|
+
|
31
|
+
<br>
|
32
|
+
|
33
|
+
<%= link_to 'New Result', new_result_path %>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
2
|
+
|
3
|
+
<p>
|
4
|
+
<strong>Note:</strong>
|
5
|
+
<%= @result.note %>
|
6
|
+
</p>
|
7
|
+
|
8
|
+
<p>
|
9
|
+
<strong>Attachment:</strong>
|
10
|
+
<%= @result.attachment %>
|
11
|
+
</p>
|
12
|
+
|
13
|
+
<p>
|
14
|
+
<strong>State:</strong>
|
15
|
+
<%= @result.state %>
|
16
|
+
</p>
|
17
|
+
|
18
|
+
<p>
|
19
|
+
<strong>Result type:</strong>
|
20
|
+
<%= @result.result_type %>
|
21
|
+
</p>
|
22
|
+
|
23
|
+
<%= link_to 'Edit', edit_result_path(@result) %> |
|
24
|
+
<%= link_to 'Back', results_path %>
|
@@ -0,0 +1 @@
|
|
1
|
+
# Add initialization content here
|
@@ -0,0 +1 @@
|
|
1
|
+
# Add initialization content here
|
@@ -0,0 +1 @@
|
|
1
|
+
# Add initialization content here
|
@@ -0,0 +1 @@
|
|
1
|
+
# Add initialization content here
|
data/config/routes.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
NextSgad::Engine.routes.draw do
|
2
|
+
resources :activities
|
3
|
+
resources :results
|
4
|
+
resources :justifications
|
5
|
+
resources :attendances
|
6
|
+
resources :functions
|
7
|
+
resources :employee_goals
|
8
|
+
resources :goals
|
9
|
+
resources :assessments
|
10
|
+
resources :configurations
|
11
|
+
resources :positions
|
12
|
+
resources :employees
|
13
|
+
resources :departments
|
14
|
+
|
15
|
+
get 'positions/orgchart', 'positions#orgchart'
|
16
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class CreateNextSgadPositions < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
create_table :next_sgad_positions do |t|
|
4
|
+
t.string :name
|
5
|
+
t.text :description
|
6
|
+
t.string :number
|
7
|
+
t.references :next_sgad_department, foreign_key: true, index: true
|
8
|
+
t.references :next_sgad_employee, foreign_key: true, index: true
|
9
|
+
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,6 @@
|
|
1
|
+
class AddNextSgadDepartmentToDepartment < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
add_reference :next_sgad_departments, :next_sgad_department, foreign_key: true, index: true
|
4
|
+
add_reference :next_sgad_positions, :next_sgad_position, foreign_key: true, index: true
|
5
|
+
end
|
6
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class CreateNextSgadGoals < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
create_table :next_sgad_goals do |t|
|
4
|
+
t.string :name
|
5
|
+
t.integer :goal_type, default: 0, null: false
|
6
|
+
t.integer :state, default: 0, null: false
|
7
|
+
t.integer :nature, default: 0, null: false
|
8
|
+
t.integer :unit, default: 0, null: false
|
9
|
+
t.float :target, default: 0, null: false
|
10
|
+
t.float :percentage_on_the_type, default: 0, null: false
|
11
|
+
t.float :percentage, default: 0, null: false
|
12
|
+
|
13
|
+
t.timestamps
|
14
|
+
end
|
15
|
+
|
16
|
+
add_reference :next_sgad_goals, :assessment, foreign_key: {to_table: :next_sgad_assessments}, index: true
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateNextSgadEmployeeGoals < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
create_table :next_sgad_employee_goals do |t|
|
4
|
+
t.integer :self_assessment, default: 0, null: false
|
5
|
+
t.integer :supervisor_assessment, default: 0, null: false
|
6
|
+
t.integer :final_assessment, default: 0, null: false
|
7
|
+
t.integer :state, default: 0, null: false
|
8
|
+
t.float :percentage, default: 0, null: false
|
9
|
+
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
add_reference :next_sgad_employee_goals, :assessment, foreign_key: {to_table: :next_sgad_assessments}, index: true
|
13
|
+
add_reference :next_sgad_employee_goals, :goal, foreign_key: {to_table: :next_sgad_goals}, index: true
|
14
|
+
add_reference :next_sgad_employee_goals, :employee, foreign_key: {to_table: :next_sgad_employees}, index: true
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
class CorrectsReferences < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
add_reference :next_sgad_departments, :department, foreign_key: {to_table: :next_sgad_departments}, index: true
|
4
|
+
add_reference :next_sgad_positions, :position, foreign_key: {to_table: :next_sgad_positions}, index: true
|
5
|
+
add_reference :next_sgad_positions, :department, foreign_key: {to_table: :next_sgad_departments}, index: true
|
6
|
+
add_reference :next_sgad_positions, :employee, foreign_key: {to_table: :next_sgad_employees}, index: true
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
class CopiesInfoFromOldReferences < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
NextSgad::Department.all.each{|d| d.update_columns(department_id: d.next_sgad_department_id)}
|
4
|
+
NextSgad::Position.all.each{|d| d.update_columns(position_id: d.next_sgad_position_id)}
|
5
|
+
NextSgad::Position.all.each{|d| d.update_columns(department_id: d.next_sgad_department_id)}
|
6
|
+
NextSgad::Position.all.each{|d| d.update_columns(employee_id: d.next_sgad_employee_id)}
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
class AddGoalTypeToEmployeeGoals < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
add_column :next_sgad_employee_goals, :unit, :integer, default: 0, null: false
|
4
|
+
add_column :next_sgad_employee_goals, :goal_type, :integer, default: 0, null: false
|
5
|
+
add_column :next_sgad_employee_goals, :nature, :integer, default: 0, null: false
|
6
|
+
add_column :next_sgad_employee_goals, :target, :float, default: 0, null: false
|
7
|
+
end
|
8
|
+
end
|