| Current Path : /home/users/unlimited/www/whatsapp-crm/public/build/assets/ |
| Current File : /home/users/unlimited/www/whatsapp-crm/public/build/assets/Ticket-2648b3e6.js |
import A from"./Layout-fcdad30a.js";import{r as $,T as D,i as E,g as N,o as r,a as t,t as i,n as l,u as a,c as d,b as c}from"./app-f1493ab2.js";import"./index-764662c4.js";import"./App-45dbd9fa.js";import"./Sidebar-f2ddcf5a.js";import"./Menu-73c1148a.js";import"./Modal-a0814fa2.js";import"./transition-f32a8133.js";import"./hidden-f79cef22.js";import"./use-outside-click-92c6377f.js";import"./micro-task-89dcd6af.js";import"./ProfileModal-09ae28bb.js";import"./FormInput-b3450213.js";import"./tabs-80627b62.js";import"./LangToggle-d2b58a25.js";import"./index-114bea05.js";import"./MobileSidebar-e6661e49.js";/* empty css */import"./pusher-a82d1614.js";const T={class:"md:h-[90vh]"},L={class:"flex justify-center items-center"},M={class:"md:w-[60em]"},O={class:"bg-white border border-slate-200 rounded-lg pt-2 text-sm mb-4 px-4 mb-20"},U={class:"w-full py-2 mb-4 mt-2"},V={class:"flex w-full"},z={class:"text-md"},F={class:"text-[16px]"},G={class:"mb-1 text-slate-500"},I={class:"ml-auto"},J={key:0,class:"bg-white border border-slate-200 rounded-lg py-2 text-sm mb-4 pb-4 px-4 mb-20"},R={class:"w-full py-2 mb-2 mt-2"},q={class:"flex w-full mb-4"},H={class:"text-md"},K={class:"text-[16px]"},P={class:"flex items-center mt-1 text-slate-500"},Q={class:"w-5/5"},W={class:"grid grid-cols-2 gap-x-4"},X={class:"border rounded-xl p-4"},Y={class:"flex space-x-2"},Z={class:"flex mt-[1px]"},tt={class:"border rounded-xl p-4"},st={class:"flex space-x-2"},et={class:"flex mt-[1px]"},ot={key:1,class:"bg-white border border-slate-200 rounded-lg pt-2 text-sm mb-4 px-4 mb-20"},at={class:"w-full py-2 mb-4 mt-2"},it={class:"flex w-full"},lt={class:"w-3/4 text-md"},nt={class:"text-[16px]"},rt={class:"mb-1 text-slate-500"},dt={class:"w-1/4"},ct={key:2,class:"bg-white border border-slate-200 rounded-lg pt-2 text-sm mb-4 px-4 mb-20"},mt={class:"w-full py-2 mb-4 mt-2"},ut={class:"flex w-full"},_t={class:"w-3/4 text-md"},vt={class:"text-[16px]"},gt={class:"mb-1 text-slate-500"},ht={class:"w-1/4"},Ot={__name:"Ticket",props:["rows","filters","settings","modules"],setup(C){var h,p,w,f,b,x,k,y;const v=C,g=$(v.settings.metadata),m=$(g.value?JSON.parse(g.value):null),s=D({active:((p=(h=m.value)==null?void 0:h.tickets)==null?void 0:p.active)??!1,auto_assignment:((f=(w=m.value)==null?void 0:w.tickets)==null?void 0:f.auto_assignment)??!1,reassign_reopened_chats:((x=(b=m.value)==null?void 0:b.tickets)==null?void 0:x.reassign_reopened_chats)??!1,allow_agents_to_view_all_chats:((y=(k=m.value)==null?void 0:k.tickets)==null?void 0:y.allow_agents_to_view_all_chats)??!1}),B=()=>{s.active=!s.active,_()},S=()=>{s.reassign_reopened_chats=!s.reassign_reopened_chats,_()},j=()=>{s.allow_agents_to_view_all_chats=!s.allow_agents_to_view_all_chats,_()},u=o=>{s.auto_assignment=o,_()},_=async()=>{s.post("/settings/tickets",{preserveScroll:!0})};return(o,e)=>(r(),E(A,{modules:v.modules},{default:N(()=>[t("div",T,[t("div",L,[t("div",M,[t("div",O,[t("div",U,[t("div",V,[t("div",z,[t("h4",F,i(o.$t("Enable ticketing")),1),t("div",G,i(o.$t("Activate ticketing workflow in your conversations")),1)]),t("div",I,[t("div",{class:l(["w-12 h-6 flex items-center bg-gray-300 rounded-full p-1",{"bg-primary":a(s).active}]),onClick:e[0]||(e[0]=n=>B(o.active))},[t("div",{class:l(["bg-white w-4 h-4 rounded-full shadow-md transform duration-300 ease-in-out",{"translate-x-6":a(s).active}])},null,2)],2)])])])]),a(s).active?(r(),d("div",J,[t("div",R,[t("div",q,[t("div",H,[t("h4",K,i(o.$t("Auto assignment")),1),t("span",P,i(o.$t("Use auto-assignment rules to evenly distribute chats among agents automatically.")),1)])]),t("div",Q,[t("div",W,[t("div",X,[t("div",Y,[t("div",null,[t("div",Z,[t("label",{onClick:e[1]||(e[1]=n=>u(!1)),for:"myCheckbox",class:"cursor-pointer"},[t("div",{class:l(["w-4 h-4 border border-gray-400 rounded-md flex items-center justify-center",a(s).auto_assignment===!1?"bg-[#000]":""])},[a(s).auto_assignment===!1?(r(),d("svg",{key:0,class:l(["w-4 h-4",a(s).auto_assignment===!1?"text-white":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e[7]||(e[7]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)]),2)):c("",!0)],2)])])]),t("div",{onClick:e[2]||(e[2]=n=>u(!1)),class:"cursor-pointer"},[t("div",null,i(o.$t("Off")),1),t("div",null,i(o.$t("Team members pick conversations manually from Unassigned folder.")),1)])])]),t("div",tt,[t("div",st,[t("div",null,[t("div",et,[t("label",{onClick:e[3]||(e[3]=n=>u(!0)),for:"myCheckbox",class:"cursor-pointer"},[t("div",{class:l(["w-4 h-4 border border-gray-400 rounded-md flex items-center justify-center",a(s).auto_assignment===!0?"bg-[#000]":""])},[a(s).auto_assignment===!0?(r(),d("svg",{key:0,class:l(["w-4 h-4",a(s).auto_assignment===!0?"text-white":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e[8]||(e[8]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)]),2)):c("",!0)],2)])])]),t("div",{onClick:e[4]||(e[4]=n=>u(!0)),class:"cursor-pointer"},[t("div",null,i(o.$t("Auto")),1),t("div",null,i(o.$t("Distribute conversations among all your available team members.")),1)])])])])])])])):c("",!0),a(s).active?(r(),d("div",ot,[t("div",at,[t("div",it,[t("div",lt,[t("h4",nt,i(o.$t("Reassign chats that have been reopened")),1),t("div",rt,i(o.$t("Enable this option to reassign chats when a contact re-opens a closed conversation. If disabled, reopened chats will either return to the previous agent or remain unassigned, based on auto-assignment settings.")),1)]),t("div",dt,[t("div",{class:l(["ml-auto w-12 h-6 flex items-center bg-gray-300 rounded-full p-1",{"bg-primary":a(s).reassign_reopened_chats}]),onClick:e[5]||(e[5]=n=>S())},[t("div",{class:l(["bg-white w-4 h-4 rounded-full shadow-md transform duration-300 ease-in-out",{"translate-x-6":a(s).reassign_reopened_chats}])},null,2)],2)])])])])):c("",!0),a(s).active?(r(),d("div",ct,[t("div",mt,[t("div",ut,[t("div",_t,[t("h4",vt,i(o.$t("Grant agents access to view all chats not assigned to them")),1),t("div",gt,i(o.$t("Disable this option, if you want live chat agents to have access only to new conversations and conversations that are assigned to them.")),1)]),t("div",ht,[t("div",{class:l(["ml-auto w-12 h-6 flex items-center bg-gray-300 rounded-full p-1",{"bg-primary":a(s).allow_agents_to_view_all_chats}]),onClick:e[6]||(e[6]=n=>j())},[t("div",{class:l(["bg-white w-4 h-4 rounded-full shadow-md transform duration-300 ease-in-out",{"translate-x-6":a(s).allow_agents_to_view_all_chats}])},null,2)],2)])])])])):c("",!0)])])])]),_:1},8,["modules"]))}};export{Ot as default};