Browse Source

Fixed modals and js

jquino 5 years ago
parent
commit
e7476715f4

+ 2
- 2
app/Http/Controllers/Auth/LoginController.php View File

28
      *
28
      *
29
      * @var string
29
      * @var string
30
      */
30
      */
31
-    protected $redirectTo = '/dashboard';
31
+    // protected $redirectTo = '/dashboard';
32
 
32
 
33
     /**
33
     /**
34
      * Create a new controller instance.
34
      * Create a new controller instance.
82
             $newUser->save();
82
             $newUser->save();
83
             auth()->login($newUser, true);
83
             auth()->login($newUser, true);
84
         }
84
         }
85
-        return redirect()->to('/');
85
+        return redirect()->back();
86
     }
86
     }
87
 
87
 
88
     public function logout(Request $request) {
88
     public function logout(Request $request) {

+ 14
- 28
app/Http/Controllers/CourseController.php View File

42
      */
42
      */
43
     public function store(Request $request)
43
     public function store(Request $request)
44
     {
44
     {
45
-        // dd($request->validate(['code'      => ['required','unique:courses','size:8','regex:/[A-Za-z]{4}[0-9]{4}/', 'string']]));
45
+        // TODO: Validate syllabus is pdf
46
         $course = Course::create( $request->validate([
46
         $course = Course::create( $request->validate([
47
             'code'      => ['required','unique:courses','size:8','regex:/[A-Za-z]{4}[0-9]{4}/', 'string'],
47
             'code'      => ['required','unique:courses','size:8','regex:/[A-Za-z]{4}[0-9]{4}/', 'string'],
48
             'title'     => ['required','max:255', 'string'],
48
             'title'     => ['required','max:255', 'string'],
49
             'dept_id'   => ['required','exists:departments,id', 'integer'],
49
             'dept_id'   => ['required','exists:departments,id', 'integer'],
50
-            'syllabus'  => ['nullable','file', 'mimes:pdf']
51
         ]));
50
         ]));
52
 
51
 
53
         if ($request->file('syllabus')) {
52
         if ($request->file('syllabus')) {
54
-            $path = $request->file('syllabus')->store('course_syllabus', 'public');
55
-            $course->update(['syllabus' => asset($path)]);
53
+            $path = $request->file('syllabus')->store('course_syllabus');
54
+            $course->update(['syllabus' => '/storage/'.$path]);
56
         }
55
         }
57
 
56
 
58
         return redirect('/course/' . $course->id);
57
         return redirect('/course/' . $course->id);
66
      */
65
      */
67
     public function show(Course $course)
66
     public function show(Course $course)
68
     {
67
     {
69
-        // dd($course->toJson());
70
-        // dump(1);
71
-        // Auth::logout();
72
-        // $semesters = $course->semesters->unique()->loadMissing('sections');
73
-        // $course->loadMissing('semesters.sections');
74
-        // dd($semesters);
75
         $course->loadMissing(['semesters.sections.professors']);
68
         $course->loadMissing(['semesters.sections.professors']);
76
-        // dd($course->semesters->unique());
77
-        // $semesters = $course->sections->groupBy('semester_code')->map( function ($sections) {
78
-        //     return collect(['alpha' => $sections[0]->semester->alpha, 'sections' => $sections->sortBy('code')]);
79
-        // })->sort();
80
-        // dd($semesters);
81
-        // dd($course->loadMissing(['sections.semester']));
82
-        // dd($course->sections->groupBy('semester_code'));
83
         return view('courses.show', [
69
         return view('courses.show', [
84
             'course' => $course,
70
             'course' => $course,
85
-            // 'semesters' => $semesters
86
         ]);
71
         ]);
87
     }
72
     }
88
 
73
 
106
      */
91
      */
107
     public function update(Request $request, Course $course)
92
     public function update(Request $request, Course $course)
108
     {
93
     {
109
-
110
-        $course->update( $request->validate([
111
-            'code'      => ['unique:courses','size:8','regex:/[A-Za-z]{4}[0-9]{4}/', 'string'],
112
-            'title'     => ['max:255', 'string'],
113
-            'dept_id'   => ['exists:departments,id', 'integer'],
114
-            'syllabus'  => ['nullable', 'file', 'mimetypes:application/pdf'],
94
+        $data = array_filter($request->validate([
95
+            'code'      => ['nullable', 'unique:courses','size:8','regex:/[A-Za-z]{4}[0-9]{4}/', 'string'],
96
+            'title'     => ['nullable', 'max:255', 'string'],
97
+            'dept_id'   => ['nullable', 'exists:departments,id', 'integer'],
115
         ]));
98
         ]));
116
 
99
 
100
+        $course->update($data);
101
+
117
         if ($request->file('syllabus')) {
102
         if ($request->file('syllabus')) {
118
             $path = $request->file('syllabus')->store('course_syllabus');
103
             $path = $request->file('syllabus')->store('course_syllabus');
119
-            $course->update(['syllabus' => asset($path)]);
104
+            $course->update(['syllabus' => '/storage/'.$path]);
120
         }
105
         }
121
-        dump(asset($path));
106
+        // dd($path);
107
+        // dd(asset($path));
122
         // dd($course->syllabus);
108
         // dd($course->syllabus);
123
-        return redirect($course->syllabus);
124
-        return redirect('/course');
109
+        // return redirect($course->syllabus);
110
+        return redirect()->back();
125
     }
111
     }
126
 
112
 
127
     /**
113
     /**

+ 2
- 2
app/Http/Controllers/DashboardController.php View File

47
                 $section->professors = $section->professors;
47
                 $section->professors = $section->professors;
48
             }
48
             }
49
         }
49
         }
50
-        // header('Content-Type: application/pdf');
51
-        // header(`Content-Disposition: attachment; filename="${semester_code}.pdf";`);
50
+        header('Content-Type: application/pdf');
51
+        header(`Content-Disposition: attachment; filename="${semester_code}.pdf";`);
52
         // return $data->toJson();
52
         // return $data->toJson();
53
         return '<script type="text/javascript">var data='.$data->toJson().'</script><script type="text/javascript" src="/js/createPDF.js"></script>';
53
         return '<script type="text/javascript">var data='.$data->toJson().'</script><script type="text/javascript" src="/js/createPDF.js"></script>';
54
     }
54
     }

+ 12
- 2
app/Http/Controllers/ProfessorController.php View File

66
         $professor->loadMissing(['sections.course', 'semesters.sections.course']);
66
         $professor->loadMissing(['sections.course', 'semesters.sections.course']);
67
         $loads = $professor->semesters()->get()->keyBy('code');
67
         $loads = $professor->semesters()->get()->keyBy('code');
68
         $sections = $professor->sections()->with('course:id,code')->get()->groupBy('semester_code');
68
         $sections = $professor->sections()->with('course:id,code')->get()->groupBy('semester_code');
69
-        $semesters = Semester::whereIn('code', $loads->keys())->orWhereIn('code', $sections->keys())->get();
69
+        $semesters = Semester::whereIn('code', $loads->keys())->orWhereIn('code', $sections->keys())->orderBy('code', 'desc')->get();
70
 
70
 
71
         return view('professors.show', compact([
71
         return view('professors.show', compact([
72
             'professor',
72
             'professor',
96
      */
96
      */
97
     public function update(Request $request, Professor $professor)
97
     public function update(Request $request, Professor $professor)
98
     {
98
     {
99
-        // TODO: Add logic for updating professor
99
+        // TODO: Update section percent,schedule and eval
100
         if ($request->isMethod('put')) {
100
         if ($request->isMethod('put')) {
101
             $data = array_filter($request->validate([
101
             $data = array_filter($request->validate([
102
                 'semester_code'         => ['required_with:admin_load,investigative_load', 'string','size:3'],
102
                 'semester_code'         => ['required_with:admin_load,investigative_load', 'string','size:3'],
109
             } else {
109
             } else {
110
                 $professor->semesters()->updateExistingPivot($data['semester_code'], $data);
110
                 $professor->semesters()->updateExistingPivot($data['semester_code'], $data);
111
             }
111
             }
112
+        } else if ($request->isMethod('patch')) {
113
+            $data = array_filter($request->validate([
114
+                'num_prof'      => ['nullable', 'unique:professors', 'max:16', 'string'],
115
+                'first_name'    => ['nullable', 'max:255', 'string', 'alpha'],
116
+                'last_name'     => ['nullable', 'max:255', 'string', 'alpha'],
117
+                'email'         => ['nullable', 'email'],
118
+                'type'          => ['nullable', 'in:plantilla,contrato,ta'],
119
+                'dept_id'       => ['nullable', 'exists:departments,id', 'integer'],
120
+            ]));
121
+            $professor->update($data);
112
         }
122
         }
113
         return redirect()->back();
123
         return redirect()->back();
114
     }
124
     }

+ 15
- 9
app/Http/Controllers/SectionController.php View File

38
      */
38
      */
39
     public function store(Request $request)
39
     public function store(Request $request)
40
     {
40
     {
41
-        $request = $request->validate([
41
+        $data = $request->validate([
42
             'course_id'     => ['required', 'integer', 'exists:courses,id'],
42
             'course_id'     => ['required', 'integer', 'exists:courses,id'],
43
             'semester_code' => ['required', 'size:3', 'exists:semesters,code'],
43
             'semester_code' => ['required', 'size:3', 'exists:semesters,code'],
44
             'section_count' => ['required', 'integer', 'max:50'],
44
             'section_count' => ['required', 'integer', 'max:50'],
45
         ]);
45
         ]);
46
-        for ($i=1; $i <= $request->section_count; $i++) {
46
+
47
+        // TODO: Check if section code is taken
48
+        for ($i=1; $i <= $request['section_count']; $i++) {
47
             Section::create([
49
             Section::create([
48
                 'course_id'     => $request->course_id,
50
                 'course_id'     => $request->course_id,
49
                 'semester_code' => $request->semester_code,
51
                 'semester_code' => $request->semester_code,
89
             'code'              => ['nullable', 'size:3', 'string'],
91
             'code'              => ['nullable', 'size:3', 'string'],
90
             'professor_id'      => ['nullable', 'array'],
92
             'professor_id'      => ['nullable', 'array'],
91
             'professor_id.*'    => ['exists:professors,id'],
93
             'professor_id.*'    => ['exists:professors,id'],
92
-            'syllabus'          => ['nullable', 'file', 'mimes:pdf'],
93
             'credits'           => ['nullable', 'numeric'],
94
             'credits'           => ['nullable', 'numeric'],
94
             'student_count'     => ['nullable', 'integer'],
95
             'student_count'     => ['nullable', 'integer'],
95
         ]));
96
         ]));
97
+        $section->update($data);
98
+
96
         // TODO: Insert syllabus
99
         // TODO: Insert syllabus
100
+        if ($request->file('syllabus')) {
101
+            $path = $request->file('syllabus')->store('section_syllabus');
102
+            $section->update(['syllabus' => '/storage/'.$path]);
103
+        }
97
 
104
 
98
-        $section->update($data);
99
-        foreach($data['professor_id'] as $professor_id) {
100
-            $section->professors()->attach($professor_id);
105
+        if (isset($data['professor_id'])) {
106
+            $section->professors()->detach();
107
+            foreach($data['professor_id'] as $professor_id) {
108
+                $section->professors()->attach($professor_id);
109
+            }
101
         }
110
         }
102
-        // return 1;
103
-        // return $request;
104
-        // return next($request);
105
         return redirect()->back();
111
         return redirect()->back();
106
     }
112
     }
107
 
113
 

+ 1
- 0
public/mix-manifest.json View File

2
     "/js/app.js": "/js/app.js",
2
     "/js/app.js": "/js/app.js",
3
     "/css/app.css": "/css/app.css",
3
     "/css/app.css": "/css/app.css",
4
     "/js/course.js": "/js/course.js",
4
     "/js/course.js": "/js/course.js",
5
+    "/js/createPDF.js": "/js/createPDF.js",
5
     "/js/dashboard.js": "/js/dashboard.js",
6
     "/js/dashboard.js": "/js/dashboard.js",
6
     "/js/prof.js": "/js/prof.js"
7
     "/js/prof.js": "/js/prof.js"
7
 }
8
 }

+ 25
- 22
resources/js/course.js View File

1
-// import {MDCDataTable} from '@material/data-table';
2
-// const dataTable = new MDCDataTable(document.querySelector('.mdc-data-table'));
1
+import {MDCDataTable} from '@material/data-table';
2
+const dataTable = new MDCDataTable(document.querySelector('.mdc-data-table'));
3
 
3
 
4
 $(document).ready(function() {
4
 $(document).ready(function() {
5
-    // $('#course-table').DataTable({
6
-    //     paging: true,
7
-    //     pagingType: 'simple',
8
-    //     searching: false,
9
-    //     scrollCollapse: false,
10
-    //     columnDefs: [
11
-    //         {targets: [0,1], orderable: true},
12
-    //         {targets: '_all', orderable: false}
13
-    //     ]
14
-
15
-    // });
5
+    // INDEX //
16
     $(function () {
6
     $(function () {
17
         $('[data-toggle="tooltip"]').tooltip();
7
         $('[data-toggle="tooltip"]').tooltip();
18
     });
8
     });
19
-    $('#modal-syllabus').on('show.bs.modal', function (event) {
9
+    $('#modal-course-syllabus').on('show.bs.modal', function (event) {
20
         var button = $(event.relatedTarget);
10
         var button = $(event.relatedTarget);
21
         var courseID = button.data('course-id');
11
         var courseID = button.data('course-id');
22
-        $(this).find('#modal-syllabus-form').attr('action', `/course/${courseID}`);
12
+        $(this).find('#modal-course-syllabus-form').attr('action', `/course/${courseID}`);
23
     });
13
     });
14
+
15
+    $('#modal-course-edit').on('show.bs.modal', function (event) {
16
+        var button = $(event.relatedTarget);
17
+        var courseID = button.data('course-id');
18
+        $(this).find('#modal-course-edit-form').attr('action', `/course/${courseID}`);
19
+    });
20
+    $('#modal-section-create').on('show.bs.modal', function (event) {
21
+        var button = $(event.relatedTarget);
22
+        var courseID = button.data('course-id');
23
+        var semCode = button.data('semester-code');
24
+        $(this).find('#modal-section-create-course_id').val(courseID);
25
+        $(this).find('#modal-section-create-semester_code').val(semCode);
26
+    });
27
+
28
+    // SHOW //
24
     $('#modal-section-edit').on('show.bs.modal', function (event) {
29
     $('#modal-section-edit').on('show.bs.modal', function (event) {
25
         var button = $(event.relatedTarget);
30
         var button = $(event.relatedTarget);
26
         var sectionID = button.data('section-id');
31
         var sectionID = button.data('section-id');
27
         $(this).find('#modal-section-edit-form').attr('action', `/section/${sectionID}`);
32
         $(this).find('#modal-section-edit-form').attr('action', `/section/${sectionID}`);
28
     });
33
     });
34
+    $('#modal-section-syllabus').on('show.bs.modal', function (event) {
35
+        var button = $(event.relatedTarget);
36
+        var sectionID = button.data('section-id');
37
+        $(this).find('#modal-section-syllabus-form').attr('action', `/section/${sectionID}`);
38
+    });
29
 });
39
 });
30
-
31
-function addSection (courseID, semCode) {
32
-    var modal = $('#modal-section-create');
33
-    modal.modal('toggle');
34
-    modal.find('#modal-section-create-course_id').val(courseID);
35
-    modal.find('#modal-section-create-semester_code').val(semCode);
36
-}

+ 6
- 75
resources/js/dashboard.js View File

1
 // import {MDCDialog} from '@material/dialog';
1
 // import {MDCDialog} from '@material/dialog';
2
-// import {MDCSelect} from '@material/select';
3
-// import {MDCTextField} from '@material/textfield';
2
+import {MDCSelect} from '@material/select';
3
+import {MDCTextField} from '@material/textfield';
4
 // const dialog = new MDCDialog(document.querySelector('.mdc-dialog'));
4
 // const dialog = new MDCDialog(document.querySelector('.mdc-dialog'));
5
-// const select = new MDCSelect(document.querySelector('.mdc-select'));
6
-// const textfield = new MDCSelect(document.querySelector('.mdc-textfield'));
5
+const select = new MDCSelect(document.querySelector('.mdc-select'));
7
 
6
 
8
-// var fonts = {
9
-//     Roboto: {
10
-//         normal: 'fonts/Roboto-Regular.ttf',
11
-//         bold: 'fonts/Roboto-Medium.ttf',
12
-//         italics: 'fonts/Roboto-Italic.ttf',
13
-//         bolditalics: 'fonts/Roboto-.ttf',
14
-//     }
15
-// };
16
 
7
 
17
-var pdfMake = require('pdfmake/build/pdfmake.js');
18
-var pdfFonts = require('pdfmake/build/vfs_fonts.js');
19
-pdfMake.vfs = pdfFonts.pdfMake.vfs;
20
-
21
-function table(course) {
22
-    return {
23
-        widths: [100, 300],
24
-        headerRows: 2,
25
-        body: [
26
-            [{text: `${course.code} ${course.title}`, bold: true, colSpan: 2, alignment: 'center'}, {}],
27
-            ['Seccion', 'Profesor'],
28
-        ].concat( course.sections.map( function(section) {
29
-            if (section.hasOwnProperty('professors')) {
30
-                return [section.code, section.professors.map( function (professor) {
31
-                    return professor.first_name + ' ' + professor.last_name;
32
-                })];
33
-            } else {
34
-                return [section.code, ''];
35
-            }
36
-        }))
37
-    }
38
-}
39
 
8
 
40
 $(document).ready( function() {
9
 $(document).ready( function() {
41
-    // $('#button-semester-load').on('click', function (event) {
42
-    //     dialog.open();
43
-    // });
44
-    $('#button-load').on('show.bs.modal', function (event) {
45
-        // const select = new MDCSelect(document.querySelector('.mdc-select'));
10
+    $('#modal-semester').on('show.bs.modal', function (event) {
46
         var button = $(event.relatedTarget);
11
         var button = $(event.relatedTarget);
47
         var action = button.data('action');
12
         var action = button.data('action');
48
-        $('#select-semester').change( function() {
49
-            $('#modal-semester-form').submit( function(event) {
50
-                event.preventDefault();
51
-                $.ajax({
52
-                    url: `/dashboard/${action}/${select.value}`,
53
-                    type: 'get',
54
-                    success: function(data) {
55
-                        var docDef = {
56
-                            content: [
57
-                                {text: `Horario BIOL ${data.alpha}`, style: 'header'},
58
-                                {text: 'sujeto a cambios', style: 'header', fontSize: 18},
59
-                            ].concat( data.courses.map( function(course) {
60
-                                return {
61
-                                    style: 'tableStyle',
62
-                                    alignment: 'center',
63
-                                    table: table(course)
64
-                                }
65
-                            })),
66
-                            styles: {
67
-                                header: {
68
-                                    fontSize: 22,
69
-                                    bold: true,
70
-                                    alignment: 'center',
71
-                                },
72
-                                tableStyle: {
73
-                                    margin: [50,10,0,15]
74
-                                },
75
-                            }
76
-
77
-                        };
78
 
13
 
79
-                        pdfMake.createPdf(docDef).download();
80
-                    }
81
-                })
82
-            });
14
+        select.listen('MDCSelect:change', () => {
15
+            $('#modal-semester-form').attr('action', `/dashboard/${action}/${select.value}`);
83
         });
16
         });
84
 
17
 
85
     });
18
     });
86
 });
19
 });
87
-
88
-window.mdc.autoInit();

+ 5
- 1
resources/js/prof.js View File

3
         var button = $(event.relatedTarget);
3
         var button = $(event.relatedTarget);
4
         var semCode = button.data('semester-code');
4
         var semCode = button.data('semester-code');
5
         $(this).find('#modal-professor-loads-semester_code').val(semCode);
5
         $(this).find('#modal-professor-loads-semester_code').val(semCode);
6
-        console.log(1);
7
     });
6
     });
7
+    $('#modal-professor-edit').on('show.bs.modal', function (event) {
8
+        var button = $(event.relatedTarget);
9
+        var profID = button.data('professor-id');
10
+        $(this).find('#modal-professor-edit-form').attr('action', `/professor/${profID}`);
11
+    })
8
 });
12
 });

+ 3
- 6
resources/sass/app.scss View File

12
 @import '@material/typography/mdc-typography';
12
 @import '@material/typography/mdc-typography';
13
 @import '@material/button/mdc-button';
13
 @import '@material/button/mdc-button';
14
 @import '@material/icon-button/mdc-icon-button';
14
 @import '@material/icon-button/mdc-icon-button';
15
+@import '@material/checkbox/mdc-checkbox';
15
 @import '@material/data-table/mdc-data-table';
16
 @import '@material/data-table/mdc-data-table';
16
 
17
 
17
 body {
18
 body {
33
         width: 80%;
34
         width: 80%;
34
         margin: auto 10%;
35
         margin: auto 10%;
35
     }
36
     }
36
-    .mdc-card {
37
-        width: 350px;
38
-    }
39
     text-align: center;
37
     text-align: center;
40
     * {
38
     * {
41
         margin: 8px;
39
         margin: 8px;
45
     @media screen and (min-width: map-get($mdc-layout-grid-breakpoints, desktop)) {
43
     @media screen and (min-width: map-get($mdc-layout-grid-breakpoints, desktop)) {
46
         width: 80%;
44
         width: 80%;
47
         margin: auto 10%;
45
         margin: auto 10%;
48
-        text-align: center;
49
     }
46
     }
47
+    text-align: center;
50
 }
48
 }
51
 
49
 
52
 // MDC card media
50
 // MDC card media
138
 }
136
 }
139
 
137
 
140
 #prof-table {
138
 #prof-table {
141
-    height: 80vh;
142
 }
139
 }
143
 
140
 
144
 #course-table {
141
 #course-table {
145
-    @include mdc-data-table-column-widths(20px 50vw);
142
+    @include mdc-data-table-column-widths(20px 10px 56px);
146
 }
143
 }
147
 
144
 
148
 .ellipsis {
145
 .ellipsis {

+ 18
- 13
resources/views/courses/index.blade.php View File

1
 @extends('layouts.app')
1
 @extends('layouts.app')
2
 
2
 
3
-@section('title', 'Cursos')
3
+@section('title', 'Cursos | Gerencia Docente')
4
 
4
 
5
 @section('content')
5
 @section('content')
6
     <div class="mdc-layout-grid__inner">
6
     <div class="mdc-layout-grid__inner">
7
-        <div class="mdc-layout-grid__cell--span-2">
7
+        <div class="mdc-layout-grid__cell--span-2-desktop">
8
             <h1 class="mdc-typography--heading1">Cursos</h1>
8
             <h1 class="mdc-typography--heading1">Cursos</h1>
9
         </div>
9
         </div>
10
-        <div class="mdc-layout-grid__cell--span-2 mdc-layout-grid__cell--align-middle">
10
+        <div class="mdc-layout-grid__cell--span-2-desktop mdc-layout-grid__cell--align-middle">
11
             <button type="button" class="mdc-button mdc-button--outlined" data-toggle="modal" data-target="#modal-course-create">
11
             <button type="button" class="mdc-button mdc-button--outlined" data-toggle="modal" data-target="#modal-course-create">
12
                 <span class="mdc-button__label mdc-typography--button">Añadir Curso</span>
12
                 <span class="mdc-button__label mdc-typography--button">Añadir Curso</span>
13
             </button>
13
             </button>
34
                 <thead>
34
                 <thead>
35
                     <tr class="mdc-data-table__header-row">
35
                     <tr class="mdc-data-table__header-row">
36
                         <th class="mdc-data-table__header-cell mdc-elevation--z3" scope="col">Curso</th>
36
                         <th class="mdc-data-table__header-cell mdc-elevation--z3" scope="col">Curso</th>
37
+                        <th class="mdc-data-table__header-cell mdc-elevation--z2" scope="col" @guest style="display:none;" @endguest>Edit</th>
37
                         <th class="mdc-data-table__header-cell mdc-elevation--z2" scope="col">Title</th>
38
                         <th class="mdc-data-table__header-cell mdc-elevation--z2" scope="col">Title</th>
38
                         <th class="mdc-data-table__header-cell mdc-elevation--z2" scope="col">Prontuario</th>
39
                         <th class="mdc-data-table__header-cell mdc-elevation--z2" scope="col">Prontuario</th>
39
                         @foreach ($semesters as $semester)
40
                         @foreach ($semesters as $semester)
47
                         <th scope="row" class="mdc-data-table__cell mdc-elevation--z1">
48
                         <th scope="row" class="mdc-data-table__cell mdc-elevation--z1">
48
                             <a href="{{ route('course.show', ['id' => $course->id]) }}">{{ $course->code }}</a>
49
                             <a href="{{ route('course.show', ['id' => $course->id]) }}">{{ $course->code }}</a>
49
                         </th>
50
                         </th>
51
+                        <td class="mdc-data-table__cell" @guest style="display:none;" @endguest>
52
+                            <button class="mdc-icon-button material-icons" data-toggle="modal" data-target="#modal-course-edit" data-course-id="{{ $course->id }}">edit</button>
53
+                        </td>
50
                         <td class="mdc-data-table__cell" data-toggle="tooltip" title="{{ $course->title }}">{{ substr($course->title, 0, 50) . (strlen($course->title) > 50 ? '...' : '') }}</td>
54
                         <td class="mdc-data-table__cell" data-toggle="tooltip" title="{{ $course->title }}">{{ substr($course->title, 0, 50) . (strlen($course->title) > 50 ? '...' : '') }}</td>
51
                         <td class="mdc-data-table__cell">
55
                         <td class="mdc-data-table__cell">
52
                             @if (!is_null($course->syllabus))
56
                             @if (!is_null($course->syllabus))
53
-                                <a href="{{ $course->syllabus }}">PDF</a>
57
+                                <a href="{{ asset($course->syllabus) }}">PDF</a>
54
                             @else
58
                             @else
55
                                 @auth
59
                                 @auth
56
-                                    <button type="button" class="mdc-button mdc-button--dense mdc-button--unelevated" data-toggle="modal" data-target="#modal-syllabus" data-course-id="{{ $course->id }}">
60
+                                    <button type="button" class="mdc-button mdc-button--dense mdc-button--unelevated" data-toggle="modal" data-target="#modal-course-syllabus" data-course-id="{{ $course->id }}">
57
                                         <span class="mdc-button__label">Subir</span>
61
                                         <span class="mdc-button__label">Subir</span>
58
                                     </button>
62
                                     </button>
59
                                 @else
63
                                 @else
62
                             @endif
66
                             @endif
63
                         </td>
67
                         </td>
64
                         @foreach ($semesters as $semester)
68
                         @foreach ($semesters as $semester)
65
-                        <td class="mdc-data-table__cell mdc-data-table__cell--numeric"
66
-                        @if (Auth::check() && $semesters->take(-6)->contains($semester->code))
67
-                            onclick="addSection({{ $course->id . ',\'' . $semester->code }}')"
68
-                        @endif >
69
-                            {{ $course->getSemesterSectionCount($semester->code) }}
70
-                        </td>
69
+                            <td class="mdc-data-table__cell mdc-data-table__cell--numeric">
70
+                                {{ $course->getSemesterSectionCount($semester->code) }}
71
+                                @if (Auth::check() && $semesters->take(-6)->contains($semester->code))
72
+                                    <button class="mdc-icon-button material-icons" data-toggle="modal" data-target="#modal-section-create" data-course-id="{{ $course->id }}" data-semester-code="{{ $semester->code }}">add</button>
73
+                                @endif
74
+                            </td>
71
                         @endforeach
75
                         @endforeach
72
                     </tr>
76
                     </tr>
73
                 @endforeach
77
                 @endforeach
79
 
83
 
80
 @section('modals')
84
 @section('modals')
81
     @include('modal.course.create')
85
     @include('modal.course.create')
86
+    @include('modal.course.edit')
87
+    @include('modal.course.syllabus')
82
     @include('modal.section.create')
88
     @include('modal.section.create')
83
-    @include('modal.syllabus')
84
 @endsection
89
 @endsection
85
 
90
 
86
 @section('scripts')
91
 @section('scripts')
87
-    <script type="text/javascript" src="/js/course.js" defer></script>
92
+    <script type="text/javascript" src="/js/course.js"></script>
88
 @endsection
93
 @endsection

+ 12
- 6
resources/views/courses/show.blade.php View File

1
 @extends('layouts.app')
1
 @extends('layouts.app')
2
 
2
 
3
-@section('title', $course->title, 'Curso')
3
+@section('title', $course->title . ' | Gerencia Docente', 'Curso | Gerencia Docente')
4
 
4
 
5
 @section('content')
5
 @section('content')
6
     <div class="mdc-layout-grid__inner">
6
     <div class="mdc-layout-grid__inner">
36
     {{-- TODO: Add button for new section if admin --}}
36
     {{-- TODO: Add button for new section if admin --}}
37
     <div class="mdc-layout-grid__inner">
37
     <div class="mdc-layout-grid__inner">
38
         <div class="mdc-layout-grid__cell--span-12">
38
         <div class="mdc-layout-grid__cell--span-12">
39
-            @foreach ($course->semesters->unique()->sort() as $semester)
39
+            @foreach ($course->semesters->unique()->sortByDesc('code') as $semester)
40
                 {{-- @dd($semester_code) --}}
40
                 {{-- @dd($semester_code) --}}
41
                 <div class="mdc-layout-grid__inner">
41
                 <div class="mdc-layout-grid__inner">
42
                     <div class="mdc-layout-grid__cell">
42
                     <div class="mdc-layout-grid__cell">
60
                                 @foreach ($semester->sections->where('course_id', '=', $course->id)->sortBy('code') as $section)
60
                                 @foreach ($semester->sections->where('course_id', '=', $course->id)->sortBy('code') as $section)
61
                                     <tr class="mdc-data-table__row">
61
                                     <tr class="mdc-data-table__row">
62
                                         <td class="mdc-data-table__cell" @guest style="display:none;" @endguest>
62
                                         <td class="mdc-data-table__cell" @guest style="display:none;" @endguest>
63
-                                            <button class="mdc-icon-button material-icons" data-toggle="modal" data-target="#modal-section-edit" data-section-id="{{ $section->id }}">edit</button>
63
+                                            <button class="mdc-data-table__cell--checkbox mdc-icon-button material-icons" data-toggle="modal" data-target="#modal-section-edit" data-section-id="{{ $section->id }}">edit</button>
64
                                         </td>
64
                                         </td>
65
                                         <td class="mdc-data-table__cell">{{ $section->code }}</td>
65
                                         <td class="mdc-data-table__cell">{{ $section->code }}</td>
66
                                         <td class="mdc-data-table__cell">
66
                                         <td class="mdc-data-table__cell">
74
                                         <td class="mdc-data-table__cell">
74
                                         <td class="mdc-data-table__cell">
75
                                             {{-- TODO: Add buton for uploading syllabus if admin --}}
75
                                             {{-- TODO: Add buton for uploading syllabus if admin --}}
76
                                             @if (!is_null($section->syllabus))
76
                                             @if (!is_null($section->syllabus))
77
-                                                <a href="{{ $section->syllabus }}">PDF</a>
77
+                                                <a href="{{ asset($section->syllabus) }}">PDF</a>
78
                                             @else
78
                                             @else
79
-                                                n/a
79
+                                                @auth
80
+                                                    <button type="button" class="mdc-button mdc-button--dense mdc-button--unelevated" data-toggle="modal" data-target="#modal-section-syllabus" data-section-id="{{ $section->id }}">
81
+                                                        <span class="mdc-button__label">Subir</span>
82
+                                                    </button>
83
+                                                @else
84
+                                                    n/a
85
+                                                @endauth
80
                                             @endif
86
                                             @endif
81
                                         </td>
87
                                         </td>
82
                                         <td class="mdc-data-table__cell mdc-data-table__cell--numeric">
88
                                         <td class="mdc-data-table__cell mdc-data-table__cell--numeric">
110
 @section('modals')
116
 @section('modals')
111
     @include('modal.course.edit')
117
     @include('modal.course.edit')
112
     @include('modal.section.edit')
118
     @include('modal.section.edit')
113
-    @include('modal.syllabus')
119
+    @include('modal.section.syllabus')
114
 @endsection
120
 @endsection
115
 
121
 
116
 @section('scripts')
122
 @section('scripts')

+ 4
- 2
resources/views/dashboard.blade.php View File

1
 @extends('layouts.app')
1
 @extends('layouts.app')
2
 
2
 
3
+@section('title', 'Dashboard | Gerencia Docente')
4
+
3
 @section('content')
5
 @section('content')
4
 <div class="mdc-layout-grid__inner dashboard-grid">
6
 <div class="mdc-layout-grid__inner dashboard-grid">
5
     <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
7
     <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
22
                 </a>
24
                 </a>
23
             </div>
25
             </div>
24
             <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-4">
26
             <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-4">
25
-                <a data-toggle="modal" data-target="#modal-semester" data-action="schedule">
27
+                <a data-toggle="modal" data-target="#modal-semester" data-action="schedule" data-title="Escoge un semestre">
26
                     <div class="mdc-card">
28
                     <div class="mdc-card">
27
                         <div class="mdc-card__primary-action" tabindex="0">
29
                         <div class="mdc-card__primary-action" tabindex="0">
28
                             <div id="dash-button-schedule" class="mdc-card__media mdc-card__media--square"></div>
30
                             <div id="dash-button-schedule" class="mdc-card__media mdc-card__media--square"></div>
29
                             <hr>
31
                             <hr>
30
                             <div>
32
                             <div>
31
-                                <h2 class="mdc-typography--heading2">Generar informe de cargas</h2>
33
+                                <h2 class="mdc-typography--heading2">Generar horario de semestre</h2>
32
                             </div>
34
                             </div>
33
                         </div>
35
                         </div>
34
                     </div>
36
                     </div>

+ 1
- 1
resources/views/layouts/app.blade.php View File

7
     <!-- CSRF Token -->
7
     <!-- CSRF Token -->
8
     <meta name="csrf-token" content="{{ csrf_token() }}">
8
     <meta name="csrf-token" content="{{ csrf_token() }}">
9
 
9
 
10
-    <title>{{ config('app.name', 'Laravel') }}</title>
10
+    <title>@yield('title')</title>
11
 
11
 
12
     <!-- Fonts -->
12
     <!-- Fonts -->
13
     <link rel="dns-prefetch" href="//fonts.gstatic.com">
13
     <link rel="dns-prefetch" href="//fonts.gstatic.com">

+ 11
- 16
resources/views/modal/course/create.blade.php View File

8
         @csrf
8
         @csrf
9
         <div class="row">
9
         <div class="row">
10
             <div class="form-group col-sm-6">
10
             <div class="form-group col-sm-6">
11
-                <label for="modal-course-create-code-field">Codificacion:</label>
12
-                <input id="modal-course-create-code-field" type="text" class="form-control" name="code" maxlength="8" minlength="8" size="8" required>
11
+                <label for="modal-course-create-code">Codificacion:</label>
12
+                <input id="modal-course-create-code" type="text" class="form-control" name="code" maxlength="8" minlength="8" size="8" required>
13
             </div>
13
             </div>
14
         </div>
14
         </div>
15
         <div class="form-group row">
15
         <div class="form-group row">
16
             <div class="col-sm-12">
16
             <div class="col-sm-12">
17
-                <label for="modal-course-create-title-field">Titulo:</label>
18
-                <input id="modal-course-create-title-field" type="text" class="form-control" name="title" maxlength="255">
17
+                <label for="modal-course-create-title">Titulo:</label>
18
+                <input id="modal-course-create-title" type="text" class="form-control" name="title" maxlength="255">
19
             </div>
19
             </div>
20
         </div>
20
         </div>
21
         <div class="row">
21
         <div class="row">
22
             <div class="form-group col-sm-8">
22
             <div class="form-group col-sm-8">
23
-                <label for="modal-course-create-syllabus-field">Prontuario:</label>
24
-                <input id="modal-course-create-syllabus-field" type="file" name="syllabus">
23
+                <label for="modal-course-create-syllabus">Prontuario:</label>
24
+                <input id="modal-course-create-syllabus" type="file" name="syllabus">
25
             </div>
25
             </div>
26
             <div class="form-group col-sm-4">
26
             <div class="form-group col-sm-4">
27
-                <label for="modal-dept-field">Departamento:</label>
28
-                <select id="modal-dept-field" class="form-control" name="dept_id" default="1" required>
27
+                <label for="modal-course-create-dept">Departamento:</label>
28
+                <select id="modal-course-create-dept" class="form-control" name="dept_id" default="1" required>
29
                     @foreach (App\Department::all() as $department)
29
                     @foreach (App\Department::all() as $department)
30
-                        <option value="{{ $department->id }}"
31
-                            @if ($department->id === 1)
32
-                                selected
33
-                            @else
34
-                            {{-- TODO: Check if this should be displayed --}}
35
-                                disabled hidden
36
-                            @endif
37
-                            >{{ $department->name }}</option>
30
+                        <option value="{{ $department->id }}" @if ($department->id === 1) selected @else disabled hidden @endif >
31
+                            {{ $department->name }}
32
+                        </option>
38
                     @endforeach
33
                     @endforeach
39
                 </select>
34
                 </select>
40
             </div>
35
             </div>

+ 23
- 22
resources/views/modal/course/edit.blade.php View File

1
 @extends('layouts.modal')
1
 @extends('layouts.modal')
2
 
2
 
3
 @section('modal_id'){{ 'modal-course-edit' }}@overwrite
3
 @section('modal_id'){{ 'modal-course-edit' }}@overwrite
4
-@section('modal_title'){{ 'Editando Curso' }}@overwrite
4
+@section('modal_title'){{ 'Editando curso' }}@overwrite
5
 
5
 
6
 @section('modal_body')
6
 @section('modal_body')
7
-    <form method="POST" action="/course" enctype="multipart/form-data" id='modal-course-edit-form'>
7
+    <form method="POST" enctype="multipart/form-data" id='modal-course-edit-form'>
8
         @method('PATCH')
8
         @method('PATCH')
9
         @csrf
9
         @csrf
10
-        <input type="hidden" name="id">
10
+        <input type="hidden" name="id" id="modal-course-edit-id">
11
+        <div class="row">
12
+            <div class="form-group col-6">
13
+                <label for="modal-course-edit-code">Codificacion:</label>
14
+                <input id="modal-course-edit-code" type="text" class="form-control" name="code" maxlength="8" minlength="8" size="8">
15
+            </div>
16
+        </div>
17
+        <div class="row">
18
+            <div class="form-group col-12">
19
+                <label for="modal-course-edit-title">Titulo:</label>
20
+                <input id="modal-course-edit-title" type="text" class="form-control" name="title" maxlength="255">
21
+            </div>
22
+        </div>
11
         <div class="row">
23
         <div class="row">
12
             <div class="form-group col-8">
24
             <div class="form-group col-8">
13
-                <label for="modal-course-edit-title-field">Titulo:</label>
14
-                <input id="modal-course-edit-title-field" type="text" class="form-control" name="title" maxlength="255">
25
+                <label for="modal-course-edit-syllabus">Prontuario:</label>
26
+                <input type="file" id="modal-course-edit-syllabus" name="syllabus">
15
             </div>
27
             </div>
16
             <div class="form-group col-4">
28
             <div class="form-group col-4">
17
-                <label for="modal-course-edit-dept-field">Departamento:</label>
18
-                <select id="modal-course-edit-dept-field" class="form-control" name="dept_id" default="1">
29
+                <label for="modal-course-edit-dept">Departamento:</label>
30
+                <select id="modal-course-edit-dept" class="form-control" name="dept_id" default="1">
19
                     @foreach (App\Department::all() as $department)
31
                     @foreach (App\Department::all() as $department)
20
-                        <option value="{{ $department->id }}"
21
-                            @if ($department->id === 1)
22
-                                selected
23
-                            @else
24
-                            {{-- TODO: Check if this should be displayed --}}
25
-                                disabled hidden
26
-                            @endif
27
-                            >{{ $department->name }}</option>
32
+                        <option value="{{ $department->id }}" @if ($department->id === 1) selected @else disabled hidden @endif >
33
+                            {{ $department->name }}
34
+                        </option>
28
                     @endforeach
35
                     @endforeach
29
                 </select>
36
                 </select>
30
             </div>
37
             </div>
31
         </div>
38
         </div>
32
-        <div class="row">
33
-            <div class="form-group col-8">
34
-                <label for="modal-course-edit-syllabus-field">Prontuario:</label>
35
-                <input type="file" id="modal-course-edit-syllabus-field" name="syllabus">
36
-            </div>
37
-        </div>
38
     </form>
39
     </form>
39
 @overwrite
40
 @overwrite
40
 
41
 
41
-@section('modal_submit_text'){{ 'Crear curso' }}@overwrite
42
+@section('modal_submit_text'){{ 'Editar' }}@overwrite
42
 @section('modal_submit')
43
 @section('modal_submit')
43
     function(){document.getElementById('modal-course-edit-form').submit()}
44
     function(){document.getElementById('modal-course-edit-form').submit()}
44
 @overwrite
45
 @overwrite

+ 22
- 0
resources/views/modal/course/syllabus.blade.php View File

1
+@extends('layouts.modal')
2
+
3
+@section('modal_id'){{ 'modal-course-syllabus' }}@overwrite
4
+@section('modal_title'){{ 'Anadiendo prontuario' }}@overwrite
5
+
6
+@section('modal_body')
7
+    <form method="POST" enctype="multipart/form-data" id='modal-course-syllabus-form'>
8
+        @method('PATCH')
9
+        @csrf
10
+        {{-- <input type="hidden" name="course_id" id="modal-course-syllabus-course_id"> --}}
11
+        <div class="row">
12
+            <div class="form-group col-12">
13
+                <input type="file" id="modal-course-syllabus-field" name="syllabus" required>
14
+            </div>
15
+        </div>
16
+    </form>
17
+@overwrite
18
+
19
+@section('modal_submit_text'){{ 'Subir prontuario' }}@overwrite
20
+@section('modal_submit')
21
+    function(){document.getElementById('modal-course-syllabus-form').submit()}
22
+@overwrite

+ 1
- 1
resources/views/modal/professor/edit.blade.php View File

4
 @section('modal_title'){{ 'Editando profesor' }}@overwrite
4
 @section('modal_title'){{ 'Editando profesor' }}@overwrite
5
 
5
 
6
 @section('modal_body')
6
 @section('modal_body')
7
-    <form method="POST" action="/professor" enctype="multipart/form-data" id='modal-professor-edit-form'>
7
+    <form method="POST" enctype="multipart/form-data" id='modal-professor-edit-form'>
8
         @method('PATCH')
8
         @method('PATCH')
9
         @csrf
9
         @csrf
10
         <input type="hidden" name="id">
10
         <input type="hidden" name="id">

+ 2
- 2
resources/views/modal/section/create.blade.php View File

10
         <input id="modal-section-create-semester_code" type="hidden" name="semester_code">
10
         <input id="modal-section-create-semester_code" type="hidden" name="semester_code">
11
         <div class="row">
11
         <div class="row">
12
             <div class="form-group col-6">
12
             <div class="form-group col-6">
13
-                <label for="modal-section-create-amount-field">Cantidad de Secciones:</label>
14
-                <input id="modal-section-create-amount-field" type="number" class="form-control" name="section_count" min="1" required>
13
+                <label for="modal-section-create-amount">Cantidad de Secciones:</label>
14
+                <input id="modal-section-create-amount" type="number" class="form-control" name="section_count" min="1" required>
15
             </div>
15
             </div>
16
         </div>
16
         </div>
17
     </form>
17
     </form>

resources/views/modal/syllabus.blade.php → resources/views/modal/section/syllabus.blade.php View File

1
 @extends('layouts.modal')
1
 @extends('layouts.modal')
2
 
2
 
3
-@section('modal_id'){{ 'modal-syllabus' }}@overwrite
3
+@section('modal_id'){{ 'modal-section-syllabus' }}@overwrite
4
 @section('modal_title'){{ 'Anadiendo prontuario' }}@overwrite
4
 @section('modal_title'){{ 'Anadiendo prontuario' }}@overwrite
5
 
5
 
6
 @section('modal_body')
6
 @section('modal_body')
7
-    <form method="POST" enctype="multipart/form-data" id='modal-syllabus-form'>
7
+    <form method="POST" enctype="multipart/form-data" id='modal-section-syllabus-form'>
8
         @method('PATCH')
8
         @method('PATCH')
9
         @csrf
9
         @csrf
10
-        {{-- <input type="hidden" name="course_id" id="modal-syllabus-course_id"> --}}
11
         <div class="row">
10
         <div class="row">
12
             <div class="form-group col-12">
11
             <div class="form-group col-12">
13
-                <input type="file" id="modal-syllabus-field" name="syllabus" required>
12
+                <input type="file" id="modal-section-syllabus-field" name="syllabus" required>
14
             </div>
13
             </div>
15
         </div>
14
         </div>
16
     </form>
15
     </form>
18
 
17
 
19
 @section('modal_submit_text'){{ 'Subir prontuario' }}@overwrite
18
 @section('modal_submit_text'){{ 'Subir prontuario' }}@overwrite
20
 @section('modal_submit')
19
 @section('modal_submit')
21
-    function(){document.getElementById('modal-syllabus-form').submit()}
20
+    function(){document.getElementById('modal-section-syllabus-form').submit()}
22
 @overwrite
21
 @overwrite

+ 1
- 1
resources/views/modal/semester.blade.php View File

1
 @extends('layouts.modal')
1
 @extends('layouts.modal')
2
 
2
 
3
 @section('modal_id'){{ 'modal-semester' }}@overwrite
3
 @section('modal_id'){{ 'modal-semester' }}@overwrite
4
-@section('modal_title'){{ 'Creando curso nuevo' }}@overwrite
4
+@section('modal_title'){{ 'Escoge un semestre' }}@overwrite
5
 
5
 
6
 @section('modal_body')
6
 @section('modal_body')
7
     <form method="GET" id="modal-semester-form">
7
     <form method="GET" id="modal-semester-form">

+ 12
- 3
resources/views/professors/index.blade.php View File

1
 @extends('layouts.app')
1
 @extends('layouts.app')
2
 
2
 
3
-@section('title', 'Profesores')
3
+@section('title', 'Profesores | Gerencia Docente')
4
 
4
 
5
 {{-- {{dd($professors)}} --}}
5
 {{-- {{dd($professors)}} --}}
6
 @section('content')
6
 @section('content')
7
     <div class="mdc-layout-grid__inner">
7
     <div class="mdc-layout-grid__inner">
8
-        <div class="mdc-layout-grid__cell--span-2">
8
+        <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-2-desktop">
9
             <h1>Profesores</h1>
9
             <h1>Profesores</h1>
10
         </div>
10
         </div>
11
-        <div class="mdc-layout-grid__cell--span-2 mdc-layout-grid__cell--align-middle">
11
+        <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-2-desktop">
12
             @auth
12
             @auth
13
                 <button type="button" class="mdc-button mdc-button--outlined" data-toggle="modal" data-target="#modal-professor-create">
13
                 <button type="button" class="mdc-button mdc-button--outlined" data-toggle="modal" data-target="#modal-professor-create">
14
                     <span class="mdc-button__label">Añadir Profesor</span>
14
                     <span class="mdc-button__label">Añadir Profesor</span>
37
                 <thead>
37
                 <thead>
38
                     <tr class="mdc-data-table__header-row">
38
                     <tr class="mdc-data-table__header-row">
39
                         <th class="mdc-data-table__header-cell mdc-elevation--z3" scope="col">Profesor</th>
39
                         <th class="mdc-data-table__header-cell mdc-elevation--z3" scope="col">Profesor</th>
40
+                        <th class="mdc-data-table__header-cell mdc-elevation--z2" scope="col" @guest style="display:none;" @endguest>Edit</th>
40
                         @foreach ($semesters as $semester)
41
                         @foreach ($semesters as $semester)
41
                             <th class="mdc-data-table__header-cell mdc-elevation--z2" scope="col">Carga Total<br>{{ $semester->alpha }}</th>
42
                             <th class="mdc-data-table__header-cell mdc-elevation--z2" scope="col">Carga Total<br>{{ $semester->alpha }}</th>
42
                         @endforeach
43
                         @endforeach
48
                             <th scope="row" class="mdc-data-table__cell mdc-elevation--z1">
49
                             <th scope="row" class="mdc-data-table__cell mdc-elevation--z1">
49
                                 <a href="/professor/{{ $professor->id }}">{{ $professor->last_name . ', ' . $professor->first_name }}</a>
50
                                 <a href="/professor/{{ $professor->id }}">{{ $professor->last_name . ', ' . $professor->first_name }}</a>
50
                             </th>
51
                             </th>
52
+                            <td class="mdc-data-table__cell" @guest style="display:none;" @endguest>
53
+                                <button class="mdc-icon-button material-icons" data-toggle="modal" data-target="#modal-professor-edit" data-professor-id="{{ $professor->id }}">edit</button>
54
+                            </td>
51
                             @foreach ($semesters as $semester)
55
                             @foreach ($semesters as $semester)
52
                                 <td class="mdc-data-table__cell mdc-data-table__cell--numeric">
56
                                 <td class="mdc-data-table__cell mdc-data-table__cell--numeric">
53
                                     @php
57
                                     @php
74
 
78
 
75
 @section('modals')
79
 @section('modals')
76
     @include('modal.professor.create')
80
     @include('modal.professor.create')
81
+    @include('modal.professor.edit')
82
+@endsection
83
+
84
+@section('scripts')
85
+    <script type="text/javascript" src="/js/prof.js"></script>
77
 @endsection
86
 @endsection

+ 1
- 1
resources/views/professors/show.blade.php View File

1
 @extends('layouts.app')
1
 @extends('layouts.app')
2
 
2
 
3
-@section('title', $professor->full_name)
3
+@section('title', $professor->full_name . ' | Gerencia Docente')
4
 
4
 
5
 @section('content')
5
 @section('content')
6
     <div class="mdc-layout-grid__inner">
6
     <div class="mdc-layout-grid__inner">

+ 1
- 1
resources/views/welcome.blade.php View File

1
 @extends('layouts.app')
1
 @extends('layouts.app')
2
 
2
 
3
-@section('title', 'Home')
3
+@section('title', 'Gerencia Docente')
4
 
4
 
5
 @section('content')
5
 @section('content')
6
 {{-- TODO: Home page content --}}
6
 {{-- TODO: Home page content --}}

+ 1
- 0
webpack.mix.js View File

16
     .js('resources/js/prof.js', 'public/js')
16
     .js('resources/js/prof.js', 'public/js')
17
     .js('resources/js/course.js', 'public/js')
17
     .js('resources/js/course.js', 'public/js')
18
     .js('resources/js/dashboard.js', 'public/js')
18
     .js('resources/js/dashboard.js', 'public/js')
19
+    .js('resources/js/createPDF.js', 'public/js')
19
     .sass('resources/sass/app.scss', 'public/css', {
20
     .sass('resources/sass/app.scss', 'public/css', {
20
         includePaths: [path.resolve(__dirname, 'node_modules')]
21
         includePaths: [path.resolve(__dirname, 'node_modules')]
21
     });
22
     });