rubbish_code 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +29 -29
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d740f9c6240c70d88d6c8871c16c2d741f84d68195082042e5a7c35251904f56
|
4
|
+
data.tar.gz: bf470d916acc2f7c9492ef2d0c635c8a521ed474b203dd41f855ec5c508bca71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3de6e75f75aedbba00944a4e0260a9646f06487ee8225b57b74d0701288243c20ab2b36541024ed978486f8f02ce8ebc67f858aea38faf411fe3f5e841142ee
|
7
|
+
data.tar.gz: bbba813b161d589bbde9ef024e63820c04cd7fa8bc36ca317acd54221d26bd3721163be032d3ed9b3fbd0cc73c5c5160c5142feab1da44c63a3d58d16382c092
|
data/LICENSE.txt
CHANGED
@@ -2,36 +2,36 @@ MIT License
|
|
2
2
|
|
3
3
|
Copyright (c) 2023 NullExp
|
4
4
|
|
5
|
-
|
5
|
+
The TabStudentsController class is a controller for working with the interface for interacting with objects of the Student type.
|
6
6
|
|
7
|
-
|
7
|
+
Methods of the class:
|
8
8
|
|
9
|
-
1. initialize(view) -
|
10
|
-
DataListStudentShort,
|
11
|
-
|
12
|
-
2. on_view_created
|
13
|
-
|
14
|
-
3. show_view
|
15
|
-
4. show_modal_add
|
16
|
-
|
17
|
-
|
18
|
-
5. show_modal_edit(current_page, per_page, selected_row)
|
19
|
-
|
20
|
-
(per_page)
|
21
|
-
|
22
|
-
StudentInputForm
|
23
|
-
6. delete_selected(current_page, per_page, selected_row)
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
7. refresh_data(page, per_page)
|
28
|
-
|
29
|
-
|
30
|
-
|
9
|
+
1. initialize(view) - constructor of the class, takes a view object and creates an empty object of the type
|
10
|
+
DataListStudentShort, which is assigned the add_listener method with the view argument, as a result of which the view
|
11
|
+
is set as a listener for data state change events (data_list).
|
12
|
+
2. on_view_created is a method that initializes an object of the StudentRepository type, which is used for interaction
|
13
|
+
with the database, and if an error occurs connecting to the database displays a dialog box with an error message.
|
14
|
+
3. show_view is a method that displays the main application window.
|
15
|
+
4. show_modal_add is a method that displays a modal window for creating a new student record.
|
16
|
+
Creates an instance of the StudentInputFormControllerCreate controller and passes it a reference to the current controller,
|
17
|
+
creates an object of the StudentInputForm type and passes it a reference to the controller. Then it displays the modal window.
|
18
|
+
5. show_modal_edit(current_page, per_page, selected_row) is a method that displays the modal window for
|
19
|
+
editing a student record. Takes the values of the current page (current_page), the number of records on the page
|
20
|
+
(per_page) and the selected row (selected_row). Calculates the number of the selected student and selects his id from
|
21
|
+
the DataListStudentShort object, then passes it to the StudentInputFormControllerEdit controller, creates an object of the type
|
22
|
+
StudentInputForm and passes it a link to the controller. After that, it displays a modal window.
|
23
|
+
6. delete_selected(current_page, per_page, selected_row) is a method that deletes the selected student record.
|
24
|
+
Takes the values of the current page (current_page), the number of records on the page (per_page)
|
25
|
+
and the selected row (selected_row). Calculates the number of the selected student and selects his id from the DataListStudentShort object,
|
26
|
+
then deletes the record using the remove_student method from the StudentRepository object.
|
27
|
+
7. refresh_data(page, per_page) is a method that updates the data in the list of students. Takes the values
|
28
|
+
of the current page (page) and the number of entries on the page (per_page).
|
29
|
+
Calls a method of the StudentRepository paginated_short_students type to get data in the DataListStudentShort object format.
|
30
|
+
Updates information about the number of students using the update_student_count method of the view.
|
31
31
|
|
32
|
-
|
33
|
-
|
32
|
+
The Student_Input_Form_Controller_Edit controller and Student_Input_Form_Controller_Create are forms
|
33
|
+
for modifying and creating students into the database, respectively.
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
The student, student_base and student_short models are a student model with various fields and methods
|
36
|
+
for setting, receiving and processing information. Student_base - super class,
|
37
|
+
and student_short is the short information about the student.
|