Add new flag / flag_out logick

This commit is contained in:
2016-09-25 13:32:27 +02:00
parent d46e717b53
commit 0ad2dafdeb
19 changed files with 389 additions and 29 deletions

View File

@@ -137,13 +137,17 @@ class ContractController extends Controller {
] );
}
}
/**
* Deletes an existing Contract model.
* If deletion is successful, the browser will be redirected to the 'index' page.
*
* @param integer $id
*
* @param integer $id
* @return mixed
* @throws Exception
* @throws NotFoundHttpException
* @throws \Exception
* @throws \yii\db\Exception
*/
public function actionDelete($id) {
$model = $this->findModel ( $id );

View File

@@ -63,7 +63,7 @@ class CardSearch extends Card
'customer.name as customer_name' ,
'customer.id_customer as customer_id_customer',
'key.number as key_number',
'card.flag as card_flag',
'card.validity as card_validity',
]);
@@ -107,7 +107,7 @@ class CardSearch extends Card
'asc' => ['key.number' => SORT_ASC ],
'desc' => ['key.number' => SORT_DESC],
],
'card_flag' => [
'card_validity' => [
'asc' => ['card.flag' => SORT_ASC ],
'desc' => ['card.flag' => SORT_DESC],
],

View File

@@ -69,10 +69,10 @@ $this->params['breadcrumbs'][] = $this->title;
'label' => 'Kulcs száma'
],
[
'attribute' => 'card_flag',
'attribute' => 'card_validity',
'label' => 'Info',
'value' => function ($model, $key, $index, $column){
return Helper::getArrayValue(DoorLog::getCardFlagTexts(), $model['card_flag'], "Ismeretlen ok");
return Helper::getArrayValue(DoorLog::getCardFlagTexts(), $model['card_validity'], "Ismeretlen ok");
}
],