My Approvals in Simple List

chrisds
Kilo Contributor

Hi,

 

I'm trying to create a widget for my approvals in a simple list. The "My Approvals" widget has Approve/Reject buttons for each pending approval and it takes up a lot of real estate on the homepage(where I plan to position it). If anyone was able to create a simple list widget for approvals I would really like to how you solved this problem. I hoped I could find a widget developed but I could not find one in the community. 

 

Thank you in advance.

1 ACCEPTED SOLUTION

Yes, Make a clone of Approval widget, Remove below code and add to homepage.

<div ng-if="options.portal && approval.state == 'requested'" class="col-xs-6">
<button name="reject" class="btn btn-default btn-block" ng-click="reject(approval.sys_id);">${Reject}</button>
</div>
<div ng-if="options.portal && approval.state == 'requested'" class="col-xs-6">
<button name="approve" class="btn btn-primary btn-block" ng-click="approve(approval.sys_id);">${Approve}</button>
</div>

View solution in original post

3 REPLIES 3

Mike Patel
Tera Sage

Why you are not using OOTB widget called Approvals

If you want your own than copy and make changes to code.

chrisds
Kilo Contributor

Hi Mike,

 

I didn't want the approve/reject buttons to show up on the right hand side of the approvals since this took up alot of space. Is there a way to get rid of the buttons and also still allow the approver to click on the item and take them to the approval?

Yes, Make a clone of Approval widget, Remove below code and add to homepage.

<div ng-if="options.portal && approval.state == 'requested'" class="col-xs-6">
<button name="reject" class="btn btn-default btn-block" ng-click="reject(approval.sys_id);">${Reject}</button>
</div>
<div ng-if="options.portal && approval.state == 'requested'" class="col-xs-6">
<button name="approve" class="btn btn-primary btn-block" ng-click="approve(approval.sys_id);">${Approve}</button>
</div>