add csrf , product and account_state changes
csrf - previous settings were not working on dev1 product - allow sale , if count > stock prodcut - admin - allow search by name account_state - auto sum up money from notes add csrf , product and account_state changes csrf - previous settings were not working on dev1 product - allow sale , if count > stock prodcut - admin - allow search by name account_state - auto sum up money from notes
This commit is contained in:
@@ -58,7 +58,7 @@ class AdminMenuStructure{
|
||||
$items[] = ['label' => 'Kedvezmények', 'url' => ['/discount/index'] ];
|
||||
$items[] = ['label' => 'Termék kategóriák', 'url' => ['/product-category/index'] ];
|
||||
$items[] = ['label' => 'Bérlet típusok', 'url' => ['/ticket-type/index'] ];
|
||||
$items[] = ['label' => 'Kulcsok', 'url' =>['/key/index']];
|
||||
// $items[] = ['label' => 'Kulcsok', 'url' =>['/key/index']];
|
||||
// $items[] = ['label' => 'Pénznem', 'url' => ['/currency/index'] ];
|
||||
$this->menuItems[] = ['label' => 'Törszadatok', 'url' =>$this->emptyUrl,
|
||||
'items' => $items
|
||||
|
||||
@@ -17,7 +17,6 @@ return [
|
||||
'request' => [
|
||||
'csrfParam' => '_backendCSRF',
|
||||
'csrfCookie' => [
|
||||
'httpOnly' => true,
|
||||
'path' => '/backend/web',
|
||||
],
|
||||
],
|
||||
@@ -26,8 +25,7 @@ return [
|
||||
'enableAutoLogin' => true,
|
||||
'identityCookie' => [
|
||||
'name' => '_backendUser', // unique for backend
|
||||
'path'=>'/backend/web', // correct path for the backend app.
|
||||
'httpOnly' => true,
|
||||
// 'path' => '/backend/web',
|
||||
]
|
||||
],
|
||||
'session' => [
|
||||
|
||||
@@ -20,7 +20,7 @@ class ProductSearch extends Product
|
||||
{
|
||||
return [
|
||||
[[ 'id_product_category', 'id_account', 'status'], 'integer'],
|
||||
[['product_number', 'barcode' ], 'safe'],
|
||||
[['product_number', 'barcode' ,'name'], 'safe'],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -68,7 +68,8 @@ class ProductSearch extends Product
|
||||
]);
|
||||
|
||||
$query->andFilterWhere(['like', 'product_number', $this->product_number])
|
||||
->andFilterWhere(['like', 'barcode', $this->barcode]);
|
||||
->andFilterWhere(['like', 'barcode', $this->barcode])
|
||||
->andFilterWhere(['like', 'name', $this->name]);
|
||||
|
||||
return $dataProvider;
|
||||
}
|
||||
|
||||
@@ -19,11 +19,11 @@ function mkOptions($options){
|
||||
return $o;
|
||||
}
|
||||
|
||||
$statusOptions = mkOptions( Product::statuses() );
|
||||
$statusOptions = ['' => "Mind"] + ( Product::statuses() );
|
||||
|
||||
$productCategories = mkOptions( ArrayHelper::map( ProductCategory::read(null) ,'id_product_category','name') );
|
||||
$productCategories = ['' => "Mind"] + ArrayHelper::map( ProductCategory::read(null) ,'id_product_category','name') ;
|
||||
|
||||
$accounts = mkOptions( ArrayHelper::map( Account::read(null) ,'id_account','name'));
|
||||
$accounts = ['' => "Mind"] + ( ArrayHelper::map( Account::read(null) ,'id_account','name'));
|
||||
|
||||
?>
|
||||
<div class="product-search">
|
||||
@@ -44,12 +44,13 @@ $accounts = mkOptions( ArrayHelper::map( Account::read(null) ,'id_account','nam
|
||||
<?php echo $form->field($model, 'status')->dropDownList($statusOptions) ?>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<?= $form->field($model, 'product_number') ?>
|
||||
<?= $form->field($model, 'name') ?>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<?= $form->field($model, 'barcode') ?>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<?= $form->field($model, 'product_number') ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user