<div ng-if="bid.isUsed !== 1">
    <div ng-click="showBidMarginDialog(bid.idBid)" class="add-bid-margin-btn btn btn-primary">
        {{ 'bids.buttons.EDIT_MARGINS' | translate }}
    </div>
</div>

<div ng-if="isMarginsDialogVisible[bid.idBid]" ng-controller="addBidMarginCtrl">
    <div id="dialog-add-bid-margin-{{bid.idBid}}"
         dialog
         is-modal="true"
         has-buttons="true"
         on-confirmation="saveBidMargin"
         on-close="closeBidMarginDialog"
         parameters="{bid, getBids}"
         buttons-names="{confirmation: 'Add Margin', cancel: 'Cancel'}"
         title="{{'bids.headers.ADD_BID_MARGIN' | translate}}">
         <add-bid-margin  ng-init="init(bid)"/>
    </div>
</div>
