door card pass: add doormanagerlog view

This commit is contained in:
Schneider Roland
2023-02-28 21:48:30 +01:00
parent 7c610b50ab
commit df69ec83d3
7 changed files with 233 additions and 5 deletions

View File

@@ -0,0 +1,33 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\models\InventorySearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="inventory-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
<?= $form->field($model, 'searchTerm') ?>
<!-- --><?php //= $form->field($model, 'id_user') ?>
<!---->
<!-- --><?php //= $form->field($model, 'created_at') ?>
<!---->
<!-- --><?php //= $form->field($model, 'updated_at') ?>
<div class="form-group">
<?= Html::submitButton(Yii::t('common/inventory', 'Search'), ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton(Yii::t('common/inventory', 'Reset'), ['class' => 'btn btn-default']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@@ -0,0 +1,64 @@
<?php
use yii\helpers\Html;
use yii\grid\GridView;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\DoorLogManagerSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = "Kapu események";
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="inventory-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php echo $this->render('_search', ['model' => $searchModel]); ?>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
[ 'attribute' => 'id_door_manager_log', "value" =>"id_door_manager_log", "label" => 'ID' ],
'created_at:datetime',
[ 'attribute' => 'verify_only', "value" =>function ($model) {
return $model->verify_only ? "I" : "N";
}, "label" => 'Teszt' ],
[ 'attribute' => 'original_direction', "value" =>"original_direction", "label" => 'Irány' ],
[ 'attribute' => 'device', "value" =>"device", "label" => 'Eszköz ' ],
[ 'attribute' => 'card_number', "value" =>"card_number", "label" => 'Kártya' ],
[ 'attribute' => 'customer_name', "value" =>"customer_name", "label" => 'Vendég' ],
[ 'attribute' => 'ticket_type_name', "value" =>"ticket_type_name", "label" => 'Bérlet' ],
[ 'attribute' => 'ticket_usage_count', "value" =>"ticket_usage_count", "label" => 'Használat' ],
[ 'attribute' => 'validation_kind', "value" =>"validation_kind", "label" => 'Típus' ],
[ 'attribute' => 'key_number', "value" =>"key_number", "label" => 'Kulcs' ],
[ 'attribute' => 'error', "value" =>"error", "label" => 'Hiba' ],
[ 'attribute' => 'error_code', "value" =>"error_code", "label" => 'Hiba kód' ],
// 'id_door_ma',
// 'name',
// [ 'attribute' => 'id_user', "value" =>"userName" ],
// [ 'attribute' => 'id_user', "value" =>"userName" ],
//
// ['class' => 'yii\grid\ActionColumn',
// 'template' => '{view}',
// 'urlCreator' => function( $action, $model, $key, $index ){
// if ( $action == 'view' ){
// return Url::to(['inventory-item/index' , 'id'=> $model->id_inventory]);
// }
// },
// 'buttons' =>[
// 'view' =>function ($url, $model, $key) {
// return Html::a('Részletek', $url,['class' => 'btn btn-xs btn-primary',
// ]) ;
// }
// ]
//
// ],
],
]); ?>
</div>
8