|
@@ -195,11 +195,9 @@ class Route_UrlAction_UserProNetMediaZaliczka extends RouteBase {// TODO: UrlAct
|
|
|
echo UI::h('ul', ['class' => "nav nav-tabs", 'style' => "margin-top:24px"], [
|
|
echo UI::h('ul', ['class' => "nav nav-tabs", 'style' => "margin-top:24px"], [
|
|
|
UI::h('li', ['role' => "presentation", 'class' => ('wnioski' == $tab) ? "active" : ''], [
|
|
UI::h('li', ['role' => "presentation", 'class' => ('wnioski' == $tab) ? "active" : ''], [
|
|
|
UI::h('a', ['href'=>Request::getPathUri() . "index.php?_route=UrlAction_UserProNetMediaZaliczka&idUser={$idUser}&tab=wnioski"], "Wnioski")
|
|
UI::h('a', ['href'=>Request::getPathUri() . "index.php?_route=UrlAction_UserProNetMediaZaliczka&idUser={$idUser}&tab=wnioski"], "Wnioski")
|
|
|
- // UI::h('a', ['href'=>"#tab-wnioski", 'onClick' => "return p5__Zaliczka__showTab(this, 'tab-wnioski')"], "Wnioski")
|
|
|
|
|
]),
|
|
]),
|
|
|
UI::h('li', ['role' => "presentation", 'class' => ('zaliczki' == $tab) ? "active" : ''], [
|
|
UI::h('li', ['role' => "presentation", 'class' => ('zaliczki' == $tab) ? "active" : ''], [
|
|
|
UI::h('a', ['href'=>Request::getPathUri() . "index.php?_route=UrlAction_UserProNetMediaZaliczka&idUser={$idUser}&tab=zaliczki"], "Zaliczki")
|
|
UI::h('a', ['href'=>Request::getPathUri() . "index.php?_route=UrlAction_UserProNetMediaZaliczka&idUser={$idUser}&tab=zaliczki"], "Zaliczki")
|
|
|
- // UI::h('a', ['href'=>"#tab-zaliczki", 'onClick' => "return p5__Zaliczka__showTab(this, 'tab-zaliczki')"], "Zaliczki")
|
|
|
|
|
]),
|
|
]),
|
|
|
]);
|
|
]);
|
|
|
if ('wnioski' == $tab) {
|
|
if ('wnioski' == $tab) {
|
|
@@ -207,54 +205,10 @@ class Route_UrlAction_UserProNetMediaZaliczka extends RouteBase {// TODO: UrlAct
|
|
|
} else if ('zaliczki' == $tab) {
|
|
} else if ('zaliczki' == $tab) {
|
|
|
$this->viewWidgetUserZaliczki($idUser);
|
|
$this->viewWidgetUserZaliczki($idUser);
|
|
|
}
|
|
}
|
|
|
- // UI::startTag('div', ['id'=>'tab-wnioski']);
|
|
|
|
|
- // $this->viewWidgetUserWnioski();
|
|
|
|
|
- // UI::endTag('div');// #tab-wnioski
|
|
|
|
|
- // UI::startTag('div', ['id'=>'tab-zaliczki']);
|
|
|
|
|
- // $this->viewWidgetUserZaliczki();
|
|
|
|
|
- // UI::endTag('div');// #tab-zaliczki
|
|
|
|
|
UI::endContainer();
|
|
UI::endContainer();
|
|
|
- // echo UI::h('script', [], "
|
|
|
|
|
- // (function (window) {
|
|
|
|
|
- // var idxSelected = 0
|
|
|
|
|
- // var tabs = [
|
|
|
|
|
- // 'tab-wnioski',
|
|
|
|
|
- // 'tab-zaliczki'
|
|
|
|
|
- // ]
|
|
|
|
|
- // var tabNodes = [
|
|
|
|
|
- // window.document.getElementById('tab-wnioski'),
|
|
|
|
|
- // window.document.getElementById('tab-zaliczki'),
|
|
|
|
|
- // ]
|
|
|
|
|
- //
|
|
|
|
|
- // function p5__Zaliczka__showTab(n, tab) {
|
|
|
|
|
- // var idxTab = tabs.indexOf(tab)
|
|
|
|
|
- // if (-1 === idxTab) return
|
|
|
|
|
- // n.parentNode.parentNode.childNodes.forEach(function (liNode) {
|
|
|
|
|
- // if (liNode.nodeType !== 1) return // Node.ELEMENT_NODE == 1
|
|
|
|
|
- // if (liNode.tagName !== 'LI') return
|
|
|
|
|
- // liNode.classList.remove('active')
|
|
|
|
|
- // })
|
|
|
|
|
- // n.parentNode.classList.add('active')
|
|
|
|
|
- // p5__Zaliczka__renderTabs(idxTab)
|
|
|
|
|
- // return false
|
|
|
|
|
- // }
|
|
|
|
|
- //
|
|
|
|
|
- // function p5__Zaliczka__renderTabs(idxTab) {
|
|
|
|
|
- // tabNodes.forEach(function (tabNode) {
|
|
|
|
|
- // tabNode.style.display = 'none'
|
|
|
|
|
- // })
|
|
|
|
|
- // tabNodes[idxTab].style.display = 'block'
|
|
|
|
|
- // }
|
|
|
|
|
- //
|
|
|
|
|
- // p5__Zaliczka__renderTabs(idxSelected)
|
|
|
|
|
- //
|
|
|
|
|
- // window.p5__Zaliczka__showTab = p5__Zaliczka__showTab
|
|
|
|
|
- // })(window)
|
|
|
|
|
- // ");
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public function viewWidgetUserWnioski($data = []) {
|
|
|
|
|
- $idUser = V::get('idUser', User::getID(), $data);
|
|
|
|
|
|
|
+ public function viewWidgetUserWnioski($idUser) {
|
|
|
if (!$idUser) throw new Exception("Błędny numer pracownika");
|
|
if (!$idUser) throw new Exception("Błędny numer pracownika");
|
|
|
// $workerLogin = DB::getPDO()->fetchValue("select u.ADM_ACCOUNT from ADMIN_USERS u where u.ID={$idUser} limit 1");
|
|
// $workerLogin = DB::getPDO()->fetchValue("select u.ADM_ACCOUNT from ADMIN_USERS u where u.ID={$idUser} limit 1");
|
|
|
// if (!$workerLogin) throw new Exception("Pracownik nie został odnaleziony - nr '{$idUser}'");
|
|
// if (!$workerLogin) throw new Exception("Pracownik nie został odnaleziony - nr '{$idUser}'");
|
|
@@ -286,8 +240,7 @@ class Route_UrlAction_UserProNetMediaZaliczka extends RouteBase {// TODO: UrlAct
|
|
|
echo $tbl->render();
|
|
echo $tbl->render();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public function viewWidgetUserZaliczki($data = []) {
|
|
|
|
|
- $idUser = V::get('idUser', User::getID(), $data);
|
|
|
|
|
|
|
+ public function viewWidgetUserZaliczki($idUser) {
|
|
|
if (!$idUser) throw new Exception("Błędny numer pracownika");
|
|
if (!$idUser) throw new Exception("Błędny numer pracownika");
|
|
|
$workerLogin = DB::getPDO()->fetchValue("select u.ADM_ACCOUNT from ADMIN_USERS u where u.ID={$idUser} limit 1");
|
|
$workerLogin = DB::getPDO()->fetchValue("select u.ADM_ACCOUNT from ADMIN_USERS u where u.ID={$idUser} limit 1");
|
|
|
if (!$workerLogin) throw new Exception("Pracownik nie został odnaleziony - nr '{$idUser}'");
|
|
if (!$workerLogin) throw new Exception("Pracownik nie został odnaleziony - nr '{$idUser}'");
|
|
@@ -312,7 +265,7 @@ class Route_UrlAction_UserProNetMediaZaliczka extends RouteBase {// TODO: UrlAct
|
|
|
'currSortFlip' => "desc"
|
|
'currSortFlip' => "desc"
|
|
|
]);
|
|
]);
|
|
|
$tbl->setForceFilterInit([
|
|
$tbl->setForceFilterInit([
|
|
|
- 'L_APPOITMENT_USER' => $workerLogin
|
|
|
|
|
|
|
+ 'ID_USER' => $idUser
|
|
|
]);
|
|
]);
|
|
|
echo $tbl->render();
|
|
echo $tbl->render();
|
|
|
|
|
|