Your IP : 216.73.217.77


Current Path : /home/users/unlimited/www/whatsapp-crm/public/build/assets/
Upload File :
Current File : /home/users/unlimited/www/whatsapp-crm/public/build/assets/ContactInfo-35f42384.js

import{r as C,S,T as B,o as n,c as o,a as t,t as e,f as g,g as v,k as _,u as r,l as x,F as f,e as m,b,O as y}from"./app-f1493ab2.js";import{_ as M}from"./Dropdown-c843374c.js";import{_ as V,a as N}from"./DropdownItem-5a13c2ff.js";import{t as Z}from"./index-764662c4.js";const A={class:"px-20 overflow-y-scroll h-screen"},z={class:"flex justify-center space-x-8 items-center pb-6 pr-20 border-gray-300 border-b"},E={class:"rounded-full p-1"},L=["src"],O={key:1,class:"rounded-full w-40 h-40"},D={class:"text-3xl"},F={class:"text-slate-500 truncate flex items-center"},H={class:"text-sm"},J={class:"flex space-x-3 mt-4"},T={class:"bg-gray-200 h-9 px-4 rounded-md flex items-center"},j={class:"bg-gray-200 h-9 px-4 rounded-md flex items-center"},G={key:0,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},I={key:1,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},R={class:"pr-20 border-gray-300 border-b py-4"},q={class:"grid grid-cols-2 space-x-8 text-[14px]"},K={class:"text-right text-slate-500 pb-2"},P={class:"text-right text-slate-500 pb-2"},Q={class:"p-1 bg-gray-50 text-xs rounded-lg text-gray-600"},U={class:"text-right text-slate-500 pb-2"},W={class:"text-right text-slate-500 pb-2"},X={key:0,class:"pr-20 border-gray-300 border-b py-4"},Y={class:"grid grid-cols-2 space-x-8 text-[14px]"},tt={class:"text-right text-slate-500 pb-2"},et={key:0},st={key:1,class:"p-1 bg-slate-100 text-xs rounded-md text-gray-600"},lt={class:"pr-20 py-4"},at={class:"grid grid-cols-2 space-x-8 text-[14px]"},nt={class:"text-right text-slate-500 pb-2"},ot={class:"text-right text-slate-500 pb-2"},it={class:"text-right text-slate-500 pb-2"},dt={class:"text-right text-slate-500 pb-2"},rt={class:"text-right text-slate-500 pb-2"},ct={key:1,class:"pr-20 border-gray-300 border-t py-4"},ut={class:"grid grid-cols-2 space-x-8 text-[14px]"},vt={class:"text-right text-slate-500 pb-2"},pt={key:0},ht={key:1,class:"p-1 bg-slate-100 text-xs rounded-md text-gray-600"},mt={__name:"ContactInfo",props:["contact","fields","locationSettings"],setup(p){const c=p,s=C(c.contact),u=c.contact.metadata!==null&&c.contact.metadata!==""?JSON.parse(c.contact.metadata):{};S(()=>{s.value=c.contact});const w=async()=>{s.value.is_favorite=!s.value.is_favorite,y.put("/contacts/favorite/"+s.value.uuid,{favorite:s.value.is_favorite})};B({test:null});const $=async()=>{y.visit("/contacts",{method:"delete",data:{uuids:[s.value.uuid]},preserveState:!0})},h=(l,a)=>{const i=JSON.parse(l);return i!=null&&i[a]&&(i==null?void 0:i[a])!="Not Set"?i==null?void 0:i[a]:Z("not set")};return(l,a)=>{var i;return n(),o("div",A,[t("div",z,[t("div",null,[t("div",E,[s.value.avatar?(n(),o("img",{key:0,class:"rounded-full w-40 h-40",src:s.value.avatar},null,8,L)):(n(),o("div",O,a[2]||(a[2]=[t("svg",{class:"text-gray-300",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},[t("path",{"fill-rule":"evenodd",d:"M18.685 19.097A9.723 9.723 0 0021.75 12c0-5.385-4.365-9.75-9.75-9.75S2.25 6.615 2.25 12a9.723 9.723 0 003.065 7.097A9.716 9.716 0 0012 21.75a9.716 9.716 0 006.685-2.653zm-12.54-1.285A7.486 7.486 0 0112 15a7.486 7.486 0 015.855 2.812A8.224 8.224 0 0112 20.25a8.224 8.224 0 01-5.855-2.438zM15.75 9a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z","clip-rule":"evenodd"})],-1)])))])]),t("div",null,[t("h1",D,e(s.value.full_name),1),t("div",F,[t("span",H,e(s.value.formatted_phone_number),1)]),t("div",J,[t("button",T,[g(r(x),{href:"/contacts/"+s.value.uuid+"?edit=true",class:"text-[14px]"},{default:v(()=>[_(e(l.$t("Edit")),1)]),_:1},8,["href"])]),t("button",j,[g(r(x),{href:"/chats/"+s.value.uuid,class:"text-[14px]"},{default:v(()=>a[3]||(a[3]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 256 256"},[t("path",{fill:"currentColor",d:"M216 80h-32V48a16 16 0 0 0-16-16H40a16 16 0 0 0-16 16v128a8 8 0 0 0 13 6.22L72 154v30a16 16 0 0 0 16 16h93.59L219 230.22a8 8 0 0 0 5 1.78a8 8 0 0 0 8-8V96a16 16 0 0 0-16-16M66.55 137.78L40 159.25V48h128v88H71.58a8 8 0 0 0-5.03 1.78M216 207.25l-26.55-21.47a8 8 0 0 0-5-1.78H88v-32h80a16 16 0 0 0 16-16V96h32Z"})],-1)])),_:1},8,["href"])]),t("button",{onClick:a[0]||(a[0]=d=>w()),class:"bg-gray-200 h-9 px-4 rounded-md"},[s.value.is_favorite===0||s.value.is_favorite===!1?(n(),o("svg",G,a[4]||(a[4]=[t("path",{fill:"none",stroke:"currentColor","stroke-width":"1.5",d:"M9.153 5.408C10.42 3.136 11.053 2 12 2c.947 0 1.58 1.136 2.847 3.408l.328.588c.36.646.54.969.82 1.182c.28.213.63.292 1.33.45l.636.144c2.46.557 3.689.835 3.982 1.776c.292.94-.546 1.921-2.223 3.882l-.434.507c-.476.557-.715.836-.822 1.18c-.107.345-.071.717.001 1.46l.066.677c.253 2.617.38 3.925-.386 4.506c-.766.582-1.918.051-4.22-1.009l-.597-.274c-.654-.302-.981-.452-1.328-.452c-.347 0-.674.15-1.329.452l-.595.274c-2.303 1.06-3.455 1.59-4.22 1.01c-.767-.582-.64-1.89-.387-4.507l.066-.676c.072-.744.108-1.116 0-1.46c-.106-.345-.345-.624-.821-1.18l-.434-.508c-1.677-1.96-2.515-2.941-2.223-3.882c.293-.941 1.523-1.22 3.983-1.776l.636-.144c.699-.158 1.048-.237 1.329-.45c.28-.213.46-.536.82-1.182l.328-.588Z"},null,-1)]))):(n(),o("svg",I,a[5]||(a[5]=[t("path",{fill:"#031b4d",stroke:"#031b4d","stroke-width":"1.5",d:"M9.153 5.408C10.42 3.136 11.053 2 12 2c.947 0 1.58 1.136 2.847 3.408l.328.588c.36.646.54.969.82 1.182c.28.213.63.292 1.33.45l.636.144c2.46.557 3.689.835 3.982 1.776c.292.94-.546 1.921-2.223 3.882l-.434.507c-.476.557-.715.836-.822 1.18c-.107.345-.071.717.001 1.46l.066.677c.253 2.617.38 3.925-.386 4.506c-.766.582-1.918.051-4.22-1.009l-.597-.274c-.654-.302-.981-.452-1.328-.452c-.347 0-.674.15-1.329.452l-.595.274c-2.303 1.06-3.455 1.59-4.22 1.01c-.767-.582-.64-1.89-.387-4.507l.066-.676c.072-.744.108-1.116 0-1.46c-.106-.345-.345-.624-.821-1.18l-.434-.508c-1.677-1.96-2.515-2.941-2.223-3.882c.293-.941 1.523-1.22 3.983-1.776l.636-.144c.699-.158 1.048-.237 1.329-.45c.28-.213.46-.536.82-1.182l.328-.588Z"},null,-1)])))]),g(M,{class:"h-100",align:"right"},{items:v(()=>[g(V,null,{default:v(()=>[g(N,{as:"button",onClick:a[1]||(a[1]=d=>$())},{default:v(()=>[_(e(l.$t("Delete")),1)]),_:1})]),_:1})]),default:v(()=>[a[6]||(a[6]=t("button",{class:"h-9 bg-gray-200 py-2 px-3 rounded-md flex items-center"},[t("span",{class:""},[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 16 16"},[t("path",{fill:"currentColor",d:"M4 8a2 2 0 1 1-4 0a2 2 0 0 1 4 0Zm6 0a2 2 0 1 1-4 0a2 2 0 0 1 4 0Zm4 2a2 2 0 1 0 0-4a2 2 0 0 0 0 4Z"})])])],-1))]),_:1})])])]),t("div",R,[t("div",q,[t("div",K,[t("span",null,e(l.$t("Full name")),1)]),t("div",null,[t("span",null,e(s.value.full_name),1)]),t("div",P,[t("span",null,e(l.$t("Group")),1)]),t("div",null,[t("span",Q,e(((i=s.value.contact_group)==null?void 0:i.name)??l.$t("not set")),1)]),t("div",U,[t("span",null,e(l.$t("Email")),1)]),t("div",null,[t("span",null,e(s.value.email??l.$t("not set")),1)]),t("div",W,[t("span",null,e(l.$t("Contact")),1)]),t("div",null,[t("span",null,e(s.value.formatted_phone_number),1)])])]),p.locationSettings==="before"&&p.fields.length>0?(n(),o("div",X,[(n(!0),o(f,null,m(c.fields,(d,k)=>(n(),o("div",Y,[t("div",tt,[t("span",null,e(l.$t(d.name)),1)]),t("div",null,[r(u)&&r(u)[d.name]!=null?(n(),o("span",et,e(r(u)[d.name]),1)):(n(),o("span",st,e(l.$t("not set")),1))])]))),256))])):b("",!0),t("div",lt,[t("div",at,[t("div",nt,[t("span",null,e(l.$t("Street")),1)]),t("div",null,[t("span",null,e(h(s.value.address,"street")),1)]),t("div",ot,[t("span",null,e(l.$t("City")),1)]),t("div",null,[t("span",null,e(h(s.value.address,"city")),1)]),t("div",it,[t("span",null,e(l.$t("State")),1)]),t("div",null,[t("span",null,e(h(s.value.address,"state")),1)]),t("div",dt,[t("span",null,e(l.$t("Zip code")),1)]),t("div",null,[t("span",null,e(h(s.value.address,"zip")),1)]),t("div",rt,[t("span",null,e(l.$t("Country")),1)]),t("div",null,[t("span",null,e(h(s.value.address,"country")),1)])])]),p.locationSettings==="after"&&p.fields.length>0?(n(),o("div",ct,[(n(!0),o(f,null,m(c.fields,(d,k)=>(n(),o("div",ut,[t("div",vt,[t("span",null,e(l.$t(d.name)),1)]),t("div",null,[r(u)&&r(u)[d.name]!=null?(n(),o("span",pt,e(r(u)[d.name]),1)):(n(),o("span",ht,e(l.$t("not set")),1))])]))),256))])):b("",!0)])}}};export{mt as _};