17
17
from arho_feature_template .gui .components .general_regulation_group_widget import GeneralRegulationGroupWidget
18
18
19
19
# from arho_feature_template.gui.components.plan_regulation_group_widget import RegulationGroupWidget
20
- from arho_feature_template .gui .components .lifecycle_table_widget import LifecycleTableWidget
21
20
from arho_feature_template .gui .components .plan_document_widget import DocumentWidget
22
21
from arho_feature_template .project .layers .code_layers import (
23
22
LifeCycleStatusLayer ,
@@ -55,10 +54,6 @@ class PlanAttributeForm(QDialog, FormClass): # type: ignore
55
54
documents_layout : QVBoxLayout
56
55
add_document_btn : QPushButton
57
56
58
- lifecycle_tab_layout : QVBoxLayout
59
- add_lifecycle_button : QPushButton
60
- # delete_lifecycle: QPushButton
61
-
62
57
button_box : QDialogButtonBox
63
58
64
59
def __init__ (self , plan : Plan , _regulation_group_libraries : list [RegulationGroupLibrary ], parent = None ):
@@ -116,13 +111,6 @@ def __init__(self, plan: Plan, _regulation_group_libraries: list[RegulationGroup
116
111
self .add_document_btn .clicked .connect (self .add_new_document )
117
112
self .add_document_btn .setIcon (QgsApplication .getThemeIcon ("mActionAdd.svg" ))
118
113
119
- # Lifecycle table setup
120
- self .lifecycle_table = LifecycleTableWidget (self .plan .lifecycles )
121
- self .lifecycle_tab_layout .insertWidget (1 , self .lifecycle_table )
122
- self .lifecycle_table .table_edited .connect (self ._check_required_fields )
123
- self .add_lifecycle_button .clicked .connect (self .lifecycle_table .add_new_lifecycle_row )
124
- # self.delete_lifecycle_button.clicked.connect(self.delete_lifecycle_row)
125
-
126
114
self .button_box .button (QDialogButtonBox .Ok ).setEnabled (False )
127
115
self .button_box .accepted .connect (self ._on_ok_clicked )
128
116
@@ -136,7 +124,6 @@ def _check_required_fields(self) -> None:
136
124
and self .organisation_combo_box .value () is not None
137
125
and self .lifecycle_status_combo_box .value () is not None
138
126
and all (document_widget .is_ok () for document_widget in self .document_widgets )
139
- and self .lifecycle_table .is_ok ()
140
127
):
141
128
ok_button .setEnabled (True )
142
129
else :
@@ -213,8 +200,7 @@ def into_model(self) -> Plan:
213
200
record_number = self .record_number_line_edit .text () or None ,
214
201
producers_plan_identifier = self .producers_plan_identifier_line_edit .text () or None ,
215
202
matter_management_identifier = self .matter_management_identifier_line_edit .text () or None ,
216
- lifecycle_status_id = self .lifecycle_status_combo_box .value (), # Need to get the lifecycle with the latest lifecycle
217
- lifecycles = self .lifecycle_table .into_model (),
203
+ lifecycle_status_id = self .lifecycle_status_combo_box .value (),
218
204
general_regulations = [reg_group_widget .into_model () for reg_group_widget in self .regulation_group_widgets ],
219
205
documents = [document_widget .into_model () for document_widget in self .document_widgets ],
220
206
geom = self .plan .geom ,
0 commit comments