Sha256: a588b47682336d6ca7c12fd1b488e0f16cf4886aeafea0a6e8e4dac827c25fc1

Contents?: true

Size: 1.73 KB

Versions: 11

Compression:

Stored size: 1.73 KB

Contents

"use strict";var KTModalOfferADealDetails=function(){var e,t,a,i,o;return{init:function(){i=KTModalOfferADeal.getForm(),o=KTModalOfferADeal.getStepperObj(),e=KTModalOfferADeal.getStepper().querySelector('[data-kt-element="details-next"]'),t=KTModalOfferADeal.getStepper().querySelector('[data-kt-element="details-previous"]'),$(i.querySelector('[name="details_activation_date"]')).flatpickr({enableTime:!0,dateFormat:"d, M Y, H:i"}),$(i.querySelector('[name="details_customer"]')).on("change",(function(){a.revalidateField("details_customer")})),a=FormValidation.formValidation(i,{fields:{details_customer:{validators:{notEmpty:{message:"Customer is required"}}},details_title:{validators:{notEmpty:{message:"Deal title is required"}}},details_activation_date:{validators:{notEmpty:{message:"Activation date is required"}}},"details_notifications[]":{validators:{notEmpty:{message:"Notifications are required"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap5({rowSelector:".fv-row",eleInvalidClass:"",eleValidClass:""})}}),e.addEventListener("click",(function(t){t.preventDefault(),e.disabled=!0,a&&a.validate().then((function(t){console.log("validated!"),"Valid"==t?(e.setAttribute("data-kt-indicator","on"),setTimeout((function(){e.removeAttribute("data-kt-indicator"),e.disabled=!1,o.goNext()}),1500)):(e.disabled=!1,Swal.fire({text:"Sorry, looks like there are some errors detected, please try again.",icon:"error",buttonsStyling:!1,confirmButtonText:"Ok, got it!",customClass:{confirmButton:"btn btn-primary"}}))}))})),t.addEventListener("click",(function(){o.goPrevious()}))}}}();"undefined"!=typeof module&&void 0!==module.exports&&(window.KTModalOfferADealDetails=module.exports=KTModalOfferADealDetails);

Version data entries

11 entries across 5 versions & 1 rubygems

Version Path
phcthemes_admin_panel_pack-7.0.0 app/assets/dist/themes/metronic/theme27/js/custom/utilities/modals/offer-a-deal/details.js
phcthemes_admin_panel_pack-6.0.3 app/assets/dist/themes/metronic/theme13/js/custom/utilities/modals/offer-a-deal/details.js
phcthemes_admin_panel_pack-6.0.3 app/assets/dist/themes/metronic/theme21/js/custom/utilities/modals/offer-a-deal/details.js
phcthemes_admin_panel_pack-6.0.2 app/assets/dist/themes/metronic/theme13/js/custom/utilities/modals/offer-a-deal/details.js
phcthemes_admin_panel_pack-6.0.2 app/assets/dist/themes/metronic/theme21/js/custom/utilities/modals/offer-a-deal/details.js
phcthemes_admin_panel_pack-6.0.2 app/assets/dist/themes/metronic/theme27/js/custom/utilities/modals/offer-a-deal/details.js
phcthemes_admin_panel_pack-6.0.1 app/assets/dist/themes/metronic/theme13/js/custom/utilities/modals/offer-a-deal/details.js
phcthemes_admin_panel_pack-6.0.1 app/assets/dist/themes/metronic/theme21/js/custom/utilities/modals/offer-a-deal/details.js
phcthemes_admin_panel_pack-6.0.1 app/assets/dist/themes/metronic/theme27/js/custom/utilities/modals/offer-a-deal/details.js
phcthemes_admin_panel_pack-6.0.0 app/assets/dist/themes/metronic/theme_21/js/custom/utilities/modals/offer-a-deal/details.js
phcthemes_admin_panel_pack-6.0.0 app/assets/dist/themes/metronic/theme_13/js/custom/utilities/modals/offer-a-deal/details.js