<?php 
/** @var \Magento\Sales\Block\Adminhtml\CustomOrders $block*/


$lastOrders = $block->getNewestOrders();
?>
<div class="dashboard-item-content">
   <table class="admin__table-primary dashboard-data" id="lastOrdersGrid_table">
      <thead>
         <tr>
            <th class="data-grid-th  no-link col-customer"><span><?php echo __('Customer') ?></span></th>
            <th class="data-grid-th  no-link col-items"><span><?php echo __('Items') ?></span></th>
            <th class="data-grid-th  no-link col-total"><span><?php echo __('Total') ?></span></th>
         </tr>
      </thead>
      <tbody>
        <?php if(count($lastOrders)) : ?>
            <?php foreach ($lastOrders as $key => $lastOrder) : ?>
                <tr title="<?php echo $block->getUrl('sales/order/view/') ?>order_id/<?php echo $lastOrder['order_id'] ?>" class="even custom-pp-order" style="cursor: pointer">
                    <td class=" col-customer "><?php echo $lastOrder['customer_name'] ?></td>
                    <td class=" col-items col-number "><?php echo $lastOrder['total_item'] ?></td>
                    <td class=" col-total a-right last"><?php echo $lastOrder['total'] ?></td>
                </tr>
           <?php  endforeach ?>
       

         <?php endif ?>
        
      </tbody>
   </table>
</div>

<script>
   require([
      'jquery'
   ], function($) {
      $('.custom-pp-order').click(function() {
         // console.log('Click');
         var link  = $(this).attr('title');
         window.location.href = link;
      })
   })
</script>