-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripts.js
More file actions
4260 lines (3316 loc) · 186 KB
/
scripts.js
File metadata and controls
4260 lines (3316 loc) · 186 KB
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
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
var copyLHDescBtn = document.querySelector(".CopyDesc");
var copyPingBtn = document.querySelector(".CopyPing");
var copyBCBtn = document.querySelector(".CopyBC");
var GenEmailBtn = document.querySelector(".GenEmail");
var copyGENTBtn = document.querySelector(".CopyGENT");
var PWOEmailBtn = document.querySelector(".PWOEmailOutage");
var PWOEmailBtn2 = document.querySelector(".PWOEmailY6");
var NodeName = "";
var PSRunTime = "";
var OrderNum = "";
let bcountb = 0
let vmcount = 0
let ETRcount = 0
let EBMode = document.getElementById("EverbridgeMode").checked
function TheCopy(Thang) {
if(Thang.id == "Desc") {
Thang.select();
try {
var successful = document.execCommand("copy");
var msg = successful ? "successful" : "unsuccessful";
console.log("Copying text command was " + msg);
for (let el of document.querySelectorAll('.COPYGOOD')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.COPYGOOD')) el.classList.add("SHOWME");
setTimeout(ClearCopy,2000)
} catch (err) {
console.log("Oops, unable to copy");
}
} else if(Thang.id == "Ping") {
if (document.getElementById("NoteType").value == "Initial"){
Astr = document.getElementById("Desc").value + "\n\n" + document.getElementById("BC").value + document.getElementById("AddRESS").value + "\n\nAddress Block\n" + document.getElementById("AddressBlock").value + "\n\n" + document.getElementById("Ping").value ;
}else if (document.getElementById("NoteType").value == "IRIS"){
if (document.getElementById("AN").value == "No" && document.getElementById("USDSA").value == "No" && document.getElementById("common").value == "No" ){
Astr = document.getElementById("Desc").value + "\n\nAddress Block\n" + document.getElementById("AddressBlockIRIS").value + "\n\n" + document.getElementById("Ping").value ;
}else{
Astr = document.getElementById("Desc").value + "\n\n" + document.getElementById("BC").value + "\n\nAddress Block\n" + document.getElementById("AddressBlockIRIS").value + "\n\n" + document.getElementById("Ping").value ;
}}
else {
Astr = document.getElementById("Desc").value + document.getElementById("AddRESS").value + "\n\n" + document.getElementById("Ping").value ;
}
str = Astr
//attempt to scrub "Search" if it exists
let res = Astr.replace(/Search\n\nInterface\s/g, "Interface");
let res2 = res.replace(/Search\n\nPING STATISTICS/g, "PING STATISTICS");
str = res2
temptxt = document.createElement('textarea');
temptxt.value = str;
document.body.appendChild(temptxt);
temptxt.select();
document.execCommand('copy');
document.body.removeChild(temptxt);
for (let el of document.querySelectorAll('.COPYGOOD')) el.classList.remove("displayNone");
setTimeout(ClearCopy,2000)
} else if(Thang.id == "BC") {
Astr = document.getElementById("BC").value
str = Astr
//attempt to scrub "Search" if it exists
let res = Astr.replace(/Search\n\nInterface\s/g, "Interface");
let res2 = res.replace(/Search\n\nPING STATISTICS/g, "PING STATISTICS");
str = res2
temptxt = document.createElement('textarea');
temptxt.value = str;
document.body.appendChild(temptxt);
temptxt.select();
document.execCommand('copy');
document.body.removeChild(temptxt);
for (let el of document.querySelectorAll('.COPYGOOD')) el.classList.remove("displayNone");
setTimeout(ClearCopy,2000)
} else if(Thang.id == "BC") {
Astr = document.getElementById("BC").value
str = Astr
//attempt to scrub "Search" if it exists
let res = Astr.replace(/Search\n\nInterface\s/g, "Interface");
let res2 = res.replace(/Search\n\nPING STATISTICS/g, "PING STATISTICS");
str = res2
temptxt = document.createElement('textarea');
temptxt.value = str;
document.body.appendChild(temptxt);
temptxt.select();
document.execCommand('copy');
document.body.removeChild(temptxt);
for (let el of document.querySelectorAll('.COPYGOOD')) el.classList.remove("displayNone");
setTimeout(ClearCopy,2000)
} else if(Thang.id == "GENTemp"){
Astr = document.getElementById("GENTemp").value
str = Astr
//attempt to scrub "Search" if it exists
let res = Astr.replace(/Search\n\nInterface\s/g, "Interface");
let res2 = res.replace(/Search\n\nPING STATISTICS/g, "PING STATISTICS");
str = res2
temptxt = document.createElement('textarea');
temptxt.value = str;
document.body.appendChild(temptxt);
temptxt.select();
document.execCommand('copy');
document.body.removeChild(temptxt);
for (let el of document.querySelectorAll('.COPYGOOD')) el.classList.remove("displayNone");
setTimeout(ClearCopy,2000)
}
}
function scrubIT() {
Astr = document.getElementById("Ping").value
str = Astr
//attempt to scrub "Search" if it exists
let res = Astr.replace(/Search\n\nInterface\s/g, "Interface");
let res2 = res.replace(/Search\n\nPING STATISTICS/g, "PING STATISTICS");
document.getElementById("Ping").value = res2
NodeCount() //- working on finding counts
}
function NodeCount(){
//Remedy Work Detail notes - Breadcrumb
//Ex: Node: GB281A | 10/100 | 10.00% offline | Power Supply: Normal | SNR 35.5 dB |
//With NodeCount Complete additional details are now available
//let's see about using this in the Notification for Multi Node/PS issues, and feed the checkboxes based on Online/Offline/'n/a'
let pings = document.getElementById("Ping").value //Reference Ping Stats input
//Count "PING STATISTICS" in the input = # of nodes
let count = (pings.match(/PING STATISTICS/g) || []).length;
document.getElementById("FlagNodes").value = ""
document.getElementById("BC").innerHTML = ""
//run this script for each node...
//using the initial PING STATISTICS location as a start
multicount=0;
for (i=1; i<(count+1); i++){
//Define Substrings to search for
subStr0 = "PING STATISTICS";
subStr1 = " Accounts and Devices";
subStr2 = "Node ";
subStr3 = "MTA ";
subStr4 = "Set-top Box ";
subStr5 = "Cable Modem ";
subStr6 = "Accounts ";
subStr10 = "ONU ";
subStr333 = "% ";
subStr8 = "Longitude";
subStr9 = "Interface";
//Use above substrings to find start of each substring for the current iteration (i)
//used to pull substrings, need Start and End positions
ThisNode0 = pings.split(subStr0, i).join(subStr0).length; //current Node "Ping Stats"
ThisNode00 = pings.split(subStr0, i+1).join(subStr0).length; // Next Node "Ping Stats" - if no further nodes, result is end of string
ThisNode1 = pings.split(subStr1, i).join(subStr1).length; //" Accounts and Devices" (end of Node Name)
ThisNode2 = pings.split(subStr2, i).join(subStr2).length; //"Node " (beginning of Node Name)
ThisNode3 = pings.split(subStr3, i).join(subStr3).length; //"MTA " row
ThisNode4 = pings.split(subStr4, i).join(subStr4).length; //"Set-top Box " row
ThisNode5 = pings.split(subStr5, i).join(subStr5).length; //"Cable Modem " row
ThisNode6 = pings.split(subStr6, i).join(subStr6).length; //"Accounts " row (end of cable modem row)
ThisNode10 = pings.split(subStr10, i).join(subStr10).length; //"ONU " row
ThisNode333A = pings.split(subStr333, (1+(5*(i-1)))).join(subStr333).length; //Online% - start for counts (MTA)
ThisNode333B = pings.split(subStr333, (1+(5*(i-1)))+1).join(subStr333).length; //Online% - start for counts (SetTop)
ThisNode333C = pings.split(subStr333, (1+(5*(i-1)))+2).join(subStr333).length; //Online% - start for counts (CM)
ThisNode333D = pings.split(subStr333, (1+(5*(i-1)))+4).join(subStr333).length; //Online% - start for counts (ONU)
ThisNode8 = (pings.split(subStr8, i).join(subStr8).length)+10; //"Longitude" +10 begining of Power Supply detail
ThisNode9 = pings.indexOf(subStr9, ThisNode8) //"Interface" beginning of SNR - if NONE found returns: -1
//Tab Character: " " for reference/searching
tabc=" "
//Node
ThisNode = pings.substring((ThisNode2+5),ThisNode1)
test = document.getElementById("FlagNodes").value
//alert("Try: " + ThisNode + " vs " + test + " /// " + test.includes(ThisNode) + " /// " + "Multi: " + multicount)
if(document.getElementById("FlagNodes").value != "") {
test = document.getElementById("FlagNodes").value
if(test.includes(ThisNode) == false) {
document.getElementById("FlagNodes").value = document.getElementById("FlagNodes").value + ", " + ThisNode
multicount = multicount+1
} else if(test.includes(ThisNode) == true) {
//multicount = multicount -1
continue;
}
} else if(document.getElementById("FlagNodes").value == "") {
document.getElementById("FlagNodes").value = ThisNode
}
if (multicount > 1) {
document.getElementById("FlagMulti").checked = true
} else if (multicount = 1) {
document.getElementById("FlagMulti").checked = false
}
NodeName = ThisNode;
//MTA - Offline, Total and Unknown counts
trust1 = pings.indexOf(tabc, ThisNode333A) //find tab character start from MTA Online"%"
trust2 = pings.indexOf(tabc, trust1+1) //find tab character start from FIRST tab found
MTAoff = pings.substring(trust1+1,trust2) //return value between 1st and 2nd tab characters
trust1 = pings.indexOf(tabc, trust2+1) //find tab character start from 2nd tab found above
MTATot = pings.substring(trust2+1,trust1) //return value between 2nd and 3rd tab characters
MTAUnk = pings.substring(trust1+1,ThisNode4)//return value between 3rd tab and 'Set-Top Box' start
//Set-top Box - Offline, Total and Unknown counts
trust1 = pings.indexOf(tabc, ThisNode333B)
trust2 = pings.indexOf(tabc, trust1+1)
STBoff = pings.substring(trust1+1,trust2)
trust1 = pings.indexOf(tabc, trust2+1)
STBTot = pings.substring(trust2+1,trust1)
STBUnk = pings.substring(trust1+1,ThisNode5)
//Cable Modem - Offline, Total and Unknown counts
trust1 = pings.indexOf(tabc, ThisNode333C)
trust2 = pings.indexOf(tabc, trust1+1)
CMoff = pings.substring(trust1+1,trust2)
trust1 = pings.indexOf(tabc, trust2+1)
CMTot = pings.substring(trust2+1,trust1)
CMUnk = pings.substring(trust1+1,ThisNode6)
//ONU - Offline, Total and Unknown counts
trust1 = pings.indexOf(tabc, ThisNode333D)
trust2 = pings.indexOf(tabc, trust1+1)
ONUoff = pings.substring(trust1+1,trust2)
trust1 = pings.indexOf(tabc, trust2+1)
ONUTot = pings.substring(trust2+1,trust1)
ONUUnk = pings.substring(trust1+1)
//Total ALL OFFLINE devices
var ALLOFF = parseInt(MTAoff) + parseInt(STBoff) + parseInt(CMoff) + parseInt(ONUoff)
//Total ALL TOTAL and UNKNOWN Devices
var ALLDEV = parseInt(MTATot)+parseInt(MTAUnk) + parseInt(STBTot)+parseInt(STBUnk) + parseInt(CMTot)+parseInt(CMUnk) + parseInt(ONUTot)+parseInt(ONUUnk)
//Find Percent Offline using the above values, then format as Percentage
var mathss =(parseInt(ALLOFF)/parseInt(ALLDEV))
var offlinep = Number(mathss).toLocaleString(undefined,{style: 'percent', minimumFractionDigits:2});
//Power Supply/Supplies status Section
//Count number of Power Supplies - Between "Longitude" (ThisNode8) and "Interface" (ThisNode9) IF SNR IS PRESENT...
var eh = RegExp(tabc, 'g') //create tab reference
if(ThisNode9 <= ThisNode00 && (ThisNode9 != (-1))){ //SNR Stats present before next node
tempstr = pings.substring(ThisNode8,ThisNode9) //Create a string for only power supply data between 'Longitude' and 'Interfaces'
pscount = ((tempstr.match(eh) || []).length)/8; //Count total tabs in temp string, divided by 8 Tabs per Power Supply listed = # of nodes
} else { //Missing Interface (SNR Stats) - do count between Longitude (ThisNode8) and Next Node, ThisNode00
tempstr = pings.substring(ThisNode8,ThisNode00) //Create a string for only power supply data between 'Longitude' and next 'Ping Stats'
pscount = ((tempstr.match(eh) || []).length)/8; //Count total tabs in temp string, divided by 8 Tabs per Power Supply listed = # of nodes
}
//Note: if pscount > 1 can we feed this to the form and set the status??
var PS = "" //Reset "PS" to blank per node
//for each node, loop below for each PS
for (ay=1; ay<(pscount+1); ay++){
if (ay==1) {
ThisPS1 = 0
} else {
ThisPS1 = ThisPS5b
}
ThisPS2 = tempstr.split(tabc, (1+(8*(ay-1)))).join(tabc).length; //Name (tab1)
ThisPS3 = tempstr.split(tabc, (1+(8*(ay-1)))+1).join(tabc).length; //Status (tab2)
ThisPS4a = (tempstr.split(tabc, (1+(8*(ay-1)))+3).join(tabc).length)+1; //Runtime (tab4)
ThisPS4b = tempstr.split(tabc, (1+(8*(ay-1)))+4).join(tabc).length; //Runtime (tab5)
ThisPS5a = tempstr.split(tabc, (1+(8*(ay-1)))+7).join(tabc).length;
var tstr2 = tempstr.substring(ThisPS5a,tempstr.length)
var tstr2a = tstr2.indexOf(".")+9
ThisPS5b = ThisPS5a+tstr2a
tempname = tempstr.substring(0,ThisPS2);
//find PS data per # of power supplies
PSName = tempstr.substring(ThisPS1,ThisPS2)
PSStat = tempstr.substring(ThisPS2+1,ThisPS3)
PSRunTime = tempstr.substring(ThisPS4a,ThisPS4b)
if(document.getElementById("FlagPSStatus").value == "") {
document.getElementById("FlagPSStatus").value = PSStat
} else if (document.getElementById("FlagPSStatus").value !="" && document.getElementById("FlagPSStatus").value != "Combo") {
if (document.getElementById("FlagPSStatus").value != PSStat) {
document.getElementById("FlagPSStatus").value = "Combo"
}
}
if (pscount==1 || ay==(pscount)) {
var PSSpace = " "
} else if (pscount >= 2) {
var PSSpace = ", "
}
if (PSStat != "Standby"){
PSNew = PSName + ": " + PSStat + PSSpace
} else if(PSStat == "Standby"){
PSNew = PSName + ": " + PSStat + " " + PSRunTime + " Remaining" + PSSpace
}
// alert("///" + tempstr + " // " + ThisPS1 + ":" + ThisPS2 + ":" + ThisPS3 + ":" + ThisPS4a + ":" + ThisPS4b + ":" + ThisPS5a + ":" + ThisPS5b)
PS = PS + PSNew
}
if (pscount==0) PS = "n/a "
//alert (PS)
//if count2 is Greater than 0, SNR Stats ARE Available ie-Node: xxxx detected
//var tempnode = RegExp("Node: "+ThisNode, 'g')
//var tempnodeA = RegExp("Interface"+ThisNode, 'g')
//var tempnode = pings.indexOf(".")+9
//let count2 = (pings.match(tempnode) || []).length;
//alert(tempnode + " // Next Node: " + ThisNode00 + " // Current node: " + ThisNode0)
var SNR = "n/a"
//SNR
if (ThisNode9 < ThisNode00 && ThisNode9 != (-1)) { //SNR Stats Available, do the SNR stuff
//interface is before next node, SNR stats present
//find and array / min SNR for each node, if available
//not all nodes have 4 interfaces...some have 3...need examples
//Examples:
// P61 has 4 including 6.5-20.3 MHZ, but shows "-"
// BU101 has 0
// CB005A only has 3
tempstr = pings.substring((ThisNode9+69),ThisNode00)
var eh = RegExp(tabc, 'g')
carcount = ((tempstr.match(eh) || []).length)/5;
//success
const carriers = [0];
for (oi=1; oi<(carcount+1); oi++){
var car2 = (tempstr.split(tabc, (5+(5*(oi-1)))).join(tabc).length)+1; //Name (tab1)
var car = tempstr.substring(car2,car2+5)
if (isNaN(car) == true) {
car = 999
}
carriers[(oi-1)] = car
}
//document.getElementById("Desc").innerHTML = carriers;
SNR = Math.min(...carriers)
} else if (ThisNode9 > ThisNode00) {
//interface is after next node, no snr, set to n/a
var SNR = "n/a";
}
if(document.getElementById("BC").innerHTML != ""){
document.getElementById("BC").innerHTML = document.getElementById("BC").innerHTML + "\n\n" + "Node: " + ThisNode + " | " + ALLOFF + "/" +ALLDEV + " | " + offlinep + " offline | Power Supply " + PS + "| SNR: " + SNR + " | "
} else if (i==1) {
document.getElementById("BC").innerHTML = "Node: " + ThisNode + " | " + ALLOFF + "/" + ALLDEV + " | " + offlinep + " offline | Power Supply " + PS + "| SNR: " + SNR + " | "
}
}
//Source: https://www.geeksforgeeks.org/how-to-get-nth-occurrence-of-a-string-in-javascript/
//str.split(subStr, i).join(subStr).length
}
copyLHDescBtn.addEventListener("click", function(event) {
myUpdate() //DOUBLE VERIFIED - NEEDS TO BE HERE!!
//check only items SHOWING by using the class "SHOWME" oppisite "displayNone"
var copyLHDesc = document.querySelector("#Desc");
//JUST COPY WHATEVER'S IN THERE - TEMP WHILE WORKING ON ADDITIONAL LOGIC
TheCopy(copyLHDesc);
//Placeholder for future Dev: use SHOWME to check visible fields only
//// for (let el of document.querySelectorAll('.SHOWME')) {
//// DaTruth = document.getElementById(el.id).value;
//// }
}
);
copyPingBtn.addEventListener("click", function(event) {
myUpdate() //DOUBLE VERIFIED - NEEDS TO BE HERE!!
var copyPing = document.querySelector("#Ping");
//JUST COPY WHATEVER'S IN THERE - TEMP WHILE WORKING ON ADDITIONAL LOGIC
TheCopy(copyPing);
}
);
copyBCBtn.addEventListener("click", function(event) {
myUpdate() //DOUBLE VERIFIED - NEEDS TO BE HERE!!
var copyBC = document.querySelector("#BC");
//JUST COPY WHATEVER'S IN THERE - TEMP WHILE WORKING ON ADDITIONAL LOGIC
TheCopy(copyBC);
}
);
GenEmailBtn.addEventListener("click", function(event) {
RepUpdate();
SendMail();
}
);
var PWOEmailBtn = document.querySelector(".PWOEmailOutage");
PWOEmailBtn.addEventListener("click", function(event) {
var copy1 = document.querySelector("#PWOTotalFormat");
copy1.select();
try {
var successful = document.execCommand("copy");
var msg = successful ? "successful" : "unsuccessful";
console.log("Copying text command was " + msg);
} catch (err) {
console.log("Oops, unable to copy");
}
});
var PWOEmailBtn2 = document.querySelector(".PWOEmailY6");
PWOEmailBtn2.addEventListener("click", function(event) {
var copy2 = document.querySelector("#PWOTotalY6Format");
copy2.select();
try {
var successful = document.execCommand("copy");
var msg = successful ? "successful" : "unsuccessful";
console.log("Copying text command was " + msg);
} catch (err) {
console.log("Oops, unable to copy");
}
});
var PWOEmailBtn3 = document.querySelector(".RepeatBCButton");
PWOEmailBtn3.addEventListener("click", function(event) {
var copy3 = document.querySelector("#RepeatBCBox");
copy3.select();
try {
var successful = document.execCommand("copy");
var msg = successful ? "successful" : "unsuccessful";
console.log("Copying text command was " + msg);
} catch (err) {
console.log("Oops, unable to copy");
}
});
copyGENTBtn.addEventListener("click", function(event) {
myUpdate() //DOUBLE VERIFIED - NEEDS TO BE HERE!!
var copyGENTemp = document.querySelector("#GENTemp");
//JUST COPY WHATEVER'S IN THERE - TEMP WHILE WORKING ON ADDITIONAL LOGIC
TheCopy(copyGENTemp);
});
function SendMail(){
Tipe = (document.getElementById("NoteType").value)
MA = (document.getElementById("MA").value)
HUB = (document.getElementById("HubHub").value)
NODE = (document.getElementById("RepNode").value)
LH = (document.getElementById("RepLH").value)
RepTech = (document.getElementById("RepTech").value)
PWOTotal = (document.getElementById("PWOTotal").value)
PWOTotalY6 = (document.getElementById("PWOTotalY6").value)
PWOTotalY6Format = document.getElementById("PWOTotalY6Format").value
PWOTotalFormat = document.getElementById("PWOTotalFormat").value
let MTSDLArray = ["ERROR","DL-Field-Ops-Eng-ROC-NW-MTS-Escalation-T1","DL-Field-Ops-Eng-ROC-NW-MTS-Escalation-T2","DL-Field-Ops-Eng-ROC-NW-MTS-Escalation-T3","DL-Field-Ops-Eng-ROC-NW-MTS-Escalation-T4"]
let PNWDLArray = ["ERROR","DL-Field-Ops-Eng-ROC-NW-PNW-Escalation-T1","DL-Field-Ops-Eng-ROC-NW-PNW-Escalation-T2","DL-Field-Ops-Eng-ROC-NW-PNW-Escalation-T3","DL-Field-Ops-Eng-ROC-NW-PNW-Escalation-T4"]
let SNVDLArray = ["ERROR","DL-Field-Ops-Eng-ROC-NW-SNV-Escalation-T1","DL-Field-Ops-Eng-ROC-NW-SNV-Escalation-T2","DL-Field-Ops-Eng-ROC-NW-SNV-Escalation-T3","DL-Field-Ops-Eng-ROC-NW-SNV-Escalation-T4"]
let UseArray = ["Select an MA","Select an MA","Select an MA","Select an MA"]
switch(MA) {
case "Mountain States":
UseArray=MTSDLArray
break;
case "Pacific Northwest":
UseArray=PNWDLArray
break;
case "Sierra Nevada":
UseArray=SNVDLArray
break;
}
if(Tipe == "RepOut"){
Details = document.getElementById("RepZVComments").value
tear = document.getElementById("NumRepsZV").value
if(parseInt(tear.substring(4,5))>0) {
Tier = (parseInt(tear.substring(4,5)))
DL = (UseArray[Tier])
}
//document.getElementById("RepeatNote").innerHTML = "Subject:\nRepeat Outage! Northwest > " + MA + " > " + Hub + " > " + Node + "\n\nBody:\n\t• Northwest > " + MA + " > " + Hub + " > " + Node + "\n\t• " + Tier + "\n\t• https://lighthouse.charter.com/#/order/" + LH + "\n\n" + Details + "\n\n[Paste Repeat Sign On Screenshots]\n\n[Paste Map/Device List of Impacted Area]"
let mailTo = "";
mailTo = "mailto:" + "DL-Field-Ops-Eng-ROC-NW-Mgmt@charter.com" + "?bcc=" + DL + "; ROC-NW@charter.com"
+ "&subject="+ encodeURIComponent(TierLV + " Repeat Outage! Northwest > " + MA + " > " + HUB + " > " + NODE) + "&body="+ encodeURIComponent("• Northwest > " + MA + " > " + HUB + " > " + NODE) + encodeURIComponent("\n• " + tear.substring(7,tear.length)) + encodeURIComponent("\n• https://lighthouse.charter.com/#/order/" + LH + "\r\r" + "\n\n") + encodeURIComponent("\n\n" + RepTech + " has been dispatched to investigate. " + Details + "\r\r" + "Orders in the last 10 days" + "\n" + "Outages: " + RepOutages + "\nY6's: " + RepY6 + "\nY7's: " + RepY7 + "\nZZ's: " + RepZZ + "\n\n[Paste Triage Screenshots Here]");
//CHECKS TO ALLOW EMAIL ONLY WHEN FILLED OUT
if (DL != "" && DL != "Select an MA" && MA != "" && HUB != "" && NODE != "" && LH != "") {
document.location.href = mailTo;
} else {
alert("Please fill out the entire Repeat Outage Form!")
}
}
else if(Tipe == "RepY6"){
Tier = (document.getElementById("NumRepsY6").value)
DL = (UseArray[Tier])
ACCT = (document.getElementById("RepCustAcct").value)
ADDY = (document.getElementById("RepCustAddy").value)
PWOTotalY6Format = (document.getElementById("PWOTotalY6Format").value)
let mailTo = "";
mailTo = "mailto:" + "DL-Field-Ops-Eng-ROC-NW-Mgmt@charter.com" + "?bcc=" + DL + "; ROC-NW@charter.com"
+ "&subject="
+ encodeURIComponent("Repeat Y6 Created! Northwest > " + MA + " > " + HUB + " > " + NODE)
+ "&body="
+ encodeURIComponent("Repeat Y6 Created for " + ACCT + " @ " + ADDY + "\n\t• https://lighthouse.charter.com/#/order/" + LH + "\r\r" + "[Paste Previous WO Info Here]\n\n");
//CHECKS TO ALLOW EMAIL ONLY WHEN FILLED OUT
if (DL != "" && DL != "Select an MA" && MA != "" && HUB != "" && NODE != "" && ACCT != "" && ADDY != "" && LH != "") {
document.location.href = mailTo;
} else {
alert("Please fill out the entire Repeat Y6 Form!")
}
}
}
function PreLHWO () {
var NUMOrders = document.getElementById("NUMOrders").value;
var a01 = document.getElementById("a01").value;
var b01 = document.getElementById("b01").value;
var c01 = document.getElementById("c01").value;
var d01 = document.getElementById("d01").value;
var e01 = document.getElementById("e01").value;
var f01 = document.getElementById("f01").value;
var a02 = document.getElementById("a02").value;
var b02 = document.getElementById("b02").value;
var c02 = document.getElementById("c02").value;
var d02 = document.getElementById("d02").value;
var e02 = document.getElementById("e02").value;
var f02 = document.getElementById("f02").value;
var a03 = document.getElementById("a03").value;
var b03 = document.getElementById("b03").value;
var c03 = document.getElementById("c03").value;
var d03 = document.getElementById("d03").value;
var e03 = document.getElementById("e03").value;
var f03 = document.getElementById("f03").value;
var a04 = document.getElementById("a04").value;
var b04 = document.getElementById("b04").value;
var c04 = document.getElementById("c04").value;
var d04 = document.getElementById("d04").value;
var e04 = document.getElementById("e04").value;
var f04 = document.getElementById("f04").value;
var a05 = document.getElementById("a05").value;
var b05 = document.getElementById("b05").value;
var c05 = document.getElementById("c05").value;
var d05 = document.getElementById("d05").value;
var e05 = document.getElementById("e05").value;
var f05 = document.getElementById("f05").value;
var a06 = document.getElementById("a06").value;
var b06 = document.getElementById("b06").value;
var c06 = document.getElementById("c06").value;
var d06 = document.getElementById("d06").value;
var e06 = document.getElementById("e06").value;
var f06 = document.getElementById("f06").value;
var a07 = document.getElementById("a07").value;
var b07 = document.getElementById("b07").value;
var c07 = document.getElementById("c07").value;
var d07 = document.getElementById("d07").value;
var e07 = document.getElementById("e07").value;
var f07 = document.getElementById("f07").value;
var a08 = document.getElementById("a08").value;
var b08 = document.getElementById("b08").value;
var c08 = document.getElementById("c08").value;
var d08 = document.getElementById("d08").value;
var e08 = document.getElementById("e08").value;
var f08 = document.getElementById("f08").value;
var a09 = document.getElementById("a09").value;
var b09 = document.getElementById("b09").value;
var c09 = document.getElementById("c09").value;
var d09 = document.getElementById("d09").value;
var e09 = document.getElementById("e09").value;
var f09 = document.getElementById("f09").value;
var a10 = document.getElementById("a10").value;
var b10 = document.getElementById("b10").value;
var c10 = document.getElementById("c10").value;
var d10 = document.getElementById("d10").value;
var e10 = document.getElementById("e10").value;
var f10 = document.getElementById("f10").value;
var OneY6 =
"Previous Lighthouse Order #: " + a01 + "\r"
+ "Previous WO Type: " + b01 + "\r"
+ "Previous WO Resolution: " + c01 + "\r"
+ "Previous WO was Resolved By: " + d01 + "\r"
+ "Previous WO Resolution Comments: " + e01 + "\r"
+ "Previous Y6 WO Referral Reason: " + f01 + "\r";
var TwoY6 =
"Previous Lighthouse Order #: " + a02 + "\r"
+ "Previous WO Type: " + b02 + "\r"
+ "Previous WO Resolution: " + c02 + "\r"
+ "Previous WO was Resolved By: " + d02 + "\r"
+ "Previous WO Resolution Comments: " + e02 + "\r"
+ "Previous Y6 WO Referral Reason: " + f02 + "\r";
var ThreeY6 =
"Previous Lighthouse Order #: " + a03 + "\r"
+ "Previous WO Type: " + b03 + "\r"
+ "Previous WO Resolution: " + c03 + "\r"
+ "Previous WO was Resolved By: " + d03 + "\r"
+ "Previous WO Resolution Comments: " + e03 + "\r"
+ "Previous Y6 WO Referral Reason: " + f03 + "\r";
var FourY6 =
"Previous Lighthouse Order #: " + a04 + "\r"
+ "Previous WO Type: " + b04 + "\r"
+ "Previous WO Resolution: " + c04 + "\r"
+ "Previous WO was Resolved By: " + d04 + "\r"
+ "Previous WO Resolution Comments: " + e04 + "\r"
+ "Previous Y6 WO Referral Reason: " + f04 + "\r";
var FiveY6 =
"Previous Lighthouse Order #: " + a05 + "\r"
+ "Previous WO Type: " + b05 + "\r"
+ "Previous WO Resolution: " + c05 + "\r"
+ "Previous WO was Resolved By: " + d05 + "\r"
+ "Previous WO Resolution Comments: " + e05 + "\r"
+ "Previous Y6 WO Referral Reason: " + f05 + "\r";
var SixY6 =
"Previous Lighthouse Order #: " + a06 + "\r"
+ "Previous WO Type: " + b06 + "\r"
+ "Previous WO Resolution: " + c06 + "\r"
+ "Previous WO was Resolved By: " + d06 + "\r"
+ "Previous WO Resolution Comments: " + e06 + "\r"
+ "Previous Y6 WO Referral Reason: " + f06 + "\r";
var SevenY6 =
"Previous Lighthouse Order #: " + a07 + "\r"
+ "Previous WO Type: " + b07 + "\r"
+ "Previous WO Resolution: " + c07 + "\r"
+ "Previous WO was Resolved By: " + d07 + "\r"
+ "Previous WO Resolution Comments: " + e07 + "\r"
+ "Previous Y6 WO Referral Reason: " + f07 + "\r";
var EightY6 =
"Previous Lighthouse Order #: " + a08 + "\r"
+ "Previous WO Type: " + b08 + "\r"
+ "Previous WO Resolution: " + c08 + "\r"
+ "Previous WO was Resolved By: " + d08 + "\r"
+ "Previous WO Resolution Comments: " + e08 + "\r"
+ "Previous Y6 WO Referral Reason: " + f08 + "\r";
var NineY6 =
"Previous Lighthouse Order #: " + a09 + "\r"
+ "Previous WO Type: " + b09 + "\r"
+ "Previous WO Resolution: " + c09 + "\r"
+ "Previous WO was Resolved By: " + d09 + "\r"
+ "Previous WO Resolution Comments: " + e09 + "\r"
+ "Previous Y6 WO Referral Reason: " + f09 + "\r";
var TenY6 =
"Previous Lighthouse Order #: " + a10 + "\r"
+ "Previous WO Type: " + b10 + "\r"
+ "Previous WO Resolution: " + c10 + "\r"
+ "Previous WO was Resolved By: " + d10 + "\r"
+ "Previous WO Resolution Comments: " + e10 + "\r"
+ "Previous Y6 WO Referral Reason: " + f10 + "\r";
// Outages
/* var OneOut =
"Previous Lighthouse Order #: " + a01 + "\r"
+ "Previous WO Type: " + b01 + "\r"
+ "Previous WO Resolution: " + c01 + "\r"
+ "Previous WO was Resolved By: " + d01 + "\r"
+ "Previous WO Resolution Comments: " + e01 + "\r"
var TwoOut =
"Previous Lighthouse Order #: " + a02 + "\r"
+ "Previous WO Type: " + b02 + "\r"
+ "Previous WO Resolution: " + c02 + "\r"
+ "Previous WO was Resolved By: " + d02 + "\r"
+ "Previous WO Resolution Comments: " + e02 + "\r"
var ThreeOut =
"Previous Lighthouse Order #: " + a03 + "\r"
+ "Previous WO Type: " + b03 + "\r"
+ "Previous WO Resolution: " + c03 + "\r"
+ "Previous WO was Resolved By: " + d03 + "\r"
+ "Previous WO Resolution Comments: " + e03 + "\r"
var FourOut =
"Previous Lighthouse Order #: " + a04 + "\r"
+ "Previous WO Type: " + b04 + "\r"
+ "Previous WO Resolution: " + c04 + "\r"
+ "Previous WO was Resolved By: " + d04 + "\r"
+ "Previous WO Resolution Comments: " + e04 + "\r"
var FiveOut =
"Previous Lighthouse Order #: " + a05 + "\r"
+ "Previous WO Type: " + b05 + "\r"
+ "Previous WO Resolution: " + c05 + "\r"
+ "Previous WO was Resolved By: " + d05 + "\r"
+ "Previous WO Resolution Comments: " + e05 + "\r"
var SixOut =
"Previous Lighthouse Order #: " + a06 + "\r"
+ "Previous WO Type: " + b06 + "\r"
+ "Previous WO Resolution: " + c06 + "\r"
+ "Previous WO was Resolved By: " + d06 + "\r"
+ "Previous WO Resolution Comments: " + e06 + "\r"
var SevenOut =
"Previous Lighthouse Order #: " + a07 + "\r"
+ "Previous WO Type: " + b07 + "\r"
+ "Previous WO Resolution: " + c07 + "\r"
+ "Previous WO was Resolved By: " + d07 + "\r"
+ "Previous WO Resolution Comments: " + e07 + "\r"
var EightOut =
"Previous Lighthouse Order #: " + a08 + "\r"
+ "Previous WO Type: " + b08 + "\r"
+ "Previous WO Resolution: " + c08 + "\r"
+ "Previous WO was Resolved By: " + d08 + "\r"
+ "Previous WO Resolution Comments: " + e08 + "\r"
var NineOut =
"Previous Lighthouse Order #: " + a09 + "\r"
+ "Previous WO Type: " + b09 + "\r"
+ "Previous WO Resolution: " + c09 + "\r"
+ "Previous WO was Resolved By: " + d09 + "\r"
+ "Previous WO Resolution Comments: " + e09 + "\r"
var TenOut =
"Previous Lighthouse Order #: " + a10 + "\r"
+ "Previous WO Type: " + b10 + "\r"
+ "Previous WO Resolution: " + c10 + "\r"
+ "Previous WO was Resolved By: " + d10 + "\r"
+ "Previous WO Resolution Comments: " + e10 + "\r" */
if (NoteType = "RepY6") {
if (NUMOrders == "1"){
for (let el of document.querySelectorAll('.OneOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.TwoOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.ThreeOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.FourOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.FiveOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.SixOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.SevenOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.EightOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.NineOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.TenOrder')) el.classList.add("displayNone");
document.getElementById("PWOTotalY6Format").innerHTML = OneY6
}
if (NUMOrders == "2"){
for (let el of document.querySelectorAll('.OneOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.TwoOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.ThreeOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.FourOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.FiveOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.SixOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.SevenOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.EightOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.NineOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.TenOrder')) el.classList.add("displayNone");
document.getElementById("PWOTotalY6Format").innerHTML = OneY6 + "\r" + TwoY6
}
if (NUMOrders == "3"){
for (let el of document.querySelectorAll('.OneOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.TwoOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.ThreeOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.FourOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.FiveOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.SixOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.SevenOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.EightOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.NineOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.TenOrder')) el.classList.add("displayNone");
document.getElementById("PWOTotalY6Format").innerHTML = OneY6 + "\r" + TwoY6 + "\r" + ThreeY6
}
if (NUMOrders == "4"){
for (let el of document.querySelectorAll('.OneOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.TwoOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.ThreeOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.FourOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.FiveOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.SixOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.SevenOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.EightOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.NineOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.TenOrder')) el.classList.add("displayNone");
document.getElementById("PWOTotalY6Format").innerHTML = OneY6 + "\r" + TwoY6 + "\r" + ThreeY6 + "\r" + FourY6
}
if (NUMOrders == "5"){
for (let el of document.querySelectorAll('.OneOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.TwoOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.ThreeOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.FourOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.FiveOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.SixOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.SevenOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.EightOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.NineOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.TenOrder')) el.classList.add("displayNone");
document.getElementById("PWOTotalY6Format").innerHTML = OneY6 + "\r" + TwoY6 + "\r" + ThreeY6 + "\r" + FourY6 + "\r" + FiveY6
}
if (NUMOrders == "6"){
for (let el of document.querySelectorAll('.OneOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.TwoOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.ThreeOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.FourOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.FiveOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.SixOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.SevenOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.EightOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.NineOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.TenOrder')) el.classList.add("displayNone");
document.getElementById("PWOTotalY6Format").innerHTML = OneY6 + "\r" + TwoY6 + "\r" + ThreeY6 + "\r" + FourY6 + "\r" + FiveY6 + "\r" + SixY6
}
if (NUMOrders == "7"){
for (let el of document.querySelectorAll('.OneOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.TwoOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.ThreeOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.FourOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.FiveOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.SixOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.SevenOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.EightOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.NineOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.TenOrder')) el.classList.add("displayNone");
document.getElementById("PWOTotalY6Format").innerHTML = OneY6 + "\r" + TwoY6 + "\r" + ThreeY6 + "\r" + FourY6 + "\r" + FiveY6 + "\r" + SixY6 + "\r" + SevenY6
}
if (NUMOrders == "8"){
for (let el of document.querySelectorAll('.OneOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.TwoOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.ThreeOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.FourOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.FiveOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.SixOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.SevenOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.EightOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.NineOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.TenOrder')) el.classList.add("displayNone");
document.getElementById("PWOTotalY6Format").innerHTML = OneY6 + "\r" + TwoY6 + "\r" + ThreeY6 + "\r" + FourY6 + "\r" + FiveY6 + "\r" + SixY6 + "\r" + SevenY6 + "\r" + EightY6
}
if (NUMOrders == "9"){
for (let el of document.querySelectorAll('.OneOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.TwoOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.ThreeOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.FourOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.FiveOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.SixOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.SevenOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.EightOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.NineOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.TenOrder')) el.classList.add("displayNone");
document.getElementById("PWOTotalY6Format").innerHTML = OneY6 + "\r" + TwoY6 + "\r" + ThreeY6 + "\r" + FourY6 + "\r" + FiveY6 + "\r" + SixY6 + "\r" + SevenY6 + "\r" + EightY6 + "\r" + NineY6
}
if (NUMOrders == "10"){
for (let el of document.querySelectorAll('.OneOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.TwoOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.ThreeOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.FourOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.FiveOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.SixOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.SevenOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.EightOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.NineOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.TenOrder')) el.classList.remove("displayNone");
document.getElementById("PWOTotalY6Format").innerHTML = OneY6 + "\r" + TwoY6 + "\r" + ThreeY6 + "\r" + FourY6 + "\r" + FiveY6 + "\r" + SixY6 + "\r" + SevenY6 + "\r" + EightY6 + "\r" + NineY6 + "\r" + TenY6
}
}
/* if (NoteType = "RepOut") {
if (NUMOrders == "1"){
for (let el of document.querySelectorAll('.OneOrder')) el.classList.remove("displayNone");
for (let el of document.querySelectorAll('.TwoOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.ThreeOrder')) el.classList.add("displayNone");
for (let el of document.querySelectorAll('.FourOrder')) el.classList.add("displayNone");