update gán lịch trình cho nhân viên

This commit is contained in:
2020-10-14 14:00:01 +07:00
parent 620dfc75c2
commit ed061f5994
16 changed files with 2626 additions and 100 deletions

View File

@@ -0,0 +1,22 @@
<?php
namespace app\widgets;
use yii\base\Widget;
class ScheduleDepartment extends Widget {
public $pid;
public function init() {
parent::init();
}
public function run() {
return $this->render("schedule-department", [
"lists" => \app\models\Department::find()->andWhere(['pid' => $this->pid])->all()
]);
}
}

View File

@@ -0,0 +1,15 @@
{foreach from=$lists item=l}
<div style="cursor: pointer;">
<i class="fa fa-minus-square-o" onclick="schedule.tree(this);" data="{$l->code}" data-stt="true"></i>
<span class="department-schedule" onclick="schedule.chooseDepartment(this);" data-href='{yii\helpers\Url::to(['/assign/staff','id'=>$l->code])}'>
{$l->name}
{$staff=$l->countStaff}
{if $staff>0}
[<span class="text-red">{$staff}</span>]
{/if}
</span>
<div id="sub-department-schedule-{$l->code}" style="padding-left: 20px;">
{\app\widgets\ScheduleDepartment::widget(["pid"=>$l->code])}
</div>
</div>
{/foreach}