2 lines
2.6 KiB
JavaScript
2 lines
2.6 KiB
JavaScript
import{q as d,b as U,r as n,e as _,f as e,t as s,M as k,F as u,i as A,g as a,w as m,k as S,L as $,c as p,l as r,n as E}from"./index.75e80697.js";const I={class:"intro-y text-lg font-medium mt-10"},N={class:"grid grid-cols-12 gap-6 mt-5"},B={class:"intro-y col-span-12 flex flex-wrap sm:flex-nowrap items-center mt-2"},T=["onClick"],L={class:"intro-y col-span-12 overflow-auto lg:overflow-visible max-w-screen-lg"},R={class:"table table-report -mt-2"},q={class:"whitespace-nowrap"},D={class:"whitespace-nowrap"},V={class:"text-center whitespace-nowrap"},j={href:"",class:"font-medium whitespace-nowrap"},F={class:"text-slate-500 flex items-center mr-3",href:"javascript:;"},X={class:"w-40"},z={class:"p-5 text-center"},H=e("div",{class:"text-3xl mt-5"},"Are you sure?",-1),W=e("div",{class:"text-slate-500 mt-2"},[r(" Do you really want to delete these records? "),e("br"),r("This process cannot be undone. ")],-1),G={class:"px-5 pb-8 text-center"},J=e("button",{type:"button",class:"btn btn-danger w-24"},"Delete",-1),P={__name:"Main",setup(K){const f="https://panel.exchange.gov.tm/api",i=d(!1),h=d(!1),l=d([]),v=()=>{console.log("onAddNewUser"),S.push({path:"/create-user"})},w=async()=>{try{l.value.splice(0);const t=await $.get(`${f}/account/clients`);l.value=[...t.data],console.log("response fetchUsers: ",l.value)}catch(t){console.log("error fetchUsers: ",t)}};return U(async()=>{h.value=!0,await w(),h.value=!1}),(t,c)=>{const b=n("MailIcon"),x=n("CheckSquareIcon"),g=n("XCircleIcon"),y=n("ModalBody"),M=n("Modal");return p(),_(u,null,[e("h2",I,s(t.$t("USERS")),1),e("div",N,[e("div",B,[e("button",{class:"btn btn-primary shadow-md mr-2",onClick:k(v,["prevent"])},s(t.$t("CREATE_USER")),9,T)]),e("div",L,[e("table",R,[e("thead",null,[e("tr",null,[e("th",q,s(t.$t("NAME_SURNAME")),1),e("th",D,s(t.$t("EMAIL")),1),e("th",V,s(t.$t("STATUS")),1)])]),e("tbody",null,[(p(!0),_(u,null,A(l.value,(o,C)=>(p(),_("tr",{key:C,class:"intro-x"},[e("td",null,[e("a",j,s(o.firstname)+" "+s(o.lastname),1)]),e("td",null,[e("a",F,[a(b,{class:"w-4 h-4 mr-2"}),r(" "+s(o.email),1)])]),e("td",X,[e("div",{class:E(["flex items-center justify-center",{"text-success":o.is_verified,"text-danger":!o.is_verified}])},[a(x,{class:"w-4 h-4 mr-2"}),r(" "+s(o.is_verified?"Active":"Inactive"),1)],2)])]))),128))])])])]),a(M,{show:i.value,onHidden:c[1]||(c[1]=o=>i.value=!1)},{default:m(()=>[a(y,{class:"p-0"},{default:m(()=>[e("div",z,[a(g,{class:"w-16 h-16 text-danger mx-auto mt-3"}),H,W]),e("div",G,[e("button",{type:"button",onClick:c[0]||(c[0]=o=>i.value=!1),class:"btn btn-outline-secondary w-24 mr-1"}," Cancel "),J])]),_:1})]),_:1},8,["show"])],64)}}};export{P as default};
|