Commit 1d7cbfb 1 parent 5325f90 commit 1d7cbfb Copy full SHA for 1d7cbfb
File tree 3 files changed +37
-1
lines changed
3 files changed +37
-1
lines changed Original file line number Diff line number Diff line change 32
32
TypeOfVerbalRegulationWidget ,
33
33
ValueWidgetManager ,
34
34
)
35
+ from arho_feature_template .project .layers .code_layers import PlanRegulationTypeLayer
35
36
from arho_feature_template .utils .misc_utils import LANGUAGE , get_layer_by_name
36
37
37
38
ui_path = resources .files (__package__ ) / "plan_regulation_widget.ui"
@@ -93,7 +94,7 @@ def _init_widgets(self):
93
94
if self .config .default_value :
94
95
self ._add_widget (RequiredFieldLabel ("Arvo" ), self .value_widget_manager .value_widget )
95
96
96
- if self .config .regulation_code == "sanallinenMaarays" :
97
+ if self .config .regulation_code in PlanRegulationTypeLayer . verbal_regulation_codes :
97
98
for type_id in self .regulation .verbal_regulation_type_ids :
98
99
self ._add_type_of_verbal_regulation (type_id )
99
100
if len (self .type_of_verbal_regulation_widgets ) == 0 :
Original file line number Diff line number Diff line change @@ -88,6 +88,17 @@ class PlanRegulationTypeLayer(AbstractCodeLayer):
88
88
# TODO: Implement. Currently, this is not used and information needed to construct plan regulation codes
89
89
# is defined in a separate config file
90
90
category_only_codes : ClassVar [list [str ]] = []
91
+ verbal_regulation_codes : ClassVar [list [str ]] = [
92
+ "sanallinenMaarays" ,
93
+ "rakentamisrajoitusYleiskaava" ,
94
+ "rakentamisrajoitusMaakuntakaava" ,
95
+ "maaraAikainenRakentamisrajoitus" ,
96
+ "toimenpiderajoitus" ,
97
+ "maaraAikainenKieltoRakennuksenRakentamiseksi" ,
98
+ "suunnittelumaarays" ,
99
+ "rakentamismaarays" ,
100
+ "suojelumaarays" ,
101
+ ]
91
102
92
103
@classmethod
93
104
def get_regulation_type_by_id (cls , _id : str ) -> str | None :
Original file line number Diff line number Diff line change @@ -226,3 +226,27 @@ plan_regulations:
226
226
# Sanallinen määräys
227
227
- regulation_code : sanallinenMaarays
228
228
value_type : LocalizedText
229
+
230
+ - regulation_code : rakentamisrajoitusYleiskaava
231
+ value_type : LocalizedText
232
+
233
+ - regulation_code : rakentamisrajoitusMaakuntakaava
234
+ value_type : LocalizedText
235
+
236
+ - regulation_code : maaraAikainenRakentamisrajoitus
237
+ value_type : LocalizedText
238
+
239
+ - regulation_code : toimenpiderajoitus
240
+ value_type : LocalizedText
241
+
242
+ - regulation_code : maaraAikainenKieltoRakennuksenRakentamiseksi
243
+ value_type : LocalizedText
244
+
245
+ - regulation_code : suunnittelumaarays
246
+ value_type : LocalizedText
247
+
248
+ - regulation_code : rakentamismaarays
249
+ value_type : LocalizedText
250
+
251
+ - regulation_code : suojelumaarays
252
+ value_type : LocalizedText
You can’t perform that action at this time.
0 commit comments