update control logs

This commit is contained in:
2020-12-04 15:13:14 +07:00
parent 3ef04dfb5a
commit 811ed32e04
13 changed files with 282 additions and 36 deletions

View File

@@ -0,0 +1,102 @@
{extends file=$smarty.current_dir|cat:'/../extends.tpl'}
{use class="yii\helpers\Url"}
{use class="yii\grid\GridView"}
{use class="app\assets\ControlLogsAsset"}
{ControlLogsAsset::register($this)|void}
{block name='content'}
<style>
.row{
margin-bottom: 5px;
}
input{
width: 100%;
}
.table-striped > tbody > tr:nth-of-type(odd){
background-color: rgb(210, 210, 210);
}
</style>
<div class="row">
<div class="col-md-10" style="max-height: 850px;overflow-y: auto;">
{GridView::widget([
'dataProvider' => $dataProvider,
'layout'=> \app\helpers\CaptureLogsGrid::getLayout(),
'tableOptions' => [
'class' => 'table table-striped table-bordered',
'style' => 'background:#fff;min-width:700px;'
],
'rowOptions' => \app\helpers\CaptureLogsGrid::rows(),
'columns' => [
[
'attribute' => 'id',
'contentOptions' => ['class' => 'text-center'],
'headerOptions' => ['class' => 'text-center']
],
[
'attribute' => 'time',
'contentOptions' => ['class' => 'text-center'],
'headerOptions' => ['class' => 'text-center'],
'value' => \app\helpers\CaptureLogsGrid::time()
],
[
'attribute' => 'staff_image',
'format' => 'raw',
'contentOptions' => ['class' => 'text-center'],
'headerOptions' => ['class' => 'text-center', 'style' => 'width:15%'],
'value' => \app\helpers\CaptureLogsGrid::registrationImage()
],
[
'attribute' => 'image',
'format' => "raw",
'contentOptions' => ['class' => 'text-center'],
'headerOptions' => ['class' => 'text-center', 'style' => 'width:15%'],
'value' => \app\helpers\CaptureLogsGrid::image()
],
'listManagement.name',
'listManagement.gender',
'listManagement.telephone',
[
'attribute' => 'listManagement.birthday',
'contentOptions' => ['class' => 'text-center'],
'headerOptions' => ['class' => 'text-center'],
'value' => \app\helpers\CaptureLogsGrid::birthday()
],
'listManagement.address'
]
])}
</div>
<div class="col-md-2" style="padding-right: 30px;">
<h4>Tìm kiếm dữ liệu</h4>
<div class="form-group">
<label class="control-label">Từ</label>
<input type="text" class="form-control datepicker" value="{$f|date_format:"H:i d/m/Y"}" name="From">
</div>
<div class="form-group">
<label class="control-label">Đến</label>
<input type="text" class="form-control datepicker" value="{$t|date_format:"H:i d/m/Y"}" name="To">
</div>
<div class="form-group">
<label class="control-label">Name</label>
<input type="text" class="form-control" value="{Yii::$app->request->get("name")}" name="NameSearch">
</div>
<div class="form-group">
<label class="control-label">Type</label>
<select class="form-control" name="TypeSearch">
<option value="all">All</option>
{html_options options=$typeArray selected=Yii::$app->request->get("type")}
</select>
</div>
<div class="form-group">
<label class="control-label">Gender</label>
<select class="form-control" name="GenderSearch">
<option value="all">All</option>
{html_options options=$genderArray selected=Yii::$app->request->get("gender")}
</select>
</div>
<div class="text-center">
<button class="btn btn-info" onclick="_search(this);" data-href="{Url::to(['/control-logs'])}">
<i class="fa fa-search"></i> Tìm kiếm
</button>
</div>
</div>
</div>
{/block}

View File

@@ -136,12 +136,12 @@
</div>
</div>
</div>
<hr style="border-top: 1px solid #000;">
{*<hr style="border-top: 1px solid #000;">
<div class="text-center">
<button class="btn btn-info" onclick="_form();">
<i class="fa fa-plus-circle"></i> Thêm mới
</button>
</div>
</div>*}
</div>
</div>
<div style="width: 300px;position: absolute;" id="menu" class="hidden">
@@ -166,7 +166,7 @@
<div class="row">
<div class="col-md-4 text-center">
<img src="" class="img-thumbnail" id="FaceImage" style="width: 150px;height: 150px;">
<div class="">
<div class="" id="upload-btn">
<input type="file" name="AnhNhanVien" id="AnhNhanVien">
<input type="hidden" name="AnhNhanVienUrl" value="">
<input type="hidden" name="url_upload_staff_image" value="{Url::to(['upload'])}">