Add transfer and account_state today view to reception
This commit is contained in:
64
frontend/views/account-state/_search_today.php
Normal file
64
frontend/views/account-state/_search_today.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
use kartik\widgets\DateTimePicker;
|
||||
use frontend\components\HtmlHelper;
|
||||
use common\models\AccountState;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model frontend\models\AccountstateSearch */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
<?php
|
||||
$accountOptions = ['' =>'Mind']+ HtmlHelper::mkAccountOptions( $model->accounts );
|
||||
$userOptions = ['' => 'Mind'] + HtmlHelper::mkOptions($model->users,'id','username');
|
||||
$typeOptions = ['' => 'Mind'] + AccountState::types();
|
||||
?>
|
||||
<div class="account-state-search">
|
||||
|
||||
<?php $form = ActiveForm::begin([
|
||||
'action' => ['today'],
|
||||
'method' => 'get',
|
||||
]); ?>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<?= $form->field($model, 'id_account')->dropDownList($accountOptions) ?>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<?= $form->field($model, 'id_user')->dropDownList($userOptions) ?>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<?= $form->field($model, 'type')->dropDownList($typeOptions) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<?= $form->field($model, 'start')->widget(DateTimePicker::classname(), [
|
||||
'pluginOptions' => [
|
||||
'autoclose'=>true,
|
||||
'format' => 'yyyy.mm.dd hh:ii'
|
||||
]
|
||||
])->label('Időszak kezdete') ?>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<?= $form->field($model, 'end') ->widget(DateTimePicker::classname(), [
|
||||
'pluginOptions' => [
|
||||
'autoclose'=>true,
|
||||
'format' => 'yyyy.mm.dd hh:ii'
|
||||
]
|
||||
])->label("Időszak vége") ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton(Yii::t('frontend/account-state', 'Search'), ['class' => 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
37
frontend/views/account-state/today.php
Normal file
37
frontend/views/account-state/today.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
use yii\widgets\ListView;
|
||||
use yii\base\Widget;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel frontend\models\AccountstateSearch */
|
||||
/* @var $dataProvider yii\data\ActiveDataProvider */
|
||||
|
||||
$this->title = Yii::t('frontend/account-state', 'Account States');
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
|
||||
<style>
|
||||
.notes-view table thead th,
|
||||
.notes-view table td{
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
<div class="account-state-index">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
<?php // echo $this->render('_search_today', ['model' => $searchModel]); ?>
|
||||
|
||||
<p>
|
||||
<?= Html::a(Yii::t('frontend/account-state', 'Open Account State'), ['open'], ['class' => 'btn btn-success']) ?>
|
||||
<?= Html::a(Yii::t('frontend/account-state', 'Close Account State'), ['close'], ['class' => 'btn btn-success']) ?>
|
||||
</p>
|
||||
|
||||
<?php echo ListView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'itemView' => '_item_view'
|
||||
])?>
|
||||
|
||||
</div>
|
||||
@@ -24,7 +24,11 @@ if ( $model ->type == AccountState::TYPE_OPEN ){
|
||||
}else{
|
||||
$this->title = "Kassza zárás";
|
||||
}
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('frontend/account-state', 'Account States'), 'url' => ['index']];
|
||||
if ( \common\components\Helper::isReceptionAccountStateIndexToday()){
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('frontend/account-state', 'Account States'), 'url' => ['today']];
|
||||
}else{
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('frontend/account-state', 'Account States'), 'url' => ['index']];
|
||||
}
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
|
||||
|
||||
36
frontend/views/transfer/_search_today.php
Normal file
36
frontend/views/transfer/_search_today.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
use kartik\widgets\DatePicker;
|
||||
use frontend\components\HtmlHelper;
|
||||
use common\models\Transfer;
|
||||
use kartik\widgets\DateTimePicker;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\TransferSearch */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
|
||||
<div class="transfer-search">
|
||||
|
||||
<?php $form = ActiveForm::begin([
|
||||
'action' => ['today'],
|
||||
'method' => 'get',
|
||||
]); ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<?php echo $form->field($model, 'types')->checkboxList( Transfer::types()) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton(Yii::t('frontend/transfer', 'Search'), ['class' => 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
32
frontend/views/transfer/today.php
Normal file
32
frontend/views/transfer/today.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
use yii\widgets\ListView;
|
||||
use yii\base\Widget;
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel common\models\TransferSearch */
|
||||
/* @var $dataProvider yii\data\ActiveDataProvider */
|
||||
$this->title = Yii::t('frontend/transfer', 'Transfers');
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<style>
|
||||
.dl-transfer{
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.item-transfer{
|
||||
border: 1px solid #b4b4b4;
|
||||
margin-top: 12px;
|
||||
padding-top: 6px;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
</style>
|
||||
<div class="transfer-index">
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
<?php echo $this->render('_search_today', ['model' => $searchModel]); ?>
|
||||
<?php echo ListView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'itemView' => '_view' ,
|
||||
'itemOptions' => ['class' => 'item-transfer']
|
||||
] )
|
||||
?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user