var contactNo=new Cleave("#contactNumber",{delimiters:["(",")","-"],blocks:[0,3,3,4]}),str_dt=function(e){var e=new Date(e),t=""+["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()],a=""+e.getDate(),e=e.getFullYear();return t.length<2&&(t="0"+t),[(a=a.length<2?"0"+a:a)+" "+t,e].join(", ")};(form=document.getElementById("deals-form")).addEventListener("submit",function(e){if(e.preventDefault(),form.checkValidity()){var t=document.getElementById("dealTitle").value,a=document.getElementById("dealValue").value,s=document.getElementById("deatType").value,l=document.getElementById("dealOwner").value,d=document.getElementById("dueDate").value,i=document.getElementById("contactNumber").value,n=document.getElementById("dealEmail").value,c=document.getElementById("contactDescription").value,o=l.split(" "),o=`
`+l+` 4 Days

`+c+`

  • Meeting with Thomas
    Yesterday at 9:12AM
  • Product Demo
    Monday at 04:41PM
  • Marketing Team Meeting
    Monday at 04:41PM
`;let e;switch(s){case"Lead Disovered":e="leadDiscovered";break;case"Contact Initiated":e="contactInitiated";break;case"Need Identified":e="needsIdentified";break;case"Meeting Arranged":e="meetingArranged";break;case"Offer Accepted":e="offerAccepted"}document.getElementById("close-modal").click(),document.getElementById(e).innerHTML+=o,form.reset(),Swal.fire({title:"Success!",text:"Deal Inserted successfully in "+s+" Tab.",icon:"success",showCancelButton:!0,confirmButtonClass:"btn btn-primary w-xs me-2 mt-2",cancelButtonClass:"btn btn-danger w-xs mt-2",buttonsStyling:!1,showCloseButton:!0})}else e.preventDefault(),form.classList.add("was-validated")});