Add door log changes, direction types, and manual reading event
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
use kartik\widgets\DatePicker;
|
||||
use backend\models\DoorLogSearch;
|
||||
use kartik\widgets\DateTimePicker;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\models\DoorLogSearch */
|
||||
@@ -26,11 +28,13 @@ use kartik\widgets\DatePicker;
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?= $form->field($model, 'searchKeyName') ?>
|
||||
|
||||
<?= $form->field($model, 'id_customer')->label("Vendég azon.") ?>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?= $form->field($model, 'direction')->dropDownList(['' => 'Mind' ] + []) ?>
|
||||
<?= $form->field($model, 'searchKeyName') ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -39,26 +43,31 @@ use kartik\widgets\DatePicker;
|
||||
<?php // echo $form->field($model, 'created_at') ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<?= $form->field($model, 'direction')->dropDownList(['' => 'Mind' ] + DoorLogSearch::getAllDoorLog() ) ?>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?= $form->field($model, 'start')->widget(DatePicker::classname(), [
|
||||
|
||||
<?= $form->field($model, 'start')->widget(DateTimePicker::classname(), [
|
||||
'pluginOptions' => [
|
||||
'autoclose'=>true,
|
||||
'format' => 'yyyy.mm.dd'
|
||||
'format' => 'yyyy.mm.dd hh:ii'
|
||||
]
|
||||
]) ?>
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?= $form->field($model, 'end') ->widget(DatePicker::classname(), [
|
||||
<?= $form->field($model, 'end') ->widget(DateTimePicker::classname(), [
|
||||
'pluginOptions' => [
|
||||
'autoclose'=>true,
|
||||
'format' => 'yyyy.mm.dd'
|
||||
'format' => 'yyyy.mm.dd hh:ii'
|
||||
]
|
||||
]) ?>
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton(Yii::t('common/door_log', 'Search'), ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::submitButton(Yii::t('common/door_log', 'Keresés'), ['class' => 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
@@ -2,12 +2,15 @@
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
use common\components\Helper;
|
||||
use common\models\DoorLog;
|
||||
use common\models\Card;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel backend\models\DoorLogSearch */
|
||||
/* @var $dataProvider yii\data\ActiveDataProvider */
|
||||
|
||||
$this->title = Yii::t('common/door_log', 'Mozgások');
|
||||
$this->title = Yii::t('common/door_log', 'Kártya események');
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="door-log-index">
|
||||
@@ -19,26 +22,52 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'columns' => [
|
||||
['class' => 'yii\grid\SerialColumn'],
|
||||
[
|
||||
'attribute' => 'id_card',
|
||||
'value' => 'cardNumber'
|
||||
[
|
||||
'attribute' => 'door_log_created_at',
|
||||
'label' => "Időpont",
|
||||
'value' => 'door_log_created_at',
|
||||
'format' => 'datetime'
|
||||
],
|
||||
[
|
||||
'attribute' => 'id_key',
|
||||
'value' => 'keyNumber'
|
||||
'attribute' => 'card_number',
|
||||
'label' => 'Kártya szám'
|
||||
],
|
||||
[
|
||||
'attribute' => 'id_customer',
|
||||
'value' => 'customerName'
|
||||
'attribute' => 'door_log_type',
|
||||
'label' => 'Kártya típus',
|
||||
'value' => function ($model, $key, $index, $column){
|
||||
return Helper::getArrayValue(Card::types(), $model['door_log_type'], "-");
|
||||
}
|
||||
],
|
||||
[
|
||||
'attribute' => 'direction',
|
||||
'value' => 'directionName'
|
||||
'attribute' => 'key_number',
|
||||
'label' => 'Kulcs'
|
||||
],
|
||||
[
|
||||
'attribute' => 'customer_id_customer',
|
||||
'label' => 'Vendég azon.'
|
||||
],
|
||||
[
|
||||
'attribute' => 'customer_name',
|
||||
'label' => 'Vendég'
|
||||
],
|
||||
[
|
||||
'attribute' => 'door_log_direction',
|
||||
'label' => 'Esemény',
|
||||
'value' => function ($model, $key, $index, $column){
|
||||
return Helper::getArrayValue(DoorLog::getDirectionTypes(), $model['door_log_direction'],"-" );
|
||||
}
|
||||
],
|
||||
[
|
||||
'attribute' => 'door_log_source_app',
|
||||
'label' => 'Forrás alkalmazás',
|
||||
'value' => function ($model, $key, $index, $column){
|
||||
return DoorLog::getSourceAppName($model['door_log_source_app']);
|
||||
}
|
||||
],
|
||||
/*
|
||||
// 'type',
|
||||
'created_at:datetime',
|
||||
|
||||
*/
|
||||
],
|
||||
]); ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user