1/// <reference path="devnext.satruck.js" /> 2//See the end of this file for the satruck JS runtime entry point 3 4satruck.config = 5{ 6 ismobile: false, 7 isfsa: false, 8 lookup: 9 { 10 Choose: -1, 11 DropoffType: 0, 12 PickupType: 1, 13 VehicleType: 2, 14 FamilyStoreType: 3 15 }, 16 formAction: 17 { 18 FooterLink: 1, 19 HeaderLink: 2, 20 ClosedDialog: 3, 21 SubmittedForm: 4, 22 ClickedFAQ: 5, 23 LocationLink: 6 24 }, 25 reSupplyPickupZipCode :[ 26 "46201", "46219", "46229", "46235", "46236", "46226", "46256", "46216","46220", "46250", "46240", "46260", "46268", "46278", "46254", "46228", 27 "46208", "46218", "46205", "46222", "46224", "46234", "46214", "46241","46231", "46221", "46204", "46202", "46225", "46203", "46239", "46237", 28 "46107", "46227", "46217", "46259", "46113", "46142", "46143", "46184", "46077", "46280", "46033", "46290", "46032", "46038", "46055", "46040", 29 "46060", "46074", "46283", "46207", "46206", "46251", "46255", "46277", "46209", "46230", "46242", "46244", "46285", "46249", "46247", "46253", 30 "46262", "46213", "46282", "46298", "46183", "46123", "46112", "46075", "46069", "46050", "46052", "46167", "46149", "46147", "46071", "46041", 31 "46035", "46057", "46039", "46034", "46030", "46031", "46168", "46122", "46049", "46072", "46162", "46110", "46126", "46130", "46163", "46140", 32 "46064", "46048", "46051", "46165", "46082", "46085", "46037", "46062", "46061", "46047", "46118", "46158", "46106", "46131", "46111", "46129", 33 "46176", "46154", "46011", "46161", "46979", "46068", "46076", "46036", "46044", "46013", "46157", "46180", "46121", "46186", "46902", "46151", 34 "46936", "46016", "46124", "46164", "46181", "46160", "47468", "47435", "47280", "01605", "01507", "01453", "01704", "01703", "01756", "01653", 35 "01583", "01612", "02030", "01430", "01601", "01074", "01611", "01510", "01741", "01516", "01752", "01452", "01775", "01590", "01468", "01702", 36 "03449", "01745", "01540", "01720", "01515", "01609", "01462", "01754", "01068", "01527", "01473", "01610", "01562", "01518", "01546", "01501", 37 "01475", "01772", "01776", "01438", "01784", "01580", "01538", "01525", "01561", "03071", "02054", "01441", "01542", "01654", "01541", "01602", 38 "01005", "01523", "01560", "03458", "01568", "01505", "01508", "03048", "03047", "01464", "01749", "01564", "02019", "01606", "01570", "01607", 39 "01434", "01569", "01566", "01742", "01471", "03452", "01571", "01721", "01705", "01545", "01581", "01603", "03084", "01503", "01526", "02070", 40 "01740", "03086", "01524", "01460", "01778", "01440", "03444", "01746", "01588", "01719", "01586", "03043", "03244", "03440", "03442", "03446", 41 "03608", "03648", "30431", "01520", "01747", "01534", "01718", "01474", "03082", "01532", "01770", "01467", "01655", "03461", "01463", "02093", 42 "01608", "02038", "02053", "01529", "01582", "01543", "01450", "01604", "01536", "01436", "01748", "01760", "01420", "02052", "01469", "02056", 43 "01451", "01470", "01519", "01757", "01472", "01431", "01537", "01432", "03450", "01701", "01550", "01522", "93202", "93212", "93221", "93227", 44 "93230", "93235", "93242", "93244", "93245", "93247", "93267", "93271", "93272", "93274", "93277", "93282", "93286", "93291", "93292", "93602", 45 "93609", "93610", "93611", "93612", "93614", "93616", "93618", "93619", "93620", "93622", "93625", "93626", "93630", "93631", "93635", "93636", 46 "93637", "93638", "93640", "93643", "93644", "93646", "93648", "93650", "93654", "93656", "93657", "93662", "93667", "93673", "93675", "93701", 47 "93702", "93703", "93704", "93705", "93706", "93710", "93711", "93720", "93721", "93722", "93723", "93725", "93726", "93727", "93728", "93730", 48 49 "93737", 50 "95301", 51 "95333", 52 "95340", 53 "95341", 54 "95344", 55 "95348", 56 "95365", 57 "94501", 58 "94502", 59 "94506", 60 "94507", 61 "94516", 62 "94517", 63 "94518", 64 "94519", 65 "94520", 66 "94521", 67 "94523", 68 "94525", 69 "94526", 70 "94528", 71 "94530", 72 "94536", 73 "94538", 74 "94539", 75 "94541", 76 "94542", 77 "94544", 78 "94545", 79 "94546", 80 "94547", 81 "94549", 82 "94550", 83 "94551", 84 "94552",
85 "94553", 86 "94555", 87 "94556", 88 "94560", 89 "94563", 90 "94564", 91 "94566", 92 "94568", 93 "94569", 94 "94570", 95 "94572", 96 "94575", 97 "94577", 98 "94578", 99 "94579", 100 "94580", 101 "94582", 102 "94583", 103 "94587", 104 "94588", 105 "94595", 106 "94596", 107 "94597", 108 "94598", 109 "94601", 110 "94602", 111 "94603", 112 "94605", 113 "94606", 114 "94607", 115 "94608", 116 "94609", 117 "94610", 118 "94611", 119 "94612", 120 "94613", 121 "94614", 122 "94615", 123 "94618", 124 "94619", 125 "94621", 126 "94625", 127 "94626", 128 "94627", 129 "94702", 130 "94703", 131 "94704", 132 "94705", 133 "94706", 134 "94707", 135 "94708", 136 "94709", 137 "94710", 138 "94720", 139 "94801", 140 "94803", 141 "94804", 142 "94805", 143 "94806", 144 "94850", 145 "90620", 146 "90621", 147 "90622", 148 "90623", 149 "90630", 150 "90631", 151 "90638", 152 "90680", 153 "90742", 154 "92602", 155 "92603", 156 "92604", 157 "92606", 158 "92607", 159 "92610", 160 "92612", 161 "92614", 162 "92616", 163 "92617", 164 "92618", 165 "92620", 166 "92623", 167 "92624", 168 "92625", 169 "92626", 170 "92627", 171 "92628", 172 "92629", 173 "92630", 174 "92631", 175 "92635", 176 "92637", 177 "92641", 178 "92643", 179 "92645", 180 "92646", 181 "92647", 182 "92648", 183 "92649", 184 "92650", 185 "92651", 186 "92653", 187 "92654", 188 "92656", 189 "92657", 190 "92658", 191 "92660", 192 "92661", 193 "92662", 194 "92663", 195 "92667", 196 "92668", 197 "92672", 198 "92673", 199 "92675", 200 "92676", 201 "92677", 202 "92679", 203 "92680", 204 "92683", 205 "92684", 206 "92687", 207 "92688", 208 "92690", 209 "92691", 210 "92692", 211 "92694", 212 "92697", 213 "92701", 214 "92702", 215 "92703", 216 "92704", 217 "92705", 218 "92706", 219 "92707", 220 "92708", 221 "92709", 222 "92710", 223 "92711", 224 "92720", 225 "92728", 226 "92780", 227 "92781", 228 "92782", 229 "92799", 230 "92801", 231 "92802", 232 "92803", 233 "92804", 234 "92805", 235 "92806", 236 "92807", 237 "92808", 238 "92821", 239 "92822", 240 "92823", 241 "92831", 242 "92832", 243 "92833", 244 "92834", 245 "92835", 246 "92836", 247 "92837", 248 "92838", 249 "92840", 250 "92841", 251 "92842", 252 "92843", 253 "92844", 254 "92845", 255 "92846", 256 "92856", 257 "92857", 258 "92859", 259 "92861", 260 "92862", 261 "92865", 262 "92866", 263 "92867", 264 "92868", 265 "92869", 266 "92870", 267 "92886", 268 "92887", 269 "89002", 270 "89005", 271 "89011", 272 "89012", 273 "89014", 274 "89015", 275 "89030", 276 "89031", 277 "89032", 278 "89044", 279 "89052", 280 "89074", 281 "89081", 282 "89084", 283 "89085", 284 "89086", 285 "89087", 286 "89101", 287 "89102", 288 "89103", 289 "89104", 290 "89106", 291 "89107", 292 "89108", 293 "89109", 294 "89110", 295 "89113", 296 "89115", 297 "89117", 298 "89118", 299 "89119", 300 "89120", 301 "89121", 302 "89122", 303 "89123", 304 "89128", 305 "89129", 306 "89130", 307 "89131", 308 "89134", 309 "89135", 310 "89138", 311 "89139", 312 "89141", 313 "89142", 314 "89143", 315 "89144", 316 "89145", 317 "89146", 318 "89147", 319 "89148", 320 "89149", 321 "89156", 322 "89165", 323 "89166", 324 "89169", 325 "89178", 326 "89179", 327 "89183", 328 "91902", 329 "91910", 330 "91911", 331 "91913", 332 "91914", 333 "91915", 334 "91932", 335 "91941", 336 "91942", 337 "91945", 338 "91977", 339 "91978", 340 "92007", 341 "92008", 342 "92009", 343 "92010", 344 "92011", 345 "92014", 346 "92019", 347 "92020", 348 "92021", 349 "92024", 350 "92025", 351 "92026", 352 "92027", 353 "92037", 354 "92040", 355 "92054", 356 "92056", 357 "92057", 358 "92064", 359 "92065", 360 "92067", 361 "92069", 362 "92071", 363 "92075", 364 "92078", 365 "92081", 366 "92083", 367 "92084", 368 "92091", 369 "92101", 370 "92102", 371 "92103", 372 "92104", 373 "92106", 374 "92107", 375 "92108", 376 "92109", 377 "92110", 378 "92111", 379 "92115", 380 "92116", 381 "92117", 382 "92118", 383 "92119", 384 "92120", 385 "92121", 386 "92122", 387 "92123", 388 "92124", 389 "92126", 390 "92127", 391 "92128", 392 "92129", 393 "92130", 394 "92131", 395 "92139", 396 "92154", 397 "48009", 398 "48025", 399 "48070", 400 "48080", 401 "48083", 402 "48084", 403 "48085", 404 "48098", 405 "48104", 406 "48168", 407 "48236", 408 "48301", 409 "48302", 410 "48303", 411 "48304", 412 "48306", 413 "48307", 414 "48309", 415 "48323", 416 "48363", 417 "48370", 418 "48374", 419 "48815", 420 "48822", 421 "48849", 422 "48861", 423 "48875", 424 "48890", 425 "48897", 426 "49010", 427 "49012", 428 "49014", 429 "49015", 430 "49016", 431 "49017", 432 "49018", 433 "49019", 434 "49020", 435 "49021", 436 "49029",
437 "49032", 438 "49033", 439 "49034", 440 "49035", 441 "49037", 442 "49038", 443 "49040", 444 "49043", 445 "49045", 446 "49046", 447 "49050", 448 "49051", 449 "49052", 450 "49053", 451 "49055", 452 "49058", 453 "49060", 454 "49065", 455 "49066", 456 "49067", 457 "49068", 458 "49070", 459 "49071", 460 "49072", 461 "49073", 462 "49075", 463 "49078", 464 "49079", 465 "49080", 466 "49081", 467 "49083", 468 "49085", 469 "49087", 470 "49088", 471 "49090", 472 "49093", 473 "49096", 474 "49097", 475 "49098", 476 "49103", 477 "49104", 478 "49106", 479 "49127", 480 "49323", 481 "49325", 482 "49328", 483 "49333", 484 "49335", 485 "49344", 486 "49348", 487 "49401", 488 "49403", 489 "49404", 490 "49406", 491 "49408", 492 "49409", 493 "49415", 494 "49419", 495 "49423", 496 "49430", 497 "49435", 498 "49440", 499 "49441", 500 "49442", 501 "49443", 502 "49444", 503 "49445", 504 "49448", 505 "49451", 506 "49453", 507 "54014", 508 "54015", 509 "54016", 510 "54017", 511 "54021", 512 "54022", 513 "54547", 514 "54650", 515 "54741", 516 "54751", 517 "54840", 518 "55001", 519 "55003", 520 "55005", 521 "55009", 522 "55011", 523 "55012", 524 "55013", 525 "55014", 526 "55016", 527 "55017", 528 "55019", 529 "55020", 530 "55024", 531 "55025", 532 "55031", 533 "55033", 534 "55038", 535 "55040", 536 "55041", 537 "55042", 538 "55043", 539 "55044", 540 "55055", 541 "55057", 542 "55063", 543 "55065", 544 "55066", 545 "55068", 546 "55070", 547 "55071", 548 "55075", 549 "55076", 550 "55077", 551 "55082", 552 "55085", 553 "55089", 554 "55090", 555 "55092", 556 "55101", 557 "55102", 558 "55103", 559 "55104", 560 "55105", 561 "55106", 562 "55107", 563 "55108", 564 "55109", 565 "55110", 566 "55111", 567 "55112", 568 "55113", 569 "55114", 570 "55115", 571 "55116", 572 "55117", 573 "55118", 574 "55119", 575 "55120", 576 "55121", 577 "55122", 578 "55123", 579 "55124", 580 "55125", 581 "55126", 582 "55127", 583 "55128", 584 "55129", 585 "55130", 586 "55301", 587 "55303", 588 "55304", 589 "55305", 590 "55306", 591 "55308", 592 "55309", 593 "55311", 594 "55313", 595 "55315", 596 "55316", 597 "55317", 598 "55318", 599 "55319", 600 "55320", 601 "55327", 602 "55328", 603 "55330", 604 "55331", 605 "55337", 606 "55340", 607 "55341", 608 "55343", 609 "55344", 610 "55345", 611 "55346", 612 "55347", 613 "55349", 614 "55352", 615 "55356", 616 "55357", 617 "55358", 618 "55359", 619 "55362", 620 "55364", 621 "55365", 622 "55366", 623 "55368", 624 "55369", 625 "55371", 626 "55372", 627 "55373", 628 "55374", 629 "55376", 630 "55378", 631 "55379", 632 "55384", 633 "55386", 634 "55387", 635 "55388", 636 "55390", 637 "55391", 638 "55398", 639 "55401", 640 "55402", 641 "55403", 642 "55404", 643 "55405", 644 "55406", 645 "55407", 646 "55408", 647 "55409", 648 "55410", 649 "55411", 650 "55412", 651 "55413", 652 "55414", 653 "55415", 654 "55416", 655 "55417", 656 "55418", 657 "55419", 658 "55420", 659 "55421", 660 "55422", 661 "55423", 662 "55424", 663 "55425", 664 "55426", 665 "55427", 666 "55428", 667 "55429", 668 "55430", 669 "55431", 670 "55432", 671 "55433", 672 "55434", 673 "55435", 674 "55436", 675 "55437", 676 "55438", 677 "55439", 678 "55441", 679 "55442", 680 "55443", 681 "55444", 682 "55445", 683 "55446", 684 "55447", 685 "55448", 686 "55449", 687 "55454", 688 "55455", 689 "55458", 690 "55460", 691 "55478", 692 "55554", 693 "55555", 694 "55561", 695 "55563", 696 "55565", 697 "55569", 698 "55570", 699 "55571", 700 "55572", 701 "55576", 702 "55580", 703 "55581", 704 "55582", 705 "55585", 706 "55586", 707 "55587", 708 "55588", 709 "55589", 710 "55590", 711 "55591", 712 "55593", 713 "55741", 714 "55760", 715 "55772", 716 "55806", 717 "55811", 718 "55901", 719 "55987", 720 "55991", 721 "56007", 722 "56011", 723 "56028", 724 "56069", 725 "56071", 726 "56082", 727 "56159", 728 "56301", 729 "56304", 730 "56321", 731 "56330", 732 "56338", 733 "56345", 734 "56352", 735 "56353", 736 "56357", 737 "56358", 738 "56359", 739 "56368", 740 "56376", 741 "56377", 742 "56378", 743 "56379", 744 "56387", 745 "56452", 746 "56565", 747 "63040", 748 "48809", 749 "48838", 750 "48881", 751 "49001", 752 "49002", 753 "49003", 754 "49004", 755 "49005", 756 "49006", 757 "49007", 758 "49008", 759 "49009", 760 "49024", 761 "49041", 762 "49048", 763 "49074", 764 "49077", 765 "49301", 766 "49302", 767 "49306", 768 "49315", 769 "49316", 770 "49319", 771 "49321", 772 "49330", 773 "49331", 774 "49341", 775 "49345", 776 "49417", 777 "49418", 778 "49422", 779 "49424", 780 "49426", 781 "49427", 782 "49428", 783 "49434", 784 "49456", 785 "49464", 786 "49468", 787 "49501", 788 "49503", 789 "49504", 790 "49505", 791 "49506", 792 "49507", 793 "49508", 794 "49509", 795 "49510", 796 "49512", 797 "49514", 798 "49515", 799 "49516", 800 "49518", 801 "49519", 802 "49523", 803 "49525", 804 "49534", 805 "49544", 806 "49546", 807 "49548", 808 "93203", 809 "93206", 810 "93215", 811 "93218", 812 "93250", 813 "93257", 814 "93263", 815 "93301", 816 "93302", 817 "93303", 818 "93304", 819 "93305", 820 "93306", 821 "93307", 822 "93308", 823 "93309", 824 "93311", 825 "93312", 826 "93313", 827 "93314", 828 "93505", 829 "93510", 830 "93531", 831 "93534", 832 "93535", 833 "93536", 834 "93543", 835 "93550", 836 "93551", 837 "93552", 838 "93560", 839 "93561", 840 "80002", 841 "80003", 842 "80004", 843 "80005", 844 "80007", 845 "80011", 846 "80012", 847 "80013", 848 "80014", 849 "80015", 850 "80016", 851 "80017", 852 "80018", 853 "80019", 854 "80020", 855 "80021", 856 "80022", 857 "80023", 858 "80026", 859 "80027", 860 "80030", 861 "80031", 862 "80033", 863 "80104", 864 "80108", 865 "80109", 866 "80110", 867 "80111", 868 "80112", 869 "80113", 870 "80120", 871 "80121", 872 "80122", 873 "80123", 874 "80124", 875 "80126", 876 "80127", 877 "80128", 878 "80129", 879 "80130", 880 "80134", 881 "80138", 882 "80203", 883 "80204", 884 "80205", 885 "80206", 886 "80207", 887 "80209", 888 "80210", 889 "80211", 890 "80212",
891 "80214", 892 "80215", 893 "80218", 894 "80219", 895 "80220", 896 "80221", 897 "80222", 898 "80223", 899 "80224", 900 "80225", 901 "80226", 902 "80227", 903 "80228", 904 "80229", 905 "80230", 906 "80231", 907 "80232", 908 "80233", 909 "80234", 910 "80235", 911 "80236", 912 "80237", 913 "80238", 914 "80239", 915 "80241", 916 "80246", 917 "80247", 918 "80249", 919 "80260", 920 "80301", 921 "80302", 922 "80303", 923 "80304", 924 "80305", 925 "80401", 926 "80403", 927 "80465", 928 "80501", 929 "80502", 930 "80503", 931 "80504", 932 "80513", 933 "80516", 934 "80521", 935 "80524", 936 "80525", 937 "80526", 938 "80528", 939 "80534", 940 "80537", 941 "80538", 942 "80543", 943 "80550", 944 "80601", 945 "80602", 946 "80603", 947 "80615", 948 "80620", 949 "80631", 950 "80634", 951 "80640", 952 "80642", 953 "90003", 954 "90044", 955 "90047", 956 "90058", 957 "90059", 958 "90061", 959 "90201", 960 "90220", 961 "90221", 962 "90222", 963 "90224", 964 "90240", 965 "90241", 966 "90242", 967 "90245", 968 "90247", 969 "90248", 970 "90249", 971 "90250", 972 "90254", 973 "90255", 974 "90260", 975 "90262", 976 "90266", 977 "90270", 978 "90274", 979 "90275", 980 "90277", 981 "90278", 982 "90280", 983 "90501", 984 "90502", 985 "90503", 986 "90504", 987 "90505", 988 "90601", 989 "90602", 990 "90603", 991 "90604", 992 "90605", 993 "90606", 994 "90650", 995 "90670", 996 "90701", 997 "90706", 998 "90710", 999 "90712", 1000 "90713", 1001 "90714", 1002 "90715", 1003 "90716", 1004 "90717", 1005 "90720", 1006 "90723", 1007 "90731", 1008 "90732", 1009 "90740", 1010 "90744", 1011 "90745", 1012 "90746", 1013 "90747", 1014 "90755", 1015 "90801", 1016 "90802", 1017 "90803", 1018 "90804", 1019 "90805", 1020 "90806", 1021 "90807", 1022 "90808", 1023 "90809", 1024 "90810", 1025 "90811", 1026 "90812", 1027 "90813", 1028 "90814", 1029 "90815", 1030 "90819", 1031 "90820", 1032 "90821", 1033 "90822", 1034 "90823", 1035 "90824", 1036 "90825", 1037 "90826", 1038 "90827", 1039 "90828",
1040 "90829", 1041 "90830", 1042 "90831", 1043 "90832", 1044 "90833", 1045 "90834", 1046 "90835", 1047 "90836", 1048 "90837", 1049 "90838", 1050 "90839", 1051 "90840", 1052 "90842", 1053 "90843", 1054 "90844", 1055 "90846", 1056 "90853", 1057 "85006", 1058 "85007", 1059 "85008", 1060 "85009", 1061 "85012", 1062 "85013", 1063 "85014", 1064 "85015", 1065 "85016", 1066 "85017", 1067 "85018", 1068 "85019", 1069 "85020", 1070 "85021", 1071 "85022", 1072 "85023", 1073 "85024", 1074 "85027", 1075 "85028", 1076 "85029", 1077 "85031", 1078 "85032", 1079 "85033", 1080 "85034", 1081 "85035", 1082 "85037", 1083 "85040", 1084 "85041", 1085 "85042", 1086 "85043", 1087 "85044", 1088 "85045", 1089 "85048", 1090 "85050", 1091 "85051", 1092 "85053", 1093 "85054", 1094 "85118", 1095 "85122", 1096 "85130", 1097 "85193", 1098 "85201", 1099 "85202", 1100 "85203", 1101 "85204", 1102 "85205", 1103 "85206", 1104 "85207", 1105 "85208", 1106 "85209", 1107 "85210", 1108 "85213", 1109 "85215", 1110 "85224", 1111 "85225", 1112 "85226", 1113 "85233", 1114 "85234", 1115 "85236", 1116 "85248", 1117 "85249", 1118 "85250", 1119 "85251", 1120 "85253", 1121 "85254", 1122 "85255", 1123 "85257", 1124 "85258", 1125 "85259", 1126 "85260", 1127 "85262", 1128 "85266", 1129 "85268", 1130 "85281", 1131 "85282", 1132 "85283", 1133 "85284", 1134 "85286", 1135 "85295", 1136 "85296", 1137 "85297", 1138 "85298", 1139 "85301", 1140 "85302", 1141 "85303", 1142 "85304", 1143 "85305", 1144 "85306", 1145 "85308", 1146 "85310", 1147 "85323", 1148 "85326", 1149 "85331", 1150 "85335", 1151 "85339", 1152 "85340", 1153 "85345", 1154 "85351", 1155 "85353", 1156 "85363", 1157 "85373", 1158 "85374", 1159 "85375", 1160 "85378", 1161 "85379", 1162 "85381", 1163 "85382", 1164 "85383", 1165 "85387", 1166 "85388", 1167 "85392", 1168 "85395", 1169 "94501", "94502", "94506", "94507", "94516", "94517", "94518", "94519", "94520", "94521", "94523", "94525", "94526", "94528", "94530", "94536", "94538", 1170 "94539", "94541", "94542", "94544", "94545", "94546", "94547", "94549", "94550", "94551", "94552", "94553", "94555", "94556", "94560", "94563", 1171 "94564", "94566", "94568", "94569", "94570", "94572", "94575", "94577", "94578", "94579", "94580", "94582", "94583", "94587", "94588", "94595", 1172 "94596", "94597", "94598", "94601", "94602", "94603", "94605", "94606", "94607", "94608", "94609", "94610", "94611", "94612", "94613", "94614", 1173 "94615", "94618", "94619", "94621", "94625", "94626", "94627", "94702", "94703", "94704", "94705", "94706", "94707", "94708", "94709", "94710", 1174 "94720", "94801", "94803", "94804", "94805", "94806", "94850", "90004", "90005", "90010", "90012", "90013", "90014", "90015", "90017", "90020", 1175 "90021", "90022", "90023", "90026", "90027", "90028", "90029", "90031", "90032", "90033", "90036", "90038", "90039", "90040", "90041", "90042", 1176 "90046", "90057", "90063", "90065", "90068", "90069", "90071", "90079", "90640", "90660", "91001", "91006", "91007", "91008", "91010", "91011", 1177 "91016", "91020", "91024", "91030", "91040", "91042", "91046", "91103", "91104", "91105", "91106", "91107", "91108", "91125", "91126", "91201", 1178 "91202", "91203", "91204", "91205", "91206", "91207", "91208", "91209", "91210", "91214", "91321", "91331", "91340", "91342", "91345", "91350", 1179 "91351", "91352", "91354", "91355", "91381", "91384", "91387", "91390", "91401", "91423", "91501", "91502", "91503", "91504", "91505", "91506", 1180 "91521", "91522", "91523", "91601", "91602", "91605", "91606", "91607", "91608", "91702", "91706", "91722", "91723", "91724", "91731", "91732", 1181 "91733", "91740", "91741", "91744", "91745", "91746", "91748", "91754", "91755", "91765", "91770", "91775", "91776", "91780", "91789", "91790", 1182 "91791", "91792", "91801", "91803", "91804", "91752", "92028", "92088", "92201", "92202", "92203", "92210", "92211", "92220", "92223", "92230", 1183 "92234", "92241", "92253", "92255", "92258", "92260", "92261", "92262", "92264", "92270", "92276", "92282", "92370", "92456", "92501", "92503", 1184 "92504", "92506", "92507", "92508", "92509", "92518", "92521", "92522", "92530", "92532", "92543", "92544", "92545", "92548", "92551", "92553", 1185 "92555", "92557", "92562", "92563", "92567", "92570", "92571", "92582", "92583", "92584", "92585", "92586", "92587", "92590", "92591", "92592", 1186 "92595", "92596", "92599", "92860", "92878", "92879", "92880", "92881", "92882", "92883", "91701", "91708", "91709", "91710", "91711", "91729", 1187 "91730", "91737", "91739", "91750", "91761", "91762", "91763", "91764", "91767", "91768", "91773", "91784", "91785", "91786", "92307", "92308", 1188 "92313", "92314", "92315", "92316", "92318", "92320", "92324", "92325", "92331", "92333", "92334", "92335", "92336", "92337", "92344", "92345", 1189 "92346", "92354", "92357", "92359", "92369", "92373", "92374", "92375", "92376", "92377", "92392", "92393", "92394", "92395", "92399", "92401", 1190 "92402", "92403", "92404", "92405", "92406", "92407", "92408", "92409", "92410", "92411", "92412", "94002", "94005", "94010", "94014", "94015", 1191 "94027", "94030", "94044", "94061", "94062", "94063", "94065", "94066", "94070", "94080", "94101", "94102", "94103", "94104", "94105", "94107", 1192 "94108", "94109", "94110", "94111", "94112", "94114", "94115", "94116", "94117", "94118", "94121", "94122", "94123", "94127", "94128", "94129", 1193 "94131", "94132", "94133", "94134", "94143", "94401", "94402", "94403", "94404", "94503", "94508", "94510", "94515", "94558", "94559", "94562", 1194 "94573", "94574", "94576", "94589", "94590", "94591", "94599", "94901", "94903", "94904", "94920", "94925", "94928", "94931", "94939", "94941", 1195 "94945", "94947", "94949", "94951", "94952", "94954", "94957", "94960", "94964", "94965", "94966", "95401", "95402", "95403", "95404", "95405", 1196 "95406", "95407", "95409", "95416", "95425", "95433", "95436", "95439", "95441", "95442", "95444", "95445", "95448", "95449", "95452", "95472", 1197 "95476", "95481", "95482", "95484", "95492", "95494", "93901", "93902", "93905", "93906", "93907", "93908", "93912", "93921", "93923", "93924", 1198 "93940", "93943", "93944", "93950", "93953", "94022", "94024", "94025", "94035", "94040", "94041", "94043", "94085", "94086", "94087", "94089", 1199 "94301", "94303", "94304", "94305", "94306", "95002", "95003", "95008", "95010", "95013", "95014", "95019", "95020", "95023", "95030", "95031", 1200 "95032", "95035", "95037", "95046", "95050", "95051", "95053", "95054", "95060", "95061", "95062", "95063", "95064", "95065", "95066", "95070", 1201 "95073", "95076", "95110", "95111", "95112", "95113", "95116", "95117", "95118", "95119", "95120", "95121", "95122", "95123", "95124", "95125", 1202 "95126", "95127", "95128", "95129", "95130", "95131", "95132", "95133", "95134", "95135", "95136", "95138", "95139", "95148", "90006", "90007", 1203 "90008", "90011", "90016", "90018", "90019", "90024", "90025", "90034", "90035", "90037", "90043", "90045", "90048", "90049", "90056", "90062", 1204 "90064", "90066", "90067", "90073", "90077", "90089", "90094", "90095", "90210", "90211", "90212", "90230", "90232", "90265", "90272", "90290", 1205 "90291", "90292", "90293", "90301", "90302", "90303", "90304", "90305", "90401", "90402", "90403", "90404", "90405", "94505", "94509", "94513", 1206 "94514", "94531", "94548", "94561", "95202", "95203", "95204", "95205", "95206", "95207", "95209", "95210", "95211", "95212", "95215", "95219", 1207 "95237", "95240", "95242", "95258", "95304", "95307", "95315", "95320", "95324", "95326", "95327", "95328", "95330", "95336", "95337", "95350", 1208 "95351", "95353", "95354", "95355", "95356", "95357", "95361", "95366", "95367", "95368", "95370", "95376", "95377", "95378", "95380", "95381", 1209 "95382", "95391", "95608", "95624", "95628", "95630", "95632", "95670", "95682", "95746", "95747", "95757", "95758", "95759", "95762", "95817", 1210 "95819", "95826", "95827", "95828", "95829", "95834", "95864" 1211 , "53104", "53126", "53128", "53139", "53140", "53141", "53142", "53143", 1212 "53144", "53158", "53168", "53170", "53177", "53179", "53181", "53182", 1213 "53192", "53402", "53403", "53404", "53405", "53406", "60001", "60002", 1214 "60010", "60011", "60012", "60013", "60014", "60015", "60020", "60021", 1215 "60030", "60031", "60033", "60034", "60035", "60037", "60039", "60040", 1216 "60041", "60042", "60044", "60045", "60046", "60047", "60048", "600
121650", 1217 "60051", "60060", "60061", "60064", "60069", "60071", "60072", "60073", 1218 "60075", "60079", "60081", "60083", "60084", "60085", "60086", "60087", 1219 "60088", "60089", "60094", "60096", "60097", "60098", "60099", "60102", 1220 "60110", "60118", "60120", "60122", "60123", "60124", "60136", "60140", 1221 "60142", "60152", "60156", "60177", "60180", "60192", 1222 "48809", "48815", "48822", "48838", "48849", "48861", "48875", "48881", "48890", "48897", "49001", "49002", "49003", "49004", "49005", "49006", 1223 "49007", "49008", "49009", "49010", "49012", "49014", "49015", "49016", "49017", "49018", "49019", "49020", "49021", "49024", "49029", "49032", 1224 "49033", "49034", "49035", "49037", "49038", "49040", "49041", "49043", "49045", "49046", "49048", "49050", "49051", "49052", "49053", "49055", 1225 "49058", "49060", "49065", "49066", "49067", "49068", "49070", "49071", "49072", "49073", "49074", "49075", "49077", "49078", "49079", "49080", 1226 "49081", "49083", "49085", "49087", "49088", "49090", "49093", "49096", "49097", "49098", "49103", "49104", "49106", "49127", "49301", "49302", 1227 "49306", "49315", "49316", "49319", "49321", "49323", "49325", "49328", "49330", "49331", "49333", "49335", "49341", "49344", "49345", "49348", 1228 "49401", "49403", "49404", "49406", "49408", "49409", "49415", "49417", "49418", "49419", "49422", "49423", "49424", "49426", "49427", 1229 "49428", "49430", "49434", "49435", "49440", "49441", "49442", "49443", "49444", "49445", "49448", "49451", "49453", "49456", "49460", "49464", 1230 "49468", "49501", "49503", "49504", "49505", "49506", "49507", "49508", "49509", "49510", "49512", "49514", "49515", "49516", "49518", "49519", 1231 "49523", "49525", "49534", "49544", "49546", "49548", "53005", "53007", "53012", "53017", "53018", "53022", "53024", "53029", "53033", "53045", 1232 "53046", "53051", "53058", "53064", "53066", "53072", "53089", "53092", "53097", "53103", "53105", "53108", "53110", "53115", "53118", "53119", 1233 "53120", "53121", "53122", "53125", "53127", "53129", "53130", "53132", "53146", "53147", "53149", "53150", "53151", "53153", "53154", "53157", "53172", 1234 "53183", "53184", "53185", "53186", "53188", "53189", "53191", "53201", "53202", "53203", "53204", "53205", "53206", "53207", "53208", "53209", 1235 "53210", "53211", "53212", "53213", "53214", "53215", "53216", "53217", "53218", "53219", "53220", "53221", "53222", "53223", "53224", "53225", 1236 "53226", "53227", "53228", "53233", "53234", "53235", "53237", "53259", "53263", "53267", "53268", "53274", "53278", "53288", "53290", "53293", "53295", 1237 "54001", "54002", "54003", "54004", "54005", "54006", "54007", "54009", "54011", "54013", "54014", "54015", "54016", "54017", "54020", "54021", 1238 "54022", "54023", "54024", "54025", "54026", "54027", "54028", "54082", "54721", "54723", "54725", "54730", "54734", "54736", "54737", "54739", "54740", "54749", "54750", "54751", "54756", 1239 "54759", "54761", "54762", "54767", "54769", "54772", "54805", "54810", "54824", "54826", "54837", "54840", "54853", "54858", "54872", "54889", 1240 "55001", "55003", "55005", "55006", "55007", "55008", "55009", "55011", "55012", "55013", "55014", "55016", "55017", "55018", "55019", "55020", 1241 "55021", "55024", "55025", "55026", "55027", "55030", "55031", "55032", "55033", "55038", "55040", "55041", "55042", "55043", "55044", "55045", 1242 "55046", "55047", "55049", "55051", "55052", "55053", "55054", "55055", "55056", "55057", "55063", "55065", "55066", "55068", "55069", "55070", 1243 "55071", "55073", "55074", "55075", "55076", "55077", "55078", "55079", "55080", "55082", "55083", "55084", "55085", "55088", "55089", "55090", "55092", "55101", "55102", "55103", 1244 "55104", "55105", "55106", "55107", "55108", "55109", "55110", "55111", "55112", "55113", "55114", "55115", "55116", "55117", "55118", "55119", 1245 "55120", "55121", "55122", "55123", "55124", "55125", "55126", "55127", "55128", "55129", "55130", "55144", "55150", "55155", "55301", 1246 "55302", "55303", "55304", "55305", "55306", "55307", "55308", "55309", "55310", "55311", "55312", "55313", "55314", "55315", "55316", "55317", 1247 "55318", "55319", "55320", "55321", "55322", "55323", "55324", "55325", "55327", "55328", "55329", "55330", "55331", "55332", "55334", "55335", 1248 "55336", "55337", "55338", "55339", "55340", "55341", "55342", "55343", "55344", "55345", "55346", "55347", "55348", "55349", "55350", "55352", 1249 "55353", "55354", "55355", "55356", "55357", "55358", "55359", "55360", "55362", "55363", "55364", "55365", "55366", "55367", "55368", "55369", 1250 "55370", "55371", "55372", "55373", "55374", "55375", "55376", "55378", "55379", "55381", "55382", "55383", "55384", "55385", "55386", "55387", 1251 "55388", "55389", "55390", "55391", "55392", "55393", "55395", "55396", "55397", "55398", "55399", "55401", "55402", "55403", "55404", "55405", 1252 "55406", "55407", "55408", "55409", "55410", "55411", "55412", "55413", "55414", "55415", "55416", "55417", "55418", "55419", "55420", "55421", 1253 "55422", "55423", "55424", "55425", "55426", "55427", "55428", "55429", "55430", "55431", "55432", "55433", "55434", "55435", "55436", "55437", 1254 "55438", "55439", "55440", "55441", "55442", "55443", "55444", "55445", "55446", "55447", "55448", "55449", "55450", "55454", "55455", "55458", 1255 "55459", "55460", "55467", "55470", "55472", "55473", "55474", "55478", "55479", "55480", "55483", "55484", "55485", "55486", "55487", "55488", "55550", "55551", 1256 "55552", "55553", "55554", "55555", "55556", "55557", "55558", "55559", "55560", "55561", "55562", "55563", "55564", "55565", "55566", "55567", 1257 "55568", "55569", "55570", "55571", "55572", "55573", "55574", "55576", "55577", "55578", "55579", "55580", "55581", "55582", "55583", "55584", 1258 "55585", "55586", "55587", "55588", "55589", "55590", "55591", "55592", "55593", "55594", "55595", "55596", "55597", "55598", "55599", "55917", "55924", "55927", "55944", 1259 "55945", "55946", "55955", "55956", "55957", "55963", "55964", "55968", "55981", "55983", "55985", "55991", "55992", "56011", "56017", "56021", 1260 "56026", "56028", "56044", "56048", "56050", "56052", "56054", "56057", "56058", "56063", "56069", "56071", "56073", "56074", "56082", "56093",
1261 "56096", "56201", "56209", "56216", "56228", "56243", "56251", "56252", "56253", "56271", "56273", "56279", "56282", "56288", "56289", "56301", 1262 "56303", "56304", "56307", "56310", "56312", "56314", "56316", "56318", "56320", "56329", "56330", "56331", "56334", "56336", "56338", "56340", 1263 "56345", "56347", "56352", "56353", "56357", "56358", "56359", "56360", "56362", "56364", "56367", "56368", "56373", "56374", "56375", "56376", 1264 "56377", "56378", "56379", "56385", "56386", "56387", "56475" 1265 ], 1266 reSupplyPickupZipCodeAnaheim: [ 1267 "92835", "92612", "92627", "92654", "92648", "92607", "92616", "92804", "92821", "92647", "92806", "92886", "92844", "92650", "92631", "92857", 1268 "92656", "90680", "92618", "92690", "92645", "92782", "92704", "92703", "92706", "92691", "92822", "92662", "92663", "92831", "92802", "92660", 1269 "92661", "92697", "92628", "92625", "92683", "92610", "92684", "92707", "92630", "92842", "92668", "92805", "92843", "92780", "90638", "92635", 1270 "92688", "92687", "92833", "92846", "92887", "92865", "92867", "92646", "92667", "92799", "92845", "92675", "92620", "92832", "92856", "90622", 1271 "90742", "92641", "92680", "92672", "92838", "92869", "92840", "92623", "92624", "92862", "92711", "92673", "92626", "92705", "92859", "92701", 1272 "92702", "92617", "92709", "92823", "90630", "92841", "92643", "92637", "92692", "92720", "92861", "92801", "92677", "92651", "92603", "92834", 1273 "92728", "92629", "92658", "92836", "92606", "92781", "92866", "92653", "92649", "92657", "92676", "92614", "92679", "92604", "90621", "90623", 1274 "92868", "92870", "92602", "90620", "92710", "92708", "92808", "92803", "92807", "92837", "92694", "90631", "91799", "92652", "92725", "91720", 1275 "90701", "90703", "90743", 1276 "90620", "90621", "90622","90623","90624","90630","90631","90632","90633","90637","90638","90639","90680","90701","90702","90703","90743", 1277 "91720","91769","91799","92602","92603","92604","92605","92606","92607","92609","92610","92612","92614","92615","92616","92617","92618", 1278 "92619","92620","92623","92624","92625","92626","92627","92628","92629","92630","92637","92641","92643","92645","92646","92647","92648", 1279 "92649","92650","92651","92652","92653","92654","92655","92656","92657","92658","92659","92660","92661","92662","92663","92667","92672", 1280 "92673","92675","92676","92677","92679","92680","92683","92684","92685","92688","92690","92691","92692","92694","92697","92698","92701", 1281 "92702","92703","92704","92705","92706","92707","92708","92709","92710","92711","92712","92720","92725","92728","92735","92780","92781", 1282 "92782","92799","92801","92802","92803","92804","92805","92806","92807","92808","92809","92811","92812","92814","92815","92816","92817", 1283 "92821","92822","92823","92825","92831","92832","92833","92834","92835","92836","92837","92838","92840","92841","92842","92843","92844", 1284 "92845","92846","92850","92856","92857","92859","92861","92862","92863","92864","92865","92866","92867","92868","92869","92870","92871", 1285 "92885","92886","92887","92899" 1286 ], 1287 reSupplyPickupZipCodeBakersfield: [ 1288 "93536", "93203", "93206", "93218", "93505", "93531", "93305", "93534", "93215", "93250", "93263", "93560", "93302", "93551", "93304", "93550", "93314", 1289 "93308", "93552", "93306", "93543", "93313", "93311", "93301", "93535", "93303", "93309", "93312", "93510", "93561", "93307", "93257", 1290 "93201", "93203", "93205", "93206", "93207", "93208", "93214", "93215", "93216", "93219", "93220", "93222", "93225", "93226", "93238", "93240", "93241", 1291 "93250", "93251", "93252", "93254", "93255", "93256", "93257", "93258", "93260", "93261", "93263", "93265", "93267", "93268", "93270", "93276", "93280", 1292 "93283", "93285", "93301", "93302", "93303", "93304", "93305", "93306", "93307", "93308", "93309", "93311", "93312", "93313", "93314", "93380", "93383", 1293 "93384", "93385", "93386", "93387", "93388", "93389", "93390", "93399", "93401", "93402", "93403", "93405", "93406", "93407", "93408", "93410", "93412", 1294 "93420", "93421", "93422", "93423", "93424", "93427", "93432", "93433", "93434", "93436", "93437", "93438", "93440", "93441", "93442", "93444", "93445", 1295 "93448", "93449", "93453", "93454", "93455", "93456", "93457", "93458", "93460", "93461", "93463", "93464", "93501", "93502", "93504", "93505", "93510", 1296 "93518", "93522", "93527", "93530", "93531", "93534", "93535", "93536", "93542", "93549", "93551", "93552", "93554", "93555", "93556", "93560", "93561", 1297 "93562", "93581", "93582" 1298 ], 1299 reSupplyPickupZipCodeCanogaPark: [ 1300 "91301", "91311", "93030", "91302", "93032", "93031", "91313", "93101", "93102", "93103", "93105", "93106", "93109", "93110", "93111", "93116", "93118", 1301 "93120", "93121", "93130", "93140", "93160", "93190", "93199", "91367", "91408", "93107", "93004", "93150", "93044", "93003", "93034", "91403", "91495", 1302 "91303", "91371", "93099", "93010", "93042", "93036", "91436", "93033", "91307", "91316", "93035", "93011", "93021", "93001", "93009", "93041", "91306", 1303 "91361", "91335", "91320", "91326", "93012", "93043", "91364", "93064", "91362", "93065", "91377", "91329", "93063", "93006", "93108", "91304", "91356", 1304 "91406", "91360", "91330", "91325", "91324", "93013", "91344", 1305 "90265","90290","91040","91041","91043","91301","91302","91303","91304","91305","91306","91307","91308","91309","91310","91311","91312","91313","91316","91319", 1306 "91320","91321","91322","91324","91325","91326","91327","91328","91329","91330","91331","91333","91335","91337","91340","91341","91342","91343","91344","91345", 1307 "91346","91350","91351","91352","91354","91355","91356","91357","91358","91359","91360","91361","91362","91363","91364","91365","91367","91371","91372","91376", 1308 "91377","91380","91381","91382","91383","91384","91385","91386","91387","91390","91392","91394","91395","91396","91399","91401","91402","91403","91404","91405", 1309 "91406","91407","91408","91409","91410","91411","91412","91413","91416","91423","91426","91436","91470","91482","91495","91499","91607","91614","91615","91616", 1310 "91617","93001","93002","93003","93004","93005","93006","93007","93009","93010","93011","93012","93013","93014","93015","93016","93020","93021","93022","93023", 1311 "93024","93030","93031","93032","93033","93034","93035","93036","93040","93041","93043","93044","93060","93061","93062","93063","93064","93065","93066","93067", 1312 "93094","93099","93101","93102","93103","93105","93106","93107","93108","93109","93110","93111","93116","93117","93118","93120","93121","93130","93140","93150", 1313 "93160","93190","93199","93243","93532","93539","93586" 1314 ], 1315 reSupplyPickupZipCodeDenver: [ 1316 "80012", "80112", "80126", "80020", "80465", "80015", "80018", "80138", "80023", "80026", "80223", "80502", "80108", "80215", "80219", "80011", "80019", 1317 "80022", "80230", "80238", "80239", "80247", "80249", "80521", "80524", "80525", "80526", "80528", "80538", "80601", "80603", "80640", "80642", "80211", 1318 "80221", "80205", "80543", "80030", "80207", "80130", "80234", "80229", "80235", "80602", "80504", "80503", "80232", "80004", "80014", "80121", "80260", 1319 "80218", "80206", "80113", "80220", "80236", "80237", "80537", "80550", "80203", "80222", "80501", "80534", "80209", "80304", "80634", "80033", "80301", 1320 "80214", "80031", "80127", "80513", "80228", "80225", "80302", "80204", "80231", "80128", "80516", "80016", "80212", "80620", "80227", "80224", "80007", 1321 "80111", "80123", "80401", "80027", "80226", "80403", "80124", "80104", "80110", "80109", "80246", "80013", "80241", "80005", "80002", "80003", "80017", 1322 "80631", "80305", "80122", "80120", "80615", "80210", "80233", "80021", "80303", "80134", "80129", 1323 "80001", "80002", "80003", "80004", "80005", "80006", "80007", "80010", "80011", "80012", "80013", "80014", "80015", "80016", "80017", "80018", "80019", 1324 "80020", "80021", "80022", "80023", "80024", "80025", "80026", "80027", "80028", "80030", "80031", "80033", "80034", "80035", "80036", "80037", "80038", 1325 "80040", "80041", "80042", "80044", "80045", "80046", "80047", "80101", "80102", "80103", "80104", "80106", "80107", "80108", "80109", "80110", "80111", 1326 "80112", "80113", "80116", "80117", "80118", "80120", "80121", "80122", "80123", "80124", "80125", "80126", "80127", "80128", "80129", "80130", "80131", 1327 "80132", "80133", "80134", "80135", "80136", "80137", "80138", "80150", "80151", "80155", "80160", "80161", "80162", "80163", "80165", "80166", "80201", 1328 "80202", "80203", "80204", "80205", "80206", "80207", "80208", "80209", "80210", "80211", "80212", "80214", "80215", "80216", "80217", "80218", "80219", 1329 "80220", "80221", "80222", "80223", "80224", "80225", "80226", "80227", "80228", "80229", "80230", "80231", "80232", "80233", "80234", "80235", "80236", 1330 "80237", "80238", "80239", "80241", "80243", "80246", "80247", "80248", "80249", "80250", "80251", "80254", "80256", "80257", "80259", "80260", "80261", 1331 "80262", "80263", "80264", "80265", "80266", "80271", "80273", "80274", "80281", "80290", "80291", "80293", "80294", "80299", "80301", "80302", "80303", 1332 "80304", "80305", "80307", "80309", "80310", "80321", "80322", "80401", "80402", "80403", "80419", "80421", "80422", "80424", "80425", "80428", "80430", 1333 "80433", "80434", "80435", "80437", "80438", "80439", "80440", "80442", "80443", "80444", "80446", "80447", "80451", "80452", "80453", "80454", "80455", 1334 "80456", "80457", "80459", "80461", "80465", "80466", "80467", "80469", "80470", "80471", "80476", "80477", "80481", "80482", "80487", "80498", "80501", 1335 "80502", "80503", "80504", "80512", "80513", "80514", "80516", "80517", "80520", "80521", "80522", "80523", "80524", "80525", "80526", "80528", "80530", 1336 "80532", "80533", "80534", "80535", "80537", "80538", "80540", "80541", "80542", "80543", "80544", "80546", "80547", "80549", "80550", "80601", "80602", 1337 "80603", "80610", "80612", "80614", "80615", "80620", "80621", "80622", "80624", "80631", "80634", "80640", "80642", "80643", "80644", "80645", "80648", 1338 "80649", "80651", "80701", "80722", "80723", "80731", "80732", "80737", "80741", "80743", "80747", "80751", "80801", "80802", "80808", "80809", "80812", 1339 "80813", "80814", "80816", "80817", "80819", "80821", "80822", "80824", "80825", "80827", "80829", "80831", "80832", "80834", "80840", "80863", "80864", 1340 "80866", "80901", "80902", "80903", "80904", "80905", "80906", "80907", "80908", "80909", "80910", "80911", "80912", "80913", "80914", "80915", "80916", 1341 "80917", "80918", "80919", "80920", "80921", "80922", "80923", "80924", "80925", "80926", "80927", "80928", "80929", "80930", "80931", "80932", "80938", 1342 "80939", "80941", "80951", "80970", "81001", "81002", "81003", "81004", "81005", "81006", "81007", "81008", "81019", "81023", "81024", "81025", "81029", 1343 "81030", "81032", "81034", "81044", "81050", "81052", "81055", "81057", "81067", "81069", "81074", "81082", "81101", "81123", "81131", "81133", "81134", 1344 "81140", "81144", "81146", "81201", "81211", "81212", "81221", "81224", "81226", "81228", "81230", "81233", "81236", "81244", "81333", "81401", "81402", 1345 "81403", "81413", "81416", "81422", "81423", "81425", "81427", "81428", "81435", "81501", "81502", "81503", "81504", "81505", "81506", "81507", "81520", 1346 "81521", "81522", "81523", "81524", "81526", "81527", "81601", "81611", "81615", "81620", "81621", "81623", "81625", "81630", "81631", "81632", "81635", 1347 "81637", "81643", "81645", "81647", "81650", "81652", "81653", "81654", "81655", "81656", "81657", "82001", "82002", "82003", "82007", "82009", "82010", 1348 "82051", "82054", "82070", "82071", "82072", "82201", "82210", "82223", "82301", "82331", "82410", "82443", "82520", "82523", "82601", "82602", "82604", 1349 "82609", "82633", "82646", "82701", "82718", "82732", "82901", "82930", "82937", "83001", "83013", "83101", "83111", "83118", "83122", "83128", "83201", 1350 "83202", "83204", "83221", "83232", "83233", "83238", "83245", "83246", "83252", "83254", "83262", "83263", "83287", "83401", "83402", "83404", "83406", 1351 "83422", "83423", "83424", "83431", "83440", "83442", "83444", "83455", "84011", "84017", "84021", "84027", "84032", "84036", "84040", "84049", "84050", 1352 "84051", "84052", "84060", "84072", "84086", "84098", "84108", "84109", "84302", "84304", "84310", "84312", "84317", "84318", "84319", "84320", "84321", 1353 "84327", "84335", "84337", "84339", "84340", "84341", "84401", "84402", "84403", "84405", "84412", "84414", "84501", "84518", "84525", "84539", "87512", 1354 "87740" 1355 ], 1356 reSupplyPickupZipCodeFresno: [ 1357 "93727", "93723", "93212", "93221", "93235", "93242", "93244", "93247", "93271", "93272", "93282", "93286", "93638", "93737", "93602", "93610", 1358 "93614", "93620", "93622", "93626", "93635", "93640", "93643", "93644", "93646", "93650", "93656", "93667", "93675", "93637", "93662", "93291", "95301", 1359 "95333", "95340", "95341", "95344", "95348", "95365", "93657", "93202", "93230", "93648", "93704", "93654", "93720", "93630", "93673", "93722", "93619", 1360 "93636", "93710", "93274", "93730", "93616", "93618", "93703", "93611", "93277", "93702", "93726", "93705", "93292", "93725", "93728", "93609", "93631", 1361 "93245", "93625", "93706", "93721", "93711", "93612", "93701", "93227", 1362 "89010", "89013", "89047", "89415", "89422", "93202", "93204", "93210", "93212", "93221", "93223", "93227", "93230", "93232", "93234", "93235", "93237", "93239", "93242", "93244", 1363 "93245", "93247", "93262", "93266", "93271", "93272", "93274", "93277", "93279", "93282", "93286", "93290", "93291", "93292", "93428", "93430", "93435", "93446", "93447", "93450", 1364 "93451", "93452", "93465", "93512", "93513", "93514", "93526", "93545", "93546", "93601", "93602", "93603", "93604", "93605", "93606", "93607", "93608", "93609", "93610", "93611", 1365 "93612", "93613", "93614", "93615", "93616", "93618", "93619", "93620", "93621", "93622", "93623", "93624", "93625", "93626", "93627", "93628", "93629", "93630", "93631", "93633", 1366 "93636", "93637", "93638", "93639", "93640", "93641", "93643", "93644", "93646", "93647", "93648", "93649", "93650", "93651", "93652", "93653", "93654", "93656", "93657", "93660", 1367 "93662", "93664", "93665", "93666", "93667", "93668", "93669", "93673", "93675", "93701", "93702", "93703", "93704", "93705", "93706", "93707", "93708", "93709", "93710", "93711", 1368 "93712", "93714", "93715", "93716", "93717", "93718", "93720", "93721", "93722", "93723", "93724", "93725", "93726", "93727", "93728", "93729", "93730", "93737", "93740", "93741", 1369 "93744", "93745", "93747", "93750", "93755", "93760", "93761", "93764", "93765", "937
136971", "93772", "93773", "93774", "93775", "93776", "93777", "93778", "93779", "93780", "93786", 1370 "93790", "93791", "93792", "93793", "93794", "93844", "93888", "93930", "93932", "95306", "95317", "95318", "95325", "95333", "95338", "95340", "95341", "95344", "95345", "95365" 1371 ], 1372 reSupplyPickupZipCodeLasVegas: [ 1373 "89002", "89005", "89012", "89014", "89015", "89030", "89031", "89032", "89044", "89074", "89081", "89084", "89085", "89086", "89087", "89101", "89102", 1374 "89103", "89104", "89106", "89107", "89108", "89109", "89110", "89113", "89115", "89117", "89118", "89119", "89120", "89121", "89122", "89123", "89128", 1375 "89129", "89130", "89131", "89134", "89135", "89138", "89139", "89141", "89142", "89143", "89144", "89145", "89146", "89147", "89148", "89149", "89156", 1376 "89165", "89166", "89169", "89178", "89179", "89183", "89011", "89052", 1377 "83211","83301","83303","83318","83321","83328","83336","83341","84003","84004","84005","84010","84013","84014","84015","84020","84022","84025","84029", 1378 "84037","84041","84042","84043","84044","84045","84047","84054","84056","84057","84058","84059","84062","84065","84067","84070","84071","84074","84075", 1379 "84080","84081","84083","84084","84087","84088","84089","84092","84093","84094","84095","84096","84097","84101","84102","84103","84104","84105","84106", 1380 "84107","84111","84113","84115","84116","84117","84118","84119","84120","84121","84123","84124","84126","84128","84130","84131","84132","84133","84140", 1381 "84144","84150","84201","84307","84315","84404","84522","84601","84602","84603","84604","84606","84624","84636","84645","84651","84653","84655","84660", 1382 "84662","84663","84664","84711","84712","84719","84720","84721","84728","84733","84734","84737","84738","84741","84745","84750","84755","84756","84757", 1383 "84759","84765","84767","84770","84780","84783","84790","86022","86052","86337","86402","86403","86404","86405","86409","86411","86413","86426","86429", 1384 "86432","86436","86440","86441","86442","86444","89001","89002","89003","89004","89005","89007","89008","89009","89011","89012","89014","89015","89016", 1385 "89017","89018","89019","89020","89021","89022","89023","89024","89
1385025","89027","89028","89029","89030","89031","89032","89033","89036","89037","89040", 1386 "89041","89044","89045","89048","89049","89052","89053","89060","89061","89067","89070","89074","89077","89081","89084","89085","89086","89087","89101", 1387 "89102","89103","89104","89105","89106","89107","89108","89109","89110","89111","89112","89113","89114","89115","89116","89117","89118","89119","89120", 1388 "89121","89122","89123","89124","89125","89126","89127","89128","89129","89130","89131","89132","89133","89134","89135","89136","89137","89138","89139", 1389 "89140","89141","89142","89143","89144","89145","89146","89147","89148","89149","89150","89151","89152","89153","89154","89155","89156","89157","89158", 1390 "89159","89160","89161","89162","89163","89164","89165","89166","89169","89170","89173","89177","89178","89179","89180","89183","89191","89193","89195", 1391 "89199","89301","89311","89315","89801","89815","89830","89883","92280","92309","92323","92328","92332","92363","92364","92366","92384" 1392 ], 1393 reSupplyPickupZipCodeLongBeach: [ 1394 "90723", "90605", "90804", "90821", "90003", "90601", "90262", "90201", "90820", "90712", "90802", "90240", "90810", "90242", "90747", "90710", "90505", 1395 "90811", "90830", "90833", "90254", "90838", "90270", "90828", "90047", "90826", "90717", "90504", "90220", "90274", "90813", "90602", "90829", 1396 "90807", "90819", "90275", "90815", "90280", "90603", "90832", "90809", "90277", "90250", "90839", "90732", "90746", "90247", "90853", 1397 "90248", "90606", "90801", "90059", "90805", "90844", "90713", "90824", "90843", "90706", "90503", "90720", "90834", "90278", "90827", "90260", "90061", 1398 "90744", "90501", "90825", "90831", "90650", "90245", "90222", "90715", "90604", "90670", "90740", "90846", "90249", "90835", "90840", "90755", "90266", 1399 "90731", "90241", "90714", "90837", "90255", "90502", "90745", "90842", "90803", "90808", "90058", "90823", "90224", "90814", "90836", "90044", "90806", 1400 "90812", "90822", "90716", "90221", 1401 "90001", "90002", "90040", "90091", "90096", "90201", "90202", "90221", "90239", "90240", "90241", "90242", "90255", "90262", "90270", "90274", "90275", 1402 "90277", "90280", "90501", "90502", "90503", "90505", "90507", "90508", "90509", "90510", "90601", "90602", "90603", "90604", "90605", "90606", "90607", 1403 "90608", "90609", "90610", "90640", "90650", "90651", "90652", "90660", "90661", "90662", "90670", "90671", "90704", "90706", "90707", "90710", "90711", 1404 "90712", "90713", "90714", "90715", "90716", "90717", "90720", "90721", "90723", "90731", "90732", "90733", "90734", "90740", "90742", "90744", "90745", 1405 "90746", "90747", "90748", "90749", "90755", "90801", "90802", "90803", "90804", "90805", "90806", "90807", "90808", "90809", "90810", "90811", "90812", 1406 "90813", "90814", "90815", "90819", "90820", "90821", "90822", "90823", "90824", "90825", "90826", "90827", "90828", "90829", "90830", "90831", "90832", 1407 "90833", "90834", "90835", "90836", "90837", "90838", "90839", "90840", "90842", "90843", "90844", "90845", "90846", "90847", "90848", "90853", "90895" 1408 ], 1409 reSupplyPickupZipCodeOakland: [ 1410 "94547", "94621", "94525", "94704", "94577", "94563", "94568", "94570", "94708", "94517", "94526", "94549", "94601", "94569", "94603", "94579", "94578", 1411 "94801", "94619", "94502", "94615", "94516", "94582", "94702", "94612", "94575", "94610", "94805", "94595", "94556", "94607", "94541", "94552", "94530", 1412 "94706", "94507", "94564", "94803", "94597", "94551", "94618", "94546", "94609", "94528", "94596", "94523", "94506", "94555", "94850", "94705", "94538", 1413 "94605", "94536", "94542", "94588", "94625", "94710", "94602", "94519", "94614", "94703", "94606", "94521", "94501", "94598", "94613", "94627", "94560", 1414 "94626", "94544", "94709", "94806", "94580", "94539", "94545", "94518", "94707", "94583", "94550", "94553", "94720", "94608", "94520", "94587", "94804", 1415 "94566", "94611", "94572", 1416 "94130", "94501", "94502", "94503", "94506", "94507", "94509", "94510", "94512", "94516", "94517", "94518", "94519", "94520", "94521", "94522", "94523", 1417 "94524", "94525", "94526", "94527", "94528", "94529", "94530", "94534", "94540", "94541", "94542", "94543", "94544", "94545", "94546", "94547", "94549", 1418 "94551", "94552", "94553", "94556", "94557", "94559", "94562", "94563", "94564", "94565", "94568", "94569", "94570", "94572", "94573", "94575", "94576", 1419 "94577", "94578", "94579", "94580", "94581", "94582", "94583", "94585", "94587", "94588", "94589", "94590", "94591", "94592", "94595", "94596", "94597", 1420 "94598", "94599", "94601", "94602", "94603", "94604", "94605", "94606", "94607", "94608", "94609", "94610", "94611", "94612", "94613", "94614", "94615", 1421 "94617", "94618", "94619", "94620", "94621", "94622", "94623", "94624", "94625", "94626", "94627", "94649", "94650", "94659", "94660", "94661", "94662", 1422 "94666", "94701", "94702", "94703", "94704", "94705", "94706", "94707", "94708", "94709", "94710", "94712", "94720", "94801", "94803", "94804", "94805", 1423 "94808", "94820", "94850", "94901", "95402", "95406", "95408", "95416", "95431", "95433", "95442", "95452", "95487" 1424 ], 1425 reSupplyPickupZipCodePasadena: [ 1426 "91775", "90015", "90038", "91602", "91204", "91401", "91355", "90013", "91780", "91790", "91008", "91423", "90023", "90032", "91390", "91105", "91046", 1427 "91381", "91203", "90071", "90039", "91387", "91207", "91007", "90640", "91501", "91042", "91754", "90079", "91201", "91601", "90010", "91755", "91605", 1428 "91006", "91803", "91202", "91608", "91791", "90022", "91020", "91208", "91522", "90017", "91744", "91748", "91321", "90012", "91706", "91731", "91350", 1429 "90027", "91354", "91206", "90033", "91724", "91001", "91789", "91801", "90069", "91108", "91502", "91770", "90026", "91733", "91506", "91776", "90031", 1430 "91504", "91340", "91331", "91741", "91352", "91214", "91792", "91607", "90660", "90040", "90028", "91103", "90021", "91521", "91209", "90020", "90042", 1431 "91016", "91040", "91030", "91107", "91746", "90014", "91205", "91024", "90068", "91503", "91384", "91745", "91505", "90041", "90057", "90005", "91606", 1432 "91804", "91740", "91345", "90046", "91723", "91011", "91765", "90004", "91010", "90029", "91722", "91351", "91125", "91210", "91106", "90036", "91104", 1433 "90063", "91342", "91702", "90065", "91523", "91126", "91732", 1434 "90022", "90027", "90032", "90041", "90042", "90050", "90065", "90068", "90077", "90101", "90103", "91001", "91003", "91006", "91007", "91008", "91009", 1435 "91010", "91011", "91012", "91016", "91017", "91020", "91021", "91023", "91024", "91025", "91030", "91031", "91042", "91046", "91051", "91066", "91077", 1436 "91101", "91102", "91103", "91104", "91105", "91106", "91107", "91108", "91109", "91110", "91114", "91115", "91116", "91117", "91118", "91121", "91123", 1437 "91124", "91125", "91126", "91129", "91131", "91175", "91182", "91184", "91185", "91188", "91189", "91191", "91199", "91201", "91202", "91203", "91204", 1438 "91205", "91206", "91207", "91208", "91209", "91210", "91214", "91221", "91222", "91224", "91225", "91226", "91334", "91353", "91393", "91501", "91502", 1439 "91503", "91504", "91505", "91506", "91507", "91508", "91510", "91521", "91522", "91523", "91601", "91602", "91603", "91604", "91605", "91606", "91608", 1440 "91609", "91610", "91618", "91702", "91706", "91714", "91715", "91716", "91722", "91723", "91724", "91731", "91732", "91733", "91734", "91735", "91740", 1441 "91741", "91744", "91745", "91746", "91747", "91748", "91749", "91750", "91754", "91755", "91756", "91759", "91765", "91770", "91771", "91772", "91773", 1442 "91775", "91776", "91778", "91780", "91788", "91789", "91790", "91791", "91792", "91793", "91797", "91801", "91802", "91803", "91804", "91841", "91896", 1443 "91899", "93523", "93524", "93543", "93544", "93550", "93553", "93563", "93590", "93591", "93599"
1444 ], 1445 reSupplyPickupZipCodePhoenix: [ 1446 "85326", "85323", "85260", "85303", "85301", "85015", "85302", "85206", "85255", "85023", "85032", "85236", "85209", "85266", "85215", "85203", "85298", 1447 "85053", "85233", "85205", "85251", "85286", "85254", "85048", "85375", "85204", "85044", "85035", "85043", "85331", "85383", "85029", "85284", "85118", 1448 "85283", "85379", "85258", "85027", "85008", "85012", "85281", "85308", "85033", "85340", "85024", "85304", "85250", "85296", "85213", "85007", "85051", 1449 "85392", "85040", "85224", "85050", "85022", "85259", "85054", "85363", "85234", "85351", "85395", "85041", "85208", "85016", "85335", "85248", "85345", 1450 "85014", "85201", "85387", "85017", "85045", "85268", "85013", "85021", "85388", "85037", "85373", "85034", "85122", "85249", "85019", "85130", "85193", 1451 "85207", "85257", "85305", "85353", "85262", "85006", "85028", "85020", "85310", "85226", "85382", "85009", "85378", "85306", "85297", "85018", "85210", 1452 "85381", "85339", "85374", "85031", "85202", "85253", "85282", "85295", "85042", "85225", 1453 "85001", "85002", "85003", "85004", "85005", "85006", "85007", "85008", "85009", "85010", "85011", "85012", "85013", "85014", "85015", "85016", "85017", 1454 "85018", "85019", "85020", "85021", "85022", "85023", "85024", "85025", "85026", "85027", "85028", "85029", "85030", "85031", "85032", "85033", "85034", 1455 "85035", "85036", "85037", "85038", "85039", "85040", "85041", "85042", "85043", "85044", "85045", "85046", "85048", "85050", "85051", "85053", "85054", 1456 "85055", "85060", "85061", "85062", "85063", "85064", "85066", "85067", "85068", "85069", "85070", "85071", "85072", "85074", "85076", "85078", "85079", 1457 "85080", "85082", "85083", "85085", "85086", "85087", "85099", "85118", "85119", "85120", "85121", "85122", "85123", "85128", "85131", "85132", "85137", 1458 "85138", "85139", "85140", "85142", "85143", "85144", "85147", "85172", "85173", "85193", "85194", "85201", "85202", "85203", "85204", "85205", "85206", 1459 "85207", "85208", "85209", "85210", "85211", "85212", "85213", "85214", "85215", "85216", "85217", "85218", "85219", "85220", "85221", "85222", "85223", 1460 "85224", "85225", "85226", "85227", "85228", "85230", "85233", "85234", "85236", "85239", "85242", "85243", "85244", "85246", "85247", "85248", "85249", 1461 "85250", "85251", "85252", "85253", "85254", "85255", "85256", "85257", "85258", "85259", "85260", "85261", "85262", "85263", "85264", "85266", "85267", 1462 "85268", "85269", "85271", "85272", "85273", "85274", "85275", "85277", "85278", "85280", "85281", "85282", "85283", "85284", "85285", "85286", "85287", 1463 "85288", "85295", "85296", "85297", "85298", "85299", "85301", "85302", "85303", "85304", "85305", "85306", "85307", "85308", "85309", "85310", "85311", 1464 "85312", "85313", "85318", "85321", "85322", "85323", "85324", "85325", "85326", "85327", "85328", "85329", "85331", "85332", "85333", "85334", "85335", 1465 "85337", "85338", "85339", "85340", "85342", "85344", "85345", "85346", "85347", "85348", "85351", "85352", "85353", "85354", "85355", "85356", "85357", 1466 "85359", "85361", "85363", "85365", "85367", "85371", "85372", "85373", "85374", "85375", "85376", "85377", "85378", "85379", "85380", "85381", "85382", 1467 "85383", "85385", "85387", "85388", "85390", "85392", "85395", "85396", "85501", "85502", "85539", "85541", "85544", "85545", "85550", "85614", "85704", 1468 "85705", "85710", "85711", "85712", "85713", "85718", "85719", "85737", "85741", "85745", "85755", "85901", "85902", "85912", "85923", "85926", "85928", 1469 "85929", "85933", "85935", "85937", "85939", "86001", "86003", "86004", "86011", "86015", "86017", "86018", "86024", "86025", "86038", "86045", "86046", 1470 "86054", "86301", "86302", "86303", "86304", "86305", "86312", "86314", "86315", "86320", "86322", "86323", "86324", "86325", "86326", "86327", "86329", 1471 "86332", "86333", "86334", "86335", "86336", "86351", "86401", "86406", "92222", "92226", "92242", "98144" 1472 ], 1473 reSupplyPickupZipCodeSanBernardino: [ 1474 "92318", "92314", "92315", "92325", "92333", "91785", "91773", "92403", "92307", "91763", "91708", "92308", "92374", "92337", "91761", "92410", "92324", 1475 "92407", "91701", "92357", "92394", "92336", "92411", "92331", "92316", "92405", "92373", "92377", "92334", "92406", "92359", "91710", "92376", "92344", 1476 "91764", "91739", "92320", "91737", "92401", "92402", "91762", "91784", "92335", "92369", "91768", "91730", "91750", "92313", "92354", "92392", "92399", 1477 "92409", "92412", "91729", "92408", "91709", "92346", "92395", "92404", "91711", "92393", "92375", "92345", "91786", "91767", 1478 "91701", "91708", "91709", "91710", "91711", "91729", "91730", "91737", "91739", "91743", "91758", "91761", "91762", "91763", "91764", "91766", "91767", 1479 "91768", "91784", "91785", "91786", "91798", "92252", "92256", "92277", "92278", "92284", "92285", "92286", "92301", "92304", "92305", "92307", "92308", 1480 "92310", "92311", "92312", "92313", "92314", "92315", "92316", "92317", "92318", "92319", "92320", "92321", "92322", "92324", "92325", "92326", "92327", 1481 "92329", "92331", "92333", "92334", "92335", "92336", "92337", "92338", "92339", "92340", "92341", "92342", "92344", "92345", "92346", "92347", "92350", 1482 "92352", "92354", "92356", "92357", "92358", "92359", "92365", "92368", "92369", "92371", "92372", "92373", "92374", "92375", "92376", "92377", "92378", 1483 "92382", "92385", "92386", "92391", "92392", "92393", "92394", "92395", "92397", "92398", "92399", "92401", "92402", "92403", "92404", "92405", "92406", 1484 "92407", "92408", "92409", "92410", "92411", "92412", "92413", "92415", "92418", "92420", "92423", "92424", "92427", "93516" 1485 ], 1486 reSupplyPickupZipCodeSanDiego: [ 1487 "91978", "92065", "92154", "92081", "92123", "92131", "92014", "91915", "92040", "91911", "92067", "92101", "92025", "92024", "92102", "91932", "92071", 1488 "92027", "92104", "92009", "92064", "92127", "92109", "92124", "92110", "92091", "91942", "92069", "92121", "92056", "92130", "92037", "92020", "92103", 1489 "92011", "91941", "92139", "91914", "92019", "92116", "92107", "92118", "92106", "92026", "92126", "91902", "92115", "92122", "92057", "92117", "92075", 1490 "91913", "92054", "91945", "92128", "92108", "92084", "92078", "91910", "92111", "91977", "92129", "92120", "92021", "92083", "92119", "92007", "92008", 1491 "92010", "92173", "92158", "92153", "91908", "91921", "91933", "91909", "91912", "91950", "91951", "92114", "92136", "92113", "91976", "91979", "91946", 1492 "92155", "92105", "91935", "92178", "91943", "91944", "92137", "92138", "92142", "92147", "92152", "92072", "91980", "92143", "92149", "92150", "92159", 1493 "92160", "92163", "92165", "92166", "92167", "92168", "92170", "92171", "92172", "92174", "92175", "92176", "92177", "92179", "92186", "92187", "92191", 1494 "92192", "92193", "92195", "92196", "92197", "92112", "92134", "92132", "91917", "92182", "92135", "92022", "92140", 1495 "85336", "85349", "85350", "85364", "85366", "91901", "91902", "91903", "91905", "91906", "91908", "91909", "91910", "91911", "91912", "91913", "91914", 1496 "91915", "91916", "91917", "91921", "91931", "91932", "91933", "91935", "91941", "91942", "91943", "91944", "91945", "91946", "91947", "91950", "91951", 1497 "91962", "91963", "91976", "91977", "91978", "91979", "91980", "91990", "92004", "92007", "92008", "92009", "92010", "92011", "92013", "92014", "92018", 1498 "92019", "92020", "92021", "92022", "92023", "92024", "92025", "92026", "92027", "92029", "92030", "92033", "92036", "92037", "92038", "92039", "92040", 1499 "92049", "92051", "92052", "92054", "92056", "92057", "92064", "92065", "92066", "92067", "92069", "92070", "92071", "92072", "92074", "92075", "92078", 1500 "92079", "92081", "92082", "92083", "92084", "92085", "92090", "92091", "92092", "92093", "92101", "92102", "92103", "92104", "92105", "92106", "92107", 1501 "92108", "92109", "92110", "92111", "92112", "92113", "92114", "92115", "92116", "92117", "92118", "92119", "92120", "92121", "92122", "92123", "92124", 1502 "92126", "92127", "92128", "92129", "92130", "92131", "92132", "92133", "92134", "92135", "92136", "92137", "92138", "92139", "92140", "92142", "92143", 1503 "92145", "92147", "92149", "92150", "92152", "92153", "92154", "92155", "92158", "92159", "92160", "92163", "92164", "92165", "92166", "92167", "92168", 1504 "92170", "92171", "92172", "92173", "92174", "92175", "92176", "92177", "92178", "92179", "92182", "92184", "92186", "92187", "92191", "92192", "92193", 1505 "92195", "92196", "92197", "92199", "92227", "92231", "92232", "92233", "92243", "92244", "92249", "92250", "92251", "92257", "92266", "92273", "92281", 1506 "92283" 1507 ], 1508 reSupplyPickupZipCodeSanFrancisco: [ 1509 "94127", "94015", "94010", "94112", "94403", "94104", "94070", "94061", "94103", "94002", "94960", "94945", "94108", "94123", "94110", "94920", "94114", 1510 "94118", "94143", "94939", "95439", "94573", "95492", "94559", "94558", "95407", "94951", "95405", "94964", "94134", "94903", "94941", "94065", "94133", 1511 "94947", "94965", "94949", "94066", "94014", "94131", "94925", "94132", "94966", "94404", "94044", "94402", "94128", "94904", "94105", "94107", "94117", 1512 "94030", "94957", "94129", "94101", "94080", "94591", "94590", "95416", "94510", "95448", "95425", "95444", "95404", "95482", "95409", "94515", "94574", 1513 "95436", "94562", "94063", "94954", "94931", "94928", "95406", "95449", "95401", "94503", "95403", "95481", "95452", "95472", "94952", "94589", "95402",
1514 "95433", "95442", "94599", "95441", "94576", "95476", "94508", "95445", "95484", "95494", "94005", "94111", "94102", "94062", "94401", "94109", "94121", 1515 "94901", "94116", "94115", "94027", "94122", 1516 "94002", "94003", "94005", "94010", "94011", "94012", "94013", "94014", "94015", "94016", "94017", "94018", "94019", "94027", "94030", "94037", "94038", 1517 "94044", "94045", "94061", "94062", "94063", "94065", "94066", "94067", "94070", "94080", "94083", "94098", "94101", "94102", "94103", "94104", "94105", 1518 "94106", "94107", "94108", "94109", "94110", "94111", "94112", "94114", "94115", "94116", "94117", "94118", "94119", "94120", "94121", "94122", "94123", 1519 "94124", "94125", "94126", "94127", "94128", "94129", "94131", "94132", "94133", "94134", "94135", "94136", "94137", "94139", "94140", "94141", "94142", 1520 "94143", "94144", "94145", "94146", "94147", "94151", "94152", "94153", "94155", "94158", "94159", "94160", "94161", "94163", "94164", "94165", "94172", 1521 "94177", "94188", "94199", "94401", "94402", "94403", "94404", "94405", "94406", "94408", "94497", "94515", "94558", "94574", "94802", "94806", "94807", 1522 "94903", "94904", "94912", "94913", "94914", "94915", "94920", "94922", "94923", "94924", "94925", "94927", "94928", "94929", "94930", "94931", "94933", 1523 "94937", "94938", "94939", "94940", "94941", "94942", "94945", "94946", "94947", "94948", "94949", "94950", "94951", "94952", "94954", "94956", "94957", 1524 "94960", "94963", "94964", "94965", "94966", "94970", "94971", "94972", "94973", "94974", "94975", "94976", "94977", "94978", "94979", "94998", "94999", 1525 "95401", "95403", "95404", "95405", "95407", "95409", "95410", "95412", "95415", "95419", "95420", "95421", "95425", "95427", "95430", "95432", "95436", 1526 "95439", "95441", "95444", "95445", "95446", "95448", "95449", "95450", "95456", "95459", "95460", "95462", "95465", "95466", "95468", "95471", "95472", 1527 "95473", "95476", "95486", "95492", "95494", "95497" 1528 ], 1529 reSupplyPickupZipCodeSanJose: [ 1530 "95064", "95113", "95136", "94025", "95060", "95037", "93906", "95116", "95123", "94089", "94085", "95054", "95127", "93902", "95120", "93905", "93908", 1531 "93940", "94303", "95023", "93923", "95061", "93921", "95051", "95126", "94301", "95014", "95073", "95121", "95008", "94022", "95111", "95003", "95019", 1532 "95122", "95035", "93953", "95119", "95063", "95032", "95148", "95070", "93943", "94024", "95138", "95110", "95050", "93944", "94087", "95076", "94305", 1533 "95125", "95134", "95131", "94043", "95030", "95128", "95135", "95139", "95065", "95066", "95020", "93912", "95002", "94086", "94041", "93924", "95053", 1534 "94306", "94040", "93950", "94035", "95046", "94304", "95117", "95013", "95010", "93901", "95124", "95031", "95133", "95129", "95112", "95062", "95132", 1535 "93907", "95130", "95118", 1536 "93635", "93901", "93902", "93905", "93906", "93907", "93908", "93911", "93912", "93915", "93920", "93921", "93922", "93923", "93924", "93925", "93926", 1537 "93927", "93933", "93940", "93943", "93944", "93950", "93953", "93955", "93960", "93962", "94020", "94021", "94022", "94023", "94024", "94025", "94026", 1538 "94028", "94029", "94035", "94039", "94040", "94041", "94042", "94043", "94060", "94064", "94074", "94085", "94086", "94087", "94088", "94089", "94090", 1539 "94091", "94301", "94302", "94303", "94304", "94305", "94306", "94309", "94536", "94537", "94538", "94539", "94550", "94555", "94560", "94566", "94586", 1540 "95001", "95002", "95003", "95004", "95005", "95006", "95007", "95008", "95009", "95010", "95011", "95012", "95013", "95014", "95015", "95017", "95018", 1541 "95019", "95020", "95021", "95023", "95024", "95026", "95030", "95031", "95032", "95033", "95035", "95036", "95037", "95038", "95039", "95041", "95042", 1542 "95044", "95045", "95046", "95050", "95051", "95052", "95053", "95054", "95055", "95056", "95060", "95061", "95062", "95063", "95064", "95065", "95066", 1543 "95070", "95071", "95073", "95075", "95076", "95077", "95101", "95102", "95103", "95106", "95108", "95109", "95110", "95111", "95112", "95113", "95114", 1544 "95115", "95116", "95117", "95118", "95119", "95120", "95121", "95122", "95123", "95124", "95125", "95126", "95127", "95128", "95129", "95130", "95131", 1545 "95132", "95133", "95134", "95135", "95136", "95137", "95138", "95139", "95140", "95141", "95142", "95148", "95150", "95151", "95152", "95153", "95154",
1546 "95155", "95156", "95157", "95158", "95159", "95160", "95161", "95164", "95170", "95172", "95173", "95190", "95191", "95192", "95193", "95194", "95196", 1547 "95322", "95360" 1548 ], 1549 reSupplyPickupZipCodeStockton: [ 1550 "95757", "95237", "95315", "95307", "95630", "95758", "95242", "95829", "95759", "95391", "95864", "95350", "94505", "95827", "95353", "95219", "94514", 1551 "95670", "95354", "95366", "95378", "95211", "95304", "95355", "95828", "95762", "95382", "95367", "95826", "95215", "95240", "95632", "95320", "95328", 1552 "95376", "95817", "94548", "95361", "95202", "95351", "95205", "95628", "95324", "95204", "95326", "95381", "95337", "94509", "95327", "95370", "95207", 1553 "95330", "95377", "95206", "94561", "95380", "95258", "95336", "95819", "95356", "95209", "95357", "95608", "95747", "95203", "95682", "94513", "95624", 1554 "95212", "95746", "95368", "95210", "94531", "95834", 1555 "94505","94511","94513","94514","94531","94548","94561","94571","95201","95202","95203","95204","95205","95206","95207","95208","95209","95210","95211", 1556 "95212","95213","95215","95219","95220","95222","95223","95224","95225","95226","95227","95228","95229","95230","95231","95232","95233","95234","95236", 1557 "95237","95240","95241","95242","95245","95246","95247","95248","95249","95250","95251","95252","95253","95254","95255","95257","95258","95267","95269", 1558 "95296","95297","95298","95301","95303","95304","95305","95307","95309","95310","95311","95312","95313","95314","95315","95316","95319","95320","95321", 1559 "95323","95324","95326","95327","95328","95329","95330","95334","95335","95336","95337","95346","95348","95350","95351","95352","95353","95354","95355", 1560 "95356","95357","95358","95361","95363","95364","95366","95367","95368","95370","95372","95373","95374","95375","95376","95377","95378","95379","95380", 1561 "95381","95382","95383","95386","95387","95388","95390","95391","95608","95624","95628","95630","95632","95638","95640","95641","95642","95648","95654", 1562 "95665","95670","95682","95686","95690","95746","95747","95757","95758","95759","95762","95817","95819","95826","95827","95828","95829","95834","95864" 1563 ], 1564 reSupplyPickupZipCodeSantaMonica: [ 1565 "90016", "90292", "90210", "90404", "90303", "90232", "90212", "90067", "90402", "90056", "90034", "90024", "90019", "90230", "90291", "90077", "90066", 1566 "90302", "90403", "90035", "90049", "90305", "90037", "90272", "90405", "90007", "90011", "90304", "90265", "90006", "90293", "90018", "90045", "90062", 1567 "90089", "90073", "90401", "90301", "90008", "90064", "90095", "90025", "90043", "90211", "90290", "90048", "90094", "91603", "91609", "91610", "91614", 1568 "91615", "91616", "91617", "91618", "90009", "90030", "90050", "90051", "90052", "90053", "90055", "90070", "90072", "90074", "90075", "90076", "90078", 1569 "90080", "90081", "90082", "90084", "90086", "90087", "90088", "90091", "90093", "90096", "90099", "90189", "90202", "90209", "90213", "90223", "90231", 1570 "90251", "90261", "90264", "90294", "90295", "90296", "90307", "90308", "90309", "90310", "90311", "90312", "90406", "90407", "90408", "90409", "90410", 1571 "90411", "90507", "90508", "90509", "90510", "90749", "90895", "91221", "91222", "91224", "91225", "91305", "91308", "91309", "91327", "91328", "91333", 1572 "91337", "91341", "91346", "91353", "91365", "91372", "91376", "91385", "91393", "91394", "91395", "91396", "91404", "91407", "91409", "91410", "91412", 1573 "91413", "91416", "91426", "91470", "91482", "91499", "91507", "91508", "91510", "91405", "91604", "91343", "90001", "91402", "91411", "90054", "90060", 1574 "90083", "90263", "90267", "90306", "90506", "90002", "91226", "91357", "90245", "90266", "90250", "90047", "90254", "90260", "90278", "90044", "90249", 1575 "90003", "90504", "90247", "90277", "90061", "90503", "90248", "90059", "90058", "90255", "90222", "90501", "90505", "90747", "90502", "90746", "90220", 1576 "90270", "90224", "90262", "90280", "90717", "90745", "90221", "90710", "90201", "90274", "90275", "90069", "90036", "90046", "91423", "90038", "90005", 1577 "90010", "90020", "90028", "90004", "91607", "91608", "91602", "91401", "90068", "90029", "91522", "91601", "90057", "90015", "91606", "91523", "90017", 1578 "91521", "90079", "90071", "90026", "90014", "91505", "90027", "91605", "90021", "90013", "91506", "90012", "90039", "91502", "91204", "91503", "91201", 1579 "91504", "91203", "91210", "91209", "90033", "90031", "90065", "91205", "91501", "90023", "91202", "91352", "91331", "90063", "91345", "91207", "90041", 1580 "90042", "91208", "90032", "91206", "91340", "90040", "90022", "91046", "91754", "91403", "91436", "91356", "91316", "91364", "91408", "91302", "91406", 1581 "91371", "91367", "91335", "91303", "91306", "91325", "91324", "91330", "91304", "91307", "91301", "91313", "91326", "91344", "91377", "91311", "93064", 1582 1583 "90003", "90004", "90005", "90006", "90007", "90008", "90009", "90010", "90011", "90012", "90013", "90014", "90015", "90016", "90017", "90018", "90019", 1584 "90020", "90021", "90023", "90024", "90025", "90026", "90028", "90029", "90030", "90031", "90033", "90034", "90035", "90036", "90037", "90038", "90039", 1585 "90043", "90044", "90045", "90046", "90047", "90048", "90049", "90051", "90052", "90053", "90054", "90055", "90056", "90057", "90058", "90059", "90060", 1586 "90061", "90062", "90063", "90064", "90066", "90067", "90069", "90070", "90071", "90072", "90073", "90074", "90075", "90076", "90078", "90079", "90080", 1587 "90081", "90082", "90083", "90084", "90086", "90087", "90088", "90089", "90093", "90094", "90095", "90099", "90189", "90209", "90210", "90211", "90212", 1588 "90213", "90220", "90222", "90223", "90224", "90230", "90231", "90232", "90245", "90247", "90248", "90249", "90250", "90251", "90254", "90260", "90261", 1589 "90263", "90264", "90266", "90267", "90272", "90278", "90291", "90292", "90293", "90294", "90295", "90296", "90301", "90302", "90303", "90304", "90305", 1590 "90306", "90307", "90308", "90309", "90310", "90311", "90312", "90313", "90401", "90402", "90403", "90404", "90405", "90406", "90407", "90408", "90409", 1591 "90410", "90411", "90504", "90506", "93042" 1592 ], 1593 reSupplyPickupZipCodeRiverside: [ 1594 "92860", "92555", "92264", "92456", "92570", "92241", "92878", "92509", "92211", "92210", "92088", "92202", "92203", "92253", "92255", "92260", "92261", 1595 "92503", "92590", "92201", "92370", "92591", "92270", "92582", "92521", "92595", "92882", "92583", "92230", "92507", "92282", "92258", "92596", "92563", 1596 "92567", "92586", "92262", "92571", "92880", "92879", "92508", "92544", "92223", "92557", "92585", "92522", "92883", "92028", "92532", "92276", "92501", 1597 "92545", "92881", "92548", "92562", "92220", "92234", "92592", "92587", "92584", "92506", "92599", "92530", "92551", "91752", "92504", "92553", "92518", 1598 "92543", 1599 "91719","91752","91760","92003","92028","92055","92058","92059","92060","92061","92068","92086","92088","92201","92202","92203","92210","92211","92220", 1600 "92223","92225","92230","92234","92235","92236","92240","92241","92248","92253","92254","92255","92258","92260","92261","92262","92263","92264","92270", 1601 "92274","92276","92282","92370","92456","92501","92502","92503","92504","92505","92506","92507","92508","92509","92513","92514","92516","92517","92518", 1602 "92519","92521","92522","92530","92531","92532","92536","92539","92543","92544","92545","92546","92548","92549","92551","92552","92553","92554","92555", 1603 "92556","92557","92561","92562","92563","92564","92567","92570","92571","92572","92581","92582","92583","92584","92585","92586","92587","92589","92590", 1604 "92591","92592","92593","92595","92596","92599","92674","92678","92693","92860","92877","92878","92879","92880","92881","92882","92883" 1605 ], 1606 urls: 1607 { 1608 profile: satruck.siteRoot + '/MyProfile', 1609 home: satruck.siteRoot, 1610 donatelanding: satruck.siteRoot + '/Donate/Index', 1611 donatechoose: satruck.siteRoot + '/Donate/choose', 1612 pickupcreate: satruck.siteRoot + '/Pickup/Create', 1613 pickupconfirm: satruck.siteRoot + '/Pickup/Confirm', 1614 dropoffindex: satruck.siteRoot + '/DropOff/Index', 1615 vehiclecreate: satruck.siteRoot + '/Vehicle/Create', 1616 vehicleconfirm: satruck.siteRoot + '/Vehicle/Confirm',
1617 familystoreindex: satruck.siteRoot + '/ThriftStore/Index', 1618 login: satruck.siteRoot + '/Account/Login', 1619 mypickups: "https://dss.satruck.org/MyPickups", 1620 mydonations: satruck.siteRoot + '/account/donations', 1621 logcarsredirect: satruck.log_api_host + '/Log/CARSRedirect', 1622 covidnotificationsignup: satruck.log_api_host + '/Log/SATruckCovidSignup', 1623 zipmasterprioritypickup: 'https://donor.resupplyapp.com/spec/territory/4', 1624 zipmasterdropitoff: satruck.siteRoot + '/DropOff/Index?zip=' 1625 }, 1626 days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], 1627 messages: 1628 { 1629 corpZipThankYou: 'Thank you. Your donation helps The Salvation Army transform lives each and every day.<br /><br />' 1630 + 'A representative from The Salvation Army will contact you shortly. If you do not receive a call please dial 1-800-SA-TRUCK (1-800-728-7825).' 1631 }, 1632 _persistWorkflowData: function (wip) { 1633 try { 1634 window.localStorage.setItem(satruck.LOCAL_STORAGE_KEY, JSON.stringify(wip)); 1635 satruck.api.SubmitWorkflowData(wip); 1636 } 1637 catch (err) { 1638 DN.Utils.log(err.toString()); 1639 } 1640 }, 1641 1642 _loadWorkflowData: function () { 1643 try { 1644 1645 var wip = $.parseJSON(window.localStorage.getItem(satruck.LOCAL_STORAGE_KEY)); 1646 return wip; 1647 } 1648 catch (err) { 1649 DN.Utils.log(err.toString()); 1650 } 1651 return null; 1652 }, 1653 1654 _persistApiResult: function (endpoint, apiResult) { 1655 try { 1656 window.sessionStorage.setItem(satruck.SESSION_STORAGE_KEY + "_" + endpoint, JSON.stringify(apiResult)); 1657 } 1658 catch (err) { 1659 DN.Utils.log(err.toString()); 1660 } 1661 }, 1662 1663 _getApiResult: function (endpoint) { 1664 try { 1665 var apiResult = $.parseJSON(window.sessionStorage.getItem(satruck.SESSION_STORAGE_KEY + "_" + endpoint)); 1666 return apiResult; 1667 } 1668 catch (err) { 1669 DN.Utils.log(err.toString()); 1670 } 1671 1672 return null; 1673 }, 1674 1675 _checkSession: function () { 1676 var _session = window.sessionStorage; 1677 return _session 1678 && _session.getItem(satruck.USER_SESSION_KEY) 1679 && _session.getItem(satruck.USER_SESSION_KEY) != "undefined" 1680 && _session.getItem(satruck.USER_SESSION_KEY) != "null" 1681 && typeof $.parseJSON(_session.getItem(satruck.USER_SESSION_KEY)).DonorUserId != "undefined" 1682 && $.parseJSON(_session.getItem(satruck.USER_SESSION_KEY)).DonorUserId != null 1683 && $.parseJSON(_session.getItem(satruck.USER_SESSION_KEY)).DonorUserId != 0; 1684 }, 1685 1686 _persistDonorLogin: function (user) { 1687 try { 1688 window.sessionStorage.setItem(satruck.USER_SESSION_KEY, JSON.stringify(user)); 1689 satruck.config._setLoginToken("LoggedInUser", user.DonorUserId, 7); 1690 } 1691 catch (err) { 1692 DN.Utils.log(err.toString()); 1693 } 1694 }, 1695 1696 _getDonorLogin: function () { 1697 try { 1698 var user = $.parseJSON(window.sessionStorage.getItem(satruck.USER_SESSION_KEY)); 1699 return user; 1700 } 1701 catch (err) { 1702 DN.Utils.log(err.toString()); 1703 } 1704 1705 return null; 1706 }, 1707 1708 _setLoginToken: function (cname, cvalue, exdays) { 1709 var d = new Date(); 1710 d.setTime(d.getTime() + (3 * 24 * 60 * 60 * 1000)); 1711 var expires = "expires=" + d.toUTCString(); 1712 document.cookie = cname + "=" + cvalue + "; " + expires; 1713 }, 1714 1715 _expireLoginToken: function (cname) { 1716 document.cookie = cname + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;'; 1717 }, 1718 1719 _checkLoginToken: function () { 1720 var token = satruck.config._getLoginToken(satruck.USER_TOKEN_KEY); 1721 return token; 1722 }, 1723 1724 _getLoginToken: function (cname) { 1725 var name = cname + "="; 1726 var ca = document.cookie.split(';'); 1727 for (var i = 0; i < ca.length; i++) { 1728 var c = ca[i]; 1729 while (c.charAt(0) == ' ') { c = c.substring(1); } 1730 if (c.indexOf(name) == 0) return c.substring(name.length, c.length); 1731 } 1732 return ""; 1733 }, 1734 1735 _clearCacheOrSignOut: function (signOut) { 1736 var DonorLogin = $.extend({}, satruck.donor.default); 1737 if (!signOut) { 1738 //pull this out to save it 1739 var DonorLogin = this._getDonorLogin(); 1740 } 1741 1742 //wipe it out 1743 window.sessionStorage.clear(); 1744 1745 if (signOut) { 1746 satruck.config._expireLoginToken(DonorLogin.DonorUserId); 1747 } 1748 else { 1749 satruck.config._persistDonorLogin(DonorLogin); 1750 } 1751 }, 1752 1753 _setAjaxDefaults: function () { 1754 $.ajaxSetup( 1755 { 1756 global: true, 1757 timeout: satruck.ajaxTimeout, 1758 cache: false, 1759 dataFilter: function (data, type) { 1760 //modify your data here 1761 if (data && type == 'json' && typeof data === "string") { 1762 try { 1763 //Handle Error Pages - since we're expecting json back, and html page would only be the error page 1764 if (data.slice(0, "<!DOCTYPE html>".length) === "<!DOCTYPE html>") { 1765 data = '{ "success": false, "message": "An Error Occurred" }'; 1766 //document.location = '/Error/Index'; 1767 } 1768 else if (data.indexOf("relogin") > -1) { 1769 var tempdata = $.parseJSON(data); 1770 if (tempdata.success && tempdata.relogin == true) { 1771 data = '{ "success": false, "message": "Logging out..." }'; 1772 document.location = '/Account/LogOn'; 1773 } 1774 } 1775 } 1776 catch (err) { 1777 data = '{ "success": false, "message": "JSON could not be parsed" }'; 1778 1779 throw err; //this should be handled by window.onerror 1780 } 1781 } 1782 1783 return data; 1784 } 1785 }); 1786 }, 1787 1788 _initErrorHandling: function () { 1789 if (DN.Utils.IELessThanEqual(8)) { 1790 //Should we do anything here? 1791 } 1792 else { 1793 window.satruck.JSLog = new ErrorHandler( 1794 { 1795 ajaxErrorCallback: function (xhr, status) { 1796 1797 1798 //We can eventually add specific handlers for various workflows 1799 }, 1800 windowErrorCallback: function (message, url, line, column, error) { 1801 1802 1803 //We can eventually add specific handlers for various workflows 1804 } 1805 }); 1806 } 1807 }, 1808 1809 _registerLayoutControls: function () { 1810 $('#amount_form,#amount_form2').submit(function (e) { 1811 e = e || window.event; 1812 e.stopPropagation(); 1813 e.preventDefault(); 1814 1815 var params = ''; 1816 $.each($(this).serializeArray(), function (i, p) { 1817 params += (params == '' ? '?' : '&') + p.name + '=' + p.value; 1818 }); 1819 1820 window.location.assign($(this).attr('action') + params); 1821 }); 1822 1823 if ($('.workflow-layout').length > 0) { 1824 // debulked onresize handler 1825 function on_resize(c, t) { onresize = function () { clearTimeout(t); t = setTimeout(c, 100) }; return c }; 1826 1827 on_resize(function () { 1828 var width = $(window).width(); 1829 satruck.controller.headerBreadCrumbs(width); 1830 })(); 1831 1832 $(window).scroll(function () { 1833 satruck.controller.positionNav(); 1834 }); 1835 1836 1837 } 1838 else { 1839 $('.back-to-home').addClass('hidden'); 1840 // Only show the sticky nav stuff if the nav is visible on the page. 1841 $(window).scroll(function () { 1842 satruck.controller.positionNav(); 1843 }); 1844 1845 satruck.controller.positionNav(); 1846 } 1847 $('.navbar-header').click(function (e) { 1848 var $this = $(this); 1849 var $collapse = $this.next('.navbar-collapse'); 1850 1851 if ($collapse.hasClass('in')) { 1852 $this.removeClass('open'); 1853 } 1854 else { 1855 $this.addClass('open'); 1856 } 1857 }); 1858 $('#menu-right-toggle').click(function () { 1859 var $this = $(this); 1860 var $collapse = $('.navbar-right-collapse'); 1861 1862 if ($collapse.hasClass('in')) { 1863 $this.removeClass('open'); 1864 } 1865 else { 1866 $this.addClass('open'); 1867 } 1868 }); 1869 1870 $('.dropdown').on('mouseenter mouseleave click tap', function () { 1871 $(this).toggleClass("open"); 1872 }); 1873 1874 $('#btn-search').click(function () { 1875 satruck.controller.search($('#txt-search').val()); 1876 }); 1877 $('#txt-search').keydown(function (e) { 1878 if (e.keyCode == 13) { 1879 satruck.controller.search($(this).val()); 1880 } 1881 }); 1882 1883 $('#btn-reset-password-update').click(function () { 1884 var password = { 1885 newpw: $.trim($('#new-password').val()), 1886 confirmpw: $.trim($('#confirm-password').val()) 1887 }; 1888 if (satruck.controller.profile.validateChangePassword(password, false)) { 1889 satruck.controller.profile.changePassword(password, $('#btn-reset-password-update').val(), function (apiResult) { 1890 if (apiResult && apiResult.Success == true) { 1891 if (apiResult.RetVal.Success) { 1892 $('#change-password-dialog').remove(); 1893 //DN.Utils.ShowMessage("Your password has been changed", "Success"); 1894 DN.Utils.ShowCustomConfirm('Your password has been changed.', 1895 "Success", 1896 [{ 1897 text: 'Ok', 1898 click: function () { 1899 $(this).dialog("destroy"); 1900 window.location = satruck.config.urls.home; 1901 }, 1902 'class': 'btn btn-default dialog-confirm' 1903 }] 1904 ); 1905 } 1906 else { 1907 DN.Utils.ShowMessage(apiResult.RetVal.Message, "Warning"); 1908 } 1909 } 1910 else { 1911 DN.Utils.ShowError(apiResult.ErrorMessage); 1912 } 1913 }); 1914 } 1915 }); 1916 1917 $('#btn-unsubscribe').click(function () { 1918 satruck.account._unsubscribeEmail($('#btn-unsubscribe').val(), true); 1919 }); 1920 1921 $('#btn-location-search').click(function () { 1922 //satruck.controller.locationSearch($('#txt-location-search').val()); 1923 var zip = null; 1924 var zip = $('#txt-location-search').val(); 1925 satruck.controller.start_giving(0, zip, false); 1926 $('body').addClass('loading'); 1927 }); 1928 $('#txt-location-search').keydown(function (e) { 1929 if (e.keyCode == 13) { 1930 //satruck.controller.locationSearch($(this).val()); 1931 var zip = null; 1932 var zip = $('#txt-location-search').val(); 1933 satruck.controller.start_giving(0, zip, false); 1934 $('body').addClass('loading'); 1935 } 1936 }); 1937 1938 var $donateDivInactive = $('.donateBtn.inactive'), 1939 $donateBtnInactive = $('.donateBtn.inactive .btn'), 1940 $donateBtn = $('.donateBtn .btn'), 1941 donateMenuSelector = '.donateMenu', 1942 donateOptionsSelector = $('.donateOptions'), 1943 donateCloseBtnSelector = $('.donateBtn .close'), 1944 $donateInput = $('#amount'); 1945 1946 $donateInput.keyup(function (event) { 1947 if (event.keyCode == 13) { 1948 $('#amount_form').submit(); 1949 } 1950 }); 1951 1952 $donateDivInactive.hover(function () { 1953 $(this).find(donateMenuSelector).transition({ y: '218px' }); 1954 }, 1955 function () { 1956 $(this).find(donateMenuSelector).transition({ y: '-218px' }); 1957 }); 1958 1959 $donateBtnInactive.click(function () { 1960 //Tealium 1961 utag_view = utag_data; 1962 utag_view.event_name = "Donate"; 1963 utag_view.link_text = "Donate"; 1964 utag_view.event_type = "donate_header"; 1965 utag_view.page_name = "ARC | modal:donate" 1966 utag_view.site_section = "Homepage"; 1967 utag_view.site_type = "ARC"; 1968 if (typeof utag != 'undefined' && utag != null) { 1969 utag.view(utag_view); 1970 } 1971 1972 $(this).parent('.donateBtn').find(donateMenuSelector).transition({ y: '-218px' }); 1973 $(this).parent('.donateBtn').find(donateOptionsSelector).transition({ y: '218px' }); 1974 $(this).parent('.donateBtn').find(donateCloseBtnSelector).css('display', 'block').transition({ opacity: 100 }); 1975 $(this).parent('.donateBtn').removeClass('inactive').addClass('active'); 1976 }); 1977 1978 $(donateCloseBtnSelector).click(function () { 1979 $(this).parent('.donateBtn').find(donateOptionsSelector).transition({ y: '-218px' }); 1980 $(this).css('display', 'none').transition({ opacity: 0 }); 1981 $(this).parent('.donateBtn').removeClass('active').addClass('inactive'); 1982 }); 1983 1984 $('#q_btn_1, .q_btn_1').click(function () { 1985 //Tealium 1986 utag_view = utag_data; 1987 utag_view.event_name = "Donate"; 1988 utag_view.link_text = "Header: Donate Goods Button"; 1989 utag_view.event_type = "donate_goods"; 1990 utag_view.page_name = "ARC | modal:donate" 1991 utag_view.site_section = "Homepage"; 1992 utag_view.site_type = "ARC"; 1993 if (typeof utag != 'undefined' && utag != null) { 1994 utag.view(utag_view); 1995 } 1996 1997 if (!$(this).parents('form').first().find('#national_query').val()) { 1998 var url = satruck.siteRoot == "" ? "/" : satruck.siteRoot; 1999 $(location).attr('href', url); 2000 } 2001 else { 2002 //$(this).parents('form').first().submit(); 2003 var el = $(this).parents('form').first().find('#national_query'); 2004 satruck.controller._validatePickup(el); 2005 } 2006 }); 2007 2008 $('.q_btn_2').click(function () { 2009 //Tealium 2010 utag_view = utag_data; 2011 utag_view.amount = $('#amount').val(); 2012 utag_view.event_name = "Donate"; 2013 utag_view.link_text = "Header: Donate $$ Button"; 2014 utag_view.event_type = "donate_give_now"; 2015 utag_view.page_name = "ARC | modal:donate" 2016 utag_view.site_section = "Homepage"; 2017 utag_view.site_type = "ARC"; 2018 if (typeof utag != 'undefined' && utag != null) { 2019 utag.view(utag_view); 2020 } 2021 2022 $(this).parents('form').first().submit(); 2023 }); 2024 2025 $('.how-did-you-hear, .other-option').on('click', 'a:not(.how-did-you-hear li.referred-other > a)', function (e) { 2026 e.preventDefault(); 2027 $('.how-did-you-hear').removeClass('required'); 2028 $('.required-text').remove(); 2029 var $clicked = $(this); 2030 var wip = satruck.config._loadWorkflowData(); 2031 var donor = typeof wip.donation.donor === 'undefined' ? { Territory_id: 0, Arc_id: 0, Donor_id: 0 } : wip.donation.donor; 2032 var today = new Date(); 2033 var UTC_TIMESTAMP = today.toUTCString(); 2034 2035 $clicked.addClass('spinner'); 2036 2037 var donorInfo = satruck.account._loadUser(); 2038 if (wip.donation.did == 0 || donor.Territory_id == 0 || donor.Arc_id == 0) { 2039 donor.Territory_id = wip.donation.tid; 2040 donor.Arc_id = wip.donation.aid; 2041 donor.Donor_id = donorInfo.Donor_id; 2042 } 2043 2044 var tid = donor.Territory_id != 0 ? donor.Territory_id : wip.donation.tid; 2045 var aid = donor.Arc_id != 0 ? donor.Arc_id : wip.donation.aid; 2046 var did = donor.Donor_id != 0 ? donor.Donor_id : null; 2047 2048 $('.how-did-you-hear a').not($clicked).each(function () { 2049 $(this).addClass('hidden'); 2050 }); 2051 2052 if ($clicked.hasClass('btn')) { 2053 var response = $(this).parent('div').prev('a').data('referrer'); 2054 var otherResponse = $('.how-did-you-hear-other').val(); 2055 } else { 2056 var response = $(this).data('referrer'); 2057 var otherResponse = null; 2058 } 2059 2060 satruck.api.InitialCustomerLead(tid, aid, did, response, otherResponse, UTC_TIMESTAMP, function (apiResult) { 2061 if (apiResult && apiResult.Success == true) { 2062 // apiResult.RetVal should = id of new row. Persist it in wip object so that we can update it if user completes PO 2063 var wip = satruck.config._loadWorkflowData(); 2064 wip.leadTracking = { 2065 initialRowId: apiResult.RetVal,
2066 response: response, 2067 otherResponse: otherResponse, 2068 timeStamp: UTC_TIMESTAMP 2069 }; 2070 satruck.config._persistWorkflowData(wip); 2071 2072 $clicked.addClass('hidden'); 2073 $('.how-did-you-hear-error, .how-did-you-hear-other').addClass('hidden'); 2074 $('<p class="how-did-you-hear-thanks">Thank you!</p>').appendTo('.how-did-you-hear'); 2075 } 2076 else { 2077 if ($('.how-did-you-hear-error').length <= 0) { 2078 $('<p class="how-did-you-hear-error">Sorry, there was a problem. Please try again!</p>').appendTo('.how-did-you-hear'); 2079 } 2080 2081 $clicked.removeClass('spinner'); 2082 $('.how-did-you-hear a').removeClass('hidden'); 2083 } 2084 }); 2085 }); 2086 2087 $('.how-did-you-hear').on('click', 'li.referred-other > a', function (e) { 2088 e.preventDefault(); 2089 $('.how-did-you-hear').removeClass('required'); 2090 $('.required-text').remove(); 2091 $('.how-did-you-hear').toggleClass('other'); 2092 }); 2093 2094 $(document).on('click', '.opened .contact-dialog-open, .ui-dialog .contact-dialog-open', function (e) { 2095 e.preventDefault(); 2096 $("#request-password-dialog").dialog("destroy"); 2097 $('.contact-dialog').trigger('click'); 2098 $('.form-faq-link').last().trigger('click') 2099 }); 2100 }, 2101 2102 _getSourceType: function () { 2103 return satruck.config.isfsa ? 2 : (satruck.config.ismobile ? 1 : 0); 2104 }, 2105 2106 setMobile: function () { 2107 if ($(window).width() < 751) { 2108 satruck.config.ismobile = true; 2109 } 2110 else { 2111 satruck.config.ismobile = false; 2112 } 2113 } 2114}; 2115 2116satruck.controller = 2117{ 2118 _registerWorkflowControls: function () { 2119 $(".donate-start").click(function (e) { 2120 e.preventDefault(); 2121 2122 var type = $(this).data("donatetype"); 2123 2124 if (e.currentTarget.id == 'dropOffZip' && $(e.currentTarget).data('donatetype') == 0) { 2125 var wip = satruck.config._loadWorkflowData(); 2126 if (wip) { 2127 $("#dropOffZip").val(wip.zip); 2128 } 2129 } 2130 satruck.controller._validateStart(type, satruck.config.ismobile); 2131 }); 2132 2133 $(".zipfield-donate-start").keydown(function (e) { 2134 2135 if (e.keyCode == 13) { 2136 var type = $(this).data("donatetype"); 2137 satruck.controller._validateStart(type, satruck.config.ismobile); 2138 } 2139 }); 2140 2141 $(".donate-choose").click(function () { 2142 satruck.controller._validateChoose(); 2143 }); 2144 2145 $(".zipfield-donate-choose").keydown(function (e) { 2146 if (e.keyCode == 13) { 2147 satruck.controller._validateChoose(); 2148 } 2149 }); 2150 2151 $(".find-location").click(function () { 2152 satruck.controller._validateFind(); 2153 }); 2154 2155 $(".zipfield-find-location").keydown(function (e) { 2156 if (e.keyCode == 13) { 2157 satruck.controller._validateFind(); 2158 } 2159 }); 2160 2161 $(".find-familystore").click(function () { 2162 satruck.controller._validateFamilyStore(); 2163 }); 2164 2165 $(".zipfield-find-familystore").keydown(function (e) { 2166 if (e.keyCode == 13) { 2167 satruck.controller._validateFamilyStore(); 2168 } 2169 }); 2170 2171 $(".pickup-start").click(function () { 2172 satruck.controller._validatePickup(); 2173 }); 2174 2175 $(".zipfield-pickup-start").keydown(function (e) { 2176 if (e.keyCode == 13) { 2177 satruck.controller._validatePickup(); 2178 } 2179 }); 2180 2181 $(".vehicle-start").click(function () { 2182 satruck.controller._validateVehicle(); 2183 }); 2184 2185 $(".zipfield-vehicle-start").keydown(function (e) { 2186 if (e.keyCode == 13) { 2187 satruck.controller._validateVehicle(); 2188 } 2189 }); 2190 2191 $(".donation-entry-point").on("focus", '.zipfield.start.validate', function () { 2192 var $parent = $(this).closest(".form-group"); 2193 $parent.removeClass("has-error has-warning has-feedback has-success"); 2194 DN.Validation.HideError($parent); 2195 }); 2196 2197 $('.mobile-donate-toggle').click(function () { 2198 $('.mobile-donate-toggle').removeClass('active'); 2199 $(this).addClass('active'); 2200 2201 var donatetype = $(this).data('donatetype'); 2202 2203 $('#pickup_initial').addClass("hidden") 2204 $('#pickup_only').addClass("hidden"); 2205 $('#dropoff_only').addClass("hidden"); 2206 2207 if (donatetype == satruck.config.lookup.PickupType) { 2208 $('#pickup_initial').removeClass("hidden") 2209 $('#pickup_only').removeClass("hidden"); 2210 $('.bread-crumbs').show(); 2211 2212 //Tealium 2213 utag_view = utag_data; 2214 utag_view.page_name = "ARC | schedule pickup:select items" 2215 utag_view.site_section = "Schedule Pickup"; 2216 utag_view.site_type = "ARC"; 2217 if (typeof utag != 'undefined' && utag != null) { 2218 utag.view(utag_view); 2219 } 2220 } 2221 else if (donatetype == satruck.config.lookup.DropoffType) { 2222 $('#dropoff_only').removeClass("hidden"); 2223 $('.bread-crumbs').hide(); 2224 setTimeout(function () { 2225 if (satruck.controller.dropoff.mapLocations.length > 0) { 2226 var viewRect = new Microsoft.Maps.LocationRect.fromLocations(satruck.controller.dropoff.mapLocations);
2227 satruck.controller.dropoff.map.setView({ bounds: viewRect }); 2228 } 2229 }, 1000); 2230 2231 //Tealium 2232 var tealWip = satruck.config._loadWorkflowData(); 2233 utag_view = utag_data; 2234 utag_view.page_name = "ARC | find drop off location" 2235 utag_view.site_section = "Schedule Pickup"; 2236 utag_view.site_type = "ARC"; 2237 utag_view.loc_search_term = tealWip.zip; 2238 utag_view.loc_search_results = satruck.controller.dropoff.mapLocations.length; 2239 if (typeof utag != 'undefined' && utag != null) { 2240 utag.view(utag_view); 2241 } 2242 } 2243 }); 2244 2245 $('.pickup-forgot-password').on('click', function () { 2246 satruck.controller.profile.openForgotPasswordDialog(); 2247 }); 2248 2249 $.ui.dialog.prototype.options.autoReposition = true; 2250 $(window).resize(function () { 2251 $(".ui-dialog-content:visible").each(function () { 2252 if ($(this).dialog('option', 'autoReposition')) { 2253 $(this).dialog('option', 'position', $(this).dialog('option', 'position')); 2254 } 2255 }); 2256 }); 2257 2258 $("#contact-dialog").dialog( 2259 { 2260 autoOpen: false, 2261 closeOnEscape: true, 2262 autoReposition: true, 2263 open: function () { 2264 $(".contactDialog .ui-dialog-titlebar").css({ 2265 "background-color": "transparent", 2266 "border": "0px none" 2267 }); 2268 2269 $('.ui-widget-overlay').on('click', function () { 2270 $("#contact-dialog").dialog('close'); 2271 }) 2272 2273 $("body, html").css({ overflow: 'hidden' }) 2274 }, 2275 close: function () { 2276 $eventTime = new Date(); 2277 $action = satruck.config.formAction.ClosedDialog; 2278 var l = new satruck.controller.get_faq_data($('#contact-dialog'));
2279 satruck.api.LogContactAction($eventTime, $action, null, null, l.tid, l.aid, l.uid); 2280 2281 $("body, html").css({ overflow: 'inherit' }) 2282 }, 2283 width: 1200, 2284 height: 820, 2285 modal: true, 2286 dialogClass: 'contactDialog', 2287 my: 'center', 2288 at: 'center', 2289 of: window, 2290 collision: 'fit', 2291 draggable: false, 2292 resizable: false 2293 }); 2294 2295 $("#contact-dialog-simple").dialog( 2296 { 2297 autoOpen: false, 2298 closeOnEscape: true, 2299 autoReposition: true, 2300 open: function () { 2301 $(".contactDialog .ui-dialog-titlebar").css({ 2302 "background-color": "transparent", 2303 "border": "0px none" 2304 }); 2305 2306 $('.ui-widget-overlay').on('click', function () { 2307 $("#contact-dialog-simple").dialog('close'); 2308 }) 2309 2310 $("body, html").css({ overflow: 'hidden' }) 2311 }, 2312 close: function () { 2313 $("body, html").css({ overflow: 'inherit' }) 2314 }, 2315 height: 460, 2316 width: 660, 2317 modal: true, 2318 my: 'center', 2319 at: 'center', 2320 of: window, 2321 collision: 'fit', 2322 draggable: false, 2323 resizable: false, 2324 buttons: 2325 [{ 2326 text: "Cancel", 2327 click: function () { 2328 $(".ui-dialog-content").dialog("close"); 2329 }, 2330 'class': 'btn btn-default dialog-cancel' 2331 }, 2332 { 2333 text: "Submit", 2334 click: function () { 2335 2336 var $parent = $('.contact-form-simple'), 2337 $locationId = $parent.find('#location-id').val(), 2338 $locationTerritoryId = $parent.find('#location-territory').val(), 2339 $locationZip = $parent.find('#location-zip').val(), 2340 $locationName = $parent.find('#location-name').val(), 2341 $locationEmail = $parent.find('#location-email').val(), 2342 $id = $parent.find('#contact-id').val(), 2343 $name = $parent.find('#contact-name').val(), 2344 $email = $parent.find('#contact-email').val(), 2345 $zip = $parent.find('#contact-zip').val(), 2346 $shortZip = $zip.slice(0, 5), 2347 $reason = $parent.find('#contact-reason option:selected').val(), 2348 $reasonName = $parent.find('#contact-reason option:selected').html(), 2349 $phone = $parent.find('#contact-phone').val(), 2350 $message = $parent.find('#contact-message').val(); 2351 2352 function submitForm() { 2353 //Validate zip format 2354 if (DN.Validation.isValidZip($zip)) { 2355 $('.contact-submit').addClass('spinner'); 2356 satruck.api.ContactSubmit($id, $name, $email, $locationEmail, null, $zip, $message, $reason, $reasonName, $phone, $locationTerritoryId, $locationId, $locationZip, $locationName, function (apiResult) { 2357 if (apiResult && apiResult.Success == true) { 2358 $('.contact-form-simple').html('<h3 class="text-center">Thank you for your message. <br />We will get back to you shortly.</h3>'); 2359 $('.contact-submit').addClass('hidden'); 2360 $('.dialog-cancel .ui-button-text').text('Close'); 2361 2362 //Tealium 2363 utag_view = utag_data; 2364 utag_view.event_type = "modal_contact_complete"; 2365 utag_view.page_name = "ARC | contact us form:complete" 2366 utag_view.site_section = "Contact"; 2367 utag_view.site_type = "ARC"; 2368 if (typeof utag != 'undefined' && utag != null) { 2369 utag.view(utag_view); 2370 } 2371 } 2372 else { 2373 $('.contact-submit').removeClass('spinner'); 2374 $('.contact-form-simple').html('<h3 class="text-center">Sorry, your message did not go through. Please feel free to try again!</h3>'); 2375 $('.contact-submit').one('click', function () { 2376 $('.contact-form').html($original); 2377 $('.contact-submit .ui-button-text').text('Submit'); 2378 }); 2379 } 2380 }); 2381 } 2382 else { 2383 var $parentDiv = $('#contact-zip').parent('div'); 2384 var $helpText = $('#contact-zip').next('small'); 2385 DN.Validation.ShowError($parentDiv, $helpText); 2386 2387 $('.contact-submit').removeClass('spinner'); 2388 } 2389 } 2390 2391 DN.Validation.fieldHasData($parent, submitForm); 2392 }, 2393 'class': 'btn btn-default contact-submit' 2394 }] 2395 }); 2396 2397 var $original = $('.contact-dialog').html(); 2398 2399 $('.contact-dialog').on('click', function (e) { 2400 var tid = null; 2401 var aid = null; 2402 var uid = null; 2403 if (satruck.account.is_logged_in()) { 2404 var donor = satruck.config._getDonorLogin(); 2405 tid = donor.Territory_id; 2406 aid = donor.Arc_id; 2407 uid = donor.Donor_id; 2408 } 2409 else { 2410 var wip = satruck.config._loadWorkflowData(); 2411 tid = wip.tid; 2412 } 2413 2414 $eventTime = new Date(); 2415 $action = satruck.config.formAction.FooterLink; 2416 satruck.api.LogContactAction($eventTime, $action, null, null, tid, aid, uid); 2417 2418 e.preventDefault(); 2419 $('.contact-submit').removeClass('hidden spinner'); 2420 $('.contact-dialog').html($original); 2421 $("#contact-dialog") 2422 .data('tid', tid) 2423 .data('aid', aid) 2424 .data('uid', uid) 2425 .dialog("open"); 2426 2427 var $form = $('#contact-dialog'); 2428 if ($(this).hasClass('location-contact')) { 2429 var locID = $(this).attr('id'); 2430 var locInfo = locations[locID]; 2431 $form.find('#location-territory').val(locInfo.TerritoryId); 2432 $form.find('#location-zip').val(locInfo.Zip); 2433 $form.find('#location-id').val(locInfo.Id); 2434 $form.find('#location-email').val(locInfo.ContactEmail); 2435 $form.find('#location-name').val(locInfo.Name); 2436 } 2437 else { 2438 $form.find('#location-territory').val(""); 2439 $form.find('#location-zip').val(""); 2440 $form.find('#location-id').val(""); 2441 $form.find('#location-email').val(""); 2442 $form.find('#location-name').val(""); 2443 } 2444 2445 if (satruck.account.is_logged_in()) { 2446 var donor = satruck.account._loadUser(); 2447 $form.find('#contact-id').val(donor.Donor_id); 2448 $form.find('#contact-name').val(donor.FirstName + ' ' + donor.LastName); 2449 $form.find('#contact-zip').val(donor.ZipCode); 2450 $form.find('#contact-email').val(donor.Email); 2451 $form.find('#contact-phone').val(DN.Validation.formatPhone(donor.HomePhone)); 2452 2453 } 2454 //Tealium 2455 utag_view = utag_data; 2456 utag_view.event_type = "modal_contact_create"; 2457 utag_view.page_name = "ARC | contact us form:start" 2458 utag_view.site_section = "Contact"; 2459 utag_view.site_type = "ARC"; 2460 if (typeof utag != 'undefined' && utag != null) { 2461 utag.view(utag_view); 2462 } 2463 2464 satruck.controller.material_design_functionality(); 2465 }); 2466 2467 $('.header-contact-dialog').on('click', function (e) { 2468 var tid = null; 2469 var aid = null; 2470 var uid = null; 2471 if (satruck.account.is_logged_in()) { 2472 var donor = satruck.config._getDonorLogin(); 2473 tid = donor.Territory_id; 2474 aid = donor.Arc_id; 2475 uid = donor.Donor_id; 2476 } 2477 else { 2478 var wip = satruck.config._loadWorkflowData(); 2479 if (wip != null) { 2480 tid = wip.tid; 2481 } 2482 } 2483 $eventTime = new Date(); 2484 $action = satruck.config.formAction.HeaderLink; 2485 satruck.api.LogContactAction($eventTime, $action, null, null, tid, aid, uid); 2486 2487 e.preventDefault(); 2488 $('.contact-submit').removeClass('hidden spinner'); 2489 $('.contact-dialog').html($original); 2490 $("#contact-dialog") 2491 .data('tid', tid) 2492 .data('aid', aid) 2493 .data('uid', uid) 2494 .dialog("open"); 2495 2496 var $form = $('#contact-dialog'); 2497 if ($(this).hasClass('location-contact')) { 2498 var locID = $(this).attr('id'); 2499 var locInfo = locations[locID]; 2500 $form.find('#location-territory').val(locInfo.TerritoryId); 2501 $form.find('#location-zip').val(locInfo.Zip); 2502 $form.find('#location-id').val(locInfo.Id); 2503 $form.find('#location-email').val(locInfo.ContactEmail); 2504 $form.find('#location-name').val(locInfo.Name); 2505 } 2506 else { 2507 $form.find('#location-territory').val(""); 2508 $form.find('#location-zip').val(""); 2509 $form.find('#location-id').val(""); 2510 $form.find('#location-email').val(""); 2511 $form.find('#location-name').val(""); 2512 } 2513 2514 if (satruck.account.is_logged_in()) { 2515 var donor = satruck.account._loadUser(); 2516 $form.find('#contact-id').val(donor.Donor_id); 2517 $form.find('#contact-name').val(donor.FirstName + ' ' + donor.LastName); 2518 $form.find('#contact-zip').val(donor.ZipCode); 2519 $form.find('#contact-email').val(donor.Email); 2520 $form.find('#contact-phone').val(DN.Validation.formatPhone(donor.HomePhone)); 2521 } 2522 //Tealium 2523 utag_view = utag_data; 2524 utag_view.event_type = "modal_contact_create"; 2525 utag_view.page_name = "ARC | contact us form:start" 2526 utag_view.site_section = "Contact"; 2527 utag_view.site_type = "ARC"; 2528 if (typeof utag != 'undefined' && utag != null) { 2529 utag.view(utag_view); 2530 } 2531 2532 satruck.controller.material_design_functionality(); 2533 }); 2534 2535 if (location.href.indexOf("?contact=1") > -1) { 2536 $('.contact-dialog').trigger('click'); 2537 } 2538 2539 this.covid_notification_functionality(); 2540 }, 2541 2542 _validateChoose: function () { 2543 var $ctl = $('#pickupOrDropoffZip'); 2544 if (satruck.config.ismobile) { $ctl = $('#mobilePickupOrDropoffZip'); } 2545 var zip = $ctl.val(); 2546 2547 //validate 2548 if (!DN.Validation.isValidZip(zip)) { 2549 $ctl.closest(".form-group").addClass("has-error has-feedback"); 2550 DN.Utils.ShowError("Please enter a valid zip code to start the donation process."); 2551 $("#pickup_or_dropoff").hide(); 2552 $("#pickup_only").hide(); 2553 } 2554 else { 2555 $('body').addClass('loading'); 2556 $("#pickupOrDropoffZip, #mobilePickupOrDropoffZip, #pickupZip").val(zip); 2557 var d = 2558 { 2559 zip: zip, 2560 isvalid: true 2561 }; 2562 /*if (satruck.config.ismobile == true) 2563 { 2564 $(".step1").show() 2565 $('.workflow-layout').hide(); 2566 $('.donation-entry-point').addClass('hidden'); 2567 //satruck.controller.pickupBegin(d); 2568 satruck.controller.choose_giving(zip); 2569 $('.donation-entry-point').addClass('hidden'); 2570 } 2571 else 2572 { 2573 satruck.controller.choose_giving(zip); 2574 }*/ 2575 satruck.controller.pickupBegin(d); 2576 //Moved to end of pickupBegin. Was not being called on Mobile 2577 //satruck.controller.choose_giving(zip); 2578 } 2579 }, 2580 2581 _validateFind: function () { 2582 var $ctl = $("input[name='dropOffZip']:visible"); 2583 if (satruck.config.ismobile) { $ctl = $("input[name='mobileDropOffZip']:visible"); } 2584 var zip = $ctl.val(); 2585 2586 //validate 2587 if (!DN.Validation.isValidZip(zip)) { 2588 $ctl.closest(".form-group").addClass("has-error has-feedback"); 2589 DN.Utils.ShowError("Please enter a valid zip code to start the donation process."); 2590 } 2591 else { 2592 satruck.controller.start_dropoff(zip); 2593 } 2594 }, 2595 2596 _validateFamilyStore: function () { 2597 var $ctl = $("input[name='familyStoreZip']:visible"); 2598 var $ctl2 = $('#txtotid'); 2599 if (satruck.config.ismobile) { $ctl = $("input[name='mobileFamilyStoreZip']:visible"); } 2600 var zip = $ctl.val(); 2601 var otid = $ctl2.val(); 2602 2603 //validate 2604 if (!DN.Validation.isValidZip(zip)) { 2605 $ctl.closest(".form-group").addClass("has-error has-feedback"); 2606 DN.Utils.ShowError("Please enter a valid zip code to find a thrift store."); 2607 } 2608 else { 2609 satruck.controller.start_familyStore(zip, otid); 2610 } 2611 }, 2612 2613 _validatePickup: function (el) { 2614 if (!el || el == null) { 2615 var $ctl = $('#pickupZip'); 2616 } else { 2617 $ctl = el; 2618 } 2619 2620 if (satruck.config.ismobile) { $ctl = $('#mobilePickupZip'); } 2621 var zip = $ctl.val(); 2622 2623 //validate 2624 if (!DN.Validation.isValidZip(zip)) { 2625 $ctl.closest(".form-group").addClass("has-error has-feedback"); 2626 DN.Utils.ShowError("Please enter a valid zip code to start the donation process."); 2627 } 2628 else { 2629 satruck.controller.start_giving(satruck.config.lookup.PickupType, zip, satruck.config.ismobile); 2630 } 2631 }, 2632 2633 _validateVehicle: function () { 2634 var $ctl = $('#vehicleZip'); 2635 if (satruck.config.ismobile) { $ctl = $('#mobileVehicleZip'); } 2636 var zip = $ctl.val(); 2637 //validate 2638 if (satruck.account.is_partner_profile()) { 2639 DN.Utils.ShowError("We apologize, but partners cannot donate vehicles."); 2640 } 2641 else { 2642 if (!DN.Validation.isValidZip(zip)) { 2643 $ctl.closest(".form-group").addClass("has-error has-feedback"); 2644 DN.Utils.ShowError("Please enter a valid zip code to start the donation process."); 2645 } 2646 else { 2647 satruck.controller.start_giving(satruck.config.lookup.VehicleType, zip, false); 2648 } 2649 } 2650 }, 2651 2652 _validateStart: function (type, ismobile) { 2653 var zip = null; 2654 var $ctl = null; 2655 2656 if (type == satruck.config.lookup.DropoffType) { 2657 $ctl = $('#dropOffZip'); 2658 } 2659 else if (type == satruck.config.lookup.PickupType) { 2660 $ctl = $('#pickupZip'); 2661 } 2662 else if (type == satruck.config.lookup.VehicleType) { 2663 $ctl = $('#vehicleZip'); 2664 } 2665 else if (type == satruck.config.lookup.FamilyStoreType) { 2666 $ctl = $('#familyStoreZip'); 2667 } 2668 2669 zip = $ctl.val(); 2670 //if (ismobile) { zip = ""; } 2671 2672 if (satruck.account.is_partner_profile() && type == satruck.config.lookup.VehicleType) { 2673 DN.Utils.ShowError("We apologize, but partners cannot donate vehicles. Please call 1-800-SATruck to schedule this donation."); 2674 } 2675 else { 2676 if (!DN.Validation.isValidZip(zip) && !(ismobile && $.trim(zip) == "")) { 2677 var $parent = $ctl.closest('.form-group'); 2678 var $helpText = $parent.children('small'); 2679 DN.Validation.ShowError($parent, $helpText); 2680 2681 //just to test if logging works 2682 var today = new Date(); 2683 var UTC_TIMESTAMP = today.toUTCString(); 2684 var err = $.extend({}, satruck.workflow.default); 2685 err.id = DN.Utils.CreateUUID(); 2686 err.hasErrors = true; 2687 err.stepDetails = []; 2688 err.stepDetails.push({ step: 0, stepData: "err: invalid zip entry '" + (zip ? zip : "[noinput]") + "'", timestamp: UTC_TIMESTAMP }); 2689 satruck.api.SubmitWorkflowData(err); 2690 } 2691 else { 2692 $('body').addClass('loading'); 2693 debugger 2694 var wip = satruck.config._loadWorkflowData(); 2695 if (satruck.config.reSupplyPickupZipCodeAnaheim.includes(zip) && type == satruck.config.lookup.PickupType) { 2696 window.open('https://migration.salvationarmy.org/anaheim_adult_rehabilitation_center/home-pickup-by-resupply', '_blank'); 2697 } 2698 else if (satruck.config.reSupplyPickupZipCodeBakersfield.includes(zip) && type == satruck.config.lookup.PickupType) { 2699 window.open('https://migration.salvationarmy.org/bakersfield_adult_rehabilitation_center/home-pickup-by-resupply', '_blank'); 2700 } 2701 else if (satruck.config.reSupplyPickupZipCodeCanogaPark.includes(zip) && type == satruck.config.lookup.PickupType) { 2702 window.open('https://migration.salvationarmy.org/canoga_park_adult_rehabilitation_center/home-pickup-by-resupply', '_blank'); 2703 } 2704 else if (satruck.config.reSupplyPickupZipCodeDenver.includes(zip) && type == satruck.config.lookup.PickupType) { 2705 window.open('https://migration.salvationarmy.org/denver_adult_rehabilitation_center/home-pickup-by-resupply', '_blank'); 2706 } 2707 else if (satruck.config.reSupplyPickupZipCodeFresno.includes(zip) && type == satruck.config.lookup.PickupType) { 2708 window.open('https://migration.salvationarmy.org/fresno_adult_rehabilitation_center/home-pickup-by-resupply', '_blank'); 2709 } 2710 else if (satruck.config.reSupplyPickupZipCodeLasVegas.includes(zip) && type == satruck.config.lookup.PickupType) { 2711 window.open('https://migration.salvationarmy.org/las_vegas_adult_rehabilitation_center/home-pickup-by-resupply', '_blank'); 2712 } 2713 else if (satruck.config.reSupplyPickupZipCodeLongBeach.includes(zip) && type == satruck.config.lookup.PickupType) { 2714 window.open('https://migration.salvationarmy.org/long_beach_adult_rehabilitation_center/home-pickup-by-resupply', '_blank'); 2715 } 2716 else if (satruck.config.reSupplyPickupZipCodeOakland.includes(zip) && type == satruck.config.lookup.PickupType) { 2717 window.open('https://migration.salvationarmy.org/oakland_adult_rehabilitation_center/home-pickup-by-resupply', '_blank'); 2718 } 2719 else if (satruck.config.reSupplyPickupZipCodePasadena.includes(zip) && type == satruck.config.lookup.PickupType) { 2720 window.open('https://migration.salvationarmy.org/pasadena_adult_rehabilitation_center/home-pickup-by-resupply', '_blank'); 2721 } 2722 else if (satruck.config.reSupplyPickupZipCodePhoenix.includes(zip) && type == satruck.config.lookup.PickupType) { 2723 window.open('https://migration.salvationarmy.org/phoenix_adult_rehabilitation_center/hom
2723e-pickup-by-resupply', '_blank'); 2724 } 2725 else if (satruck.config.reSupplyPickupZipCodeSanBernardino.includes(zip) && type == satruck.config.lookup.PickupType) { 2726 window.open('https://migration.salvationarmy.org/san_bernardino_adult_rehabilitation_center/home-pickup-by-resupply', '_blank'); 2727 } 2728 else if (satruck.config.reSupplyPickupZipCodeSanDiego.includes(zip) && type == satruck.config.lookup.PickupType) { 2729 window.open('https://migration.salvationarmy.org/san_diego_adult_rehabilitation_center/home-pickup-by-resupply', '_blank'); 2730 } 2731 else if (satruck.config.reSupplyPickupZipCodeSanFrancisco.includes(zip) && type == satruck.config.lookup.PickupType) { 2732 window.open('https://migration.salvationarmy.org/san_francisco_adult_rehabilitation_center/home-pickup-by-resupply', '_blank'); 2733 } 2734 else if (satruck.config.reSupplyPickupZipCodeSanJose.includes(zip) && type == satruck.config.lookup.PickupType) { 2735 window.open('https://migration.salvationarmy.org/san_jose_adult_rehabilitation_center/home-pickup-by-resupply', '_blank'); 2736 } 2737 else if (satruck.config.reSupplyPickupZipCodeStockton.includes(zip) && type == satruck.config.lookup.PickupType) { 2738 window.open('https://migration.salvationarmy.org/stockton_adult_rehabilitation_center/home-pickup-by-resupply', '_blank'); 2739 } 2740 else if (satruck.config.reSupplyPickupZipCodeSantaMonica.includes(zip) && type == satruck.config.lookup.PickupType) { 2741 window.open('https://migration.salvationarmy.org/santa_monica_adult_rehabilitation_center/home-pickup-by-resupply', '_blank'); 2742 } 2743 else if (satruck.config.reSupplyPickupZipCodeRiverside.includes(zip) && type == satruck.config.lookup.PickupType) { 2744 window.open('https://migration.salvationarmy.org/riverside_adult_rehabilitation_center/home-pickup-by-resupply', '_blank'); 2745 } 2746 else { 2747 satruck.controller.start_giving(type, zip, ismobile); 2748 } 2749 $('body').removeClass('loading'); 2750 //satruck.controller.start_giving(type, zip, ismobile); 2751 } 2752 } 2753 }, 2754 2755 _resizeTextArea: function (element) { 2756 element.style.height = "1px"; 2757 element.style.height = (element.scrollHeight + 4) + "px"; 2758 element.closest('.material-input').style.height = element.style.height; 2759 }, 2760 2761 _logFaqClick: function (element, tid, aid, uid) { 2762 $eventTime = new Date(); 2763 $action = satruck.config.formAction.ClickedFAQ; 2764 $id = $(element).attr("data-id"); 2765 $text = $(element).text(); 2766 satruck.api.LogContactAction($eventTime, $action, $id, $text, tid, aid, uid, null); 2767 }, 2768 2769 _getReSupplyPhone(tid, aid) { 2770 var phone = "(857) 371-1603"; 2771 console.log(phone); 2772 console.log(tid); console.log(aid); 2773 2774 if (tid == "30" || tid == 30) { 2775 console.log("yes"); 2776 switch (aid) { 2777 case 110: //Des Moines 2778 phone = "(978) 951-2913"; 2779 break; 2780 case 105: //Chicago 2781 phone = "(601) 436 4409"; 2782 break; 2783 case 115: //Flint 2784 phone = "(505) 622-4247"; 2785 break; 2786 case 120: //Fort Wayne 2787 phone = "(276) 530-8659"; 2788 break; 2789 case 135: //Indianapolis 2790 phone = "(857) 371-1603"; 2791 break; 2792 case 140: //Kansas City 2793 phone = "(540) 405-8617"; 2794 break; 2795 case 150: //Minneapolis 2796 phone = "(864) 397-9939"; 2797 break; 2798 case 160: //River Valley 2799 phone = "(978) 679 7338"; 2800 break; 2801 case 165: //Rockford 2802 phone = "(414) 376 0837"; 2803 break; 2804 case 175: //St. Louis 2805 phone = "(215) 259-5999"; 2806 break; 2807 case 130: //Grand Rapids 2808 phone = "(864) 977-4481"; 2809 break; 2810 case 145: //Milwaukee 2811 phone = "(864) 977-4530"; 2812 break; 2813 case 185: //SEMI 2814 phone = "(864) 721-8786"; 2815 break; 2816 case 195: //Waukegan 2817 phone = "(541) 379-8615"; 2818 break; 2819 2820 } 2821 } 2822 return phone; 2823 }, 2824 2825 //Generic workflow navigation 2826 _next: function (step) { 2827 $(".step").hide(); 2828 $(".step" + (step + 1)).show(); 2829 satruck.controller.setBreadCrumbs((step + 1), 'general'); 2830 }, 2831 _back: function (step) { 2832 $(".step").hide(); 2833 $(".step" + (step - 1)).show(); 2834 satruck.controller.setBreadCrumbs((step - 1), 'general'); 2835 }, 2836 _step: function (crumb) { 2837 if ($(crumb).hasClass("active")) { 2838 var step = $(crumb).data("step"); 2839 $(".step").hide(); 2840 $(".step" + step).show(); 2841 satruck.controller.setBreadCrumbs(step, 'general'); 2842 } 2843 }, 2844 2845 start_dropoff: function (zip) { 2846 var today = new Date(); 2847 var UTC_TIMESTAMP = today.toUTCString(); 2848 var wip = satruck.config._loadWorkflowData(); 2849 2850 if (wip && wip.donation) { 2851 if (wip.donation.warningMessage) { 2852 $("#dropoff-helper").show(); 2853 $("#dropoff-helper-text").html(wip.donation.warningMessage); 2854 } 2855 } 2856 2857 //check for timeout 2858 if (wip && wip.stepDetails && wip.stepDetails.length) { 2859 try { 2860 var lastactivity = wip.stepDetails[wip.stepDetails.length - 1]; 2861 var utc_time = new Date(lastactivity.timestamp); 2862 //longer than 3 days 2863 if (today > utc_time.setTime(utc_time.getTime() + (3 * 24 * 60 * 60 * 1000))) { 2864 wip.hasTimedOut = true; 2865 } 2866 } 2867 catch (err) { 2868 } 2869 } 2870 if (!wip || wip.isComplete || wip.hasTimedOut || wip.hasErrors) { 2871 satruck.config._clearCacheOrSignOut(false); 2872 wip = $.extend({}, satruck.workflow.default); 2873 wip.id = DN.Utils.CreateUUID(); 2874 wip.startedAt = "Dropoff_Index"; 2875 wip.name = "FindDropoff"; 2876 } 2877 wip.donationType = satruck.config.lookup.DropoffType; 2878 wip.currentStep = 0;
2879 wip.dropOutStep = 0; 2880 wip.stepDetails = []; 2881 2882 if (zip) { 2883 wip.stepDetails.push({ step: 0, stepData: zip, timestamp: UTC_TIMESTAMP }); 2884 satruck.config._persistWorkflowData(wip); 2885 2886 //COVID-19 DROPOFF ALERT 2887 satruck.api.GetZipInfo(zip, false, function (apiResult) { 2888 if (apiResult && apiResult.Success == true) { 2889 var zipinfo = apiResult.RetVal; 2890 var zipTid = zipinfo.Territory_id; 2891 var CovidFormActive = false; 2892 if (zipTid == 40) { 2893 $('#dropoff-alert').html( 2894 '<span class="alert-icon">!</span>' 2895 + 'MOST DONATION DROP OFF AND RETAIL STORES ARE OPEN. CHECK YOUR LOCAL LISTINGS BELOW.<br/><br/>' 2896 + 'VEHICLE DONATIONS ARE GRATEFULLY ACCEPTED' 2897 ).css("display", "block"); 2898 2899 $("#show-hours").show(); 2900 2901 var chatActive = $('#chatActive').val() == "True"; 2902 2903 if (chatActive) { 2904 var chatPoc = $('#chatPoc').val(); 2905 icPatronChat.init({ serverHost: 'https://home-c12.incontact.com', bus_no: 4594957, poc: chatPoc, params: ['FirstName', 'Last Name', '[email protected]', 555 - 555 - 5555] }); 2906 } 2907 } 2908 2909 //show processing icon 2910 satruck.api.GetLocationListing(zip, function (apiResult) { 2911 today = new Date(); 2912 UTC_TIMESTAMP = today.toUTCString(); 2913 2914 var wip = satruck.config._loadWorkflowData(); 2915 2916 wip.donation = $.extend({}, satruck.dropoffticket.default); 2917 wip.locationcount = apiResult.RetVal.ResultsCount; 2918 //Tealium 2919 utag_data.loc_search_results = wip.locationcount; 2920 wip.stepDetails.push({ step: 0, stepData: "zip:" + zip, timestamp: UTC_TIMESTAMP }); 2921 wip.stepDetails.push({ step: 0, stepData: "locCount:" + apiResult.RetVal.ResultsCount, timestamp: UTC_TIMESTAMP }); 2922 2923 if (apiResult && apiResult.Success == true && apiResult.RetVal.ResultsCount > 0) { 2924 wip.currentStep = 1; 2925 wip.dropOutStep = 2; 2926 wip.stepDetails.push({ step: 1, stepData: "begin location selection", timestamp: UTC_TIMESTAMP }); 2927 satruck.config._persistWorkflowData(wip); 2928 2929 satruck.controller.setBreadCrumbs(1, 'dropoff'); 2930 $(".step").hide(); 2931 2932 if (zipTid != 10 || !CovidFormActive || (CovidFormActive && !zipinfo.NotServiced)) { 2933 $(".dropoff-steps").show(); 2934 $(".step1").show(); 2935 } 2936 2937 //Hide Drop-Off Referral div if there is no warning message 2938 if (!wip.donation.warningMessage) { 2939 $('.donation-entry-point').addClass('hidden'); 2940 $('.body-content1').addClass('hidden'); 2941 $(".pre-search").addClass('hidden'); 2942 } 2943 2944 $("#no-matches-alert").hide(); 2945 satruck.controller.dropoff.loadMap(apiResult); 2946 } 2947 else { 2948 wip.hasErrors = true; 2949 wip.stepDetails.push({ step: 0, stepData: "no locations found", timestamp: UTC_TIMESTAMP }); 2950 satruck.config._persistWorkflowData(wip); 2951 2952 //satruck.api.SubmitWorkflowData(wip); 2953 2954 satruck.controller.dropoff.loadMap(apiResult); 2955 $("#no-matches-alert").show(); 2956 $(".dropoff-steps").hide(); 2957 } 2958 }); 2959 } 2960 }); 2961 } 2962 }, 2963 2964 start_familyStore: function (zip, otid) { 2965 var today = new Date(); 2966 var UTC_TIMESTAMP = today.toUTCString(); 2967 2968 var wip = satruck.config._loadWorkflowData(); 2969 //check for timeout 2970 if (wip && wip.stepDetails && wip.stepDetails.length) { 2971 try { 2972 var lastactivity = wip.stepDetails[wip.stepDetails.length - 1]; 2973 var utc_time = new Date(lastactivity.timestamp); 2974 //longer than 3 days 2975 if (today > utc_time.setTime(utc_time.getTime() + (3 * 24 * 60 * 60 * 1000))) { 2976 wip.hasTimedOut = true; 2977 } 2978 } 2979 catch (err) { 2980 } 2981 } 2982 if (!wip || wip.isComplete || wip.hasTimedOut || wip.hasErrors) { 2983 satruck.config._clearCacheOrSignOut(false); 2984 wip = $.extend({}, satruck.workflow.default); 2985 wip.id = DN.Utils.CreateUUID(); 2986 wip.startedAt = "FamilyStore_Index"; 2987 wip.name = "FindFamilyStores"; 2988 } 2989 //wip.donationType = satruck.config.lookup.DropoffType; 2990 wip.currentStep = 0; 2991 wip.dropOutStep = 0; 2992 wip.stepDetails = []; 2993 2994 if (zip) { 2995 wip.stepDetails.push({ step: 0, stepData: zip, timestamp: UTC_TIMESTAMP }); 2996 satruck.config._persistWorkflowData(wip); 2997 var chatActive = $('#chatActive').val() == "True"; 2998 2999 if (wip.tid == 40 && chatActive) { 3000 var chatPoc = $('#chatPoc').val(); 3001 icPatronChat.init({ serverHost: 'https://home-c12.incontact.com', bus_no: 4594957, poc: chatPoc, params: ['FirstName', 'Last Name', '[email protected]', 555 - 555 - 5555] }); 3002 } 3003 //show processing icon 3004 satruck.api.GetFamilyStoreListing(zip, otid, function (apiResult) { 3005 today = new Date(); 3006 UTC_TIMESTAMP = today.toUTCString(); 3007 3008 var wip = satruck.config._loadWorkflowData(); 3009 wip.donation = $.extend({}, satruck.dropoffticket.default); 3010 wip.locationcount = apiResult.RetVal.ResultsCount; 3011 //Tealium 3012 utag_data.page_name = "ARC | find a thrift store location:results"; 3013 utag_data.loc_search_term = zip; 3014 utag_data.loc_search_results = wip.locationcount; 3015 3016 utag_data.family_store_territory = ""; 3017 utag_data.family_store_name = ""; 3018 utag_data.family_store_id = ""; 3019 3020 wip.stepDetails.push({ step: 0, stepData: "zip:" + zip, timestamp: UTC_TIMESTAMP }); 3021 wip.stepDetails.push({ step: 0, stepData: "locCount:" + apiResult.RetVal.ResultsCount, timestamp: UTC_TIMESTAMP }); 3022 3023 if (apiResult && apiResult.Success == true && apiResult.RetVal.ResultsCount > 0) { 3024 wip.currentStep = 1;
3025 wip.dropOutStep = 2; 3026 wip.stepDetails.push({ step: 1, stepData: "begin location selection", timestamp: UTC_TIMESTAMP }); 3027 satruck.config._persistWorkflowData(wip); 3028 3029 satruck.controller.setBreadCrumbs(1, 'familystore'); 3030 $(".step").hide(); 3031 $(".familystore-steps").show(); 3032 $(".step1").show(); 3033 $('.donation-entry-point').addClass('hidden'); 3034 $('.body-content1').addClass('hidden'); 3035 3036 $("input[name='familyStoreZip']:visible").value = zip; 3037 $("input[name='mobileFamilyStoreZip']:visible").value = zip; 3038 3039 $("#no-matches-alert").hide(); 3040 satruck.controller.familyStore.loadMap(apiResult); 3041 3042 var location = apiResult.RetVal.Locations[0]; 3043 utag_data.family_store_name = location.Name; 3044 utag_data.family_store_id = location.Id; 3045 3046 satruck.api.GetZipInfo(zip, false, function (apiResult) { 3047 if (apiResult && apiResult.Success == true) { 3048 var zipinfo = apiResult.RetVal; 3049 3050 if (zipinfo.Territory_id) { 3051 satruck.donorExperienceEnabled = DN.Validation.isDonorExperienceEnabled(zipinfo.Territory_id, zipinfo.Arc_id); 3052 } 3053 3054 var zipTid = zipinfo.Territory_id; 3055 utag_data.arc_id = typeof wip.donation.aid != "undefined" && wip.donation.aid != null && wip.donation.aid != 0 ? wip.donation.aid : zipinfo.Arc_id; 3056 utag_data.arc_name = typeof wip.donation.arcname != "undefined" && wip.donation.arcname != null && wip.donation.arcname != "" ? wip.donation.arcname : zipinfo.ArcName; 3057 var tid = typeof wip.donation.tid != "undefined" && wip.donation.tid != null && wip.donation.tid != 0 ? wip.donation.tid : zipinfo.Territory_id; 3058 utag_data.arc_territory = (tid == 10 ? "USE" : (tid == 20 ? "USS" : (tid == 30 ? "USC" : (tid == 40 ? "USW" : "UNKNOWN")))); 3059 } 3060 satruck.api.GetZipInfo(location.Zip, false, function (apiResult) { 3061 if (apiResult && apiResult.Success == true) { 3062 var zipinfo = apiResult.RetVal; 3063 var zipTid = !isNaN(zipinfo.Territory_id) ? Number(zipinfo.Territory_id) : 'NA'; 3064 utag_data.family_store_territory = (zipTid == 10 ? "USE" : (zipTid == 20 ? "USS" : (zipTid == 30 ? "USC" : (zipTid == 40 ? "USW" : "UNKNOWN")))); 3065 if (zipTid == 0) { 3066 satruck.api.GetZipInfo(location.Zip, true, function (apiResult) { 3067 if (apiResult && apiResult.Success == true) { 3068 var zipinfo = apiResult.RetVal; 3069 var zipTid = !isNaN(zipinfo.Territory_id) ? Number(zipinfo.Territory_id) : 'NA'; 3070 utag_data.family_store_territory = (zipTid == 10 ? "USE" : (zipTid == 20 ? "USS" : (zipTid == 30 ? "USC" : (zipTid == 40 ? "USW" : "UNKNOWN")))); 3071 } 3072 if (typeof utag != "undefined") { 3073 utag.view(utag_data); 3074 } 3075 }); 3076 } 3077 } 3078 if (typeof utag != "undefined" && zipTid != 0) { 3079 utag.view(utag_data); 3080 } 3081 }); 3082 3083 }); 3084 } 3085 else { 3086 wip.hasErrors = true; 3087 wip.stepDetails.push({ step: 0, stepData: "no locations found", timestamp: UTC_TIMESTAMP }); 3088 satruck.config._persistWorkflowData(wip); 3089 3090 //satruck.api.SubmitWorkflowData(wip); 3091 3092 satruck.controller.familyStore.loadMap(apiResult); 3093 $("#no-matches-alert").show(); 3094 $(".familystore-steps").hide(); 3095 utag.view(utag_data); 3096 } 3097 }); 3098 } 3099 }, 3100 3101 choose_giving: function (zip) { 3102 debugger 3103 satruck.controller.setBreadCrumbs(1, 'pickup'); 3104 $('.bread-crumbs').show(); 3105 $('.donation-entry-point').addClass('hidden'); 3106 var today = new Date(); 3107 var UTC_TIMESTAMP = today.toUTCString(); 3108 3109 var wip = satruck.config._loadWorkflowData(); 3110 //check for timeout 3111 if (wip && wip.stepDetails && wip.stepDetails.length) { 3112 try { 3113 var lastactivity = wip.stepDetails[wip.stepDetails.length - 1]; 3114 var utc_time = new Date(lastactivity.timestamp); 3115 //longer than 3 days 3116 if (today > utc_time.setTime(utc_time.getTime() + (3 * 24 * 60 * 60 * 1000))) { 3117 wip.hasTimedOut = true; 3118 } 3119 } 3120 catch (err) { 3121 } 3122 } 3123 3124 //New Stuff For Login 11/6/2015 3125 if (satruck.account.is_logged_in()) { 3126 var DonorLogin = satruck.config._getDonorLogin(); 3127 //Tealium 3128 utag_data.customer_id = DonorLogin.DonorUserId; 3129 /*utag_data.customer_username = DonorLogin.Email; 3130 utag_data.customer_status = "logged in"; 3131 utag_data.customer_type = "donor logged in"; 3132 utag_data.customer_email = DonorLogin.Email; 3133 utag_data.customer_city = DonorLogin.City; 3134 utag_data.customer_state = DonorLogin.State; 3135 utag_data.customer_zip = DonorLogin.ZipCode; 3136 utag_data.customer_country = "US";*/ 3137 utag_data.login_status = "Logged In"; 3138 } 3139 else { 3140 utag_data.customer_id = ""; 3141 /*utag_data.customer_username = ""; 3142 utag_data.customer_status = "not logged in"; 3143 utag_data.customer_type = "not logged in"; 3144 utag_data.customer_city = ""; 3145 utag_data.customer_state = ""; 3146 utag_data.customer_zip = zip; 3147 utag_data.customer_country = "US";*/ 3148 utag_data.login_status = "Not Logged In"; 3149 } 3150 //New Tealium Tags 3151 utag_data.site_section = "Schedule Pickup"; 3152 utag_data.site_type = "ARC"; 3153 utag_data.zip = zip; 3154 3155 //Check for DonorUser before here 3156 if (!wip || wip.isComplete || wip.hasTimedOut || wip.hasErrors || wip.zip != zip) { 3157 satruck.config._clearCacheOrSignOut(false); 3158 3159 wip = $.extend({}, satruck.workflow.default); 3160 wip.id = DN.Utils.CreateUUID(); 3161 wip.startedAt = "Donate_Choose"; 3162 wip.name = "SchedulePickup"; 3163 3164 //Tealium 3165 $("[name='devnext_unique_session']").val(wip.id); 3166 utag_data.devnext_unique_session = wip.id; 3167 utag_data["404_Check"] = "Schedule a Pickup"; 3168 utag_data.event_type = 0; 3169 utag_data.donate_dss_app_view = false; 3170 utag_data.donate_SourceType = 0; 3171 utag_data.donate_my_pickups_url = "https://dss.satruck.org/MyPickups"; 3172 utag_data.ajax_donor_crossstreet = "N/A"; 3173 utag_data.zip = zip; 3174 wip.donationType = satruck.config.lookup.PickupType; 3175 wip.currentStep = 0;
3176 wip.dropOutStep = 0; 3177 wip.stepDetails = []; 3178 wip.stepDetails.push({ step: 0, stepData: zip, timestamp: UTC_TIMESTAMP }); 3179 wip.zip = zip; 3180 } 3181 3182 var zipinfoResult = satruck.config._getApiResult("zipinfo"); 3183 3184 if (wip.zip == zip && wip.tid && wip.donation.aid && wip.donation.sectorId && !zipinfoResult) { 3185 $('body').removeClass('loading'); 3186 $('.donation-entry-point').addClass('hidden'); 3187 3188 var donationDetails = wip.donation; 3189 if (donationDetails.warningMessage) { 3190 var arcWarningFound = wip.donation.warningMessage.trim(); 3191 if (arcWarningFound.length >= 5) { 3192 DN.Utils.ShowError(arcWarningFound); 3193 } 3194 } 3195 3196 satruck.controller.pickup.loadItemSelect(zipinfoResult); 3197 wip.stepDetails.push({ step: 0, stepData: "note: items loaded", timestamp: UTC_TIMESTAMP }); 3198 3199 if (typeof zipinfoResult != 'undefined' && zipinfoResult != null) { 3200 var zipinfo = zipinfoResult.RetVal; 3201 3202 wip.donation.arcname = zipinfo.ArcName; 3203 3204 $("[name='order_store']").val($.trim(zipinfo.ArcName)); 3205 $("[name='order_type']").val("pickup"); 3206 $("[name='territory_id']").val(wip.tid); 3207 $("[name='arc_name']").val($.trim(zipinfo.ArcName)); 3208 $("[name='ajax_arc_id']").val(zipinfo.Arc_id); 3209 $("[name='ajax_allowPickups']").val(zipinfo.NotServiced ? "false" : "true"); 3210 $("[name='ajax_arc_name']").val($.trim(zipinfo.ArcName)); 3211 $("[name='ajax_city']").val(zipinfo.City); 3212 $("[name='ajax_corps_name']").val($.trim(zipinfo.ArcName)); 3213 $("[name='ajax_owner']").val("Arc"); 3214 $("[name='ajax_state']").val(zipinfo.State); 3215 $("[name='ajax_territory']").val(wip.territoryAbbr); 3216 $("[name='arc_territory']").val(wip.territoryAbbr); 3217 $("[name='arc_center']").val($.trim(zipinfo.ArcName)); 3218 3219 $("[name='donate_ZIP']").val(wip.donation.zip); 3220 $("[name='donate_ARC_id']").val(wip.donation.aid); 3221 $("[name='donate_Territory_id']").val(wip.donation.tid); 3222 $("[name='donate_Sector_id']").val(wip.donation.sectorId); 3223 3224 //Tealium 3225 utag_data.order_store = $.trim(zipinfo.ArcName); 3226 utag_data.order_type = "pickup"; 3227 utag_data.territory_id = wip.tid; 3228 utag_data.arc_name = $.trim(zipinfo.ArcName); 3229 utag_data.ajax_arc_id = zipinfo.Arc_id; 3230 utag_data.ajax_allowPickups = zipinfo.NotServiced ? "false" : "true"; 3231 utag_data.ajax_arc_name = $.trim(zipinfo.ArcName); 3232 utag_data.ajax_city = zipinfo.City; 3233 utag_data.ajax_corps_name = $.trim(zipinfo.ArcName); 3234 utag_data.ajax_owner = "Arc"; 3235 utag_data.ajax_state = zipinfo.State; 3236 utag_data.ajax_territory = wip.territoryAbbr; 3237 utag_data.arc_territory = wip.territoryAbbr; 3238 utag_data.arc_center = $.trim(zipinfo.ArcName); 3239 utag_data.arc_id = zipinfo.Arc_id; 3240 } 3241 3242 //Tealium 3243 utag_data.donate_ZIP = wip.donation.zip; 3244 utag_data.donate_ARC_id = wip.donation.aid; 3245 utag_data.donate_Territory_id = wip.donation.tid; 3246 utag_data.donate_Sector_id = wip.donation.sectorId; 3247 3248 var categoriesResult = satruck.config._getApiResult("categories"); 3249 if (categoriesResult) { 3250 satruck.controller.pickup.loadCategorySelect(categoriesResult, wip.tid, wip.donation.furnitureQuickSelectAllowed); 3251 wip.stepDetails.push({ step: 0, stepData: "note: categories loaded", timestamp: UTC_TIMESTAMP }); 3252 3253 wip.currentStep = 1; 3254 wip.dropOutStep = 2; 3255 wip.stepDetails.push({ step: 1, stepData: "begin item selection", timestamp: UTC_TIMESTAMP }); 3256 satruck.config._persistWorkflowData(wip); 3257 } 3258 else { 3259 satruck.api.GetCategories(wip.tid, function (innerApiResult) { 3260 var today = new Date(); 3261 var UTC_TIMESTAMP = today.toUTCString(); 3262 3263 var wip = satruck.config._loadWorkflowData(); 3264 3265 if (innerApiResult && innerApiResult.Success == true) { 3266 satruck.controller.pickup.loadCategorySelect(innerApiResult, wip.tid, wip.donation.furnitureQuickSelectAllowed); 3267 wip.stepDetails.push({ step: 0, stepData: "note: categories loaded", timestamp: UTC_TIMESTAMP }); 3268 satruck.config._persistWorkflowData(wip); 3269 } 3270 else { 3271 wip.hasErrors = true; 3272 wip.stepDetails.push({ step: 0, stepData: "err:" + innerApiResult.ErrorMessage + ";terminate: aborted failed workflow", timestamp: UTC_TIMESTAMP }); 3273 satruck.config._persistWorkflowData(wip); 3274 3275 //satruck.api.SubmitWorkflowData(wip); 3276 3277 //show alert 3278 DN.Utils.ShowError(innerApiResult.ErrorMessage); 3279 $("#pickup_or_dropoff").hide(); 3280 $("#pickup_only").hide(); 3281 } 3282 }); 3283 } 3284 3285 var locationlistResult = satruck.config._getApiResult("locationlist"); 3286 if (locationlistResult) { 3287 satruck.controller.dropoff.loadMap(locationlistResult); 3288 } 3289 else { 3290 //show processing icon 3291 satruck.api.GetLocationListing(zip, function (apiResult) { 3292 today = new Date(); 3293 UTC_TIMESTAMP = today.toUTCString(); 3294 3295 if (apiResult && apiResult.Success == true && apiResult.RetVal.ResultsCount > 0) { 3296 $("#no-matches-alert").hide(); 3297 satruck.controller.dropoff.loadMap(apiResult); 3298 } 3299 else { 3300 satruck.controller.dropoff.loadMap(apiResult); 3301 $("#no-matches-alert").show(); 3302 $(".dropoff-steps").hide(); 3303 } 3304 }); 3305 } 3306 3307 //animate while items list is retrieved 3308 $("#pickup_or_dropoff").show(); 3309 $("#pickup_only").hide(); 3310 var chatActive = $('#chatActive').val() == "True"; 3311 3312 if (zipinfo.Territory_id == 40 && chatActive) { 3313 var chatPoc = $('#chatPoc').val(); 3314 icPatronChat.init({ serverHost: 'https://home-c12.incontact.com', bus_no: 4594957, poc: chatPoc, params: ['FirstName', 'Last Name', '[email protected]', 555 - 555 - 5555] }); 3315 } 3316 } 3317 else { 3318 wip.zip = zip; 3319 wip.stepDetails.push({ step: 0, stepData: "redo step 1 missing info", timestamp: UTC_TIMESTAMP }); 3320 satruck.config._persistWorkflowData(wip); 3321 //DN.Utils.ShowError('Sorry! We could not find that zip. Please try again.'); 3322 //Tealium 3323 $("[name='ajax_zip']").val(zip); 3324 utag_data.ajax_zip = zip; 3325 //$('#pickup_or_dropoff').addClass('hidden'); 3326 $('.donation-entry-point').removeClass('hidden'); 3327 $("#pickup_or_dropoff").show(); 3328 $("#pickup_only").hide(); 3329 satruck.api.GetZipInfo(zip, false, function (apiResult) { 3330 $('body').removeClass('loading'); 3331 today = new Date(); 3332 UTC_TIMESTAMP = today.toUTCString(); 3333 3334 if (apiResult && apiResult.Success == true) { 3335 var zipinfo = apiResult.RetVal; 3336 3337 if (zipinfo.Territory_id) { 3338 satruck.donorExperienceEnabled = DN.Validation.isDonorExperienceEnabled(zipinfo.Territory_id, zipinfo.Arc_id); 3339 } 3340 var wip = satruck.config._loadWorkflowData(); 3341 wip.zipstate = zipinfo.ZipState; 3342 wip.zipcity = zipinfo.ZipCity; 3343 wip.donation = $.extend({}, satruck.pickuporder.default); 3344 wip.tid = zipinfo.Territory_id; 3345 wip.territoryAbbr = (wip.tid == 10 ? "USE" : (wip.tid == 20 ? "USS" : (wip.tid == 30 ? "USC" : (wip.tid == 40 ? "USW" : "UNKNOWN")))); 3346 wip.donation.isMobile = satruck.config.ismobile; 3347 wip.donation.sourceType = satruck.config._getSourceType(); 3348 wip.donation.tid = zipinfo.Territory_id; 3349 wip.donation.aid = zipinfo.Arc_id; 3350 wip.donation.arcname = zipinfo.ArcName; 3351 wip.donation.sectorId = zipinfo.Sector_id; 3352 wip.donation.notServiced = zipinfo.NotServiced; 3353 wip.donation.callAheadAllowed = DN.Validation.isCallAheadAllowed(wip.donation.tid, wip.donation.aid); 3354 wip.donation.callAheadTimeOptions = satruck.controller.pickup.getCallAheadMinutes(wip.donation.tid); 3355 wip.donation.warningMessage = zipinfo.WarningMessage; 3356 wip.donation.furnitureQuickSelectAllowed = zipinfo.AllowFurnitureQuickSelect; 3357 3358 //AJ: Added below 3 properties for new zip lookup workflow 3359 wip.donation.showZipMasterForm = zipinfo.ShowZipMasterForm; 3360 wip.donation.zipMasterEmail = zipinfo.ZipMasterEmail;
3361 wip.donation.zipMasterPhone = zipinfo.ZipMasterPhone; 3362 3363 wip.stepDetails.push({ step: 0, stepData: "tid:" + wip.donation.tid, timestamp: UTC_TIMESTAMP }); 3364 wip.stepDetails.push({ step: 0, stepData: "abbr:" + wip.territoryAbbr, timestamp: UTC_TIMESTAMP }); 3365 wip.stepDetails.push({ step: 0, stepData: "aid:" + wip.donation.aid, timestamp: UTC_TIMESTAMP }); 3366 wip.stepDetails.push({ step: 0, stepData: "sectorid:" + wip.donation.sectorId, timestamp: UTC_TIMESTAMP }); 3367 wip.stepDetails.push({ step: 0, stepData: "notServiced:" + wip.donation.notServiced, timestamp: UTC_TIMESTAMP }); 3368 wip.stepDetails.push({ step: 0, stepData: "warningMessage:" + wip.donation.warningMessage, timestamp: UTC_TIMESTAMP }); 3369 3370 satruck.config._persistWorkflowData(wip); 3371 3372 if (!wip.zipstate || !wip.zipcity) { 3373 satruck.api.GetCityState(zip, function (csApiResult) { 3374 if (csApiResult && csApiResult.Success == true) { 3375 wip = satruck.config._loadWorkflowData(); 3376 wip.zipstate = csApiResult.RetVal.State; 3377 wip.zipcity = csApiResult.RetVal.City; 3378 satruck.config._persistWorkflowData(wip); 3379 } 3380 }); 3381 } 3382 3383 $("[name='order_store']").val($.trim(zipinfo.ArcName)); 3384 $("[name='order_type']").val("pickup"); 3385 $("[name='territory_id']").val(wip.tid); 3386 $("[name='arc_name']").val($.trim(zipinfo.ArcName)); 3387 $("[name='ajax_arc_id']").val(zipinfo.Arc_id); 3388 $("[name='ajax_allowPickups']").val(zipinfo.NotServiced ? "false" : "true"); 3389 $("[name='ajax_arc_name']").val($.trim(zipinfo.ArcName)); 3390 $("[name='ajax_city']").val(zipinfo.City); 3391 $("[name='ajax_corps_name']").val($.trim(zipinfo.ArcName)); 3392 $("[name='ajax_owner']").val("Arc"); 3393 $("[name='ajax_state']").val(zipinfo.State); 3394 $("[name='ajax_territory']").val(wip.territoryAbbr); 3395 $("[name='arc_territory']").val(wip.territoryAbbr); 3396 $("[name='arc_center']").val($.trim(zipinfo.ArcName)); 3397 3398 $("[name='donate_ZIP']").val(wip.donation.zip); 3399 $("[name='donate_ARC_id']").val(wip.donation.aid); 3400 $("[name='donate_Territory_id']").val(wip.donation.tid); 3401 $("[name='donate_Sector_id']").val(wip.donation.sectorId); 3402 3403 //Tealium 3404 utag_data.order_store = $.trim(zipinfo.ArcName); 3405 utag_data.order_type = "pickup"; 3406 utag_data.territory_id = wip.tid; 3407 utag_data.arc_name = $.trim(zipinfo.ArcName); 3408 utag_data.ajax_arc_id = zipinfo.Arc_id; 3409 utag_data.ajax_allowPickups = zipinfo.NotServiced ? "false" : "true"; 3410 utag_data.ajax_arc_name = $.trim(zipinfo.ArcName); 3411 utag_data.ajax_city = zipinfo.City; 3412 utag_data.ajax_corps_name = $.trim(zipinfo.ArcName); 3413 utag_data.ajax_owner = "Arc"; 3414 utag_data.ajax_state = zipinfo.State; 3415 utag_data.ajax_territory = wip.territoryAbbr; 3416 utag_data.arc_territory = wip.territoryAbbr; 3417 utag_data.arc_center = $.trim(zipinfo.ArcName); 3418 utag_data.arc_id = zipinfo.Arc_id; 3419 3420 utag_data.donate_ZIP = wip.donation.zip; 3421 utag_data.donate_ARC_id = wip.donation.aid; 3422 utag_data.donate_Territory_id = wip.donation.tid; 3423 utag_data.donate_Sector_id = wip.donation.sectorId; 3424 3425 3426 if (wip.donation.showZipMasterForm) { 3427 //Tealium 3428 satruck.tealium._setPickupSubPageTealium("0-3"); 3429 3430 //Hide divs 3431 $("#pickup_or_dropoff").hide(); 3432 $("#pickup_only").hide(); 3433 //Original html for zip master form in case submit fails they can try again 3434 $original = $('.zip-master-form').html(); 3435 $('#zipmaster-zip').val(zip); 3436 if (satruck.config.reSupplyPickupZipCode.includes(zip) || (wip.donation.tid == "40" && wip.donation.aid != "140")) { 3437 satruck.controller.ReSupplyView("Unserviced Zips"); 3438 console.log(phone); 3439 var strphones = satruck.controller._getReSupplyPhone(wip.donation.tid, wip.donation.aid); 3440 $('#not-found-custom-msg').dialog( 3441 { 3442 autoOpen: true, 3443 modal: true, 3444 open: function (event, ui) { 3445 $('#not-found-custom-msg').dialog('option', 'title', 'Information'); 3446 $('.js-change-msg').empty().html("<center>Free online service are not available in your area</center><br>" + 3447 "<center>Consider our partner ReSupplyâs fee-based priority (24 - 48 hrs) pickup service delivered directly to The Salvation Army or drop it off at one of our locations.</center><br>" + 3448 "<center>Priority Pickup Number: " + strphones + ".</center>" 3449 + "<br><br><a id='priorityPickup' onclick='satruck.controller.priorityPickupClick(\"" + "Unserviced Zips" + "\");'><button class='btn ui-button ui-widget ui-state-default' style='float:left;font-size:12px;'>Priority Pickup</button></a>" 3450 + "<button id='dropItOff' class='btn ui-button ui-widget ui-state-default' onclick='satruck.controller.dropitOffClick(" + zip + ",\"" + "Unserviced Zips" + "\");' style='font-size:12px;'>Drop It Off</button></center><br>"); 3451 $('footer').addClass('hidden'); 3452 } 3453 });
3454 //$('#zip-master-form').dialog( 3455 // { 3456 // autoOpen: true, 3457 // height: 670, 3458 // width: 660, 3459 // modal: true, 3460 // open: function (event, ui) { 3461 // $('footer').addClass('hidden'); 3462 // }, 3463 // buttons: [ 3464 // { 3465 // text: "Priority Pickup", 3466 // id: "zipmaster-prioritypickup", 3467 // click: function () { 3468 // window.open(satruck.config.urls.zipmasterprioritypickup, "_blank"); 3469 // }, 3470 // 'class': 'btn btn-default dialog-cancel dialog-prioritypickup' 3471 // }, 3472 // { 3473 // text: "Drop It Off", 3474 // id: "zipmaster-dropitoff", 3475 // click: function () { 3476 // $(this).dialog("close"); 3477 // satruck.controller.start_giving(0, zip, false); 3478 // }, 3479 // 'class': 'btn btn-default dialog-cancel dialog-dropitoff' 3480 // }, 3481 // { 3482 // text: "Submit", 3483 // click: function () { 3484 // var $parent = $('.zip-master-form'), 3485 // $name = $('#zipmaster-first-name').val() + ' ' + $('#zipmaster-last-name').val(), 3486 // $contactemail = $('#zipmaster-email').val(), 3487 // $confirmemail = $('#zipmaster-confirmemail').val(), 3488 // $zipmasteremail = wip.donation.zipMasterEmail, 3489 // $phone = $('#zipmaster-phone').val(), 3490 // $address = $('#zipmaster-address').val() + ' ' + $('#zipmaster-address2').val(), 3491 // $zip = zip, 3492 // $message = "<strong>Pickup Order Donation Items:</strong>" + "<br /><br />" + $('#zipmaster-itemvehicleinfo').val(), 3493 // $donorMessage = satruck.config.messages.corpZipThankYou + "<br /><br />" + $message, 3494 // $reason = 5; //ZipMasterEmailForm 3495 // $reasonName = "ZipMasterEmailForm"; 3496 3497 // if ($contactemail != $confirmemail) { 3498 // DN.Validation.ShowError($('#zipmaster-confirmemail').parent('div'), $('#zipmaster-confirmemail-help-block')); 3499 // $('#zipmaster-confirmemail').focus(function () { 3500 // DN.Validation.HideError($('#zipmaster-confirmemail').parent('div')); 3501 // }); 3502 // } 3503 // else { 3504 // function submitForm() { 3505 // $('.contact-submit').addClass('spinner'); 3506 // $('.contact-submit').attr('disabled', true); 3507 // satruck.api.ContactSubmit(null, $name, $contactemail, $zipmasteremail, $address, $zip, $message, $reason, $reasonName, $phone, null, null, null, null, function (apiResult) { 3508 // //$('.contact-submit').addClass('spinner'); 3509 // $('#zip-master-form').dialog('option', 'title', 'Information'); 3510 // if (apiResult && apiResult.Success == true) { 3511 // $('.zip-master-form').html('<h4 class="text-center">' + satruck.config.messages.corpZipThankYou + '</h4>'); 3512 // $('.contact-submit').addClass('hidden'); 3513 // $('.dialog-cancel .ui-button-text').text('Close'); 3514 // //Send confirmation email 3515 // satruck.api.ConfirmationEmail($name, $zipmasteremail, $contactemail, $address, $zip, $donorMessage, 0, $phone, function (apiResult) { 3516 // }); 3517 // //Tealium 3518 // satruck.tealium._setPickupSubPageTealium("0-3"); 3519 // utag_data.site_section = "Schedule Pickup"; 3520 // utag_data.site_type = "Corps"; 3521 // utag_data.login_status = satruck.account.is_logged_in() ? "Logged In" : "Not Logged In"; 3522 // utag_data.pickup_date = $.datepicker.formatDate('yymmdd', new Date()) + ":NA:NA"; 3523 // } 3524 // else { 3525 // $('.contact-submit').removeClass('spinner'); 3526 // $('.zip-master-form').html('<h3 class="text-center">Sorry, your message did not go through. Please feel free to try again!</h3>'); 3527 // $('.contact-submit .ui-button-text').text('Go Back'); 3528 // $('.contact-submit').one('click', function () { 3529 // $('.zip-master-form').html($original); 3530 // $('#zipmaster-zip').val(zip); 3531 // $('.contact-submit .ui-button-text').text('Submit'); 3532 // });
3533 // } 3534 // $('.contact-submit').attr('disabled', false); 3535 // }); 3536 // } 3537 // DN.Validation.fieldHasData($parent, submitForm); 3538 // } 3539 // }, 3540 // 'class': 'btn btn-default contact-submit' 3541 // }, 3542 // { 3543 // text: "Cancel", 3544 // click: function () { 3545 // $(this).dialog("close"); 3546 // window.location = satruck.config.urls.home; 3547 // }, 3548 // 'class': 'btn btn-default dialog-cancel dialog-zipmastercancel' 3549 // }], 3550 // open: function () { 3551 // $('.ui-dialog-buttonset').css("width", "100%"); 3552 // } 3553 // }); 3554 3555 //if (zipinfo.ArcName == null) { 3556 // $("#zipmaster-prioritypickup").show(); 3557 // $("#zipmaster-dropitoff").show(); 3558 //} 3559 //else { 3560 // $("#zipmaster-prioritypickup").hide(); 3561 // $("#zipmaster-dropitoff").hide(); 3562 //} 3563 } 3564 else { 3565 $('#zip-master-form').dialog( 3566 { 3567 autoOpen: true, 3568 height: 600, 3569 width: 660, 3570 modal: true, 3571 open: function (event, ui) { 3572 $('footer').addClass('hidden'); 3573 }, 3574 buttons: [{ 3575 text: "Submit", 3576 click: function () { 3577 var $parent = $('.zip-master-form'), 3578 $name = $('#zipmaster-first-name').val() + ' ' + $('#zipmaster-last-name').val(), 3579 $contactemail = $('#zipmaster-email').val(), 3580 $confirmemail = $('#zipmaster-confirmemail').val(), 3581 $zipmasteremail = wip.donation.zipMasterEmail, 3582 $phone = $('#zipmaster-phone').val(), 3583 $address = $('#zipmaster-address').val() + ' ' + $('#zipmaster-address2').val(), 3584 $zip = zip, 3585 $message = "<strong>Pickup Order Donation Items:</strong>" + "<br /><br />" + $('#zipmaster-itemvehicleinfo').val(), 3586 $donorMessage = satruck.config.messages.corpZipThankYou + "<br /><br />" + $message, 3587 $reason = 5; //ZipMasterEmailForm 3588 $reasonName = "ZipMasterEmailForm"; 3589 3590 if ($contactemail != $confirmemail) { 3591 DN.Validation.ShowError($('#zipmaster-confirmemail').parent('div'), $('#zipmaster-confirmemail-help-block')); 3592 $('#zipmaster-confirmemail').focus(function () { 3593 DN.Validation.HideError($('#zipmaster-confirmemail').parent('div')); 3594 }); 3595 } 3596 else { 3597 function submitForm() { 3598 $('.contact-submit').addClass('spinner'); 3599 $('.contact-submit').attr('disabled', true); 3600 satruck.api.ContactSubmit(null, $name, $contactemail, $zipmasteremail, $address, $zip, $message, $reason, $reasonName, $phone, null, null, null, null, function (apiResult) { 3601 //$('.contact-submit').addClass('spinner'); 3602 $('#zip-master-form').dialog('option', 'title', 'Information'); 3603 if (apiResult && apiResult.Success == true) { 3604 $('.zip-master-form').html('<h4 class="text-center">' + satruck.config.messages.corpZipThankYou + '</h4>'); 3605 $('.contact-submit').addClass('hidden'); 3606 $('.dialog-cancel .ui-button-text').text('Close'); 3607 //Send confirmation email 3608 satruck.api.ConfirmationEmail($name, $zipmasteremail, $contactemail, $address, $zip, $donorMessage, 0, $phone, function (apiResult) { 3609 }); 3610 //Tealium 3611 satruck.tealium._setPickupSubPageTealium("0-3"); 3612 utag_data.site_section = "Schedule Pickup"; 3613 utag_data.site_type = "Corps"; 3614 utag_data.login_status = satruck.account.is_logged_in() ? "Logged In" : "Not Logged In"; 3615 utag_data.pickup_date = $.datepicker.formatDate('yymmdd', new Date()) + ":NA:NA"; 3616 } 3617 else { 3618 $('.contact-submit').removeClass('spinner'); 3619 $('.zip-master-form').html('<h3 class="text-center">
3619Sorry, your message did not go through. Please feel free to try again!</h3>'); 3620 $('.contact-submit .ui-button-text').text('Go Back'); 3621 $('.contact-submit').one('click', function () { 3622 $('.zip-master-form').html($original); 3623 $('#zipmaster-zip').val(zip); 3624 $('.contact-submit .ui-button-text').text('Submit'); 3625 }); 3626 } 3627 $('.contact-submit').attr('disabled', false); 3628 }); 3629 } 3630 DN.Validation.fieldHasData($parent, submitForm); 3631 } 3632 }, 3633 'class': 'btn btn-default contact-submit' 3634 }, 3635 { 3636 text: "Cancel", 3637 click: function () { 3638 $(this).dialog("close"); 3639 window.location = satruck.config.urls.home; 3640 }, 3641 'class': 'btn btn-default dialog-cancel dialog-zipmastercancel' 3642 }], 3643 open: function () { 3644 $('.ui-dialog-buttonset').css("width", "100%"); 3645 } 3646 });
3647 3648 if (zipinfo.ArcName == null) { 3649 $("#zipmaster-prioritypickup").show(); 3650 $("#zipmaster-dropitoff").show(); 3651 } 3652 else { 3653 $("#zipmaster-prioritypickup").hide(); 3654 $("#zipmaster-dropitoff").hide(); 3655 } 3656 } 3657 3658 } 3659 else if (wip.donation.notServiced == true) { 3660 var CovidFormActive = false; 3661 if (wip.donation.aid != -1) { 3662 satruck.api.CheckCovidFormActive(wip.tid, wip.zip, function (apiResult) { 3663 if (apiResult != null) { 3664 CovidFormActive = apiResult.RetVal.CovidFormActive; 3665 wip.donation.covidFormActive = CovidFormActive; 3666 if (CovidFormActive) { 3667 wip.donation.warningMessage = null; 3668 } 3669 satruck.config._persistWorkflowData(wip); 3670 }; 3671 }); 3672 } 3673 3674 if (CovidFormActive || wip.tid == 10) { 3675 $('body').removeClass('dark-bg'); 3676 $('body').addClass('light-bg'); 3677 $("#pickup_or_dropoff").hide(); 3678 $("#pickup_only").hide(); 3679 debugger 3680 if(wip.tid == 10 && 3681 (wip.donation.aid == 6 3682 || wip.donation.aid == 3 3683 || wip.donation.aid == 4 3684 || wip.donation.aid == 8 3685 || wip.donation.aid == 11 3686 || wip.donation.aid == 12 3687 || wip.donation.aid == 13 3688 || wip.donation.aid == 15 3689 || wip.donation.aid == 16 3690 || wip.donation.aid == 18 3691 || wip.donation.aid == 21 3692 || wip.donation.aid == 23 3693 || wip.donation.aid == 25 3694 || wip.donation.aid == 26 3695 || wip.donation.aid == 27 3696 || wip.donation.aid == 28 3697 || wip.donation.aid == 29 3698 || wip.donation.aid == 30 3699 || wip.donation.aid == 32 3700 || wip.donation.aid == 33 3701 || wip.donation.aid == 34 3702 || wip.donation.aid == 36 3703 || wip.donation.aid == 37 3704 || wip.donation.aid == 38 3705 || wip.donation.aid == 39)){ 3706 $('body').removeClass('light-bg'); 3707 $('body').addClass('dark-bg'); 3708 $('#not-found-custom-msg').dialog( 3709 { 3710 autoOpen: true, 3711 modal: true, 3712 open: function (event, ui) { 3713 $('#not-found-custom-msg').dialog('option', 'title', 'Information'); 3714 $('.js-change-msg').empty().html("<center>Free online service are not available in your area</center><br>" + 3715 "<center>Consider our partner ReSupplyâs fee-based priority (24 - 48 hrs) pickup service delivered directly to The Salvation Army or drop it off at one of our locations.</center><br>" + 3716 "<center>Priority Pickup Number: (717) 500-3877.</center>" 3717 + "<br><br><a id='priorityPickup' onclick='satruck.controller.priorityPickupClick(\"" + "Unserviced Zips" + "\");'><button class='btn ui-button ui-widget ui-state-default' style='float:left;font-size:12px;'>Priority Pickup</button></a>" 3718 + "<button id='dropItOff' class='btn ui-button ui-widget ui-state-default' onclick='satruck.controller.dropitOffClick(" + zip + ",\"" + "Unserviced Zips" + "\");' style='font-size:12px;'>Drop It Off</button></center><br>"); 3719 $('footer').addClass('hidden'); 3720 } 3721 }); 3722 } 3723 else { 3724 $('#covid-not-serviced-msg').dialog( 3725 { 3726 autoOpen: true, 3727 modal: true, 3728 width: 1142, 3729 dialogClass: 'covid-dialog', 3730 open: function (event, ui) { 3731 if (wip.zip !== "") { 3732 $('#covid-not-serviced-msg').dialog('option', 'title', 'Pickup Services In Your Area Have Been Suspended During The COVID-19 Outbreak'); 3733 $('.ui-widget-overlay').addClass('covid-dialog-overlay'); 3734 } else { 3735 $(this).dialog('close'); 3736 window.location = satruck.config.urls.home; 3737 } 3738 $('footer').addClass('hidden'); 3739 }, 3740 close: function () { 3741 if (wip.tid == 10) { 3742 window.location = satruck.config.urls.home; 3743 } 3744 else { 3745 window.location = satruck.config.urls.dropoffindex + "?zip=" + zip; 3746 } 3747 } 3748 });
3749 } 3750 } 3751 else if (!zipinfo.WarningMessage 3752 || zipinfo.WarningMessage == zip + ' is not serviced.' 3753 || zipinfo.WarningMessage.trim() == '' 3754 || zipinfo.WarningMessage.trim() == '.') { 3755 3756 var wip = satruck.config._loadWorkflowData(); 3757 wip.zipstate = zipinfo.ZipState; 3758 wip.zipcity = zipinfo.ZipCity; 3759 wip.tid = zipinfo.Territory_id; 3760 wip.territoryAbbr = (wip.tid == 10 ? "USE" : (wip.tid == 20 ? "USS" : (wip.tid == 30 ? "USC" : (wip.tid == 40 ? "USW" : "UNKNOWN")))); 3761 wip.donation = $.extend({}, satruck.dropoffticket.default); 3762 wip.donation.tid = zipinfo.Territory_id; 3763 wip.donation.aid = zipinfo.Arc_id; 3764 wip.donation.arcname = zipinfo.ArcName; 3765 wip.stepDetails.push({ step: 0, stepData: "tid:" + wip.donation.tid, timestamp: UTC_TIMESTAMP }); 3766 wip.stepDetails.push({ step: 0, stepData: "abbr:" + wip.territoryAbbr, timestamp: UTC_TIMESTAMP }); 3767 wip.stepDetails.push({ step: 0, stepData: "aid:" + wip.donation.aid, timestamp: UTC_TIMESTAMP }); 3768 wip.currentStep = 1; 3769 wip.dropOutStep = 2; 3770 wip.stepDetails.push({ step: 1, stepData: "redirect to dropoffindex", timestamp: UTC_TIMESTAMP }); 3771 wip.donation.notServiced = zipinfo.NotServiced; 3772 wip.donation.warningMessage = 'Unfortunately, pickup service is not currently available in your area, but your donation is still greatly needed and appreciated. Please check below for a convenient drop-off location near you, or call us at <a href="tel:+18007287825">' + (wip.tid == 40 ? '1-800-728-7825' : '1-800-SA-Truck (1-800-728-7825)') + '</a> for further assistance.'; 3773 satruck.config._persistWorkflowData(wip); 3774 3775 if (zipinfo.Territory_id == 30) { 3776 if (zipinfo.Arc_id == 120 || zipinfo.Arc_id == 110 || zipinfo.Arc_id == 115 || zipinfo.Arc_id == 135 || zipinfo.Arc_id == 140 || zipinfo.Arc_id == 160 || zipinfo.Arc_id == 165 || zipinfo.Arc_id == 175 || zipinfo.Arc_id == 185) { 3777 $("#pickup_or_dropoff").hide(); 3778 $("#pickup_only").hide(); 3779 var strphones = satruck.controller._getReSupplyPhone(zipinfo.Territory_id, zipinfo.Arc_id); 3780 $('#not-found-custom-msg').dialog( 3781 { 3782 autoOpen: true, 3783 modal: true, 3784 open: function (event, ui) { 3785 $('#not-found-custom-msg').dialog('option', 'title', 'Information'); 3786 $('.js-change-msg').empty().html("<center>Free online service are not available in your area</center><br>" + 3787 "<center>Consider our partner ReSupplyâs fee-based priority (24 - 48 hrs) pickup service delivered directly to The Salvation Army or drop it off at one of our locations.</center><br>" + 3788 "<center>Priority Pickup Number: " + strphones + ".</center>" 3789 + "<br><br><a id='priorityPickup' onclick='satruck.controller.priorityPickupClick(\"" + "Unserviced Zips" + "\");'><button class='btn ui-button ui-widget ui-state-default' style='float:left;font-size:12px;'>Priority Pickup</button></a>" 3790 + "<button id='dropItOff' class='btn ui-button ui-widget ui-state-default' onclick='satruck.controller.dropitOffClick(" + zip + ",\"" + "Unserviced Zips" + "\");' style='font-size:12px;'>Drop It Off</button></center><br>"); 3791 $('footer').addClass('hidden'); 3792 } 3793 }); 3794 } 3795 else { 3796 DN.Utils.ShowErrorRedirect('We have been unable to resume pickups in your area but plan on reopening soon. Please check back with us and thank you for your understanding.', 'Area Not Serviced', satruck.config.urls.home); 3797 } 3798 } 3799 else { 3800 window.location = satruck.config.urls.dropoffindex + "?zip=" + zip; 3801 } 3802 } 3803 else { 3804 //Tealium 3805 satruck.tealium._setPickupSubPageTealium("0-2"); 3806 3807 wip.hasErrors = true; 3808 wip.stepDetails.push({ step: 0, stepData: "notserviced:" + wip.donation.warningMessage, timestamp: UTC_TIMESTAMP }); 3809 satruck.config._persistWorkflowData(wip); 3810 3811 //satruck.api.SubmitWorkflowData(wip); 3812 3813 //show alert 3814 var zipNotFound = wip.zip.trim(); 3815 var warningMessage = wip.donation.warningMessage.trim(); 3816 3817 if (zipNotFound.length < 5 || zipNotFound == null || warningMessage.length == 0 || warningMessage == null) { 3818 $('#not-found-default-msg').dialog( 3819 { 3820 autoOpen: true, 3821 modal: true, 3822 open: function (event, ui) { 3823 $('.js-change-zip').empty().html(wip.zip); 3824 $('footer').addClass('hidden'); 3825 }, 3826 buttons: [ 3827 { 3828 text: "Ok", 3829 click: function () { 3830 $(this).dialog("close"); 3831 window.location = satruck.config.urls.home; 3832 }, 3833 'class': 'btn btn-default dialog-confirm' 3834 }] 3835 });
3836 } 3837 else { 3838 if (satruck.config.reSupplyPickupZipCode.includes(zip) || (wip.donation.tid == "40" && wip.donation.aid != "140")) { 3839 satruck.controller.ReSupplyView("Pickups Disabled"); 3840 $('#not-found-custom-msg').dialog( 3841 { 3842 autoOpen: true, 3843 modal: true, 3844 open: function (event, ui) { 3845 if (wip.zip !== "") { 3846 $('#not-found-custom-msg').dialog('option', 'title', 'Information'); 3847 $('.js-change-msg').empty().html(wip.donation.warningMessage); 3848 } else { 3849 $(this).dialog('close'); 3850 window.location = satruck.config.urls.home; 3851 } 3852 $('footer').addClass('hidden'); 3853 } 3854 //buttons: [ 3855 // { 3856 // text: "Ok", 3857 // click: function () { 3858 // $(this).dialog("close"); 3859 // window.location = satruck.config.urls.home; 3860 // }, 3861 // 'class': 'btn btn-default dialog-confirm' 3862 // }] 3863 }); 3864 3865 } 3866 else if ((wip.donation.tid == "30" && (wip.donation.aid == "110" || wip.donation.aid == "115" || wip.donation.aid == "120" || wip.donation.aid == "135" || wip.donation.aid == "140" || wip.donation.aid == "160" || wip.donation.aid == "165" || wip.donation.aid == "175" || wip.donation.aid == "185"))) { 3867 debugger 3868 $("#pickup_or_dropoff").hide(); 3869 $("#pickup_only").hide(); 3870 var strphones = satruck.controller._getReSupplyPhone(zipinfo.Territory_id, zipinfo.Arc_id); 3871 //if(wip.donation.aid != "175") 3872 //{ 3873 $('#not-found-custom-msg').dialog( 3874 { 3875 autoOpen: true, 3876 modal: true, 3877 open: function (event, ui) { 3878 $('#not-found-custom-msg').dialog('option', 'title', 'Information'); 3879 $('.js-change-msg').empty().html("<center>Free online service are not available in your area</center><br>" + 3880 "<center>Consider our partner ReSupplyâs fee-based priority (24 - 48 hrs) pickup service delivered directly to The Salvation Army or drop it off at one of our locations.</center><br>" + 3881 "<center>Priority Pickup Number: " + strphones + ".</center>" 3882 + "<br><br><a id='priorityPickup' onclick='satruck.controller.priorityPickupClick(\"" + "Unserviced Zips" + "\");'><button class='btn ui-button ui-widget ui-state-default' style='float:left;font-size:12px;'>Priority Pickup</button></a>" 3883 + "<button id='dropItOff' class='btn ui-button ui-widget ui-state-default' onclick='satruck.controller.dropitOffClick(" + zip + ",\"" + "Unserviced Zips" + "\");' style='font-size:12px;'>Drop It Off</button></center><br>"); 3884 $('footer').addClass('hidden'); 3885 } 3886 }); 3887 //} else { 3888 3889 //$('#not-found-custom-msg').dialog( 3890 // { 3891 // autoOpen: true, 3892 // modal: true, 3893 // open: function (event, ui) { 3894 // $('#not-found-custom-msg').dialog('option', 'title', 'Information'); 3895 // $('.js-change-msg').empty().html('<div style="text-align: center; font-family: Arial, sans-serif; line-height: 1.6;"><div style="font-weight: bold; margin-bottom: 10px;">National pickup services are not available in your area.</div><div style="margin-bottom: 8px;">Schedule your home donation pick-up now.</div><div style="margin-bottom: 8px;">Visit : <a href="https://resupply.link/sa-st-louis" target="_blank" style="font-weight: bold; text-decoration: underline;">resupply.link/sa-st-louis</a></div><div> Or call : '+ 3896 // '<strong>'+ strphones +'</strong></div></div>'); 3897 // $('footer').addClass('hidden'); 3898 // } 3899 // }); 3900 //} 3901 } 3902 else { 3903 $('#not-found-custom-msg').dialog( 3904 { 3905 autoOpen: true, 3906 modal: true, 3907 open: function (event, ui) { 3908 if (wip.zip !== "") { 3909 $('#not-found-custom-msg').dialog('option', 'title', 'Information'); 3910 $('.js-change-msg').empty().html(wip.donation.warningMessage); 3911 } else { 3912 $(this).dialog('close'); 3913 window.location = satruck.config.urls.home; 3914 } 3915 $('footer').addClass('hidden'); 3916 }, 3917 buttons: [ 3918 { 3919 text: "Ok", 3920 click: function () { 3921 $(this).dialog("close"); 3922 window.location = satruck.config.urls.home; 3923 }, 3924 'class': 'btn btn-default dialog-confirm' 3925 }] 3926 });
3927 } 3928 } 3929 3930 $("#pickup_or_dropoff").hide(); 3931 $("#pickup_only").hide(); 3932 3933 } 3934 } 3935 else { 3936 //Tealium 3937 satruck.tealium._setPickupSubPageTealium("0-1"); 3938 3939 if (wip.donation.warningMessage) { 3940 var arcWarningFound = wip.donation.warningMessage.trim(); 3941 3942 if (arcWarningFound.length >= 5) { 3943 DN.Utils.ShowError(arcWarningFound); 3944 } 3945 } 3946 3947 satruck.controller.pickup.loadItemSelect(apiResult); 3948 wip.stepDetails.push({ step: 0, stepData: "note: items loaded", timestamp: UTC_TIMESTAMP }); 3949 3950 //animate while items list is retrieved 3951 3952 $("#pickup_or_dropoff").show(function () { 3953 $('footer .container').css('opacity', '1'); 3954 }); 3955 $("#pickup_only").hide(); 3956 //$("#pickup_or_dropoff").addClass("slide-up"); 3957 3958 wip.currentStep = 1; 3959 wip.dropOutStep = 2; 3960 wip.stepDetails.push({ step: 1, stepData: "begin item selection", timestamp: UTC_TIMESTAMP }); 3961 3962 //show processing icon 3963 satruck.api.GetLocationListing(zip, function (apiResult) { 3964 today = new Date(); 3965 UTC_TIMESTAMP = today.toUTCString(); 3966 3967 if (apiResult && apiResult.Success == true && apiResult.RetVal.ResultsCount > 0) { 3968 $("#no-matches-alert").hide(); 3969 satruck.controller.dropoff.loadMap(apiResult); 3970 } 3971 else { 3972 satruck.controller.dropoff.loadMap(apiResult); 3973 $("#no-matches-alert").show(); 3974 $(".dropoff-steps").hide(); 3975 } 3976 }); 3977 3978 satruck.api.GetRouteDefaults(wip.tid, function (rdApiResult) { 3979 if (rdApiResult && rdApiResult.Success == true) { 3980 satruck.controller.pickup.loadRouteDefaults(rdApiResult); 3981 wip.stepDetails.push({ step: 0, stepData: "note: categories loaded", timestamp: UTC_TIMESTAMP }); 3982 satruck.config._persistWorkflowData(wip); 3983 } 3984 else { 3985 wip.stepDetails.push({ step: 0, stepData: "err:" + innerApiResult.ErrorMessage + ";minor: using hard-coded route defaults", timestamp: UTC_TIMESTAMP }); 3986 satruck.config._persistWorkflowData(wip); 3987 } 3988 }); 3989 3990 satruck.api.GetCategories(wip.tid, function (innerApiResult) { 3991 if (innerApiResult && innerApiResult.Success == true) { 3992 satruck.controller.pickup.loadCategorySelect(innerApiResult, wip.tid, wip.donation.furnitureQuickSelectAllowed); 3993 wip.stepDetails.push({ step: 0, stepData: "note: categories loaded", timestamp: UTC_TIMESTAMP }); 3994 satruck.config._persistWorkflowData(wip); 3995 } 3996 else { 3997 wip.hasErrors = true; 3998 wip.stepDetails.push({ step: 0, stepData: "err:" + innerApiResult.ErrorMessage + ";terminate: aborted failed workflow", timestamp: UTC_TIMESTAMP }); 3999 satruck.config._persistWorkflowData(wip); 4000 4001 //satruck.api.SubmitWorkflowData(wip); 4002 4003 //show alert 4004 DN.Utils.ShowError(innerApiResult.ErrorMessage); 4005 $("#pickup_or_dropoff").hide(); 4006 $("#pickup_only").hide(); 4007 } 4008 }); 4009 } 4010 4011 var chatActive = $('#chatActive').val() == "True"; 4012 4013 if (zipinfo.Territory_id == 40 && chatActive) { 4014 var chatPoc = $('#chatPoc').val(); 4015 icPatronChat.init({ serverHost: 'https://home-c12.incontact.com', bus_no: 4594957, poc: chatPoc, params: ['FirstName', 'Last Name', '[email protected]', 555 - 555 - 5555] }); 4016 } 4017 } 4018 else { 4019 var wip = satruck.config._loadWorkflowData(); 4020 wip.hasErrors = true; 4021 wip.stepDetails.push({ step: 0, stepData: "err:" + apiResult.ErrorMessage + ";terminate: aborted failed workflow", timestamp: UTC_TIMESTAMP }); 4022 satruck.config._persistWorkflowData(wip); 4023 4024 //satruck.api.SubmitWorkflowData(wip); 4025 4026 //show alert 4027 DN.Utils.ShowError(apiResult.ErrorMessage); 4028 $("#pickup_or_dropoff").hide(); 4029 $("#pickup_only").hide(); 4030 } 4031 }); 4032 } 4033 4034 }, 4035 4036 start_giving: function (type, zip, ismobile) { 4037 debugger 4038 var today = new Date(); 4039 var UTC_TIMESTAMP = today.toUTCString(); 4040 var wip = satruck.config._loadWorkflowData(); 4041 //check for timeout 4042 if (wip && wip.stepDetails && wip.stepDetails.length) { 4043 try { 4044 var lastactivity = wip.stepDetails[wip.stepDetails.length - 1]; 4045 var utc_time = new Date(lastactivity.timestamp); 4046 //longer than 3 days 4047 if (today > utc_time.setTime(utc_time.getTime() + (3 * 24 * 60 * 60 * 1000))) { 4048 wip.hasTimedOut = true; 4049 } 4050 } 4051 catch (err) { 4052 } 4053 } 4054 4055 //Tealium 4056 if (satruck.account.is_logged_in()) { 4057 var DonorLogin = satruck.config._getDonorLogin(); 4058 utag_data.customer_id = DonorLogin.DonorUserId; 4059 /*utag_data.customer_username = DonorLogin.Email; 4060 utag_data.customer_status = "logged in"; 4061 utag_data.customer_type = "donor logged in"; 4062 utag_data.customer_email = DonorLogin.Email; 4063 utag_data.customer_city = DonorLogin.City; 4064 utag_data.customer_state = DonorLogin.State; 4065 utag_data.customer_zip = DonorLogin.ZipCode; 4066 utag_data.customer_country = "US";*/ 4067 } 4068 else { 4069 utag_data.customer_id = ""; 4070 /*utag_data.customer_username = ""; 4071 utag_data.customer_status = "not logged in"; 4072 utag_data.customer_type = "not logged in"; 4073 utag_data.customer_city = ""; 4074 utag_data.customer_state = ""; 4075 utag_data.customer_zip = zip; 4076 utag_data.customer_country = "US";*/ 4077 } 4078 utag_data.zip = zip; 4079 //Donor Check 4080 if (!wip || wip.isComplete || wip.hasTimedOut || wip.hasErrors || wip.zip != zip) { 4081 satruck.config._clearCacheOrSignOut(false); 4082 4083 wip = $.extend({}, satruck.workflow.default); 4084 wip.id = DN.Utils.CreateUUID(); 4085 4086 $("[name='devnext_unique_session']").val(wip.id); 4087 utag_data.devnext_unique_session = wip.id; 4088 utag_data["404_Check"] = "Schedule a Pickup"; 4089 utag_data.event_type = 0; 4090 utag_data.donate_dss_app_view = false; 4091 utag_data.donate_SourceType = 0; 4092 utag_data.donate_my_pickups_url = "https://dss.satruck.org/MyPickups"; 4093 utag_data.ajax_donor_crossstreet = "N/A"; 4094 wip.startedAt = "Home_Index"; 4095 wip.name = (type == 0 ? "FindDropoff" : (type == 1 ? "SchedulePickup" : (type == 2 ? "VehicleOrder" : (type == 3 ? "FindFamilyStore" : "General")))); 4096 } 4097 else if (wip.donationType != type) { 4098 wip.isComplete = true; 4099 wip.stepDetails.push({ step: 0, stepData: "typechange:" + "Completed workflow due to change in type", timestamp: UTC_TIMESTAMP }); 4100 satruck.config._persistWorkflowData(wip); 4101 4102 //satruck.api.SubmitWorkflowData(wip); 4103 4104 wip = $.extend({}, satruck.workflow.default); 4105 wip.id = DN.Utils.CreateUUID(); 4106 wip.startedAt = "Home_Index"; 4107 wip.name = (type == 0 ? "FindDropoff" : (type == 1 ? "SchedulePickup" : (type == 2 ? "VehicleOrder" : (type == 3 ? "FindFamilyStore" : "General")))); 4108 } 4109 wip.donationType = type; 4110 wip.currentStep = 0;
4111 wip.dropOutStep = 0; 4112 wip.stepDetails = []; 4113 wip.stepDetails.push({ step: 0, stepData: "t:" + type, timestamp: UTC_TIMESTAMP }); 4114 wip.stepDetails.push({ step: 0, stepData: zip, timestamp: UTC_TIMESTAMP }); 4115 wip.zip = zip; 4116 satruck.config._persistWorkflowData(wip); 4117 4118 if (type == satruck.config.lookup.DropoffType) { 4119 $ctl = $('#dropOffZip'); 4120 } 4121 else if (type == satruck.config.lookup.PickupType) { 4122 $ctl = $('#pickupZip'); 4123 } 4124 else if (type == satruck.config.lookup.VehicleType) { 4125 $ctl = $('#vehicleZip'); 4126 } 4127 else if (type == satruck.config.lookup.FamilyStoreType) { 4128 $ctl = $('#familyStoreZip'); 4129 } 4130 4131 if (zip && $ctl.length && !ismobile) { 4132 //show processing icon 4133 var allowClosest = type != satruck.config.lookup.PickupType; 4134 satruck.api.GetZipInfo(zip, allowClosest, function (apiResult) { 4135 today = new Date(); 4136 UTC_TIMESTAMP = today.toUTCString(); 4137 4138 if (apiResult && apiResult.Success == true) { 4139 if (type == satruck.config.lookup.PickupType && apiResult.RetVal.Territory_id == 30 && apiResult.RetVal.Arc_id == 135 ) 4140 { 4141 window.open('https://resupply.link/sa-indianapolis', '_blank'); 4142 } 4143 else if (type == satruck.config.lookup.PickupType && apiResult.RetVal.Territory_id == 30 && apiResult.RetVal.Arc_id == 175 ) 4144 { 4145 window.open('https://resupply.link/sa-st-louis', '_blank'); 4146 } 4147 else if (type == satruck.config.lookup.PickupType && apiResult.RetVal.Territory_id == 30 && apiResult.RetVal.Arc_id == 105 4148 && apiResult.RetVal.NotServiced == true) 4149 { 4150 window.open('https://resupply.link/sa-chicago', '_blank'); 4151 } 4152 //else if (type == satruck.config.lookup.PickupType && apiResult.RetVal.Territory_id == 30 && apiResult.RetVal.Arc_id == 110 4153 //&& apiResult.RetVal.NotServiced == true) 4154 else if (type == satruck.config.lookup.PickupType && apiResult.RetVal.Territory_id == 30 && apiResult.RetVal.Arc_id == 110) 4155 { 4156 window.open('https://resupply.link/sa-des-moines', '_blank'); 4157 } 4158 else if (type == satruck.config.lookup.PickupType && apiResult.RetVal.Territory_id == 30 && apiResult.RetVal.Arc_id == 115 4159 && apiResult.RetVal.NotServiced == true) 4160 { 4161 window.open('https://resupply.link/sa-flint', '_blank'); 4162 } 4163 else if (type == satruck.config.lookup.PickupType && apiResult.RetVal.Territory_id == 30 && apiResult.RetVal.Arc_id == 115 4164 && apiResult.RetVal.NotServiced == true) 4165 { 4166 window.open('https://resupply.link/sa-flint', '_blank'); 4167 } 4168 else if (type == satruck.config.lookup.PickupType && apiResult.RetVal.Territory_id == 30 && apiResult.RetVal.Arc_id == 120 4169 && apiResult.RetVal.NotServiced == true) 4170 { 4171 window.open('https://resupply.link/sa-fort-wayne', '_blank'); 4172 } 4173 else if (type == satruck.config.lookup.PickupType && apiResult.RetVal.Territory_id == 30 && apiResult.RetVal.Arc_id == 130 4174 && apiResult.RetVal.NotServiced == true) 4175 { 4176 window.open('https://resupply.link/sa-grand-rapids', '_blank'); 4177 } 4178 else if (type == satruck.config.lookup.PickupType && apiResult.RetVal.Territory_id == 30 && apiResult.RetVal.Arc_id == 135 4179 && apiResult.RetVal.NotServiced == true) 4180 { 4181 window.open('https://resupply.link/sa-indianapolis', '_blank'); 4182 } 4183 else if (type == satruck.config.lookup.PickupType && apiResult.RetVal.Territory_id == 30 && apiResult.RetVal.Arc_id == 140 4184 && apiResult.RetVal.NotServiced == true) 4185 { 4186 window.open('https://resupply.link/sa-kansas-city', '_blank'); 4187 } 4188 else if (type == satruck.config.lookup.PickupType && apiResult.RetVal.Territory_id == 30 && apiResult.RetVal.Arc_id == 145 4189 && apiResult.RetVal.NotServiced == true) 4190 { 4191 window.open('https://resupply.link/sa-milwaukee', '_blank'); 4192 } 4193 else if (type == satruck.config.lookup.PickupType && apiResult.RetVal.Territory_id == 30 && apiResult.RetVal.Arc_id == 150 4194 && apiResult.RetVal.NotServiced == true) 4195 { 4196 window.open('https://resupply.link/sa-minneapolis', '_blank'); 4197 } 4198 else if (type == satruck.config.lookup.PickupType && apiResult.RetVal.Territory_id == 30 && apiResult.RetVal.Arc_id == 160 4199 && apiResult.RetVal.NotServiced == true) 4200 { 4201 window.open('https://resupply.link/sa-river-valley', '_blank'); 4202 } 4203 else if (type == satruck.config.lookup.PickupType && apiResult.RetVal.Territory_id == 30 && apiResult.RetVal.Arc_id == 165 4204 && apiResult.RetVal.NotServiced == true) 4205 { 4206 window.open('https://resupply.link/sa-rockford', '_blank'); 4207 } 4208 else if (type == satruck.config.lookup.PickupType && apiResult.RetVal.Territory_id == 30 && apiResult.RetVal.Arc_id == 185 4209 && apiResult.RetVal.NotServiced == true) 4210 { 4211 window.open('https://resupply.link/sa-southeast-michigan', '_blank'); 4212 } 4213 else if (type == satruck.config.lookup.PickupType && apiResult.RetVal.Territory_id == 30 && apiResult.RetVal.Arc_id == 195 4214 && apiResult.RetVal.NotServiced == true) 4215 { 4216 window.open('https://resupply.link/sa-waukegan', '_blank'); 4217 } 4218 else { 4219 var zipinfo = apiResult.RetVal; 4220 //Check if donor expereience is enabled for territory 4221 if (zipinfo.Territory_id) { 4222 satruck.donorExperienceEnabled = DN.Validation.isDonorExperienceEnabled(zipinfo.Territory_id, zipinfo.Arc_id); 4223 } 4224 4225 //COVID-19 Form Active for Territory 4226 var CovidFormActive = false; 4227 if (zipinfo.Arc_id != -1) { 4228 satruck.api.CheckCovidFormActive(zipinfo.Territory_id, zip, function (apiResult) { 4229 if (apiResult != null) { 4230 CovidFormActive = apiResult.RetVal.CovidFormActive; 4231 }; 4232 });
4233 } 4234 4235 if (type == satruck.config.lookup.VehicleType) { 4236 var wip = satruck.config._loadWorkflowData(); 4237 wip.zipstate = zipinfo.ZipState; 4238 wip.zipcity = zipinfo.ZipCity; 4239 wip.tid = zipinfo.Territory_id; 4240 wip.territoryAbbr = (wip.tid == 10 ? "USE" : (wip.tid == 20 ? "USS" : (wip.tid == 30 ? "USC" : (wip.tid == 40 ? "USW" : "UNKNOWN")))); 4241 wip.donation = $.extend({}, satruck.vehicleorder.default); 4242 wip.donation.isMobile = satruck.config.ismobile; 4243 wip.donation.sourceType = satruck.config._getSourceType(); 4244 wip.donation.tid = zipinfo.Territory_id; 4245 wip.donation.aid = zipinfo.Arc_id; 4246 wip.donation.arcname = zipinfo.ArcName; 4247 wip.donation.sectorId = zipinfo.Sector_id; 4248 wip.donation.notServiced = zipinfo.NotServiced; 4249 wip.donation.carsEnabled = zipinfo.CARSEnabled; 4250 wip.donation.carsUrl = zipinfo.CARSUrl; 4251 wip.donation.warningMessage = zipinfo.WarningMessage; 4252 4253 wip.stepDetails.push({ step: 0, stepData: "tid:" + wip.donation.tid, timestamp: UTC_TIMESTAMP }); 4254 wip.stepDetails.push({ step: 0, stepData: "abbr:" + wip.territoryAbbr, timestamp: UTC_TIMESTAMP }); 4255 wip.stepDetails.push({ step: 0, stepData: "aid:" + wip.donation.aid, timestamp: UTC_TIMESTAMP }); 4256 wip.stepDetails.push({ step: 0, stepData: "sectorid:" + wip.donation.sectorId, timestamp: UTC_TIMESTAMP }); 4257 wip.stepDetails.push({ step: 0, stepData: "notServiced:" + wip.donation.notServiced, timestamp: UTC_TIMESTAMP }); 4258 wip.stepDetails.push({ step: 0, stepData: "warningMessage:" + wip.donation.warningMessage, timestamp: UTC_TIMESTAMP }); 4259 wip.currentStep = 1; 4260 wip.dropOutStep = 2; 4261 wip.stepDetails.push({ step: 1, stepData: "redirect to vehiclecreate", timestamp: UTC_TIMESTAMP }); 4262 4263 satruck.config._persistWorkflowData(wip); 4264 4265 // Central Territory ARC Vehicle Donation redirect 4266 if (wip.tid == 30 && wip.donation.aid != -1) { 4267 window.location = "https://centralusa-salvationarmy.careasy.org/home?zip=" + zip; 4268 return; 4269 } 4270 4271 //CARS redirect 4272 if (wip.donation.notServiced == true && wip.donation.carsEnabled == true && wip.donation.carsUrl.length > 2) { 4273 wip.hasErrors = true; 4274 wip.stepDetails.push({ step: 0, stepData: "notserviced: Redirecting to CARS", timestamp: UTC_TIMESTAMP }); 4275 satruck.config._persistWorkflowData(wip); 4276 4277 //Log all pertinent info before redirecting 4278 var donor = satruck.config._getDonorLogin(); 4279 4280 var data = { 4281 Zip: zip, 4282 Territory_id: donor != null && donor.Territory_id != null ? donor.Territory_id : null, 4283 Arc_id: donor != null && donor.Arc_id != null ? donor.Arc_id : null, 4284 Donor_id: donor != null && donor.Donor_id != null ? donor.Donor_id : null 4285 }; 4286 4287 DN.Utils.postJSON(satruck.config.urls.logcarsredirect, JSON.stringify(data), function () { 4288 return window.location = wip.donation.carsUrl + "?zip=" + zip; 4289 }); 4290 } 4291 else if (!wip.zipstate || !wip.zipcity) { 4292 satruck.api.GetCityState(zip, function (csApiResult) { 4293 if (csApiResult && csApiResult.Success == true) { 4294 wip = satruck.config._loadWorkflowData(); 4295 wip.zipstate = csApiResult.RetVal.State; 4296 wip.zipcity = csApiResult.RetVal.City; 4297 satruck.config._persistWorkflowData(wip); 4298 } 4299 4300 window.location = satruck.config.urls.vehiclecreate + "?zip=" + zip; 4301 }); 4302 } 4303 else { 4304 window.location = satruck.config.urls.vehiclecreate + "?zip=" + zip; 4305 } 4306 } 4307 else if (type == satruck.config.lookup.PickupType && (zipinfo.Territory_id == 40 || zipinfo.Territory_id == 0) && 4308 (zip == "90620" || zip == "90621" || zip == "90622" || zip == "90623" || zip == "90630")) { 4309 //USW TEMP REDIRECT TO RESUPPLY - PILOT 4310 $('body').removeClass('loading'); 4311 window.open("https://donor.resupplyapp.com/spec/territory/4", '_blank').focus(); 4312 } 4313 else if (type == satruck.config.lookup.DropoffType) { 4314 var wip = satruck.config._loadWorkflowData(); 4315 wip.zipstate = zipinfo.ZipState; 4316 wip.zipcity = zipinfo.ZipCity; 4317 wip.tid = zipinfo.Territory_id; 4318 wip.territoryAbbr = (wip.tid == 10 ? "USE" : (wip.tid == 20 ? "USS" : (wip.tid == 30 ? "USC" : (wip.tid == 40 ? "USW" : "UNKNOWN")))); 4319 wip.donation = $.extend({}, satruck.dropoffticket.default); 4320 wip.donation.tid = zipinfo.Territory_id; 4321 wip.donation.aid = zipinfo.Arc_id; 4322 wip.donation.arcname = zipinfo.ArcName; 4323 wip.stepDetails.push({ step: 0, stepData: "tid:" + wip.donation.tid, timestamp: UTC_TIMESTAMP }); 4324 wip.stepDetails.push({ step: 0, stepData: "abbr:" + wip.territoryAbbr, timestamp: UTC_TIMESTAMP }); 4325 wip.stepDetails.push({ step: 0, stepData: "aid:" + wip.donation.aid, timestamp: UTC_TIMESTAMP }); 4326 wip.currentStep = 1;
4327 wip.dropOutStep = 2; 4328 wip.stepDetails.push({ step: 1, stepData: "redirect to dropoffindex", timestamp: UTC_TIMESTAMP }); 4329 4330 satruck.config._persistWorkflowData(wip); 4331 4332 if (!wip.zipstate || !wip.zipcity) { 4333 satruck.api.GetCityState(zip, function (csApiResult) { 4334 if (csApiResult && csApiResult.Success == true) { 4335 wip = satruck.config._loadWorkflowData(); 4336 wip.zipstate = csApiResult.RetVal.State; 4337 wip.zipcity = csApiResult.RetVal.City; 4338 satruck.config._persistWorkflowData(wip); 4339 } 4340 4341 window.location = satruck.config.urls.dropoffindex + "?zip=" + zip; 4342 }); 4343 } 4344 else { 4345 window.location = satruck.config.urls.dropoffindex + "?zip=" + zip; 4346 } 4347 } 4348 else if (type == satruck.config.lookup.PickupType 4349 && zipinfo.NotServiced == true 4350 && zipinfo.ShowZipMasterForm == false 4351 && CovidFormActive == false 4352 && zipinfo.Territory_id == 30 4353 && zipinfo.Arc_id != 110 4354 && zipinfo.Arc_id != 115 4355 && zipinfo.Arc_id != 120 4356 && zipinfo.Arc_id != 135 4357 && zipinfo.Arc_id != 140 4358 && zipinfo.Arc_id != 160 4359 && zipinfo.Arc_id != 165 4360 && zipinfo.Arc_id != 175 4361 && zipinfo.Arc_id != 185 4362 ) { 4363 debugger 4364 $('body').removeClass('loading'); 4365 if (zipinfo.Arc_id == 155) { 4366 DN.Utils.ShowError('This center is no longer accepting online pickups. Thank you for your consideration and please contact 1-800-SATruck for more information.', 'Area Not Serviced'); 4367 } 4368 else if (zipinfo.Arc_id == 0) { 4369 DN.Utils.ShowError('<center>Onine scheduling is not available for this Zip Code, Please contact The Salvation Army Family Thrift Store, 1737 S Campbell, Springfield MO<br/><b> by Emailing:</b> <br/>[email protected] <br/>[email protected]<br/><b> Or by Calling:</b><br/> Phone: (417) 866-9426</center>', 'Area Not Serviced'); 4370 } 4371 else { 4372 DN.Utils.ShowError('We have been unable to resume pickups in your area but plan on reopening soon. Please check back with us and thank you for your understanding.', 'Area Not Serviced'); 4373 } 4374 } 4375 //Redirects user to dropoff locations if zip is unserviced and without a custom message 4376 else if (type == satruck.config.lookup.PickupType 4377 && zipinfo.NotServiced == true 4378 && zipinfo.ShowZipMasterForm == false 4379 && zipinfo.Arc_id != 110 4380 && zipinfo.Arc_id != 115 4381 && zipinfo.Arc_id != 120 4382 && zipinfo.Arc_id != 135 4383 && zipinfo.Arc_id != 140 4384 && zipinfo.Arc_id != 160 4385 && zipinfo.Arc_id != 165 4386 && zipinfo.Arc_id != 175 4387 && zipinfo.Arc_id != 185 4388 && CovidFormActive == false 4389 && (!zipinfo.WarningMessage || zipinfo.WarningMessage == zip + ' is not serviced.' || zipinfo.WarningMessage.trim() == '' || zipinfo.WarningMessage.trim() == '.')) { 4390 debugger 4391 if(zipinfo.Territory_id == 10 4392 && (zipinfo.Arc_id == 6 4393 || zipinfo.Arc_id == 3 4394 || zipinfo.Arc_id == 4 4395 || zipinfo.Arc_id == 8 4396 || zipinfo.Arc_id == 11 4397 || zipinfo.Arc_id == 12 4398 || zipinfo.Arc_id == 13 4399 || zipinfo.Arc_id == 15 4400 || zipinfo.Arc_id == 16 4401 || zipinfo.Arc_id == 18 4402 || zipinfo.Arc_id == 21 4403 || zipinfo.Arc_id == 23 4404 || zipinfo.Arc_id == 25 4405 || zipinfo.Arc_id == 26 4406 || zipinfo.Arc_id == 27 4407 || zipinfo.Arc_id == 28 4408 || zipinfo.Arc_id == 29 4409 || zipinfo.Arc_id == 30 4410 || zipinfo.Arc_id == 32 4411 || zipinfo.Arc_id == 33 4412 || zipinfo.Arc_id == 34 4413 || zipinfo.Arc_id == 36 4414 || zipinfo.Arc_id == 37 4415 || zipinfo.Arc_id == 38 4416 || zipinfo.Arc_id == 39)){ 4417 window.location = satruck.config.urls.donatechoose + "?zip=" + zip; 4418 } 4419 else { 4420 var wip = satruck.config._loadWorkflowData(); 4421 wip.zipstate = zipinfo.ZipState; 4422 wip.zipcity = zipinfo.ZipCity; 4423 wip.tid = zipinfo.Territory_id; 4424 wip.territoryAbbr = (wip.tid == 10 ? "USE" : (wip.tid == 20 ? "USS" : (wip.tid == 30 ? "USC" : (wip.tid == 40 ? "USW" : "UNKNOWN")))); 4425 wip.donation = $.extend({}, satruck.dropoffticket.default); 4426 wip.donation.tid = zipinfo.Territory_id; 4427 wip.donation.aid = zipinfo.Arc_id; 4428 wip.donation.furnitureQuickSelectAllowed = zipinfo.AllowFurnitureQuickSelect; 4429 wip.donation.arcname = zipinfo.ArcName; 4430 wip.stepDetails.push({ step: 0, stepData: "tid:" + wip.donation.tid, timestamp: UTC_TIMESTAMP }); 4431 wip.stepDetails.push({ step: 0, stepData: "abbr:" + wip.territoryAbbr, timestamp: UTC_TIMESTAMP }); 4432 wip.stepDetails.push({ step: 0, stepData: "aid:" + wip.donation.aid, timestamp: UTC_TIMESTAMP }); 4433 wip.currentStep = 1;
4434 wip.dropOutStep = 2; 4435 wip.stepDetails.push({ step: 1, stepData: "redirect to dropoffindex", timestamp: UTC_TIMESTAMP }); 4436 wip.donation.notServiced = zipinfo.NotServiced; 4437 wip.donation.warningMessage = 'Unfortunately, pickup service is not currently available in your area, but your donation is still greatly needed and appreciated. Please check below for a convenient drop-off location near you, or call us at <a href="tel:+18007287825">' + (wip.tid == 40 ? '1-800-728-7825' : '1-800-SA-Truck (1-800-728-7825)') + '</a> for further assistance.'; 4438 satruck.config._persistWorkflowData(wip); 4439 4440 window.location = satruck.config.urls.dropoffindex + "?zip=" + zip; 4441 } 4442 } 4443 else if (type == satruck.config.lookup.FamilyStoreType) { 4444 var wip = satruck.config._loadWorkflowData(); 4445 wip.zipstate = zipinfo.ZipState; 4446 wip.zipcity = zipinfo.ZipCity; 4447 wip.tid = zipinfo.Territory_id; 4448 wip.territoryAbbr = (wip.tid == 10 ? "USE" : (wip.tid == 20 ? "USS" : (wip.tid == 30 ? "USC" : (wip.tid == 40 ? "USW" : "UNKNOWN")))); 4449 wip.donation = $.extend({}, satruck.dropoffticket.default); 4450 wip.donation.tid = zipinfo.Territory_id; 4451 wip.donation.aid = zipinfo.Arc_id; 4452 wip.donation.arcname = zipinfo.ArcName; 4453 wip.stepDetails.push({ step: 0, stepData: "tid:" + wip.donation.tid, timestamp: UTC_TIMESTAMP }); 4454 wip.stepDetails.push({ step: 0, stepData: "abbr:" + wip.territoryAbbr, timestamp: UTC_TIMESTAMP }); 4455 wip.stepDetails.push({ step: 0, stepData: "aid:" + wip.donation.aid, timestamp: UTC_TIMESTAMP }); 4456 wip.currentStep = 1; 4457 wip.dropOutStep = 2; 4458 wip.stepDetails.push({ step: 1, stepData: "redirect to familystoreindex", timestamp: UTC_TIMESTAMP }); 4459 4460 satruck.config._persistWorkflowData(wip); 4461 4462 if (!wip.zipstate || !wip.zipcity) { 4463 satruck.api.GetCityState(zip, function (csApiResult) { 4464 if (csApiResult && csApiResult.Success == true) { 4465 wip = satruck.config._loadWorkflowData(); 4466 wip.zipstate = csApiResult.RetVal.State; 4467 wip.zipcity = csApiResult.RetVal.City; 4468 satruck.config._persistWorkflowData(wip); 4469 } 4470 4471 window.location = satruck.config.urls.familystoreindex + "?zip=" + zip; 4472 }); 4473 } 4474 else { 4475 window.location = satruck.config.urls.familystoreindex + "?zip=" + zip; 4476 } 4477 } 4478 else { 4479 var wip = satruck.config._loadWorkflowData(); 4480 wip.zipstate = zipinfo.ZipState; 4481 wip.zipcity = zipinfo.ZipCity; 4482 wip.tid = zipinfo.Territory_id; 4483 wip.territoryAbbr = (wip.tid == 10 ? "USE" : (wip.tid == 20 ? "USS" : (wip.tid == 30 ? "USC" : (wip.tid == 40 ? "USW" : "UNKNOWN")))); 4484 wip.donation = $.extend({}, satruck.pickuporder.default); 4485 wip.donation.isMobile = satruck.config.ismobile; 4486 wip.donation.sourceType = satruck.config._getSourceType(); 4487 wip.donation.tid = zipinfo.Territory_id; 4488 wip.donation.aid = zipinfo.Arc_id; 4489 wip.donation.arcname = zipinfo.ArcName; 4490 wip.donation.sectorId = zipinfo.Sector_id; 4491 wip.donation.notServiced = zipinfo.NotServiced; 4492 wip.donation.callAheadAllowed = DN.Validation.isCallAheadAllowed(wip.donation.tid, wip.donation.aid); 4493 wip.donation.callAheadTimeOptions = satruck.controller.pickup.getCallAheadMinutes(wip.donation.tid); 4494 wip.donation.warningMessage = zipinfo.WarningMessage; 4495 wip.donation.showZipMasterForm = zipinfo.ShowZipMasterForm; 4496 wip.donation.zipMasterEmail = zipinfo.ZipMasterEmail; 4497 wip.donation.zipMasterPhone = zipinfo.ZipMasterPhone; 4498 4499 wip.stepDetails.push({ step: 0, stepData: "tid:" + wip.donation.tid, timestamp: UTC_TIMESTAMP }); 4500 wip.stepDetails.push({ step: 0, stepData: "abbr:" + wip.territoryAbbr, timestamp: UTC_TIMESTAMP }); 4501 wip.stepDetails.push({ step: 0, stepData: "aid:" + wip.donation.aid, timestamp: UTC_TIMESTAMP }); 4502 wip.stepDetails.push({ step: 0, stepData: "sectorid:" + wip.donation.sectorId, timestamp: UTC_TIMESTAMP }); 4503 wip.stepDetails.push({ step: 0, stepData: "notServiced:" + wip.donation.notServiced, timestamp: UTC_TIMESTAMP }); 4504 wip.stepDetails.push({ step: 0, stepData: "callAheadAllowed:" + wip.donation.callAheadAllowed, timestamp: UTC_TIMESTAMP }); 4505 wip.stepDetails.push({ step: 0, stepData: "callAheadTimeOptions:"
4505+ wip.donation.callAheadTimeOptions, timestamp: UTC_TIMESTAMP }); 4506 wip.stepDetails.push({ step: 0, stepData: "warningMessage:" + wip.donation.warningMessage, timestamp: UTC_TIMESTAMP }); 4507 wip.stepDetails.push({ step: 0, stepData: "changeworkflow:" + "Completed step 0 on 'Home_Index' redirect to donatechoose", timestamp: UTC_TIMESTAMP }); 4508 satruck.config._persistWorkflowData(wip); 4509 4510 if (!wip.zipstate || !wip.zipcity) { 4511 satruck.api.GetCityState(zip, function (csApiResult) { 4512 if (csApiResult && csApiResult.Success == true) { 4513 wip = satruck.config._loadWorkflowData(); 4514 wip.zipstate = csApiResult.RetVal.State; 4515 wip.zipcity = csApiResult.RetVal.City; 4516 satruck.config._persistWorkflowData(wip); 4517 } 4518 4519 window.location = satruck.config.urls.donatechoose + "?zip=" + zip; 4520 }); 4521 } 4522 else { 4523 window.location = satruck.config.urls.donatechoose + "?zip=" + zip; 4524 } 4525 } 4526 } 4527 4528 } 4529 else { 4530 var wip = satruck.config._loadWorkflowData(); 4531 wip.hasErrors = true; 4532 wip.stepDetails.push({ step: 0, stepData: "err:" + apiResult.ErrorMessage + ";terminate: aborted failed workflow", timestamp: UTC_TIMESTAMP }); 4533 satruck.config._persistWorkflowData(wip); 4534 4535 //satruck.api.SubmitWorkflowData(wip); 4536 4537 //show alert 4538 DN.Utils.ShowError(apiResult.ErrorMessage); 4539 $ctl.addClass("has-error"); 4540 } 4541 }); 4542 } 4543 else if (ismobile) { 4544 if (type == satruck.config.lookup.VehicleType) { 4545 window.location = satruck.config.urls.vehiclecreate; 4546 } 4547 else if (type == satruck.config.lookup.DropoffType) { 4548 window.location = satruck.config.urls.dropoffindex + "?zip=" + zip; 4549 } 4550 else if (type == satruck.config.lookup.FamilyStoreType) { 4551 window.location = satruck.config.urls.familystoreindex + "?zip=" + zip; 4552 } 4553 else { 4554 window.location = satruck.config.urls.donatechoose; 4555 } 4556 } 4557 else { 4558 window.location = satruck.config.urls.donatelanding + "?zip=" + zip; 4559 } 4560 }, 4561 ReSupplyView: function (type) { 4562 var donationType = '', Generic1 = ''; 4563 if (type == "Unserviced Zips") { 4564 donationType = 'ReSupply View (Unserviced Zip)'; 4565 Generic1 = 'ReSupply Unservised Zip Page View'; 4566 } else if (type == "Pickups Disabled") { 4567 donationType = 'ReSupply View (Pickup Disabled)'; 4568 Generic1 = 'ReSupply Pickup Disabled Page View'; 4569 } 4570 var wip = satruck.config._loadWorkflowData(); 4571 var user = satruck.account._loadUser(true); 4572 wip.donation.donor = user; 4573 wip.donation.did = user.Donor_id; 4574 const urlParams = new URLSearchParams(window.location.search); 4575 var param1Value = urlParams.get('zip'); 4576 satruck.api.LogReSupplyPickupbuttonclick(user.DonorUserId, donationType, wip.donation.tid, wip.donation.aid, 44, wip.donation.did, Generic1, param1Value, function (apiResult) { }); 4577 }, 4578 4579 priorityPickupClick: function (type) { 4580 debugger 4581 var wip = satruck.config._loadWorkflowData(); 4582 if(wip.donation.tid == 10 && wip.donation.aid == 6) 4583 { 4584 window.open('https://donor.resupplyapp.com/spec/charity/562', '_blank'); 4585 } else if(wip.donation.tid == 10 && wip.donation.aid == 3) 4586 { 4587 window.open('https://donor.resupplyapp.com/spec/charity/566', '_blank'); 4588 } else if(wip.donation.tid == 10 && wip.donation.aid == 4) 4589 { 4590 window.open('https://donor.resupplyapp.com/spec/charity/776', '_blank'); 4591 } else if(wip.donation.tid == 10 && wip.donation.aid == 8) 4592 { 4593 window.open('https://donor.resupplyapp.com/spec/charity/563', '_blank'); 4594 } else if(wip.donation.tid == 10 && wip.donation.aid == 11) 4595 { 4596 window.open('https://donor.resupplyapp.com/spec/charity/777', '_blank'); 4597 } else if(wip.donation.tid == 10 && wip.donation.aid == 12) 4598 { 4599 window.open('https://donor.resupplyapp.com/spec/charity/778', '_blank'); 4600 } else if(wip.donation.tid == 10 && wip.donation.aid == 13) 4601 { 4602 window.open('https://donor.resupplyapp.com/spec/charity/779', '_blank'); 4603 } else if(wip.donation.tid == 10 && wip.donation.aid == 15) 4604 { 4605 window.open('https://donor.resupplyapp.com/spec/charity/780', '_blank'); 4606 } else if(wip.donation.tid == 10 && wip.donation.aid == 16) 4607 { 4608 window.open('https://donor.resupplyapp.com/spec/charity/781', '_blank'); 4609 } else if(wip.donation.tid == 10 && wip.donation.aid == 18) 4610 { 4611 window.open('https://donor.resupplyapp.com/spec/charity/575', '_blank'); 4612 } else if(wip.donation.tid == 10 && wip.donation.aid == 21) 4613 { 4614 window.open('https://donor.resupplyapp.com/spec/charity/577', '_blank'); 4615 } else if(wip.donation.tid == 10 && wip.donation.aid == 23) 4616 { 4617 window.open('https://donor.resupplyapp.com/spec/charity/579', '_blank'); 4618 } else if(wip.donation.tid == 10 && wip.donation.aid == 25) 4619 { 4620 window.open('https://donor.resupplyapp.com/spec/charity/783', '_blank'); 4621 } else if(wip.donation.tid == 10 && wip.donation.aid == 26) 4622 { 4623 window.open('https://donor.resupplyapp.com/spec/charity/784', '_blank'); 4624 } else if(wip.donation.tid == 10 && wip.donation.aid == 27) 4625 { 4626 window.open('https://donor.resupplyapp.com/spec/charity/564', '_blank'); 4627 } else if(wip.donation.tid == 10 && wip.donation.aid == 28) 4628 { 4629 window.open('https://donor.resupplyapp.com/spec/charity/583', '_blank'); 4630 } else if(wip.donation.tid == 10 && wip.donation.aid == 29) 4631 { 4632 window.open('https://donor.resupplyapp.com/spec/charity/584', '_blank'); 4633 } else if(wip.donation.tid == 10 && wip.donation.aid == 30) 4634 { 4635 window.open('https://donor.resupplyapp.com/spec/charity/585', '_blank'); 4636 } else if(wip.donation.tid == 10 && wip.donation.aid == 32) 4637 { 4638 window.open('https://donor.resupplyapp.com/spec/charity/785', '_blank'); 4639 } else if(wip.donation.tid == 10 && wip.donation.aid == 33) 4640 { 4641 window.open('https://donor.resupplyapp.com/spec/charity/587', '_blank'); 4642 } else if(wip.donation.tid == 10 && wip.donation.aid == 34) 4643 { 4644 window.open('https://donor.resupplyapp.com/spec/charity/588', '_blank'); 4645 } else if(wip.donation.tid == 10 && wip.donation.aid == 36) 4646 { 4647 window.open('https://donor.resupplyapp.com/spec/charity/786', '_blank'); 4648 } else if(wip.donation.tid == 10 && wip.donation.aid == 37) 4649 { 4650 window.open('https://donor.resupplyapp.com/spec/charity/787', '_blank'); 4651 } else if(wip.donation.tid == 10 && wip.donation.aid == 38) 4652 { 4653 window.open('https://donor.resupplyapp.com/spec/charity/788', '_blank'); 4654 } else if(wip.donation.tid == 10 && wip.donation.aid == 39) 4655 { 4656 window.open('https://donor.resupplyapp.com/spec/charity/543', '_blank'); 4657 } else if(wip.donation.tid == 10 && wip.donation.aid == 0) 4658 { 4659 window.open('https://donor.resupplyapp.com/spec/charity/543', '_blank'); 4660 } 4661 else{ 4662 window.open('https://donor.resupplyapp.com/spec/territory/4', '_blank'); 4663 } 4664 var donationType = '', Generic1 = ''; 4665 if (type == "Unserviced Zips") { 4666 donationType = 'ReSupply Pickup Order (Unserviced Zip)'; 4667 Generic1 = 'Re Supply Button Click'; 4668 } else if (type == "Pickups Disabled") { 4669 donationType = 'ReSupply Pickup Order (Pickup Disabled)'; 4670 Generic1 = 'Re Supply Button Click'; 4671 } 4672 4673 var user = satruck.account._loadUser(true); 4674 wip.donation.donor = user; 4675 wip.donation.did = user.Donor_id;
4676 const urlParams = new URLSearchParams(window.location.search); 4677 var param1Value = urlParams.get('zip'); 4678 satruck.api.LogReSupplyPickupbuttonclick(user.DonorUserId, donationType, wip.donation.tid, wip.donation.aid, 44, wip.donation.did, Generic1, param1Value, function (apiResult) { }); 4679 4680 }, 4681 4682 dropitOffClick: function (zip, type) { 4683 var donationType = '', Generic1 = ''; 4684 if (type == "Unserviced Zips") { 4685 donationType = 'ReSupply Drop It Off (Unserviced Zip)'; 4686 Generic1 = 'Re Supply Button Click' 4687 } else if (type == "Pickups Disabled") { 4688 donationType = 'ReSupply Drop It Off (Pickup Disabled)'; 4689 Generic1 = 'Re Supply Button Click'; 4690 } 4691 var user = satruck.account._loadUser(true); 4692 var wip = satruck.config._loadWorkflowData(); 4693 wip.donation.donor = user; 4694 wip.donation.did = user.Donor_id; 4695 const urlParams = new URLSearchParams(window.location.search); 4696 var param1Value = urlParams.get('zip'); 4697 satruck.api.LogReSupplyPickupbuttonclick(user.DonorUserId, donationType, wip.donation.tid, wip.donation.aid, 44, wip.donation.did, Generic1, param1Value, function (apiResult) { }); 4698 satruck.controller.start_giving(0, zip, false); 4699 4700 }, 4701 4702 covid_notification_functionality: function () { 4703 var donor = satruck.config._getDonorLogin(); 4704 if (donor != null) { 4705 $("#covid-contact-email").val(donor.Email).prop("disabled", "disabled"); 4706 if (donor.DayPhone) { $("#covid-contact-sms").val(DN.Validation.formatPhone(donor.DayPhone)).prop("disabled", "disabled"); } 4707 if (donor.ZipCode) { $("#covid-contact-zip").val(donor.ZipCode).prop("disabled", "disabled"); } 4708 } 4709 4710 var notificationTypeId = "1"; 4711 var signupSourceId = $("#covid-signup-source").val(); 4712 $(".covid-input .covid-radio").change(function () { 4713 notificationTypeId = $(".covid-notification-type input[name='covid-notification-type']:checked").val(); 4714 $(".covid-notification-type input[name='covid-notification-type']:checked").parent("div").addClass("selected"); 4715 $(".covid-notification-type input[name='covid-notification-type']:not(:checked)").parent("div").removeClass("selected"); 4716 4717 $(".covid-contact-preference").hide(); 4718 switch (notificationTypeId) { 4719 case "1": 4720 $("#covid-email").show(); 4721 break; 4722 case "2": 4723 $("#covid-sms").show(); 4724 break; 4725 } 4726 }); 4727 4728 $("#btnCovidSignup").click(function () { 4729 $("#btnCovidSignup").prop("disabled", true); 4730 satruck.controller.covid_notification_signup(notificationTypeId, signupSourceId, donor); 4731 }); 4732 4733 $("#covid-close-btn").click(function () { 4734 $('#covid-not-serviced-msg').dialog('close'); 4735 }); 4736 4737 4738 $(".covid-input input").keydown(function (e) { 4739 if (e.keyCode == 13) { 4740 $("#btnCovidSignup").prop("disabled", true); 4741 satruck.controller.covid_notification_signup(notificationTypeId, donor); 4742 } 4743 }); 4744 }, 4745 4746 get_faq_data: function formData(form) { 4747 this.tid = form.data('tid'); 4748 this.aid = form.data('aid'); 4749 this.uid = form.data('uid'); 4750 }, 4751 4752 material_design_functionality: function () { 4753 var forms = document.getElementsByClassName('material-form'); 4754 for (var f = 0; f < forms.length; f++) { 4755 var inputs = forms[f].getElementsByClassName("form-field"); 4756 var inputTypes = ['text', 'email', 'tel', 'select-one', 'textarea']; 4757 for (var i = 0; i < inputs.length; i++) { 4758 var input = inputs[i]; 4759 if (typeof input.type !== 'undefined' && inputTypes.indexOf(input.type) >= 0) { 4760 input.addEventListener('focus', (event) => { 4761 event.target.closest(".material-input").classList.add("float-label"); 4762 }, true); 4763 input.addEventListener('blur', (event) => { 4764 if (!event.target.value) { 4765 event.target.closest(".material-input").classList.remove("float-label"); 4766 } 4767 }, true); 4768 } 4769 if (input.value) { 4770 //console.log(input.id + ":" + input.type + "|" + input.value); 4771 input.closest(".material-input").classList.add("float-label"); 4772 } 4773 if (input.type == 'textarea') { 4774 this._resizeTextArea(input); 4775 input.addEventListener('input', (event) => { 4776 this._resizeTextArea(event.target); 4777 });
4778 } 4779 4780 } 4781 } 4782 $('contact-reason').val(''); 4783 }, 4784 4785 //this can be removed when covid signup is removed 4786 covid_notification_signup: function (notificationTypeId, signupSourceId, donor) { 4787 var email; 4788 var phone; 4789 var notificationType = ""; 4790 var signupSource = ""; 4791 var zip = $('#covid-contact-zip').val(); 4792 var validated = false; 4793 4794 switch (notificationTypeId) { 4795 case "1": 4796 email = $('#covid-contact-email').val(); 4797 notificationType = "Email"; 4798 if (!DN.Validation.isValidEmail(email)) { 4799 DN.Validation.ShowErrorEasy('#covid-contact-email'); 4800 $('#covid-contact-email').prop("disabled", false); 4801 } 4802 else { 4803 validated = true; 4804 } 4805 break; 4806 case "2": 4807 phone = DN.Validation.unFormatPhone($('#covid-contact-sms').val()); 4808 notificationType = "Text Message"; 4809 if (!DN.Validation.isValidPhone(phone)) { 4810 DN.Validation.ShowErrorEasy('#covid-contact-sms'); 4811 $('#covid-contact-sms').prop("disabled", false); 4812 } 4813 else { 4814 validated = true; 4815 } 4816 break; 4817 } 4818 4819 switch (signupSourceId) { 4820 case "1": 4821 signupSource = "SATruck"; 4822 break; 4823 case "2": 4824 signupSource = "Thrift Store"; 4825 break; 4826 } 4827 if (!DN.Validation.isValidZip(zip)) { 4828 DN.Validation.ShowErrorEasy('#covid-contact-zip'); 4829 $('#covid-contact-zip').prop("disabled", false); 4830 validated = false; 4831 } 4832 if (validated) { 4833 $('#btnCovidSignup').addClass('spinner'); 4834 4835 var data = { 4836 ZipCode: zip, 4837 Email: email, 4838 Phone: phone, 4839 TerritoryId: donor != null && donor.Territory_id != null ? donor.Territory_id : null, 4840 ArcId: donor != null && donor.Arc_id != null ? donor.Arc_id : null, 4841 DonorId: donor != null && donor.Donor_id != null ? donor.Donor_id : null, 4842 NotificationType: notificationType, 4843 NotificationTypeId: notificationTypeId, 4844 SignupSource: signupSource, 4845 SignupSourceId: signupSourceId 4846 }; 4847 if (donor == null) { 4848 satruck.api.GetZipInfo(zip, false, function (apiResult) { 4849 if (apiResult && apiResult.Success == true) { 4850 var zipinfo = apiResult.RetVal; 4851 data.TerritoryId = zipinfo.Territory_id; 4852 data.Arcid = zipinfo.Arc_id; 4853 } 4854 4855 DN.Utils.postJSON(satruck.config.urls.covidnotificationsignup, JSON.stringify(data), function (res) { 4856 let apiResult = JSON.parse(res.responseText); 4857 if (apiResult.Success) { 4858 $('#covid-notification-form-wrapper').html(`<span id="covid-signup-confirmation">Thank you! We will notify you by ${notificationType.toLowerCase()} when we resume services in your area!</span>`); 4859 window.setTimeout(function () { 4860 if (data.TerritoryId == 10) { 4861 window.location = satruck.config.urls.home; 4862 } 4863 else { 4864 window.location = satruck.config.urls.dropoffindex + "?zip=" + zip; 4865 } 4866 }, 5000); 4867 } 4868 else { 4869 $('#btnCovidSignup').removeClass('spinner'); 4870 $('#btnCovidSignup').prop('disabled', false); 4871 DN.Utils.ShowError('<span class="text-center">Sorry, your signup form did not go through. Please try again!</span>'); 4872 } 4873 }); 4874 4875 }); 4876 } 4877 else { 4878 DN.Utils.postJSON(satruck.config.urls.covidnotificationsignup, JSON.stringify(data), function (res) { 4879 let apiResult = JSON.parse(res.responseText); 4880 if (apiResult.Success) { 4881 $('#covid-notification-form-wrapper').html(`<span id="covid-signup-confirmation">Thank you! We will notify you by ${notificationType.toLowerCase()} when we resume services in your area!</span>`); 4882 window.setTimeout(function () { 4883 if (data.TerritoryId == 10) { 4884 window.location = satruck.config.urls.home; 4885 } 4886 else { 4887 window.location = satruck.config.urls.dropoffindex + "?zip=" + zip; 4888 } 4889 }, 5000); 4890 } 4891 else { 4892 $('#btnCovidSignup').removeClass('spinner'); 4893 $('#btnCovidSignup').prop('disabled', false); 4894 DN.Utils.ShowError('<span class="text-center">Sorry, your signup form did not go through. Please try again!</span>'); 4895 } 4896 }); 4897 } 4898 } 4899 else { 4900 $('#btnCovidSignup').prop('disabled', false); 4901 } 4902 }, 4903 4904 //Workflow entry points for known type of donation 4905 pickupBegin: function (initData) { 4906debugger 4907 $(".step").hide(); 4908 $(".pickup-steps").hide(); 4909 if (initData.isvalid) { 4910 $(".step1").show(); 4911 $(".pickup-steps").show(); 4912 $('.workflow-layout').hide(); 4913 //if (satruck.config.ismobile) { $('.workflow-layout').hide(); } 4914 satruck.controller.setBreadCrumbs(1, 'pickup'); 4915 $('.donation-entry-point').addClass('hidden'); 4916 4917 $('body').addClass('loading'); 4918 4919 var zip = initData.zip; 4920 4921 var today = new Date(); 4922 var UTC_TIMESTAMP = today.toUTCString(); 4923 4924 var wip = satruck.config._loadWorkflowData(); 4925 //check for timeout 4926 if (wip && wip.stepDetails && wip.stepDetails.length) { 4927 try { 4928 var lastactivity = wip.stepDetails[wip.stepDetails.length - 1]; 4929 var utc_time = new Date(lastactivity.timestamp); 4930 //longer than 3 days 4931 if (today > utc_time.setTime(utc_time.getTime() + (3 * 24 * 60 * 60 * 1000))) { 4932 wip.hasTimedOut = true; 4933 } 4934 } 4935 catch (err) { 4936 } 4937 } 4938 4939 //New Stuff For Login 11/6/2015 4940 if (satruck.account.is_logged_in()) { 4941 var DonorLogin = satruck.config._getDonorLogin(); 4942 utag_data.customer_id = DonorLogin.DonorUserId; 4943 /*utag_data.customer_username = DonorLogin.Email; 4944 utag_data.customer_status = "logged in"; 4945 utag_data.customer_type = "donor logged in"; 4946 utag_data.customer_email = DonorLogin.Email; 4947 utag_data.customer_city = DonorLogin.City; 4948 utag_data.customer_state = DonorLogin.State; 4949 utag_data.customer_zip = DonorLogin.ZipCode; 4950 utag_data.customer_country = "US";*/ 4951 } 4952 else { 4953 utag_data.customer_id = ""; 4954 /*utag_data.customer_username = ""; 4955 utag_data.customer_status = "not logged in"; 4956 utag_data.customer_type = "not logged in"; 4957 utag_data.customer_city = ""; 4958 utag_data.customer_state = ""; 4959 utag_data.customer_zip = zip; 4960 utag_data.customer_country = "US";*/ 4961 } 4962 utag_data.zip = zip; 4963 if (!wip || wip.isComplete || wip.hasTimedOut || wip.hasErrors) { 4964 satruck.config._clearCacheOrSignOut(false); 4965 4966 wip = $.extend({}, satruck.workflow.default); 4967 wip.id = DN.Utils.CreateUUID(); 4968 $("[name='devnext_unique_session']").val(wip.id); 4969 utag_data.devnext_unique_session = wip.id; 4970 utag_data["404_Check"] = "Schedule a Pickup"; 4971 utag_data.event_type = 0; 4972 utag_data.donate_dss_app_view = false; 4973 utag_data.donate_SourceType = 0; 4974 utag_data.donate_my_pickups_url = "https://dss.satruck.org/MyPickups"; 4975 utag_data.ajax_donor_crossstreet = "N/A"; 4976 wip.startedAt = "Pickup_Index"; 4977 wip.name = "SchedulePickup"; 4978 wip.donationType = satruck.config.lookup.PickupType; 4979 wip.currentStep = 0;
4980 wip.dropOutStep = 0; 4981 wip.stepDetails = []; 4982 wip.stepDetails.push({ step: 0, stepData: zip, timestamp: UTC_TIMESTAMP }); 4983 wip.zip = zip; 4984 } 4985 4986 var zipinfoResult = satruck.config._getApiResult("zipinfo"); 4987 4988 if (wip.zip == zip && wip.tid && wip.donation.aid && wip.donation.sectorId && zipinfoResult && wip.tid != 30) { 4989 if (typeof zipinfoResult != 'undefined' && zipinfoResult != null) { 4990 wip.donation.arcname = zipinfoResult.RetVal.ArcName; 4991 } 4992 4993 $('body').removeClass('loading'); 4994 4995 4996 4997 if (wip.donation.warningMessage) { 4998 var arcWarningFound = wip.donation.warningMessage.trim(); 4999 if (arcWarningFound.length >= 5) { 5000 //DN.Utils.ShowError(arcWarningFound); 5001 } 5002 } 5003 5004 satruck.controller.pickup.loadItemSelect(zipinfoResult); 5005 wip.stepDetails.push({ step: 0, stepData: "note: items loaded", timestamp: UTC_TIMESTAMP }); 5006 5007 var categoriesResult = satruck.config._getApiResult("categories"); 5008 if (categoriesResult) { 5009 satruck.controller.pickup.loadCategorySelect(categoriesResult, wip.tid, wip.donation.furnitureQuickSelectAllowed); 5010 wip.stepDetails.push({ step: 0, stepData: "note: categories loaded", timestamp: UTC_TIMESTAMP }); 5011 5012 wip.currentStep = 1; 5013 wip.dropOutStep = 2; 5014 wip.stepDetails.push({ step: 1, stepData: "begin item selection", timestamp: UTC_TIMESTAMP }); 5015 5016 satruck.config._persistWorkflowData(wip); 5017 } 5018 else { 5019 satruck.api.GetCategories(wip.tid, function (innerApiResult) { 5020 var today = new Date(); 5021 var UTC_TIMESTAMP = today.toUTCString(); 5022 5023 var wip = satruck.config._loadWorkflowData(); 5024 5025 if (innerApiResult && innerApiResult.Success == true) { 5026 satruck.controller.pickup.loadCategorySelect(innerApiResult, wip.tid, wip.donation.furnitureQuickSelectAllowed); 5027 wip.stepDetails.push({ step: 0, stepData: "note: categories loaded", timestamp: UTC_TIMESTAMP }); 5028 5029 wip.currentStep = 1; 5030 wip.dropOutStep = 2; 5031 wip.stepDetails.push({ step: 1, stepData: "begin item selection", timestamp: UTC_TIMESTAMP }); 5032 5033 satruck.config._persistWorkflowData(wip); 5034 } 5035 else { 5036 wip.hasErrors = true; 5037 wip.stepDetails.push({ step: 0, stepData: "err:" + innerApiResult.ErrorMessage + ";terminate: aborted failed workflow", timestamp: UTC_TIMESTAMP }); 5038 satruck.config._persistWorkflowData(wip); 5039 5040 //satruck.api.SubmitWorkflowData(wip); 5041 5042 //show alert 5043 DN.Utils.ShowError(innerApiResult.ErrorMessage); 5044 $("#pickup_or_dropoff").hide(); 5045 $("#pickup_only").hide(); 5046 } 5047 }); 5048 } 5049 if (!wip.hasErrors) { 5050 $("#pickup_or_dropoff").show(); 5051 $("#pickup_only").hide(); 5052 } 5053 5054 var chatActive = $('#chatActive').val() == "True"; 5055 5056 if (wip.tid == 40 && chatActive) { 5057 var chatPoc = $('#chatPoc').val(); 5058 icPatronChat.init({ serverHost: 'https://home-c12.incontact.com', bus_no: 4594957, poc: chatPoc, params: ['FirstName', 'Last Name', '[email protected]', 555 - 555 - 5555] }); 5059 } 5060 } 5061 else { 5062 wip.zip = zip; 5063 if (!wip.stepDetails) { 5064 wip.stepDetails = []; 5065 } 5066 wip.stepDetails.push({ step: 0, stepData: "redo step 1 missing info", timestamp: UTC_TIMESTAMP }); 5067 satruck.config._persistWorkflowData(wip); 5068 5069 satruck.api.GetZipInfo(zip, false, function (apiResult) { 5070 $('body').removeClass('loading'); 5071 5072 today = new Date(); 5073 UTC_TIMESTAMP = today.toUTCString(); 5074 5075 if (apiResult && apiResult.Success == true) { 5076 5077 if(apiResult.RetVal.Territory_id == 30 && apiResult.RetVal.Arc_id == 175) 5078 { 5079 window.open('https://resupply.link/sa-st-louis', '_self'); 5080 } 5081 else if(apiResult.RetVal.Territory_id == 30 && apiResult.RetVal.Arc_id == 110) 5082 { 5083 window.open('https://resupply.link/sa-des-moines', '_self'); 5084 } 5085 else { 5086 var zipinfo = apiResult.RetVal; 5087 var wip = satruck.config._loadWorkflowData(); 5088 5089 wip.zipstate = zipinfo.ZipState; 5090 wip.zipcity = zipinfo.ZipCity; 5091 wip.donation = $.extend({}, satruck.pickuporder.default); 5092 wip.tid = zipinfo.Territory_id; 5093 wip.territoryAbbr = (wip.tid == 10 ? "USE" : (wip.tid == 20 ? "USS" : (wip.tid == 30 ? "USC" : (wip.tid == 40 ? "USW" : "UNKNOWN")))); 5094 wip.donation.isMobile = satruck.config.ismobile; 5095 wip.donation.sourceType = satruck.config._getSourceType(); 5096 wip.donation.tid = zipinfo.Territory_id; 5097 wip.donation.aid = zipinfo.Arc_id; 5098 wip.donation.arcname = zipinfo.ArcName; 5099 wip.donation.sectorId = zipinfo.Sector_id; 5100 wip.donation.notServiced = zipinfo.NotServiced; 5101 wip.donation.callAheadAllowed = DN.Validation.isCallAheadAllowed(wip.donation.tid, wip.donation.aid); 5102 wip.donation.callAheadTimeOptions = satruck.controller.pickup.getCallAheadMinutes(wip.donation.tid); 5103 wip.donation.warningMessage = zipinfo.WarningMessage; 5104 wip.donation.furnitureQuickSelectAllowed = zipinfo.AllowFurnitureQuickSelect; 5105 //AJ: Added below 3 properties for new zip lookup workflow 5106 wip.donation.showZipMasterForm = zipinfo.ShowZipMasterForm; 5107 wip.donation.zipMasterEmail = zipinfo.ZipMasterEmail;
5108 wip.donation.zipMasterPhone = zipinfo.ZipMasterPhone; 5109 5110 //COVID-19 Form Active for Territory 5111 var CovidFormActive = false; 5112 if (wip.donation.aid != -1) { 5113 satruck.api.CheckCovidFormActive(zipinfo.Territory_id, zip, function (apiResult) { 5114 if (apiResult != null) { 5115 CovidFormActive = apiResult.RetVal.CovidFormActive; 5116 if (CovidFormActive) { 5117 wip.donation.warningMessage = null; 5118 } 5119 }; 5120 }); 5121 } 5122 5123 wip.stepDetails.push({ step: 0, stepData: "tid:" + wip.donation.tid, timestamp: UTC_TIMESTAMP }); 5124 wip.stepDetails.push({ step: 0, stepData: "abbr:" + wip.territoryAbbr, timestamp: UTC_TIMESTAMP }); 5125 wip.stepDetails.push({ step: 0, stepData: "aid:" + wip.donation.aid, timestamp: UTC_TIMESTAMP }); 5126 wip.stepDetails.push({ step: 0, stepData: "sectorid:" + wip.donation.sectorId, timestamp: UTC_TIMESTAMP }); 5127 wip.stepDetails.push({ step: 0, stepData: "notServiced:" + wip.donation.notServiced, timestamp: UTC_TIMESTAMP }); 5128 wip.stepDetails.push({ step: 0, stepData: "callAheadAllowed:" + wip.donation.callAheadAllowed, timestamp: UTC_TIMESTAMP }); 5129 //wip.stepDetails.push({ step: 0, stepData: "callAheadTimeOptions:" + wip.donation.callAheadTimeOptions, timestamp: UTC_TIMESTAMP }); 5130 wip.stepDetails.push({ step: 0, stepData: "warningMessage:" + wip.donation.warningMessage, timestamp: UTC_TIMESTAMP }); 5131 5132 satruck.config._persistWorkflowData(wip); 5133 5134 if (!wip.zipstate || !wip.zipcity) { 5135 satruck.api.GetCityState(zip, function (csApiResult) { 5136 if (csApiResult && csApiResult.Success == true) { 5137 wip = satruck.config._loadWorkflowData(); 5138 wip.zipstate = csApiResult.RetVal.State; 5139 wip.zipcity = csApiResult.RetVal.City; 5140 satruck.config._persistWorkflowData(wip); 5141 } 5142 }); 5143 } 5144 5145 $("[name='territory_id']").val(wip.tid); 5146 $("[name='arc_name']").val(zipinfo.ArcName); 5147 $("[name='order_id']").val(wip.id); 5148 $("[name='order_type']").val("pickup"); 5149 $("[name='order_store']").val(zipinfo.ArcName); 5150 $("[name='arc_territory']").val(wip.territoryAbbr); 5151 $("[name='arc_center']").val(zipinfo.ArcName); 5152 $("[name='ajax_arc_id']").val(zipinfo.Arc_id); 5153 $("[name='ajax_allowPickups']").val(zipinfo.NotServiced); 5154 $("[name='ajax_arc_name']").val(zipinfo.ArcName); 5155 $("[name='ajax_city']").val(zipinfo.City); 5156 $("[name='ajax_state']").val(zipinfo.State); 5157 $("[name='ajax_territory']").val(wip.territoryAbbr); 5158 $("[name='ajax_zip']").val(zip); 5159 $("[name='donate_ARC_id']").val(wip.donation.aid); 5160 $("[name='donate_Territory_id']").val(wip.donation.tid); 5161 $("[name='donate_ARC_id']").val(zipinfo.Arc_id); 5162 $("[name='donate_Sector_id']").val(wip.donation.sectorId); 5163 $("[name='donate_Zip']").val(wip.donation.zip); 5164 //Tealium 5165 utag_data.order_store = $.trim(zipinfo.ArcName); 5166 utag_data.order_type = "pickup"; 5167 utag_data.territory_id = wip.tid; 5168 utag_data.arc_name = $.trim(zipinfo.ArcName); 5169 utag_data.ajax_arc_id = zipinfo.Arc_id; 5170 utag_data.ajax_allowPickups = zipinfo.NotServiced ? "false" : "true"; 5171 utag_data.ajax_arc_name = $.trim(zipinfo.ArcName); 5172 utag_data.ajax_city = zipinfo.City; 5173 utag_data.ajax_corps_name = $.trim(zipinfo.ArcName); 5174 utag_data.ajax_owner = "Arc"; 5175 utag_data.ajax_state = zipinfo.State; 5176 utag_data.ajax_territory = wip.territoryAbbr; 5177 utag_data.arc_territory = wip.territoryAbbr; 5178 utag_data.arc_center = $.trim(zipinfo.ArcName); 5179 utag_data.arc_id = zipinfo.Arc_id; 5180 5181 utag_data.donate_ZIP = wip.donation.zip; 5182 utag_data.donate_ARC_id = wip.donation.aid; 5183 utag_data.donate_Territory_id = wip.donation.tid; 5184 utag_data.donate_Sector_id = wip.donation.sectorId; 5185 5186 if (wip.donation.showZipMasterForm) { 5187 //Hide divs 5188 $("#pickup_or_dropoff").hide(); 5189 $("#pickup_only").hide(); 5190 //Original html for zip master form in case submit fails they can try again 5191 $original = $('.zip-master-form').html(); 5192 $('#zipmaster-zip').val(zip); 5193 5194 $('#zip-master-form').dialog( 5195 { 5196 autoOpen: true, 5197 height: 600, 5198 width: 660, 5199 modal: true, 5200 buttons: [ 5201 { 5202 text: "Cancel", 5203 click: function () { 5204 $(this).dialog("close"); 5205 window.location = satruck.config.urls.home; 5206 }, 5207 'class': 'btn btn-default dialog-cancel' 5208 }, 5209 { 5210 text: "Submit", 5211 click: function () { 5212 5213 var $parent = $('.zip-master-form'), 5214 $name = $('#zipmaster-first-name').val() + ' ' + $('#zipmaster-last-name').val(), 5215 $contactemail = $('#zipmaster-email').val(), 5216 $confirmemail = $('#zipmaster-confirmemail').val(), 5217 $zipmasteremail = wip.donation.zipMasterEmail, 5218 $phone = $('#zipmaster-phone').val(), 5219 $address = $('#zipmaster-address').val() + ' ' + $('#zipmaster-address2').val(), 5220 $zip = zip, 5221 $message = "<strong>Pickup Order Donation Items:</strong>" + "<br /><br />" + $('#zipmaster-itemvehicleinfo').val(), 5222 $donorMessage = satruck.config.messages.corpZipThankYou + "<br /><br />" + $message, 5223 $reason = 5; //ZipMasterEmailForm 5224 $reasonName = "ZipMasterEmailForm"; 5225 5226 if ($contactemail != $confirmemail) { 5227 DN.Validation.ShowError($('#zipmaster-confirmemail').parent('div'), $('#zipmaster-confirmemail-help-block')); 5228 $('#zipmaster-confirmemail').focus(function () { 5229 DN.Validation.HideError($('#zipmaster-confirmemail').parent('div')); 5230 });
5231 } 5232 else { 5233 function submitForm() { 5234 $('.contact-submit').addClass('spinner'); 5235 $('.contact-submit').attr('disabled', true); 5236 satruck.api.ContactSubmit(null, $name, $contactemail, $zipmasteremail, $address, $zip, $message, $reason, $reasonName, $phone, null, null, null, null, function (apiResult) { 5237 //$('.contact-submit').addClass('spinner'); 5238 $('#zip-master-form').dialog('option', 'title', 'Information'); 5239 if (apiResult && apiResult.Success == true) { 5240 $('.zip-master-form').html('<h4 class="text-center">' + satruck.config.messages.corpZipThankYou + '</h4>'); 5241 $('.contact-submit').addClass('hidden'); 5242 $('.dialog-cancel .ui-button-text').text('Close'); 5243 //Send confirmation email 5244 satruck.api.ConfirmationEmail($name, $zipmasteremail, $contactemail, $address, $zip, $donorMessage, 0, $phone, function (apiResult) { 5245 }); 5246 //Tealium 5247 satruck.tealium._setPickupSubPageTealium("0-3"); 5248 utag_data.site_section = "Schedule Pickup"; 5249 utag_data.site_type = "Corps"; 5250 utag_data.login_status = satruck.account.is_logged_in() ? "Logged In" : "Not Logged In"; 5251 utag_data.pickup_date = $.datepicker.formatDate('yymmdd', new Date()) + ":NA:NA"; 5252 } 5253 else { 5254 $('.contact-submit').removeClass('spinner'); 5255 $('.zip-master-form').html('<h3 class="text-center">Sorry, your message did not go through. Please feel free to try again!</h3>'); 5256 $('.contact-submit .ui-button-text').text('Go Back'); 5257 $('.contact-submit').one('click', function () { 5258 $('.zip-master-form').html($original); 5259 $('#zipmaster-zip').val(zip); 5260 $('.contact-submit .ui-button-text').text('Submit'); 5261 }); 5262 } 5263 $('.contact-submit').attr('disabled', false); 5264 }); 5265 } 5266 DN.Validation.fieldHasData($parent, submitForm); 5267 } 5268 }, 5269 'class': 'btn btn-default contact-submit' 5270 }] 5271 }); 5272 } 5273 else if (wip.donation.notServiced == true) { 5274 if (zipinfo.Territory_id == 30) { 5275 if (zipinfo.Arc_id == 110 || zipinfo.Arc_id == 115 || zipinfo.Arc_id == 120 || zipinfo.Arc_id == 135 || zipinfo.Arc_id == 140 || zipinfo.Arc_id == 160 || zipinfo.Arc_id == 165 || zipinfo.Arc_id == 175 || zipinfo.Arc_id == 185) { 5276 debugger 5277 $("#pickup_or_dropoff").hide(); 5278 $("#pickup_only").hide(); 5279 var strphones = satruck.controller._getReSupplyPhone(zipinfo.Territory_id, zipinfo.Arc_id); 5280 $('#not-found-custom-msg').dialog( 5281 { 5282 autoOpen: true, 5283 modal: true, 5284 open: function (event, ui) { 5285 $('#not-found-custom-msg').dialog('option', 'title', 'Information'); 5286 $('.js-change-msg').empty().html("<center>Free online service are not available in your area</center><br>" + 5287 "<center>Consider our partner ReSupplyâs fee-based priority (24 - 48 hrs) pickup service delivered directly to The Salvation Army or drop it off at one of our locations.</center><br>" + 5288 "<center>Priority Pickup Number: " + strphones + ".</center>" 5289 + "<br><br><a id='priorityPickup' onclick='satruck.controller.priorityPickupClick(\"" + "Unserviced Zips" + "\");'><button class='btn ui-button ui-widget ui-state-default' style='float:left;font-size:12px;'>Priority Pickup</button></a>" 5290 + "<button id='dropItOff' class='btn ui-button ui-widget ui-state-default' onclick='satruck.controller.dropitOffClick(" + zip + ",\"" + "Unserviced Zips" + "\");' style='font-size:12px;'>Drop It Off</button></center><br>"); 5291 $('footer').addClass('hidden'); 5292 } 5293 });
5294 } 5295 else { 5296 DN.Utils.ShowErrorRedirect('We have been unable to resume pickups in your area but plan on reopening soon. Please check back with us and thank you for your understanding.', 'Area Not Serviced', satruck.config.urls.home); 5297 } 5298 //DN.Utils.ShowErrorRedirect('We have been unable to resume pickups in your area but plan on reopening soon. Please check back with us and thank you for your understanding.', 'Area Not Serviced', satruck.config.urls.home); 5299 } 5300 else if ((!zipinfo.WarningMessage 5301 || zipinfo.WarningMessage == zip + ' is not serviced.' 5302 || zipinfo.WarningMessage.trim() == '' 5303 || zipinfo.WarningMessage.trim() == '.') 5304 && CovidFormActive == false) { 5305 5306 5307 var wip = satruck.config._loadWorkflowData(); 5308 wip.zipstate = zipinfo.ZipState; 5309 wip.zipcity = zipinfo.ZipCity; 5310 wip.tid = zipinfo.Territory_id; 5311 wip.territoryAbbr = (wip.tid == 10 ? "USE" : (wip.tid == 20 ? "USS" : (wip.tid == 30 ? "USC" : (wip.tid == 40 ? "USW" : "UNKNOWN")))); 5312 wip.donation = $.extend({}, satruck.dropoffticket.default); 5313 wip.donation.tid = zipinfo.Territory_id; 5314 wip.donation.aid = zipinfo.Arc_id; 5315 wip.donation.arcname = zipinfo.ArcName; 5316 wip.stepDetails.push({ step: 0, stepData: "tid:" + wip.donation.tid, timestamp: UTC_TIMESTAMP }); 5317 wip.stepDetails.push({ step: 0, stepData: "abbr:" + wip.territoryAbbr, timestamp: UTC_TIMESTAMP }); 5318 wip.stepDetails.push({ step: 0, stepData: "aid:" + wip.donation.aid, timestamp: UTC_TIMESTAMP }); 5319 wip.currentStep = 1; 5320 wip.dropOutStep = 2; 5321 wip.stepDetails.push({ step: 1, stepData: "redirect to dropoffindex", timestamp: UTC_TIMESTAMP }); 5322 wip.donation.notServiced = zipinfo.NotServiced; 5323 wip.donation.warningMessage = 'Unfortunately, pickup service is not currently available in your area, but your donation is still greatly needed and appreciated. Please check below for a convenient drop-off location near you, or call us at <a href="tel:+18007287825">' + (wip.tid == 40 ? '1-800-728-7825' : '1-800-SA-Truck (1-800-728-7825)') + '</a> for further assistance.'; 5324 satruck.config._persistWorkflowData(wip); 5325 window.location = satruck.config.urls.dropoffindex + "?zip=" + zip; 5326 } 5327 else { 5328 //Tealium 5329 satruck.tealium._setPickupSubPageTealium("0-2"); 5330 5331 wip.hasErrors = true; 5332 wip.stepDetails.push({ step: 0, stepData: "notserviced:" + wip.donation.warningMessage, timestamp: UTC_TIMESTAMP }); 5333 satruck.config._persistWorkflowData(wip); 5334 5335 //satruck.api.SubmitWorkflowData(wip); 5336 //show alert 5337 if (wip.donation.warningMessage.length = 0 || wip.donation.warningMessage == null) { 5338 var zipNotFound = wip.donation.warningMessage.trim(); 5339 if (zipNotFound.length < 5 || zipNotFound == null) { 5340 $('#not-found-default-msg').dialog( 5341 { 5342 autoOpen: true, 5343 modal: true, 5344 open: function (event, ui) { 5345 $('.js-change-zip').empty().html(wip.zip); 5346 }, 5347 buttons: [ 5348 { 5349 text: "Ok", 5350 click: function () { 5351 $(this).dialog("close"); 5352 }, 5353 'class': 'btn btn-default dialog-confirm' 5354 }] 5355 }); 5356 } 5357 else { 5358 $('#not-found-custom-msg').dialog( 5359 { 5360 autoOpen: true, 5361 modal: true, 5362 open: function (event, ui) { 5363 if (wip.zip !== "") { 5364 $('#not-found-custom-msg').dialog('option', 'title', 'Information'); 5365 $('.js-change-msg').empty().html(wip.donation.warningMessage); 5366 } else { 5367 $(this).dialog('close'); 5368 window.location = satruck.config.urls.home; 5369 } 5370 5371 }, 5372 buttons: [ 5373 { 5374 text: "Ok", 5375 click: function () { 5376 $(this).dialog("close"); 5377 }, 5378 'class': 'btn btn-default dialog-confirm' 5379 }] 5380 });
5381 } 5382 5383 $(".pickup.step").hide(); 5384 } 5385 } 5386 5387 } 5388 else { 5389 if (wip.donation.warningMessage) { 5390 var arcWarningFound = wip.donation.warningMessage.trim(); 5391 if (arcWarningFound.length >= 5) { 5392 //DN.Utils.ShowError(arcWarningFound); 5393 } 5394 } 5395 5396 5397 satruck.controller.pickup.loadItemSelect(apiResult); 5398 wip.stepDetails.push({ step: 0, stepData: "note: items loaded", timestamp: UTC_TIMESTAMP }); 5399 5400 wip.currentStep = 1; 5401 wip.dropOutStep = 2; 5402 wip.stepDetails.push({ step: 1, stepData: "begin item selection", timestamp: UTC_TIMESTAMP }); 5403 5404 satruck.api.GetRouteDefaults(wip.tid, function (rdApiResult) { 5405 if (rdApiResult && rdApiResult.Success == true) { 5406 satruck.controller.pickup.loadRouteDefaults(rdApiResult); 5407 wip.stepDetails.push({ step: 0, stepData: "note: categories loaded", timestamp: UTC_TIMESTAMP }); 5408 satruck.config._persistWorkflowData(wip); 5409 } 5410 else { 5411 wip.stepDetails.push({ step: 0, stepData: "err:" + innerApiResult.ErrorMessage + ";minor: using hard-coded route defaults", timestamp: UTC_TIMESTAMP }); 5412 satruck.config._persistWorkflowData(wip); 5413 } 5414 }); 5415 5416 satruck.api.GetCategories(wip.tid, function (innerApiResult) { 5417 if (innerApiResult && innerApiResult.Success == true) { 5418 satruck.controller.pickup.loadCategorySelect(innerApiResult, wip.tid, wip.donation.furnitureQuickSelectAllowed); 5419 wip.stepDetails.push({ step: 0, stepData: "note: categories loaded", timestamp: UTC_TIMESTAMP }); 5420 satruck.config._persistWorkflowData(wip); 5421 5422 } 5423 else { 5424 wip.hasErrors = true; 5425 wip.stepDetails.push({ step: 0, stepData: "err:" + innerApiResult.ErrorMessage + ";terminate: aborted failed workflow", timestamp: UTC_TIMESTAMP }); 5426 satruck.config._persistWorkflowData(wip); 5427 5428 //satruck.api.SubmitWorkflowData(wip); 5429 5430 //show alert 5431 DN.Utils.ShowError(innerApiResult.ErrorMessage); 5432 $(".pickup.step").hide(); 5433 } 5434 }); 5435 } 5436 satruck.controller.choose_giving(zip); 5437 } 5438 } 5439 else { 5440 var wip = satruck.config._loadWorkflowData(); 5441 wip.hasErrors = true; 5442 wip.stepDetails.push({ step: 0, stepData: "err:" + apiResult.ErrorMessage + ";terminate: aborted failed workflow", timestamp: UTC_TIMESTAMP }); 5443 satruck.config._persistWorkflowData(wip); 5444 5445 //satruck.api.SubmitWorkflowData(wip); 5446 5447 //show alert 5448 DN.Utils.ShowError(apiResult.ErrorMessage); 5449 $("#pickup_or_dropoff").hide(); 5450 $("#pickup_only").hide(); 5451 } 5452 }); 5453 } 5454 } 5455 }, 5456 5457 vehicleBegin: function (initData) { 5458 $(".step").hide(); 5459 $(".vehicle-steps").hide(); 5460 5461 if (initData.isvalid) { 5462 $("#vehicleZip, #mobileVehicleZip").val(initData.zip); 5463 $(".step1").show(); 5464 $(".vehicle-steps").show(); 5465 if (satruck.config.ismobile) { $('.workflow-layout').hide(); } 5466 satruck.controller.setBreadCrumbs(1, 'vehicle'); 5467 $('.donation-entry-point').addClass('hidden'); 5468 5469 $('body').addClass('loading'); 5470 5471 var zip = initData.zip; 5472 5473 var today = new Date(); 5474 var UTC_TIMESTAMP = today.toUTCString(); 5475 5476 var wip = satruck.config._loadWorkflowData(); 5477 //check for timeout 5478 if (wip && wip.stepDetails && wip.stepDetails.length) { 5479 try { 5480 var lastactivity = wip.stepDetails[wip.stepDetails.length - 1]; 5481 var utc_time = new Date(lastactivity.timestamp); 5482 //longer than 3 days 5483 if (today > utc_time.setTime(utc_time.getTime() + (3 * 24 * 60 * 60 * 1000))) { 5484 wip.hasTimedOut = true; 5485 } 5486 } 5487 catch (err) { 5488 } 5489 } 5490 5491 //New Stuff For Login 11/6/2015 5492 if (satruck.account.is_logged_in()) { 5493 var DonorLogin = satruck.config._getDonorLogin(); 5494 utag_data.customer_id = DonorLogin.DonorUserId; 5495 /*utag_data.customer_username = DonorLogin.Email; 5496 utag_data.customer_status = "logged in"; 5497 utag_data.customer_type = "donor logged in"; 5498 utag_data.customer_email = DonorLogin.Email; 5499 utag_data.customer_city = DonorLogin.City; 5500 utag_data.customer_state = DonorLogin.State; 5501 utag_data.customer_zip = DonorLogin.ZipCode; 5502 utag_data.customer_country = "US";*/ 5503 } 5504 else { 5505 utag_data.customer_id = ""; 5506 /*utag_data.customer_username = ""; 5507 utag_data.customer_status = "not logged in"; 5508 utag_data.customer_type = "not logged in"; 5509 utag_data.customer_city = ""; 5510 utag_data.customer_state = ""; 5511 utag_data.customer_zip = zip; 5512 utag_data.customer_country = "US";*/ 5513 } 5514 5515 if (!wip || wip.isComplete || wip.hasTimedOut || wip.hasErrors) { 5516 satruck.config._clearCacheOrSignOut(false); 5517 5518 wip = $.extend({}, satruck.workflow.default); 5519 wip.id = DN.Utils.CreateUUID(); 5520 $("[name='devnext_unique_session']").val(wip.id); 5521 utag_data.devnext_unique_session = wip.id; 5522 utag_data["404_Check"] = "Donate a Vehicle"; 5523 utag_data.event_type = 2; 5524 utag_data.donate_dss_app_view = false; 5525 utag_data.donate_SourceType = 0; 5526 utag_data.donate_my_pickups_url = "https://dss.satruck.org/MyPickups"; 5527 utag_data.ajax_donor_crossstreet = "N/A"; 5528 wip.startedAt = "Vehicle_Index"; 5529 wip.name = "DonateVehicle"; 5530 } 5531 wip.donationType = satruck.config.lookup.VehicleType; 5532 wip.currentStep = 0;
5533 wip.dropOutStep = 0; 5534 wip.stepDetails = []; 5535 wip.stepDetails.push({ step: 0, stepData: zip, timestamp: UTC_TIMESTAMP }); 5536 wip.zip = zip; 5537 satruck.config._persistWorkflowData(wip); 5538 5539 satruck.api.GetZipInfo(zip, true, function (apiResult) { 5540 $('body').removeClass('loading'); 5541 5542 today = new Date(); 5543 UTC_TIMESTAMP = today.toUTCString(); 5544 5545 if (apiResult && apiResult.Success == true) { 5546 var zipinfo = apiResult.RetVal; 5547 var wip = satruck.config._loadWorkflowData(); 5548 wip.zipstate = zipinfo.ZipState; 5549 wip.zipcity = zipinfo.ZipCity; 5550 wip.donation = $.extend({}, satruck.vehicleorder.default); 5551 wip.tid = zipinfo.Territory_id; 5552 wip.territoryAbbr = (wip.tid == 10 ? "USE" : (wip.tid == 20 ? "USS" : (wip.tid == 30 ? "USC" : (wip.tid == 40 ? "USW" : "UNKNOWN")))); 5553 wip.donation.isMobile = satruck.config.ismobile; 5554 wip.donation.sourceType = satruck.config._getSourceType(); 5555 wip.donation.tid = zipinfo.Territory_id; 5556 wip.donation.aid = zipinfo.Arc_id; 5557 wip.donation.arcname = zipinfo.ArcName; 5558 wip.donation.sectorId = zipinfo.Sector_id; 5559 wip.donation.notServiced = zipinfo.NotServiced; 5560 wip.donation.warningMessage = zipinfo.WarningMessage; 5561 //AJ: Added below 3 properties for new zip lookup workflow 5562 wip.donation.showZipMasterForm = zipinfo.ShowZipMasterForm; 5563 wip.donation.zipMasterEmail = zipinfo.ZipMasterEmail; 5564 wip.donation.zipMasterPhone = zipinfo.ZipMasterPhone; 5565 5566 wip.stepDetails.push({ step: 0, stepData: "tid:" + wip.donation.tid, timestamp: UTC_TIMESTAMP }); 5567 wip.stepDetails.push({ step: 0, stepData: "abbr:" + wip.territoryAbbr, timestamp: UTC_TIMESTAMP }); 5568 wip.stepDetails.push({ step: 0, stepData: "aid:" + wip.donation.aid, timestamp: UTC_TIMESTAMP }); 5569 wip.stepDetails.push({ step: 0, stepData: "sectorid:" + wip.donation.sectorId, timestamp: UTC_TIMESTAMP }); 5570 wip.stepDetails.push({ step: 0, stepData: "notServiced:" + wip.donation.notServiced, timestamp: UTC_TIMESTAMP }); 5571 wip.stepDetails.push({ step: 0, stepData: "warningMessage:" + wip.donation.warningMessage, timestamp: UTC_TIMESTAMP }); 5572 5573 satruck.config._persistWorkflowData(wip); 5574 5575 if (!wip.zipstate || !wip.zipcity) { 5576 satruck.api.GetCityState(zip, function (csApiResult) { 5577 if (csApiResult && csApiResult.Success == true) { 5578 wip = satruck.config._loadWorkflowData(); 5579 wip.zipstate = csApiResult.RetVal.State; 5580 wip.zipcity = csApiResult.RetVal.City; 5581 satruck.config._persistWorkflowData(wip); 5582 } 5583 }); 5584 } 5585 5586 $("[name='territory_id']").val(wip.tid); 5587 $("[name='arc_name']").val(zipinfo.ArcName); 5588 $("[name='order_id']").val(wip.id); 5589 $("[name='order_type']").val("vehicle"); 5590 $("[name='order_store']").val(zipinfo.ArcName); 5591 $("[name='arc_territory']").val(wip.territoryAbbr); 5592 $("[name='arc_center']").val(zipinfo.ArcName); 5593 $("[name='ajax_arc_id']").val(zipinfo.Arc_id); 5594 $("[name='ajax_allowPickups']").val(zipinfo.NotServiced); 5595 $("[name='ajax_arc_name']").val(zipinfo.ArcName); 5596 $("[name='ajax_city']").val(zipinfo.City); 5597 $("[name='ajax_state']").val(zipinfo.State); 5598 $("[name='ajax_territory']").val(wip.territoryAbbr); 5599 $("[name='ajax_zip']").val(zip); 5600 $("[name='donate_ARC_id']").val(wip.donation.aid); 5601 $("[name='donate_Territory_id']").val(wip.donation.tid); 5602 $("[name='donate_ARC_id']").val(zipinfo.Arc_id); 5603 $("[name='donate_Sector_id']").val(wip.donation.sectorId); 5604 $("[name='donate_Zip']").val(wip.donation.zip); 5605 //Tealium 5606 utag_data.order_store = $.trim(zipinfo.ArcName); 5607 utag_data.order_type = "vehicle"; 5608 utag_data.territory_id = wip.tid; 5609 utag_data.arc_name = $.trim(zipinfo.ArcName); 5610 utag_data.ajax_arc_id = zipinfo.Arc_id; 5611 utag_data.ajax_allowPickups = zipinfo.NotServiced ? "false" : "true"; 5612 utag_data.ajax_arc_name = $.trim(zipinfo.ArcName); 5613 utag_data.ajax_city = zipinfo.City; 5614 utag_data.ajax_corps_name = $.trim(zipinfo.ArcName); 5615 utag_data.ajax_owner = "Arc"; 5616 utag_data.ajax_state = zipinfo.State; 5617 utag_data.ajax_territory = wip.territoryAbbr; 5618 utag_data.arc_territory = wip.territoryAbbr; 5619 utag_data.arc_center = $.trim(zipinfo.ArcName); 5620 utag_data.arc_id = zipinfo.Arc_id; 5621 5622 utag_data.donate_ZIP = wip.donation.zip; 5623 utag_data.donate_ARC_id = wip.donation.aid; 5624 utag_data.donate_Territory_id = wip.donation.tid; 5625 utag_data.donate_Sector_id = wip.donation.sectorId; 5626 5627 if (wip.donation.showZipMasterForm) { 5628 //Hide divs 5629 $(".vehicle.panel-body, .header .bread-crumbs-container").hide(); 5630 5631 //Update labels and fields to be for vehicle donation form 5632 $('#zipmaster-itemvehicleinfo-label').html('Vehicle Information <span class="red-text">*</span>'); 5633 $('#zipmaster-itemvehicleinfo').attr("placeholder", "Please describe the year, make, and model of your vehicle"); 5634 //Original html for zip master form in case submit fails they can try again 5635 $original = $('.zip-master-form').html(); 5636 $('#zipmaster-zip').val(zip); 5637 5638 $('#zip-master-form').dialog( 5639 { 5640 autoOpen: true, 5641 height: 600, 5642 width: 660, 5643 modal: true, 5644 buttons: [ 5645 { 5646 text: "Cancel", 5647 click: function () { 5648 $(this).dialog("close"); 5649 window.location = satruck.config.urls.home;; 5650 }, 5651 'class': 'btn btn-default dialog-cancel' 5652 }, 5653 { 5654 text: "Submit", 5655 click: function () { 5656 5657 var $parent = $('.zip-master-form'), 5658 $name = $('#zipmaster-first-name').val() + ' ' + $('#zipmaster-last-name').val(), 5659 $contactemail = $('#zipmaster-email').val(), 5660 $confirmemail = $('#zipmaster-confirmemail').val(), 5661 $zipmasteremail = wip.donation.zipMasterEmail, 5662 $phone = $('#zipmaster-phone').val(), 5663 $address = $('#zipmaster-address').val() + ' ' + $('#zipmaster-address2').val(), 5664 $zip = zip, 5665 $message = "<strong>Vehicle Order Donation Information:</strong>" + "<br /><br />" + $('#zipmaster-itemvehicleinfo').val(), 5666 $donorMessage = satruck.config.messages.corpZipThankYou + "<br /><br />" + $message, 5667 $reason = 5; //ZipMasterEmailForm 5668 $reasonName = "ZipMasterEmailForm"; 5669 5670 if ($contactemail != $confirmemail) { 5671 DN.Validation.ShowError($('#zipmaster-confirmemail').parent('div'), $('#zipmaster-confirmemail-help-block')); 5672 $('#zipmaster-confirmemail').focus(function () { 5673 DN.Validation.HideError($('#zipmaster-confirmemail').parent('div')); 5674 });
5675 } 5676 else { 5677 function submitForm() { 5678 $('.contact-submit').addClass('spinner'); 5679 $('.contact-submit').attr('disabled', true); 5680 satruck.api.ContactSubmit(null, $name, $contactemail, $zipmasteremail, $address, $zip, $message, $reason, $reasonName, $phone, null, null, null, null, function (apiResult) { 5681 //$('.contact-submit').addClass('spinner'); 5682 $('#zip-master-form').dialog('option', 'title', 'Information'); 5683 if (apiResult && apiResult.Success == true) { 5684 $('.zip-master-form').html('<h4 class="text-center">' + satruck.config.messages.corpZipThankYou + '</h4>'); 5685 $('.contact-submit').addClass('hidden'); 5686 $('.dialog-cancel .ui-button-text').text('Close'); 5687 //Send confirmation email 5688 satruck.api.ConfirmationEmail($name, $zipmasteremail, $contactemail, $address, $zip, $donorMessage, 0, $phone, function (apiResult) { 5689 }); 5690 //Tealium 5691 satruck.tealium._setVehicleSubPageTealium("0-3"); 5692 utag_data.site_section = "Donate Vehicle"; 5693 utag_data.site_type = "Corps"; 5694 utag_data.login_status = satruck.account.is_logged_in() ? "Logged In" : "Not Logged In"; 5695 utag_data.pickup_date = $.datepicker.formatDate('yymmdd', new Date()) + ":NA:NA"; 5696 } 5697 else { 5698 $('.contact-submit').removeClass('spinner'); 5699 $('.zip-master-form').html('<h3 class="text-center">Sorry, your message did not go through. Please feel free to try again!</h3>'); 5700 $('.contact-submit .ui-button-text').text('Go Back'); 5701 $('.contact-submit').one('click', function () { 5702 $('.zip-master-form').html($original); 5703 $('#zipmaster-zip').val(zip); 5704 $('.contact-submit .ui-button-text').text('Submit'); 5705 }); 5706 } 5707 $('.contact-submit').attr('disabled', false); 5708 }); 5709 } 5710 DN.Validation.fieldHasData($parent, submitForm); 5711 } 5712 }, 5713 'class': 'btn btn-default contact-submit' 5714 }] 5715 }); 5716 } 5717 else if (wip.donation.notServiced == true && wip.donation.warningMessage.length > 2) { 5718 //Tealium 5719 satruck.tealium._setVehicleSubPageTealium("0-2"); 5720 5721 wip.hasErrors = true; 5722 wip.stepDetails.push({ step: 0, stepData: "notserviced:" + wip.donation.warningMessage, timestamp: UTC_TIMESTAMP }); 5723 satruck.config._persistWorkflowData(wip); 5724 5725 //satruck.api.SubmitWorkflowData(wip); 5726 DN.Utils.ShowErrorRedirect(wip.donation.warningMessage, "Information", satruck.config.urls.home); 5727 $(".vehicle.panel-body, .header .bread-crumbs-container").hide(); 5728 } 5729 else { 5730 //New Tealium Tags 5731 satruck.tealium._setVehicleSubPageTealium(1); 5732 5733 wip.currentStep = 1; 5734 wip.dropOutStep = 2; 5735 wip.stepDetails.push({ step: 1, stepData: "begin type selection", timestamp: UTC_TIMESTAMP }); 5736 } 5737 } 5738 else { 5739 var wip = satruck.config._loadWorkflowData(); 5740 wip.hasErrors = true; 5741 wip.stepDetails.push({ step: 0, stepData: "err:" + apiResult.ErrorMessage + ";terminate: aborted failed workflow", timestamp: UTC_TIMESTAMP }); 5742 satruck.config._persistWorkflowData(wip); 5743 5744 //satruck.api.SubmitWorkflowData(wip); 5745 5746 //show alert 5747 DN.Utils.ShowError(apiResult.ErrorMessage); 5748 } 5749 5750 var chatActive = $('#chatActive').val() == "True"; 5751 5752 if (wip.tid == 40 && chatActive) { 5753 var chatPoc = $('#chatPoc').val(); 5754 icPatronChat.init({ serverHost: 'https://home-c12.incontact.com', bus_no: 4594957, poc: chatPoc, params: ['FirstName', 'Last Name', '[email protected]', 555 - 555 - 5555] }); 5755 } 5756 }); 5757 } 5758 }, 5759 5760 dropOffBegin: function (initData) { 5761 console.log(JSON.stringify(initData)); 5762 $(".step").hide(); 5763 $(".dropoff-steps").hide(); 5764 if (initData.isvalid) { 5765 $("input[name='dropOffZip']:visible, input[name='mobileDropOffZip']:visible").val(initData.zip); 5766 $(".step1").show(); 5767 $(".dropoff-steps").show(); 5768 satruck.controller.setBreadCrumbs(1, 'dropoff'); 5769 /*--moved to 571--*/ 5770 //$('.donation-entry-point').addClass('hidden'); 5771 } 5772 else { 5773 $('.donation-entry-point').removeClass('hidden'); 5774 $('.body-content1').removeClass('hidden'); 5775 } 5776 }, 5777 5778 familyStoreBegin: function (initData) { 5779 $(".step").hide(); 5780 $(".familystore-steps").hide(); 5781 if (initData.isvalid) { 5782 $("input[name='familyStoreZip']:visible, input[name='mobileFamilyStoreZip']:visible").val(initData.zip); 5783 $(".step1").show(); 5784 $(".familystore-steps").show(); 5785 satruck.controller.setBreadCrumbs(1, 'familystore'); 5786 /*--moved to 571--*/ 5787 //$('.donation-entry-point').addClass('hidden'); 5788 } 5789 else { 5790 $('.donation-entry-point').removeClass('hidden'); 5791 $('.body-content1').removeClass('hidden'); 5792 } 5793 }, 5794 5795 //Header control events 5796 search: function (query) { 5797 window.location = "http://www.salvationarmyusa.org/usn/search?query=" + encodeURI(query); 5798 }, 5799 locationSearch: function (query) { 5800 window.location = "http://www.salvationarmyusa.org/usn/plugins/gdosCenterSearch?query=" + encodeURI(query) + "&mode=query_1&limit=20"; 5801 }, 5802 positionNav: function () { 5803 if ($(window).scrollTop() >= 111) { 5804 $('.navbar.navbar-inverse.dark-bg, .mobile-faq-menu').addClass('navbar-fixed-top'); 5805 //$('.login-flyout').removeClass('opened overflow').css('max-height',''); 5806 $('.header').addClass('navbar-margin'); 5807 5808 if ($('.header .donateBtn').hasClass('active')) { 5809 var donateOptionsSelector = $('.donateOptions'), 5810 donateCloseBtnSelector = $('.donateBtn .close'); 5811 $('.header .donateBtn').find(donateOptionsSelector).transition({ y: '-218px' }); 5812 $('.header .donateBtn').find(donateCloseBtnSelector).css('display', 'none').transition({ opacity: 0 }); 5813 $('.header .donateBtn').removeClass('active').addClass('inactive'); 5814 } 5815 } 5816 else { 5817 $('.navbar.navbar-inverse.dark-bg, .mobile-faq-menu').removeClass('navbar-fixed-top'); 5818 $('.header').removeClass('navbar-margin'); 5819 } 5820 }, 5821 5822 headerBreadCrumbs: function (width) { 5823 5824 if (width > 767) { 5825 $('.workflow-layout').addClass('no-padding'); 5826 $('.header').addClass('navbar-fixed-top'); 5827 $('.body-content').css('padding-top', '120px'); 5828 $('.body-content1').css('padding-top', '100px'); 5829 $('.donation-entry-point').css('margin-top', '12em').css('margin-bottom', '3em'); 5830 } else { 5831 5832 //$('.workflow-layout').removeClass('no-padding'); 5833 //$('.workflow-layout').addClass('no-padding'); 5834 //$('.header').removeClass('navbar-fixed-top'); 5835 $('.body-content').css('padding-top', ''); 5836 //$('.bread-crumbs-container').addClass('hidden');
5837 $('.header.navbar-margin').css('margin-bottom', '0'); 5838 $('.donation-entry-point').css('margin-top', '0.5em').css('margin-bottom', ''); 5839 } 5840 5841 $('.navbar, .donateBtn, .my-account--parent').addClass('hidden'); 5842 $('.have-questions-btn').addClass('interior-page-btn'); 5843 $('.bread-crumbs-container').insertAfter('.header .container .logo').addClass('in-header').css('margin', ''); 5844 }, 5845 5846 setBreadCrumbs: function (step, type) { 5847 var wip = satruck.config._loadWorkflowData(); 5848 $(".bread-crumbs > *").removeClass("active"); 5849 $(".bread-crumbs").hide(); 5850 5851 var $container = $(".bread-crumbs." + type) 5852 $container.show(); 5853 for (var i = 0; i <= step; i++) { 5854 $container.find(".crumb" + i).addClass("active"); 5855 5856 if (wip != null) { 5857 $('.crumb.active').each(function () { 5858 if (wip.donationType == 1) { 5859 if ($(this).data('step') == 1) { 5860 $(this).prev().prev().find('.crumb-details').text(wip.zip); 5861 5862 // This hides Common Items, based on territory 5863 satruck.controller.pickup.hideItemsBasedOnTerritory(wip.tid); 5864 } 5865 if ($(this).data('step') == 2) { 5866 var items = 0; 5867 $.each(wip.donation.items, function (i, item) { 5868 items += item.quantity; 5869 }); 5870 5871 $(this).prev().prev().find('.crumb-details').text(items + ' items'); 5872 // The following code is here because we couldn't find a better place to put it 5873 // This adds the referral options to the 'how did you hear' section 5874 if (wip.leadTracking == null) {
5875 satruck.api.AdMethods(wip.donation.tid, function (apiResult) { 5876 if (apiResult.RetVal != null) { 5877 var items = ''; 5878 $.each(apiResult.RetVal, function (i, r) { 5879 if (r.ValueOf == 'Other') { 5880 items += '<li class="referred-other">\ 5881 <a href="#" data-referrer="' + r.ValueOf + '">' + r.Display + '</a>\ 5882 <div class="other-option">\ 5883 <input type="text" class="how-did-you-hear-other" placeholder="Please specify" />\ 5884 <a class="btn btn-default" href="#">Save</a>\ 5885 </div>\ 5886 </li>'; 5887 } else { 5888 items += '<li><a href="#" data-referrer="' + r.ValueOf + '">' + r.Display + '</a></li>'; 5889 } 5890 }); 5891 $('.how-did-you-hear ul').first().html(items); 5892 } 5893 }); 5894 } 5895 satruck.api.GetCommonInstructions(wip.donation.tid, function (apiResult) { 5896 if (apiResult.RetVal != null) { 5897 var items = ''; 5898 var itemsTouch = ''; 5899 5900 $.each(apiResult.RetVal, function (i, r) { 5901 items += '<option>' + r + '</option>'; 5902 itemsTouch += '<p>' + r + '</p>'; 5903 }); 5904 5905 $("#instruction-select:not('.visible-touch')").first().empty().append(items); 5906 $("#instruction-select.visible-touch").first().empty().append(itemsTouch); 5907 } 5908 satruck.controller.pickup.initInstructionsControls(); //Setup click/touch functionality again after appending new options. Mobile was not working. 5909 }); 5910 5911 satruck.controller.pickup.hideCallAheadBasedOnTerritory(wip.donation.callAheadAllowed) 5912 // This hides the option to call ahead, based on availability by Territory and ARC 5913 satruck.controller.pickup.loadCallAheadTimeOptions(wip.donation.callAheadTimeOptions) 5914 } 5915 if ($(this).data('step') == 3) { 5916 $(this).prev().prev().find('.crumb-details').text(wip.donation.scheduleDate); 5917 } 5918 } 5919 }); 5920 } 5921 } 5922 }, 5923 5924 customPanel: function () { 5925 if ($('.step1').is(':visible') || $('#pickup_initial').length > 0) { 5926 $('.js-panel').addClass('panel-nobg'); 5927 } else { 5928 $('.js-panel').removeClass('panel-nobg'); 5929 } 5930 }, 5931 5932 detectOpenNav: function () { 5933 var $mobileNav = $('div.navbar-header'); 5934 5935 if ($mobileNav.hasClass('open')) { 5936 return true; 5937 }; 5938 5939 return false; 5940 } 5941}; 5942//Tealium 5943satruck.tealium = 5944{ 5945 _getPageName: function (title) { 5946 retVal = ""; 5947 5948 try { 5949 switch (title) { 5950 case "Home": 5951 retVal = "homepage"; 5952 break; 5953 case "My Donations": 5954 retVal = "account:my donations"; 5955 break; 5956 case "My Profile": 5957 retVal = " account:profile"; 5958 break; 5959 case "Schedule a Donation Pickup": 5960 retVal = "schedule pickup:enter zip"; 5961 break; 5962 case "Pickup Donation Confirmation": 5963 retVal = "schedule pickup:thank you"; 5964 break; 5965 case "Find a Dropoff Location": 5966 retVal = "find drop off location"; 5967 break; 5968 case "Donation Valuation Guide": 5969 retVal = "donation value guide"; 5970 break; 5971 case "Donate a Vehicle": 5972 retVal = "donate vehicle:"; 5973 break; 5974 case "Vehicle Donation Confirmation": 5975 retVal = "donate vehicle:thank you"; 5976 break; 5977 case "Find a Thrift Store Location": 5978 retVal = "find a thrift store location:search"; 5979 break; 5980 default: 5981 retVal = title; 5982 } 5983 return retVal; 5984 } 5985 catch (err) { 5986 DN.Utils.log(err.toString()); 5987 } 5988 }, 5989 _setPickupSubPageTealium: function (step) { 5990 step = step.toString(); 5991 subPageName = ""; 5992 var tealWip = satruck.config._loadWorkflowData(); 5993 5994 try { 5995 switch (step) { 5996 case "0-1": 5997 subPageName = "enter zip"; 5998 break; 5999 case "0-2": 6000 subPageName = "service not available"; 6001 break; 6002 case "0-3": 6003 subPageName = "corps form"; 6004 break; 6005 case "1": 6006 subPageName = "select items"; 6007 break; 6008 case "2": 6009 subPageName = "select date"; 6010 break; 6011 case "3-1": 6012 subPageName = "verify account"; 6013 //Tealium 6014 utag_view = utag_data; 6015 utag_view.page_name = "ARC | schedule pickup:verify account"; 6016 //utag_view.pickup_date = $.datepicker.formatDate('yymmdd', new Date()) + ":" + $.datepicker.formatDate('yymmdd', new Date(tealWip.donation.scheduleDate)) + ":" + (new Date(tealWip.donation.scheduleDate).setHours(0, 0, 0, 0) - new Date().setHours(0, 0, 0, 0)) / (1000 * 60 * 60 * 24); 6017 utag_view.site_section = "Schedule Pickup"; 6018 utag_view.site_type = "ARC"; 6019 if (typeof utag != 'undefined' && utag != null) { 6020 utag.view(utag_view); 6021 } 6022 break; 6023 case "3-2": 6024 subPageName = "login"; 6025 //Tealium 6026 utag_view = utag_data; 6027 utag_view.page_name = "ARC | schedule pickup:login"; 6028 //utag_view.pickup_date = $.datepicker.formatDate('yymmdd', new Date()) + ":" + $.datepicker.formatDate('yymmdd', new Date(tealWip.donation.scheduleDate)) + ":" + (new Date(tealWip.donation.scheduleDate).setHours(0, 0, 0, 0) - new Date().setHours(0, 0, 0, 0)) / (1000 * 60 * 60 * 24); 6029 utag_view.site_section = "Schedule Pickup"; 6030 utag_view.site_type = "ARC"; 6031 if (typeof utag != 'undefined' && utag != null) { 6032 utag.view(utag_view); 6033 } 6034 break; 6035 case "3-3": 6036 subPageName = "input donor info-create account"; 6037 //Tealium 6038 utag_view = utag_data; 6039 utag_view.page_name = "ARC | schedule pickup:input donor info-create account"; 6040 //utag_view.pickup_date = $.datepicker.formatDate('yymmdd', new Date()) + ":" + $.datepicker.formatDate('yymmdd', new Date(tealWip.donation.scheduleDate)) + ":" + (new Date(tealWip.donation.scheduleDate).setHours(0, 0, 0, 0) - new Date().setHours(0, 0, 0, 0)) / (1000 * 60 * 60 * 24); 6041 utag_view.site_section = "Schedule Pickup"; 6042 utag_view.site_type = "ARC"; 6043 if (typeof utag != 'undefined' && utag != null) { 6044 utag.view(utag_view); 6045 } 6046 break; 6047 case "3-4": 6048 subPageName = "lookup account"; 6049 //Tealium 6050 utag_view = utag_data; 6051 utag_view.page_name = "ARC | schedule pickup:lookup account"; 6052 //utag_view.pickup_date = $.datepicker.formatDate('yymmdd', new Date()) + ":" + $.datepicker.formatDate('yymmdd', new Date(tealWip.donation.scheduleDate)) + ":" + (new Date(tealWip.donation.scheduleDate).setHours(0, 0, 0, 0) - new Date().setHours(0, 0, 0, 0)) / (1000 * 60 * 60 * 24); 6053 utag_view.site_section = "Schedule Pickup"; 6054 utag_view.site_type = "ARC"; 6055 if (typeof utag != 'undefined' && utag != null) { 6056 utag.view(utag_view); 6057 } 6058 break; 6059 case "4": 6060 subPageName = "save ticket dialog"; 6061 break; 6062 default: 6063 subPageName = "location"; 6064 } 6065 //Tealium 6066 utag_data.page_name = "ARC | schedule pickup:" + subPageName; 6067 } 6068 catch (err) { 6069 DN.Utils.log(err.toString()); 6070 } 6071 }, 6072 _setVehicleSubPageTealium: function (step) { 6073 step = step.toString(); 6074 subPageName = ""; 6075 var tealWip = satruck.config._loadWorkflowData(); 6076 //Tealium 6077 utag_view = utag_data; 6078 utag_view.login_status = satruck.account.is_logged_in() ? "Logged In" : "Not Logged In"; 6079 utag_view.site_section = "Donate Vehicle"; 6080 utag_view.site_type = "ARC"; 6081 6082 try { 6083 switch (step) { 6084 case "0-1": 6085 subPageName = "enter zip"; 6086 break; 6087 case "0-2": 6088 subPageName = "service not available"; 6089 break; 6090 case "0-3": 6091 subPageName = "corps form"; 6092 break; 6093 case "1": 6094 subPageName = "select vehicle type'"; 6095 //Tealium 6096 utag_view.page_name = "ARC | donate vehicle:select vehicle type"; 6097 if (typeof utag != 'undefined' && utag != null) { 6098 utag.view(utag_view); 6099 } 6100 break; 6101 case "2": 6102 subPageName = "enter vehicle details"; 6103 //Tealium 6104 utag_view.page_name = "ARC | donate vehicle:enter vehicle details"; 6105 if (typeof utag != 'undefined' && utag != null) { 6106 utag.view(utag_view); 6107 } 6108 break; 6109 case "3": 6110 subPageName = "contact preference"; 6111 //Tealium 6112 utag_view.page_name = "ARC | donate vehicle:contact preference"; 6113 //utag_view.pickup_date = $.datepicker.formatDate('yymmdd', new Date()) + ":" + $.datepicker.formatDate('yymmdd', new Date(tealWip.donation.scheduleDate)) + ":" + (new Date(tealWip.donation.scheduleDate).setHours(0, 0, 0, 0) - new Date().setHours(0, 0, 0, 0)) / (1000 * 60 * 60 * 24); 6114 if (typeof utag != 'undefined' && utag != null) { 6115 utag.view(utag_view); 6116 } 6117 break; 6118 case "4-1": 6119 subPageName = "verify account"; 6120 //Tealium 6121 utag_view.page_name = "ARC | donate vehicle:verify account"; 6122 //utag_view.pickup_date = $.datepicker.formatDate('yymmdd', new Date()) + ":" + $.datepicker.formatDate('yymmdd', new Date(tealWip.donation.scheduleDate)) + ":" + (new Date(tealWip.donation.scheduleDate).setHours(0, 0, 0, 0) - new Date().setHours(0, 0, 0, 0)) / (1000 * 60 * 60 * 24); 6123 if (typeof utag != 'undefined' && utag != null) { 6124 utag.view(utag_view); 6125 } 6126 break; 6127 case "4-2": 6128 subPageName = "login"; 6129 //Tealium 6130 utag_view.page_name = "ARC | donate vehicle:login"; 6131 //utag_view.pickup_date = $.datepicker.formatDate('yymmdd', new Date()) + ":" + $.datepicker.formatDate('yymmdd', new Date(tealWip.donation.scheduleDate)) + ":" + (new Date(tealWip.donation.scheduleDate).setHours(0, 0, 0, 0) - new Date().setHours(0, 0, 0, 0)) / (1000 * 60 * 60 * 24); 6132 if (typeof utag != 'undefined' && utag != null) { 6133 utag.view(utag_view); 6134 } 6135 break; 6136 case "4-3": 6137 subPageName = "input donor info-create account"; 6138 //Tealium 6139 utag_view.page_name = "ARC | donate vehicle:input donor info-create account"; 6140 //utag_view.pickup_date = $.datepicker.formatDate('yymmdd', new Date()) + ":" + $.datepicker.formatDate('yymmdd', new Date(tealWip.donation.scheduleDate)) + ":" + (new Date(tealWip.donation.scheduleDate).setHours(0, 0, 0, 0) - new Date().setHours(0, 0, 0, 0)) / (1000 * 60 * 60 * 24); 6141 if (typeof utag != 'undefined' && utag != null) { 6142 utag.view(utag_view); 6143 } 6144 break; 6145 case "4-4": 6146 subPageName = "lookup account"; 6147 //Tealium 6148 utag_view.page_name = "ARC | donate vehicle:lookup account"; 6149 //utag_view.pickup_date = $.datepicker.formatDate('yymmdd', new Date()) + ":" + $.datepicker.formatDate('yymmdd', new Date(tealWip.donation.scheduleDate)) + ":" + (new Date(tealWip.donation.scheduleDate).setHours(0, 0, 0, 0) - new Date().setHours(0, 0, 0, 0)) / (1000 * 60 * 60 * 24); 6150 if (typeof utag != 'undefined' && utag != null) { 6151 utag.view(utag_view); 6152 } 6153 break; 6154 case "4": 6155 subPageName = "save ticket dialog"; 6156 break; 6157 default: 6158 subPageName = "location"; 6159 } 6160 //Tealium 6161 utag_data.page_name = "ARC | donate vehicle:" + subPageName; 6162 } 6163 catch (err) { 6164 DN.Utils.log(err.toString()); 6165 } 6166 } 6167} 6168 6169satruck._init = function () { 6170 satruck.config.setMobile();
6171 satruck.config._setAjaxDefaults(); 6172 satruck.config._initErrorHandling(); 6173 satruck.config._registerLayoutControls(); 6174 satruck.controller._registerWorkflowControls(); 6175 6176}; 6177 6178/*****************************/ 6179/* SET ISMOBILE ON RESIZE */ 6180/*****************************/ 6181$(window).resize(function () { 6182 satruck.config.setMobile(); 6183}); 6184 6185 6186/*****************************/ 6187/* IT ALL STARTS HERE */ 6188/*****************************/ 6189$(document).ready(function () { 6190 satruck._init(); 6191}); 6192 6193/*****************************/ 6194/* ENTITY MAPS */ 6195/*****************************/ 6196satruck.workflow = {}; 6197satruck.workflow.default = 6198{ 6199 id: null, 6200 name: null, 6201 tid: 0, 6202 territoryAbbr: '', 6203 referredBy: '', 6204 startedAt: '', 6205 currentStep: 0, 6206 dropOutStep: 0, 6207 stepDetails: [], 6208 hasTimedOut: false, 6209 isComplete: false, 6210 hasErrors: false, 6211 donationType: null, 6212 donation: null, 6213 plugins: null 6214}; 6215 6216satruck.dropoffticket = {}; 6217satruck.dropoffticket.default = 6218{ 6219 id: null, 6220 tid: 0, 6221 aid: 0, 6222 did: 0, 6223 items: [], 6224 locationId: 0, 6225 dropOffDate: null, 6226 emailReceipt: false 6227}; 6228 6229satruck.pickuporder = {}; 6230satruck.pickuporder.default = 6231{ 6232 tid: 0, 6233 aid: 0, 6234 did: 0, 6235 pickupId: 0, 6236 sectorId: 0, 6237 showZipMasterForm: false, 6238 zipMasterEmail: '', 6239 zipMasterPhone: '', 6240 notServiced: false, 6241 callAheadAllowed: false, 6242 callAheadTimeOptions: [0], 6243 warningMessage: '', 6244 scheduleDate: null, 6245 items: [], 6246 itemsString: '' 6247}; 6248 6249satruck.vehicleorder = {}; 6250satruck.vehicleorder.default = 6251{ 6252 tid: 0, 6253 aid: 0, 6254 did: 0, 6255 vehicleId: 0 6256}; 6257 6258//Represents Donor returned from Server on Donor Lookup 6259satruck.donor = {} 6260satruck.donor.default = 6261{ 6262 Territory_id: 0, 6263 Arc_id: 0, 6264 ZipCode: '', 6265 Donor_id: 0, 6266 FirstName: '', 6267 LastName: '', 6268 HomePhone: '', 6269 HomeExtension: '', 6270 DayPhone: '', 6271 DayExtension: '', 6272 AddressLine1: '', 6273 AddressLine2: '', 6274 City: '', 6275 State: '', 6276 CrossStreet: 'NA', 6277 OtherInfo: '', 6278 Email: '', 6279 Latitude: 0.0, 6280 Longitude: 0.0, 6281 IsBusiness: false, 6282 NoSolicitation: false, 6283 Geocode_id: 0, 6284 GeocodeTime: null, 6285 GeocodeTimeString: '', 6286 GeocodeSource: '', 6287 MapInfo: null, 6288 IsSpecial: null, 6289 NoServiceReminders: false, 6290 DoNotEmailSolicitation: false, 6291 DoNotCallSolicitation: false, 6292 DoNotTextSolicitation: false, 6293 DoNotEmailServiceReminders: false, 6294 DoNotCallServiceReminders: false, 6295 DoNotTextServiceReminders: false, 6296 GeocodeService: '', 6297 GeocodeConfidence: '', 6298 GeocodeAttempts: 0, 6299 PrivacySettings: 0, 6300 DonorGUID: '', 6301 DonorUserId: '', 6302 LastMod: '' 6303};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.