Skip to content

Commit 060116a

Browse files
committed
Testing generating card service
1 parent 870e350 commit 060116a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

controllers/SiteController.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,13 @@ public function actionIndex()
109109
$permissionsNames[] = $permission->name;
110110
}
111111

112-
if(Yii::$app->user->can("process_create"))
112+
if(Yii::$app->user->can("admin_mod"))
113+
{
114+
$importCount = Process::find()->where(['type'=>Process::PROCESS_IMPORT, 'active'=>1])->count();
115+
$exportCount = Process::find()->where(['type'=>Process::PROCESS_EXPORT, 'active'=>1])->count();
116+
$ticketCount = Ticket::find()->where(['active'=>1])->count();
117+
}
118+
else if(Yii::$app->user->can("process_create"))
113119
{
114120
$agency = $user->getAgency();
115121
if($agency)
@@ -142,12 +148,6 @@ public function actionIndex()
142148
{
143149
$ticketCount = Ticket::find()->where(['active'=>1])->count();
144150
}
145-
else if(Yii::$app->user->can("admin_mod"))
146-
{
147-
$importCount = Process::find()->where(['type'=>Process::PROCESS_IMPORT, 'active'=>1])->count();
148-
$exportCount = Process::find()->where(['type'=>Process::PROCESS_EXPORT, 'active'=>1])->count();
149-
$ticketCount = Ticket::find()->where(['active'=>1])->count();
150-
}
151151

152152
$myparams = array();
153153
$myparams['importCount'] = $importCount;
@@ -685,7 +685,7 @@ public function actionDashboardata()
685685
->andFilterWhere(['agency_id'=>$session->get('agencyId')])
686686
->andFilterWhere(['process_transaction.trans_company_id'=>$session->get('transCompanyId')])
687687
->groupBy(['process.id', 'agency.id'])
688-
// ->groupBy(['process.id', 'process.bl', 'process.delivery_date', 'process.type', 'agency.id', 'agency.name', 'process.created_at'])
688+
->groupBy(['process.id', 'process.bl', 'process.delivery_date', 'process.type', 'agency.id', 'agency.name', 'process.created_at'])
689689
// ->orderBy(['process.id'=>SORT_DESC])
690690
->asArray()
691691
->all();

0 commit comments

Comments
 (0)