add changes to create ticket
This commit is contained in:
@@ -1,21 +1,63 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use frontend\components\ReceptionMenuWidget;
|
||||
use frontend\components\ReceptionCardNumberWidget;
|
||||
use frontend\assets\TicketSellAsset;
|
||||
use common\models\TicketType;
|
||||
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Ticket */
|
||||
/* @var $receptionForm frotned\models\ReceptionForm */
|
||||
|
||||
TicketSellAsset::register($this);
|
||||
|
||||
$this->title = Yii::t('common/ticket', 'Create Ticket');
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/ticket', 'Tickets'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
$card = $receptionForm->card;
|
||||
$customer = $receptionForm->customer;
|
||||
|
||||
$options = [];
|
||||
|
||||
// $options['lookup_product_url'] = Url::toRoute(['product/lookup']);
|
||||
// $options['clear_list_url'] = Url::toRoute(['product/clear-list']);
|
||||
$options['types'] = TicketType::modelsToArray($ticketTypes);
|
||||
$options['transfer_list'] = $userTransfers;
|
||||
|
||||
$this->registerJs ( 'new TicketSell( '. json_encode($options).');' );
|
||||
|
||||
?>
|
||||
<div class="ticket-create">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
<div class='row'>
|
||||
<div class='col-md-3'>
|
||||
<?php echo ReceptionMenuWidget::widget( [ 'customer' => $customer, 'card' => $card] ) ?>
|
||||
</div>
|
||||
<div class='col-md-4'>
|
||||
<?php echo ReceptionCardNumberWidget::widget( [ 'customer' => $customer, 'card' =>$card, 'route' => ['customer/reception'] ] )?>
|
||||
</div>
|
||||
<div class='col-md-4'>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
'discounts' => $discounts,
|
||||
'ticketTypes' => $ticketTypes,
|
||||
'accounts' => $accounts,
|
||||
]) ?>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h1><?php echo Yii::t('frontend/tciket', 'Cart')?></h1>
|
||||
<?php echo $this->render( "//common/_transfer_list" ) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user