Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/ecom1.picotech.app/public_html_ecom1/public/dist/js/custom/ drwxr-xr-x |
Viewing file: Select action/file-type: "use strict";function discount(){"Percentage"!=$('select[name="discount_type"]').val()?$("#max_discount").hide():$(".discount_amount_label").text(jsLang("Discount Percentage")),$('select[name="discount_type"]').on("change",(function(e){"Percentage"==e.target.value?$("#max_discount").show():$("#max_discount").hide()}))}function searchVendor(){$(".select-vendor").select2({ajax:{url:SITE_URL+"/find-vendors-with-ajax",dataType:"json",delay:250,data:function(params){return{q:params.term,page:params.page}},processResults:function(data,params){let results;return{results:data.data}},cache:!0},placeholder:jsLang("Search for vendor by name."),minimumInputLength:3,allowClear:!0})}function searchProducts(){$(".select-products").select2({ajax:{url:SITE_URL+"/find-products-in-ajax",dataType:"json",delay:250,data:function(params){return{q:params.term,page:params.page,vendor_id:$("#vendor_id").val()}},processResults:function(data,params){let results;return{results:data.data}},cache:!0},placeholder:jsLang("Search for products by name."),minimumInputLength:3})}function oldProduct(){if(!Array.isArray(old_item)||!old_item.length)return!1;$.ajax({url:oldProductUrl,type:"GET",dataType:"json",data:{product_ids:old_item},success:function(data){var option="";const products=data.data;for(const key in products)option+=`<option selected value="${products[key].id}">${products[key].text}</option>`;$(".select-products").html(option)}})}function oldVendor(){if(""==old_vendor)return!1;$.ajax({url:SITE_URL+"/coupon/old-vendor",type:"GET",dataType:"json",data:{vendor_id:old_vendor},success:function(data){$(".select-vendor").html(`<option selected value="${data.id}">${data.text}</option>`)}})}function tabTitle(id){var title=$("#"+id).attr("data-id");$("#theme-title").html(title)}$(document).ready((function(){$("#success-message").css("display","none"),$("#warning-message").css("display","none"),$("#v-pills-general-tab").trigger("click"),$("input").on("change",(function(){$(".warning-message").addClass("alert-secondary"),$("#warning-message").css("display","block"),$("#warning-msg").html(jsLang("Settings have changed, you should save them!"))}))})),$(document).on("click",".cr",(function(){var value;1==$(this).closest(".switch").find("input").val()?$(this).closest(".switch").find("input").val(0):$(this).closest(".switch").find("input").val(1)})),$(".tab-name").on("click",(function(){var id=$(this).attr("data-id");$("#theme-title").html(id)})),$("#discount_amount").on("keyup change",(function(){$(this).attr("placeholder")==jsLang("Discount Percentage")&&$(this).val()>100&&$(this).val(100)})),$(".main-body .page-wrapper").find("#coupon-add-container, #coupon-edit-container, #vendor-coupon-add-container, #vendor-coupon-edit-container, #coupon-list-container, #vendor-coupon-list-container").length&&($('.tab-pane[aria-labelledby="v-pills-general-tab"').addClass("show active"),$("#discount_type").on("change",(function(){"Percentage"==$(this).val()?($(".discount_amount_label").text(jsLang("Discount Percentage")),$("#discount_amount").attr("placeholder",jsLang("Discount Percentage")),$("#discount_amount").val()>=100&&$("#discount_amount").val(100)):($(".discount_amount_label").text(jsLang("Discount Amount")),$("#discount_amount").attr("placeholder",jsLang("Discount Amount")))}))),$("#vendor_id").on("change",(function(){$("#product_id").empty()})),$(".main-body .page-wrapper").find("#coupon-add-container").length&&($('input[name="start_date"]').daterangepicker(dateSingleConfig()),$('input[name="end_date"]').daterangepicker(dateSingleConfig())),$(".main-body .page-wrapper").find("#coupon-edit-container").length&&($('input[name="start_date"]').daterangepicker(dateSingleConfig($('input[name="start_date"]').val())),$('input[name="end_date"]').daterangepicker(dateSingleConfig($('input[name="end_date"]').val()))),$(".main-body .page-wrapper").find("#coupon-add-container, #coupon-edit-container").length&&(discount(),searchVendor(),searchProducts(),oldProduct(),oldVendor()),$(".main-body .page-wrapper").find("#vendor-coupon-add-container, #vendor-coupon-edit-container").length&&(discount(),oldProduct(),searchProducts()),$(".main-body .page-wrapper").find("#vendor-coupon-add-container").length&&($('input[name="start_date"]').daterangepicker(dateSingleConfig()),$('input[name="end_date"]').daterangepicker(dateSingleConfig())),$(".main-body .page-wrapper").find("#vendor-coupon-edit-container").length&&($('input[name="start_date"]').daterangepicker(dateSingleConfig($('input[name="start_date"]').val())),$('input[name="end_date"]').daterangepicker(dateSingleConfig($('input[name="end_date"]').val()))),$(".main-body .page-wrapper").find("#coupon-list-container").length&&$(document).on("click","#csv, #pdf",(function(event){event.preventDefault(),window.location=SITE_URL+"/coupon/"+this.id})),$(".main-body .page-wrapper").find("#coupon-redeem-list-container").length&&$(document).on("click","#csv, #pdf",(function(event){event.preventDefault(),window.location=SITE_URL+"/coupon-redeem/"+this.id})),$(".main-body .page-wrapper").find("#vendor-coupon-list-container").length&&$(document).on("click","#csv, #pdf",(function(event){event.preventDefault(),window.location=SITE_URL+"/coupon/"+this.id})),$(".coupon-submit-button").on("click",(function(e){var arr=["#v-pills-general","#v-pills-restriction","#v-pills-limit"];setTimeout(()=>{for(const key in arr)if($(arr[key]).find(".error").length){var target=$(arr[key]).attr("aria-labelledby");$("#"+target).tab("show"),tabTitle(target);break}},100)})),$("button.switch-tab").on("click",(function(){var titleName;$("#"+$(this).attr("data-id")).tab("show"),tabTitle($(this).attr("data-id")),$('.tab-pane[aria-labelledby="home-tab"').addClass("show active"),$("#"+$(this).attr("id")).addClass("active").attr("aria-selected",!0)})); |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0042 ]-- |