feat: share village needs with helpers
This commit is contained in:
@@ -99,6 +99,15 @@ func get_open_opportunity() -> OpportunityStateRecord:
|
||||
return open_records[0] if not open_records.is_empty() else null
|
||||
|
||||
|
||||
func get_open_trigger_event_id() -> int:
|
||||
var opportunity := get_open_opportunity()
|
||||
return (
|
||||
opportunity.get_trigger_event_id()
|
||||
if opportunity != null
|
||||
else OpportunityStateRecord.NO_EVENT_ID
|
||||
)
|
||||
|
||||
|
||||
func get_latest() -> OpportunityStateRecord:
|
||||
var sorted := get_all_sorted()
|
||||
return sorted[-1] if not sorted.is_empty() else null
|
||||
|
||||
Reference in New Issue
Block a user