aboutsummaryrefslogtreecommitdiff
path: root/logic
diff options
context:
space:
mode:
authordam <dam@gudinoff>2022-09-02 01:12:19 +0000
committerdam <dam@gudinoff>2022-09-02 01:12:19 +0000
commit8b19e21012092619285bae0e44a0abb3f274ed66 (patch)
tree90ad05658b7b473bb9d9be3d31f635fea00e5c00 /logic
parentf027893414e9e81eb5b91a5556d8833652525f14 (diff)
downloadsurgery-log-8b19e21012092619285bae0e44a0abb3f274ed66.tar.zst
surgery-log-8b19e21012092619285bae0e44a0abb3f274ed66.zip
Fixed export settings to include all required scripts. Renamed is_urgency to is_urgent.v1.4
Diffstat (limited to 'logic')
-rw-r--r--logic/database.gd2
-rw-r--r--logic/database_entry.gd4
-rw-r--r--logic/stage.gd6
3 files changed, 6 insertions, 6 deletions
diff --git a/logic/database.gd b/logic/database.gd
index 5d8792f..26f88b9 100644
--- a/logic/database.gd
+++ b/logic/database.gd
@@ -252,7 +252,7 @@ static func import_csv(file_path: String) -> Array:
DatabaseEntry.set_entry_date(entry, field_value)
"date_year", "date_month", "date_day":
entry[field_name] = int(field_value)
- "is_urgency":
+ "is_urgent":
entry[field_name] = true if field_value.strip_edges().to_lower() == "true" else false
_:
if DatabaseEntry.ENTRY_PROTOTYPE.has(field_name):
diff --git a/logic/database_entry.gd b/logic/database_entry.gd
index 8b0c51f..3a78505 100644
--- a/logic/database_entry.gd
+++ b/logic/database_entry.gd
@@ -17,7 +17,7 @@ const ENTRY_PROTOTYPE: Dictionary = {
"sub_sub_type": "",
"pathology": "",
"intervention": "",
- "is_urgency": false,
+ "is_urgent": false,
"notes": "",
}
@@ -40,7 +40,7 @@ static func instance_entry(params: Dictionary = {}) -> Dictionary:
new_entry.sub_sub_type = params.get("sub_sub_type", "")
new_entry.pathology = params.get("pathology", "")
new_entry.intervention = params.get("intervention", "")
- new_entry.is_urgency = params.get("is_urgency", false)
+ new_entry.is_urgent = params.get("is_urgent", false)
new_entry.notes = params.get("notes", "")
return new_entry
diff --git a/logic/stage.gd b/logic/stage.gd
index e6d9474..e1eafba 100644
--- a/logic/stage.gd
+++ b/logic/stage.gd
@@ -35,7 +35,7 @@ onready var sub_type := get_node("controls/sub_type") as OptionSet
onready var sub_sub_type := get_node("controls/sub_sub_type") as OptionSet
onready var pathology := get_node("controls/pathology") as OptionSet
onready var intervention := get_node("controls/intervention") as OptionSet
-onready var is_urgency := get_node("controls/is_urgency") as Button
+onready var is_urgent := get_node("controls/is_urgent") as Button
onready var notes := get_node("controls/notes") as LineEdit
onready var save_button := get_node("controls/buttons/save") as Button
onready var discard_button := get_node("controls/buttons/discard") as Button
@@ -138,7 +138,7 @@ func set_stage(entry: Dictionary, title: String):
sub_sub_type.text = entry.sub_sub_type
pathology.text = entry.pathology
intervention.text = entry.intervention
- is_urgency.pressed = entry.is_urgency
+ is_urgent.pressed = entry.is_urgent
notes.text = entry.notes
self.scroll_vertical = 0
@@ -158,7 +158,7 @@ func get_stage() -> Dictionary:
"sub_sub_type": sub_sub_type.text,
"pathology": pathology.text,
"intervention": intervention.text,
- "is_urgency": is_urgency.pressed,
+ "is_urgent": is_urgent.pressed,
"notes": notes.text,
}
return entry