

<div class="row">
  <div class="col-md-12">
    <?php $this->load->view('admin/sub_services/widgets/sub-services-table'); ?>
  </div>
</div>

<?php $this->load->view('admin/layout/form-status-notification'); ?> 
<?php $this->load->view('admin/layout/delete-confirmation-modal'); ?>
<?php $this->load->view('admin/sub_services/widgets/add-service-fee-modal'); ?>
<?php $this->load->view('admin/sub_services/widgets/edit-sub-service-modal'); ?>
<?php $this->load->view('admin/sub_services/widgets/import-service-fee-modal'); ?>
<?php $this->load->view('admin/sub_services/widgets/export-service-fee-modal'); ?>

<script>
$(document).ready(function() {
    $('#services-table').DataTable({
        responsive: true,
        pageLength: 10,
        lengthMenu: [10,25,50,100],
        order: [[2,'asc']]
    });

    $('.edit-subservice-btn').click(function(){
        let btn = $(this);

        $('#editSubServiceId').val(btn.data('id'));
        $('#editSubServiceName').val(btn.data('name'));
        $('#editSubServiceDescription').val(btn.data('description'));
        $('#editSubServiceService').val(btn.data('service'));
        $('#editSubServiceFee').val(btn.data('fee'));
        $('#editSubServiceCurrency').val(btn.data('currency'));

        var modal = new bootstrap.Modal(document.getElementById('editSubServiceModal'));
        modal.show();
    });
});

</script>