<?php $activities = $this->admin_m->get_action_type_counts_for_staff(auth('staff_id')); ?>

<div class="info-box-area staff_dashboard_info mb-50">
    <?php foreach ($activities as  $key => $a) : ?>
        <?php
        if ($a->action_type == 'create_order') {
            $i = 'fas fa-shopping-basket';
        } elseif ($a->action_type == 'complete') {
            $i = "fas fa-check-double";
        } elseif ($a->action_type == 'reject') {
            $i = "fas fa-recycle";
        } else {
            $i = "icofont-checked";
        }
        ?>
        <div class="single-info-box">
            <div class="box-icon-area">
                <i class="<?= $i; ?>"></i>
            </div>
            <div class="box-text-area">
                <p><?= lang('order') . ' ' . $a->action_type == 'create_order' ? lang('create') : lang($a->action_type); ?></p>
                <h4><?= $a->total_count ?? 0; ?></h4>
            </div>
        </div>
    <?php endforeach; ?>
</div>


<?php $this->load->view("backend/restaurant/staff_activities"); ?>