add indexes, add messagedetsta
This commit is contained in:
45
backend/views/contract/_form.php
Normal file
45
backend/views/contract/_form.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Contract */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="contract-form">
|
||||
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
<?= $form->field($model, 'id_contract')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_user')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_customer')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'status')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'flag')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'part_paid')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'part_count')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'part_required')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'expired_at')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'created_at')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'updated_at')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_ticket_type')->textInput() ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton($model->isNewRecord ? Yii::t('common/door_log', 'Create') : Yii::t('common/door_log', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
49
backend/views/contract/_search-customer.php
Normal file
49
backend/views/contract/_search-customer.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\models\ContractSearch */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="contract-search">
|
||||
|
||||
<?php $form = ActiveForm::begin([
|
||||
'action' => ['index'],
|
||||
'method' => 'get',
|
||||
]); ?>
|
||||
|
||||
<?= $form->field($model, 'id_contract') ?>
|
||||
|
||||
<?= $form->field($model, 'id_user') ?>
|
||||
|
||||
<?= $form->field($model, 'id_customer') ?>
|
||||
|
||||
<?= $form->field($model, 'status') ?>
|
||||
|
||||
<?= $form->field($model, 'flag') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'part_paid') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'part_count') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'part_required') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'expired_at') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'created_at') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'updated_at') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'id_ticket_type') ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton(Yii::t('common/door_log', 'Search'), ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::resetButton(Yii::t('common/door_log', 'Reset'), ['class' => 'btn btn-default']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
40
backend/views/contract/_search.php
Normal file
40
backend/views/contract/_search.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\models\ContractSearch */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="contract-search">
|
||||
|
||||
<?php $form = ActiveForm::begin([
|
||||
'action' => ['index'],
|
||||
'method' => 'get',
|
||||
]); ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<?= $form->field($model, 'id_contract')->label('Szerződés azonosító') ?>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?= $form->field($model, 'id_customer')->label('Vendég azonosító') ?>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?= $form->field($model, 'customer_name')->label('Vendég neve') ?>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton("Keresés", ['class' => 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
21
backend/views/contract/create.php
Normal file
21
backend/views/contract/create.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Contract */
|
||||
|
||||
$this->title = Yii::t('common/door_log', 'Create Contract');
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/door_log', 'Contracts'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="contract-create">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
57
backend/views/contract/index-customer.php
Normal file
57
backend/views/contract/index-customer.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
use backend\components\AdminCustomerTabWidget;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel backend\models\ContractSearch */
|
||||
/* @var $dataProvider yii\data\ActiveDataProvider */
|
||||
|
||||
$this->title = "Vendég szerződések";
|
||||
$this->params['breadcrumbs'][] = "Vendég";
|
||||
$this->params['breadcrumbs'][] = "Szerződések";
|
||||
?>
|
||||
|
||||
<?php echo AdminCustomerTabWidget::widget(['customer' => $searchModel->customer]) ?>
|
||||
<div class="contract-index">
|
||||
|
||||
<?php // echo $this->render('_search-customer', ['model' => $searchModel]); ?>
|
||||
|
||||
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'columns' => [
|
||||
[
|
||||
'label' => 'Szerződés azonosító',
|
||||
'value' => 'id_contract',
|
||||
'attribute' =>'id_contract',
|
||||
],
|
||||
[
|
||||
'label' => 'Felhasználó',
|
||||
'value' => 'userName',
|
||||
'attribute' =>'id_user',
|
||||
],
|
||||
[
|
||||
'label' => 'Státusz',
|
||||
'value' => 'statusName',
|
||||
'attribute' =>'status',
|
||||
],
|
||||
[
|
||||
'label' => 'Állapot',
|
||||
'value' => 'flagName',
|
||||
'attribute' =>'flag',
|
||||
],
|
||||
[
|
||||
'label' => 'Lejárat',
|
||||
'value' => 'expired_at',
|
||||
'attribute' =>'expired_at',
|
||||
'format' => 'date'
|
||||
],
|
||||
'created_at:datetime',
|
||||
|
||||
// ['class' => 'yii\grid\ActionColumn'],
|
||||
],
|
||||
]); ?>
|
||||
|
||||
</div>
|
||||
85
backend/views/contract/index.php
Normal file
85
backend/views/contract/index.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
use common\models\Contract;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel backend\models\ContractSearch */
|
||||
/* @var $dataProvider yii\data\ActiveDataProvider */
|
||||
|
||||
$this->title = "Szerződések";
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="contract-index">
|
||||
|
||||
<h1><?php echo "Szerződések" ?></h1>
|
||||
<?php echo $this->render('_search', ['model' => $searchModel]); ?>
|
||||
|
||||
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'columns' => [
|
||||
/*
|
||||
* 'contract.id_contract as contract_id_contract',
|
||||
'user.username as user_name',
|
||||
'customer.id_customer as customer_id_customer',
|
||||
'customer.name as customer_name',
|
||||
'customer.status as customer_status',
|
||||
'customer.flags as customer_flags',*/
|
||||
[
|
||||
'attribute' => 'contract_id_contract' ,
|
||||
'label' =>'Szerződés azonosító'
|
||||
],
|
||||
[
|
||||
'attribute' => 'user_name' ,
|
||||
'label' =>'Felhasználó'
|
||||
],
|
||||
[
|
||||
'attribute' => 'customer_id_customer' ,
|
||||
'label' =>'Vendég azonosító'
|
||||
],
|
||||
[
|
||||
'attribute' => 'customer_name' ,
|
||||
'label' =>'Vendég név'
|
||||
],
|
||||
[
|
||||
'attribute' => 'contract_status' ,
|
||||
'label' =>'Státusz',
|
||||
'value' => function ($model, $key, $index, $column){
|
||||
return Contract::toStatusName($model['contract_status']);
|
||||
}
|
||||
],
|
||||
[
|
||||
'attribute' => 'contract_flag' ,
|
||||
'label' =>'Állapot',
|
||||
'value' => function ($model, $key, $index, $column){
|
||||
return Contract::toFlangName($model['contract_flag']);
|
||||
}
|
||||
],
|
||||
[
|
||||
'attribute' => 'contract_part_count' ,
|
||||
'label' =>'Összes részlet'
|
||||
],
|
||||
[
|
||||
'attribute' => 'contract_part_required' ,
|
||||
'label' =>'Esedékes részletek'
|
||||
],
|
||||
[
|
||||
'attribute' => 'contract_part_paid' ,
|
||||
'label' =>'Részletek fizetve'
|
||||
],
|
||||
[
|
||||
'attribute' => 'contract_created_at' ,
|
||||
'label' =>'Létrehozva',
|
||||
'format' => 'date'
|
||||
],
|
||||
[
|
||||
'attribute' => 'contract_expired_at' ,
|
||||
'label' =>'Lejárat',
|
||||
'format' => 'date'
|
||||
],
|
||||
],
|
||||
]); ?>
|
||||
|
||||
</div>
|
||||
23
backend/views/contract/update.php
Normal file
23
backend/views/contract/update.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Contract */
|
||||
|
||||
$this->title = Yii::t('common/door_log', 'Update {modelClass}: ', [
|
||||
'modelClass' => 'Contract',
|
||||
]) . ' ' . $model->id_contract;
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/door_log', 'Contracts'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = ['label' => $model->id_contract, 'url' => ['view', 'id' => $model->id_contract]];
|
||||
$this->params['breadcrumbs'][] = Yii::t('common/door_log', 'Update');
|
||||
?>
|
||||
<div class="contract-update">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
46
backend/views/contract/view.php
Normal file
46
backend/views/contract/view.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\DetailView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Contract */
|
||||
|
||||
$this->title = $model->id_contract;
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/door_log', 'Contracts'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="contract-view">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<p>
|
||||
<?= Html::a(Yii::t('common/door_log', 'Update'), ['update', 'id' => $model->id_contract], ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::a(Yii::t('common/door_log', 'Delete'), ['delete', 'id' => $model->id_contract], [
|
||||
'class' => 'btn btn-danger',
|
||||
'data' => [
|
||||
'confirm' => Yii::t('common/door_log', 'Are you sure you want to delete this item?'),
|
||||
'method' => 'post',
|
||||
],
|
||||
]) ?>
|
||||
</p>
|
||||
|
||||
<?= DetailView::widget([
|
||||
'model' => $model,
|
||||
'attributes' => [
|
||||
'id_contract',
|
||||
'id_user',
|
||||
'id_customer',
|
||||
'status',
|
||||
'flag',
|
||||
'part_paid',
|
||||
'part_count',
|
||||
'part_required',
|
||||
'expired_at',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'id_ticket_type',
|
||||
],
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user