change procurement product selection, keytoggle redirect change
This commit is contained in:
@@ -28,7 +28,7 @@ class ProductController extends \backend\controllers\BackendController
|
||||
'rules' => [
|
||||
// allow authenticated users
|
||||
[
|
||||
'actions' => ['create','index','view','update','statistics'],
|
||||
'actions' => ['create','index','view','update','statistics','find'],
|
||||
'allow' => true,
|
||||
'roles' => ['admin','employee','reception'],
|
||||
],
|
||||
@@ -37,7 +37,19 @@ class ProductController extends \backend\controllers\BackendController
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
public function actionFind($id = null) {
|
||||
$result = [ ];
|
||||
$product = Product::findOne ( $id );
|
||||
$product = Product::modelToArray ( $product );
|
||||
|
||||
$result ['product'] = $product;
|
||||
|
||||
\Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Product models.
|
||||
|
||||
Reference in New Issue
Block a user