ZDETAILZ Auto Detailing

Service areas: MARYVILLE, ALCOA, and TOWNSEND.

Pick up and drop off is INCLUDED. As a home-based business, we aim to provide the most convenient and seamless experience! Licensed and insured.

All you have to do is fill out your info. Then, choose the best service(s), date, and time for you! And we will confirm shortly!

Your Contact Details

* required
* required
* required

Passenger Vehicles

Tell Us About Your Vehicle

* These fields are required to submit your booking

Tell Us About Your Vehicle

Services & Packages

Full Detail

Full Detail

Featured Service

All the interior hard surfaces including leather, vinyl, and plastic surfaces will be cleaned and protected. Every crevice and seam will be blowed out. Then, we will thoroughly vacuum every area possible. We will clean all the interior windows and glass. We will hand wash and dry the vehicle. Clean ... read more

All the interior hard surfaces including leather, vinyl, and plastic surfaces will be cleaned and protected. Every crevice and seam will be blowed out. Then, we will thoroughly vacuum every area possible. We will clean all the interior windows and glass. We will hand wash and dry the vehicle. Clean and protect the door jams. Clean and protect the tires, rims, and wheel wells. And we'll finish by adding a 3 month sealant to the paint to keep it looking good and protect it!!!

Price varies based on condition of vehicle. It will be extra for vehicles with heavy pet hair, dirt or staining. If your vehicle needs extra attention, we have add-on services available.

Services Included:

  • All rubber, vinyl & plastic surfaces detailed (ex. dash, console, door panels, cup holders etc...) 
  • All seams and crevices thoroughly blown out
  • Complete interior vacuum (any and all areas)
  • Light spot/stain removal
  • Leather cleaning
  • Floor mat cleaning
  • Headliner cleaning
  • Interior glass & mirrors
  • Interior surfaces protection
  • Tire/rim/wheel well detail
  • Door jam detail & protection
  • Complete exterior hand wash/dry
  • Bugs and bird dropping removal
  • Tire dressing & protection
  • Entry level paint protection (3 mo. sealant)
  • Pick up and drop off included
show less

Select service

Interior Detailing

Interior Detailing

All the interior hard surfaces including leather, vinyl, and plastic surfaces will be cleaned and protected. Every crevice and seam will be blowed out. Then, we will thoroughly vacuum every area possible. We will clean all the interior windows and glass. Price varies based on condition. It will be e... read more

All the interior hard surfaces including leather, vinyl, and plastic surfaces will be cleaned and protected. Every crevice and seam will be blowed out. Then, we will thoroughly vacuum every area possible. We will clean all the interior windows and glass. Price varies based on condition. It will be extra for heavy pet hair, dirt or staining. If your vehicle needs extra attention, we have add-on services available.

Services Included:

  • All rubber, vinyl & plastic surfaces detailed (ex. dash, console, door panels, cup holders etc...) 
  • All cracks and crevices thoroughly blown out
  • Complete interior vacuum (any and all areas)
  • Light spot/stain removal
  • Leather cleaning
  • Floor mat cleaning
  • Headliner cleaning
  • Interior glass & mirrors
  • Interior surfaces protection
  • Pick up and drop off included
show less

Select service

Exterior Detailing

Exterior Detailing

We will hand wash and dry the vehicle. Clean and protect the door jams. Clean and protect the tires, rims, and wheel wells. And we'll finish by adding a 3 month sealant to the paint to keep it looking good and protect it!!! Price varies based on size and condition. If your vehicle needs extra attent... read more

We will hand wash and dry the vehicle. Clean and protect the door jams. Clean and protect the tires, rims, and wheel wells. And we'll finish by adding a 3 month sealant to the paint to keep it looking good and protect it!!! Price varies based on size and condition. If your vehicle needs extra attention, we have add-on services available.

Services Included:

  • Tire/rim/wheel well detail
  • Door jam detail & protection
  • Complete exterior hand wash/dry
  • Bugs and bird dropping removal
  • Tire dressing & protection
  • Entry level paint protection (3 mo. ceramic sealant)
  • Pick up and drop off included
show less

Select service

Fall Special - $600 Ceramic Package- LIMITED TIME OFFER

Fall Special - $600 Ceramic Package- LIMITED TIME OFFER

Featured Service

If you want to experience ✅excellent ceramic protection but you're not looking for ❌perfect paint correction and don't want to ❌pay thousands, THIS is the ✅ultimate beginner friendly package! Instead of the typical $1200+ and 2-day service, this LIMITED TIME offer is perfect for your daily driver. W... read more

If you want to experience excellent ceramic protection but you're not looking for perfect paint correction and don't want to pay thousands, THIS is the ultimate beginner friendly package! Instead of the typical $1200+ and 2-day service, this LIMITED TIME offer is perfect for your daily driver. We will start with an exterior detail. Then a clay bar and iron decontamination wash to deep clean the paint. Next, we will perform a light one step polish to prepare the surface for the coating to adhere properly to it. Lastly, we will apply a ceramic coating that can last up to 1-2 years depending on maintenance. It's a 1-day service for half the normal price!!! Ceramic coatings protect your paint by making it very hydrophobic which makes it much easier to keep clean. If you're ready to protect your second biggest investment and maintain the resale value of your vehicle, don't wait! The longer your vehicle goes unprotected, the harder it will be to restore it back to new. Book today!!!

Services Included:

  • Hand wash and dry
  • Tire/rim/wheel well detail
  • Door jam detail & protection
  • Bugs and bird dropping removal
  • Tire dressing & protection
  • Clay bar treatment
  • Iron decontamination wash
  • Light one-step paint polish
  • 1-2 year ceramic coating applied to all painted surfaces
  • Pick-up and dop-off included

Be sure to ask us about our monthly maintenance services to keep your vehicle protected and shiny all year long. 

show less

$1,200 $600

Select service

What is Your Vehicle's Condition?

What is Your Vehicle's Paint Condition?

LIGHT

MEDIUM

SEVERE

😎 Preferred Window Tint Level

If you're not sure don't worry we can go over options together.

90%

70%

50%

35%

30%

25%

20%

15%

5%

5% REAR + 50% FRONT

5% REAR + 35% FRONT

5% REAR + 20% FRONT

20% REAR + 50% FRONT

20% REAR + 35% FRONT

35% REAR + 50% FRONT

Do You Need Existing Tint Removed?

Yes, remove my old tint

Which PPF Coverage Would You Like?

PARTIAL HOOD

PARTIAL FRONT

FULL FRONT

FULL BODY

Do Any of the Following Apply to Your Vehicle?

Pet Hair

Seat Stains

Smoke Smell

Sap or Tar

What is Your Vehicle's Oxidation Level?

NONE

LIGHT

SEVERE

What color are your seats?

What type of seats do you have?

LEATHER

CLOTH OR FABRIC

SEAT COVER

ALCANTARA/SUEDE

Desired Date & Time

Choose a preferred date to check
Business Hours
  • Monday
    9:00 am - 5:00 pm
  • Tuesday
    9:00 am - 5:00 pm
  • Wednesday
    9:00 am - 5:00 pm
  • Thursday
    9:00 am - 5:00 pm
  • Friday
    9:00 am - 5:00 pm
  • Saturday
    Closed
  • Sunday
    Closed

What are your 2 wishes?

Tell us your two wishes for your service so we know what to focus on during your appointment. This helps ensure your satisfaction and provides us with a clear game-plan to make you happy.

#1
#2

Secure appointment with a $ deposit

We require an appointment confirmation deposit. This fee will hold your scheduled date and time for the services you selected. The deposit will go towards final price after services are completed.

Collected deposits are non refundable in the event of a no call/no show or cancellation for your scheduled appointment, when less than 48 hours from your scheduled appointment time.

How Did You Hear About Us?



Additional Notes?

Terms and Conditions

The terms and conditions set forth here reflect ZDETAILZ's policy with respect to each of its customers. All customers of ZDETAILZ agree to be bound by the terms and conditions set forth below. 

Our philosophy is to offer a stress-free detailing experience for our customers.

Your vehicle and performing proper detailing techniques is our first priority. We will not perform any service that shows potential to cause harm or damage your vehicle. Prior to ZDETAILZ performing services on your vehicle, you, the owner, will advise us of any cosmetic or mechanical issues that would prevent us from completing the detail.

These may include low battery, trunk permanently shut, etc…

If your vehicle poses a potential threat to our health and/or safety, please let us know. If there is the threat of any harmful substances (needles, drugs, gasoline, etc.) in the vehicle, you must let your detail technician know prior to your detail. You will be held responsible for any health and/or safety issues arising from your vehicle.

ZDETAILZ reserves the right to refuse service.

Appointments

We will arrive as close to the scheduled appointment time as possible. However, sometimes situations can occur that will disrupt the daily schedule. Our safety will never be compromised by rushing to meet a schedule. You will be called and advised of an arrival time when schedules change beyond our control.

Pricing varies for each vehicle and is determined by size, package, and condition.

Additional charges may apply for heavy stains, excessive pet hair, excessive debris removal, personal item removal and steam cleaning (if required) due to the additional time it takes. We will communicate any extra charges before completing the work.

We require a minimum 48 hour notice to change or cancel an appointment.

If you wish to change or cancel your appointment with less than 48 hours notice, a new deposit will be required.

Property Damage

Each customer agrees to indemnify and hold harmless ZDETAILZ, its owners, employees and affiliates from any damage, loss, expense, cost, claim and liability (including attorney and legal fees) arising out of ZDETAILZ services, including without limitation, any accidental property damage not relating to the services performed. I acknowledge that the unique nature of ZDETAILZ's business may expose me to greater property damage risk, and I hereby assume such risk.

ZDETAILZ will neither install nor remove any car seats or custom equipment from your vehicle unless deemed absolutely necessary and your approval and acceptance of these terms grants permission to do so. If you would like your car seat cleaned underneath, please have it removed prior to your appointment.

We will neither remove nor install custom equipment from your vehicle. This includes, but is not limited to, seat covers, subwoofers, light bars, pet protectors, and bumper stickers. If you would like these things cleaned underneath, please have them removed prior to your appointment.

There are NO GUARANTEES of bringing your vehicle back to a specific condition (i.e. Show Room New).

Payment

We accept cash and credit/debit cards. Payment is due at the completion of the detail.

Photographs and Video

We have your permission to take pictures or video of your vehicle for marketing purposes. These will never be sold or given to third parties.

Damage/Accidents

Reimbursement will not be paid for any minor cosmetic damage as a result of detailing your vehicle. Reimbursement will be paid for any major damage caused to your vehicle as a result of our gross negligence or willful misconduct. ZDETAILZ will approve the body shop and/or vendors before issuing any reimbursement.

If something arises after the detail that was not noticed during the final walk around, you must contact us within 24 hours and, if needed, schedule a touch-up detail within 3 days.

By submitting a booking request, each customer agrees to indemnify and hold harmless ZDETAILZ, its owners, employees and affiliates from and against any and all liabilities, expenses, damages, and costs, including attorney and legal fees, resulting from any service provided or injury after our services have been completed.

Gift Cards Available

We have gift cards available ranging from $100 - $500 or choose a custom amount to make the perfect gift!

Buy a Gift Card Now

ZDETAILZ Auto Detailing

4.9 202 Google reviews


I had my 2011 Subaru Legacy 3.6r detailed yesterday and my oh my did Estera go above and beyond my expectations! My paint on my car is no way in perfect shape... but my car is SHINY! I only had the full detail done and seat shampoo added on. My driver seat was stained like crazy! I have a light tan cloth seats, so of course those are easy to stain and hard to get clean! My seats look A M A Z I N G! looks just like how I got it from the dealership back in 2021. Loved the job that was done on my car, love how sweet and communative Estera was and love how conveniently she was able to pick up my car to get cleaned while I was at work and dropped off in time to go home!
Ashley Caylor Oct 2nd 2025 - 2 weeks ago

Great job and service. Very happy with the results. Interior clean and exterior clean were astonishing. Will be bringing the vehicle back within the next couple weeks to have it ceramic coated. Looking forward to seeing the end results after the ceramic coating. *** Follow up. I brought in my 2023 4Runner for an engine bay wash, undercarriage wash and exterior clean. The results were stunning. I was extremely happy with the detail work on the 4runner. In addition I brought my 2001 Toyota Tundra back (they already did the interior detail a couple weeks prior) and they did the System X ceramic coating, window ceramic coating and trim treatment. The results were incredible! The Tundra looks amazing!!!! They did a great job and I highly recommend them!
Charles Kyker May 2nd 2024 - a year ago

A 2016 Trax looks brand new. I'm so pleased with the outcome. I had some paint issues on the hood which are now completely gone. My headlights are as clear as can be after the headlight restoration. The service was fast and lady that worked on my vehicle was so friendly and polite. Plus, it's a female owned business! I'm definitely recommending to you and my friends Have a Blessed Day!
Jeanette Huntley May 14th 2025 - 5 months ago
Privacy & Data Collection Notice
ZDETAILZ Auto Detailing collects information such as your phone number or email in order to contact you regarding estimates, invoices, bookings and other business communications and promotions at various frequencies depending on your appointments, invoices etc. By submitting your information you are agreeing to receive messages from ZDETAILZ Auto Detailing on various intervals depending on your appointments schedules and followup reminders and that data rates may apply. You can also text HELP to get help at any time.

Your IP Address: 216.73.216.58 is tracked for fraud prevention and security.




'); setTimeout(function() { $('#global-loader').remove(); }, 5000); //} }); $('.timepicker').timepicker({ timeFormat: 'h:mm p', interval: 15, //minTime: '10', //maxTime: '11:00pm', //defaultTime: '9', //startTime: '10:00', dynamic: false, dropdown: true, scrollbar: true }); function roundToTwoDecimals(number) { return parseFloat(roundNumber(roundNumber(number * 100) / 100)).toFixed(2); } $(document).on('click', '.makePayChoices', function(){ $('#payOptionsAlert').html(''); var invoiceID = $(this).attr('invID'); var invoice = $(this).attr('invoice'); var baseURL = 'https://orbisx.ca/app'; $('#modalMakePaymentOptions a.pay-option-offline').attr('href', baseURL+'/pay-invoice-offline?inv='+invoiceID); $('#modalMakePaymentOptions a.pay-option-gift-card').attr('href', baseURL+'/pay-invoice-gift-card/VSV3y/'+invoice); $('#modalMakePaymentOptions a.pay-option-cpos-terminal').attr('href', baseURL+'/cpos-terminal/'+invoice); $('#modalMakePaymentOptions a.pay-option-cpos-web').attr('href', baseURL+'/cpos-web/'+invoice); $('#modalMakePaymentOptions a.pay-option-stripe-web').attr('href', baseURL+'/pay-invoice?inv='+invoiceID); $('#modalMakePaymentOptions a.pay-option-qbo-payment').attr('href', baseURL+'/pay-qbo?inv='+invoiceID); $('#modalMakePaymentOptions a.pay-option-stripe-terminal').attr('href', baseURL+'/stripe-terminal/'+invoice); $('#modalMakePaymentOptions a.pay-option-stripe-chipper').attr('href', baseURL+'/chipper/'+invoiceID); $('#modalMakePaymentOptions a.pay-option-stripe-taptopay').attr('href', baseURL+'/stripe-tap-to-pay/'+invoice); $('#modalMakePaymentOptions a.pay-option-square-reader').attr('href', baseURL+'/square-reader/'+invoice); $('#modalMakePaymentOptions a.pay-option-square-terminal').attr('href', baseURL+'/square-terminal/'+invoice); $('#modalMakePaymentOptions a.pay-option-square-web').attr('href', baseURL+'/square-web/'+invoice); $('#modalMakePaymentOptions a.pay-option-clover-web').attr('href', baseURL+'/clover-web/'+invoice); $('#modalMakePaymentOptions a.pay-option-clover-terminal').attr('href', baseURL+'/clover-terminal/'+invoice); $('#modalMakePaymentOptions a.pay-option-yoco-web').attr('href', baseURL+'/yoco-web/'+invoice); $.post("https://orbisx.ca/app/exec", {dothis:'getClientCreditsBalance', invoiceID: invoiceID}, function(data) { data = $.parseJSON(data); if (data.apply_html) { $('#payOptionsAlert').html(data.apply_html); } }); $.post("https://orbisx.ca/app/exec", {dothis:'getInvoiceDepositPossible', invoiceID: invoiceID}, function(data) { data = $.parseJSON(data); if (data.success) { $('#modalMakeDepositOptions').html('

or you can collect a deposit

or custom deposit amount

'); } }); }); $('#modalMakeDepositOptions').on('change', '#liveDepositAmount', function(){ var amt = $('#liveDepositAmount option:selected').val(); var inv = $(this).attr('invoice'); if(amt > 0){ window.location.href = "https://orbisx.ca/app/depositpayment/VSV3y/"+inv+"?percAmt="+amt; } }); $('#modalMakeDepositOptions').on('click', '#liveCustomDepositBtn', function(e){ var amt = $('#liveCustomDepositAmount').val(); var inv = $(this).attr('invoice'); if(amt > 0){ window.location.href = "https://orbisx.ca/app/depositpayment/VSV3y/"+inv+"?customDepositAmt="+amt; }else{ snackBar('Enter a deposit amount to continue', 'error'); } e.preventDefault(); }); function saveCposCardOnFile(clientID, token, ps2000_data, approval_code, exp_date, showMessage=false, address, zip){ $.post("https://orbisx.ca/app/exec", {dothis:'saveCposWebCardOnFile', clientID:clientID, itemID:token, typeID:ps2000_data, toggle:approval_code, description:exp_date, address:address, zip:zip, businessID: '3845'}, function(data) { data = $.parseJSON(data); if(data.success == true && showMessage == true){ snackBar("Card saved to customer's profile :)"); } }); } $('document').ready(function(){ //$("#global-loader").hide(); $('.focus').focus(); $('.filter-multi').multipleSelect({ filter: true, hideOptgroupCheckboxes: true, minimumCountSelected: 0 }); $('#searchIcon').click(function(){ $('#searchForm').submit(); }); $('table th.calc_col_total').each(function(i){ calculateColumn($(this).index(), i); }); $(document).on('keyup', '.number-only', function () { this.value = this.value.replace(/[^-0-9.:\.]/g,''); }); $(document).on('keyup', '.number-only-positive', function () { this.value = this.value.replace(/[^0-9.:\.]/g,''); }); $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { $('.select2').select2({ minimumResultsForSearch: '' }); $('textarea').each(function(){ $(this).height(0).height(this.scrollHeight); }); var view = $(e.target).attr("href").replace('#', '/'); if (view == '/main') { view = '/'; } $('#view').val(view); }); $('#templates').on('shown.bs.collapse', function () { init_autogrow(); }); $(document).on('click', '#events-list .panel-heading', function(e) { $('.select2').select2({ minimumResultsForSearch: '', dropdownParent: $('#events-list') }); }); $(document).on('click', '[data-toggle="card-collapse"]', function(e) { var view = $(this).parent('div').attr('id'); $('#view').val(view); init_autogrow(); $('[data-toggle="popover"], .popoverShow').popover({ html: true, trigger: 'hover' }); $('#cuerpo-principal').on('click', '.popoverShow', function(){ swal({ title: 'Additional Info', text: $(this).attr('data-content'), html: true, timer: 15000, type: 'info', showConfirmButton: true }); }); $('.select2').select2({ minimumResultsForSearch: '' }); }); init_autogrow(); if($(".wysiwyg").length > 0){ tinymce.init({ selector: ".wysiwyg", theme: "modern", height:300, relative_urls : false, remove_script_host : false, convert_urls : true, plugins: [ "advlist autolink link image lists charmap hr anchor pagebreak", "searchreplace wordcount visualblocks visualchars code insertdatetime media nonbreaking", "save table contextmenu directionality emoticons template paste textcolor" ], menubar: 'edit insert view format table tools', toolbar: "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | preview media fullpage | forecolor backcolor emoticons", style_formats: [ {title: 'Bold text', inline: 'b'}, {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}}, {title: 'Heading', block: 'h2'}, {title: 'Example 1', inline: 'span', classes: 'example1'}, {title: 'Example 2', inline: 'span', classes: 'example2'}, {title: 'Table styles'}, {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'} ] }); } $(document).on('click', '[data-toggle="lightbox"]', function(event) { event.preventDefault(); $(this).ekkoLightbox(); }); $('.vehicleColorChooser').on('click', 'a', function(){ var vehicleRef = $(this).parents('.vehicleColorChooser').attr('vehicleReference'); var color = $(this).attr('data-hex'); $('#vehicleColorVal'+vehicleRef).val(color).trigger('change'); $('#vehicleDisplay'+vehicleRef+' .vehicleOverlay').css('background', '#'+color); $('#vehicleDisplay'+vehicleRef).find('.vehicleColorDefaultText').html('Color Set'); }); $('.vehicleCustomColor').on('change', function(){ var vehicleRef = $(this).parents('.vehicleColorChooser').attr('vehicleReference'); $('#vehicleColorVal'+vehicleRef).val(this.jscolor).trigger('change'); $('#vehicleDisplay'+vehicleRef+' .vehicleOverlay').css('background', '#'+this.jscolor); $('#vehicleDisplay'+vehicleRef).find('.vehicleColorDefaultText').html('Color Set'); }); $('.vehicleColorChooser li.keepOpen').on('click', function(event) { event.stopPropagation(); }); $('.spectrumPaletteVehicle').spectrum({ showPaletteOnly: false, showPalette:false, hideAfterPaletteSelect:true, showButtons: true, preferredFormat: "hex", color: '#FFFFFF', move: function(color) { color.toHexString(); var vehicleRef = $(this).parents('.vehicleColorChooser').attr('vehicleReference'); $('#vehicleColorVal'+vehicleRef).val(color).trigger('change'); $('#vehicleDisplay'+vehicleRef+' .vehicleOverlay').css('background', color); }, change: function(color){ var vehicleRef = $(this).parents('.vehicleColorChooser').attr('vehicleReference'); $('#vehicleColorVal'+vehicleRef).val(color).trigger('change'); $('#vehicleDisplay'+vehicleRef+' .vehicleOverlay').css('background', color); $('.vehicleColorChooser .dropdown-menu.show').removeClass('show'); } }); $('.table-responsive').on('shown.bs.dropdown', function (e) { var t = $(this), m = $(e.target).find('.dropdown-menu'), tb = t.offset().top + t.height(), mb = m.offset().top + m.outerHeight(true), d = 20; // Space for shadow + scrollbar. if (t[0].scrollWidth > t.innerWidth()) { if (mb + d > tb) { t.css('padding-bottom', ((mb + d) - tb)); t.css('margin-right', '5px'); } } else { t.css('overflow', 'visible'); } }).on('hidden.bs.dropdown', function () { $(this).css({'padding-bottom': '', 'overflow': ''}); }); }); function init_autogrow(){ autosize(document.querySelectorAll('textarea')); $('textarea').each(function(){ $(this).height(0).height(this.scrollHeight); }); } $('.modal').on('shown.bs.modal', function (e) { init_autogrow(); $('.select2').select2({ minimumResultsForSearch: '' }); }); $('.select2').select2({ minimumResultsForSearch: '' }); function roundNumber(value) { var value = +value; if (isNaN(value)) return NaN; value = value.toString().split('e'); value = Math.round(+(value[0] + 'e' + (value[1] ? (+value[1] + 2) : 2))); value = value.toString().split('e'); return (+(value[0] + 'e' + (value[1] ? (+value[1] - 2) : -2))).toFixed(2); } function moneyFormat(number) { var parts = number.toString().split("."); parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","); return parts.join("."); } function calculateColumn(index, i){ var total = 0; $('table tr').each(function(){ var value = parseFloat( $('td', this).eq(index).text().replace(/[^0-9\.]/g, '') ); if ($.isNumeric(value)){ total += value; } }); if ( $('th.calc_col_total').eq(i).hasClass('decimals') ) { $('table tfoot td').eq(index).text(addCommas(roundNumber(total))); }else if ( $('th.calc_col_total').eq(i).hasClass('money') ) { $('table tfoot td').eq(index).text('$'+addCommas(roundNumber(total))); }else{ $('table tfoot td').eq(index).text(addCommas(total)); } } addCommas = function(input){ return (input.toString()).replace( /^([-+]?)(0?)(\d+)(.?)(\d+)$/g, function(match, sign, zeros, before, decimal, after) { var reverseString = function(string) { return string.split('').reverse().join(''); }; var insertCommas = function(string) { var reversed = reverseString(string); var reversedWithCommas = reversed.match(/.{1,3}/g).join(','); return reverseString(reversedWithCommas); }; return sign + (decimal ? insertCommas(before) + decimal + after : insertCommas(before + after)); } ); }; $.fn.isOnScreen = function(){ var win = $(window); var viewport = { top : win.scrollTop(), left : win.scrollLeft() }; viewport.right = viewport.left + win.width(); viewport.bottom = viewport.top + win.height(); var bounds = this.offset(); bounds.right = bounds.left + this.outerWidth(); bounds.bottom = bounds.top + this.outerHeight(); return (!(viewport.right bounds.right || viewport.bottom bounds.bottom)); }; if(typeof android !== "undefined" && android !== null) { var OneSignalID = android.getOneSignalRegisteredId(); if (OneSignalID) { $.post("https://orbisx.ca/app/exec/updateUserSpecs", {OneSignalID:OneSignalID}, function(data) { data = $.parseJSON(data); }); } } function getOneSignalTokeniOS(token) { if(token){ $.post("https://orbisx.ca/app/exec/updateUserSpecs", {OneSignalID:token}, function(data) { data = $.parseJSON(data); }); } } function locationTracker(longitude,latitude){ if (longitude && latitude) { $.post("https://orbisx.ca/app/exec/updateUserSpecs", {lat:latitude, lng:longitude}, function(data) { data = $.parseJSON(data); }); } } function update_event_vehicle_from_vin(vin, eventID, clientID, vehicleID){ if (eventID && clientID && vin.length >= 11) { $.post("https://orbisx.ca/app/ajax/get-vin-details", {vin:vin, clientID:clientID, vehicleID:vehicleID}, function(data) { data = $.parseJSON(data); if(data.success && data.vehicle){ $('#eventVehicle'+eventID).text(data.vehicle); } }); } } $(document).on('click', '.clearInputGroupVal', function(e){ $(this).parents('.input-group').find('input').val(''); e.preventDefault(); }); $('.carfaxReportLookup').on('click', function(){ var vin = $(this).parents('.input-group').find('input').val(); if(vin){ location.href = 'https://orbisx.ca/app/carfax/'+(vin); }else{ swal({ title: 'Something Went Wrong', text: 'Enter a VIN and try again.', timer: 3000, type: 'error', showConfirmButton: true }); } }); function openScanner(){ if(window.webkit){ window.webkit.messageHandlers.openQRCodeScanner.postMessage({command: 'openQRCodeScanner',data:''}); }else if (typeof android !== 'undefined' && android !== null) { android.openQRCodeScanner(); } } function processScannerVIN(vin) { vin = vin.replace(/\W+/g, " ").toUpperCase().replace('I', ''); if (vin) { $('.vinScanResults').val(''); $('.vinScanResults').val(vin).blur(); }else{ swal({ title: 'Something Went Wrong', text: 'Try scanning the VIN again.', timer: 3000, type: 'error', showConfirmButton: true }); } } $(document).on('click', '.vinScanner', function(e) { openScanner(); }); $(document).on('click', '.scannerOCR', function(e){ $('.ocrResultTarget').removeClass('ocrResultTarget'); var elem = $(this).parents('.input-group').find('input'); $(elem).addClass('ocrResultTarget'); var ocrType = $(this).attr('ocrType'); $('#modalGeneric .modal-title').html('Take a Photo to Scan VIN or Plate #'); $('#modalGeneric .modal-body').html(''); $('#modalGeneric .modal-footer').html(' Close popup window'); $('#modalGeneric').modal('show'); $('.uploadOcrPic').dropify(); e.preventDefault(); }); $(document).on('click', '.ocrScanAgain', function(e){ var ocrType = $(this).attr('ocrType'); $('#modalGeneric .modal-body').html(''); $('.uploadOcrPic').dropify(); e.preventDefault(); }); $(document).on('click', '.ocrSaveRsp', function(e){ $('.ocrResultTarget').val($(this).parents('.input-group').find('input').val()).trigger('blur'); $('#modalGeneric').modal('hide'); $('.ocrResultTarget').removeClass('ocrResultTarget'); e.preventDefault(); }); $(document).on('change', '.uploadOcrPic', function(){ $('#ocrResponse').html(''); var dataimg = new FormData(); var ocrType = $('#ocrType').val(); dataimg.append('dothis', 'scanOcrImage'); dataimg.append('opVal', $(this)[0].files[0]); dataimg.append('opVal2', ocrType); $('body').append('

Luna is scanning your image...

'); $.ajax({ url: "https://orbisx.ca/app/exec", type:"POST", cache : false, processData: false, contentType: false, dataType: "json", enctype: 'multipart/form-data', data: dataimg, success: function(data) { if(data.success){ $('#modalGeneric .modal-body').html(data.html); }else{ $('#modalGeneric .modal-body').html('

'+data.message+'

'); $('.uploadOcrPic').dropify(); } $('#global-loader').remove(); } }); }); function processCamResponse(result, businessid, eventid, bayid){ if(result == 1){ swal({ title: 'Photos Captured', text: 'Your IP cameras have captured the photos', timer: 1500, type: 'success', showConfirmButton: true }); }else{ swal({ title: 'No Photos Captured', text: 'Something went wrong, try capturing your photos again.', timer: 3000, type: 'error', showConfirmButton: true }); } } function appCheck() { var appUsed = false; var appType = false; if(window.webkit){ appUsed = true; appType = 'iOS'; }else if (typeof android !== 'undefined' && android !== null) { appUsed = true; appType = 'android'; } if (appType == 'iOS') { $('.onlyWebFeature').hide(); // iOS fix for target="_blank" links (downloads + external) $('a[target="_blank"]').each(function () { const href = $(this).attr('href'); if (!href) return; // Match file downloads, allowing query strings too if (href.match(/\.(pdf|jpe?g|png|gif|webp|svg|heic|avif|docx?|xlsx?|zip|rar|csv)(\?.*)?$/i)) { $(this).removeAttr('target'); $(this).on('click', function (e) { e.preventDefault(); window.location.href = href; // Direct open or download }); } else { // Non-download links: open in same tab (avoids iOS blank failures) $(this).on('click', function (e) { e.preventDefault(); window.open(href, '_self'); }); } }); $('#cuerpo-principal .popoverShow').popover({ html: true, trigger: 'click' }); $('body').on('click', function (e) { if ($(e.target).data('toggle') !== 'popover' && $(e.target).parents('.popover.in').length === 0) { $('[data-toggle="popover"]').popover('hide'); $('.popoverShow').popover('hide'); } }); $('#cuerpo-principal').on('click', '.popoverShow', function(){ swal({ title: 'Additional Info', text: $(this).attr('data-content'), html: true, timer: 15000, type: 'info', showConfirmButton: true }); }); }else{ if (appUsed) { $('.onlyWebFeature').hide(); $('a[target="_blank"]').removeAttr('target'); $('.popoverShow').popover({ html: true, trigger: 'click' }); $('body').on('click', function (e) { if ($(e.target).data('toggle') !== 'popover' && $(e.target).parents('.popover.in').length === 0) { $('[data-toggle="popover"]').popover('hide'); $('.popoverShow').popover('hide'); } }); $('#cuerpo-principal').on('click', '.popoverShow', function(){ swal({ title: 'Additional Info', text: $(this).attr('data-content'), html: true, timer: 15000, type: 'info', showConfirmButton: true }); }); }else{ $('.onlyAppFeature').hide(); $('.popoverShow').popover({ html: true, trigger: 'hover' }); $('.nonAppPopover').popover({ html: true, trigger: 'hover' }); } } } $("#new-card").click(function(){ $("input[name=card_number], input[name=cvc]").attr("disabled",!this.checked); if($("#new-card").is(":checked")) { $("input[name=card_number]").focus().attr("oldcard", $("#card-number").val() ).val(""); }else{ $("#card-number").val($("input[name=card_number]").attr("oldcard")); } }); function get_lead_message_log(leadID){ $.post("https://orbisx.ca/app/exec", {dothis:'getSmsChatLead', leadID: leadID}, function(data) { data = $.parseJSON(data); if(data.success == true){ $('#modalGeneric .modal-body').html(data.html); $('#modalGeneric .chat-list').stop().animate({ scrollTop: $('#modalGeneric .chat-list')[0].scrollHeight }, 800); }else{ swal({ title: data.message_title, text: data.message, timer: 3000, type: 'error', showConfirmButton: true }); } }); } $(document).on('click', '.viewSmsChatLead', function(){ var leadID = $(this).attr('leadID'); var leadName = $(this).attr('leadName'); if(leadID){ $(this).find('i').removeClass('text-success'); $('#modalGeneric .modal-title').html('SMS Chat with '+leadName); $('#modalGeneric .modal-body').html('Loading chat...'); get_lead_message_log(leadID); $('#modalGeneric .modal-footer').html('
'); $('#modalGeneric').modal('show'); } }); $(document).on('click', '#sendSmsMsgLead', function(){ var leadID = $(this).attr('leadID'); var msg = $('#sendSmsMsg').val(); $('#sendSmsMsgLead').prop('disabled', true); if(msg){ $.post("https://orbisx.ca/app/exec", {dothis:'sendSmsChatLead', leadID: leadID, msg: msg}, function(data) { data = $.parseJSON(data); if(data.success == true){ $('#sendSmsMsg').val(''); init_autogrow(); get_lead_message_log(leadID); snackBar(data.message); }else{ swal({ title: data.message_title, text: data.message, timer: 3000, type: 'error', showConfirmButton: true }); } $('#sendSmsMsgLead').prop('disabled', false); return false; }); }else{ swal({ title: 'Message Blank', text: 'Please enter a message to send an SMS to the lead :)', timer: 3000, type: 'error', showConfirmButton: true }); $('#sendSmsMsgLead').prop('disabled', false); return false; } }); function get_client_message_log(clientID){ $.post("https://orbisx.ca/app/exec", {dothis:'getSmsChatClient', clientID: clientID}, function(data) { data = $.parseJSON(data); if(data.success == true){ $('#modalGeneric .modal-body').html(data.html); $('#modalGeneric .chat-list').stop().animate({ scrollTop: $('#modalGeneric .chat-list')[0].scrollHeight }, 800); }else{ swal({ title: data.message_title, text: data.message, timer: 3000, type: 'error', showConfirmButton: true }); } }); } $(document).on('click', '.viewSmsChatClient', function(){ var clientID = $(this).attr('clientID'); var clientName = $(this).attr('clientName'); if(clientID){ $(this).find('i').removeClass('text-success'); $('#modalGeneric .modal-title').html('SMS Chat with '+clientName); $('#modalGeneric .modal-body').html('Loading chat...'); get_client_message_log(clientID); var mmsSend = ''; $('#modalGeneric .modal-footer').html('
'+mmsSend+'
'); $('#modalGeneric').modal('show'); } }); $(document).on('click', '.sendMmsMsgChatGroupBtn', function(e){ e.preventDefault(); const clientID = $(this).attr('clientID') || ''; const leadID = $(this).attr('leadID') || ''; // Create input element programmatically so we don't stringify "undefined" const $input = $('', { type: 'file', name: 'mms_file', id: 'mmsFile', class: 'dn', accept: 'image/*' }); if (clientID) $input.attr('data-client-id', clientID); if (leadID) $input.attr('data-lead-id', leadID); $('body').append($input); $input.trigger('click'); }); // Handle upload + refresh log $(document).on('change', '#mmsFile', function(e){ e.preventDefault(); const file = $("#mmsFile")[0].files[0]; const MAX = 10 * 1024 * 1024; // 10MB if (!file) return; if (file.size > MAX) { snackBar('File is too large (max 10MB).', 'error'); $('#mmsFile').remove(); return; } $('body').append( '
' + '

Sending MMS

' + '

Please do not refresh or navigate away from this page

' + '
' + '
' ); // Read normalized IDs (may be undefined if not set) let clientID = $(this).data('clientId'); let leadID = $(this).data('leadId'); // Normalize stringy values just in case const isBad = (v) => v === undefined || v === null || v === '' || v === 'undefined' || v === 'null' || v === '0'; if (isBad(clientID)) clientID = ''; if (isBad(leadID)) leadID = ''; const dataimg = new FormData(); dataimg.append('dothis', 'sendMmsChatClient'); if (clientID) dataimg.append('clientID', clientID); if (leadID) dataimg.append('leadID', leadID); dataimg.append('opVal', $("#mmsFile")[0].files[0]); $.ajax({ url: "https://orbisx.ca/app/exec", type: "POST", cache: false, processData: false, contentType: false, dataType: "json", enctype: 'multipart/form-data', data: dataimg, success: function(data) { if (data.success) { setTimeout(function() { if (!isBad(leadID)) { get_lead_message_log(leadID); } else if (!isBad(clientID)) { get_client_message_log(clientID); } $('#global-loader').remove(); }, 3000); } else { snackBar(data.message, 'error'); $('#global-loader').remove(); } $('#mmsFile').remove(); }, error: function() { $('#global-loader').remove(); $('#mmsFile').remove(); snackBar('Upload failed. Please try again.', 'error'); } }); }); $(document).on('click', '#sendSmsMsgClient', function(){ var clientID = $(this).attr('clientID'); var msg = $('#sendSmsMsg').val(); $('#sendSmsMsgClient').prop('disabled', true); if(msg){ $.post("https://orbisx.ca/app/exec", {dothis:'sendSmsChatClient', clientID: clientID, msg: msg}, function(data) { data = $.parseJSON(data); if(data.success == true){ $('#sendSmsMsg').val(''); init_autogrow(); get_client_message_log(clientID); snackBar(data.message); }else{ swal({ title: data.message_title, text: data.message, timer: 3000, type: 'error', showConfirmButton: true }); } $('#sendSmsMsgClient').prop('disabled', false); return false; }); }else{ swal({ title: 'Message Blank', text: 'Please enter a message to send an SMS to the customer :)', timer: 3000, type: 'error', showConfirmButton: true }); $('#sendSmsMsgClient').prop('disabled', false); return false; } }); $('body').on('click', '.sendUserPush', function(){ var contact = $(this).attr('contact'); $('#sendUserPushMsg').val('').attr('userID', $(this).attr('userID')); $('#sendUserPushTitle').text('Send '+contact+' a Message'); $('#modalSendUserPush').modal('show'); }); $('#sendUserPushBtn').click(function(){ var msg = $('#sendUserPushMsg').val(); var userID = $('#sendUserPushMsg').attr('userID'); if (msg && userID) { $.post("https://orbisx.ca/app/ajax/send-user-push-notice", {userID:userID, msg: msg}, function(result) { result = $.parseJSON(result); if(result.recipients > 0) { $('#modalSendUserPush').modal('hide'); swal({ title: 'Message Sent', text: 'Your message has been delivered', timer: 3000, type: 'success', showConfirmButton: true }); }else { swal({ title: 'Something Went Wrong', // text: result.errors, text: typeof result.errors === 'string' ? result.errors : JSON.stringify(result.errors, null, 2), timer: 3000, type: 'error', showConfirmButton: true }); } }); }else{ swal({ title: 'Something Went Wrong', text: 'You must enter a message to send a push notice', timer: 3000, type: 'error', showConfirmButton: true }); } }); $(document).on('click', '.loadTaskList', function(){ var eventID = $(this).attr('eventID'); var checklistID = $(this).attr('checklistID'); var checklistName = $(this).attr('checklistName'); $.post("https://orbisx.ca/app/exec", {dothis:'getEventChecklistTasks', itemID:eventID, toggle:checklistID, businessID: '3845'}, function(data){ data = $.parseJSON(data); if(data.success == true){ var html = ''; if(data.start_timer_button){ html += data.start_timer_button; } html += '
'+(value.user ? '
'+value.user.contact+' '+value.timestamp+'
' : '')+''; }); html += ''; $('#modalGeneric .modal-body').html(html); $('#modalGeneric').modal('show'); return false; }else{ swal({ title: 'Something Went Wrong', text: data.message, timer: 3000, type: 'error', showConfirmButton: true }); } }); }); $(document).on('click', '.quickStartJobTimer', function (e) { e.preventDefault(); var elem = $(this).parents('.quickStartJobTimerContainer'); var btn = $(this); var btnText = $(this).html(); $(btn).prop('disabled', true).html(' Starting timer...'); var eventID = $(this).attr('eventID'); $.post("https://orbisx.ca/app/updateWorkTimerEvent", { eventID: eventID, action: 'start' }, function (data) { data = $.parseJSON(data); if (data.success == true) { $(elem).html('

Timer started for event #'+eventID+'

'); } else { swal({ title: 'Oops...', text: 'Something went wrong trying to start the timer', timer: 5000, type: 'error', showConfirmButton: true }); $(btn).prop('disabled', false).html(btnText); } }); }); $(document).on('click', '#checkAllEventChecklistTasks', function(e){ $('#modalGenericSecondary .modal-title').html('Confirm Bulk Action'); $('#modalGenericSecondary .modal-body').html('

Are you sure you want to mark all tasks complete for this checklist?

Yes, mark all complete Cancel'); $('#modalGenericSecondary .modal-footer').html('Cancel and close popup'); $('#modalGenericSecondary').modal('show'); e.preventDefault(); }); $(document).on('click', '#checkAllEventChecklistTasksConfirm', function(e){ $('#eventChecklistTaskList input').each(function(){ if(!$(this).is(':checked')){ $(this).prop('checked', true).trigger('click'); } }); $('#modalGenericSecondary').modal('hide'); snackBar('Way to go champ! All done :)', 'success'); e.preventDefault(); }); $(document).on('click', '.sendCustomerProgressTrackerLink', function(){ var sendIt = false; var eventID = $(this).attr('eventID'); var elem = $(this); $(elem).prop('disabled', true); $('#eventChecklists'+eventID+' ul li').each(function(){ if($(this).attr('shareProgress') == 1){ sendIt = true; } }); if(sendIt){ $.post("https://orbisx.ca/app/exec", {dothis:'sendCustomerProgressTracker', eventID:eventID}, function(data){ data = $.parseJSON(data); if(data.success == true){ swal({ title: 'Progress Tracker Link Sent', text: data.message, timer: 3000, type: 'success', showConfirmButton: true }); }else{ swal({ title: 'Something Went Wrong', text: data.message, timer: 3000, type: 'error', showConfirmButton: true }); } $(elem).prop('disabled', false); return false; }); }else{ swal({ title: 'Progress Sharing Disabled', text: 'Checklists have progress sharing turned off. Turn on progress sharing on these checklist types to send progress tracker links to the customer.', timer: 3000, type: 'error', showConfirmButton: true }); } }); $(document).on('click', '.assocChecklistToEvent', function(){ var eventID = $(this).attr('eventID'); var checklistID = $('#eventChecklistsAvail'+eventID+' option:selected').val(); var checklistName = $('#eventChecklistsAvail'+eventID+' option:selected').text(); var shareProgress = $('#eventChecklistsAvail'+eventID+' option:selected').attr('shareProgress'); if($('#event'+eventID+'Checklist'+checklistID).length > 0){ swal({ title: 'Already Assigned', text: 'This checklist is already assigned to this event.', timer: 3000, type: 'error', showConfirmButton: true }); return false; } if(!checklistID){ swal({ title: 'Checklist Missing', text: 'Choose a checklist to assign it to this event.', timer: 3000, type: 'error', showConfirmButton: true }); } if(checklistID > 0 && eventID > 0){ $.post("https://orbisx.ca/app/exec", {dothis:'addChecklistToEvent', eventID:eventID, itemID:checklistID}, function(data){ data = $.parseJSON(data); if(data.success == true){ if($('#eventChecklists'+eventID+' ul li').length == 0){ $('#eventChecklists'+eventID).html('

'); } $('#eventChecklists'+eventID+' ul').append('
  • '+checklistName+' Print Tasks

  • '); $('#eventChecklistsAvail'+eventID).prop('selectedIndex',0); snackBar(data.message, 'success'); }else{ snackBar(data.message, 'error'); } return false; }); } }); $(document).on('click', '.deleteChecklistEventAssoc', function(){ var eventID = $(this).attr('eventID'); var checklistID = $(this).attr('checklistID'); var checklistName = $(this).attr('checklistName'); $('#modalGeneric .modal-title').html('Confirm Deletion: '+checklistName); $('#modalGeneric .modal-body').html('

    Are you sure you want to remove the '+checklistName+' checklist from this event?

    Cancel Yes, remove checklist

    '); $('#modalGeneric .modal-footer').html('Cancel & close popup'); $('#modalGeneric').modal('show'); return false; }); $(document).on('click', '.confirmDeleteChecklistEventAssoc', function(){ var eventID = $(this).attr('eventID'); var checklistID = $(this).attr('checklistID'); $.post("https://orbisx.ca/app/exec", {dothis:'removeChecklistFromEvent', eventID:eventID, itemID:checklistID}, function(data){ data = $.parseJSON(data); if(data.success == true){ $('#event'+eventID+'Checklist'+checklistID).fadeOut().remove(); if($('#eventChecklists'+eventID+' ul li').length == 0){ $('#eventChecklists'+eventID).html(''); } $('#modalGeneric').modal('hide'); snackBar(data.message); }else{ swal({ title: 'Something Went Wrong', text: data.message, timer: 3000, type: 'error', showConfirmButton: true }); } return false; }); }); $('#modalGeneric').on('click', '.toggleChecklistTask', function(){ var parentElem = $(this).parents('.row'); var elem = $(parentElem).find('.supercheckbox'); var eventID = $(this).attr('eventID'); var taskID = $(this).attr('taskID'); var checklistID = $(this).attr('checklistID'); if($(elem).is(":checked")){ var toggle = 0; }else{ var toggle = 1; } $.post("https://orbisx.ca/app/exec", {dothis:'toggleEventChecklistTaskComplete', eventID:eventID, itemID:taskID, toggle:toggle, typeID:checklistID}, function(data){ data = $.parseJSON(data); if(data.success == true){ if(data.stats.percent){ $('#event'+eventID+'ChecklistProgressBar'+checklistID).css('width', data.stats.percent+'%'); $('#event'+eventID+'ChecklistProgressText'+checklistID).text(data.stats.percent+'% complete'); if(data.stats.percent >= 90){ $('#event'+eventID+'ChecklistProgressBar'+checklistID).addClass('bg-gradient-success').removeClass('bg-gradient-warning').removeClass('bg-gradient-info'); }else if(data.stats.percent > 50 && data.stats.percent '+txt+''); $(parentElem).after('
    '+data.timestamp+'
    '); autoSendProgressTracker(eventID); } }else{ swal({ title: 'Something Went Wrong', text: data.message, timer: 3000, type: 'error', showConfirmButton: true }); } return false; }); }); $(document).on('click', '.showSecretField', function(){ $(this).parents('.input-group').find('input').attr('type', 'text'); $(this).removeClass('showSecretField').addClass('hideSecretField').html(''); return false; }); $(document).on('click', '.hideSecretField', function(){ $(this).parents('.input-group').find('input').attr('type', 'password'); $(this).removeClass('hideSecretField').addClass('showSecretField').html(''); return false; }); function autoSendProgressTracker(eventID){ $('#eventChecklists'+eventID+' ul li').each(function(){ if($(this).attr('shareProgress') == 1){ sendIt = true; } }); if(sendIt){ $.post("https://orbisx.ca/app/exec", {dothis:'autoSendCustomerProgressTracker', eventID:eventID}, function(data){ data = $.parseJSON(data); if(data.success == true){ snackBar(data.message); } return false; }); } } async function copyElemText(element) { if (!document.hasFocus()) { console.error("Clipboard API blocked: Document is not focused."); alert("Click inside the page first, then try again."); return; } // Get raw HTML content and decode it var rawHtmlContent = $(element).html(); var textToCopy = $("").html(rawHtmlContent).text().trim(); console.log("Decoded Text to Copy:", textToCopy); try { // Delay execution slightly to ensure user interaction setTimeout(async () => { await navigator.clipboard.writeText(textToCopy); console.log("Successfully copied:", textToCopy); swal({ title: $(element).attr('alertTitle') || "Copied!", text: $(element).attr('alertMsg') || "Copied to clipboard!", timer: 2000, type: 'success', showConfirmButton: false }); }, 100); // 100ms delay ensures document focus } catch (err) { console.error("Clipboard API failed:", err); } } function copyToClipboard(element) { var $temp = $(""); var m = $(element).attr('alertMsg'); var t = $(element).attr('alertTitle'); $("body").append($temp); $temp.val($(element).text()).select(); document.execCommand("copy"); $temp.remove(); swal({ title: (t ? t : 'Link Copied'), text: (m ? m : 'The link has been copied to your clipboard'), timer: 2000, type: 'success', showConfirmButton: false }); } $(document).on('click', '.copyVar, .copyVars a', function(){ var $temp = $(""); $("body").append($temp); console.log($(this).text()); $temp.val($(this).text()).select(); document.execCommand("copy"); $temp.remove(); snackBar('Copied to clipboard: ' + $(this).text()); return false; }); $(document).on('click', '.copyTxtAttr', function(e){ var txt = $(this).attr('txt'); navigator.clipboard.writeText(txt); snackBar('Copied to clipboard :)'); e.preventDefault(); }); $(document).on('show.bs.modal', '.modal', function (event) { var zIndex = 1040 + (10 * $('.modal:visible').length); $(this).css('z-index', zIndex); setTimeout(function() { $('.modal-backdrop').not('.modal-stack').css('z-index', zIndex - 1).addClass('modal-stack'); }, 0); }); $(document).on('click', '.readMore', function(){ var elem = $(this).parents('.readMoreBox'); $(elem).find('.minText').hide(); $(elem).find('.fullText').show(); return false; }); $(document).on('click', '.showLess', function(){ var elem = $(this).parents('.readMoreBox'); $(elem).find('.minText').show(); $(elem).find('.fullText').hide(); return false; }); $(document).on('keyup change', '.tableSearch', function(){ var targetID = $(this).attr('targetID'); var table, tr, td, i, txtValue; var filter = $(this).val().toUpperCase(); table = document.getElementById(targetID); tr = table.getElementsByTagName("tr"); // Loop through all table rows, and hide those who don't match the search query for (i = 0; i -1) { tr[i].style.display = ""; } else { tr[i].style.display = "none"; } } } }); $(document).on('click', '.tableSearchCancel', function(){ $('.tableSearch').val('').change(); return false; }); $(document).on('click', '#saveWeatherZip', function(){ var zip = $('#weatherZip').val(); if (zip) { $.post("https://orbisx.ca/app/exec/updateWeatherLocation", {zip:zip}, function(data) { data = $.parseJSON(data); if(data.success) { swal({ title: 'Location Saved', text: 'Reload the page to see the weather forecast enabled', timer: 3000, type: 'success', showConfirmButton: true }); }else{ swal({ title: 'Something Went Wrong', text: data.message, timer: 3000, type: 'error', showConfirmButton: true }); } }); } }); function getMileageTrackerStatus(){ $.post("https://orbisx.ca/app/exec", {dothis:'getUserMileageTrackingInfo'}, function(result) { result = $.parseJSON(result); return result.info.mileage_tracking; }); } function toggleMileageTracker(){ $.post("https://orbisx.ca/app/exec", {dothis:'getUserMileageTrackingInfo'}, function(result) { result = $.parseJSON(result); if(result.success) { if (result.info.mileage_tracking) { var html = ' Mileage Tracker ON'; var html_nuevo = ' Mileage Tracker ON'; if(window.webkit){ window.webkit.messageHandlers.startMileageTracker.postMessage({command: 'startMileageTracker',data:''}); }else if(typeof android !== 'undefined' && android !== null) { android.startMileageTracker(); } }else{ var html = ' Mileage Tracker OFF'; var html_nuevo = ' Mileage Tracker OFF'; if(window.webkit){ window.webkit.messageHandlers.stopMileageTracker.postMessage({command: 'stopMileageTracker',data:''}); }else if(typeof android !== 'undefined' && android !== null) { android.stopMileageTracker(); } } }else { swal({ title: 'Something Went Wrong', text: result.message, timer: 3000, type: 'error', showConfirmButton: true }); var html = ' Mileage Tracker OFF'; var html_nuevo = ' Mileage Tracker OFF'; } $('#mileageTrackerMenuItem').html(html); $('#mileageTrackerMenuItemNuevo').html(html_nuevo); }); } $(document).on('click.bs.dropdown.data-api', '.dropdown.keep-inside-clicks-open a.keepOpen', function (e) { e.stopPropagation(); }); $(document).on('click', '.toggleMileageTracker', function(){ var toggle = $(this).attr('toggle'); $.post("https://orbisx.ca/app/exec", {dothis:'toggleMileageTracker', toggle:toggle}, function(result) { result = $.parseJSON(result); if(result.success) { if(typeof android !== 'undefined' && android !== null) { swal({ title: 'Data Collection Notice', text: "OrbisX collects location data to enable Mileage Tracker even when the app is closed or not in use", timer: 5000, type: 'success', showConfirmButton: true }); } toggleMileageTracker(); }else { swal({ title: 'Something Went Wrong', text: '', timer: 3000, type: 'error', showConfirmButton: true }); } }); }); (function(){ const PROTECTED = new Set(['orbisxSessionId']); const _setItem = localStorage.setItem.bind(localStorage); const _getItem = localStorage.getItem.bind(localStorage); const _removeItem = localStorage.removeItem.bind(localStorage); const _clear = localStorage.clear.bind(localStorage); // Monkey-patch clear to preserve protected keys localStorage.clear = function(){ const snapshot = {}; PROTECTED.forEach(k => { snapshot[k] = _getItem(k); }); _clear(); Object.keys(snapshot).forEach(k => { if (snapshot[k] !== null && snapshot[k] !== undefined) _setItem(k, snapshot[k]); }); }; // Monkey-patch removeItem to no-op on protected keys (optional) localStorage.removeItem = function(k){ if (PROTECTED.has(k)) return; _removeItem(k); }; })(); $(document).ajaxComplete(function() { try { } catch (e) { return e; } }); var refreshTime = 20 * 60000; window.setInterval( function() { $.ajax({ cache: false, type: "GET", url: "https://orbisx.ca/app/stay-alive", success: function(data) { } }); }, refreshTime ); appCheck(); function fillIn() { const place = this.getPlace(); let address1 = ""; let city = ""; let state = ""; let postcode = ""; let country = ""; for (const component of place.address_components) { const componentType = component.types[0]; switch (componentType) { case "street_number": { address1 = component.long_name+' '; break; } case "route": { address1 += component.short_name; break; } case "postal_code": { postcode = component.long_name+' '+postcode; break; } case "postal_code_suffix": { postcode = postcode+' '+component.long_name; break; } case "locality": city = component.long_name; break; case "administrative_area_level_1": { state = component.short_name; break; } case "country": country = component.long_name; break; } } } var inputs = document.getElementsByClassName('gsearchAddy'); var options = { types: ['address'], fields: ["address_components", "geometry"], //componentRestrictions: { country: ["us", "ca", "uk", "au", "gb"] }, }; var autocompletes = []; for (var i = 0; i '+msg).css('background', '#C71D1D').css('color', 'white'); }else if(type == 'info'){ $('#snackbar').html(' '+msg).css('background', '#11BDDE').css('color', 'white'); }else if(type == 'warning'){ $('#snackbar').html(' '+msg).css('background', '#F2EF32').css('color', 'black'); }else if(type == 'success'){ $('#snackbar').html(' '+msg).css('background', '#00C851').css('color', 'white'); }else if(type == 'general'){ $('#snackbar').html(msg).css('background', '#00adc8').css('color', 'white'); }else{ $('#snackbar').html(' '+msg).css('background', '#00C851').css('color', 'white'); } $('#snackbar').addClass('show'); if(duration > 0){ setTimeout(function(){ $('#snackbar').removeClass('show'); }, duration); } } // Function to initialize popovers function initializePopovers() { appCheck(); // Re-initialize popovers and more } // Observe changes to the DOM const observer = new MutationObserver(() => { initializePopovers(); }); // Start observing the body for added nodes observer.observe(document.body, { childList: true, // Watch for added/removed child nodes subtree: true, // Watch all levels of the DOM tree }); $(document).on('focus', '.select2-selection', function(e) { const $select = $(this).closest('.select2-container').prev('select'); if (!$select.prop('disabled')) { $select.select2('open'); } }); $(document).on('click', '.startSignupWisetack', function(e){ var btn = $(this); $(btn).html(' Processing application ...'); $('#modalGeneric .modal-title').html('Signup to Offer Your Customers Financing Options'); $('#modalGeneric .modal-body').html('
    '); $('#modalGeneric .modal-footer').html('Close popup window'); $('#modalGeneric').modal('show'); $.post("https://orbisx.ca/app/exec", {dothis:'wisetackSignup'}, function(data) { data = $.parseJSON(data); if (data.success) { $('#modalGeneric .modal-body').html(''); $(btn).html(' Continue signup application').removeClass('startSignupWisetack').addClass('continueSignupWisetack').attr('goto', data.signup_link); }else{ $('#modalGeneric .modal-body').html('

    '+data.message+'

    '); snackBar(data.message, 'error'); $(btn).html('Sign-up for '); } }); e.preventDefault(); }); $(document).on('click', '.continueSignupWisetack', function(e){ var link = $(this).attr('goto'); $('#modalGeneric .modal-title').html('Signup to Offer Your Customers Financing Options'); $('#modalGeneric .modal-body').html(''); $('#modalGeneric .modal-footer').html('Close popup window'); $('#modalGeneric').modal('show'); e.preventDefault(); }); $(document).on("click", ".modal .datepicker-single, .modal .datepicker", function() { var offsetModal = $(this).parents('.modal').offset().top; var offsetInput = $(this).offset().top; var inputHeight = $(this).height(); var customPadding = 12; var topDatepicker = (offsetInput + inputHeight + customPadding) - offsetModal; $("#ui-datepicker-div").css({top: topDatepicker}); }); $(document).on('click', '.closeSpecialAlert', function(e){ var cual = $(this).attr('cual'); $('#'+cual).fadeOut('fast'); $('.'+cual).fadeOut('fast'); e.preventDefault(); }); function update_dark_mode_elems(){ var darkModeAltColor = '#000000'; if($('body').hasClass('dark-mode')){ darkModeAltColor = '#FFFFFF'; $('.header-brand-img').attr('src', 'https://orbisx.ca/app/img/orbisx-logo-white.png'); }else{ $('.header-brand-img').attr('src', 'https://orbisx.ca/app/image/dfman0hdv/t_bandwidthsaver/dktojyailey6gbleco0t'); } try{ myBarChart.options.plugins.legend.labels.color = darkModeAltColor; myBarChart.options.scales.y.ticks.color = darkModeAltColor; myBarChart.options.scales.x.ticks.color = darkModeAltColor; myBarChart.update(); }catch(e) { } try{ myChart.options.plugins.legend.labels.color = darkModeAltColor; myChart.options.scales.y.ticks.color = darkModeAltColor; myChart.options.scales.x.ticks.color = darkModeAltColor; myChart.update(); }catch(e) { } try{ myBarChartOne.options.plugins.legend.labels.color = darkModeAltColor; myBarChartOne.options.scales.y.ticks.color = darkModeAltColor; myBarChartOne.options.scales.x.ticks.color = darkModeAltColor; myBarChartOne.update(); }catch(e) { } try{ myBarChart2.options.plugins.legend.labels.color = darkModeAltColor; myBarChart2.options.scales.y.ticks.color = darkModeAltColor; myBarChart2.options.scales.x.ticks.color = darkModeAltColor; myBarChart2.update(); }catch(e) { } try{ sourcesChart.options.plugins.legend.labels.color = darkModeAltColor; sourcesChart.options.scales.y.ticks.color = darkModeAltColor; sourcesChart.options.scales.x.ticks.color = darkModeAltColor; sourcesChart.update(); }catch(e) { } try{ interestsChart.options.plugins.legend.labels.color = darkModeAltColor; interestsChart.options.scales.y.ticks.color = darkModeAltColor; interestsChart.options.scales.x.ticks.color = darkModeAltColor; interestsChart.update(); }catch(e) { } try{ packagesChart.options.plugins.legend.labels.color = darkModeAltColor; packagesChart.options.scales.y.ticks.color = darkModeAltColor; packagesChart.options.scales.x.ticks.color = darkModeAltColor; packagesChart.update(); }catch(e) { } try{ warrantiesChart.options.plugins.legend.labels.color = darkModeAltColor; warrantiesChart.update(); }catch(e) { } try{ noshowsChart.options.plugins.legend.labels.color = darkModeAltColor; noshowsChart.update(); }catch(e) { } try{ propinasChart.options.plugins.legend.labels.color = darkModeAltColor; propinasChart.options.scales.y.ticks.color = darkModeAltColor; propinasChart.options.scales.x.ticks.color = darkModeAltColor; propinasChart.update(); }catch(e) { } try{ giftCertificatesChart.options.plugins.legend.labels.color = darkModeAltColor; giftCertificatesChart.options.scales.y.ticks.color = darkModeAltColor; giftCertificatesChart.options.scales.x.ticks.color = darkModeAltColor; giftCertificatesChart.update(); }catch(e) { } try{ servicesChart.options.plugins.legend.labels.color = darkModeAltColor; servicesChart.options.scales.y.ticks.color = darkModeAltColor; servicesChart.options.scales.x.ticks.color = darkModeAltColor; servicesChart.update(); }catch(e) { } try{ myChartDaily.options.plugins.legend.labels.color = darkModeAltColor; myChartDaily.options.scales.y.ticks.color = darkModeAltColor; myChartDaily.options.scales.x.ticks.color = darkModeAltColor; myChartDaily.update(); }catch(e) { } try{ myCouponChart.options.plugins.legend.labels.color = darkModeAltColor; myCouponChart.options.scales.y.ticks.color = darkModeAltColor; myCouponChart.options.scales.x.ticks.color = darkModeAltColor; myCouponChart.update(); }catch(e) { } //try{ //.options.plugins.legend.labels.color = darkModeAltColor; //.options.scales.y.ticks.color = darkModeAltColor; //.options.scales.x.ticks.color = darkModeAltColor; //.update(); //}catch(e) { //} } $(document).on('click', '.activateDarkMode', function(e){ var darkMode = ''; $('body').toggleClass('dark-mode'); if($('body').hasClass('dark-mode')){ $('.activateDarkMode').html(''); darkMode = 'active'; }else{ $('.activateDarkMode').html(''); } $.post("https://orbisx.ca/app/exec", {dothis:'setUserDarkMode', opVal:darkMode, businessID: '3845' }, function(data) {}); update_dark_mode_elems(); e.preventDefault(); }); $(document).ready(function(){ update_dark_mode_elems(); }); var entityMap = { "&": "&", "": ">", '"': '"', "'": ''', "/": '/' }; function escapeHtml(string) { return String(string).replace(/[&"'\/]/g, function (s) { return entityMap[s]; }); } const colors = [ '#ffc000', '#ff3b3b', '#ff8400' ]; const bubbles = 25; const explode = (x, y) => { let particles = []; let ratio = window.devicePixelRatio; let c = document.createElement('canvas'); let ctx = c.getContext('2d'); c.style.position = 'absolute'; c.style.left = (x - 100) + 'px'; c.style.top = (y - 100) + 'px'; c.style.pointerEvents = 'none'; c.style.width = 200 + 'px'; c.style.height = 200 + 'px'; c.style.zIndex = 1000000; c.width = 200 * ratio; c.height = 200 * ratio; document.body.appendChild(c); for(var i = 0; i document.body.removeChild(c), 1000); } const render = (particles, ctx, width, height) => { requestAnimationFrame(() => render(particles, ctx, width, height)); ctx.clearRect(0, 0, width, height); particles.forEach((p, i) => { p.x += p.speed * Math.cos(p.rotation * Math.PI / 180); p.y += p.speed * Math.sin(p.rotation * Math.PI / 180); p.opacity -= 0.01; p.speed *= p.friction; p.radius *= p.friction; p.yVel += p.gravity; p.y += p.yVel; if(p.opacity parseFloat((Math.random() * ((a ? a : 1) - (b ? b : 0)) + (b ? b : 0)).toFixed(c ? c : 0)); $(document).on('focus click', '.js-explosion', function(e){ var position = $(this).offset(); explode(position.left.toFixed(), position.top.toFixed()); });