Display a list of approvers in CAB Workbench to approve change
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2024 05:40 PM
Hi Developers,
I am trying to have a dropdown list of approvers that are in the CAB approval group to select from when hosting the CAB meeting from the CAB Workbench. My goal is to have the selected approver from the down drop menu as the approver for the change when the approver is selected from the drop down and 'Approved' is clicked.
I have tried modifying the cab-approve-pop Angular ng-template but the drop down is empty. Any ideas?
Thanks.
<div aria-labelledby="confirm-title" role="dialog">
<div class="modal-header">
<h3 id="confirm-title" class="modal-title">${Confirmation}</h3>
</div>
<div tabindex="0">
<div class="modal-body">
<div style="margin-bottom: 10px;">${Approve this change?}</div>
<div style="margin-bottom: 10px;" class="row">
<div class="col-sm-3 approval-modal-label">${Comments}</div>
<div class="col-sm-9 approval-modal-body-right">
<textarea id="approve-reject-comments" ui-tinymce="editor.config" ng-model="editor.workingCopy"></textarea>
</div>
</div>
<div ng-show="approvalGroups.length > 0" class="row">
<div class="col-sm-3 approval-modal-label" id="group-label">${Approval Group}</div>
<div id="cab-select-approval-group" class="col-sm-9 approval-modal-body-right-single-line">
<select aria-labelledby="group-label" class="sn-select-basic expand" ng-model="selectedApprovalGroup" ng-readonly="approvalGroups.length == 1">
<option ng-repeat="group in approvalGroups" value={{group.sys_id}}>{{group.display_value}}</option>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-3 approval-modal-label">${Approver}</div>
<div class="col-sm-9 approval-modal-body-right-single-line">
<select class="sn-select-basic expand" ng-model="selectedApprover" ng-disabled="approversInGroup.length == 1">
<option ng-repeat="approver in approversInGroup" value="{{approver.id}}">{{approver.name}}</option>
</select>
</div>
</div>
</div>
<div class="modal-footer approval-modal-footer">
<button class="btn btn-sm btn-default" type="button" ng-click="cancel()">${Cancel}</button>
<button class="btn btn-primary btn-sm" type="button" ng-click="ok()">${Approve}</button>
</div>
</div>
</div>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2024 09:28 PM
Hi,
Have you debugged the angular scope to ensure that approversInGroup has the relevant data you require? As an alternative, you could also look to use snRecordPicker; an example below of this directive that has a similar behaviour to a reference field
<sn-record-picker ng-if="!c.data.ignoreTableACL" id="requested-for"
field="c.requestedFor"
table="'sys_user'"
display-field="c.data.reqForDispCol"
display-fields="c.data.reqForDispCols"
value-field="'sys_id'"
search-fields="c.data.reqForSearchCols"
default-query="c.data.reqForQuery"
page-size="100"
options="{allowClear : false}"
sn-disabled="!c.data.disable_req_for">
</sn-record-picker>