diff --git a/frontend/controllers/FingerprintController.php b/frontend/controllers/FingerprintController.php index f38d0c5..c43b18e 100644 --- a/frontend/controllers/FingerprintController.php +++ b/frontend/controllers/FingerprintController.php @@ -88,6 +88,7 @@ class FingerprintController extends Controller return $this->redirect(['index', 'FingerprintSearch[id_card]' => $card->id_card]); } return $this->render('create', [ + 'card' => $card, 'model' => $model, ]); diff --git a/frontend/models/FingerprintSearch.php b/frontend/models/FingerprintSearch.php index a2c2452..2878c0e 100644 --- a/frontend/models/FingerprintSearch.php +++ b/frontend/models/FingerprintSearch.php @@ -50,7 +50,7 @@ class FingerprintSearch extends Fingerprint } $this->card = $card; - $customer = Customer::findOne($card->customer); + $customer = Customer::findOne($card->customer->id_customer); if ( !isset($customer)){ throw new NotFoundHttpException('Customer not found'); diff --git a/frontend/views/fingerprint/create.php b/frontend/views/fingerprint/create.php index 119dbd1..aa71e69 100644 --- a/frontend/views/fingerprint/create.php +++ b/frontend/views/fingerprint/create.php @@ -1,5 +1,6 @@ title = 'Ujjlenyomat hozzáadása'; $this->params['breadcrumbs'][] = ['label' => 'Ujjlenyomatok', 'url' => ['index', 'id_customer' => $model->id_customer]]; $this->params['breadcrumbs'][] = $this->title; ?> + $card])?> +