fix frontend fingerprint gui

This commit is contained in:
Roland Schneider 2020-01-07 20:46:31 +01:00
parent 58f796bd23
commit 2ee6e8e76d
4 changed files with 7 additions and 2 deletions

View File

@ -88,6 +88,7 @@ class FingerprintController extends Controller
return $this->redirect(['index', 'FingerprintSearch[id_card]' => $card->id_card]); return $this->redirect(['index', 'FingerprintSearch[id_card]' => $card->id_card]);
} }
return $this->render('create', [ return $this->render('create', [
'card' => $card,
'model' => $model, 'model' => $model,
]); ]);

View File

@ -50,7 +50,7 @@ class FingerprintSearch extends Fingerprint
} }
$this->card = $card; $this->card = $card;
$customer = Customer::findOne($card->customer); $customer = Customer::findOne($card->customer->id_customer);
if ( !isset($customer)){ if ( !isset($customer)){
throw new NotFoundHttpException('Customer not found'); throw new NotFoundHttpException('Customer not found');

View File

@ -1,5 +1,6 @@
<?php <?php
use frontend\components\CustomerTabWidget;
use yii\helpers\Html; use yii\helpers\Html;
use yii\widgets\ActiveForm; use yii\widgets\ActiveForm;
@ -12,6 +13,8 @@ $this->title = 'Ujjlenyomat hozzáadása';
$this->params['breadcrumbs'][] = ['label' => 'Ujjlenyomatok', 'url' => ['index', 'id_customer' => $model->id_customer]]; $this->params['breadcrumbs'][] = ['label' => 'Ujjlenyomatok', 'url' => ['index', 'id_customer' => $model->id_customer]];
$this->params['breadcrumbs'][] = $this->title; $this->params['breadcrumbs'][] = $this->title;
?> ?>
<?php echo CustomerTabWidget::widget(['card' => $card])?>
<div class="fingerprint-create"> <div class="fingerprint-create">
<h1><?= Html::encode($this->title) ?></h1> <h1><?= Html::encode($this->title) ?></h1>

View File

@ -1,10 +1,11 @@
<?php <?php
use frontend\components\CustomerTabWidget;
use yii\grid\GridView; use yii\grid\GridView;
use yii\helpers\Html; use yii\helpers\Html;
?> ?>
<h1>Ujjlenyomatok</h1> <?php echo CustomerTabWidget::widget(['card' => $card])?>
<p> <p>