add contract, add door_log
This commit is contained in:
@@ -122,6 +122,18 @@ class AdminMenuStructure{
|
||||
'items' => $items
|
||||
];
|
||||
}
|
||||
/////////////////////////////
|
||||
// Kap lug megbízások
|
||||
/////////////////////////////
|
||||
$items = [];
|
||||
$items[] = ['label' => 'Mozgások', 'url' => ['/door-log/index' , 'DoorLogSearch[start]' =>$today,'DoorLogSearch[end]' => $tomorrow ] ];
|
||||
// $items[] = ['label' => 'Részletek aktiválása', 'url' => ['/ugiro/parts' ] ];
|
||||
// $items[] = ['label' => 'Bevétel', 'url' => ['/transfer/summary' , 'TransferSummarySearch[start]' =>$today,'TransferSummarySearch[end]' => $tomorrow ] ];
|
||||
// $items[] = ['label' => 'Napi bevételek', 'url' => ['/transfer/list', 'TransferListSearch[start]' =>$todayDatetime,'TransferListSearch[end]' => $tomorrowDatetime ] ];
|
||||
// $items[] = ['label' => 'Kassza müveletek', 'url' => ['/account-state/index'] ];
|
||||
$this->menuItems[] = ['label' => 'Forgóvilla', 'url' => $this->emptyUrl,
|
||||
'items' => $items
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
|
||||
121
backend/controllers/DoorLogController.php
Normal file
121
backend/controllers/DoorLogController.php
Normal file
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
|
||||
namespace backend\controllers;
|
||||
|
||||
use Yii;
|
||||
use common\models\DoorLog;
|
||||
use backend\models\DoorLogSearch;
|
||||
use yii\web\Controller;
|
||||
use yii\web\NotFoundHttpException;
|
||||
use yii\filters\VerbFilter;
|
||||
|
||||
/**
|
||||
* DoorLogController implements the CRUD actions for DoorLog model.
|
||||
*/
|
||||
class DoorLogController extends Controller
|
||||
{
|
||||
public function behaviors()
|
||||
{
|
||||
return [
|
||||
'verbs' => [
|
||||
'class' => VerbFilter::className(),
|
||||
'actions' => [
|
||||
'delete' => ['post'],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all DoorLog models.
|
||||
* @return mixed
|
||||
*/
|
||||
public function actionIndex()
|
||||
{
|
||||
$searchModel = new DoorLogSearch();
|
||||
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
|
||||
|
||||
return $this->render('index', [
|
||||
'searchModel' => $searchModel,
|
||||
'dataProvider' => $dataProvider,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a single DoorLog model.
|
||||
* @param integer $id
|
||||
* @return mixed
|
||||
*/
|
||||
public function actionView($id)
|
||||
{
|
||||
return $this->render('view', [
|
||||
'model' => $this->findModel($id),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new DoorLog model.
|
||||
* If creation is successful, the browser will be redirected to the 'view' page.
|
||||
* @return mixed
|
||||
*/
|
||||
public function actionCreate()
|
||||
{
|
||||
$model = new DoorLog();
|
||||
|
||||
if ($model->load(Yii::$app->request->post()) && $model->save()) {
|
||||
return $this->redirect(['view', 'id' => $model->id_door_log]);
|
||||
} else {
|
||||
return $this->render('create', [
|
||||
'model' => $model,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an existing DoorLog model.
|
||||
* If update is successful, the browser will be redirected to the 'view' page.
|
||||
* @param integer $id
|
||||
* @return mixed
|
||||
*/
|
||||
public function actionUpdate($id)
|
||||
{
|
||||
$model = $this->findModel($id);
|
||||
|
||||
if ($model->load(Yii::$app->request->post()) && $model->save()) {
|
||||
return $this->redirect(['view', 'id' => $model->id_door_log]);
|
||||
} else {
|
||||
return $this->render('update', [
|
||||
'model' => $model,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an existing DoorLog model.
|
||||
* If deletion is successful, the browser will be redirected to the 'index' page.
|
||||
* @param integer $id
|
||||
* @return mixed
|
||||
*/
|
||||
public function actionDelete($id)
|
||||
{
|
||||
$this->findModel($id)->delete();
|
||||
|
||||
return $this->redirect(['index']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the DoorLog model based on its primary key value.
|
||||
* If the model is not found, a 404 HTTP exception will be thrown.
|
||||
* @param integer $id
|
||||
* @return DoorLog the loaded model
|
||||
* @throws NotFoundHttpException if the model cannot be found
|
||||
*/
|
||||
protected function findModel($id)
|
||||
{
|
||||
if (($model = DoorLog::findOne($id)) !== null) {
|
||||
return $model;
|
||||
} else {
|
||||
throw new NotFoundHttpException('The requested page does not exist.');
|
||||
}
|
||||
}
|
||||
}
|
||||
147
backend/models/DoorLogSearch.php
Normal file
147
backend/models/DoorLogSearch.php
Normal file
@@ -0,0 +1,147 @@
|
||||
<?php
|
||||
|
||||
namespace backend\models;
|
||||
|
||||
use Yii;
|
||||
use yii\base\Model;
|
||||
use yii\data\ActiveDataProvider;
|
||||
use common\models\DoorLog;
|
||||
|
||||
/**
|
||||
* DoorLogSearch represents the model behind the search form about `common\models\DoorLog`.
|
||||
*/
|
||||
class DoorLogSearch extends DoorLog
|
||||
{
|
||||
|
||||
|
||||
public $searchCardNumber;
|
||||
public $searchCustomerName;
|
||||
public $searchKeyName;
|
||||
|
||||
public $start;
|
||||
public $end;
|
||||
public $timestampStart;
|
||||
public $timestampEnd;
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
[[ 'direction', 'type'], 'integer'],
|
||||
[['created_at'], 'safe'],
|
||||
[['searchCardNumber','searchCustomerName','searchKeyName'], 'safe'],
|
||||
[[ 'start', ], 'date' , 'timestampAttribute' => 'timestampStart' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ],
|
||||
[[ 'end' , ], 'date' , 'timestampAttribute' => 'timestampEnd' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ],
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
public function attributeLabels(){
|
||||
return [
|
||||
'searchCardNumber' => 'Kártya szám',
|
||||
'searchCustomerName' => 'Vendég',
|
||||
'searchKeyName' => 'Kulcs szám',
|
||||
'type' => 'Típus',
|
||||
'direction' => 'Irány',
|
||||
'start' => 'Időszak kezdete',
|
||||
'end' => 'Időszak vége'
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function scenarios()
|
||||
{
|
||||
// bypass scenarios() implementation in the parent class
|
||||
return Model::scenarios();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates data provider instance with search query applied
|
||||
*
|
||||
* @param array $params
|
||||
*
|
||||
* @return ActiveDataProvider
|
||||
*/
|
||||
public function search($params)
|
||||
{
|
||||
$query = DoorLog::find();
|
||||
|
||||
$dataProvider = new ActiveDataProvider([
|
||||
'query' => $query,
|
||||
'sort' =>[
|
||||
'attributes' => [
|
||||
// 'age',
|
||||
'id_card' => [
|
||||
'asc' => ['card.number' => SORT_ASC ],
|
||||
'desc' => ['card.number' => SORT_DESC],
|
||||
],
|
||||
'id_key' => [
|
||||
'asc' => ['key.number' => SORT_ASC ],
|
||||
'desc' => ['key.number' => SORT_DESC],
|
||||
],
|
||||
'id_customer' => [
|
||||
'asc' => ['customer.name' => SORT_ASC ],
|
||||
'desc' => ['customer.name' => SORT_DESC],
|
||||
],
|
||||
'direction' => [
|
||||
'asc' => ['door_log.direction' => SORT_ASC ],
|
||||
'desc' => ['door_log.direction' => SORT_DESC],
|
||||
],
|
||||
'created_at' => [
|
||||
'asc' => ['door_log.created_at' => SORT_ASC ],
|
||||
'desc' => ['door_log.created_at' => SORT_DESC],
|
||||
],
|
||||
],
|
||||
]
|
||||
]);
|
||||
|
||||
$this->load($params);
|
||||
|
||||
if (!$this->validate()) {
|
||||
// uncomment the following line if you do not want to return any records when validation fails
|
||||
// $query->where('0=1');
|
||||
return $dataProvider;
|
||||
}
|
||||
|
||||
$query->andFilterWhere([
|
||||
// 'id_door_log' => $this->id_door_log,
|
||||
// 'id_card' => $this->id_card,
|
||||
// 'id_customer' => $this->id_customer,
|
||||
// 'id_key' => $this->id_key,
|
||||
'direction' => $this->direction,
|
||||
// 'type' => $this->type,
|
||||
// 'created_at' => $this->created_at,
|
||||
]);
|
||||
|
||||
$query->andFilterWhere(['>=', 'door_log.created_at', $this->timestampStart]);
|
||||
$query->andFilterWhere(['<', 'door_log.created_at', $this->timestampEnd]);
|
||||
|
||||
$query->innerJoin('card','card.id_card = door_log.id_card');
|
||||
$query->leftJoin('key','key.id_key = door_log.id_key');
|
||||
$query->leftJoin('customer','customer.id_customer = door_log.id_customer');
|
||||
|
||||
if ( !empty($this->searchCardNumber)){
|
||||
$query->andWhere(['or',
|
||||
['and',[ 'in','card.number' , [$this->searchCardNumber]],"trim(coalesce(card.number, '')) <>'' " ],
|
||||
['and', ['in','card.rfid_key' ,[ $this->searchCardNumber] ],"trim(coalesce(card.rfid_key, '')) <>'' "],
|
||||
|
||||
]);
|
||||
}
|
||||
|
||||
if ( !empty($this->searchKeyName)){
|
||||
$query->andWhere(['or',
|
||||
['and',[ 'in','key.number' , [$this->searchKeyName]],"trim(coalesce(key.number, '')) <>'' " ],
|
||||
['and', ['in','key.rfid_key' ,[ $this->searchKeyName] ],"trim(coalesce(key.rfid_key, '')) <>'' "]
|
||||
|
||||
]);
|
||||
}
|
||||
|
||||
$query->andFilterWhere(['like', 'customer.name', $this->searchCustomerName]);
|
||||
|
||||
return $dataProvider;
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ class TicketInstallmentRequestSearch extends TicketInstallmentRequest
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
[['id_ticket_installment_request', 'id_ticket', 'id_customer', 'status' ,'id_ticket_type','id_ugiro'], 'integer'],
|
||||
[[ 'id_contract', 'id_ticket_installment_request', 'id_ticket', 'id_customer', 'status' ,'id_ticket_type','id_ugiro'], 'integer'],
|
||||
[['customer_name' ], 'safe'],
|
||||
[[ 'start', ], 'date' , 'timestampAttribute' => 'timestampStart' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ],
|
||||
[[ 'end' , ], 'date' , 'timestampAttribute' => 'timestampEnd' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ],
|
||||
@@ -83,7 +83,9 @@ class TicketInstallmentRequestSearch extends TicketInstallmentRequest
|
||||
'ticket_installment_request.status as request_status',//status
|
||||
'ticket_installment_request.request_sent_at as request_sent_at',//sent_at
|
||||
'ticket_installment_request.priority as request_priority',//sent_at
|
||||
'ticket_installment_request.number as request_number',//sent_at
|
||||
'ticket_installment_request.request_processed_at as request_processed_at',//request_processed_at
|
||||
'ticket_installment_request.id_contract as request_id_contract',//request_processed_at
|
||||
'customer.id_customer as customer_id_customer',//id_customer
|
||||
'customer.name as customer_name',//customer_name
|
||||
'ticket_type.name as ticket_type_name',//ticket_type_name
|
||||
@@ -95,8 +97,8 @@ class TicketInstallmentRequestSearch extends TicketInstallmentRequest
|
||||
]);
|
||||
$query->from("ticket_installment_request");
|
||||
$query->innerJoin("customer","customer.id_customer = ticket_installment_request.id_customer");
|
||||
$query->innerJoin("ticket","ticket.id_ticket = ticket_installment_request.id_ticket");
|
||||
$query->innerJoin("ticket_type","ticket.id_ticket_type = ticket_type.id_ticket_type");
|
||||
$query->leftJoin("ticket","ticket.id_ticket = ticket_installment_request.id_ticket");
|
||||
$query->leftJoin("ticket_type","ticket.id_ticket_type = ticket_type.id_ticket_type");
|
||||
$query->leftJoin("ugiro_request_assignment","ticket_installment_request.id_ticket_installment_request = ugiro_request_assignment.id_request");
|
||||
|
||||
$query->orderBy(["ticket_installment_request.request_target_time_at" => SORT_ASC]);
|
||||
@@ -107,6 +109,7 @@ class TicketInstallmentRequestSearch extends TicketInstallmentRequest
|
||||
'customer.id_customer' => $this->id_customer,
|
||||
'ticket_installment_request.status' => $this->status,
|
||||
'ticket_type.id_ticket_type' => $this->id_ticket_type,
|
||||
'ticket_installment_request.id_contract' => $this->id_contract,
|
||||
]);
|
||||
$query->andFilterWhere(['like', 'customer.name', $this->customer_name]);
|
||||
//target time
|
||||
|
||||
@@ -80,8 +80,8 @@ class TicketInstallmentRequestSearchDownloadGiro extends TicketInstallmentReques
|
||||
]);
|
||||
$query->from("ticket_installment_request");
|
||||
$query->innerJoin("customer","customer.id_customer = ticket_installment_request.id_customer");
|
||||
$query->innerJoin("ticket","ticket.id_ticket = ticket_installment_request.id_ticket");
|
||||
$query->innerJoin("ticket_type","ticket.id_ticket_type = ticket_type.id_ticket_type");
|
||||
$query->leftJoin("ticket","ticket.id_ticket = ticket_installment_request.id_ticket");
|
||||
$query->leftJoin("ticket_type","ticket.id_ticket_type = ticket_type.id_ticket_type");
|
||||
|
||||
$query->andWhere(['ticket_installment_request.status' => TicketInstallmentRequest::$STATUS_MARKED_TO_SEND]);
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class TicketInstallmentRequestSearchPending extends TicketInstallmentRequest
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
[['id_ticket_installment_request', 'id_ticket', 'id_customer', 'status' ,'id_ticket_type'], 'integer'],
|
||||
[[ 'id_contract', 'id_ticket_installment_request', 'id_ticket', 'id_customer', 'status' ,'id_ticket_type'], 'integer'],
|
||||
[['customer_name' ], 'safe'],
|
||||
[[ 'start', ], 'date' , 'timestampAttribute' => 'timestampStart' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ],
|
||||
[[ 'end' , ], 'date' , 'timestampAttribute' => 'timestampEnd' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ],
|
||||
@@ -69,6 +69,7 @@ class TicketInstallmentRequestSearchPending extends TicketInstallmentRequest
|
||||
'ticket_installment_request.status as request_status',//status
|
||||
'ticket_installment_request.request_sent_at as request_sent_at',//sent_at
|
||||
'ticket_installment_request.priority as request_priority',//sent_at
|
||||
'ticket_installment_request.id_contract as request_id_contract',//sent_at
|
||||
'ticket_installment_request.request_processed_at as request_processed_at',//request_processed_at
|
||||
'customer.id_customer as customer_id_customer',//id_customer
|
||||
'customer.name as customer_name',//customer_name
|
||||
@@ -80,8 +81,8 @@ class TicketInstallmentRequestSearchPending extends TicketInstallmentRequest
|
||||
]);
|
||||
$query->from("ticket_installment_request");
|
||||
$query->innerJoin("customer","customer.id_customer = ticket_installment_request.id_customer");
|
||||
$query->innerJoin("ticket","ticket.id_ticket = ticket_installment_request.id_ticket");
|
||||
$query->innerJoin("ticket_type","ticket.id_ticket_type = ticket_type.id_ticket_type");
|
||||
$query->leftJoin("ticket","ticket.id_ticket = ticket_installment_request.id_ticket");
|
||||
$query->leftJoin("ticket_type","ticket.id_ticket_type = ticket_type.id_ticket_type");
|
||||
|
||||
$query->andWhere(['ticket_installment_request.status' => TicketInstallmentRequest::$STATUS_PENDING]);
|
||||
|
||||
@@ -93,6 +94,7 @@ class TicketInstallmentRequestSearchPending extends TicketInstallmentRequest
|
||||
'customer.id_customer' => $this->id_customer,
|
||||
'ticket_installment_request.status' => $this->status,
|
||||
'ticket_type.id_ticket_type' => $this->id_ticket_type,
|
||||
'ticket_installment_request.id_contract' => $this->id_contract,
|
||||
]);
|
||||
$query->andFilterWhere(['like', 'customer.name', $this->customer_name]);
|
||||
//target time
|
||||
|
||||
@@ -23,6 +23,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'columns' => [
|
||||
'id_customer',
|
||||
[
|
||||
'attribute' => 'customerCardNumber' ,
|
||||
],
|
||||
|
||||
33
backend/views/door-log/_form.php
Normal file
33
backend/views/door-log/_form.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\DoorLog */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="door-log-form">
|
||||
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
<?= $form->field($model, 'id_card')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_customer')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_key')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'direction')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'type')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'created_at')->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>
|
||||
66
backend/views/door-log/_search.php
Normal file
66
backend/views/door-log/_search.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
use kartik\widgets\DatePicker;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\models\DoorLogSearch */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="door-log-search">
|
||||
|
||||
<?php $form = ActiveForm::begin([
|
||||
'action' => ['index'],
|
||||
'method' => 'get',
|
||||
]); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
|
||||
<?= $form->field($model, 'searchCardNumber') ?>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
|
||||
<?= $form->field($model, 'searchCustomerName') ?>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?= $form->field($model, 'searchKeyName') ?>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?= $form->field($model, 'direction')->dropDownList(['' => 'Mind' ] + []) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php // echo $form->field($model, 'type') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'created_at') ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<?= $form->field($model, 'start')->widget(DatePicker::classname(), [
|
||||
'pluginOptions' => [
|
||||
'autoclose'=>true,
|
||||
'format' => 'yyyy.mm.dd'
|
||||
]
|
||||
]) ?>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?= $form->field($model, 'end') ->widget(DatePicker::classname(), [
|
||||
'pluginOptions' => [
|
||||
'autoclose'=>true,
|
||||
'format' => 'yyyy.mm.dd'
|
||||
]
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton(Yii::t('common/door_log', 'Search'), ['class' => 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
21
backend/views/door-log/create.php
Normal file
21
backend/views/door-log/create.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\DoorLog */
|
||||
|
||||
$this->title = Yii::t('common/door_log', 'Create Door Log');
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/door_log', 'Door Logs'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="door-log-create">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
45
backend/views/door-log/index.php
Normal file
45
backend/views/door-log/index.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel backend\models\DoorLogSearch */
|
||||
/* @var $dataProvider yii\data\ActiveDataProvider */
|
||||
|
||||
$this->title = Yii::t('common/door_log', 'Mozgások');
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="door-log-index">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
<?php echo $this->render('_search', ['model' => $searchModel]); ?>
|
||||
|
||||
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'columns' => [
|
||||
['class' => 'yii\grid\SerialColumn'],
|
||||
[
|
||||
'attribute' => 'id_card',
|
||||
'value' => 'cardNumber'
|
||||
],
|
||||
[
|
||||
'attribute' => 'id_key',
|
||||
'value' => 'keyNumber'
|
||||
],
|
||||
[
|
||||
'attribute' => 'id_customer',
|
||||
'value' => 'customerName'
|
||||
],
|
||||
[
|
||||
'attribute' => 'direction',
|
||||
'value' => 'directionName'
|
||||
],
|
||||
// 'type',
|
||||
'created_at:datetime',
|
||||
|
||||
],
|
||||
]); ?>
|
||||
|
||||
</div>
|
||||
23
backend/views/door-log/update.php
Normal file
23
backend/views/door-log/update.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\DoorLog */
|
||||
|
||||
$this->title = Yii::t('common/door_log', 'Update {modelClass}: ', [
|
||||
'modelClass' => 'Door Log',
|
||||
]) . ' ' . $model->id_door_log;
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/door_log', 'Door Logs'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = ['label' => $model->id_door_log, 'url' => ['view', 'id' => $model->id_door_log]];
|
||||
$this->params['breadcrumbs'][] = Yii::t('common/door_log', 'Update');
|
||||
?>
|
||||
<div class="door-log-update">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
41
backend/views/door-log/view.php
Normal file
41
backend/views/door-log/view.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\DetailView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\DoorLog */
|
||||
|
||||
$this->title = $model->id_door_log;
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/door_log', 'Door Logs'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="door-log-view">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<p>
|
||||
<?= Html::a(Yii::t('common/door_log', 'Update'), ['update', 'id' => $model->id_door_log], ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::a(Yii::t('common/door_log', 'Delete'), ['delete', 'id' => $model->id_door_log], [
|
||||
'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_door_log',
|
||||
'id_card',
|
||||
'id_customer',
|
||||
'id_key',
|
||||
'direction',
|
||||
'type',
|
||||
'created_at',
|
||||
],
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
@@ -51,7 +51,7 @@ use yii\helpers\Html;
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Megbízás inditására irányzott dátum
|
||||
Megbízás esedékességének dátuma
|
||||
</th>
|
||||
<td>
|
||||
<?php echo \Yii::$app->formatter->asDatetime( $model['request_request_target_time_at'] );?>
|
||||
@@ -84,8 +84,10 @@ use yii\helpers\Html;
|
||||
<?php echo $model['ugiro_id_ugiro'] ;?>
|
||||
</td>
|
||||
<th>
|
||||
Szerződés azonosító
|
||||
</th>
|
||||
<td>
|
||||
<?php echo $model['request_id_contract'] ;?>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
@@ -145,6 +147,22 @@ use yii\helpers\Html;
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Sorszám a kötegben belül
|
||||
</th>
|
||||
<td>
|
||||
<?php echo ( $model['request_number'] ) ;?>
|
||||
</td>
|
||||
<th>
|
||||
</th>
|
||||
<td>
|
||||
</td>
|
||||
<th>
|
||||
</th>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div >
|
||||
<?php
|
||||
@@ -153,7 +171,7 @@ use yii\helpers\Html;
|
||||
}
|
||||
echo Html::a("Megbízás részletek",['ticket-installment-request/view', 'id' => $model['request_id_ticket_installment_request']] ,[ 'class' => 'btn btn-primary']);
|
||||
if ( !empty( $model['ticket_id_ticket'] )){
|
||||
echo Html::a("Bérlet részletei",['ticket-installment-request/index', 'TicketInstallmentRequestSearch[id_ticket]' => $model['ticket_id_ticket']] ,[ 'class' => 'btn btn-primary']);
|
||||
echo Html::a("Szerződés megbízásai",['ticket-installment-request/index', 'TicketInstallmentRequestSearch[id_contract]' => $model['request_id_contract']] ,[ 'class' => 'btn btn-primary']);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
@@ -47,10 +47,10 @@ use yii\helpers\Html;
|
||||
<tr>
|
||||
<tr>
|
||||
<th>
|
||||
Megbízás inditására irányzott dátum
|
||||
Megbízás esedékességének dátuma
|
||||
</th>
|
||||
<td>
|
||||
<?php echo \Yii::$app->formatter->asDatetime( $model['request_request_target_time_at'] );?>
|
||||
<?php echo \Yii::$app->formatter->asDate( $model['request_request_target_time_at'] );?>
|
||||
</td>
|
||||
<th>
|
||||
Megbízás elindításának ideje
|
||||
@@ -78,8 +78,10 @@ use yii\helpers\Html;
|
||||
<td>
|
||||
</td>
|
||||
<th>
|
||||
Szerződés azonosíót
|
||||
</th>
|
||||
<td>
|
||||
<?php echo $model['request_id_contract'] ;?>
|
||||
</td>
|
||||
|
||||
<tr>
|
||||
|
||||
@@ -39,6 +39,9 @@ $ticketTypeOptions = ['' => 'Mind'] + ArrayHelper::map(TicketType::read(), 'i
|
||||
</div>
|
||||
</div>
|
||||
<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, 'customer_name')->label("Vendég neve") ?>
|
||||
</div>
|
||||
@@ -56,7 +59,7 @@ $ticketTypeOptions = ['' => 'Mind'] + ArrayHelper::map(TicketType::read(), 'i
|
||||
'autoclose'=>true,
|
||||
'format' => 'yyyy.mm.dd'
|
||||
]
|
||||
])->label('Megbízás inditására irányzott kezdete ( inklúzív )') ?>
|
||||
])->label('Megbízás esedékességének kezdete ( inklúzív )') ?>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<?= $form->field($model, 'end') ->widget(DatePicker::classname(), [
|
||||
@@ -64,7 +67,7 @@ $ticketTypeOptions = ['' => 'Mind'] + ArrayHelper::map(TicketType::read(), 'i
|
||||
'autoclose'=>true,
|
||||
'format' => 'yyyy.mm.dd'
|
||||
]
|
||||
])->label('Megbízás inditására irányzott dátum vége ( exklúzív )') ?>
|
||||
])->label('Megbízás esedékességének vége ( exklúzív )') ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php /*?>
|
||||
|
||||
@@ -37,6 +37,9 @@ $ticketTypeOptions = ['' => 'Mind'] + ArrayHelper::map(TicketType::read(), 'i
|
||||
</div>
|
||||
</div>
|
||||
<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, 'customer_name')->label("Vendég neve") ?>
|
||||
</div>
|
||||
@@ -68,7 +71,6 @@ $ticketTypeOptions = ['' => 'Mind'] + ArrayHelper::map(TicketType::read(), 'i
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton(Yii::t('common/ticket_installment_request', 'Search'), ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::resetButton(Yii::t('common/ticket_installment_request', 'Reset'), ['class' => 'btn btn-default']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
@@ -48,7 +48,9 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
if ( $model->isStatusRejected()){
|
||||
echo Html::a("Teljesítettnek jelölés",['accept', 'id' => $model->id_ticket_installment_request] ,['data-method' =>'post', 'class' => 'btn btn-danger']);
|
||||
//echo Html::a("Teljesítettnek jelölés",['accept', 'id' => $model->id_ticket_installment_request] ,['data-method' =>'post', 'class' => 'btn btn-danger']);
|
||||
|
||||
echo "Teljesítettnek jelölés a recepciós felületen lehetséges!";
|
||||
}
|
||||
?>
|
||||
<div class="request-view <?= $statusStyle ?>">
|
||||
@@ -132,6 +134,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if (isset($model->ticket)) {?>
|
||||
<tr>
|
||||
<th>
|
||||
Bérlet azonosító
|
||||
@@ -170,24 +173,25 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
<tr>
|
||||
<th>
|
||||
Bérlet részletek száma
|
||||
Szerződés részletek száma
|
||||
</th>
|
||||
<td>
|
||||
<?php echo $model->ticket->part_count ;?>
|
||||
<?php echo $model->contract->part_count ;?>
|
||||
</td>
|
||||
<th>
|
||||
Bérlet esedékes részlet
|
||||
Szerződés esedékes részlet
|
||||
</th>
|
||||
<td>
|
||||
<?php echo $model->ticket->part ;?>
|
||||
<?php echo $model->contract->part_required ;?>
|
||||
</td>
|
||||
<th>
|
||||
Bérlet utoljára fizetett részlet
|
||||
Szerződés utoljára fizetett részlet
|
||||
</th>
|
||||
<td>
|
||||
<?php echo $model->ticket->part_paid ;?>
|
||||
<?php echo $model->contract->part_paid ;?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -216,7 +220,7 @@ if ( !empty( $model->idGiro )){
|
||||
echo Html::a("Köteg",['ugiro/view', 'id' => $model->idGiro] ,[ 'class' => 'btn btn-primary']);
|
||||
echo Html::a("Részletek a kötegben",['ticket-installment-request/index', 'TicketInstallmentRequestSearch[id_ugiro]' => $model->idGiro] ,[ 'class' => 'btn btn-primary']);
|
||||
}
|
||||
echo Html::a("Bérlet fizetési részletei",['ticket-installment-request/index', 'TicketInstallmentRequestSearch[id_ticket]' => $model->id_ticket] ,[ 'class' => 'btn btn-primary']);
|
||||
echo Html::a("Szerzőés megbízásai",['ticket-installment-request/index', 'TicketInstallmentRequestSearch[id_contract]' => $model->id_contract] ,[ 'class' => 'btn btn-primary']);
|
||||
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user