add editable account on reception/customer-cart, add towel handling
This commit is contained in:
@@ -27,6 +27,9 @@ use yii\widgets\ActiveForm;
|
||||
<div class="col-md-4">
|
||||
<?php echo $form->field($model, 'number')->label("Kártya/kulcs szám") ?>
|
||||
</div>
|
||||
<div class='col-md-3'>
|
||||
<?= $form->field($model, 'towel')->dropDownList( ['' => "Mind" , '1' => "Bérel Törölközőt"] ) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
@@ -38,6 +38,10 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'attribute' => 'customer_email',
|
||||
'label' => 'E-mail',
|
||||
],
|
||||
[
|
||||
'attribute' => 'towel_count',
|
||||
'label' => 'Törölköző (db)',
|
||||
],
|
||||
// [
|
||||
// 'attribute' => 'customer.name',
|
||||
// 'value' => 'customer.name',
|
||||
@@ -45,7 +49,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
|
||||
['class' => 'yii\grid\ActionColumn',
|
||||
'template' => '{ticket} {product} {ticket_history} {keys} {contract}',
|
||||
'template' => '{ticket} {product} {ticket_history} {keys} {contract} {towel}',
|
||||
'buttons' => [
|
||||
'ticket' => function ($url, $model, $key) {
|
||||
return Html::a('Új bérlet', $url, ['class'=> 'btn btn-xs btn-success' ]) ;
|
||||
@@ -61,6 +65,9 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
},
|
||||
'contract' => function ($url, $model, $key) {
|
||||
return Html::a('Szerződések', $url, ['class'=> 'btn btn-xs btn-success' ]) ;
|
||||
},
|
||||
'towel' => function ($url, $model, $key) {
|
||||
return Html::a('Törölközők', $url, ['class'=> 'btn btn-xs btn-success' ]) ;
|
||||
},
|
||||
],
|
||||
'urlCreator' => function ($action, $model, $key, $index){
|
||||
@@ -75,6 +82,9 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
$url = Url::to(['key/index','id_card' => $model['card_id_card']]);
|
||||
}else if ( 'contract' == $action ){
|
||||
$url = Url::to(['contract/index','id_card' => $model['card_id_card']]);
|
||||
}else if ( 'towel' == $action ){
|
||||
$start = Yii::$app->formatter->asDatetime(strtotime('today UTC'));
|
||||
$url = Url::to(['log/towel','id_card' => $model['card_id_card'] ,'LogSearch[start]' =>$start ]);
|
||||
}
|
||||
return $url;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user