|
@@ -260,9 +260,9 @@ function parseCsvFile( fileData, enumType ) {
|
|
},
|
|
},
|
|
}).then(function (result) {
|
|
}).then(function (result) {
|
|
|
|
|
|
- console.log('result', result)
|
|
|
|
|
|
+ if(DBG) console.log('result', result)
|
|
}).catch(function (e) {
|
|
}).catch(function (e) {
|
|
- console.log('catch: ', e)
|
|
|
|
|
|
+ if(DBG) console.log('catch: ', e)
|
|
});
|
|
});
|
|
|
|
|
|
}).catch(function(ex) {
|
|
}).catch(function(ex) {
|
|
@@ -1147,7 +1147,6 @@ function urlFetchKontrahenci(page) {
|
|
|
|
|
|
function urlFetchPracownicy(page) {
|
|
function urlFetchPracownicy(page) {
|
|
hideMoreRecordFunctionsPopover()
|
|
hideMoreRecordFunctionsPopover()
|
|
-
|
|
|
|
var page = page || getItemLocalStorage('Bocian.biAuditForm.pracownicy.pagination.page');
|
|
var page = page || getItemLocalStorage('Bocian.biAuditForm.pracownicy.pagination.page');
|
|
|
|
|
|
if ( page === 1) {
|
|
if ( page === 1) {
|
|
@@ -1532,7 +1531,6 @@ function deleteListIdBiAuditReaport(type, valueArray) {
|
|
|
|
|
|
// filter group detect
|
|
// filter group detect
|
|
function fetchGroupPracownicy() {
|
|
function fetchGroupPracownicy() {
|
|
-
|
|
|
|
fetch(URL_FETCH_GROUP_PRACOWNICY, {
|
|
fetch(URL_FETCH_GROUP_PRACOWNICY, {
|
|
credentials: 'same-origin'
|
|
credentials: 'same-origin'
|
|
})
|
|
})
|
|
@@ -1556,7 +1554,9 @@ function fetchGroupPracownicy() {
|
|
var activeButton = '';
|
|
var activeButton = '';
|
|
|
|
|
|
data.body.itmesGroupPracownicy.forEach (function(row) {
|
|
data.body.itmesGroupPracownicy.forEach (function(row) {
|
|
- if ( filterIdGroup === row['ID'] ) { activeButton = 'active'; $('#group-pracownicy button.active').removeClass('active'); }
|
|
|
|
|
|
+ activeButton = '';
|
|
|
|
+ if ( filterIdGroup === parseInt(row['ID']) ) {activeButton = 'active'; $('#group-pracownicy button.active').removeClass('active');
|
|
|
|
+ }
|
|
groupsPracownicy += '<button class="btn btn-default '+activeButton+'" title="' + row['NAZWA'] + '" data-group-filter="' + row['ID'] + '">' + row['NAZWA'] + '</button>';
|
|
groupsPracownicy += '<button class="btn btn-default '+activeButton+'" title="' + row['NAZWA'] + '" data-group-filter="' + row['ID'] + '">' + row['NAZWA'] + '</button>';
|
|
});
|
|
});
|
|
|
|
|
|
@@ -1595,7 +1595,8 @@ function fetchGroupKontrahenci() {
|
|
var activeButton = '';
|
|
var activeButton = '';
|
|
|
|
|
|
data.body.itemsGroupKontrahenci.forEach (function(row) {
|
|
data.body.itemsGroupKontrahenci.forEach (function(row) {
|
|
- if ( filterIdGroup === row['ID'] ) { activeButton = 'active'; $('#group-kontrahenci button.active').removeClass('active'); }
|
|
|
|
|
|
+ activeButton = '';
|
|
|
|
+ if ( filterIdGroup === parseInt(row['ID']) ) { activeButton = 'active'; $('#group-kontrahenci button.active').removeClass('active'); }
|
|
groupsKontrahenci += '<button class="btn btn-default '+activeButton+'" title="'+row['NAZWA']+'" data-group-filter="'+row['ID']+'">'+row['NAZWA']+'</button>';
|
|
groupsKontrahenci += '<button class="btn btn-default '+activeButton+'" title="'+row['NAZWA']+'" data-group-filter="'+row['ID']+'">'+row['NAZWA']+'</button>';
|
|
});
|
|
});
|
|
|
|
|
|
@@ -1614,7 +1615,6 @@ function fetchGroupKontrahenci() {
|
|
function detectChoiseFilter() {
|
|
function detectChoiseFilter() {
|
|
|
|
|
|
$('#group-kontrahenci').on('click', 'button', function(evt) {
|
|
$('#group-kontrahenci').on('click', 'button', function(evt) {
|
|
-
|
|
|
|
$('#group-kontrahenci button.active').removeClass('active');
|
|
$('#group-kontrahenci button.active').removeClass('active');
|
|
$(this).addClass('active');
|
|
$(this).addClass('active');
|
|
|
|
|
|
@@ -1639,8 +1639,8 @@ function detectChoiseFilter() {
|
|
urlFetchKontrahenci(1);
|
|
urlFetchKontrahenci(1);
|
|
|
|
|
|
});
|
|
});
|
|
- $('#group-pracownicy').on('click', 'button', function(evt) {
|
|
|
|
-
|
|
|
|
|
|
+ $('#group-pracownicy').on('click', 'button', function(e) {
|
|
|
|
+ e.preventDefault();
|
|
$('#group-pracownicy button.active').removeClass('active');
|
|
$('#group-pracownicy button.active').removeClass('active');
|
|
$(this).addClass('active');
|
|
$(this).addClass('active');
|
|
|
|
|
|
@@ -2008,8 +2008,8 @@ var Pagination = {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
-/*function todo__fetchRaport(id) {
|
|
|
|
- p5WFS_GetFeature('default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA', {
|
|
|
|
|
|
+function todo__fetchRaport(id) {
|
|
|
|
+/* p5WFS_GetFeature('default_db__x3A__BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA:BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA', {
|
|
primaryKey: id,
|
|
primaryKey: id,
|
|
resolve: 'all',
|
|
resolve: 'all',
|
|
resolveDepth: 3,
|
|
resolveDepth: 3,
|
|
@@ -2018,8 +2018,8 @@ var Pagination = {
|
|
}).catch(function (e) {
|
|
}).catch(function (e) {
|
|
if(DBG) console.warn(e)
|
|
if(DBG) console.warn(e)
|
|
p5UI__notifyAjaxCallback({ type: 'error', msg: e })
|
|
p5UI__notifyAjaxCallback({ type: 'error', msg: e })
|
|
- })
|
|
|
|
-}*/
|
|
|
|
|
|
+ })*/
|
|
|
|
+}
|
|
|
|
|
|
function removeFiltersPracownicy(event, btnNode) {
|
|
function removeFiltersPracownicy(event, btnNode) {
|
|
event.preventDefault()
|
|
event.preventDefault()
|
|
@@ -2166,7 +2166,6 @@ global.p5UI_TableAjax_generateFunctionNode = p5UI_TableAjax_generateFunctionNode
|
|
|
|
|
|
$(document).ready(function(){
|
|
$(document).ready(function(){
|
|
rootChangeForm();
|
|
rootChangeForm();
|
|
- detectChoiseFilter();
|
|
|
|
updateTopCounters();
|
|
updateTopCounters();
|
|
});
|
|
});
|
|
|
|
|