1import{c as l,o as d,a as e,b as n,t as a,F as p,n as h,x as u,e as _,_ as k,r as f,$ as b,i as w,b6 as D}from"./client.7d61c7e.js";const C={class:"cms-message-queue-detail-page"},A={class:"cms-modern-card-page-header"},S={class:"cms-modern-card-page-header-content"},I={key:0},E={key:0,class:"loading-state"},R={class:"cms-modern-card"},x={class:"cms-modern-card-header"},N={class:"material-icons"},L={class:"cms-modern-card-title-wrapper"},M={class:"cms-modern-card-header-actions"},T={class:"cms-modern-card-content"},F={class:"detail-kpi-grid"},q={class:"detail-kpi"},j={class:"detail-kpi-value"},B={class:"detail-kpi"},H={class:"detail-kpi-value"},Q={class:"detail-kpi"},V={class:"detail-kpi-value"},z={class:"detail-kpi"},Y={class:"detail-kpi-value"},Z={class:"detail-kpi-grid"},P={class:"detail-kpi"},U={class:"detail-kpi-value"},J={class:"detail-kpi"},W={class:"detail-kpi-value"},G={key:0,class:"detail-kpi"},K={class:"detail-kpi-value"},O={key:1,class:"detail-kpi"},X={class:"detail-kpi-value"},$={key:0,class:"detail-error-box"},ee={class:"detail-error-content"},se={key:0,class:"detail-error-code"},te={class:"detail-error-message"},ie={key:1,class:"detail-error-time"},ae={class:"cms-modern-card-actions"},re={key:0,class:"cms-modern-card"},le={class:"cms-modern-card-content"},de={class:"detail-kpi-grid"},ne={key:0,class:"detail-kpi"},oe={class:"detail-kpi-value monospace"},ce={key:1,class:"detail-kpi"},me={class:"detail-kpi-value"},ue={key:2,class:"detail-kpi"},ge={class:"detail-kpi-value error"},ve={key:0,class:"detail-kpi-grid"},pe={class:"detail-kpi full-width"},he={class:"detail-kpi-value monospace"},ye={key:1,class:"cms-modern-card"},_e={class:"cms-modern-card-header"},ke={class:"cms-modern-card-title-wrapper"},fe={class:"cms-modern-card-content"},be={class:"error-timeline"},we={class:"timeline-content"},De={class:"timeline-header"},Ce={class:"attempt"},Ae={class:"time"},Se={class:"timeline-error"},Ie={key:0,class:"timeline-code"},Ee={key:2,class:"empty-state"};function Re(t,s,c,g,i,r){var v;const y=k,m=b("tippy");return d(),l("div",C,[e("div",A,[s[5]||(s[5]=e("div",{class:"cms-modern-card-page-header-icon"},[e("i",{class:"material-icons"},"info")],-1)),e("div",S,[s[4]||(s[4]=e("h1",null,"Nachricht Details",-1)),i.message?(d(),l("p",I,a(((v=i.message.payload)==null?void 0:v.subject)||r.recipient),1)):n("",!0)])]),i.isLoading?(d(),l("div",E,[...s[6]||(s[6]=[e("i",{class:"material-icons spinning"},"sync",-1),e("span",null,"Lade Details...",-1)])])):i.message?(d(),l(p,{key:1},[e("div",R,[e("div",x,[e("div",{class:h(["cms-modern-card-icon",r.statusColorClass])},[e("i",N,a(r.statusIcon),1)],2),e("div",L,[e("h2",null,a(r.statusLabel),1),e("p",null,a(r.recipient),1)]),e("div",M,[r.canRetry?u((d(),l("div",{key:0,class:"cms-btn round",onClick:s[0]||(s[0]=(...o)=>r.handleRetry&&r.handleRetry(...o))},[...s[7]||(s[7]=[e("i",{class:"material-icons"},"replay",-1)])])),[[m,{text:"Erneut senden"}]]):n("",!0),r.canSendNow?u((d(),l("div",{key:1,class:"cms-btn round",onClick:s[1]||(s[1]=(...o)=>r.handleSendNow&&r.handleSendNow(...o))},[...s[8]||(s[8]=[e("i",{class:"material-icons"},"send",-1)])])),[[m,{text:"Jetzt senden"}]]):n("",!0),r.canSendReal?u((d(),l("div",{key:2,class:"cms-btn round",onClick:s[2]||(s[2]=(...o)=>r.handleSendReal&&r.handleSendReal(...o))},[...s[9]||(s[9]=[e("i",{class:"material-icons"},"mark_email_read",-1)])])),[[m,{text:"Echt senden (umgeht Simulate)"}]]):n("",!0),r.canCancel?u((d(),l("div",{key:3,class:"cms-btn round",onClick:s[3]||(s[3]=(...o)=>r.handleCancel&&r.handleCancel(...o))},[...s[10]||(s[10]=[e("i",{class:"material-icons"},"cancel",-1)])])),[[m,{text:"Abbrechen"}]]):n("",!0)])]),e("div",T,[e("div",F,[e("div",q,[s[11]||(s[11]=e("div",{class:"detail-kpi-label"},"Typ",-1)),e("div",j,[e("span",{class:h(["badge","type-"+i.message.type])},a(i.message.type),3)])]),e("div",B,[s[12]||(s[12]=e("div",{class:"detail-kpi-label"},"Provider",-1)),e("div",H,a(i.message.provider||"â"),1)]),e("div",Q,[s[13]||(s[13]=e("div",{class:"detail-kpi-label"},"Prioritaet",-1)),e("div",V,a(i.message.priority),1)]),e("div",z,[s[14]||(s[14]=e("div",{class:"detail-kpi-label"},"Versuche",-1)),e("div",Y,a(i.message.attempts)+" / "+a(i.message.maxAttempts),1)])]),e("div",Z,[e("div",P,[s[15]||(s[15]=e("div",{class:"detail-kpi-label"},"Erstellt",-1)),e("div",U,a(r.formatDate(i.message.createdAt)),1)]),e("div",J,[s[16]||(s[16]=e("div",{class:"detail-kpi-label"},"Geplant",-1)),e("div",W,a(r.formatDate(i.message.scheduledFor)),1)]),i.message.completedAt?(d(),l("div",G,[s[17]||(s[17]=e("div",{class:"detail-kpi-label"},"Zugestellt",-1)),e("div",K,a(r.formatDate(i.message.completedAt)),1)])):n("",!0),i.message.contextType?(d(),l("div",O,[s[18]||(s[18]=e("div",{class:"detail-kpi-label"},"Kontext",-1)),e("div",X,a(i.message.contextType)+" "+a(i.message.contextId?"#"+i.message.contextId:""),1)])):n("",!0)]),i.message.lastError?(d(),l("div",$,[s[19]||(s[19]=e("div",{class:"detail-error-header"},[e("i",{class:"material-icons"},"warning"),e("span",null,"Letzter Fehler")],-1)),e("div",ee,[i.message.lastError.code?(d(),l("div",se,"Code: "+a(i.message.lastError.code),1)):n("",!0),e("div",te,a(i.message.lastError.message),1),i.message.lastError.timestamp?(d(),l("div",ie,a(r.formatDate(i.message.lastError.timestamp)),1)):n("",!0)])])):n("",!0)]),e("div",ae,[_(y,{icon:"arrow_back",label:"Zurück",variant:"primary",onClick:r.goBack}
1,null,8,["onClick"]),s[20]||(s[20]=e("div",{class:"cms-spacer"},null,-1))])]),i.message.deliveryInfo?(d(),l("div",re,[s[25]||(s[25]=e("div",{class:"cms-modern-card-header"},[e("div",{class:"cms-modern-card-icon success"},[e("i",{class:"material-icons"},"local_shipping")]),e("div",{class:"cms-modern-card-title-wrapper"},[e("h2",null,"Zustellung")])],-1)),e("div",le,[e("div",de,[i.message.deliveryInfo.providerMessageId?(d(),l("div",ne,[s[21]||(s[21]=e("div",{class:"detail-kpi-label"},"Message-ID",-1)),e("div",oe,a(i.message.deliveryInfo.providerMessageId),1)])):n("",!0),i.message.deliveryInfo.accepted?(d(),l("div",ce,[s[22]||(s[22]=e("div",{class:"detail-kpi-label"},"Akzeptiert",-1)),e("div",me,a(r.formatArray(i.message.deliveryInfo.accepted)),1)])):n("",!0),i.message.deliveryInfo.rejected&&i.message.deliveryInfo.rejected.length?(d(),l("div",ue,[s[23]||(s[23]=e("div",{class:"detail-kpi-label"},"Abgelehnt",-1)),e("div",ge,a(r.formatArray(i.message.deliveryInfo.rejected)),1)])):n("",!0)]),i.message.deliveryInfo.providerResponse?(d(),l("div",ve,[e("div",pe,[s[24]||(s[24]=e("div",{class:"detail-kpi-label"},"Provider-Antwort",-1)),e("div",he,a(i.message.deliveryInfo.providerResponse),1)])])):n("",!0)])])):n("",!0),i.message.errorHistory&&i.message.errorHistory.length?(d(),l("div",ye,[e("div",_e,[s[27]||(s[27]=e("div",{class:"cms-modern-card-icon danger"},[e("i",{class:"material-icons"},"history")],-1)),e("div",ke,[s[26]||(s[26]=e("h2",null,"Fehlerverlauf",-1)),e("p",null,a(i.message.errorHistory.length)+" Eintraege",1)])]),e("div",fe,[e("div",be,[(d(!0),l(p,null,f(i.message.errorHistory,o=>(d(),l("div",{class:"error-timeline-entry",key:o.attempt},[s[28]||(s[28]=e("div",{class:"timeline-marker"},[e("div",{class:"timeline-dot"})],-1)),e("div",we,[e("div",De,[e("span",Ce,"Versuch "+a(o.attempt),1),e("span",Ae,a(r.formatDate(o.timestamp)),1)]),e("div",Se,a(o.error),1),o.code?(d(),l("div",Ie,"Code: "+a(o.code),1)):n("",!0)])]))),128))])])])):n("",!0)],64)):(d(),l("div",Ee,[...s[29]||(s[29]=[e("i",{class:"material-icons"},"error_outline",-1),e("p",null,"Nachricht nicht gefunden",-1)])]))])}const xe={queued:"In Warteschlange",processing:"Wird gesendet...",sent:"Erfolgreich gesendet",failed:"Fehlgeschlagen",delayed:"Verzoegert (Retry geplant)",cancelled:"Abgebrochen"},Ne={queued:"schedule",processing:"sync",sent:"check_circle",failed:"error",delayed:"hourglass_top",cancelled:"cancel"},Le={data(){return{message:null,isLoading:!1}},computed:{statusLabel(){var t,s;return xe[(t=this.message)==null?void 0:t.status]||((s=this.message)==null?void 0:s.status)||""},statusIcon(){var t;return Ne[(t=this.message)==null?void 0:t.status]||"help"},statusColorClass(){var s;const t=(s=this.message)==null?void 0:s.status;return t==="sent"?"success":t==="failed"?"danger":t==="delayed"?"warning":t==="queued"?"primary":t==="processing"?"info":""},recipient(){var s;const t=(s=this.message)==null?void 0:s.payload;return t?t.to?Array.isArray(t.to)?t.to.join(", "):t.to:t.token?`FCM: ${t.token.substring(0,20)}...`:"":""},canRetry(){var t,s;return((t=this.message)==null?void 0:t.status)==="failed"||((s=this.message)==null?void 0:s.status)==="cancelled"},canCancel(){var t;return["queued","delayed","held"].includes((t=this.message)==null?void 0:t.status)},canSendNow(){var t,s,c;return((t=this.message)==null?void 0:t.status)==="held"?!0:((s=this.message)==null?void 0:s.status)!=="queued"&&((c=this.message)==null?void 0:c.status)!=="delayed"?!1:this.message.scheduledFor&&new Date(this.message.scheduledFor)>new Date},canSendReal(){var t;return["simulated","queued","delayed","held"].includes((t=this.message)==null?void 0:t.status)}},asyncData({store:t,route:s}){return t.dispatch("messageQueue/getMessageDetail",s.params.id)},async mounted(){await this.loadDetail()},methods:{async loadDetail(){const t=this.$route.params.id;if(t){this.isLoading=!0;try{this.message=await this.$store.dispatch("messageQueue/getMessageDetail",t)}catch(s){console.error("Failed to load message detail",s)}finally{this.isLoading=!1}}},goBack(){this.$router.push(`${this.$store.getters["config/ADMINCENTER_URL"]}/system/message-queue/browse`)},formatDate(t){return t?D(t).format("DD.MM.YYYY HH:mm:ss"):"â"},formatArray(t){return t?Array.isArray(t)?t.join(", "):String(t):"â"},async handleRetry(){try{await this.$store.dispatch("messageQueue/retryMessage",this.message._id),await this.loadDetail()}catch(t){console.error("Retry failed",t)}},async handleCancel(){try{await this.$store.dispatch("messageQueue/cancelMessage",this.message._id),await this.loadDetail()}catch(t){console.error("Cancel failed",t)}},async handleSendNow(){try{await this.$store.dispatch("messageQueue/sendNow",this.message._id),await this.loadDetail()}catch(t){console.error("Send now failed",t)}},async handleSendReal(){var s,c;const t=Array.isArray((c=(s=this.message)==null?void 0:s.payload)==null?void 0:c.recipients)?this.message.payload.recipients.length:1;if(window.confirm(`Diese Nachricht JETZT ECHT versenden (umgeht Dry-Run/Simulate)?${t>1?` 2 3`+t+" Empfänger.":""}`))try{await this.$store.dispatch("messageQueue/sendReal",this.message._id),await this.loadDetail()}catch(g){console.error("Send real failed",g)}}}},Te=w(Le,[["render",Re],["__scopeId","data-v-a665d7fd"]]);export{Te 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.