PageSourceSearch

https://app.goodmeetings.ai/static/js/6977.e7eb6ac7.chunk.js

js goodmeetings.ai collected 2026-09-29 12:48:24 UTC 32,342 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkgoodmeetings||=[]).push([[6977],{59637(e,a,l){l.r(a),l.d(a,{default:()=>n});var s=l(82492),t=l(44414);function n(e){let{data:a,loading:l,onFilterEntity:n}=e;if(l&&!a)return null;const i=[...(null===a||void 0===a?void 0:a.agencies)||[]].sort((e,a)=>Number(a.calls||0)-Number(e.calls||0));return(0,t.jsxs)("section",{className:"section-card",id:"agencyPerformance",children:[(0,t.jsx)("div",{className:"section-head",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"section-title",children:"Agency Performance"}),(0,t.jsx)("div",{className:"section-sub",children:"Call quality and fatal performance by agency."})]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"subsection-label",children:"Agency Performance \xb7 Call Quality"}),(0,t.jsx)("div",{className:"tbl-wrap tbl-wrap-scroll",children:(0,t.jsxs)("table",{className:"compact agency-performance-table",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:"Agency"}),(0,t.jsx)("th",{children:"Calls"}),(0,t.jsx)("th",{children:"Call Quality"}),(0,t.jsx)("th",{children:"Average Quality without Fatal"}),(0,t.jsx)("th",{children:"Fatal Calls"}),(0,t.jsx)("th",{children:"Fatal %"}),(0,t.jsx)("th",{children:"Avg Duration"}),(0,t.jsx)("th",{children:"Top Fatal Category"})]})}),(0,t.jsx)("tbody",{children:i.length?i.map(e=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:n?(0,t.jsx)("button",{type:"button",className:"call-link",onClick:()=>n(e.name),children:e.name}):e.name}),(0,t.jsx)("td",{className:"mono",children:e.calls}),(0,t.jsx)("td",{className:`mono ${(0,s.scoreCls)(e.quality)}`,children:(0,s.fmtPct)(e.quality)}),(0,t.jsx)("td",{className:`mono ${(0,s.scoreCls)(e.nonFatalQuality)}`,children:(0,s.fmtPct)(e.nonFatalQuality)}),(0,t.jsx)("td",{className:"mono",children:e.fatalCalls}),(0,t.jsx)("td",{className:"mono",children:(0,s.fmtPct)(e.fatalPct)}),(0,t.jsxs)("td",{className:"mono",children:[Math.round(e.avgDuration),"s"]}),(0,t.jsx)("td",{className:"small",children:e.topFatal})]},e.name)):(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:8,children:"No agency data for current filters."})})})]})})]})]})}},78179(e,a,l){l.r(a),l.d(a,{default:()=>i});var s=l(82492),t=l(44414);function n(e){let{title:a,subtitle:l,data:n,type:i}=e;const r=(null===n||void 0===n?void 0:n.rows)||[],c="fatal"===i;return(0,t.jsxs)("section",{className:"section-card",children:[(0,t.jsx)("div",{className:"section-head",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"section-title",children:a}),(0,t.jsx)("div",{className:"section-sub",children:l})]})}),(0,t.jsxs)("div",{className:"focus-card "+(c?"danger":""),style:{marginBottom:14},children:[(0,t.jsx)("div",{className:"hero-label",children:c?"Top Fatal Rubric Focus":"Top Non-Fatal Rubric Focus"}),(0,t.jsx)("div",{className:"focus-title "+(c?"score-bad":""),children:null===n||void 0===n?void 0:n.focus}),(0,t.jsx)("div",{className:"focus-meta",children:null===n||void 0===n?void 0:n.focusMeta})]}),(0,t.jsx)("span",{className:"subsection-label",children:c?"Fatal rubric improvement table \xb7 sorted by highest fatal-event contribution":"Non-fatal rubric improvement table \xb7 sorted by lowest rubric score / highest gap"}),(0,t.jsx)("div",{className:"tbl-wrap tbl-wrap-scroll",style:{marginBottom:14},children:(0,t.jsxs)("table",{className:"compact",children:[(0,t.jsx)("thead",{children:c?(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:"Fatal Rubric"}),(0,t.jsx)("th",{children:"Fatal Events"}),(0,t.jsx)("th",{children:"Contribution"}),(0,t.jsx)("th",{children:"Calls Impacted"}),(0,t.jsx)("th",{children:"Priority"}),(0,t.jsx)("th",{children:"Focus Area"}),(0,t.jsx)("th",{children:"Improvement Plan"})]}):(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:"Non-Fatal Rubric"}),(0,t.jsx)("th",{children:"Calls Scored"}),(0,t.jsx)("th",{children:"Avg Score"}),(0,t.jsx)("th",{children:"Gap to 100"}),(0,t.jsx)("th",{children:"Priority"}),(0,t.jsx)("th",{children:"Focus Area"}),(0,t.jsx)("th",{children:"Improvement Plan"})]})}),(0,t.jsx)("tbody",{children:r.length?r.map(e=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:e.name}),(0,t.jsx)("td",{className:"mono",children:c?e.count:e.volume}),(0,t.jsx)("td",{className:`mono ${c?"":(0,s.scoreCls)(e.avg)}`,children:c?`${(0,s.fmtPct)(e.share)}`:`${(0,s.fmtPct)(e.avg)}`}),(0,t.jsx)("td",{className:"mono",children:c?e.impacted:`${e.gap} pts`}),(0,t.jsx)("td",{children:(0,t.jsx)(s.PriorityPill,{level:e.level})}),(0,t.jsx)("td",{className:"small",children:e.focusArea||e.name}),(0,t.jsx)("td",{className:"small",children:e.action})]},e.name)):(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:7,children:"No improvement areas for the current filter."})})})]})})]})}function i(e){let{data:a,loading:l}=e;return l&&!a?null:(0,t.jsxs)("div",{children:[(0,t.jsx)(n,{title:"Fatal Rubric-Level Improvement Plan",subtitle:"Compliance-first improvement areas grouped by fatal rubric/category, with contribution, impact, and action plan.",data:null===a||void 0===a?void 0:a.fatalRubric,type:"fatal"}),(0,t.jsx)(n,{title:"Non-Fatal Rubric-Level Improvement Plan",subtitle:"Quality-lift improvement areas grouped by rubric score gaps, independent of individual agent ranking.",data:null===a||void 0===a?void 0:a.nonFatalRubric,type:"nonFatal"})]})}},36666(e,a,l){l.r(a),l.d(a,{default:()=>h});var s=l(9950),t=l(13911),n=l(81402),i=l(23016),r=l(29031),c=l(17698),d=l(44414);const o=()=>(0,t.format)(new Date,"yyyy-MM-dd");function h(e){let{activeTab:a,onTabChange:l,company:h}=e;const{enqueueSnackbar:m}
1=(0,r.useSnackbar)(),[u,x]=(0,s.useState)(!1),[j,p]=(0,s.useState)([]),[v,g]=(0,s.useState)(o()),[b,y]=(0,s.useState)(o()),[f,N]=(0,s.useState)(null),[C,A]=(0,s.useState)(!1),F=o(),P=(e,a)=>{if(!e||!a)return null;const l=new Date(e),s=new Date(a);return(0,t.isValid)(l)&&(0,t.isValid)(s)?(0,t.format)(s,"yyyy-MM-dd")>F?"End date cannot be in the future.":e>a?"Start date must be on or before end date.":null:"Please select valid dates."},D=()=>{C||x(!1)},k=v&&b?(0,t.differenceInDays)(new Date(b),new Date(v))+1:0;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("header",{className:"dashboard-topbar",children:[(0,d.jsx)("div",{className:"topbar-center",children:(0,d.jsxs)("div",{className:"nav-tabs",children:[(0,d.jsx)("button",{type:"button",className:"tab-btn "+("agency"===a?"active":""),onClick:()=>l("agency"),children:"Agency Performance"}),(0,d.jsx)("button",{type:"button",className:"tab-btn "+("coaching"===a?"active":""),onClick:()=>l("coaching"),children:"Coaching Insights"})]})}),(0,d.jsx)(n.Button,{variant:"contained",size:"small",className:"download-report-btn",onClick:()=>{g(o()),y(o()),N(null),x(!0)},children:"Download Report"})]}),(0,d.jsxs)(n.Dialog,{open:u,onClose:D,fullWidth:!0,maxWidth:"sm",children:[(0,d.jsx)(n.DialogTitle,{children:"Download Report"}),(0,d.jsxs)(n.DialogContent,{sx:{pt:1},children:[(0,d.jsx)(n.Typography,{variant:"body2",sx:{color:"#6F7D96",mb:2},children:"Select a date range for the report. The Excel report will be emailed to the recipients below."}),(0,d.jsx)(n.Alert,{severity:"info",icon:(0,d.jsx)(i.default,{fontSize:"small"}),sx:{mb:2.5},children:"For larger date ranges the report may take a few minutes to generate. Please be patient after submitting."}),(0,d.jsxs)(n.Box,{sx:{display:"flex",gap:2,alignItems:"flex-start",mb:.5},children:[(0,d.jsx)(n.TextField,{type:"date",label:"Start date",fullWidth:!0,size:"small",value:v,onChange:e=>{const a=e.target.value;g(a),N(P(a,b))},InputLabelProps:{shrink:!0},inputProps:{max:F},error:!!f}),(0,d.jsx)(n.Typography,{sx:{pt:1,color:"#9e9e9e",flexShrink:0},children:"to"}),(0,d.jsx)(n.TextField,{type:"date",label:"End date",fullWidth:!0,size:"small",value:b,onChange:e=>{const a=e.target.value;y(a),N(P(v,a))},InputLabelProps:{shrink:!0},inputProps:{max:F},error:!!f})]}),(0,d.jsxs)(n.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:2,minHeight:28},children:[(0,d.jsx)(n.Typography,{variant:"caption",color:"error",children:f||""}),!f&&k>0&&(0,d.jsx)(n.Chip,{label:`${k} day${k>1?"s":""} selected`,size:"small",color:"primary",variant:"outlined"})]}),(0,d.jsx)(n.Divider,{sx:{mb:2}}),(0,d.jsx)(n.Autocomplete,{multiple:!0,freeSolo:!0,options:[],value:j,onChange:(e,a)=>p(a),renderInput:e=>(0,d.jsx)(n.TextField,{...e,autoFocus:!0,label:"Email recipients",placeholder:"Enter an email address",helperText:"Type an email and press Enter to add multiple recipients.",size:"small"})})]}),(0,d.jsxs)(n.DialogActions,{children:[(0,d.jsx)(n.Button,{onClick:D,disabled:C,children:"Cancel"}),(0,d.jsx)(n.Button,{variant:"contained",onClick:async()=>{if(!v||!b||f||!j.length||!h)return;const e={company:h,start_date:v,end_date:b,emails:j};x(!1),p([]),m(`Report for ${k} day(s) will be sent on email shortly. It may take a few minutes to generate.`,{variant:"success"}),A(!0);try{const a=await(0,c.sendPaytmCollectionsMailReport)(e);null!==a&&void 0!==a&&a.success||m((null===a||void 0===a?void 0:a.error)||"Unable to queue report. Please try again.",{variant:"error"})}catch(s){var a,l;m((null===s||void 0===s||null===(a=s.response)||void 0===a||null===(l=a.data)||void 0===l?void 0:l.error)||"An error occurred while queuing the report. Please try again.",{variant:"error"})}finally{A(!1)}},disabled:C||!v||!b||!!f||0===j.length,startIcon:C?(0,d.jsx)(n.CircularProgress,{size:16,color:"inherit"}):null,children:C?"Submitting...":"Send"})]})]})]})}},96216(e,a,l){l.r(a),l.d(a,{default:()=>n});var s=l(44414);const t=e=>`${Number(e||0).toFixed(1)}%`;function n(e){var a,l;let{data:n,loading:i,entityLabel:r="Agency"}=e;if(i)return(0,s.jsx)("section",{className:"section-card",id:"execSnapshot",children:(0,s.jsx)("div",{className:"section-head",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"section-title",children:"Executive CQ / Call Quality Snapshot"}),(0,s.jsx)("div",{className:"section-sub",children:"Loading\u2026"})]})})});const{highestRisk:c,bestPerformer:d,productDrivers:o=[]}=n||{};return(0,s.jsxs)("section",{className:"section-card",id:"execSnapshot",children:[(0,s.jsx)("div",{className:"section-head",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"section-title",children:"Executive CQ / Call Quality Snapshot"}),(0,s.jsx)("div",{className:"section-sub",children:"Immediate view of ranking, fatal risk, product defect drivers, and action areas."})]})}),(0,s.jsxs)("div",{className:"grid-hero",children:[(0,s.jsxs)("div",{className:"hero-card danger",children:[(0,s.jsx)("div",{className:"hero-label",children:"Highe
1st Risk \xb7 Best Performer"}),(0,s.jsxs)("div",{className:"rank-summary",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("b",{className:"score-bad",children:"\u26a0 Highest Risk:"}),"\xa0",(null===c||void 0===c?void 0:c.name)||"\u2014"," \xa0\xb7\xa0 CQ ",t(null===c||void 0===c?void 0:c.quality)," \xa0\xb7\xa0"," ",null!==(a=null===c||void 0===c?void 0:c.fatalCalls)&&void 0!==a?a:0," fatal calls"]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("b",{className:"score-good",children:"\u2713 Best Performer:"}),"\xa0",(null===d||void 0===d?void 0:d.name)||"\u2014"," \xa0\xb7\xa0 CQ ",t(null===d||void 0===d?void 0:d.quality)," \xa0\xb7\xa0"," ",null!==(l=null===d||void 0===d?void 0:d.fatalCalls)&&void 0!==l?l:0," fatal calls"]}),(0,s.jsx)("span",{className:"small",children:"Ranked by agency. Best = highest average pitch score, then fewest fatal calls. Highest risk = lowest average pitch score, then most fatal calls."})]})]}),(0,s.jsxs)("div",{className:"hero-card",children:[(0,s.jsx)("div",{className:"hero-label",children:"Product-wise Defect Drivers"}),(0,s.jsx)("div",{className:"tbl-wrap",style:{marginTop:10},children:(0,s.jsxs)("table",{className:"compact",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Product"}),(0,s.jsx)("th",{children:"Top Issue"}),(0,s.jsx)("th",{children:"Fatal Calls"}),(0,s.jsx)("th",{children:"Calls"})]})}),(0,s.jsx)("tbody",{children:o.length?o.map(e=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"mono",children:e.product}),(0,s.jsx)("td",{children:e.topIssue}),(0,s.jsx)("td",{className:"mono",children:e.fatalEvents}),(0,s.jsx)("td",{className:"mono",children:e.calls})]},e.product)):(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:4,children:"No product data for current filters."})})})]})})]})]})]})}},48587(e,a,l){l.r(a),l.d(a,{default:()=>r});var s=l(9950),t=l(82492),n=l(44414);function i(e){let{categories:a}=e;
1const l=Array.isArray(a)?a.filter(Boolean):[];return l.length?(0,n.jsx)("div",{className:"fatal-metric-chips",children:l.map((e,a)=>(0,n.jsx)("span",{className:"fatal-metric-chip",title:e,children:(0,t.metricInitials)(e)},`${e}-${a}`))}):(0,n.jsx)("span",{className:"small",children:"\u2014"})}function r(e){let{data:a,loading:l,onFilterEntity:r,onFilterAgent:c}=e;const[d,o]=(0,s.useState)(!1),h=(0,s.useMemo)(()=>{const e=[...(null===a||void 0===a?void 0:a.topAgents)||[]];return e.sort((e,a)=>(d?e.fatalCount-a.fatalCount:a.fatalCount-e.fatalCount)||e.name.localeCompare(a.name)),e},[null===a||void 0===a?void 0:a.topAgents,d]);if(l&&!a)return(0,n.jsx)("section",{className:"section-card",id:"fatalCommand",children:(0,n.jsx)("div",{className:"section-title",children:"Fatal Compliance Command Center"})});const{totalFatalCalls:m=0,totalFatalEvents:u=0,totalCalls:x=0,topFatalCategory:j,topFatalAgency:p,categories:v=[],entities:g=[],drillDown:b=[]}=a||{};return(0,n.jsxs)("section",{className:"section-card",id:"fatalCommand",children:[(0,n.jsx)("div",{className:"section-head",children:(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"section-title",children:"Fatal Compliance Command Center"}),(0,n.jsx)("div",{className:"section-sub",children:"Turns fatal breaches into category, entity, agent, and call-level evidence queues."})]})}),(0,n.jsxs)("div",{className:"grid-3",style:{marginBottom:14},children:[(0,n.jsxs)("div",{className:"mbox mbox-danger",children:[(0,n.jsx)("div",{className:"mbox-title",children:"Total Fatal Calls"}),(0,n.jsx)("div",{className:"mbox-big score-bad",children:m}),(0,n.jsxs)("div",{className:"mbox-sub",children:[u," fatal events across ",x," calls"]})]}),(0,n.jsxs)("div",{className:"mbox",children:[(0,n.jsx)("div",{className:"mbox-title",children:"Top Fatal Category"}),(0,n.jsx)("div",{className:"mbox-big",children:(null===j||void 0===j?void 0:j.name)||"\u2014"}),(0,n.jsx)("div",{className:"mbox-sub",children:j?`${(0,t.fmtPct)(j.contributionPct)} contribution`:"No fatal events"})]}),(0,n.jsxs)("div",{className:"mbox",children:[(0,n.jsx)("div",{className:"mbox-title",children:"Agency Contributing Most Fatals"}),(0,n.jsx)("div",{className:"mbox-big score-bad",children:(null===p||void 0===p?void 0:p.name)||"\u2014"}),(0,n.jsx)("div",{className:"mbox-sub",children:p?`${p.fatalCalls} fatal calls`:"\u2014"})]})]}),(0,n.jsxs)("div",{className:"grid-2",style:{marginBottom:14},children:[(0,n.jsxs)("div",{className:"mbox",children:[(0,n.jsx)("div",{className:"mbox-title",children:"Fatal Category Dashboard"}),v.length?v.map(e=>(0,n.jsxs)("div",{className:"fatal-bar-row",children:[(0,n.jsx)("span",{children:e.name}),(0,n.jsx)("b",{className:"mono score-bad",children:(0,t.fmtPct)(e.contributionPct)}),(0,n.jsx)("div",{className:"bar",style:{gridColumn:"1 / -1"},children:(0,n.jsx)("div",{className:"fill fill-red",style:{width:`${e.contributionPct}%`}})})]},e.name)):(0,n.jsx)("div",{className:"small",children:"No fatal events."})]}),(0,n.jsxs)("div",{className:"mbox",children:[(0,n.jsx)("div",{className:"mbox-title",children:"Fatal by Agency"}),(0,n.jsx)("div",{className:"small",style:{marginBottom:8},children:"Sorted by fatal call count."}),(0,n.jsx)("div",{className:"tbl-wrap tbl-wrap-scroll",children:(0,n.jsxs)("table",{className:"compact",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{children:"Agency"}),(0,n.jsx)("th",{children:"Fatal Calls"}),(0,n.jsx)("th",{children:"Fatal %"})]})}),(0,n.jsx)("tbody",{children:g.length?g.map(e=>(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{children:r?(0,n.jsx)("button",{type:"button",className:"call-link",onClick:()=>r(e.name),children:e.name}):e.name}),(0,n.jsx)("td",{className:"mono",children:e.fatalCalls}),(0,n.jsx)("td",{children:(0,n.jsx)("span",{className:"pill "+(e.fatalPct>5?"pill-red":"pill-green"),children:(0,t.fmtPct)(e.fatalPct)})})]},e.name)):(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:3,children:"No agency data for current filters."})})})]})})]})]}),(0,n.jsxs)("div",{className:"grid-2",children:[(0,n.jsxs)("div",{className:"mbox",children:[(0,n.jsxs)("div",{className:"mbox-title mbox-title-row",children:[(0,n.jsxs)("span",{children:["Top 10 Fatal C
1ontributors ",(0,n.jsx)("span",{className:"small",children:"\xb7 sorted by fatal count"})]}),(0,n.jsx)("span",{className:"mbox-actions",children:(0,n.jsxs)("button",{type:"button",className:"btn",onClick:()=>o(e=>!e),children:["Sort ",d?"\u2191":"\u2193"]})})]}),(0,n.jsx)("div",{className:"tbl-wrap tbl-wrap-scroll",children:(0,n.jsxs)("table",{className:"compact",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{children:"Agent"}),(0,n.jsx)("th",{children:"Agency / CC"}),(0,n.jsx)("th",{children:"Fatal Count"}),(0,n.jsx)("th",{children:"Primary Root Cause"})]})}),(0,n.jsx)("tbody",{children:h.map(e=>(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{children:c?(0,n.jsx)("button",{type:"button",className:"call-link",onClick:()=>c(e.name),children:e.name}):e.name}),(0,n.jsx)("td",{className:"small",children:e.entity}),(0,n.jsx)("td",{children:(0,n.jsx)("span",{className:"pill pill-red mono",children:e.fatalCount})}),(0,n.jsx)("td",{className:"small",children:e.primaryRootCause})]},e.name))})]})})]}),(0,n.jsxs)("div",{className:"mbox",children:[(0,n.jsx)("div",{className:"mbox-title",children:"Fatal Call Drill-down"}),(0,n.jsx)("div",{className:"tbl-wrap tbl-wrap-scroll",children:(0,n.jsxs)("table",{className:"compact",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{children:"Date"}),(0,n.jsx)("th",{children:"Fatal Categories"}),(0,n.jsx)("th",{children:"Agent"}),(0,n.jsx)("th",{children:"Agency"}),(0,n.jsx)("th",{children:"Evidence"})]})}),(0,n.jsx)("tbody",{children:b.length?b.map((e,a)=>(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"small",children:e.date}),(0,n.jsx)("td",{children:(0,n.jsx)(i,{categories:e.categories||(e.category?[e.category]:[])})}),(0,n.jsx)("td",{children:c?(0,n.jsx)("button",{type:"button",className:"call-link",onClick:()=>c(e.agentName),children:e.agentName}):e.agentName}),(0,n.jsx)("td",{children:r?(0,n.jsx)("button",{type:"button",className:"call-link",onClick:()=>r(e.agency),children:e.agency}):e.agency}),(0,n.jsx)("td",{children:e.recordingLink?(0,n.jsx)("a",{className:"call-link",href:e.recordingLink,target:"_blank",rel:"noreferrer",children:"Open \u2197"}):"\u2014"})]},`${e.callId||"call"}-${a}`)):(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:5,children:"No fatal calls in current filter."})})})]})})]})]})]})}},61838(e,a,l){l.r(a),l.d(a,{default:()=>d});var s=l(9950),t=l(81402),n=l(82290),i=l(13911),r=l(44414);const c=600;function d(e){let{dateRange:a,onDateRangeChange:l,dateRangeError:d,durationRange:o,onDurationRangeChange:h,agency:m,onAgencyChange:u,agencyOptions:x,product:j,onProductChange:p,productOptions:v,onApply:g,onReset:b,applying:y}=e;const f=(0,s.useMemo)(()=>{const[e,l]=Array.isArray(a)?a:[],s=e=>{if(!e)return null;const a=new Date(e);return(0,i.isValid)(a)?(0,i.format)(a,"dd MMM yyyy"):null},t=s(e),n=s(l);return t&&n?`${t} - ${n}`:t?`${t} - \u2026`:n?`\u2026 - ${n}`:""},[a]);return(0,r.jsx)(t.Paper,{elevation:0,sx:{p:3,mb:2,borderRadius:3,border:"1px solid #E8ECF5",backgroundColor:"#fff",overflow:"hidden",boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.08)"},children:(0,r.jsxs)(t.Stack,{spacing:3,children:[(0,r.jsxs)(t.Grid,{container:!0,spacing:2,alignItems:"stretch",children:[(0,r.jsx)(t.Grid,{item:!0,xs:12,sm:6,lg:3,children:(0,r.jsxs)(t.Box,{sx:{height:"100%"},children:[(0,r.jsx)(t.Typography,{variant:"caption",sx:{color:"#6F7D96",fontWeight:600,mb:1,display:"block"},children:"Date Range"}),(0,r.jsx)(n.DateRangePicker,{value:a,disableFuture:!0,onChange:e=>{if(!Array.isArray(e))return;const[a,s]=e;if(a&&s){if(Math.abs((0,i.differenceInCalendarDays)(new Date(s),new Date(a)))>31)return void l(e,"Please select a date range of 31 days or less.")}l(e,null)},renderInput:(e,a)=>{const l={...e,inputProps:{...e.inputProps,value:f,placeholder:"Select date range",readOnly:!0}};return(0,r.jsxs)(t.Box,{sx:{width:"100%"},children:[(0,r.jsx)(t.TextField,{size:"small",fullWidth:!0,...l}),(0,r.jsx)(t.TextField,{size:"small",...a,sx:{display:"none"}})]})}}),d&&(0,r.jsx)(t.Typography,{variant:"caption",color:"error",sx:{display:"block",mt:.5},children:d})]})}),(0,r.jsx)(t.Grid,{item:!0,xs:12,sm:6,lg:3,children:(0,r.jsxs)(t.Box,{sx:{height:"100%"},children:[(0,r.jsx)(t.Typography,{variant:"caption",sx:{color:"#6F7D96",fontWeight:600,mb:1,display:"block"},children:"Call Duration (seconds)"}),(0,r.jsx)(t.Box,{sx:{px:1,pt:.5},children:(0,r.jsx)(t.Slider,{value:o,onChange:(e,a)=>{Array.isArray(a)&&2===a.length&&h(a)},valueLabelDisplay:"auto",valueLabelFormat:e=>`${e}s`,min:0,max:c,step:5,marks:[{value:0,label:"0s"},{value:c,label:"600s+"}],"aria-label":"Call duration range"})})]})}),(0,r.jsx)(t.Grid,{item:!0,xs:12,sm:6,lg:3,children:(0,r.jsxs)(t.Box,{sx:{height:"100%"},children:[(0,r.jsx)(t.Typography,{variant:"caption",sx:{color:"#6F7D96",fontWeight:600,mb:1,display:"block"},children:"Agency"}),(0,r.jsx)(t.FormControl,{size:"small",fullWidth:!0,children:(0,r.jsxs)(t.Select,{value:m,onChange:e=>u(e.target.value),displayEmpty:!0,inputProps:{"aria-label":"Agency"},children:[(0,r.jsx)(t.MenuItem,{value:"",children:"All Agencies"}),(x||[]).map(e=>(0,r.jsx)(t.MenuItem,{value:e,children:e},e))]})})]})}),(0,r.jsx)(t.Grid,{item:!0,xs:12,sm:6,lg:3,children:(0,r.jsxs)(t.Box,{sx:{height:"100%"},children:[(0,r.jsx)(t.Typography,{variant:"caption",sx:{color:"#6F7D96",fontWeight:600,mb:1,display:"block"},children:"Product"}),(0,r.jsx)(t.FormControl,{size:"small",fullWidth:!0,children:(0,r.jsxs)(t.Select,{value:j,onChange:e=>p(e.target.value),displayEmpty:!0,inputProps:{"aria-label":"Product"},children:[(0,r.jsx)(t.MenuItem,{value:"",children:"All Products"}),(v||[]).map(e=>(0,r.jsx)(t.MenuItem,{value:e,children:e},e))]})})]})})]}),(0,r.jsxs)(t.Stack,{direction:"row",spacing:2,justifyContent:"flex-end",children:[(0,r.jsx)(t.Button,{variant:"outlined",onClick:b,children:"Clear Filters"}),(0,r.jsx)(t.Button,{variant:"contained",onClick:g,disabled:y||!!d,children:y?"Loa
1ding...":"Apply Filters"})]})]})})}l.d(a,["DURATION_MAX_BOUND",0,c,"DURATION_MIN_BOUND",0,0])},47841(e,a,l){l.r(a),l.d(a,{default:()=>t});var s=l(44414);function t(e){let{data:a,loading:l}=e;if(l&&!a)return null;const t=(null===a||void 0===a?void 0:a.parameters)||[];return(0,s.jsxs)("section",{className:"section-card",id:"rootCause",children:[(0,s.jsx)("div",{className:"section-head",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"section-title",children:"Root Cause Intelligence"}),(0,s.jsx)("div",{className:"section-sub",children:"Product-wise issue breakdown reactive to all filters."})]})}),(0,s.jsxs)("div",{className:"mbox",children:[(0,s.jsx)("div",{className:"mbox-title",children:"Fatal vs Non-Fatal Parameters"}),(0,s.jsx)("div",{className:"tbl-wrap tbl-wrap-scroll",children:(0,s.jsxs)("table",{className:"compact",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Segment"}),(0,s.jsx)("th",{children:"Parameter"}),(0,s.jsx)("th",{children:"Volume"}),(0,s.jsx)("th",{children:"Score / Rate"}),(0,s.jsx)("th",{children:"Recommended Action"})]})}),(0,s.jsx)("tbody",{children:t.length?t.map(e=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:(0,s.jsx)("span",{className:"pill "+("Fatal"===e.segment?"pill-red":"pill-blue"),children:e.segment})}),(0,s.jsx)("td",{className:"small",children:e.name}),(0,s.jsx)("td",{className:"mono",children:e.volume}),(0,s.jsxs)("td",{className:"mono",children:[e.scoreRate,"%"]}),(0,s.jsx)("td",{className:"small",children:e.action})]},`${e.segment}-${e.name}`)):(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:5,children:"No parameter data for current filters."})})})]})})]})]})}},96724(e,a,l){l.r(a),l.d(a,{default:()=>n});var s=l(44414);const t=[{id:"execSnapshot",label:"Executive Snapshot",color:""},{id:"fatalCommand",label:"Fatal Compliance",color:"var(--red)"},{id:"rootCause",label:"Root Cause",color:"var(--amber)"},{id:"agencyPerformance",label:"Agency Tables",color:"var(--accent2)"}];function n(){return(0,s.jsx)("nav",{className:"section-nav",children:t.map(e=>(0,s.jsxs)("a",{className:"snav-link",href:`#${e.id}`,children:[(0,s.jsx)("span",{className:"snav-dot",style:e.color?{color:e.color}:void 0}),e.label]},e.id))})}},68106(e,a,l){l.r(a),l.d(a,{default:()=>n});var s=l(44414);const t=e=>null==e||Number.isNaN(Number(e))?"\u2014":`${Number(e).toFixed(1)}%`;function n(e){var a,l,n,i,r,c,d,o;let{data:h,loading:m}=e;const u=null!==(a=null===h||void 0===h?void 0:h.scoredCalls)&&void 0!==a?a:0,x=null!==(l=null!==(n=null===h||void 0===h?void 0:h.totalCalls)&&void 0!==n?n:null===h||void 0===h?void 0:h.callsAudited)&&void 0!==l?l:0,j=(null===h||void 0===h?void 0:h.callQualitySub)||`${u} out of ${x} calls`,p=h?[["Calls Audited",null!==(i=h.callsAudited)&&void 0!==i?i:"\u2014",h.callsAuditedSub||"in current filter"],["Call Quality",t(h.callQuality),j],["Fatal Calls",`${null!==(r=h.fatalCalls)&&void 0!==r?r:0} of ${null!==(c=h.totalCalls)&&void 0!==c?c:0}`,`${t(h.fatalRate)} fatal rate`],["Agencies",null!==(d=h.agenciesCount)&&void 0!==d?d:"\u2014",h.agenciesSub||"active in filter"],["Products",null!==(o=h.productsCount)&&void 0!==o?o:"\u2014",h.productsSub||"dynamic product filter"]]:[];return m?(0,s.jsx)("div",{className:"kpi-strip",children:[1,2,3,4,5].map(e=>(0,s.jsxs)("div",{className:"kpi-card",children:[(0,s.jsx)("div",{className:"kpi-label",children:"Loading\u2026"}),(0,s.jsx)("div",{className:"kpi-value",children:"\u2014"})]},e))}):(0,s.jsx)("div",{className:"kpi-strip",children:p.map(e=>{let[a,l,t]=e;return(0,s.jsxs)("div",{className:"kpi-card",children:[(0,s.jsx)("div",{className:"kpi-label",children:a}),(0,s.jsx)("div",{className:"kpi-value",children:l}),(0,s.jsx)("div",{className:"kpi-sub",children:t})]},a)})})}},96977(e,a,l){l.r(a),l.d(a,{default:()=>f});var s=l(9950),t=l(13911),n=l(81402),i=l(37487),r=l(44275),c=l(17698),d=l(36666),o=l(61838),h=l(68106),m=l(96724),u=l(96216),x=l(48587),j=l(47841),p=l(59637),v=l(78179),g=(l(72973),l(44414));const b=e=>{if(!e)return"";const a=new Date(e);return(0,t.isValid)(a)?(0,t.format)(a,"yyyy-MM-dd"):""},y=(e,a,l,s)=>{const[t,n]=Array.isArray(e)?e:[],[i,r]=Array.isArray(a)?a:[o.DURATION_MIN_BOUND,o.DURATION_MAX_BOUND],c=i>o.DURATION_MIN_BOUND||r<o.DURATION_MAX_BOUND;return{start_date:b(t),end_date:b(n),duration:c?{min:i>o.DURATION_MIN_BOUND?i:null,max:r<o.DURATION_MAX_BOUND?r:null}:null,agency:l||"",product:s||""}};function f(){const[e]=(0,i.useValue)(),a=(null===e||void 0===e?void 0:e.cookie)||{},l=(0,r.resolvePaytmCollectionsOrgId)(a,window.location.pathname),b=(0,s.useMemo)(()=>new Date,[]),f=(0,s.useMemo)(()=>(0,t.subDays)(b,6),[b]),N=(0,s.useMemo)(()=>y([f,b],[o.DURATION_MIN_BOUND,o.DURATION_MAX_BOUND],"",""),[f,b]),[C,A]=(0,s.use
1State)("agency"),[F,P]=(0,s.useState)([f,b]),[D,k]=(0,s.useState)([o.DURATION_MIN_BOUND,o.DURATION_MAX_BOUND]),[w,S]=(0,s.useState)(""),[R,I]=(0,s.useState)(""),[T,_]=(0,s.useState)(null),[M,O]=(0,s.useState)(N),[B,$]=(0,s.useState)(null),[U,E]=(0,s.useState)({agencies:[],products:[]}),[Q,z]=(0,s.useState)(!1),[L,W]=(0,s.useState)(null),[V,q]=(0,s.useState)(""),H=(0,s.useCallback)(e=>({company:l,start_date:e.start_date,end_date:e.end_date,...e.duration&&{duration:e.duration},...e.agency&&{agency:e.agency},...e.product&&{product:e.product}}),[l]),X=(0,s.useCallback)(async e=>{if(l&&e.start_date&&e.end_date){z(!0),W(null);try{const a=await(0,c.fetchPaytmCollectionsSummary)(H(e));$(a)}catch(a){console.error("Paytm collections dashboard load failed",a),W("Unable to load dashboard data. Please try again.")}finally{z(!1)}}},[l,H]);(0,s.useEffect)(()=>{X(M)},[l,M,X]),(0,s.useEffect)(()=>{let e=!0;if(l)return(0,c.fetchPaytmCollectionsFilterOptions)(l).then(a=>{e&&E({agencies:(null===a||void 0===a?void 0:a.agencies)||[],products:(null===a||void 0===a?void 0:a.products)||[]})}).catch(a=>{console.error("Paytm collections filter options load failed",a),e&&E({agencies:[],products:[]})}),()=>{e=!1}},[l]);const G=(0,s.useMemo)(()=>{var e;if(null===B||void 0===B||!B.fatalCompliance)return null;const a=V?(B.fatalCompliance.drillDown||[]).filter(e=>e.agentName===V):B.fatalCompliance.drillDown;return{...B.fatalCompliance,totalCalls:null===(e=B.summaryKpis)||void 0===e?void 0:e.totalCalls,drillDown:a}},[B,V]);return(0,g.jsxs)("div",{className:"paytm-collections-dashboard",children:[(0,g.jsx)(d.default,{activeTab:C,onTabChange:A,company:l}),(0,g.jsx)(o.default,{dateRange:F,onDateRangeChange:(e,a)=>{P(e),_(a)},dateRangeError:T,durationRange:D,onDurationRangeChange:k,agency:w,onAgencyChange:S,agencyOptions:U.agencies,product:R,onProductChange:I,productOptions:U.products,onApply:()=>{T||(q(""),O(y(F,D,w,R)))},onReset:()=>{q(""),P([f,b]),k([o.DURATION_MIN_BOUND,o.DURATION_MAX_BOUND]),S(""),I(""),_(null),O(N)},applying:Q}),L&&(0,g.jsx)(n.Alert,{severity:"error",sx:{mb:2},children:L}),"agency"===C&&(0,g.jsx)(g.Fragment,{children:Q&&!B?(0,g.jsx)("div",{className:"loading-overlay",children:(0,g.jsx)(n.CircularProgress,{size:36})}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(h.default,{data:null===B||void 0===B?void 0:B.summaryKpis,loading:Q}),(0,g.jsx)(m.default,{}),(0,g.jsx)(u.default,{data:null===B||void 0===B?void 0:B.executiveSnapshot,loading:Q,entityLabel:(null===B||void 0===B?void 0:B.entityLabel)||"Agency"}),(0,g.jsx)(x.default,{data:G,loading:Q,onFilterAgent:e=>{q(e),A("agency"),setTimeout(()=>{var e;null===(e=document.getElementById("drillTable"))||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"})},50)}}),(0,g.jsx)(j.default,{data:null===B||void 0===B?void 0:B.rootCause,loading:Q}),(0,g.jsx)(p.default,{data:null===B||void 0===B?void 0:B.agencyPerformance,loading:Q})]})}),"coaching"===C&&(0,g.jsx)(g.Fragment,{children:Q&&!B?(0,g.jsx)("div",{className:"loading-overlay",children:(0,g.jsx)(n.CircularProgress,{size:36})}):(0,g.jsx)(v.default,{data:null===B||void 0===B?void 0:B.coaching,loading:Q})})]})}},17698(e,a,l){l.r(a),l.d(a,{fetchPaytmCollectionsFilterOptions:()=>i,fetchPaytmCollectionsSummary:()=>r,sendPaytmCollectionsMailReport:()=>c});var s=l(96011),t=l.n(s);const n="https://api-aks.goodmeetings.ai/v2/analytics-dashboard/paytm-collections";async function i(e){var a;const{data:l}=await t().post(`${n}
1/filter-options`,{company:e});return null!==(a=null===l||void 0===l?void 0:l.data)&&void 0!==a?a:l}async function r(e){var a;const{data:l}=await t().post(`${n}/summary`,e);return null!==(a=null===l||void 0===l?void 0:l.data)&&void 0!==a?a:l}async function c(e){let{company:a,start_date:l,end_date:s,emails:i}=e;const{data:r}=await t().post(`${n}/mail-report`,{company:a,start_date:l,end_date:s,emails:i});return r}},82492(e,a,l){l.r(a),l.d(a,{PriorityPill:()=>t});var s=l(44414);function t(e){let{level:a}=e;const l="Critical"===a?"pill-red":"Watch"===a?"pill-amber":"pill-green";return(0,s.jsx)("span",{className:`pill ${l}`,children:a})}l.d(a,["fmtPct",0,function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return`${Number(e||0).toFixed(a)}%`},"metricInitials",0,e=>{const a=String(e||"").split(/[\s/\xb7,\-\u2013\u2014]+/).map(e=>e.trim()).filter(e=>e&&!/^(and|or|of|the|a|an|to|without|with)$/i.test(e));return a.length?1===a.length?a[0].slice(0,3).toUpperCase():a.map(e=>e[0]).join("").slice(0,4).toUpperCase():"?"},"scoreCls",0,e=>{const a=Number(e||0);return a>=85?"score-good":a>=75?"score-mid":"score-bad"}])},23016(e,a,l){var s=l(24994);Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var t=s(l(79526)),n=l(44414);a.default=(0,t.default)((0,n.jsx)("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday")},72973(e,a,l){l.r(a);l.d(a,["default",0,{}])}}]);

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.