I want to add a Cancel button that will update the status from open to cancelled for all the selected checkboxes.
The cancel button should change the status to Cancelled.
Below is the code for the cancel button.
<div>
<button type="button" class="btn btn-danger btn-lg text-left" id="btnCancelSelectedOrderLines" name="btnCancelSelectedOrderLines" ng-click="dsoedit.OnCancelSelectedOrderLines()">Cancel Lines</button>
</div>
The checkboxes are displayed using ng-repeat.
<tr ng-repeat="o in dsoedit.OrdLines">
<td>
<md-checkbox aria-label="Select Order Line" ng-model="o.IsSelected" ng-change="selectEntity()"></md-checkbox>
</td>
<td>
<H5 class="btn-h-spacer">{{o.LineNbr}}</H5>
</td>
<td>
<H5 class="btn-h-spacer">{{o.Status}}</H5>
</td>
…
My goal here is to cancel the orders where the checkboxes are selected. I'm trying to send the selected values to the ng-click function OnCancelSelectedOrderLines as an array parameter. Is there a way to send the o.LineNbr values as an array for the selected checkboxes to the OnCancelSelectedOrderLines as a parameter? (something like this OnCancelSelectedOrderLines(o.LineNbr))