AwardsRecommendationEditForm

Awards Recommendation Edit Form Controller

Manages edit interface for award recommendations with state-driven form behavior, dynamic field validation, member discovery, and Turbo Frame integration.

Targets: scaMember, notFound, branch, externalLinks, domain, award, reason, gatherings, specialty, state, planToGiveBlock, planToGiveGathering, givenBlock, recId, turboFrame, givenDate, closeReason, closeReasonBlock, stateRulesBlock Values: publicProfileUrl (String), awardListUrl (String), formUrl (String), turboFrameUrl (String), gatheringsUrl (String) Outlets: outlet-btn

State rules parsed from stateRulesBlock JSON control field Visible/Required/Disabled states.

Constructor

new AwardsRecommendationEditForm()

Methods

connect()

Store initial gathering value on connect for persistence through updates.

givenDateTargetConnected()

Store initial given date value on target connect.

loadMember()

Fetch and display member profile external links.

loadScaMemberInfo()

Handle member field change, load profile or show branch field if not found.

optionsForFetch()

Get standard fetch options with JSON headers.

outletBtnOutletConnected()

Register listener when outlet-btn connects.

outletBtnOutletDisconnected()

Remove listener when outlet-btn disconnects.

planToGiveGatheringTargetConnected()

Store initial gathering value on target connect.

populateAwardDescriptions()

Fetch awards for domain and populate award selection with autocomplete.

populateSpecialties()

Update specialty dropdown based on selected award's configuration.

recIdTargetConnected()

Update form action URL when recId target connects.

scaMemberTargetConnected()

Load member info when scaMember target connects with existing value.

setAward()

Handle award selection, populate specialties, and update gatherings list.

setFieldRules()

Parse JSON state rules and apply Visible/Required/Disabled field states.

setId()

Set recommendation ID and update Turbo Frame source and form action URL.

setPlanToGiveRequired()

Sync required state to autocomplete text input.

stateTargetConnected()

Apply field rules when state target connects.

submit()

Enable disabled fields before form submission.

updateGatherings()

Fetch gatherings filtered by award and update checkboxes and dropdown.

updatePlanToGiveLookupUrl()

Update autocomplete endpoint URL for "Plan to Give At" gathering lookups.