...
- Display in Destination Forecast the Name of the PI, which is raft.data.CostObject.SUPERVISOR.
- Get forecast cost object name from raft.data.CostObject.COTITLE, display it in Destination Forecast/ Forecast Cost Object field.
- Insert a Forecast Name field. Need to check with Amon if publish call can make a new Forecast on the fly. May also need a forecast description field in the dialogue.
- Add a Copy Forecast button and an event listener.
- When user clicks on it, call Call publishForecast, if successful, close dialog, else, show error.
...
- Display the Word "Department" in the Destination Workset
- Get forecast cost object name from raft.data.CostObject.COTITLE, display it in Destination Forecast/ Forecast Cost Object field.
- Get the list of forecasts to display by calling GET: /rest/v2/costobject/:id/scenario and looking for worksetCategory == Department. All Department Forecasts should be listed in the Destination Forecast List.
- On click, call publish/share forecast with the selected forecast key as the destination scenarioKey, and the rest of the data from above as needed. If successful, close dialog, else show error in dialog.
2b. Create new Forecast button clicked
- Display the word "Department" in the destination workset
- Get forecast cost object name from raft.data.CostObject.COTITLE, display it in Destination Forecast/ Forecast Cost Object field.
- Display an input field, labeled "Destination Forecast Name"
- Display a button below it labelled Add New Forecast and an event listener for it.
- When user clicks on Add New Forecast, call copyForecast to the Department Workset with the current cost object as the source and destination cost object and the new forecast name as the destination forecast (call may not accept a blank, so we have to talk to Amon) (see 1b 3). If successful, close dialog, else, show error.
3. Common RadioButton clicked
...