rails_org 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +30 -0
- data/Rakefile +20 -0
- data/app/controllers/me/base_controller.rb +4 -0
- data/app/controllers/me/home_controller.rb +9 -0
- data/app/controllers/me_controller.rb +4 -0
- data/app/controllers/org/admin/authorized_tokens_controller.rb +48 -0
- data/app/controllers/org/admin/base_controller.rb +4 -0
- data/app/controllers/org/admin/current_organ_controller.rb +43 -0
- data/app/controllers/org/admin/department_grants_controller.rb +44 -0
- data/app/controllers/org/admin/departments_controller.rb +92 -0
- data/app/controllers/org/admin/home_controller.rb +8 -0
- data/app/controllers/org/admin/job_descriptions_controller.rb +49 -0
- data/app/controllers/org/admin/job_titles_controller.rb +69 -0
- data/app/controllers/org/admin/job_transfers_controller.rb +88 -0
- data/app/controllers/org/admin/member_departments_controller.rb +82 -0
- data/app/controllers/org/admin/members_controller.rb +129 -0
- data/app/controllers/org/admin/organ_domains_controller.rb +61 -0
- data/app/controllers/org/admin/organs_controller.rb +57 -0
- data/app/controllers/org/admin/resign_reasons_controller.rb +19 -0
- data/app/controllers/org/admin/resigns_controller.rb +103 -0
- data/app/controllers/org/admin/super_job_titles_controller.rb +70 -0
- data/app/controllers/org/admin/supports_controller.rb +93 -0
- data/app/controllers/org/admin/tutorials_controller.rb +74 -0
- data/app/controllers/org/base_controller.rb +4 -0
- data/app/controllers/org/board/base_controller.rb +4 -0
- data/app/controllers/org/board/members_controller.rb +61 -0
- data/app/controllers/org/board/organs_controller.rb +78 -0
- data/app/controllers/org/controller/application.rb +84 -0
- data/app/controllers/org/controller/me.rb +25 -0
- data/app/controllers/org/controller/our.rb +12 -0
- data/app/controllers/org/layout/me.rb +16 -0
- data/app/controllers/org/layout/panel.rb +16 -0
- data/app/controllers/org/me/base_controller.rb +4 -0
- data/app/controllers/org/me/departments_controller.rb +78 -0
- data/app/controllers/org/me/job_transfers_controller.rb +62 -0
- data/app/controllers/org/me/members_controller.rb +37 -0
- data/app/controllers/org/me/orders_controller.rb +66 -0
- data/app/controllers/org/me/resigns_controller.rb +53 -0
- data/app/controllers/org/me/tutorials_controller.rb +76 -0
- data/app/controllers/org/members_controller.rb +48 -0
- data/app/controllers/org/organs_controller.rb +30 -0
- data/app/controllers/org/panel/base_controller.rb +4 -0
- data/app/controllers/org/panel/organ_domains_controller.rb +5 -0
- data/app/controllers/org/panel/organs_controller.rb +40 -0
- data/app/mailers/org/attendance_mailer.rb +17 -0
- data/app/mailers/org/exam_mailer.rb +26 -0
- data/app/mailers/org/lesson_mailer.rb +15 -0
- data/app/mailers/org/lesson_member_mailer.rb +25 -0
- data/app/models/org/account.rb +8 -0
- data/app/models/org/application_record.rb +5 -0
- data/app/models/org/department.rb +6 -0
- data/app/models/org/department_grant.rb +5 -0
- data/app/models/org/department_hierarchy.rb +5 -0
- data/app/models/org/job_description.rb +5 -0
- data/app/models/org/job_title.rb +6 -0
- data/app/models/org/job_transfer.rb +5 -0
- data/app/models/org/member.rb +7 -0
- data/app/models/org/member_department.rb +6 -0
- data/app/models/org/model/account.rb +11 -0
- data/app/models/org/model/department.rb +67 -0
- data/app/models/org/model/department_grant.rb +13 -0
- data/app/models/org/model/department_hierarchy.rb +10 -0
- data/app/models/org/model/job_description.rb +18 -0
- data/app/models/org/model/job_title.rb +54 -0
- data/app/models/org/model/job_transfer.rb +108 -0
- data/app/models/org/model/member.rb +142 -0
- data/app/models/org/model/member_department.rb +66 -0
- data/app/models/org/model/organ.rb +62 -0
- data/app/models/org/model/organ_domain.rb +44 -0
- data/app/models/org/model/organ_handle.rb +15 -0
- data/app/models/org/model/resign.rb +66 -0
- data/app/models/org/model/resign_reason.rb +17 -0
- data/app/models/org/model/resign_reference.rb +11 -0
- data/app/models/org/model/super_job_title.rb +25 -0
- data/app/models/org/model/support.rb +19 -0
- data/app/models/org/model/tutorial.rb +64 -0
- data/app/models/org/model/user.rb +30 -0
- data/app/models/org/organ.rb +7 -0
- data/app/models/org/organ_domain.rb +5 -0
- data/app/models/org/organ_handle.rb +5 -0
- data/app/models/org/resign.rb +5 -0
- data/app/models/org/resign_reason.rb +5 -0
- data/app/models/org/resign_reference.rb +5 -0
- data/app/models/org/super_job_title.rb +6 -0
- data/app/models/org/support.rb +5 -0
- data/app/models/org/tutorial.rb +5 -0
- data/app/models/org.rb +11 -0
- data/app/views/admin/_department_navbar.html.erb +6 -0
- data/app/views/admin/_nav_show.erb +17 -0
- data/app/views/admin/_nav_with_login.html.erb +37 -0
- data/app/views/admin/_org_nav.html.erb +16 -0
- data/app/views/admin/_right_menu.html.erb +17 -0
- data/app/views/application/_org_navbar.html.erb +19 -0
- data/app/views/application/require_member.html.erb +4 -0
- data/app/views/application/require_member.js.erb +2 -0
- data/app/views/application/require_member.json.jbuilder +1 -0
- data/app/views/application/require_organ.html.erb +4 -0
- data/app/views/application/require_organ.js.erb +2 -0
- data/app/views/application/require_organ.json.jbuilder +1 -0
- data/app/views/layouts/me.html+phone.erb +12 -0
- data/app/views/layouts/me.html.erb +17 -0
- data/app/views/me/_nav_with_login.html.erb +3 -0
- data/app/views/me/_org_nav.html.erb +13 -0
- data/app/views/me/_right_menu.html.erb +23 -0
- data/app/views/me/home/index.html.erb +17 -0
- data/app/views/me/update.turbo_stream.erb +3 -0
- data/app/views/org/admin/authorized_tokens/_breadcrumb.html.erb +6 -0
- data/app/views/org/admin/authorized_tokens/_button.html.erb +0 -0
- data/app/views/org/admin/authorized_tokens/_edit_form.html.erb +4 -0
- data/app/views/org/admin/authorized_tokens/_filter_form.html.erb +9 -0
- data/app/views/org/admin/authorized_tokens/_form.html.erb +4 -0
- data/app/views/org/admin/authorized_tokens/_index_tbody.html.erb +18 -0
- data/app/views/org/admin/authorized_tokens/_index_thead.html.erb +6 -0
- data/app/views/org/admin/authorized_tokens/_new_form.html.erb +4 -0
- data/app/views/org/admin/authorized_tokens/_show_table.html.erb +20 -0
- data/app/views/org/admin/authorized_tokens/index.html.erb +3 -0
- data/app/views/org/admin/base/_nav.html.erb +3 -0
- data/app/views/org/admin/current_organ/_edit_form.html.erb +11 -0
- data/app/views/org/admin/current_organ/_edit_x_form.html.erb +5 -0
- data/app/views/org/admin/current_organ/_show_table.html.erb +16 -0
- data/app/views/org/admin/current_organ/show.html.erb +1 -0
- data/app/views/org/admin/department_grants/_add.html.erb +3 -0
- data/app/views/org/admin/department_grants/_index.html.erb +29 -0
- data/app/views/org/admin/department_grants/_new.html.erb +6 -0
- data/app/views/org/admin/department_grants/index.js.erb +7 -0
- data/app/views/org/admin/departments/_department.json.jbuilder +6 -0
- data/app/views/org/admin/departments/_department_form.html.erb +8 -0
- data/app/views/org/admin/departments/_department_support.html.erb +26 -0
- data/app/views/org/admin/departments/_edit_form.html.erb +4 -0
- data/app/views/org/admin/departments/_filter_form.html.erb +9 -0
- data/app/views/org/admin/departments/_filter_table.html.erb +11 -0
- data/app/views/org/admin/departments/_form.html.erb +23 -0
- data/app/views/org/admin/departments/_index_tbody.html.erb +29 -0
- data/app/views/org/admin/departments/_index_thead.html.erb +14 -0
- data/app/views/org/admin/departments/_index_tr.html.erb +23 -0
- data/app/views/org/admin/departments/_member.html.erb +28 -0
- data/app/views/org/admin/departments/_menu.html.erb +12 -0
- data/app/views/org/admin/departments/_new_form.html.erb +4 -0
- data/app/views/org/admin/departments/_show/_breadcrumb.html.erb +9 -0
- data/app/views/org/admin/departments/_show/_thead.html.erb +9 -0
- data/app/views/org/admin/departments/_show.json.jbuilder +1 -0
- data/app/views/org/admin/departments/index.html.erb +14 -0
- data/app/views/org/admin/departments/index.json.jbuilder +1 -0
- data/app/views/org/admin/departments/need.html.erb +12 -0
- data/app/views/org/admin/departments/show.html.erb +25 -0
- data/app/views/org/admin/departments/supports.html.erb +28 -0
- data/app/views/org/admin/home/index.html.erb +0 -0
- data/app/views/org/admin/job_descriptions/_edit_form.html.erb +4 -0
- data/app/views/org/admin/job_descriptions/_filter_form.html.erb +7 -0
- data/app/views/org/admin/job_descriptions/_form.html.erb +8 -0
- data/app/views/org/admin/job_descriptions/_index_tbody.html.erb +7 -0
- data/app/views/org/admin/job_descriptions/_index_thead.html.erb +8 -0
- data/app/views/org/admin/job_descriptions/_new_form.html.erb +4 -0
- data/app/views/org/admin/job_titles/_breadcrumb.html.erb +7 -0
- data/app/views/org/admin/job_titles/_edit_form.html.erb +4 -0
- data/app/views/org/admin/job_titles/_form.html.erb +3 -0
- data/app/views/org/admin/job_titles/_index_thead.html.erb +9 -0
- data/app/views/org/admin/job_titles/_job_titles.html.erb +49 -0
- data/app/views/org/admin/job_titles/_new_form.html.erb +4 -0
- data/app/views/org/admin/job_titles/_show_table.html.erb +12 -0
- data/app/views/org/admin/job_titles/_super_job_titles.html.erb +14 -0
- data/app/views/org/admin/job_titles/create_department.turbo_stream.erb +3 -0
- data/app/views/org/admin/job_titles/index.html.erb +4 -0
- data/app/views/org/admin/job_transfers/_edit_form.html.erb +4 -0
- data/app/views/org/admin/job_transfers/_filter_table.html.erb +11 -0
- data/app/views/org/admin/job_transfers/_form.html.erb +7 -0
- data/app/views/org/admin/job_transfers/_index_thead.html.erb +6 -0
- data/app/views/org/admin/job_transfers/_list.html.erb +29 -0
- data/app/views/org/admin/job_transfers/_new_form.html.erb +4 -0
- data/app/views/org/admin/job_transfers/index.html.erb +3 -0
- data/app/views/org/admin/job_transfers/my.html.erb +7 -0
- data/app/views/org/admin/job_transfers/show.html.erb +54 -0
- data/app/views/org/admin/member_departments/_edit_form.html.erb +3 -0
- data/app/views/org/admin/member_departments/_filter_form.html.erb +8 -0
- data/app/views/org/admin/member_departments/_form.html.erb +4 -0
- data/app/views/org/admin/member_departments/_job_title_options.html.erb +10 -0
- data/app/views/org/admin/member_departments/_new_form.html.erb +3 -0
- data/app/views/org/admin/member_departments/_organ_options.html.erb +1 -0
- data/app/views/org/admin/member_departments/_show_table.html.erb +20 -0
- data/app/views/org/admin/member_departments/_super_job_title_options.html.erb +10 -0
- data/app/views/org/admin/member_departments/index.html.erb +38 -0
- data/app/views/org/admin/member_departments/options.js.erb +4 -0
- data/app/views/org/admin/member_departments/show.html.erb +7 -0
- data/app/views/org/admin/members/_button.html.erb +6 -0
- data/app/views/org/admin/members/_edit/_breadcrumb.html.erb +12 -0
- data/app/views/org/admin/members/_edit_form.html.erb +4 -0
- data/app/views/org/admin/members/_edit_table.html.erb +3 -0
- data/app/views/org/admin/members/_filter_form.html.erb +10 -0
- data/app/views/org/admin/members/_filter_table.html.erb +9 -0
- data/app/views/org/admin/members/_form.html.erb +9 -0
- data/app/views/org/admin/members/_index_tbody.html.erb +24 -0
- data/app/views/org/admin/members/_index_thead.html.erb +7 -0
- data/app/views/org/admin/members/_index_tr.html.erb +22 -0
- data/app/views/org/admin/members/_item_field.html.erb +3 -0
- data/app/views/org/admin/members/_item_form.html.erb +27 -0
- data/app/views/org/admin/members/_member.json.jbuilder +5 -0
- data/app/views/org/admin/members/_menu.html.erb +11 -0
- data/app/views/org/admin/members/_new/_breadcrumb.html.erb +6 -0
- data/app/views/org/admin/members/_new_form.html.erb +4 -0
- data/app/views/org/admin/members/_outer_options.html.erb +4 -0
- data/app/views/org/admin/members/_profile/_show_table.html.erb +38 -0
- data/app/views/org/admin/members/_profile_form.html.erb +17 -0
- data/app/views/org/admin/members/_show/_breadcrumb.html.erb +6 -0
- data/app/views/org/admin/members/_show.json.jbuilder +1 -0
- data/app/views/org/admin/members/_show_table.html.erb +54 -0
- data/app/views/org/admin/members/edit_profile.html.erb +1 -0
- data/app/views/org/admin/members/index.html.erb +5 -0
- data/app/views/org/admin/members/index.json.jbuilder +1 -0
- data/app/views/org/admin/members/options.turbo_stream.erb +7 -0
- data/app/views/org/admin/members/profile.html.erb +16 -0
- data/app/views/org/admin/members/super_options.js.erb +15 -0
- data/app/views/org/admin/organ_domains/_breadcrumb.html.erb +6 -0
- data/app/views/org/admin/organ_domains/_edit_form.html.erb +4 -0
- data/app/views/org/admin/organ_domains/_filter_form.html.erb +9 -0
- data/app/views/org/admin/organ_domains/_form.html.erb +5 -0
- data/app/views/org/admin/organ_domains/_index_tbody.html.erb +12 -0
- data/app/views/org/admin/organ_domains/_index_thead.html.erb +8 -0
- data/app/views/org/admin/organ_domains/_new_form.html.erb +4 -0
- data/app/views/org/admin/organ_domains/_show_table.html.erb +20 -0
- data/app/views/org/admin/organ_domains/index.html.erb +5 -0
- data/app/views/org/admin/organs/_edit_form.html.erb +6 -0
- data/app/views/org/admin/organs/_filter_form.html.erb +9 -0
- data/app/views/org/admin/organs/_form.html.erb +6 -0
- data/app/views/org/admin/organs/_index_tbody.html.erb +17 -0
- data/app/views/org/admin/organs/_index_thead.html.erb +9 -0
- data/app/views/org/admin/organs/_index_tr.html.erb +22 -0
- data/app/views/org/admin/organs/_new_form.html.erb +8 -0
- data/app/views/org/admin/organs/_organ.json.jbuilder +7 -0
- data/app/views/org/admin/organs/_show.json.jbuilder +1 -0
- data/app/views/org/admin/organs/_show_table.html.erb +16 -0
- data/app/views/org/admin/organs/index.html.erb +4 -0
- data/app/views/org/admin/organs/index.json.jbuilder +1 -0
- data/app/views/org/admin/organs/show.json.jbuilder +1 -0
- data/app/views/org/admin/resign_reasons/_edit_form.html.erb +4 -0
- data/app/views/org/admin/resign_reasons/_filter_form.html.erb +7 -0
- data/app/views/org/admin/resign_reasons/_form.html.erb +3 -0
- data/app/views/org/admin/resign_reasons/_new_form.html.erb +4 -0
- data/app/views/org/admin/resign_reasons/_resign_reason.html.erb +13 -0
- data/app/views/org/admin/resign_reasons/index.html.erb +30 -0
- data/app/views/org/admin/resigns/_edit_form.html.erb +4 -0
- data/app/views/org/admin/resigns/_form.html.erb +6 -0
- data/app/views/org/admin/resigns/_index_tbody.html.erb +23 -0
- data/app/views/org/admin/resigns/_index_thead.html.erb +6 -0
- data/app/views/org/admin/resigns/_new_form.html.erb +4 -0
- data/app/views/org/admin/resigns/_search_chart1_form.html.erb +9 -0
- data/app/views/org/admin/resigns/_search_chart2_form.html.erb +8 -0
- data/app/views/org/admin/resigns/_search_form.html.erb +8 -0
- data/app/views/org/admin/resigns/charts.html.erb +19 -0
- data/app/views/org/admin/resigns/index.html.erb +1 -0
- data/app/views/org/admin/resigns/my.html.erb +1 -0
- data/app/views/org/admin/resigns/show.html.erb +47 -0
- data/app/views/org/admin/super_job_titles/_breadcrumb.html.erb +6 -0
- data/app/views/org/admin/super_job_titles/_edit_form.html.erb +4 -0
- data/app/views/org/admin/super_job_titles/_filter_form.html.erb +9 -0
- data/app/views/org/admin/super_job_titles/_form.html.erb +3 -0
- data/app/views/org/admin/super_job_titles/_index_tbody.html.erb +13 -0
- data/app/views/org/admin/super_job_titles/_index_thead.html.erb +6 -0
- data/app/views/org/admin/super_job_titles/_new_form.html.erb +4 -0
- data/app/views/org/admin/super_job_titles/_show_table.html.erb +12 -0
- data/app/views/org/admin/super_job_titles/index.html.erb +5 -0
- data/app/views/org/admin/supports/_edit_form.html.erb +4 -0
- data/app/views/org/admin/supports/_filter_form.html.erb +8 -0
- data/app/views/org/admin/supports/_form.html.erb +6 -0
- data/app/views/org/admin/supports/_index_tbody.html.erb +5 -0
- data/app/views/org/admin/supports/_index_thead.html.erb +6 -0
- data/app/views/org/admin/supports/_new_form.html.erb +4 -0
- data/app/views/org/admin/supports/index.html.erb +5 -0
- data/app/views/org/admin/tutorials/_edit_form.html.erb +4 -0
- data/app/views/org/admin/tutorials/_filter_form.html.erb +9 -0
- data/app/views/org/admin/tutorials/_form.html.erb +5 -0
- data/app/views/org/admin/tutorials/_index_tbody.html.erb +19 -0
- data/app/views/org/admin/tutorials/_index_thead.html.erb +15 -0
- data/app/views/org/admin/tutorials/_new_form.html.erb +8 -0
- data/app/views/org/admin/tutorials/index.html.erb +5 -0
- data/app/views/org/admin/tutorials/my.html.erb +5 -0
- data/app/views/org/board/base/_nav.html.erb +4 -0
- data/app/views/org/board/members/_form.html+phone.erb +29 -0
- data/app/views/org/board/members/_form.html.erb +4 -0
- data/app/views/org/board/members/_member.json.jbuilder +11 -0
- data/app/views/org/board/members/_new_form.html+phone.erb +4 -0
- data/app/views/org/board/members/_new_form.html.erb +4 -0
- data/app/views/org/board/members/index.html+phone.erb +40 -0
- data/app/views/org/board/members/index.html.erb +28 -0
- data/app/views/org/board/members/index.json.jbuilder +1 -0
- data/app/views/org/board/members/login.json.jbuilder +1 -0
- data/app/views/org/board/organs/_form.html.erb +4 -0
- data/app/views/org/board/organs/_new_form.html.erb +4 -0
- data/app/views/org/board/organs/create.turbo_stream.erb +3 -0
- data/app/views/org/board/organs/index.html+phone.erb +9 -0
- data/app/views/org/board/organs/index.html.erb +41 -0
- data/app/views/org/board/organs/showx.html.erb +1 -0
- data/app/views/org/me/base/_nav.html.erb +3 -0
- data/app/views/org/me/departments/_breadcrumb.html.erb +5 -0
- data/app/views/org/me/departments/_department.html.erb +31 -0
- data/app/views/org/me/departments/_filter_form.html.erb +9 -0
- data/app/views/org/me/departments/_index_thead.html.erb +5 -0
- data/app/views/org/me/departments/_index_tr.html.erb +10 -0
- data/app/views/org/me/departments/_member.html.erb +11 -0
- data/app/views/org/me/departments/_nav_show.erb +16 -0
- data/app/views/org/me/departments/index.html.erb +11 -0
- data/app/views/org/me/departments/index2.html.erb +46 -0
- data/app/views/org/me/home/index.html.erb +8 -0
- data/app/views/org/me/job_transfers/_form.html.erb +8 -0
- data/app/views/org/me/job_transfers/_index_tbody.html.erb +7 -0
- data/app/views/org/me/job_transfers/_index_thead.html.erb +6 -0
- data/app/views/org/me/job_transfers/_tabs.html.erb +9 -0
- data/app/views/org/me/job_transfers/index.html.erb +25 -0
- data/app/views/org/me/members/_badges.html.erb +13 -0
- data/app/views/org/me/members/_edit.html+phone.erb +10 -0
- data/app/views/org/me/members/_edit_form.html.erb +6 -0
- data/app/views/org/me/members/_member.json.jbuilder +6 -0
- data/app/views/org/me/members/_show.json.jbuilder +1 -0
- data/app/views/org/me/members/_show_table.html.erb +24 -0
- data/app/views/org/me/members/index.json.jbuilder +1 -0
- data/app/views/org/me/members/show.json.jbuilder +1 -0
- data/app/views/org/me/orders/_search_form.html.erb +7 -0
- data/app/views/org/me/orders/dinners.html.erb +32 -0
- data/app/views/org/me/orders/new.html.erb +5 -0
- data/app/views/org/me/orders/show.html.erb +0 -0
- data/app/views/org/me/resigns/_form.html.erb +12 -0
- data/app/views/org/me/resigns/_tabs.html.erb +4 -0
- data/app/views/org/me/resigns/show.html.erb +45 -0
- data/app/views/org/me/tutorials/_form.html.erb +6 -0
- data/app/views/org/me/tutorials/_menu.html.erb +11 -0
- data/app/views/org/me/tutorials/_search_form.html.erb +7 -0
- data/app/views/org/me/tutorials/index.html.erb +35 -0
- data/app/views/org/me/tutorials/perform.html.erb +21 -0
- data/app/views/org/me/tutorials/tutorings.html.erb +40 -0
- data/app/views/org/members/_filter_form.html.erb +9 -0
- data/app/views/org/members/_filter_table.html.erb +11 -0
- data/app/views/org/members/groups.json.jbuilder +5 -0
- data/app/views/org/members/index.html.erb +24 -0
- data/app/views/org/members/journals.json.jbuilder +9 -0
- data/app/views/org/members/people.json.jbuilder +14 -0
- data/app/views/org/members/sections.json.jbuilder +5 -0
- data/app/views/org/members/show.html+phone.erb +23 -0
- data/app/views/org/members/show.html.erb +39 -0
- data/app/views/org/organs/_form_search.html.erb +11 -0
- data/app/views/org/organs/form_search.js.erb +1 -0
- data/app/views/org/organs/index.html+phone.erb +20 -0
- data/app/views/org/organs/index.html.erb +18 -0
- data/app/views/org/organs/show.html.erb +0 -0
- data/app/views/org/panel/base/_nav.html.erb +3 -0
- data/app/views/org/panel/organs/_edit_form.html.erb +6 -0
- data/app/views/org/panel/organs/_filter_form.html.erb +9 -0
- data/app/views/org/panel/organs/_form.html.erb +5 -0
- data/app/views/org/panel/organs/_index_tbody.html.erb +28 -0
- data/app/views/org/panel/organs/_index_thead.html.erb +12 -0
- data/app/views/org/panel/organs/_index_tr.html.erb +19 -0
- data/app/views/org/panel/organs/_new_form.html.erb +6 -0
- data/app/views/org/panel/organs/_show_table.html.erb +16 -0
- data/app/views/org/panel/organs/index.html.erb +5 -0
- data/app/views/our/_nav_bar.html.erb +18 -0
- data/app/views/our/_nav_choosex.html.erb +23 -0
- data/app/views/panel/_org_nav.html.erb +10 -0
- data/config/locales/en.attributes.yml +37 -0
- data/config/locales/en.controller.yml +113 -0
- data/config/locales/en.enum.yml +31 -0
- data/config/locales/zh.attributes.yml +89 -0
- data/config/locales/zh.controller.yml +116 -0
- data/config/locales/zh.enum.yml +31 -0
- data/config/locales/zh.help.yml +7 -0
- data/config/routes.rb +152 -0
- data/lib/rails_org/config.rb +13 -0
- data/lib/rails_org/default_form.rb +17 -0
- data/lib/rails_org/engine.rb +19 -0
- data/lib/rails_org.rb +3 -0
- data/test/application_system_test_case.rb +5 -0
- data/test/controllers/department_journals_controller_test.rb +48 -0
- data/test/controllers/job_transfers_controller_test.rb +48 -0
- data/test/controllers/journal_transfers_controller_test.rb +48 -0
- data/test/controllers/org/admin/authorized_tokens_controller_test.rb +49 -0
- data/test/controllers/org/admin/department_grants_controller_test.rb +48 -0
- data/test/controllers/org/admin/departments_controller_test.rb +51 -0
- data/test/controllers/org/admin/job_descriptions_controller_test.rb +48 -0
- data/test/controllers/org/admin/job_titles_controller_test.rb +51 -0
- data/test/controllers/org/admin/member_departments_controller_test.rb +48 -0
- data/test/controllers/org/admin/organ_domains_controller_test.rb +49 -0
- data/test/controllers/org/admin/organ_handles_controller_test.rb +48 -0
- data/test/controllers/org/admin/organ_tokens_controller_test.rb +48 -0
- data/test/controllers/org/admin/super_job_titles_controller_test.rb +51 -0
- data/test/controllers/org/mine/members_controller_test.rb +49 -0
- data/test/controllers/resign_reasons_controller_test.rb +48 -0
- data/test/controllers/resigns_controller_test.rb +48 -0
- data/test/controllers/tutorials_controller_test.rb +48 -0
- data/test/dummy/Gemfile +59 -0
- data/test/dummy/Gemfile.lock +379 -0
- data/test/dummy/README.md +12 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/images/default_avatar.jpg +0 -0
- data/test/dummy/app/assets/images/logo.png +0 -0
- data/test/dummy/app/assets/javascripts/admin/application.js +1 -0
- data/test/dummy/app/assets/javascripts/application.js +11 -0
- data/test/dummy/app/assets/javascripts/phone.js +5 -0
- data/test/dummy/app/assets/stylesheets/css.scss +4 -0
- data/test/dummy/app/channels/application_cable/channel.rb +4 -0
- data/test/dummy/app/channels/application_cable/connection.rb +4 -0
- data/test/dummy/app/controllers/active_storage/base_controller.rb +19 -0
- data/test/dummy/app/controllers/admin_controller.rb +3 -0
- data/test/dummy/app/controllers/application_controller.rb +12 -0
- data/test/dummy/app/controllers/home_controller.rb +6 -0
- data/test/dummy/app/controllers/me_controller.rb +4 -0
- data/test/dummy/app/controllers/my_controller.rb +4 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/jobs/application_job.rb +2 -0
- data/test/dummy/app/mailers/application_mailer.rb +4 -0
- data/test/dummy/app/models/auth/user.rb +7 -0
- data/test/dummy/app/views/home/index.css +3 -0
- data/test/dummy/app/views/home/index.html.erb +0 -0
- data/test/dummy/app/views/layouts/_right_menu.html.erb +3 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +34 -0
- data/test/dummy/bin/vite +19 -0
- data/test/dummy/bin/yarn +11 -0
- data/test/dummy/config/application.rb +20 -0
- data/test/dummy/config/boot.rb +9 -0
- data/test/dummy/config/cable.yml +9 -0
- data/test/dummy/config/credentials/development.key +1 -0
- data/test/dummy/config/credentials/test.key +1 -0
- data/test/dummy/config/credentials.yml.enc +1 -0
- data/test/dummy/config/database.yml +16 -0
- data/test/dummy/config/environment.rb +3 -0
- data/test/dummy/config/environments/development.rb +41 -0
- data/test/dummy/config/environments/production.rb +74 -0
- data/test/dummy/config/environments/test.rb +47 -0
- data/test/dummy/config/initializers/application_controller_renderer.rb +6 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +0 -0
- data/test/dummy/config/initializers/new_framework_defaults.rb +14 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +2 -0
- data/test/dummy/config/master.key +1 -0
- data/test/dummy/config/puma.rb +34 -0
- data/test/dummy/config/routes.rb +14 -0
- data/test/dummy/config/spring.rb +6 -0
- data/test/dummy/config/storage.yml +11 -0
- data/test/dummy/config/vite/base.js +7 -0
- data/test/dummy/config/vite/development.js +6 -0
- data/test/dummy/config/vite/production.js +6 -0
- data/test/dummy/config.ru +7 -0
- data/test/dummy/lib/deploy.rb +115 -0
- data/test/dummy/package.json +27 -0
- data/test/dummy/postcss.config.js +11 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/test/dummy/public/apple-touch-icon.png +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/yarn.lock +2147 -0
- data/test/factories/attendance_logs.rb +5 -0
- data/test/factories/badges.rb +5 -0
- data/test/factories/bands.rb +5 -0
- data/test/factories/department_grants.rb +8 -0
- data/test/factories/department_journals.rb +5 -0
- data/test/factories/departments.rb +12 -0
- data/test/factories/job_descriptions.rb +5 -0
- data/test/factories/job_titles.rb +9 -0
- data/test/factories/job_transfers.rb +5 -0
- data/test/factories/resigns.rb +5 -0
- data/test/factories/super_job_titles.rb +8 -0
- data/test/factories/tutorials.rb +5 -0
- data/test/mailers/previews/the_notify_mailer_preview.rb +9 -0
- data/test/models/department_test.rb +7 -0
- data/test/models/job_description_test.rb +7 -0
- data/test/models/job_title/department_job_title_test.rb +1 -0
- data/test/models/job_title/super_job_title_test.rb +1 -0
- data/test/models/job_title_test.rb +10 -0
- data/test/models/job_transfer_test.rb +7 -0
- data/test/models/resign_test.rb +7 -0
- data/test/models/teacher_test.rb +7 -0
- data/test/models/tutorial_test.rb +7 -0
- data/test/system/org/admin/authorized_tokens_test.rb +51 -0
- data/test/system/org/admin/organ_domains_test.rb +51 -0
- data/test/system/org/mine/members_test.rb +41 -0
- data/test/test_helper.rb +14 -0
- metadata +654 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: eac8268ea8915c390482a83646727bb79b8f68794e8bbfc2e97c31d92b982745
|
4
|
+
data.tar.gz: e04f72c44521dc53b3d8810f204a799c73b73505918213f1837af9e2e6a3c8d3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fe255c824c8909cdbc5f645b88121949345f46788810697114dd6b823a5f5bfdfc5ac4fba4bff37a767e9dfe13007b9e4a7e7ccb0e0d9d494bfb54717501a1d3
|
7
|
+
data.tar.gz: 3c33c8793c5105a026c9d8f344913c170a7e1eb3270e7e02394eba76c3836debe228ac39546923a7036401dab1dc213b15df20c056515842fa649512e73821b9
|
data/README.md
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# RailsOrg
|
2
|
+
|
3
|
+
[![测试](https://github.com/work-design/rails_org/actions/workflows/test.yml/badge.svg)](https://github.com/work-design/rails_org/actions/workflows/test.yml)
|
4
|
+
[![Docker构建](https://github.com/work-design/rails_org/actions/workflows/cd.yml/badge.svg)](https://github.com/work-design/rails_org/actions/workflows/cd.yml)
|
5
|
+
[![Gem](https://github.com/work-design/rails_org/actions/workflows/gempush.yml/badge.svg)](https://github.com/work-design/rails_org/actions/workflows/gempush.yml)
|
6
|
+
|
7
|
+
组织架构管理
|
8
|
+
|
9
|
+
## 概述
|
10
|
+
|
11
|
+
* 用于 `SaaS` 多租户
|
12
|
+
* 非常经典的OA部门管理模型设计;
|
13
|
+
|
14
|
+
## 命名空间规则
|
15
|
+
平台级:不支持 organ_id 字段
|
16
|
+
* panel: 后端,平台级功能
|
17
|
+
* board: 前端,平台级功能,支持 user_id,不包含 organ_id
|
18
|
+
|
19
|
+
组织型功能:organ_id 字段;
|
20
|
+
* admin: 后端,支持 organ,也可不采用 organ_id 字段
|
21
|
+
- 必须
|
22
|
+
* me: 前端,与 current_member 相关的功能
|
23
|
+
- 信息
|
24
|
+
|
25
|
+
商店型:支持 organ_id 字段;
|
26
|
+
* my: 用户端,支持 user_id + organ_id
|
27
|
+
|
28
|
+
|
29
|
+
## 许可证
|
30
|
+
遵循 [MIT](https://opensource.org/licenses/MIT) 协议
|
data/Rakefile
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'bundler/setup'
|
2
|
+
require 'sdoc'
|
3
|
+
require 'rdoc/task'
|
4
|
+
|
5
|
+
RDoc::Task.new(:sdoc) do |rdoc|
|
6
|
+
rdoc.rdoc_dir = 'docs'
|
7
|
+
rdoc.title = 'RailsAuth'
|
8
|
+
rdoc.options << '--format=sdoc'
|
9
|
+
rdoc.options << '-g'
|
10
|
+
rdoc.template = 'rails'
|
11
|
+
rdoc.rdoc_files.include('README.md')
|
12
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
13
|
+
rdoc.rdoc_files.include('app/models/**/*.rb')
|
14
|
+
end
|
15
|
+
|
16
|
+
APP_RAKEFILE = File.expand_path('test/dummy/Rakefile', __dir__)
|
17
|
+
load 'rails/tasks/engine.rake'
|
18
|
+
|
19
|
+
|
20
|
+
Bundler::GemHelper.install_tasks
|
@@ -0,0 +1,9 @@
|
|
1
|
+
module Me
|
2
|
+
class HomeController < BaseController
|
3
|
+
|
4
|
+
def index
|
5
|
+
@meta_businesses = current_organ.landmark_rules.joins(:meta_business).includes(:meta_business).where(namespace_identifier: 'admin').unscope(:order).order('com_meta_businesses.position': :asc).group_by(&:meta_business)
|
6
|
+
end
|
7
|
+
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module Org
|
2
|
+
class Admin::AuthorizedTokensController < Admin::BaseController
|
3
|
+
before_action :set_member
|
4
|
+
before_action :set_authorized_token, only: [:show, :edit, :update, :destroy]
|
5
|
+
|
6
|
+
def index
|
7
|
+
@authorized_tokens = @member.authorized_tokens
|
8
|
+
end
|
9
|
+
|
10
|
+
def show
|
11
|
+
end
|
12
|
+
|
13
|
+
def edit
|
14
|
+
end
|
15
|
+
|
16
|
+
def update
|
17
|
+
@authorized_token.assign_attributes(authorized_token_params)
|
18
|
+
|
19
|
+
unless @authorized_token.save
|
20
|
+
render :edit, locals: { model: @authorized_token }, status: :unprocessable_entity
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def destroy
|
25
|
+
@authorized_token.destroy
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
def set_member
|
30
|
+
@member = Member.find params[:member_id]
|
31
|
+
end
|
32
|
+
|
33
|
+
def set_authorized_token
|
34
|
+
@authorized_token = AuthorizedToken.find(params[:id])
|
35
|
+
end
|
36
|
+
|
37
|
+
def authorized_token_params
|
38
|
+
params.fetch(:authorized_token, {}).permit(
|
39
|
+
:user_id,
|
40
|
+
:oauth_user_id,
|
41
|
+
:token,
|
42
|
+
:expire_at,
|
43
|
+
:mock_member
|
44
|
+
)
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module Org
|
2
|
+
class Admin::CurrentOrganController < Admin::BaseController
|
3
|
+
|
4
|
+
def show
|
5
|
+
end
|
6
|
+
|
7
|
+
def edit
|
8
|
+
end
|
9
|
+
|
10
|
+
def update
|
11
|
+
current_organ.assign_attributes(organ_params)
|
12
|
+
|
13
|
+
if current_organ.save
|
14
|
+
render 'update'
|
15
|
+
else
|
16
|
+
render :edit
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def destroy
|
21
|
+
current_organ.destroy
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
def organ_params
|
26
|
+
params.fetch(:organ, {}).permit(
|
27
|
+
:name,
|
28
|
+
:logo,
|
29
|
+
:name_short,
|
30
|
+
:parent_ancestors,
|
31
|
+
:area_ancestors
|
32
|
+
)
|
33
|
+
end
|
34
|
+
|
35
|
+
def organ_limit_params
|
36
|
+
params.fetch(:organ, {}).permit(
|
37
|
+
:limit_office,
|
38
|
+
:limit_wechat
|
39
|
+
)
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Org
|
2
|
+
class Admin::DepartmentGrantsController < Admin::BaseController
|
3
|
+
before_action :set_organ_handle
|
4
|
+
before_action :set_department_grant, only: [:destroy]
|
5
|
+
|
6
|
+
def index
|
7
|
+
end
|
8
|
+
|
9
|
+
def new
|
10
|
+
@department_grant = @organ_handle.department_grants.build
|
11
|
+
end
|
12
|
+
|
13
|
+
def create
|
14
|
+
@department_grant = @organ_handle.department_grants.build(department_grant_params)
|
15
|
+
|
16
|
+
unless @department_grant.save
|
17
|
+
render :new, locals: { model: @department_grant }, status: :unprocessable_entity
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def destroy
|
22
|
+
@department_grant.destroy
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
def set_organ_handle
|
27
|
+
@organ_handle = OrganHandle.find_or_create_by(record_class: params[:record_class], record_column: params[:record_column])
|
28
|
+
end
|
29
|
+
|
30
|
+
def set_department_grant
|
31
|
+
@department_grant = @organ_handle.department_grants.default_where(default_params).find(params[:id])
|
32
|
+
end
|
33
|
+
|
34
|
+
def department_grant_params
|
35
|
+
p = params.fetch(:department_grant, {}).permit(
|
36
|
+
:organ_handle_id,
|
37
|
+
:department_id,
|
38
|
+
:job_title_id
|
39
|
+
)
|
40
|
+
p.merge! default_form_params
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
module Org
|
2
|
+
class Admin::DepartmentsController < Admin::BaseController
|
3
|
+
before_action :set_department, only: [:show, :edit, :need, :update, :destroy]
|
4
|
+
before_action :prepare_form, only: [:new, :create, :edit, :update]
|
5
|
+
|
6
|
+
def index
|
7
|
+
q_params = {}
|
8
|
+
q_params.merge! default_params
|
9
|
+
q_params.merge! params.permit(:type, :name)
|
10
|
+
|
11
|
+
@departments = Department.default_where(q_params).roots.includes(:children, :leader, :inferiors).order(name: :asc).page(params[:page])
|
12
|
+
end
|
13
|
+
|
14
|
+
def supports
|
15
|
+
default_params.merge! params.permit(:type)
|
16
|
+
@departments = Department.roots.default_where(default_params).includes(:children, :leader).page(params[:page])
|
17
|
+
end
|
18
|
+
|
19
|
+
def filter
|
20
|
+
q_params = {}
|
21
|
+
q_params.merge! params.permit!
|
22
|
+
|
23
|
+
if params[:department_id].present?
|
24
|
+
@departments = Department.where(parent_id: params[:department_id])
|
25
|
+
else
|
26
|
+
@departments = Department.none
|
27
|
+
end
|
28
|
+
@department = @departments.first
|
29
|
+
end
|
30
|
+
|
31
|
+
def search
|
32
|
+
if params[:q].present?
|
33
|
+
@departments = Department.default_where('name-like': params[:q])
|
34
|
+
else
|
35
|
+
@departments = Department.none
|
36
|
+
end
|
37
|
+
|
38
|
+
results = []
|
39
|
+
@departments.each do |department|
|
40
|
+
results << { name: department.name, id: department.id }
|
41
|
+
end
|
42
|
+
render json: { results: results }
|
43
|
+
end
|
44
|
+
|
45
|
+
def show
|
46
|
+
q_params = {
|
47
|
+
enabled: true
|
48
|
+
}
|
49
|
+
q_params.merge! params.permit(:enabled)
|
50
|
+
@members = @department.all_members.includes(:member_departments).default_where(q_params).page(params[:page])
|
51
|
+
end
|
52
|
+
|
53
|
+
def new
|
54
|
+
@department = Department.new(parent_id: params[:parent_id])
|
55
|
+
end
|
56
|
+
|
57
|
+
def need
|
58
|
+
end
|
59
|
+
|
60
|
+
private
|
61
|
+
def set_department
|
62
|
+
@department = Department.find(params[:id])
|
63
|
+
end
|
64
|
+
|
65
|
+
def prepare_form
|
66
|
+
if current_organ
|
67
|
+
if params[:parent_id].blank? && current_organ.parent
|
68
|
+
@root = current_organ.parent.departments.root
|
69
|
+
else
|
70
|
+
@root = current_organ.departments.root
|
71
|
+
end
|
72
|
+
else
|
73
|
+
Department.where(organ_id: nil).root
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
def department_params
|
78
|
+
q = params.fetch(:department, {}).permit(
|
79
|
+
:name,
|
80
|
+
:needed_number,
|
81
|
+
:logo,
|
82
|
+
:organ_id,
|
83
|
+
:superior_id,
|
84
|
+
:parent_id,
|
85
|
+
:parent_ancestors,
|
86
|
+
:superior_ancestors
|
87
|
+
)
|
88
|
+
q.merge! default_form_params
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module Org
|
2
|
+
class Admin::JobDescriptionsController < Admin::BaseController
|
3
|
+
before_action :set_department
|
4
|
+
before_action :set_job_description, only: [:show, :edit, :update, :destroy]
|
5
|
+
|
6
|
+
def index
|
7
|
+
@job_descriptions = @department.job_descriptions
|
8
|
+
end
|
9
|
+
|
10
|
+
def new
|
11
|
+
@job_description = @department.job_descriptions.build
|
12
|
+
end
|
13
|
+
|
14
|
+
def create
|
15
|
+
@job_description = @department.job_descriptions.build(job_description_params)
|
16
|
+
|
17
|
+
unless @job_description.save
|
18
|
+
render :new, locals: { model: @job_description }, status: :unprocessable_entity
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
def set_department
|
24
|
+
@department = Department.find params[:department_id]
|
25
|
+
if @department.leaf? && !@department.root?
|
26
|
+
@department_parent = @department.parent
|
27
|
+
else
|
28
|
+
@department_parent = @department
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def set_job_description
|
33
|
+
@job_description = JobDescription.find(params[:id])
|
34
|
+
end
|
35
|
+
|
36
|
+
def job_description_params
|
37
|
+
params.fetch(:job_description, {}).permit(
|
38
|
+
:salary_min,
|
39
|
+
:salary_max,
|
40
|
+
:duties,
|
41
|
+
:requirements,
|
42
|
+
:advanced_requirements,
|
43
|
+
:engine_requirement,
|
44
|
+
:degree_requirement
|
45
|
+
)
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
module Org
|
2
|
+
class Admin::JobTitlesController < Admin::BaseController
|
3
|
+
before_action :set_department
|
4
|
+
before_action :set_job_title, only: [:show, :edit, :update, :move_higher, :move_lower, :reorder, :destroy]
|
5
|
+
|
6
|
+
def index
|
7
|
+
q_params = {
|
8
|
+
department_root_id: @department.root.id
|
9
|
+
}
|
10
|
+
q_params.merge! default_params
|
11
|
+
q_params.merge! params.permit(:name)
|
12
|
+
|
13
|
+
@job_titles = JobTitle.default_where(q_params)
|
14
|
+
@selected_job_title_ids = JobTitle.where.not(super_job_title_id: nil).where(department_root_id: @department.root.id).pluck(:super_job_title_id)
|
15
|
+
@super_job_titles = SuperJobTitle.default_where(default_params).where.not(id: @selected_job_title_ids)
|
16
|
+
end
|
17
|
+
|
18
|
+
def new
|
19
|
+
@job_title = @department.job_titles.build
|
20
|
+
end
|
21
|
+
|
22
|
+
def create
|
23
|
+
@job_title = @department.job_titles.build(job_title_params)
|
24
|
+
|
25
|
+
unless @job_title.save
|
26
|
+
render :new, locals: { model: @job_title }, status: :unprocessable_entity
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def create_department
|
31
|
+
@super_job_title = SuperJobTitle.find params[:super_job_title_id]
|
32
|
+
jtr = @super_job_title.job_titles.build(department_id: params[:department_id])
|
33
|
+
x = @department.root.all_job_titles.where.not(super_job_title_id: nil).default_where('super_grade-lte': @super_job_title.grade).minimum(:grade) || 1
|
34
|
+
jtr.insert_at x
|
35
|
+
end
|
36
|
+
|
37
|
+
def reorder
|
38
|
+
sort_array = params[:sort_array].select { |i| i.integer? }
|
39
|
+
|
40
|
+
if params[:new_index] > params[:old_index]
|
41
|
+
prev_one = @job_title.same_job_titles.find(sort_array[params[:new_index].to_i - 1])
|
42
|
+
@job_title.insert_at prev_one.grade
|
43
|
+
else
|
44
|
+
next_ones = @job_title.same_job_titles.find(sort_array[(params[:new_index].to_i + 1)..params[:old_index].to_i])
|
45
|
+
next_ones.each do |next_one|
|
46
|
+
next_one.insert_at @job_title.grade
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
private
|
52
|
+
def set_department
|
53
|
+
@department = Department.find params[:department_id]
|
54
|
+
end
|
55
|
+
|
56
|
+
def set_job_title
|
57
|
+
@job_title = JobTitle.where(department_root_id: @department.root.id).find(params[:id])
|
58
|
+
end
|
59
|
+
|
60
|
+
def job_title_params
|
61
|
+
params.fetch(:job_title, {}).permit(
|
62
|
+
:name,
|
63
|
+
:description,
|
64
|
+
:grade
|
65
|
+
)
|
66
|
+
end
|
67
|
+
|
68
|
+
end
|
69
|
+
end
|