add ticket usage count increment trigger, add log, fix card flag update query, fix customer card move update
This commit is contained in:
57
backend/views/log/_form.php
Normal file
57
backend/views/log/_form.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Log */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="log-form">
|
||||
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
<?= $form->field($model, 'id_log')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'type')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'message')->textInput(['maxlength' => true]) ?>
|
||||
|
||||
<?= $form->field($model, 'url')->textarea(['rows' => 6]) ?>
|
||||
|
||||
<?= $form->field($model, 'app')->textInput(['maxlength' => true]) ?>
|
||||
|
||||
<?= $form->field($model, 'id_user')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_transfer')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_money_movement')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_ticket')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_sale')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_customer')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_account')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_account_state')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_key')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_product')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_door_log')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'created_at')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'updated_at')->textInput() ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton($model->isNewRecord ? Yii::t('common/log', 'Create') : Yii::t('common/log', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
50
backend/views/log/_search.php
Normal file
50
backend/views/log/_search.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
use kartik\widgets\DateTimePicker;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\models\LogSearch */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="log-search">
|
||||
|
||||
<?php $form = ActiveForm::begin([
|
||||
'action' => ['index'],
|
||||
'method' => 'get',
|
||||
]); ?>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
|
||||
<?= $form->field($model, 'start')->widget(DateTimePicker::classname(), [
|
||||
'pluginOptions' => [
|
||||
'autoclose'=>true,
|
||||
'format' => 'yyyy.mm.dd hh:ii'
|
||||
]
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?= $form->field($model, 'end') ->widget(DateTimePicker::classname(), [
|
||||
'pluginOptions' => [
|
||||
'autoclose'=>true,
|
||||
'format' => 'yyyy.mm.dd hh:ii'
|
||||
]
|
||||
]) ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton(Yii::t('common/log', 'Keresés'), ['class' => 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
21
backend/views/log/create.php
Normal file
21
backend/views/log/create.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Log */
|
||||
|
||||
$this->title = Yii::t('common/log', 'Create Log');
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/log', 'Logs'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="log-create">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
60
backend/views/log/index.php
Normal file
60
backend/views/log/index.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel backend\models\LogSearch */
|
||||
/* @var $dataProvider yii\data\ActiveDataProvider */
|
||||
|
||||
$this->title = Yii::t('common/log', 'Logok');
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="log-index">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
<?php echo $this->render('_search', ['model' => $searchModel]); ?>
|
||||
|
||||
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'columns' => [
|
||||
|
||||
[
|
||||
'attribute' => "log_id_log",
|
||||
'label' => "Log azonosító",
|
||||
],
|
||||
[
|
||||
'attribute' => "log_created_at",
|
||||
'label' => "Dátum idő",
|
||||
],
|
||||
[
|
||||
'attribute' => "log_message",
|
||||
'label' => "Üzenet",
|
||||
],
|
||||
[
|
||||
'attribute' => "log_app",
|
||||
'label' => "Alkalmazás",
|
||||
],
|
||||
[
|
||||
'attribute' => "user_username",
|
||||
'label' => "Felhasználó",
|
||||
],
|
||||
// 'id_user',
|
||||
// 'id_transfer',
|
||||
// 'id_money_movement',
|
||||
// 'id_ticket',
|
||||
// 'id_sale',
|
||||
// 'id_customer',
|
||||
// 'id_account',
|
||||
// 'id_account_state',
|
||||
// 'id_key',
|
||||
// 'id_product',
|
||||
// 'id_door_log',
|
||||
// 'updated_at',
|
||||
|
||||
// ['class' => 'yii\grid\ActionColumn'],
|
||||
],
|
||||
]); ?>
|
||||
|
||||
</div>
|
||||
23
backend/views/log/update.php
Normal file
23
backend/views/log/update.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Log */
|
||||
|
||||
$this->title = Yii::t('common/log', 'Update {modelClass}: ', [
|
||||
'modelClass' => 'Log',
|
||||
]) . ' ' . $model->id_log;
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/log', 'Logs'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = ['label' => $model->id_log, 'url' => ['view', 'id' => $model->id_log]];
|
||||
$this->params['breadcrumbs'][] = Yii::t('common/log', 'Update');
|
||||
?>
|
||||
<div class="log-update">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
52
backend/views/log/view.php
Normal file
52
backend/views/log/view.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\DetailView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Log */
|
||||
|
||||
$this->title = $model->id_log;
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/log', 'Logs'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="log-view">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<p>
|
||||
<?= Html::a(Yii::t('common/log', 'Update'), ['update', 'id' => $model->id_log], ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::a(Yii::t('common/log', 'Delete'), ['delete', 'id' => $model->id_log], [
|
||||
'class' => 'btn btn-danger',
|
||||
'data' => [
|
||||
'confirm' => Yii::t('common/log', 'Are you sure you want to delete this item?'),
|
||||
'method' => 'post',
|
||||
],
|
||||
]) ?>
|
||||
</p>
|
||||
|
||||
<?= DetailView::widget([
|
||||
'model' => $model,
|
||||
'attributes' => [
|
||||
'id_log',
|
||||
'type',
|
||||
'message',
|
||||
'url:ntext',
|
||||
'app',
|
||||
'id_user',
|
||||
'id_transfer',
|
||||
'id_money_movement',
|
||||
'id_ticket',
|
||||
'id_sale',
|
||||
'id_customer',
|
||||
'id_account',
|
||||
'id_account_state',
|
||||
'id_key',
|
||||
'id_product',
|
||||
'id_door_log',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
],
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user