<?php
/**@var \Magetop\Advancepreview\Block\Adminhtml\Product\Edit\PreviewDiscount $block */
$productId = $block->getRequest()->getParam('product_id',0);
$discounts = $block->getDiscountProductId($productId);
//print_r($previews->getData());
?>
<table style="width:100%" id="table-product-discount-review-list">
    <tr>
        <th><?php echo __('Standard service name') ?></th>
        <th><?php echo __('Amount') ?></th>

        <th><?php echo __('Created At') ?></th>
        <th><?php echo __('Edit') ?></th>
        <th><?php echo __('Delete') ?></th>
    </tr>
    <?php foreach ($discounts as $discount) : ?>
    <tr>
        <td><?php echo $discount->getData('discount_title') ?></td>
        <td><?php echo $discount->getData('discount_price') ?></td>

        <td><?php echo $discount->getData('created_at') ?></td>
        <td><span class="preview-discount-item-edit" discount-id="<?php echo $discount->getId(); ?>"><?php echo __('Edit') ?></span></td>
        <td><span class="preview-discount-item-delete" discount-id="<?php echo $discount->getId(); ?>"><?php echo __('Delete') ?></span></td>
    </tr>
    <?php endforeach; ?>
</table>
