add fingerpint frontend gui

This commit is contained in:
2020-01-07 20:16:10 +01:00
parent c3fd9ff58a
commit c92166e11d
8 changed files with 320 additions and 12 deletions

View File

@@ -5,8 +5,9 @@ use yii\helpers\Url;
<?php
$route = \Yii::$app->controller->id .'/'. \Yii::$app->controller->action->id;
$route = Yii::$app->controller->id .'/'. Yii::$app->controller->action->id;
/** @noinspection PhpUnhandledExceptionInspection */
$todayDateTime = Yii::$app->formatter->asDatetime(strtotime('today UTC'));
@@ -23,6 +24,7 @@ $items = [
[ 'Kosár', ['transfer/customer-cart', 'id_card' => $card->id_card ]],
[ 'Kártya', ['card/info', 'id_card' => $card->id_card ]],
[ 'Törölköző Bérlés', ['log/towel', 'id_card' => $card->id_card , 'LogSearch[start]' => $todayDateTime ]],
[ 'Ujjlenyomat', ['fingerprint/index', 'FingerprintSearch[id_card]' => $card->id_card ]],
];
@@ -51,4 +53,4 @@ $items = [
<h1><?php echo $title?></h1>
<p>Vendég: <?php echo $card->customer->name ?></p>
<p>Kártyaszám: <?php echo $card->number ?></p>
<?php }?>
<?php }?>

View File

@@ -0,0 +1,35 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model common\models\Fingerprint */
/* @var $form yii\widgets\ActiveForm */
$this->title = 'Ujjlenyomat hozzáadása';
$this->params['breadcrumbs'][] = ['label' => 'Ujjlenyomatok', 'url' => ['index', 'id_customer' => $model->id_customer]];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="fingerprint-create">
<h1><?= Html::encode($this->title) ?></h1>
<div class="fingerprint-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'fingerprint')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'id_customer')->hiddenInput(['maxlength' => true])->label(false) ?>
<div class="form-group">
<?= Html::submitButton('Mentés', ['class' => 'btn btn-success']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
</div>

View File

@@ -0,0 +1,37 @@
<?php
use yii\grid\GridView;
use yii\helpers\Html;
?>
<h1>Ujjlenyomatok</h1>
<p>
<?php
echo Html::a("Ujjlenyomat hozzáadása", ['create', 'id_card' => $card->id_card], ['class' => 'btn btn-success']);
?>
</p>
<?php
echo GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
[
'attribute' => 'fingerprint',
'label' => "Ujjlenyomat"
],
[
'attribute' => 'created_at',
'label' => "Létrehozva",
'format' => 'datetime'
],
['class' => 'yii\grid\ActionColumn',
'template' => '{delete}',
]
]
]);
?>