<?php $this->load->view('settings/partials/header') ?>
<div class="window-content">
    <div class="page-loader" style="display: none;"></div>
    <div class="pane-group">
        <?php $this->load->view('settings/partials/sidebar') ?>
        <div class="pane">
            <div id="pleaseWait" class="tab-group page-order-tab" style="width: 100%; display: none;">
                <div  class="tab-item order-process-status-2" style="font-size: 10px; padding: 10px" id="systemUpdateInformationHook"><?php echo $this->lang->line('system_updating_msg') ?></div>
            </div>
            <div class="menu-list special-modify-btn-groups dashboard-icon-list">
                <?php if ($this->session->userdata('group') <= 4): ?>
                    <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('menuIndex', '<?php echo site_url('menu') ?>', 'menuIndex')">
                        <div class="config-dashboard-icon-inner">
                            <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                            <div class="text-center dashboard-icon-block icon icon-list"></div>
                            <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('menu') ?></div>
                        </div>
                    </div>
                <?php else: ?>
                    <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('menuIndex', '<?php echo site_url('menu/quickedit') ?>', 'menuIndex')">
                        <div class="config-dashboard-icon-inner">
                            <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                            <div class="text-center dashboard-icon-block icon icon-list"></div>
                            <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('menu') ?></div>
                        </div>
                    </div>
                <?php endif; ?>
                <?php if ((int) $this->session->userdata('group') <= 3): ?>    
                    <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('reportIndex', '<?php echo site_url('report') ?>', 'reportIndex')">
                        <div class="config-dashboard-icon-inner">
                            <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                            <div class="text-center dashboard-icon-block icon icon-book-open"></div>
                            <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('report') ?></div>
                        </div>
                    </div>
                <?php endif; ?>
                <?php if ((int) $this->session->userdata('group') <= 3): ?>    
                    <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('onlineReportIndex', '<?php echo site_url('report/online') ?>', 'onlineReportIndex')">
                        <div class="config-dashboard-icon-inner">
                            <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                            <div class="text-center dashboard-icon-block icon icon-book-open"></div>
                            <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('online') . ' ' . $this->lang->line('report') ?></div>
                        </div>
                    </div>
                <?php endif; ?>
                <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('booking', '<?php echo site_url('report/booking/index') ?>', 'booking')">
                    <div class="config-dashboard-icon-inner" >
                        <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                        <div class="text-center dashboard-icon-block icon icon-vkontakte"></div>
                        <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('booking') ?></div>
                    </div>
                </div>

                <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('expense', '<?php echo site_url('report/expense') ?>', '')">
                    <div class="config-dashboard-icon-inner">
                        <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                        <div class="text-center dashboard-icon-block icon icon-cc-nc-eu"></div>
                        <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('expense') ?></div>
                    </div>
                </div>

                <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('income', '<?php echo site_url('report/income') ?>', 'income')">
                    <div class="config-dashboard-icon-inner">
                        <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                        <div class="text-center dashboard-icon-block icon icon-cc-nc-eu"></div>
                        <div class="text-center dashboard-icon-block">Other Income</div>
                    </div>
                </div>

                <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('page', '<?php echo site_url('page') ?>', 'page')">
                    <div class="config-dashboard-icon-inner">
                        <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                        <div class="text-center dashboard-icon-block icon icon-globe"></div>
                        <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('website') ?></div>
                    </div>
                </div>
                <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('customerIndex', '<?php echo site_url('customer') ?>', 'customerIndex')">
                    <div class="config-dashboard-icon-inner">
                        <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                        <div class="text-center dashboard-icon-block icon icon-users"></div>
                        <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('customers') ?></div>
                    </div>
                </div>
                <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('settingIndex', '<?php echo site_url('settings/servicetime') ?>', 'settingIndex')">
                    <div class="config-dashboard-icon-inner">
                        <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                        <div class="text-center dashboard-icon-block icon icon-clock"></div>
                        <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('service_time') ?></div>
                    </div>
                </div>
                <?php if ((in_array('delivery', $this->session->userdata('userApps')) && $services['delivery'] === '3') || $this->session->userdata('group') <= 5): ?>
                    <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('deliveryplan', '<?php echo site_url('settings/deliveryplan') ?>', '')">
                        <div class="config-dashboard-icon-inner">
                            <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                            <div class="text-center dashboard-icon-block icon icon-book-open"></div>
                            <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('delivery_plan') ?></div>
                        </div>
                    </div>
                <?php endif; ?>
                <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('discountplan', '<?php echo site_url('settings/discountplan') ?>', '')">
                    <div class="config-dashboard-icon-inner">
                        <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                        <div class="text-center dashboard-icon-block icon icon-book-open"></div>
                        <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('discount_plan') ?></div>
                    </div>
                </div> 
                <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('promo', '<?php echo site_url('settings/promo') ?>', '')">
                    <div class="config-dashboard-icon-inner">
                        <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                        <div class="text-center dashboard-icon-block icon icon-book-open"></div>
                        <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('promotional_offer') ?></div>
                    </div>
                </div> 
                <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('multidiscount', '<?php echo site_url('settings/multidiscount') ?>', '')">
                    <div class="config-dashboard-icon-inner">
                        <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                        <div class="text-center dashboard-icon-block icon icon-adjust"></div>
                        <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('multi_discount') ?></div>
                    </div>
                </div> 
                <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('itemdiscount', '<?php echo site_url('settings/itemOffer') ?>', 'itemdiscount')">
                    <div class="config-dashboard-icon-inner">
                        <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                        <div class="text-center dashboard-icon-block icon icon-adjust"></div>
                        <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('item_offer') ?></div>
                    </div>
                </div> 
                <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('voucher', '<?php echo site_url('settings/voucher') ?>', '')">
                    <div class="config-dashboard-icon-inner">
                        <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                        <div class="text-center dashboard-icon-block icon icon-box"></div>
                        <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('voucher') ?></div>
                    </div>
                </div> 
                <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('employeeIndex', '<?php echo site_url('employee') ?>', 'employeeIndex')">
                    <div class="config-dashboard-icon-inner">
                        <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                        <div class="text-center dashboard-icon-block icon icon-users"></div>
                        <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('employee') ?></div>
                    </div>
                </div>
                <?php if ($this->session->userdata('group') <= 5): ?>
                    <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('userIndex', '<?php echo site_url('user/index') ?>', 'userIndex')">
                        <div class="config-dashboard-icon-inner">
                            <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                            <div class="text-center dashboard-icon-block icon icon-users"></div>
                            <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('user') ?></div>
                        </div>
                    </div>
                <?php endif; ?>

                <div class="menu-button config-dashboard-icon">
                    <div class="config-dashboard-icon-inner">
                        <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                        <div class="text-center dashboard-icon-block icon icon-users"></div>
                        <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('driver') ?></div>
                    </div>
                </div>
                <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('verified', '<?php echo site_url('epos') ?>', 'eposIndex')">
                    <div class="config-dashboard-icon-inner">
                        <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                        <div class="text-center dashboard-icon-block icon icon-basket"></div>
                        <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('terminal') ?></div>
                    </div>
                </div>
                <?php if ($this->session->userdata('group') === '2' || $this->session->userdata('group') === '3'): ?>
                    <div class="menu-button config-dashboard-icon" onclick="zamanSwitchBranchPopup()">
                        <div class="config-dashboard-icon-inner">
                            <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                            <div class="text-center dashboard-icon-block icon icon-switch"></div>
                            <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('switch_branch') ?></div>
                        </div>
                    </div>
                <?php endif; ?>
                <?php if ($this->session->userdata('group') === '2'): ?>
                    <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('controllPanel', '<?php echo site_url('settings/controllPanel') ?>', 'controllPanel')">
                        <div class="config-dashboard-icon-inner">
                            <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                            <div class="text-center dashboard-icon-block icon icon-tools"></div>
                            <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('control_panel') ?></div>
                        </div>
                    </div>
                <?php endif; ?>
                <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('', '<?php echo site_url('settings/general') ?>', 'settingGeneral')">
                    <div class="config-dashboard-icon-inner">
                        <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                        <div class="text-center dashboard-icon-block icon icon-tools"></div>
                        <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('setting') ?></div>
                    </div>
                </div>
                <?php if ($this->session->userdata('group') <= 5): ?>
                    <div class="menu-button config-dashboard-icon" onclick="clearRemotePrintPool()">
                        <div class="config-dashboard-icon-inner">
                            <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                            <div class="text-center dashboard-icon-block icon icon-print"></div>
                            <div class="text-center dashboard-icon-block">Clear printer</div>
                        </div>
                    </div>
                <?php endif; ?>
                <div class="menu-button config-dashboard-icon" onclick="warning('<?php echo $this->lang->line('contact') ?>', '<?php echo $this->lang->line('system_owner_company') ?><br/><?php echo $this->lang->line('system_owner_phone') ?><br/><a style=' + 'cursor:pointer;' + ' href=' + 'mailto:<?php echo $this->lang->line('system_notify_email') ?>' + '><?php echo $this->lang->line('system_notify_email') ?></a><br/><?php echo $this->lang->line('system_owner_website') ?>', '<?php echo $this->lang->line('close') ?>')">
                    <div class="config-dashboard-icon-inner">
                        <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                        <div class="text-center dashboard-icon-block icon icon-info"></div>
                        <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('support') ?></div>
                    </div>
                </div>
                <div class="menu-button config-dashboard-icon" onclick="zamanEposNavigator('verified', '<?php echo site_url('user/logout/' . $this->session->userdata('branch') . '/' . $this->session->userdata('team')) ?>', '')">
                    <div class="config-dashboard-icon-inner">
                        <div class="text-center dashboard-icon-block"><span class="number-icon">&nbsp;</span></div>
                        <div class="text-center dashboard-icon-block icon icon-logout"></div>
                        <div class="text-center dashboard-icon-block"><?php echo $this->lang->line('logout') ?></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    function clearRemotePrintPool() {
        $.get("<?php echo site_url('settings/clearPrintingPool') ?>", function (data) {
            if (data) {
                warning('print queue', 'Printer queue is clear successfully', 'Ok');
            }
        });
    }
</script>
<?php $this->load->view('settings/settings/switchbranch'); ?>
<?php $this->load->view('settings/partials/footer'); ?>



