PageSourceSearch

https://grovtic.ai/build/assets/Index-Y7xaY4OQ.js

js grovtic.ai collected 2026-10-05 14:56:48 UTC 9,134 bytes, 1 lines download raw bytes

1import{d as V,i as g,z as s,A as k,B as $,w as l,f as e,H as T,g as i,o as u,k as y,n as b,m as v,e as O,T as D,a0 as L,p as N,v as S,F as H,b as x,J as h}from"./translations-C7gOHh1r.js";import{_ as K}from"./ConsoleLayout.vue_vue_type_script_setup_true_lang-DBtb7fp3.js";import{_ as Z}from"./DataTable.vue_vue_type_script_setup_true_lang-BxmEcz0Z.js";import{_ as d}from"./StatCard.vue_vue_type_script_setup_true_lang-B96gMRJB.js";import{_ as w}from"./Badge.vue_vue_type_script_setup_true_lang-KtleqOQq.js";import"./DropdownLink.vue_vue_type_script_setup_true_lang-DJVfupbK.js";import"./useTheme-DlSnwI_s.js";const A={class:"flex items-center justify-between"},E={class:"mb-8 grid gap-4 sm:grid-cols-2 lg:grid-cols-6"},F={class:"font-medium text-white"},P={key:0,class:"text-xs text-gray-400"},R={class:"text-gray-300 truncate max-w-xs block"},I={class:"flex items-center gap-3 text-sm"},J={class:"text-gray-300"},U={key:0,class:"text-xs text-gray-500"},q={class:"flex items-center gap-2"},G=["onClick"],Q={key:0,class:"fixed inset-0 z-50 overflow-y-auto"},W={class:"flex min-h-full items-center justify-center p-4"},X={class:"relative w-full max-w-md rounded-xl bg-dark-700 p-6 ring-1 ring-white/10 shadow-xl"},Y={class:"space-y-4"},ee={class:"flex items-center gap-3"},te={class:"text-sm text-gray-500"},ae={class:"mt-6 flex justify-end gap-3"},ue=V({__name:"Index",props:{logs:{},stats:{},filters:{},sort:{}},setup(n){const r=n,_=[{key:"recipient",label:"Príjemca",sortable:!0},{key:"subject",label:"Predmet",sortable:!0},{key:"category",label:"Typ"},{key:"status",label:"Stav"},{key:"tracking",label:"Tracking"},{key:"created_at",label:"Vytvorené",sortable:!0}],C=[{key:"status",label:"Stav",type:"select",options:[{value:"pending",label:"Čaká"},{value:"sent",label:"Odoslané"},{value:"opened",label:"Otvorené"},{value:"clicked",label:"Kliknuté"},{value:"failed",label:"Zlyhané"},{value:"bounced",label:"Bounced"}]},{key:"category",label:"Kategória",type:"select",options:[{value:"transactional",label:"Transakčné"},{value:"promotional",label:"Marketingové"}]},{key:"from",label:"Od dátumu",type:"date"},{key:"to",label:"Do dátumu",type:"date"}],c=x(!1),m=x(30),p=o=>{switch(o){case"pending":return{variant:"warning",label:"Čaká"};case"sent":return{variant:"info",label:"Odoslané"};case"opened":return{variant:"success",label:"Otvorené"};case"clicked":return{variant:"success",label:"Kliknuté"};case"failed":return{variant:"danger",label:"Zlyhané"};case"bounced":return{variant:"danger",label:"Bounced"};default:return{variant:"gray",label:o}}},f=o=>{switch(o){case"transactional":return{variant:"info",label:"Transakčný"};case"promotional":return{variant:"primary",label:"Marketing"};default:return{variant:"gray",label:o}}},z=()=>r.stats.sent===0?0:Math.round(r.stats.opened/r.stats.sent*100),M=()=>r.stats.opened===0?0:Math.round(r.stats.clicked/r.stats.opened*100),j=()=>{h.post(route("console.email-logs.cleanup"),{days:m.value},{onSuccess:()=>{c.value=!1}})},B=o=>{confirm("Naozaj chcete vymazať tento záznam?")&&h.delete(route("console.email-logs.destroy",o))};return(o,a)=>(u(),g(H,null,[s(k($),{title:"Email Logy"}),s(K,null,{header:l(()=>[e("div",A,[a[5]||(a[5]=e("h1",{class:"text-xl font-semibold text-white"},"Email Logy",-1)),e("button",{onClick:a[0]||(a[0]=t=>c.value=!0),class:"flex items-center gap-2 rounded-lg bg-dark-600 px-4 py-2 text-sm font-medium text-gray-300 ring-1 ring-white/10 hover:bg-dark-500 transition-colors"},[...a[4]||(a[4]=[e("svg",{class:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1),v(" Vyčistiť staré ",-1)])])])]),default:l(()=>[e("div",E,[s(d,{title:"Celkom",value:n.stats.total,icon:"activity",variant:"primary"},null,8,["value"]),s(d,{title:"Odoslaných",value:n.stats.sent,icon:"activity",variant:"default"},null,8,["value"]),s(d,{title:"Otvorených",value:`${n.stats.opened} (${z()}%)`,icon:"activity",variant:"success"},null,8,["value"]),s(d,{title:"Kliknutých",value:`${n.stats.clicked} (${M()}%)`,icon:"activity",variant:"success"},null,8,["value"]),s(d,{title:"Zlyhaných",value:n.stats.failed,icon:"activity",variant:"danger"},null,8,["value"]),s(d,{title:"Bounced",value:n.stats.bounced,icon:"activity",variant:"warning"},null,8,["value"])]),s(Z,{columns:_,data:n.logs.data,pagination:n.logs,filters:C,"filter-values":r.filters,"sort-by":n.sort.column,"sort-dir":n.sort.direction,"route-name":"console.email-logs.index","search-placeholder":"Hľadať podľa emailu alebo predmetu...","empty-message":"Žiadne email logy","row-href":t=>o.route("console.email-logs.show",t.id)},{"cell-recipient":l(({row:t})=>[e("div",null,[e("p",F,i(t.to_email),1),t.to_name?(u(),g("p",P,i(t.to_name),1)):y("",!0)])]),"cell-subject":l(({row:t})=>[e("span",R,i(t.subject),1)]),"cell-category":l(({row:t})=>[s(w,{variant:f(t.category).variant},{default:l(()=>[v(i(f(t.category).label),1)]),_:2},1032,["variant"])]),"cell-status":l(({row:t})=>[s(w,{variant:p(t.status).variant,dot:""},{default:l(()=>[v(i(p(t.status).label),1)]),_:2},1032,["variant"])]),"cell-tracking":l(({row:t})=>[e("div",I,[e("span",{class:b(["flex items-center gap-1",t.open_count>0?"text-green-400":"text-gray-500"])},[a[6]||(a[6]=e("svg",{class:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})],-1)),v(" "+i(t.open_count),1)],2),e("span",{class:b(["flex items-center gap-1",t.click_count>0?"text-blue-400":"text-gray-500"])},[a[7]||(a[7]=e("svg",{class:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"})],-1)),v(" "+i(t.click_count),1)],2)])]),"cell-created_at":l(({row:t})=>[e("div",null,[e("span",J,i(t.created_at),1),t.sent_at&&t.sent_at!==t.created_at?(u(),g("p",U," Odoslané: "+i(t.sent_at),1)):y("",!0)])]),"row-actions":l(({row:t})=>[e("div",q,[s(k(T),{href:o.route("console.email-logs.show",t.id),class:"rounded-md p-1.5 text-gray-400 hover:bg-white/5 hover:text-white",title:"Detail"},{default:l(()=>[...a[8]||(a[8]=[e("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})],-1)])]),_:1},8,["href"]),e("button",{onClick:se=>B(t.id),class:"rounded-md p-1.5 text-gray-400 hover:bg-red-500/10 hover:text-red-400",title:"Vymazať"},[...a[9]||(a[9]=[e("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)])],8,G)])]),_:1},8,["data","pagination","filter-values","sort-by","sort-dir","row-href"]),(u(),O(D,{to:"body"},[s(L,{"enter-active-class":"transition ease-out duration-200","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition ease-in duration-150","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:l(()=>[c.value?(u(),g("div",Q,[e("div",W,[e("div",{class:"fixed inset-0 bg-black/60",onClick:a[1]||(a[1]=t=>c.value=!1)}),e("div",X,[a[12]||(a[12]=e("h3",{class:"text-lg font-semibold text-white mb-4"},"Vyčistiť staré záznamy",-1)),e("div",Y,[e("div",null,[a[11]||(a[11]=e("label",{class:"block text-sm font-medium text-gray-400 mb-2"}," Vymazať záznamy staršie ako ",-1)),e("div",ee,[N(e("input",{"onUpdate:modelValue":a[2]||(a[2]=t=>m.value=t),type:"number",min:"1",max:"365",class:"w-24 rounded-lg border-0 bg-dark-600 px-3 py-2 text-white ring-1 ring-white/10 focus:ring-2 focus:ring-primary-500"},null,512),[[S,m.value,void 0,{number:!0}]]),a[10]||(a[10]=e("span",{class:"text-gray-400"},"dní",-1))])]),e("p",te," Táto akcia je nevratná. Všetky email logy staršie ako "+i(m.value)+" dní budú permanentne vymazané. ",1)]),e("div",ae,[e("button",{onClick:a[3]||(a[3]=t=>c.value=!1),class:"rounded-lg px-4 py-2 text-sm font-medium text-gray-400 hover:text-white transition-colors"}," Zrušiť "),e("button",{onClick:j,class:"rounded-lg bg-red-500 px-4 py-2 text-sm font-medium text-white hover:bg-red-600 transition-colors"}," Vymazať ")])])])])):y("",!0)]),_:1})]))]),_:1})],64))}});
1export{ue as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.