-
Notifications
You must be signed in to change notification settings - Fork 0
/
Developer Contributions Register MF.html
594 lines (475 loc) · 24.9 KB
/
Developer Contributions Register MF.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
<html>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/PapaParse/4.1.2/papaparse.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/floatthead/2.2.1/jquery.floatThead.min.js"></script>
<!-- PivotTable.js libs from ../dist -->
<!-- link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/pivottable/2.23.0/pivot.min.css">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pivottable/2.23.0/pivot.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pivottable/2.23.0/d3_renderers.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pivottable/2.23.0/plotly_renderers.min.js"></script>
<script type="text/javascript" src='https://cdnjs.cloudflare.com/ajax/libs/pivottable/2.23.0/export_renderers.min.js'></script -->
<script type="text/javascript" src="/contributionspaid/scripts/PivotJS-subtotal/subtotal.js"></script>
<link rel="stylesheet" type="text/css" href="/contributionspaid/scripts/PivotJS-subtotal/subtotal.css">
<script type="text/javascript" src="/contributionspaid/scripts/PivotJS-multifactAggregator/pivot_mf.js"></script>
<link rel="stylesheet" type="text/css" href="/contributionspaid/scripts/PivotJS-multifactAggregator/pivot_mf.css">
<style>
body {font-family: Verdana;}
th.pvtRowLabel {
white-space: nowrap;
}
.ms-webpartPage-root {
border-spacing: 0px;
}
.desc {
padding-bottom: 10px;
width: 80vw;
}
.rotate {
height: 90px;/* fixed height . set fixed width to rotated elements */
width: 110px !important;/* a liitle less than parents height */
-webkit-transform: rotate(310deg);
-moz-transform: rotate(310deg);
-ms-transform: rotate(310deg);
-o-transform: rotate(310deg);
transform: rotate(310deg) translatex(-64%) translatey(56%);
transform-origin: top left;
margin-right: -73px;
}
#inclusions strong {
font-weight: 500;
color:lightseagreen;
}
/* extras for floating headers */
.floatThead-container {
overflow: hidden;
}
.pvtFilterBox {
z-index: 2001;
}
/* ************************* */
.pvtRowLabel {
font-weight: normal;
}
.hidden {
display: none;
}
.note {
font-size: smaller;
font-style: italic;
color: silver;
}
#progressHeading {
color: grey;
font-size: smaller;
}
table.pvtTable tbody tr th.pvtRowLabel.discontinued, .discontinued {
color:grey !important;
background-color: beige !important;
}
#header {
width: 100%;
background-color: lightblue;
height: 100px;
}
.excelImg {
width: 30px;
height: 30px;
}
table.pvtTable tbody tr th.pvtRowLabel.comFacCell,
table.pvtTable thead tr th.pvtColLabel.comFacCell {
background-color: #F9DFE1 !important;
}
table.pvtTable tbody tr th.pvtRowLabel.osCell,
table.pvtTable thead tr th.pvtColLabel.osCell {
background-color: #D4EBD4 !important;
}
table.pvtTable tbody tr th.pvtRowLabel.roadCell,
table.pvtTable thead tr th.pvtColLabel.roadCell {
background-color: #f1e8df !important;
}
table.pvtTable tbody tr th.pvtRowLabel.drainageCell,
table.pvtTable thead tr th.pvtColLabel.drainageCell {
background-color: #e4eef8 !important;
}
table.pvtTable tbody tr th.pvtRowLabel.otherCell,
table.pvtTable thead tr th.pvtColLabel.otherCell {
background-color: #EFEED8 !important;
}
#subTotalRowLimitDiv input{
width: 60px;
}
#subTotalRowLimitDiv{
padding: 2px;
/* display: inline-block; */
background-color: lightgrey;
font-size: smaller;
/* display: none; */
}
</style>
<body>
<div id="pivotUI"></div>
<script>
var dataObj;
var fileNameAndPath = "/contributionspaid/data/CurrentS94TransactionsMF.csv";
var storageTag = "dcRegisterMF";
var discontinued = [
{
"Charge_Type": "ComFacNth",
"Levy": "S95-15 - Community Facilities (Nth Coast)",
"DiscontinuedDate": "28/9/2010",
"Discontinued": "discontinued"
},
{
"Charge_Type": "ComFacSth",
"Levy": "S95-15 - Community Facilities (Sth Coast)",
"DiscontinuedDate": "28/9/2010",
"Discontinued": "discontinued"
},
{
"Charge_Type": "CommFac3",
"Levy": "S94-03 - Community Facilities",
"DiscontinuedDate": "30/6/2020",
"Discontinued": "discontinued"
},
{
"Charge_Type": "Cycleway19",
"Levy": "S94-19 - Kings Beach/Forest - Cycleways",
"DiscontinuedDate": "15/11/2005",
"Discontinued": "consolidated in "
},
{
"Charge_Type": "HeavyHaulD",
"Levy": "S94-04 - Heavy Haulage Contributions",
"DiscontinuedDate": "1/12/2016",
"Discontinued": "discontinued"
},
{
"Charge_Type": "LCA-1",
"Levy": "S94-04 - Road Contribution LCA1",
"DiscontinuedDate": "31/1/2012",
"Discontinued": "discontinued"
},
{
"Charge_Type": "LCA-2",
"Levy": "S94-04 - Road Contribution LCA2",
"DiscontinuedDate": "31/1/2012",
"Discontinued": "discontinued"
},
{
"Charge_Type": "Sector12_4",
"Levy": "S94-04 - Road Contribution Sector 12",
"DiscontinuedDate": "19/7/2007",
"Discontinued": "Split to 12a/12b"
},
{
"Charge_Type": "Sector7a_4",
"Levy": "S94-04 - Road Contribution Sector 07a Dbah/Cab",
"DiscontinuedDate": "19/7/2007",
"Discontinued": "consolidted in Sector 7"
},
{
"Charge_Type": "Sector7b_4",
"Levy": "S94-04 - Road Contribution Sector 07b Kings Forest",
"DiscontinuedDate": "19/7/2007",
"Discontinued": "consolidated in Sector 7"
},
{
"Charge_Type": "Sector7c_4",
"Levy": "S94-04 - Road Contribution Sector 07c Kings Beach",
"DiscontinuedDate": "19/7/2007",
"Discontinued": "consolidated in Sector 7"
},
{
"Charge_Type": "Sector8a_4",
"Levy": "S94-04 - Road Contribution Sector 08a",
"DiscontinuedDate": "19/7/2007",
"Discontinued": "consolidated in Sector 8"
},
{
"Charge_Type": "Sector8b_4",
"Levy": "S94-04 - Road Contribution Sector 08b",
"DiscontinuedDate": "19/7/2007",
"Discontinued": "consolidated in Sector 8"
},
{
"Charge_Type": "RemShire",
"Levy": "S94-16 - Emergency Facilities - Rest of Shire",
"DiscontinuedDate": "28/2/2006",
"Discontinued": "discontinued on Ministers Direction"
},
{
"Charge_Type": "Tou/KH/Sea",
"Levy": "S94-16 - Emergency Fac Tou/KH/Sea/KF/CasB",
"DiscontinuedDate": "28/2/2006",
"Discontinued": "discontinued on Ministers Direction"
},
{
"Charge_Type": "SubOnly6",
"Levy": "S94-06 - Street Trees",
"DiscontinuedDate": "12/7/2005",
"Discontinued": "discontinued on Ministers Direction"
},
{
"Charge_Type": "Struct5_2",
"Levy": "S94-05 - Structured Open Space Zone 2",
"DiscontinuedDate": "26/8/2002",
"Discontinued": "consolidated into Local Structure Open Space"
},
{
"Charge_Type": "Struct5_3",
"Levy": "S94-05 - Structured Open Space Zone 3",
"DiscontinuedDate": "26/8/2002",
"Discontinued": "consolidated into Local Structure Open Space"
},
{
"Charge_Type": "Struct5_1",
"Levy": "S94-05 - Structured Open Space Zone 1",
"DiscontinuedDate": "26/8/2002",
"Discontinued": "consolidated into Local Structure Open Space"
},
{
"Charge_Type": "Casual5_1",
"Levy": "S94-05 - Casual Open Space Zone 1",
"DiscontinuedDate": "26/8/2002",
"Discontinued": "consolidated into Local Structure Open Space"
},
{
"Charge_Type": "Casual5_2",
"Levy": "S94-05 - Casual Open Space Zone 2",
"DiscontinuedDate": "26/8/2002",
"Discontinued": "consolidated into Local Structure Open Space"
},
{
"Charge_Type": "Casual5_3",
"Levy": "S94-05 - Casual Open Space Zone 3",
"DiscontinuedDate": "26/8/2002",
"Discontinued": "consolidated into Local Structure Open Space"
},
{
"Charge_Type": "Struct5_4",
"Levy": "S94-05 - Structured Open Space Zone 4",
"DiscontinuedDate": "26/8/2002",
"Discontinued": "consolidated into Local Structure Open Space"
},
{
"Charge_Type": "Casual5_4",
"Levy": "S94-05 - Casual Open Space Zone 4",
"DiscontinuedDate": "26/8/2002",
"Discontinued": "consolidated into Local Structure Open Space"
},
{
"Charge_Type": "Struct5_5",
"Levy": "S94-05 - Structured Open Space Zone 5",
"DiscontinuedDate": "26/8/2002",
"Discontinued": "consolidated into Local Structure Open Space"
},
{
"Charge_Type": "Casual5_5",
"Levy": "S94-05 - Casual Open Space Zone 5",
"DiscontinuedDate": "26/8/2002",
"Discontinued": "consolidated into Local Structure Open Space"
},
{
"Charge_Type": "Struct5_6",
"Levy": "S94-05 - Structured Open Space Zone 6",
"DiscontinuedDate": "26/8/2002",
"Discontinued": "consolidated into Local Structure Open Space"
},
{
"Charge_Type": "Casual5_6",
"Levy": "S94-05 - Casual Open Space Zone 6",
"DiscontinuedDate": "26/8/2002",
"Discontinued": "consolidated into Local Structure Open Space"
},
{
"Charge_Type": "Struct5_7",
"Levy": "S94-05 - Structured Open Space Zone 7",
"DiscontinuedDate": "26/8/2002",
"Discontinued": "consolidated into Local Structure Open Space"
},
{
"Charge_Type": "Casual5_7",
"Levy": "S94-05 - Casual Open Space Zone 7",
"DiscontinuedDate": "26/8/2002",
"Discontinued": "consolidated into Local Structure Open Space"
},
{
"Charge_Type": "Struct5_8",
"Levy": "S94-05 - Structured Open Space Zone 8",
"DiscontinuedDate": "26/8/2002",
"Discontinued": "consolidated into Local Structure Open Space"
},
{
"Charge_Type": "Struct5_9",
"Levy": "S94-05 - Structured Open Space Zone 9",
"DiscontinuedDate": "26/8/2002",
"Discontinued": "consolidated into Local Structure Open Space"
},
{
"Charge_Type": "Struct5_10",
"Levy": "S94-05 - Structured Open Space Zone 10",
"DiscontinuedDate": "26/8/2002",
"Discontinued": "consolidated into Local Structure Open Space"
}
];
console.log("renderers:");
console.log($.pivotUtilities.renderers);
var renderers = $.extend($.pivotUtilities.renderers,
$.pivotUtilities.d3_renderers,
$.pivotUtilities.plotly_renderers,
$.pivotUtilities.subtotal_renderers,
$.pivotUtilities.export_renderers);
/* var sorters = {
"Purpose": $.pivotUtilities.sortAs(
["Community Facilities","Open Space", "Roads","Drainage"]
)
} */
// var data = [ { "ParentID": "58", "ParentOpis": "58) Tomasz Kuhr - Kosakowo", "DetalID": "{03BCAAE8-F798-4B1F-8637-B88D662F8425}", "DetalOpis": "Kosz cukierniczy pomarańczowy", "IleOper": 1, "Operacje": "Razem: 1 w tym: MO -> MS (1) 11 szt. ", "MO_Oper_Sum": "-11 +0", "MO_Saldo": "-11", "MS_Oper_Sum": "+11 -0 -0 +0", "MS_Saldo": "11", "MK_Oper_Sum": "", "MK_Saldo": "0", "Okres": "2015-05-13 - 2015-05-13" }, { "ParentID": "58", "ParentOpis": "58) Tomasz Kuhr - Kosakowo", "DetalID": "{1255C28B-3B75-4748-BE25-CDAC820B2681}", "DetalOpis": "Kosz piekarniczy brązowy", "IleOper": 1, "Operacje": "Razem: 1 w tym: MO -> MS (1) 13 szt. ", "MO_Oper_Sum": "-13 +0", "MO_Saldo": "-13", "MS_Oper_Sum": "+13 -0 -0 +0", "MS_Saldo": "13", "MK_Oper_Sum": "", "MK_Saldo": "0", "Okres": "2015-05-13 - 2015-05-13" }, { "ParentID": "58", "ParentOpis": "58) Tomasz Kuhr - Kosakowo", "DetalID": "{C83A5CE5-388B-4031-BEAE-DC6B57D14F36}", "DetalOpis": "Kosz piekarniczy szary", "IleOper": 1, "Operacje": "Razem: 1 w tym: MO -> MS (1) 12 szt. ", "MO_Oper_Sum": "-12 +0", "MO_Saldo": "-12", "MS_Oper_Sum": "+12 -0 -0 +0", "MS_Saldo": "12", "MK_Oper_Sum": "", "MK_Saldo": "0", "Okres": "2015-05-13 - 2015-05-13" }, { "ParentID": "58", "ParentOpis": "58) Tomasz Kuhr - Kosakowo", "DetalID": "{693500D8-566F-4149-A980-C3E23F925D19}", "DetalOpis": "Kosz piekarniczy żółty/brązowy", "IleOper": 1, "Operacje": "Razem: 1 w tym: MO -> MS (1) 10 szt. ", "MO_Oper_Sum": "-10 +0", "MO_Saldo": "-10", "MS_Oper_Sum": "+10 -0 -0 +0", "MS_Saldo": "10", "MK_Oper_Sum": "", "MK_Saldo": "0", "Okres": "2015-05-13 - 2015-05-13" }, { "ParentID": "37", "ParentOpis": "37) DĘBKI TRASA- MARCIN TKACZYK", "DetalID": "{C83A5CE5-388B-4031-BEAE-DC6B57D14F36}", "DetalOpis": "Kosz piekarniczy szary", "IleOper": 1, "Operacje": "Razem: 1 w tym: MO <- MS (1) 4 szt. ", "MO_Oper_Sum": "-0 +4", "MO_Saldo": "4", "MS_Oper_Sum": "+0 -4 -0 +0", "MS_Saldo": "-4", "MK_Oper_Sum": "", "MK_Saldo": "0", "Okres": "2015-05-13 - 2015-05-13" }, { "ParentID": "37", "ParentOpis": "37) DĘBKI TRASA- MARCIN TKACZYK", "DetalID": "{693500D8-566F-4149-A980-C3E23F925D19}", "DetalOpis": "Kosz piekarniczy żółty/brązowy", "IleOper": 1, "Operacje": "Razem: 1 w tym: MO -> MS (1) 21 szt. ", "MO_Oper_Sum": "-21 +0", "MO_Saldo": "-21", "MS_Oper_Sum": "+21 -0 -0 +0", "MS_Saldo": "21", "MK_Oper_Sum": "", "MK_Saldo": "0", "Okres": "2015-05-13 - 2015-05-13" }, { "ParentID": "36", "ParentOpis": "36) Mariusz Orzeł", "DetalID": "{601FDF09-9C79-458B-9897-6906FE32B9D1}", "DetalOpis": "Podkład czarny pod kosz", "IleOper": 2, "Operacje": "Razem: 2 w tym: MO -> MS (1) 4 szt. MO <- MS (1) 4 szt. ", "MO_Oper_Sum": "-4 +4", "MO_Saldo": "0", "MS_Oper_Sum": "+4 -4 -0 +0", "MS_Saldo": "0", "MK_Oper_Sum": "", "MK_Saldo": "0", "Okres": "2015-05-15 - 2015-05-15" }, { "ParentID": "36", "ParentOpis": "36) Mariusz Orzeł", "DetalID": "{0C86EF1D-54C7-4ED4-9F27-BEA2CAF3C822}", "DetalOpis": "Podkład czerwony pod kosze cukiernicze", "IleOper": 1, "Operacje": "Razem: 1 w tym: MO -> MS (1) 6 szt. ", "MO_Oper_Sum": "-6 +0", "MO_Saldo": "-6", "MS_Oper_Sum": "+6 -0 -0 +0", "MS_Saldo": "6", "MK_Oper_Sum": "", "MK_Saldo": "0", "Okres": "2015-05-15 - 2015-05-15" }, { "ParentID": "36", "ParentOpis": "36) Mariusz Orzeł", "DetalID": "{5A5BF24A-44DC-46A1-98AA-CF48310B3939}", "DetalOpis": "Taca alum. duża 40x60x1", "IleOper": 1, "Operacje": "Razem: 1 w tym: MO -> MS (1) 5 szt. ", "MO_Oper_Sum": "-5 +0", "MO_Saldo": "-5", "MS_Oper_Sum": "+5 -0 -0 +0", "MS_Saldo": "5", "MK_Oper_Sum": "", "MK_Saldo": "0", "Okres": "2015-05-15 - 2015-05-15" }, { "ParentID": "36", "ParentOpis": "36) Mariusz Orzeł", "DetalID": "{19944B9D-64E5-4C3E-8629-E2B60017CE8C}", "DetalOpis": "Taca złota duża 40x60x1", "IleOper": 2, "Operacje": "Razem: 2 w tym: MO -> MS (1) 5 szt. MO <- MS (1) 5 szt. ", "MO_Oper_Sum": "-5 +5", "MO_Saldo": "0", "MS_Oper_Sum": "+5 -5 -0 +0", "MS_Saldo": "0", "MK_Oper_Sum": "", "MK_Saldo": "0", "Okres": "2015-05-15 - 2015-05-15" }, { "ParentID": "36", "ParentOpis": "36) Mariusz Orzeł", "DetalID": "{112FB40F-6722-44A9-9A10-DA94C35DD31A}", "DetalOpis": "Taca złota mała 40x30x1", "IleOper": 1, "Operacje": "Razem: 1 w tym: MO -> MS (1) 4 szt. ", "MO_Oper_Sum": "-4 +0", "MO_Saldo": "-4", "MS_Oper_Sum": "+4 -0 -0 +0", "MS_Saldo": "4", "MK_Oper_Sum": "", "MK_Saldo": "0", "Okres": "2015-05-14 - 2015-05-14" } ]
Papa.parse(fileNameAndPath, {
download: true,
skipEmptyLines: true,
complete: function(parsed){
// console.log(parsed.data[1][6]); // THIS SHOULD BE THE FILE DATE
// console.log("Parsed:");
console.log("records parsed: ", parsed.data.length);
const options = {
weekday: 'long',
year: 'numeric',
month: 'long',
day: 'numeric',
hour: 'numeric',
minute: 'numeric',
timeZoneName: 'short'
};
var curPath = window.location.href;
// getFileDate(fileNameAndPath);
// console.log("First Balance:" + parsed.data[1][1]);
fixedData = [];
// console.log(parsed);
if (parsed.data[0][0] == "FORMAT XLONE REPORT") fromXLOne = true;
// dataObj = parsed.data;
var emptyCols = [];
//i[14] is the 'LEVIED' column
// i[15] is the 'PAID' column
dataObj = parsed.data.filter(function(i) {
return i[15] != "0.00"&& i[14] != "0.00";;
});
var pui = $("#pivotUI").pivotUI( dataObj, {
rows: ["Approval Year", "Application ID", "Short Description", "Determined By", "Approval Date", "Levy", "Works In Kind Description"],
cols: ['Purpose'],
vals: ["LEVIED", "PAID", "WIK CREDIT"],
exclusions: { //{ "Approval Year": ["1984","1987","1990","1991","1992","1993","1994","1995","1996","1997","1998","1999","2000","2001","2002","2003","2004","2005","2006","2007","2008","2009","2010","2011","2012","2013","2014","2015","2016"],
"Determined By": [""]},
aggregatorName: "MFSum",
rendererName: "MFTable",
rendererOptions: { Table: { rowTotals: false } },
renderers: renderers,
showUI: false,
// sorters: sorters,
derivedAttributes: {
"WIK $": function(d) {
// console.log("d:", d);
return d["Works In Kind Description"] != "" ? d["Amount"] : 0;
}
},
onRefresh: function (config) {
localStorage.setItem('pivotdatakey'+storageTag, JSON.stringify(config)); // Add callback function for onRefresh
try {
document.getElementById("inclusions").innerHTML = "<strong>Inclusions:</strong><span class='blink_me'>" + JSON.stringify(config["inclusions"]) + "</span> ";
} catch (ex) {console.log("inclusions not found")};
$newHead = $('<thead></thead>').prependTo('table.pvtTable').append($('table.pvtTable tr:first'));
$newHead.append($('table.pvtTable tr:nth-child(1)'));
//console.log(header1);
// console.log($header1);
var $table = $('table.pvtTable');
try {
// console.log($table.closest('.wrapper'));
//console.log($table);
$table.floatThead({
scrollContainer: function($table){
return $table.closest('.wrapper');
},
position: 'auto',
floatTableClass: 'pivotBody',
autoReflow: true
});
} catch(ex) {}
colorLevy();
}
});
}
});
/*
var pui = $("#pivotUI").pivotUI( data, {
rows: ["ParentOpis", "DetalOpis"],
cols: ['Okres'],
vals: ["IleOper", "MK_Saldo", "MO_Saldo", "MS_Saldo"],
aggregatorName: "MFSum",
rendererName: "MFTable",
hiddenAttributes: ["ParentID", "Operacje", "MK_Saldo", "MO_Saldo", "MS_Saldo", "IleOper", "DetalID", "MO_Oper_Sum", "MS_Oper_Sum", "MK_Oper_Sum"]
});
*/
/*var pui = $("#pivotUI").pivotUI( dataObj, {
rows: ["Plan"],
cols: ['Transaction Year'],
vals: ["LEVIED", "PAID", "Balance"],
aggregatorName: "MFSum",
rendererName: "MFTable"
});
*/
function colorLevy() {
var $levyLabels = $(".pvtRowLabel");
//const triangle =/\p{Black Lower Right Triangle}/gu;
for(k=0; k<$levyLabels.length; k++) {
var labelLookup = discontinued.filter(obj => {
return obj["Levy"] === $levyLabels[k].innerHTML;
});
// console.log($levyLabels[k].innerHTML);
if (labelLookup.length > 0) {
// console.log(labelLookup);
var dDate = labelLookup[0].DiscontinuedDate;
var dText = labelLookup[0].Discontinued;
$('.pvtRowLabel').eq(k).addClass("discontinued");
$('.pvtRowLabel').eq(k).attr("title",dText + " "+ dDate);
}
// if($levyLabels[k].innerHTML.match(/\p{U+25E2}\b Community Facilities/g)) $('.pvtRowLabel').eq(k).addClass("comFacCell");
// first one is for the subtotal collapse arrow
if($levyLabels[k].innerHTML.match(/^ \u25E2 Community Facilities/)) $('.pvtRowLabel').eq(k).addClass("comFacCell");
if($levyLabels[k].innerHTML.match(/^Community Facilities/)) $('.pvtRowLabel').eq(k).addClass("comFacCell");
if($levyLabels[k].innerHTML.match(/^ \u25E2 Open Space/)) $('.pvtRowLabel').eq(k).addClass("osCell");
if($levyLabels[k].innerHTML.match(/^Open Space/)) $('.pvtRowLabel').eq(k).addClass("osCell");
if($levyLabels[k].innerHTML.match(/^ \u25E2 Drainage/)) $('.pvtRowLabel').eq(k).addClass("drainageCell");
if($levyLabels[k].innerHTML.match(/^Drainage/)) $('.pvtRowLabel').eq(k).addClass("drainageCell");
if($levyLabels[k].innerHTML.match(/^ \u25E2 Roads/)) $('.pvtRowLabel').eq(k).addClass("roadCell");
if($levyLabels[k].innerHTML.match(/^Roads/)) $('.pvtRowLabel').eq(k).addClass("roadCell");
if($levyLabels[k].innerHTML.match(/^ \u25E2 Other/)) $('.pvtRowLabel').eq(k).addClass("otherCell");
if($levyLabels[k].innerHTML.match(/^Other/)) $('.pvtRowLabel').eq(k).addClass("otherCell");
// if($levyLabels[k].innerHTML.match(/^Community Facilities/g)) $('.pvtRowLabel').eq(k).addClass("comFacCell");
}
var $colLabels = $(".pvtColLabel");
//const triangle =/\p{Black Lower Right Triangle}/gu;
for(i=0; i<$colLabels.length; i++) {
// var labelLookup = discontinued.filter(obj => {
// return obj["Levy"] === $levyLabels[k].innerHTML;
// });
// console.log($levyLabels[k].innerHTML);
// if($levyLabels[k].innerHTML.match(/\p{U+25E2}\b Community Facilities/g)) $('.pvtRowLabel').eq(k).addClass("comFacCell");
console.log($colLabels[i].textContent);
// first one is for the subtotal collapse arrow
if($colLabels[i].textContent.match(/^ \u25E2 Community Facilities/)) $('.pvtColLabel').eq(i).addClass("comFacCell");
if($colLabels[i].textContent.match(/^Community Facilities/)) $('.pvtColLabel').eq(i).addClass("comFacCell");
if($colLabels[i].textContent.match(/^ \u25E2 Open Space/)) $('.pvtColLabel').eq(i).addClass("osCell");
if($colLabels[i].textContent.match(/^Open Space/)) $('.pvtColLabel').eq(i).addClass("osCell");
if($colLabels[i].textContent.match(/^ \u25E2 Drainage/)) $('.pvtColLabel').eq(i).addClass("drainageCell");
if($colLabels[i].textContent.match(/^Drainage/)) $('.pvtColLabel').eq(i).addClass("drainageCell");
if($colLabels[i].textContent.match(/^ \u25E2 Roads/)) $('.pvtColLabel').eq(i).addClass("roadCell");
if($colLabels[i].textContent.match(/^Roads/)) $('.pvtColLabel').eq(i).addClass("roadCell");
if($colLabels[i].textContent.match(/^ \u25E2 Other/)) $('.pvtColLabel').eq(i).addClass("otherCell");
if($colLabels[i].textContent.match(/^Other/)) $('.pvtColLabel').eq(i).addClass("otherCell");
// if($levyLabels[k].innerHTML.match(/^Community Facilities/g)) $('.pvtRowLabel').eq(k).addClass("comFacCell");
}
}
</script>
</body>
</html>