PageSourceSearch

https://accounts.myciba.org/build/assets/Show-DGeG4pTt.js

js myciba.org collected 2026-10-06 09:02:37 UTC 12,516 bytes, 1 lines download raw bytes

1import{A as D}from"./AdminLayout-q6rhfm04.js";import{W as R,E as F,y as V,c as j,w as p,o as e,a,g as E,h as y,f as A,l as S,t as r,n as m,d as s,j as c,F as i,r as b}from"./app-BILMRQ8k.js";import"./useToast-aB3Lru0D.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./NotificationDropdown-CF5anDhQ.js";import"./ToastContainer-Do8oHR8l.js";import"./useFcmNotifications-v3SHtSf8.js";/* empty css            */const I={class:"py-6"},L={class:"max-w-6xl mx-auto px-4 sm:px-6 lg:px-8"},O={class:"mb-6"},q={class:"text-2xl font-bold text-gray-900 dark:text-white"},Z={class:"mt-2 flex flex-wrap items-center gap-4 text-sm"},z={key:0,class:"text-gray-600 dark:text-gray-400"},J={class:"text-gray-600 dark:text-gray-400"},U={key:1,class:"text-gray-600 dark:text-gray-400"},W={key:0,class:"mt-2 text-sm text-gray-600 dark:text-gray-400"},G={class:"mt-2 flex gap-6 text-sm"},H={class:"text-lg font-semibold text-gray-900 dark:text-white mb-3"},K={key:0,class:"rounded-lg border border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/50 p-6 text-center text-gray-600 dark:text-gray-400"},Q={key:1,class:"overflow-hidden rounded-lg border border-gray-200 dark:border-gray-700 shadow"},X={class:"min-w-full divide-y divide-gray-200 dark:divide-gray-700"},Y={class:"bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-700"},tt={class:"px-4 py-3 text-sm"},et={key:0,class:"text-gray-900 dark:text-white font-medium"},at={key:1,class:"text-gray-500"},st={key:2,class:"block text-xs text-gray-500 dark:text-gray-400"},rt={class:"px-4 py-3 whitespace-nowrap"},nt={class:"px-4 py-3 text-sm text-gray-600 dark:text-gray-300"},lt={class:"px-4 py-3 text-sm"},ot={class:"flex flex-wrap gap-1"},dt=["title"],ct={key:1,class:"mt-2 space-y-1.5 text-xs text-gray-500 dark:text-gray-400"},ut={class:"font-medium text-gray-600 dark:text-gray-300"},it={key:0},yt={key:1,class:"ml-1"},xt={key:2,class:"block"},mt={key:0},gt={key:1,class:"block"},pt={key:2,class:"block"},bt={key:0},_t={key:1,class:"ml-1"},kt={key:2,class:"block"},ht={key:3,class:"block"},ft={key:4,class:"text-amber-600 dark:text-amber-400"},wt={key:1,class:"text-gray-400"},vt={class:"px-4 py-3 text-sm text-gray-600 dark:text-gray-300"},jt={key:0,class:"space-y-0.5"},At={key:0},St={key:1,class:"block"},Bt={key:2,class:"text-amber-600 dark:text-amber-400 text-xs"},Ct={key:1,class:"mt-1 text-xs text-gray-500 dark:text-gray-400"},Tt={key:2,class:"text-xs"},Pt={key:1,class:"text-gray-400"},Mt={class:"px-4 py-3 text-sm text-gray-600 dark:text-gray-300 whitespace-nowrap"},Nt={class:"block text-xs"},$t={class:"block text-xs text-gray-500 dark:text-gray-400"},Dt={key:1,class:"text-gray-400"},Rt={class:"px-4 py-3 text-sm text-gray-600 dark:text-gray-300 whitespace-nowrap"},Ft={class:"block text-xs"},Vt={class:"block text-xs text-gray-500 dark:text-gray-400"},Et={key:1,class:"text-gray-400"},It={class:"px-4 py-3 text-sm"},Lt={key:1,class:"text-gray-400"},Ht={__name:"Show",props:{batch:{type:Object,required:!0},runs:{type:Array,default:()=>[]}},setup(d){const g=d,{start:_,stop:B}=R(5e3,{only:["batch","runs"]},{autoStart:!1});function k(){var l,o;return((l=g.batch)==null?void 0:l.status)==="running"||((o=g.batch)==null?void 0:o.status)==="dispatched"}F(()=>{k()&&_()}),V(()=>{var l;return(l=g.batch)==null?void 0:l.status},l=>{l==="completed"||l==="failed"||l==="cancelled"?B():k()&&_()});function h(l){return l?new Date(l).toLocaleString():"—"}function u(l){return l==null?"—":new Intl.NumberFormat("en-ZA",{style:"currency",currency:"ZAR",minimumFractionDigits:2}).format(l/100)}function C(l){return l&&typeof l.adjustments_total_count=="number"}function T(l){if(!l)return"—";const o=l.adjustments_total_count??0,t=l.adjustments_unallocated??0,x=l.adjustments_allocated??0;return`${o} total, ${t} unalloc, ${x} alloc`}function P(l){return l&&typeof l.payments_total_count=="number"}function M(l){if(!l)return"—";const o=l.payments_total_count??0,t=l.payments_unallocated??0,x=l.payments_allocated??0;return`${o} total, ${t} unalloc, ${x} alloc`}function N(l){return{pending:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",running:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-400",completed:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400",cancelled:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400"}[l]||"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"}function $(l){return{pending:"bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-400",running:"bg-amber-100 dar
1k:bg-amber-900/30 text-amber-700 dark:text-amber-400",completed:"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400",skipped:"bg-gray-100 dark:bg-gray-700 text-gray-500 dark:text-gray-400",failed:"bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-400"}[l]||"bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-400"}return(l,o)=>(e(),j(D,null,{default:p(()=>[a("div",I,[a("div",L,[a("div",O,[E(A(S),{href:l.route("vue.bulk-payment-recon.index"),class:"inline-flex items-center text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white mb-4"},{default:p(()=>o[0]||(o[0]=[a("svg",{class:"h-4 w-4 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 19l-7-7m0 0l7-7m-7 7h18"})],-1),y(" Back to bulk batches ")])),_:1},8,["href"]),a("h1",q," Bulk batch "+r(d.batch.id.slice(0,8))+"… ",1),a("div",Z,[a("span",{class:m([d.batch.status==="running"?"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-400":d.batch.status==="dispatched"?"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400":"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400","inline-flex px-2 py-0.5 font-medium rounded-full"])},r(d.batch.status),3),d.batch.status==="dispatched"||d.batch.status==="running"?(e(),s("span",z,r(d.batch.status==="running"?"Runs in progress —":"Jobs queued —")+" page auto-refreshes every 5s. ",1)):c("",!0),a("span",J," Started "+r(h(d.batch.started_at)),1),d.batch.finished_at?(e(),s("span",U,r(d.batch.status==="completed"?"All runs finished":"Command finished")+" "+r(h(d.batch.finished_at)),1)):c("",!0)]),d.batch.criteria&&d.batch.criteria.length?(e(),s("div",W,[o[1]||(o[1]=a("span",{class:"font-medium"},"Criteria:",-1)),y(" "+r(d.batch.criteria.join(", ")),1)])):c("",!0),a("div",G,[a("span",null,[o[2]||(o[2]=y("Total: ")),a("strong",null,r(d.batch.total_members),1)]),a("span",null,[o[3]||(o[3]=y("Created: ")),a("strong",null,r(d.batch.created),1)]),a("span",null,[o[4]||(o[4]=y("Skipped: ")),a("strong",null,r(d.batch.skipped),1)]),a("span",{class:m(d.batch.errors>0?"text-red-600 dark:text-red-400":"")},[o[5]||(o[5]=y(" Errors: ")),a("strong",null,r(d.batch.errors),1)],2)])]),a("h2",H," Member runs ("+r(d.runs.length)+") ",1),d.runs.length===0?(e(),s("div",K," No runs in this batch yet, or jobs are still being dispatched. ")):(e(),s("div",Q,[a("table",X,[o[7]||(o[7]=a("thead",{class:"bg-gray-50 dark:bg-gray-800"},[a("tr",null,[a("th",{scope:"col",class:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"}," Member "),a("th",{scope:"col",class:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"}," Run status "),a("th",{scope:"col",class:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"}," Current step "),a("th",{scope:"col",class:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"}," Steps "),a("th",{scope:"col",class:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"}," Result "),a("th",{scope:"col",class:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"}," Adjustments "),a("th",{scope:"col",class:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"}," Payments "),a("th",{scope:"col",class:"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"}," Actions ")])],-1)),a("tbody",Y,[(e(!0),s(i,null,b(d.runs,t=>{var x,f,w,v;return e(),s("tr",{key:t.id,class:"hover:bg-gray-50 dark:hover:bg-gray-800/50"},[a("td",tt,[t.member?(e(),s("span",et,r(t.member.first_name)+" "+r(t.member.last_name),1)):(e(),s("span",at,"—")),t.member?(e(),s("span",st,r(t.member.m_code)+" (ID "+r(t.member_id)+") ",1)):c("",!0)]),a("td",rt,[a("span",{class:m([N(t.status),"inline-flex px-2 py-0.5 text-xs font-medium rounded-full"])},r(t.status),3)]),a("td",nt,r(t.current_step_key||"—"),1),a("td",lt,[a("div",ot,[(e(!0),s(i,null,b(t.steps,n=>(e(),s("span",{key:n.id,class:m([$(n.status),"inline-flex px-1.5 py-0.5 text-xs rounded"])},r(n.step_key)+": "+r(n.status),3))),128))]),(x=t.steps)!=null&&x.some(n=>n.error)?(e(),s("p",{key:0,class:"mt-1 text-xs text-red-600 dark:text-red-400 truncate max-w-xs",title:(f=t.steps.find(n=>n.error))==null?void 0:f.error},r((w=t.steps.find(n=>n.error))==null?void 0:w.error),9,dt)):c("",!0),(v=t.steps)!=null&&v.length?(e(),s("div",ct,[(e(!0),s(i,null,b(t.steps,n=>(e(),s("div",{key:n.id,class:"border-l-2 border-gray-200 dark:border-gray-600 pl-2"},[a("span",ut,r(n.step_key),1),n.result&&Object.keys(n.result).length?(e(),s(i,{key:0},[n.step_key==="recreate"?(e(),s(i,{key:0},[n.result.payments_created!=null?(e(),s("span",it,"Payments: "+r(n.result.payments_created),1)):c("",!0),n.result.adjustments_created!=null?(e(),s("span",yt,"Adjustments: "+r(n.result.adjustments_created),1)):c("",!0),n.result.total_amount!=null?(e(),s("span",xt,"Total: "+r(u(Math.round((n.result.total_amount||0)*100))),1)):c("",!0)],64)):n.step_key==="unallocate"?(e(),s(i,{key:1},[n.result.payments_unallocated!=null?(e(),s("span",mt,"Unallocated: "+r(n.result.payments_unallocated),1
1)):c("",!0),n.result.total_amount_cents!=null?(e(),s("span",gt,"Total: "+r(u(n.result.total_amount_cents)),1)):n.result.total_amount!=null?(e(),s("span",pt,"Total: "+r(u(Math.round((n.result.total_amount||0)*100))),1)):c("",!0)],64)):n.step_key==="reallocate"?(e(),s(i,{key:2},[n.result.transactions_created!=null?(e(),s("span",bt,"Tx: "+r(n.result.transactions_created),1)):c("",!0),n.result.payments_updated!=null?(e(),s("span",_t,"Payments: "+r(n.result.payments_updated),1)):c("",!0),n.result.balance_before_cents!=null?(e(),s("span",kt,"Before: "+r(u(n.result.balance_before_cents)),1)):c("",!0),n.result.balance_after_cents!=null?(e(),s("span",ht,"After: "+r(u(n.result.balance_after_cents)),1)):c("",!0),n.result.balance_changed?(e(),s("span",ft,"Balance changed")):c("",!0)],64)):c("",!0)],64)):n.status==="completed"?(e(),s("span",wt,"—")):c("",!0)]))),128))])):c("",!0)]),a("td",vt,[t.result?(e(),s(i,{key:0},[t.result.balance_before_cents!=null||t.result.balance_after_cents!=null?(e(),s("div",jt,[t.result.balance_before_cents!=null?(e(),s("span",At," Before: "+r(u(t.result.balance_before_cents)),1)):c("",!0),t.result.balance_after_cents!=null?(e(),s("span",St," After: "+r(u(t.result.balance_after_cents)),1)):c("",!0),t.result.balance_changed?(e(),s("span",Bt,"Balance changed")):c("",!0)])):c("",!0),(t.result.transactions_created!=null||t.result.payments_updated!=null)&&(t.result.balance_before_cents!=null||t.result.balance_after_cents!=null)?(e(),s("div",Ct," Tx: "+r(t.result.transactions_created??"—")+", Payments: "+r(t.result.payments_updated??"—"),1)):t.result.transactions_created!=null||t.result.payments_updated!=null?(e(),s("div",Tt," Tx: "+r(t.result.transactions_created??"—")+", Payments: "+r(t.result.payments_updated??"—"),1)):c("",!0)],64)):(e(),s("span",Pt,"—"))]),a("td",Mt,[C(t.result)?(e(),s(i,{key:0},[a("span",Nt,r(T(t.result)),1),a("span",$t,r(u(t.result.adjustment_total_amount_cents))+" / "+r(u(t.result.adjustment_total_transaction_amount_cents)),1)],64)):(e(),s("span",Dt,"—"))]),a("td",Rt,[P(t.result)?(e(),s(i,{key:0},[a("span",Ft,r(M(t.result)),1),a("span",Vt,r(u(t.result.payments_total_amount_cents))+" / "+r(u(t.result.payments_total_transaction_amount_cents)),1)],64)):(e(),s("span",Et,"—"))]),a("td",It,[t.member?(e(),j(A(S),{key:0,href:l.route("vue.members.payment-recon",{member:t.member_id}),class:"text-ciba-green hover:underline font-medium"},{default:p(()=>o[6]||(o[6]=[y(" Open recon ")])),_:2},1032,["href"])):(e(),s("span",Lt,"—"))])])}),128))])])]))])])]),_:1}))}};export{Ht 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.