add change card, add customer tab

This commit is contained in:
2016-01-25 23:09:43 +01:00
parent 8d29f47d49
commit 9fb349ee64
19 changed files with 241 additions and 38 deletions

View File

@@ -1,45 +1,41 @@
<?php
use yii\helpers\Html;
use frontend\components\ReceptionMenuWidget;
use frontend\components\ReceptionCardNumberWidget;
use frontend\components\ReceptionWidget;
use common\assets\WebcamjsAsset;
use frontend\assets\CustomerAsset;
use common\components\Image;
use yii\helpers\Url;
use frontend\components\CustomerTabWidget;
/* @var $this yii\web\View */
/* @var $model common\models\Customer */
$this->title = Yii::t('common/customer', 'Update customer:' ) . ' ' . $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/customer', 'Customers'), 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id_customer]];
$this->params['breadcrumbs'][] = Yii::t('common/customer', 'Update');
$customer = $model;
$card = $customer->card;
$this->title = Yii::t('common/customer', 'Update customer:' ) . ' ' . $model->name;
$this->params['breadcrumbs'][] = ['label' => "Recepció", 'url' => ['customer/reception' ,'number' => $card->number]];
$this->params['breadcrumbs'][] = Yii::t('common/customer', 'Update');
?>
<div class="customer-update">
<?php // echo ReceptionWidget::widget( ['form' => $receptionForm, 'route' => ['customer/reception'] ] )?>
<?php echo ReceptionWidget::widget( ['form' => $receptionForm, 'route' => ['customer/reception'] ] )?>
<?php echo CustomerTabWidget::widget(['card' => $card])?>
<?php echo $this->render('_camera',['model' => $model]); ?>
<h1><?= Html::encode($this->title) ?></h1>
<div style='margin-top: 12px'>
<?php if ( $model->image1 ){
echo Html::img( Url::base( ) . Image::thumb( $model->image1->path,160,120 ));
}
?>
</div>
<?= $this->render('_form_update', [
'model' => $model,
]) ?>