@@ -109,7 +109,13 @@ public function actionIndex()
109
109
$ permissionsNames [] = $ permission ->name ;
110
110
}
111
111
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 " ))
113
119
{
114
120
$ agency = $ user ->getAgency ();
115
121
if ($ agency )
@@ -142,12 +148,6 @@ public function actionIndex()
142
148
{
143
149
$ ticketCount = Ticket::find ()->where (['active ' =>1 ])->count ();
144
150
}
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
- }
151
151
152
152
$ myparams = array ();
153
153
$ myparams ['importCount ' ] = $ importCount ;
@@ -685,7 +685,7 @@ public function actionDashboardata()
685
685
->andFilterWhere (['agency_id ' =>$ session ->get ('agencyId ' )])
686
686
->andFilterWhere (['process_transaction.trans_company_id ' =>$ session ->get ('transCompanyId ' )])
687
687
->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 ' ])
689
689
// ->orderBy(['process.id'=>SORT_DESC])
690
690
->asArray ()
691
691
->all ();
0 commit comments