next_sges 0.1.0
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 +28 -0
- data/Rakefile +36 -0
- data/app/assets/config/next_sges_manifest.js +2 -0
- data/app/assets/javascripts/next_sges/administrators.js +2 -0
- data/app/assets/javascripts/next_sges/application.js +13 -0
- data/app/assets/javascripts/next_sges/collection_note_items.js +2 -0
- data/app/assets/javascripts/next_sges/collection_notes.js +2 -0
- data/app/assets/javascripts/next_sges/collection_types.js +2 -0
- data/app/assets/javascripts/next_sges/deposits.js +2 -0
- data/app/assets/javascripts/next_sges/inscriptions.js +2 -0
- data/app/assets/javascripts/next_sges/parents.js +2 -0
- data/app/assets/javascripts/next_sges/responsible_others.js +2 -0
- data/app/assets/javascripts/next_sges/school_admins.js +2 -0
- data/app/assets/javascripts/next_sges/schools.js +2 -0
- data/app/assets/javascripts/next_sges/students.js +2 -0
- data/app/assets/stylesheets/next_sges/administrators.css +4 -0
- data/app/assets/stylesheets/next_sges/application.css +15 -0
- data/app/assets/stylesheets/next_sges/collection_note_items.css +4 -0
- data/app/assets/stylesheets/next_sges/collection_notes.css +4 -0
- data/app/assets/stylesheets/next_sges/collection_types.css +4 -0
- data/app/assets/stylesheets/next_sges/deposits.css +4 -0
- data/app/assets/stylesheets/next_sges/inscriptions.css +4 -0
- data/app/assets/stylesheets/next_sges/parents.css +4 -0
- data/app/assets/stylesheets/next_sges/responsible_others.css +4 -0
- data/app/assets/stylesheets/next_sges/school_admins.css +4 -0
- data/app/assets/stylesheets/next_sges/schools.css +4 -0
- data/app/assets/stylesheets/next_sges/students.css +4 -0
- data/app/assets/stylesheets/scaffold.css +80 -0
- data/app/controllers/next_sges/administrators_controller.rb +62 -0
- data/app/controllers/next_sges/application_controller.rb +5 -0
- data/app/controllers/next_sges/collection_note_items_controller.rb +62 -0
- data/app/controllers/next_sges/collection_notes_controller.rb +62 -0
- data/app/controllers/next_sges/collection_types_controller.rb +62 -0
- data/app/controllers/next_sges/deposits_controller.rb +62 -0
- data/app/controllers/next_sges/inscriptions_controller.rb +62 -0
- data/app/controllers/next_sges/parents_controller.rb +62 -0
- data/app/controllers/next_sges/responsible_others_controller.rb +62 -0
- data/app/controllers/next_sges/school_admins_controller.rb +62 -0
- data/app/controllers/next_sges/schools_controller.rb +62 -0
- data/app/controllers/next_sges/students_controller.rb +62 -0
- data/app/helpers/next_sges/administrators_helper.rb +4 -0
- data/app/helpers/next_sges/application_helper.rb +4 -0
- data/app/helpers/next_sges/collection_note_items_helper.rb +4 -0
- data/app/helpers/next_sges/collection_notes_helper.rb +4 -0
- data/app/helpers/next_sges/collection_types_helper.rb +4 -0
- data/app/helpers/next_sges/deposits_helper.rb +4 -0
- data/app/helpers/next_sges/inscriptions_helper.rb +4 -0
- data/app/helpers/next_sges/parents_helper.rb +4 -0
- data/app/helpers/next_sges/responsible_others_helper.rb +4 -0
- data/app/helpers/next_sges/school_admins_helper.rb +4 -0
- data/app/helpers/next_sges/schools_helper.rb +4 -0
- data/app/helpers/next_sges/students_helper.rb +4 -0
- data/app/jobs/next_sges/application_job.rb +4 -0
- data/app/mailers/next_sges/application_mailer.rb +6 -0
- data/app/models/next_sges/administrator.rb +19 -0
- data/app/models/next_sges/application_record.rb +33 -0
- data/app/models/next_sges/collection_note.rb +68 -0
- data/app/models/next_sges/collection_note_item.rb +173 -0
- data/app/models/next_sges/collection_type.rb +36 -0
- data/app/models/next_sges/deposit.rb +31 -0
- data/app/models/next_sges/inscription.rb +5 -0
- data/app/models/next_sges/parent.rb +37 -0
- data/app/models/next_sges/responsible_other.rb +20 -0
- data/app/models/next_sges/school.rb +21 -0
- data/app/models/next_sges/school_admin.rb +10 -0
- data/app/models/next_sges/student.rb +39 -0
- data/app/views/layouts/next_sges/application.html.erb +14 -0
- data/app/views/next_sges/administrators/_form.html.erb +27 -0
- data/app/views/next_sges/administrators/edit.html.erb +6 -0
- data/app/views/next_sges/administrators/index.html.erb +29 -0
- data/app/views/next_sges/administrators/new.html.erb +5 -0
- data/app/views/next_sges/administrators/show.html.erb +14 -0
- data/app/views/next_sges/collection_note_items/_form.html.erb +107 -0
- data/app/views/next_sges/collection_note_items/edit.html.erb +6 -0
- data/app/views/next_sges/collection_note_items/index.html.erb +61 -0
- data/app/views/next_sges/collection_note_items/new.html.erb +5 -0
- data/app/views/next_sges/collection_note_items/show.html.erb +94 -0
- data/app/views/next_sges/collection_notes/_form.html.erb +37 -0
- data/app/views/next_sges/collection_notes/edit.html.erb +6 -0
- data/app/views/next_sges/collection_notes/index.html.erb +33 -0
- data/app/views/next_sges/collection_notes/new.html.erb +5 -0
- data/app/views/next_sges/collection_notes/show.html.erb +24 -0
- data/app/views/next_sges/collection_types/_form.html.erb +37 -0
- data/app/views/next_sges/collection_types/edit.html.erb +6 -0
- data/app/views/next_sges/collection_types/index.html.erb +33 -0
- data/app/views/next_sges/collection_types/new.html.erb +5 -0
- data/app/views/next_sges/collection_types/show.html.erb +24 -0
- data/app/views/next_sges/deposits/_form.html.erb +37 -0
- data/app/views/next_sges/deposits/edit.html.erb +6 -0
- data/app/views/next_sges/deposits/index.html.erb +33 -0
- data/app/views/next_sges/deposits/new.html.erb +5 -0
- data/app/views/next_sges/deposits/show.html.erb +24 -0
- data/app/views/next_sges/inscriptions/_form.html.erb +102 -0
- data/app/views/next_sges/inscriptions/edit.html.erb +6 -0
- data/app/views/next_sges/inscriptions/index.html.erb +59 -0
- data/app/views/next_sges/inscriptions/new.html.erb +5 -0
- data/app/views/next_sges/inscriptions/show.html.erb +89 -0
- data/app/views/next_sges/parents/_form.html.erb +42 -0
- data/app/views/next_sges/parents/edit.html.erb +6 -0
- data/app/views/next_sges/parents/index.html.erb +35 -0
- data/app/views/next_sges/parents/new.html.erb +5 -0
- data/app/views/next_sges/parents/show.html.erb +29 -0
- data/app/views/next_sges/responsible_others/_form.html.erb +97 -0
- data/app/views/next_sges/responsible_others/edit.html.erb +6 -0
- data/app/views/next_sges/responsible_others/index.html.erb +57 -0
- data/app/views/next_sges/responsible_others/new.html.erb +5 -0
- data/app/views/next_sges/responsible_others/show.html.erb +84 -0
- data/app/views/next_sges/school_admins/_form.html.erb +32 -0
- data/app/views/next_sges/school_admins/edit.html.erb +6 -0
- data/app/views/next_sges/school_admins/index.html.erb +31 -0
- data/app/views/next_sges/school_admins/new.html.erb +5 -0
- data/app/views/next_sges/school_admins/show.html.erb +19 -0
- data/app/views/next_sges/schools/_form.html.erb +62 -0
- data/app/views/next_sges/schools/edit.html.erb +6 -0
- data/app/views/next_sges/schools/index.html.erb +43 -0
- data/app/views/next_sges/schools/new.html.erb +5 -0
- data/app/views/next_sges/schools/show.html.erb +49 -0
- data/app/views/next_sges/students/_form.html.erb +42 -0
- data/app/views/next_sges/students/edit.html.erb +6 -0
- data/app/views/next_sges/students/index.html.erb +35 -0
- data/app/views/next_sges/students/new.html.erb +5 -0
- data/app/views/next_sges/students/show.html.erb +29 -0
- data/config/routes.rb +13 -0
- data/db/migrate/20171209090042_create_next_sges_schools.rb +17 -0
- data/db/migrate/20171209093554_create_next_sges_parents.rb +17 -0
- data/db/migrate/20171209093716_create_next_sges_collection_types.rb +13 -0
- data/db/migrate/20171209095546_create_next_sges_students.rb +17 -0
- data/db/migrate/20171209100114_create_next_sges_collection_notes.rb +14 -0
- data/db/migrate/20171209104046_create_next_sges_deposits.rb +13 -0
- data/db/migrate/20171209110844_create_next_sges_administrators.rb +10 -0
- data/db/migrate/20171209111036_create_next_sges_school_admins.rb +12 -0
- data/db/migrate/20171209213002_create_next_sges_inscriptions.rb +25 -0
- data/db/migrate/20171209213302_create_join_table_inscription_collection_type.rb +8 -0
- data/db/migrate/20171211132659_create_join_table_student_collection_type.rb +8 -0
- data/db/migrate/20171211140033_add_value_to_collection_types.rb +5 -0
- data/db/migrate/20171213141321_create_next_sges_collection_note_items.rb +26 -0
- data/db/migrate/20171213160012_add_discount_ad_fine_to_collection_type.rb +13 -0
- data/db/migrate/20171214154917_rename_anual_payment_discount_from_next_sges_collection_types.rb +5 -0
- data/db/migrate/20171214204406_add_account_balance_to_next_sges_parents.rb +17 -0
- data/db/migrate/20171215120306_remove_student_from_deposit.rb +6 -0
- data/db/migrate/20171215133634_add_type_to_next_sges_deposits.rb +5 -0
- data/db/migrate/20171215144509_add_documents_to_next_sgad_parents.rb +6 -0
- data/db/migrate/20171215175025_add_avatar_to_next_sges_schools.rb +5 -0
- data/db/migrate/20171218082424_add_nif_to_next_sges_schools.rb +11 -0
- data/db/migrate/20171221224739_create_next_sges_responsible_others.rb +24 -0
- data/db/migrate/20171227221731_add_birthday_to_next_sgad_students.rb +7 -0
- data/db/migrate/20180216140129_add_collection_note_to_deposits.rb +5 -0
- data/lib/next_sges.rb +5 -0
- data/lib/next_sges/engine.rb +5 -0
- data/lib/next_sges/version.rb +3 -0
- data/lib/tasks/next_sges_tasks.rake +4 -0
- metadata +224 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
require_dependency "next_sges/application_controller"
|
|
2
|
+
|
|
3
|
+
module NextSges
|
|
4
|
+
class CollectionNotesController < ::ApplicationController
|
|
5
|
+
before_action :set_collection_note, only: [:show, :edit, :update, :destroy]
|
|
6
|
+
|
|
7
|
+
# GET /collection_notes
|
|
8
|
+
def index
|
|
9
|
+
@collection_notes = CollectionNote.all
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# GET /collection_notes/1
|
|
13
|
+
def show
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# GET /collection_notes/new
|
|
17
|
+
def new
|
|
18
|
+
@collection_note = CollectionNote.new
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# GET /collection_notes/1/edit
|
|
22
|
+
def edit
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# POST /collection_notes
|
|
26
|
+
def create
|
|
27
|
+
@collection_note = CollectionNote.new(collection_note_params)
|
|
28
|
+
|
|
29
|
+
if @collection_note.save
|
|
30
|
+
redirect_to @collection_note, notice: 'Collection note was successfully created.'
|
|
31
|
+
else
|
|
32
|
+
render :new
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# PATCH/PUT /collection_notes/1
|
|
37
|
+
def update
|
|
38
|
+
if @collection_note.update(collection_note_params)
|
|
39
|
+
redirect_to @collection_note, notice: 'Collection note was successfully updated.'
|
|
40
|
+
else
|
|
41
|
+
render :edit
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# DELETE /collection_notes/1
|
|
46
|
+
def destroy
|
|
47
|
+
@collection_note.destroy
|
|
48
|
+
redirect_to collection_notes_url, notice: 'Collection note was successfully destroyed.'
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
private
|
|
52
|
+
# Use callbacks to share common setup or constraints between actions.
|
|
53
|
+
def set_collection_note
|
|
54
|
+
@collection_note = CollectionNote.find(params[:id])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Only allow a trusted parameter "white list" through.
|
|
58
|
+
def collection_note_params
|
|
59
|
+
params.require(:collection_note).permit(:number, :value, :status, :student_id)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
require_dependency "next_sges/application_controller"
|
|
2
|
+
|
|
3
|
+
module NextSges
|
|
4
|
+
class CollectionTypesController < ::ApplicationController
|
|
5
|
+
before_action :set_collection_type, only: [:show, :edit, :update, :destroy]
|
|
6
|
+
|
|
7
|
+
# GET /collection_types
|
|
8
|
+
def index
|
|
9
|
+
@collection_types = CollectionType.all
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# GET /collection_types/1
|
|
13
|
+
def show
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# GET /collection_types/new
|
|
17
|
+
def new
|
|
18
|
+
@collection_type = CollectionType.new
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# GET /collection_types/1/edit
|
|
22
|
+
def edit
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# POST /collection_types
|
|
26
|
+
def create
|
|
27
|
+
@collection_type = CollectionType.new(collection_type_params)
|
|
28
|
+
|
|
29
|
+
if @collection_type.save
|
|
30
|
+
redirect_to @collection_type, notice: 'Collection type was successfully created.'
|
|
31
|
+
else
|
|
32
|
+
render :new
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# PATCH/PUT /collection_types/1
|
|
37
|
+
def update
|
|
38
|
+
if @collection_type.update(collection_type_params)
|
|
39
|
+
redirect_to @collection_type, notice: 'Collection type was successfully updated.'
|
|
40
|
+
else
|
|
41
|
+
render :edit
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# DELETE /collection_types/1
|
|
46
|
+
def destroy
|
|
47
|
+
@collection_type.destroy
|
|
48
|
+
redirect_to collection_types_url, notice: 'Collection type was successfully destroyed.'
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
private
|
|
52
|
+
# Use callbacks to share common setup or constraints between actions.
|
|
53
|
+
def set_collection_type
|
|
54
|
+
@collection_type = CollectionType.find(params[:id])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Only allow a trusted parameter "white list" through.
|
|
58
|
+
def collection_type_params
|
|
59
|
+
params.require(:collection_type).permit(:name, :description, :frequency, :category)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
require_dependency "next_sges/application_controller"
|
|
2
|
+
|
|
3
|
+
module NextSges
|
|
4
|
+
class DepositsController < ::ApplicationController
|
|
5
|
+
before_action :set_deposit, only: [:show, :edit, :update, :destroy]
|
|
6
|
+
|
|
7
|
+
# GET /deposits
|
|
8
|
+
def index
|
|
9
|
+
@deposits = Deposit.all
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# GET /deposits/1
|
|
13
|
+
def show
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# GET /deposits/new
|
|
17
|
+
def new
|
|
18
|
+
@deposit = Deposit.new
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# GET /deposits/1/edit
|
|
22
|
+
def edit
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# POST /deposits
|
|
26
|
+
def create
|
|
27
|
+
@deposit = Deposit.new(deposit_params)
|
|
28
|
+
|
|
29
|
+
if @deposit.save
|
|
30
|
+
redirect_to @deposit, notice: 'Deposit was successfully created.'
|
|
31
|
+
else
|
|
32
|
+
render :new
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# PATCH/PUT /deposits/1
|
|
37
|
+
def update
|
|
38
|
+
if @deposit.update(deposit_params)
|
|
39
|
+
redirect_to @deposit, notice: 'Deposit was successfully updated.'
|
|
40
|
+
else
|
|
41
|
+
render :edit
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# DELETE /deposits/1
|
|
46
|
+
def destroy
|
|
47
|
+
@deposit.destroy
|
|
48
|
+
redirect_to deposits_url, notice: 'Deposit was successfully destroyed.'
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
private
|
|
52
|
+
# Use callbacks to share common setup or constraints between actions.
|
|
53
|
+
def set_deposit
|
|
54
|
+
@deposit = Deposit.find(params[:id])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Only allow a trusted parameter "white list" through.
|
|
58
|
+
def deposit_params
|
|
59
|
+
params.require(:deposit).permit(:number, :value, :status, :student_id)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
require_dependency "next_sges/application_controller"
|
|
2
|
+
|
|
3
|
+
module NextSges
|
|
4
|
+
class InscriptionsController < ::ApplicationController
|
|
5
|
+
before_action :set_inscription, only: [:show, :edit, :update, :destroy]
|
|
6
|
+
|
|
7
|
+
# GET /inscriptions
|
|
8
|
+
def index
|
|
9
|
+
@inscriptions = Inscription.all
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# GET /inscriptions/1
|
|
13
|
+
def show
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# GET /inscriptions/new
|
|
17
|
+
def new
|
|
18
|
+
@inscription = Inscription.new
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# GET /inscriptions/1/edit
|
|
22
|
+
def edit
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# POST /inscriptions
|
|
26
|
+
def create
|
|
27
|
+
@inscription = Inscription.new(inscription_params)
|
|
28
|
+
|
|
29
|
+
if @inscription.save
|
|
30
|
+
redirect_to @inscription, notice: 'Inscription was successfully created.'
|
|
31
|
+
else
|
|
32
|
+
render :new
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# PATCH/PUT /inscriptions/1
|
|
37
|
+
def update
|
|
38
|
+
if @inscription.update(inscription_params)
|
|
39
|
+
redirect_to @inscription, notice: 'Inscription was successfully updated.'
|
|
40
|
+
else
|
|
41
|
+
render :edit
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# DELETE /inscriptions/1
|
|
46
|
+
def destroy
|
|
47
|
+
@inscription.destroy
|
|
48
|
+
redirect_to inscriptions_url, notice: 'Inscription was successfully destroyed.'
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
private
|
|
52
|
+
# Use callbacks to share common setup or constraints between actions.
|
|
53
|
+
def set_inscription
|
|
54
|
+
@inscription = Inscription.find(params[:id])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Only allow a trusted parameter "white list" through.
|
|
58
|
+
def inscription_params
|
|
59
|
+
params.require(:inscription).permit(:student_name, :student_birthday, :student_nationality, :student_indentification_type, :student_ientification_number, :student_address, :parent_name, :parent_birthday, :parent_nationality, :parent_indentification_type, :parent_ientification_number, :parent_address, :parent_cellphone1, :parent_cellphone2, :parent_email, :documents, :school_id)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
require_dependency "next_sges/application_controller"
|
|
2
|
+
|
|
3
|
+
module NextSges
|
|
4
|
+
class ParentsController < ::ApplicationController
|
|
5
|
+
before_action :set_parent, only: [:show, :edit, :update, :destroy]
|
|
6
|
+
|
|
7
|
+
# GET /parents
|
|
8
|
+
def index
|
|
9
|
+
@parents = Parent.all
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# GET /parents/1
|
|
13
|
+
def show
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# GET /parents/new
|
|
17
|
+
def new
|
|
18
|
+
@parent = Parent.new
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# GET /parents/1/edit
|
|
22
|
+
def edit
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# POST /parents
|
|
26
|
+
def create
|
|
27
|
+
@parent = Parent.new(parent_params)
|
|
28
|
+
|
|
29
|
+
if @parent.save
|
|
30
|
+
redirect_to @parent, notice: 'Parent was successfully created.'
|
|
31
|
+
else
|
|
32
|
+
render :new
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# PATCH/PUT /parents/1
|
|
37
|
+
def update
|
|
38
|
+
if @parent.update(parent_params)
|
|
39
|
+
redirect_to @parent, notice: 'Parent was successfully updated.'
|
|
40
|
+
else
|
|
41
|
+
render :edit
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# DELETE /parents/1
|
|
46
|
+
def destroy
|
|
47
|
+
@parent.destroy
|
|
48
|
+
redirect_to parents_url, notice: 'Parent was successfully destroyed.'
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
private
|
|
52
|
+
# Use callbacks to share common setup or constraints between actions.
|
|
53
|
+
def set_parent
|
|
54
|
+
@parent = Parent.find(params[:id])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Only allow a trusted parameter "white list" through.
|
|
58
|
+
def parent_params
|
|
59
|
+
params.require(:parent).permit(:name, :email, :cellphone1, :cellphone2, :number)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
require_dependency "next_sges/application_controller"
|
|
2
|
+
|
|
3
|
+
module NextSges
|
|
4
|
+
class ResponsibleOthersController < ::ApplicationController
|
|
5
|
+
before_action :set_responsible_other, only: [:show, :edit, :update, :destroy]
|
|
6
|
+
|
|
7
|
+
# GET /responsible_others
|
|
8
|
+
def index
|
|
9
|
+
@responsible_others = ResponsibleOther.all
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# GET /responsible_others/1
|
|
13
|
+
def show
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# GET /responsible_others/new
|
|
17
|
+
def new
|
|
18
|
+
@responsible_other = ResponsibleOther.new
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# GET /responsible_others/1/edit
|
|
22
|
+
def edit
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# POST /responsible_others
|
|
26
|
+
def create
|
|
27
|
+
@responsible_other = ResponsibleOther.new(responsible_other_params)
|
|
28
|
+
|
|
29
|
+
if @responsible_other.save
|
|
30
|
+
redirect_to @responsible_other, notice: 'Responsible other was successfully created.'
|
|
31
|
+
else
|
|
32
|
+
render :new
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# PATCH/PUT /responsible_others/1
|
|
37
|
+
def update
|
|
38
|
+
if @responsible_other.update(responsible_other_params)
|
|
39
|
+
redirect_to @responsible_other, notice: 'Responsible other was successfully updated.'
|
|
40
|
+
else
|
|
41
|
+
render :edit
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# DELETE /responsible_others/1
|
|
46
|
+
def destroy
|
|
47
|
+
@responsible_other.destroy
|
|
48
|
+
redirect_to responsible_others_url, notice: 'Responsible other was successfully destroyed.'
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
private
|
|
52
|
+
# Use callbacks to share common setup or constraints between actions.
|
|
53
|
+
def set_responsible_other
|
|
54
|
+
@responsible_other = ResponsibleOther.find(params[:id])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Only allow a trusted parameter "white list" through.
|
|
58
|
+
def responsible_other_params
|
|
59
|
+
params.require(:responsible_other).permit(:first_name, :middle_name, :last_name, :avatar, :documents, :relation_to_parent, :parent_id, :status, :school_id, :birthdate, :identification_type, :identification_number, :email, :cellphone, :address, :number)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
require_dependency "next_sges/application_controller"
|
|
2
|
+
|
|
3
|
+
module NextSges
|
|
4
|
+
class SchoolAdminsController < ::ApplicationController
|
|
5
|
+
before_action :set_school_admin, only: [:show, :edit, :update, :destroy]
|
|
6
|
+
|
|
7
|
+
# GET /school_admins
|
|
8
|
+
def index
|
|
9
|
+
@school_admins = SchoolAdmin.all
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# GET /school_admins/1
|
|
13
|
+
def show
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# GET /school_admins/new
|
|
17
|
+
def new
|
|
18
|
+
@school_admin = SchoolAdmin.new
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# GET /school_admins/1/edit
|
|
22
|
+
def edit
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# POST /school_admins
|
|
26
|
+
def create
|
|
27
|
+
@school_admin = SchoolAdmin.new(school_admin_params)
|
|
28
|
+
|
|
29
|
+
if @school_admin.save
|
|
30
|
+
redirect_to @school_admin, notice: 'School admin was successfully created.'
|
|
31
|
+
else
|
|
32
|
+
render :new
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# PATCH/PUT /school_admins/1
|
|
37
|
+
def update
|
|
38
|
+
if @school_admin.update(school_admin_params)
|
|
39
|
+
redirect_to @school_admin, notice: 'School admin was successfully updated.'
|
|
40
|
+
else
|
|
41
|
+
render :edit
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# DELETE /school_admins/1
|
|
46
|
+
def destroy
|
|
47
|
+
@school_admin.destroy
|
|
48
|
+
redirect_to school_admins_url, notice: 'School admin was successfully destroyed.'
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
private
|
|
52
|
+
# Use callbacks to share common setup or constraints between actions.
|
|
53
|
+
def set_school_admin
|
|
54
|
+
@school_admin = SchoolAdmin.find(params[:id])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Only allow a trusted parameter "white list" through.
|
|
58
|
+
def school_admin_params
|
|
59
|
+
params.require(:school_admin).permit(:number, :user_id, :user_type, :school_id)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
require_dependency "next_sges/application_controller"
|
|
2
|
+
|
|
3
|
+
module NextSges
|
|
4
|
+
class SchoolsController < ::ApplicationController
|
|
5
|
+
before_action :set_school, only: [:show, :edit, :update, :destroy]
|
|
6
|
+
|
|
7
|
+
# GET /schools
|
|
8
|
+
def index
|
|
9
|
+
@schools = School.all
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# GET /schools/1
|
|
13
|
+
def show
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# GET /schools/new
|
|
17
|
+
def new
|
|
18
|
+
@school = School.new
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# GET /schools/1/edit
|
|
22
|
+
def edit
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# POST /schools
|
|
26
|
+
def create
|
|
27
|
+
@school = School.new(school_params)
|
|
28
|
+
|
|
29
|
+
if @school.save
|
|
30
|
+
redirect_to @school, notice: 'School was successfully created.'
|
|
31
|
+
else
|
|
32
|
+
render :new
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# PATCH/PUT /schools/1
|
|
37
|
+
def update
|
|
38
|
+
if @school.update(school_params)
|
|
39
|
+
redirect_to @school, notice: 'School was successfully updated.'
|
|
40
|
+
else
|
|
41
|
+
render :edit
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# DELETE /schools/1
|
|
46
|
+
def destroy
|
|
47
|
+
@school.destroy
|
|
48
|
+
redirect_to schools_url, notice: 'School was successfully destroyed.'
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
private
|
|
52
|
+
# Use callbacks to share common setup or constraints between actions.
|
|
53
|
+
def set_school
|
|
54
|
+
@school = School.find(params[:id])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Only allow a trusted parameter "white list" through.
|
|
58
|
+
def school_params
|
|
59
|
+
params.require(:school).permit(:name, :number, :latitude, :longitude, :address, :email, :email2, :phone, :phone)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|