doorcardpass && door move manager logging
This commit is contained in:
@@ -10,8 +10,53 @@ use frontend\components\HtmlHelper;
|
||||
/* @var $model frontend\models\ReceptionForm */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
<?php $form = ActiveForm::begin([
|
||||
'action' => ['door-card-pass/allow', 'number' => $model->getCardNumber()],
|
||||
<?php
|
||||
|
||||
if (! ( isset($model) && isset($model->card))){
|
||||
return;
|
||||
}
|
||||
$activeCardPasses = \common\models\DoorCardPass::find()
|
||||
->andWhere(
|
||||
[
|
||||
'id_card' => $model->card->id_card,
|
||||
'invalidated_at' => null ,
|
||||
|
||||
// [ '>=', $field , $start ]
|
||||
|
||||
|
||||
]
|
||||
)->andWhere(
|
||||
['>=', 'valid_until_at', \common\components\DateUtil::formatDateTimeUtc(\common\components\DateUtil::utcDateTime())],
|
||||
)
|
||||
->orderBy(['valid_until_at' => SORT_DESC ])->all();
|
||||
|
||||
if (count($activeCardPasses) > 0){
|
||||
$cardPass = $activeCardPasses[0];
|
||||
?>
|
||||
<div>
|
||||
<?php
|
||||
echo "Forgó kapun beléphet eddig: " ;
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
?>
|
||||
<div>
|
||||
<?php
|
||||
echo $cardPass->valid_until_at ;
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}else {
|
||||
?>
|
||||
<div>
|
||||
Nincs érvényes forgó kapu belépő
|
||||
</div>
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
$form = ActiveForm::begin([
|
||||
'action' => ['door-card-pass/allow-card', 'idCard' => $model->card->id_card],
|
||||
'method' => 'post',
|
||||
]); ?>
|
||||
<div class="row">
|
||||
|
||||
Reference in New Issue
Block a user