<aside class="main-sidebar"><section class="sidebar"><?php use mdm\admin\components\Helper;use myretail\models\SyncConfig;$config=SyncConfig::find()->where(['type_con'=>'retail'])->one();$branchCode=$config->branch_code;$menuItems=[ ['label'=>'Dashboard','url'=>Yii::$app->homeUrl,'template'=>'<a href="{url}"><i class="material-icons">bar_chart</i> {label}</a>','active'=>Yii::$app->controller->getRoute()=='site/index' ],['label'=>'Configuration','url'=>['/sync-config/update?id='.$branchCode],'visible'=>Helper::checkRoute('/sync-config/update'),'template'=>'<a href="{url}"><i class="material-icons">settings</i> {label}</a>','active'=>in_array(Yii::$app->controller->id,['sync-config','sync-account-to-jurnal'])],['label'=>'Sync','url'=>['/import-master'],'visible'=>Helper::checkRoute('/import-master'),'template'=>'<a href="{url}"><i class="material-icons">sync</i> {label} <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span></a></a>','items'=>[ ['label'=>'Sync Master Data','url'=>['/import-master'],'visible'=>Helper::checkRoute('/import-master/index'),'template'=>'<a href="{url}">{label}</a>' ],['label'=>'Sync Transaction','url'=>['/import-data-transaction'],'visible'=>Helper::checkRoute('/import-data-transaction/index'),'template'=>'<a href="{url}">{label}</a>','active'=>in_array(Yii::$app->controller->id,['import-data-transaction','auto-sync'])],['label'=>'Log Sync','url'=>['/sync-to-jurnal-header'],'visible'=>Helper::checkRoute('/sync-to-jurnal-header/index'),'template'=>'<a href="{url}">{label}</a>' ],] ],['label'=>'Export','url'=>['/export'],'visible'=>Helper::checkRoute('/export'),'template'=>'<a href="{url}"><i class="material-icons">sync</i> {label} <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span></a></a>','items'=>[ ['label'=>'Warehouse','url'=>['/export/warehouse'],'visible'=>Helper::checkRoute('/export/warehouse'),'template'=>'<a href="{url}">{label}</a>' ],['label'=>'Purchase Payment','url'=>['/export/purchase-payment'],'visible'=>Helper::checkRoute('/export/purchase-payment'),'template'=>'<a href="{url}">{label}</a>',],['label'=>'Purchase','url'=>['/export/purchase'],'visible'=>Helper::checkRoute('/export/purchase'),'template'=>'<a href="{url}">{label}</a>' ],] ],['label'=>'Manage User','url'=>['/admin/user'],'visible'=>Helper::checkRoute('/admin/user'),'template'=>'<a href="{url}"><i class="material-icons">person_add</i> {label}</a>','active'=>in_array(Yii::$app->controller->id,['user','role'])],['label'=>'Account','url'=>['/site/update-account'],'visible'=>Helper::checkRoute('/site/update-account'),'template'=>'<a href="{url}"><i class="material-icons">account_circle</i> {label}</a>','active'=>in_array(Yii::$app->controller->getRoute(),['site/update-account','site/change-password'])],['label'=>'Info','url'=>['/site/about'],'visible'=>Helper::checkRoute('/site/about'),'template'=>'<a href="{url}"><i class="material-icons">info</i> {label} <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span></a></a>','items'=>[ ['label'=>'Update','url'=>['/update'],'visible'=>Helper::checkRoute('/update/index'),'template'=>'<a href="{url}">{label}</a>' ],['label'=>'Help','url'=>['/site/help'],'visible'=>Helper::checkRoute('/site/help'),'template'=>'<a href="{url}">{label}</a>' ],['label'=>'About','url'=>['/site/about'],'visible'=>Helper::checkRoute('/site/about'),'template'=>'<a href="{url}">{label}</a>' ],] ],['label'=>'Log out','icon'=>'sign-out','url'=>['/site/logout'],'template'=>'<a href="{url}" class="sign-out" data-method="post">{icon}{label}</a>'],];echo dmstr\widgets\Menu::widget([ 'options'=>['class'=>'sidebar-menu tree','data-widget'=>'tree'],'items'=>$menuItems ]);?></section></aside>