add contraint , that everybody expect admin is limited to 3 days, Add card package
This commit is contained in:
@@ -8,6 +8,7 @@ use yii\data\ActiveDataProvider;
|
||||
use common\models\AccountState;
|
||||
use common\components\RoleDefinition;
|
||||
use common\models\Account;
|
||||
use common\components\Helper;
|
||||
|
||||
/**
|
||||
* AccountStateSearch represents the model behind the search form about `common\models\AccountState`.
|
||||
@@ -65,6 +66,8 @@ class AccountStateSearch extends AccountState
|
||||
if ( RoleDefinition::isReception()){
|
||||
$query->andWhere(['transfer.id_user' => Yii::$app->user->id ]);
|
||||
}
|
||||
|
||||
Helper::restrictIfNotAdminTheStartDate($query, $this->timestampStart,['account_state.created_at'],"date" );
|
||||
}
|
||||
|
||||
$dataProvider = new ActiveDataProvider([
|
||||
|
||||
Reference in New Issue
Block a user