PageSourceSearch

https://www.elevolt.co.ke/_next/static/chunks/pages/hr/[tenant]/payroll/compliance-28df461ed4b6fac7.js

js elevolt.co.ke collected 2026-10-04 21:47:56 UTC 54,786 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="551fe087-8faf-42bc-ac98-bd3f4321a6e5",e._sentryDebugIdIdentifier="sentry-dbid-551fe087-8faf-42bc-ac98-bd3f4321a6e5")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3945],{14970:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/hr/[tenant]/payroll/compliance",function(){return a(21422)}])},58122:function(e,t,a){"use strict";a.d(t,{u:function(){return s}});var r=a(34406);let s=()=>"true"===r.env.NEXT_PUBLIC_ENABLE_PAYROLL},76974:function(e,t,a){"use strict";var r=a(52322),s=a(5632),n=a(2784),i=a(58122);t.Z=e=>{let t=t=>{let a=(0,s.useRouter)();return((0,n.useEffect)(()=>{(0,i.u)()||a.replace("/hr/".concat(t.tenantName))},[a,t.tenantName]),(0,i.u)())?(0,r.jsx)(e,{...t}):null};return t.getInitialProps=e.getInitialProps,t}},21422:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return M}});var r=a(52322),s=a(47023),n=a(65232),i=a(1973),l=a(63798),o=a(77590),d=a(28385),c=a(23825),m=a(75588),p=a(42399),g=a(79663),u=a(65405),x=a(51634),h=a(76467),f=a(84475),b=a(64792),v=a(59417),y=a(99603),j=a(36160),N=a.n(j),w=a(13980),k=a.n(w),P=a(2784),C=a(62202),Z=a(39097),L=a.n(Z);let _=e=>({KRA:{name:"Kenya Revenue Authority",short:"KRA",description:"Employer PIN for PAYE remittance"},NHIF:{name:"National Hospital Insurance Fund",short:"NHIF",description:"Employer code for health insurance"},NSSF:{name:"National Social Security Fund",short:"NSSF",description:"Employer code for pension contributions"},HLC:{name:"Housing Levy Commissioner",short:"Housing Levy",description:"Housing levy employer registration"},HOUSING_LEVY:{name:"Housing Levy Commissioner",short:"Housing Levy",description:"Housing levy employer registration"}})[e]||{name:e,short:e,description:""},S=e=>{let{obligation:t}=e,a=t.is_registered,s=_(t.authority);return(0,r.jsx)("div",{className:"p-3 rounded-lg border bg-white",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)(y.G,{className:"mt-0.5 ".concat(a?"text-green-500":"text-red-500"),icon:a?v.f8k:v.RLE}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,r.jsx)(h.Z,{className:a?"text-green-800":"text-red-800",variant:"labelValue",children:s.short}),(0,r.jsx)("span",{className:"px-2 py-0.5 rounded text-xs font-medium ".concat(a?"bg-green-200 text-green-800":"bg-red-200 text-red-800"),children:a?"Registered":"Not Registered"})]}),(0,r.jsx)(h.Z,{className:"block mt-1 ".concat(a?"text-green-600":"text-red-600"),variant:"caption",children:s.description}),!!(a&&t.registration_number)&&(0,r.jsx)(h.Z,{className:"block mt-1 font-mono text-green-700",variant:"caption",children:t.registration_number})]})]})})};S.propTypes={obligation:k().shape({authority:k().string.isRequired,is_registered:k().bool,registration_number:k().string}).isRequired};let E=e=>{let{percentage:t}=e,a=2*Math.PI*40,s=100===t?{stroke:"#22c55e",bg:"#dcfce7"}:t>=75?{stroke:"#eab308",bg:"#fef9c3"}:t>=50?{stroke:"#f97316",bg:"#ffedd5"}:{stroke:"#ef4444",bg:"#fee2e2"};return(0,r.jsxs)("div",{className:"relative w-24 h-24",children:[(0,r.jsxs)("svg",{className:"w-24 h-24 transform -rotate-90",viewBox:"0 0 100 100",children:[(0,r.jsx)("circle",{className:"text-gray-200",cx:"50",cy:"50",fill:s.bg,r:40,stroke:"currentColor",strokeWidth:"8"}),(0,r.jsx)("circle",{cx:"50",cy:"50",fill:"transparent",r:40,stroke:s.stroke,strokeDasharray:a,strokeDashoffset:a-t/100*a,strokeLinecap:"round",strokeWidth:"8",style:{transition:"stroke-dashoffset 0.5s ease"}})]}),(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,r.jsxs)(h.Z,{className:"text-lg font-bold",variant:"stat",children:[t,"%"]})})]})};E.propTypes={percentage:k().number.isRequired};let R=e=>{let{obligationsData:t,isLoading:a,error:l,tenantName:o,showSettingsLink:d=!0}=e,c=(0,P.useMemo)(()=>{let e=(null==t?void 0:t.employer_obligations)||(null==t?void 0:t.obligations)||[];return Array.isArray(e)?e:[]},[t]),m=(0,P.useMemo)(()=>
1{if(0===c.length)return{registered:0,total:0,percentage:0};let e=c.filter(e=>e.is_registered).length,t=c.length;return{registered:e,total:t,percentage:Math.round(e/t*100)}},[c]);return a||l?(0,r.jsxs)(n.ZP,{children:[(0,r.jsx)(n.Ol,{children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(y.G,{className:"text-blue",icon:v.P88}),(0,r.jsx)(h.Z,{variant:"sectionHeader",children:"Employer Registrations"})]})}),(0,r.jsx)(n.eW,{children:(0,r.jsx)(i.Z,{description:l?"Please try refreshing the page.":"Loading registration status...",design:"wrapped",isError:!!l,isLoading:a,message:l?"Failed to load":"Loading..."})})]}):0===c.length?(0,r.jsxs)(n.ZP,{children:[(0,r.jsx)(n.Ol,{children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(y.G,{className:"text-blue",icon:v.P88}),(0,r.jsx)(h.Z,{variant:"sectionHeader",children:"Employer Registrations"})]})}),(0,r.jsx)(n.eW,{children:(0,r.jsx)(i.Z,{action:d&&o?(0,r.jsx)(L(),{href:"/hr/".concat(o,"/settings/statutory-registrations"),children:(0,r.jsxs)(s.Z,{outline:!0,size:"sm",children:[(0,r.jsx)(y.G,{className:"mr-2",icon:v.b7W}),"Configure Registrations"]})}):null,description:"Configure your statutory registrations to enable payroll compliance.",design:"wrapped",message:"No registrations configured"})})]}):(0,r.jsxs)(n.ZP,{children:[(0,r.jsx)(n.Ol,{children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(y.G,{className:"text-blue",icon:v.P88}),(0,r.jsx)(h.Z,{variant:"sectionHeader",children:"Employer Registrations"})]}),!!(d&&o)&&(0,r.jsx)(L(),{href:"/hr/".concat(o,"/settings/statutory-registrations"),children:(0,r.jsxs)(s.Z,{outline:!0,size:"sm",children:[(0,r.jsx)(y.G,{className:"mr-2",icon:v.b7W}),"Manage"]})})]})}),(0,r.jsxs)(n.eW,{children:[(0,r.jsxs)("div",{className:"flex flex-col lg:flex-row gap-6",children:[(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center lg:pr-6 lg:border-r border-gray-200",children:[(0,r.jsx)(E,{percentage:m.percentage}),(0,r.jsxs)(h.Z,{className:"mt-2 text-center",variant:"caption",children:[m.registered," of ",m.total," registered"]})]}),(0,r.jsx)("div",{className:"flex-1 grid grid-cols-1 md:grid-cols-2 gap-3",children:c.map(e=>(0,r.jsx)(S,{obligation:e},e.authority))})]}),m.percentage<100&&(0,r.jsx)("div",{className:"mt-4 p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,r.jsxs)("div",{className:"flex items-start gap-2",children:[(0,r.jsx)(y.G,{className:"text-yellow-600 mt-0.5",icon:v.RLE}),(0,r.jsx)(h.Z,{className:"text-yellow-700",variant:"caption",children:"Complete all statutory registrations to ensure full payroll compliance and avoid issues with remittance filings."})]})})]})]})};R.propTypes={obligationsData:k().shape({employer_obligations:k().array,obligations:k().array}),isLoading:k().bool,error:k().object,tenantName:k().string,showSettingsLink:k().bool},R.defaultProps={obligationsData:null,isLoading:!1,error:null,tenantName:"",showSettingsLink:!0};var A=a(79337),O=a(76974);let T=e=>{let{violation:t}=e,a=(t.minimum_wage||0)-(t.current_wage||0);return(0,r.jsxs)("div",{className:"p-4 border border-red-200 bg-red-50 rounded-lg",children:[(0,r.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-3",children:[(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("div",{className:"w-10 h-10 rounded-full bg-red-100 flex items-center justify-center flex-shrink-0",children:(0,r.jsx)(y.G,{className:"text-red-500",icon:v.ILF})}),(0,r.jsxs)("div",{children:[(0,r.jsx)(h.Z,{className:"text-red-800",variant:"labelValue",children:t.employee_name||t.name}),!!t.employee_number&&(0,r.jsxs)(h.Z,{className:"block text-red-600",variant:"caption",children:["#",t.employee_number]}),!!(t.department||t.location)&&(0,r.jsx)(h.Z,{className:"block text-red-500",variant:"caption",children:[t.department,t.location].filter(Boolean).join(" - ")})]})]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-4 md:text-right",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(h.Z,{className:"block text-red-600",variant:"caption",children:"Current Wage"}),(0,r.jsx)(h.Z,{className:"text-red-700 font-medium",variant:"labelValue",children:(0,b.x)(t.current_wage||0)})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(h.Z,{className:"block text-red-600",variant:"caption",children:"Minimum Required"}),(0,r.jsx)(h.Z,{className:"text-red-800 font-semibold",variant:"labelValue",children:(0,b.x)(t.minimum_wage||0)})]}),(0,r.jsxs)("div",{className:"px-3 py-1.5 bg-red-200 rounded",children:[(0,r.jsx)(h.Z,{className:"block text-red-600 text-xs",variant:"caption",children:"Shortfall"}),(0,r.jsx)(h.Z,{className:"text-red-800 font-bold",variant:"labelValue",children:(0,b.x)(a)})]})]})]}
1),!!(t.wage_type||t.sector)&&(0,r.jsxs)("div",{className:"mt-3 pt-3 border-t border-red-200 flex flex-wrap gap-2",children:[!!t.wage_type&&(0,r.jsx)("span",{className:"px-2 py-0.5 bg-red-100 text-red-700 rounded text-xs",children:t.wage_type}),!!t.sector&&(0,r.jsx)("span",{className:"px-2 py-0.5 bg-red-100 text-red-700 rounded text-xs",children:t.sector})]})]})};T.propTypes={violation:k().shape({employee_name:k().string,name:k().string,employee_number:k().string,department:k().string,location:k().string,current_wage:k().number,minimum_wage:k().number,wage_type:k().string,sector:k().string}).isRequired};let D=()=>(0,r.jsxs)("div",{className:"p-6 text-center bg-green-50 border border-green-200 rounded-lg",children:[(0,r.jsx)(y.G,{className:"text-green-500 mb-3",icon:v.f8k,size:"2x"}),(0,r.jsx)(h.Z,{className:"block text-green-800",variant:"labelValue",children:"No Minimum Wage Violations"}),(0,r.jsx)(h.Z,{className:"block mt-1 text-green-600",variant:"caption",children:"All employees meet or exceed the applicable minimum wage requirements."})]}),I=e=>{let{violationsData:t,isLoading:a,error:s}=e,[o,d]=(0,P.useState)(""),[c,m]=(0,P.useState)(""),p=(0,P.useMemo)(()=>{let e=(null==t?void 0:t.minimum_wage_violations)||(null==t?void 0:t.violations)||[];return Array.isArray(e)?e:[]},[t]),g=(0,P.useMemo)(()=>{let e=new Set,t=new Set;return p.forEach(a=>{a.department&&e.add(a.department),a.location&&t.add(a.location)}),{departments:Array.from(e).sort(),locations:Array.from(t).sort()}},[p]),u=(0,P.useMemo)(()=>p.filter(e=>(!o||e.department===o)&&(!c||e.location===c)),[p,o,c]),x=(0,P.useMemo)(()=>{let e=0;return u.forEach(t=>{let a=(t.minimum_wage||0)-(t.current_wage||0);e+=a>0?a:0}),{count:u.length,totalShortfall:e}},[u]);return a||s?(0,r.jsxs)(n.ZP,{children:[(0,r.jsx)(n.Ol,{children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(y.G,{className:"text-yellow-600",icon:v.eHv}),(0,r.jsx)(h.Z,{variant:"sectionHeader",children:"Minimum Wage Check"})]})}),(0,r.jsx)(n.eW,{children:(0,r.jsx)(i.Z,{description:s?"Please try refreshing the page.":"Checking minimum wage compliance...",design:"wrapped",isError:!!s,isLoading:a,message:s?"Failed to load":"Loading..."})})]}):0===p.length?(0,r.jsxs)(n.ZP,{children:[(0,r.jsx)(n.Ol,{children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(y.G,{className:"text-green-500",icon:v.f8k}),(0,r.jsx)(h.Z,{variant:"sectionHeader",children:"Minimum Wage Check"})]})}),(0,r.jsx)(n.eW,{children:(0,r.jsx)(D,{})})]}):(0,r.jsxs)(n.ZP,{children:[(0,r.jsx)(n.Ol,{children:(0,r.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(y.G,{className:"text-red-500",icon:v.eHv}),(0,r.jsx)(h.Z,{variant:"sectionHeader",children:"Minimum Wage Violations"}),(0,r.jsx)("span",{className:"px-2 py-0.5 bg-red-100 text-red-800 rounded text-sm font-medium",children:p.length})]})})}),(0,r.jsxs)(n.eW,{children:[(0,r.jsx)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg mb-6",children:(0,r.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)(h.Z,{className:"text-red-800",variant:"labelValue",children:[x.count," Employee",1!==x.count?"s":""," Below Minimum Wage"]}),(0,r.jsx)(h.Z,{className:"block text-red-600",variant:"caption",children:"These employees require salary adjustments to meet compliance."})]}),(0,r.jsxs)("div",{className:"text-right",children:[(0,r.jsx)(h.Z,{className:"block text-red-600",variant:"caption",children:"Total Monthly Shortfall"}),(0,r.jsx)(h.Z,{className:"text-red-800 text-xl font-bold",variant:"stat",children:(0,b.x)(x.totalShortfall)})]})]})}),!!(g.departments.length>0||g.locations.length>0)&&(0,r.jsxs)("div",{className:"flex flex-wrap gap-4 mb-6",children:[g.departments.length>0&&(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(h.Z,{variant:"label",children:"Department:"}),(0,r.jsx)(l.P,{defaultOption:"All",name:"department",onChange:e=>d(e.target.value),options:g.departments.map(e=>({value:e,label:e})),selected:o})]}),g.locations.length>0&&(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(h.Z,{variant:"label",children:"Location:"}),(0,r.jsx)(l.P,{defaultOption:"All",name:"location",onChange:e=>m(e.target.value),options:g.locations.map(e=>({value:e,label:e})),selected:c})]})]}),(0,r.jsx)("div",{className:"space-y-3",children:u.map((e,t)=>(0,r.jsx)(T,{violation:e},e.id||e.employee_id||t))}),!!(0===u.length&&p.length>0)&&(0,r.jsx)("div",{className:"p-4",children:(0,r.jsx)(i.Z,{description:"No violations match the selected filters.",design:"wrapped",message:"No matching violations"})}),(0,r.jsx)("div",{className:"mt-6 p-4 bg-gray-50 rounded-lg border border-gray-200",children:(0,r.jsxs)(h.Z,{className:"block text-gray-600",variant:"caption",children:[(0,r.jsx)("span",{className:"font-medium",children:"Kenya Minimum Wage:"})," Minimum wage rates are set by the Ministry of Labour and vary by sector (general, agricultural, skilled workers). Employers must ensure all employees receive at least the applicable minimum wage. Non-compliance may result in penalties."]})})]})]})};I.propTypes={violationsData:k().shape({minimum_wage_violations:k().array,violations:k().array}),isLoading:k().bool,error:k().object},I.defaultProps={violationsData:null,isLoading:!1,error:null};let F=[{value:"Q1",label:"Q1 (Jan-Mar)"},{value:"Q2",label:"Q2 (Apr-Jun)"},{value:"Q3",label:"Q3 (Jul-Sep)"},{value:"Q4",label:"Q4 (Oct-Dec)"}],q=e=>{let{score:t}=e,a=2*Math.PI*50,s=t||0,i=s>=90?{stroke:"#22c55e",text:"text-green-600",label:"Excellent"}:s>=75?{stroke:"#eab308",text:"text-yellow-600",label:"Good"}:s>=50?{stroke:"#f97316",text:"text-orange-600",label:"Needs Attention"}:{stroke:"#ef4444",text:"text-red-600",label:"Critical"};return(0,r.jsx)(n.ZP,{children:(0,r.jsx)(n.eW,{children:(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsxs)("div",{className:"relative w-32 h-32",children:[(0,r.jsxs)("svg",{className:"w-32 h-32 transform -rotate-90",viewBox:"0 0 120 120",children:[(0,r.jsx)("circle",{cx:"60",cy:"60",fill:"transparent",r:50,stroke:"#e5e7eb",strokeWidth:"10"}),(0,r.jsx)("circle",{cx:"60",cy:"60",fill:"transparent",r:50,stroke:i.stroke,strokeDasharray:a,strokeDashoffset:a-s/100*a,strokeLinecap:"round",strokeWidth:"10",style:{transition:"stroke-dashoffset 0.5s ease"}})]}),(0,r.jsx)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:(0,r.jsxs)(h.Z,{className:i.text,variant:"statLarge",children:[s,"%"]})})]}),(0,r.jsx)(h.Z,{className:"mt-3",variant:"labelValue",children:"Compliance Score"}),(0,r.jsx)(h.Z,{className:"mt-1 ".concat(i.text),variant:"caption",children:i.label})]})})})};q.propTypes={score:k().number},q.defaultProps={score:0};let H=e=>{let{entry:t}=e;return(0,r.jsxs)("div",{className:"flex items-start gap-4 py-3 border-b border-gray-100 last:border-b-0",children:[(0,r.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center flex-shrink-0",children:(0,r.jsx)(y.G,{"aria-hidden":"true",className:"text-blue-600",icon:v.qO$,size:"sm"})}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)(h.Z,{className:"font-medium truncate",variant:"bodySmall",children:t.action}),(0,r.jsx)(h.Z,{className:"flex-shrink-0",variant:"caption",children:new Date(t.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})})]}),(0,r.jsxs)(h.Z,{className:"mt-1",variant:"caption",children:[t.user_name||"System"," ",t.description?"- ".concat(t.description):null]}),!!t.metadata&&(0,r.jsxs)(h.Z,{className:"mt-1 text-xs text-gray-400",variant:"caption",children:["Period: ",t.metadata.period_name||t.metadata.period_id]})]})]})};H.propTypes={entry:k().shape({action:k().string,created_at:k().string,user_name:k().string,description:k().string,metadata:k().object}).isRequired};let B=e=>{var t,a,f,j,w;let{tenantName:k}=e,[Z,L]=(0,P.useState)(0),[_,S]=(0,P.useState)(1),E=new Date().getFullYear(),[O,T]=(0,P.useState)(E),[D,B]=(0,P.useState)(function(){let e=new Date().getMonth();return e<3?"Q1":e<6?"Q2":e<9?"Q3":"Q4"}()),M=(0,P.useMemo)(()=>Array.from({length:5},(e,t)=>E-t+1),[E]),{data:z,isLoading:W,error:G}=(0,d.qY)(),Y=(null==z?void 0:z.data)||{},{data:U,isLoading:V,isFetching:Q,error:J}=(0,d.fA)({page:_,limit:10,enabled:4===Z}),K=(null==U?void 0:U.data)||[],X=(null==U?void 0:U.meta)||{},{data:$,isLoading:ee,isFetching:et,error:ea}=(0,d.b0)({year:O,quarter:D,enabled:1===Z}),er=(null==$?void 0:$.data)||{},{data:es,isLoading:en,error:ei}=(0,d.eS)(),{data:el,isLoading:eo,isFetching:ed,error:ec}=(0,d.tj)({year:O,enabled:2===Z}),em=(null==el?void 0:el.year_end_report)||el||{},{data:ep,isLoading:eg,error:eu}=(0,d.LM)({enabled:3===Z}),ex=(0,d.fk)({onSuccess:e=>{let t=window.URL.createObjectURL(new Blob([e])),a=document.createElement("a");a.href=t,a.setAttribute("download","compliance-report-".concat(O,"-").concat(D,".xlsx")),document.body.appendChild(a),a.click(),a.remove(),C.default.success("Report exported successfully")},onError:e=>{C.default.error((null==e?void 0:e.message)||"Failed to export report")}}),eh=e=>T(Number(e.target.value)),ef=(0,P.useCallback)(()=>{ex.mutate({type:"quarterly_tax",year:O,quarter:D,format:"xlsx"})},[ex,O,D]),eb=(0,P.useMemo)(()=>[{href:"/hr/".concat(k,"/payroll"),name:"Payroll",nodeType:"Link"},{href:"/hr/".concat(k,"/payroll/compliance"),name:"Compliance",nodeType:"Link"}],[k]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(A.Z,{title:"".concat((0,o.kC)((0,o.parseUnderScore)(k))," - Payroll Compliance")}),(0,r.jsx)(m.Z,{breadcrumbs:eb,description:"Stay on top of your statutory filings, their deadlines and the audit trail",tenantName:k,title:"Payroll Compliance"}),(0,r.jsxs)("main",{className:"container flex flex-col gap-4 mx-auto px-4 md:px-8 lg:px-12 pb-6",children:[!!(W||G)&&(0,r.jsx)("div",{className:"w-full flex flex-col bg-white p-4 rounded",children:(0,r.jsx)(i.Z,{description:G?"Please try refreshing the page.":"Loading compliance data...",design:"wrapped",isError:!!G,isLoading:W,message:G?"Failed to load compliance dashboard":"Loading..."})}),!!(!W&&!G)&&(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[(0,r.jsxs)("div",{className:"bg-white p-3 rounded-xl text-left border flex flex-col gap-2 md:gap-3",children:[(0,r.jsx)(h.Z,{variant:"bodySmall",weight:"font-semibold",children:"PAYE Status"}),(0,r.jsx)(h.Z,{size:"text-2xl",weight:"font-semibold",children:Y.paye_compliant?"Compliant":"Action Needed"}),(0,r.jsx)(h.Z,{variant:"caption",children:Y.paye_status_message||"All PAYE f
1ilings up to date"})]}),(0,r.jsxs)("div",{className:"bg-white p-3 rounded-xl text-left border flex flex-col gap-2 md:gap-3",children:[(0,r.jsx)(h.Z,{variant:"bodySmall",weight:"font-semibold",children:"NHIF Status"}),(0,r.jsx)(h.Z,{size:"text-2xl",weight:"font-semibold",children:Y.nhif_compliant?"Compliant":"Action Needed"}),(0,r.jsx)(h.Z,{variant:"caption",children:Y.nhif_status_message||"All NHIF contributions filed"})]}),(0,r.jsxs)("div",{className:"bg-white p-3 rounded-xl text-left border flex flex-col gap-2 md:gap-3",children:[(0,r.jsx)(h.Z,{variant:"bodySmall",weight:"font-semibold",children:"NSSF Status"}),(0,r.jsx)(h.Z,{size:"text-2xl",weight:"font-semibold",children:Y.nssf_compliant?"Compliant":"Action Needed"}),(0,r.jsx)(h.Z,{variant:"caption",children:Y.nssf_status_message||"All NSSF contributions filed"})]}),(0,r.jsxs)("div",{className:"bg-white p-3 rounded-xl text-left border flex flex-col gap-2 md:gap-3",children:[(0,r.jsx)(h.Z,{variant:"bodySmall",weight:"font-semibold",children:"Minimum Wage"}),(0,r.jsx)(h.Z,{size:"text-2xl",weight:"font-semibold",children:Y.minimum_wage_violations>0?"Violations":"Compliant"}),(0,r.jsxs)(h.Z,{variant:"caption",children:[Y.minimum_wage_violations||0," employees below minimum"]})]})]}),(0,r.jsx)("div",{children:(0,r.jsx)(R,{error:ei,isLoading:en,obligationsData:es,showSettingsLink:!0,tenantName:k})}),(0,r.jsx)(n.ZP,{children:(0,r.jsx)(n.eW,{padding:0,children:(0,r.jsxs)(g.ZP,{activeIndex:Z,onChange:e=>L(e),syncWithUrl:!1,children:[(0,r.jsx)(u.Z,{label:"Overview"}),(0,r.jsx)(u.Z,{label:"Tax Reports"}),(0,r.jsx)(u.Z,{label:"Year-End Report"}),(0,r.jsx)(u.Z,{label:"Minimum Wage"}),(0,r.jsx)(u.Z,{label:"Audit Trail"}),(0,r.jsx)(x.Z,{padding:4,children:!!(!W&&!G)&&(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsx)(q,{score:Y.compliance_score}),(0,r.jsxs)("div",{children:[(0,r.jsx)(h.Z,{className:"mb-3",variant:"sectionHeader",children:"Pending Compliance Items"}),!!N()(Y.pending_items)&&(0,r.jsx)("div",{className:"p-4 bg-green-50 border border-green-200 rounded-lg",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(y.G,{"aria-hidden":"true",className:"text-green-600",icon:v.f8k}),(0,r.jsx)(h.Z,{variant:"body",children:"All compliance items are up to date"})]})}),!N()(Y.pending_items)&&(0,r.jsx)("div",{className:"space-y-2",children:Y.pending_items.map(e=>(0,r.jsxs)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg flex items-center gap-3",children:[(0,r.jsx)(y.G,{"aria-hidden":"true",className:"text-yellow-600",icon:v.eHv}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)(h.Z,{className:"font-medium",variant:"bodySmall",children:e.title}),(0,r.jsx)(h.Z,{variant:"caption",children:e.description})]}),!!e.due_date&&(0,r.jsxs)(h.Z,{className:"text-yellow-700",variant:"caption",children:["Due: ",new Date(e.due_date).toLocaleDateString()]})]},"".concat(e.title,"-").concat(e.due_date)))})]}),!!(null===(t=Y.upcoming_deadlines)||void 0===t?void 0:t.length)&&(0,r.jsxs)("div",{children:[(0,r.jsx)(h.Z,{className:"mb-3",variant:"sectionHeader",children:"Upcoming Deadlines"}),(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:Y.upcoming_deadlines.map(e=>{var t;let a=(t=e.days_remaining)<=3?{container:"bg-red-50 border-red-200",text:"text-red-600"}:t<=7?{container:"bg-yellow-50 border-yellow-200",text:"text-yellow-600"}:{container:"bg-gray-50 border-gray-200",text:"text-gray-600"};return(0,r.jsxs)("div",{className:"p-4 rounded-lg border ".concat(a.container),children:[(0,r.jsx)(h.Z,{className:"font-medium",variant:"bodySmall",children:e.type}),(0,r.jsx)(h.Z,{className:"mt-1",variant:"caption",children:e.description}),(0,r.jsxs)(h.Z,{className:"mt-2 font-semibold ".concat(a.text),variant:"caption",children:[e.days_remaining," days remaining"]})]},"".concat(e.type,"-").concat(e.deadline))})})]})]})}),(0,r.jsx)(x.Z,{padding:4,children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(h.Z,{variant:"label",children:"Year:"}),(0,r.jsx)(l.P,{name:"year",onChange:eh,options:M.map(e=>({value:String(e),label:String(e)})),selected:String(O)})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(h.Z,{variant:"label",children:"Quarter:"}),(0,r.jsx)(l.P,{name:"quarter",onChange:e=>B(e.target.value),options:F,selected:D})]})]}),(0,r.jsxs)(s.Z,{isLoading:ex.isPending,onClick:ef,outline:!0,size:"sm",children:[(0,r.jsx)(y.G,{"aria-hidden":"true",className:"mr-2",icon:v.q7m}),"Export Report"]})]}),!!(ee||ea)&&(0,r.jsx)(i.Z,{description:ea?"Please try refreshing the page.":"Loading tax report...",design:"wrapped",isError:!!ea,isLoading:ee,message:ea?"Failed to load tax report":"Loading..."}),!!(!ee&&!ea)&&(0,r.jsx)(c.Z,{isFetching:et,message:"Updating tax report",children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:[(0,r.jsxs)("div",{className:"bg-white p-3 rounded-xl text-left border flex flex-col gap-2 md:gap-3",children:[(0,r.jsx)(h.Z,{variant:"bodySmall",weight:"font-semibold",children:"Gross Payroll"}),(0,r.jsx)(h.Z,{size:"text-2xl",weight:"font-semibold",children:(0,b.x)(er.gross_payroll)})]}),(0,r.jsxs)("div",{className:"bg-white p-3 rounded-xl text-left border flex flex-col gap-2 md:gap-3",children:[(0,r.jsx)(h.Z,{variant:"bodySmall",weight:"font-semibold",children:"Net Salary"}),(0,r.jsx)(h.Z,{size:"text-2xl",weight:"font-semibold",children:(0,b.x)(er.net_salary)})]}),(0,r.jsxs)("div",{className:"bg-white p-3 rounded-xl text-left border flex flex-col gap-2 md:gap-3",children:[(0,r.jsx)(h.Z,{variant:"bodySmall",weight:"font-semibold",children:"Employees"}),(0,r.jsx)(h.Z,{size:"text-2xl",weight:"font-semibold",children:String(er.employee_count||0)})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(h.Z,{className:"mb-3",variant:"sectionHeader",children:"Statutory Deductions Summary"}),(0,r.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,r.jsxs)("div",{className:"bg-white p-3 rounded-xl text-left border flex flex-col gap-2 md:gap-3",children:[(0,r.jsx)(h.Z,{variant:"bodySmall",weight:"font-semibold",children:"PAYE"}),(0,r.jsx)(h.Z,{size:"text-2xl",weight:"font-semibold",children:(0,b.x)(er.total_paye)})]}),(0,r.jsxs)("div",{className:"bg-white p-3 rounded-xl text-left border flex flex-col gap-2 md:gap-3",children:[(0,r.jsx)(h.Z,{variant:"bodySmall",weight:"font-semibold",children:"NHIF"}),(0,r.jsx)(h.Z,{size:"text-2xl",weight:"font-semibold",children:(0,b.x)(er.total_nhif)})]}),(0,r.jsxs)("div",{className:"bg-white p-3 rounded-xl text-left border flex flex-col gap-2 md:gap-3",children:[(0,r.jsx)(h.Z,{variant:"bodySmall",weight:"font-semibold",children:"NSSF"}),(0,r.jsx)(h.Z,{size:"text-2xl",weight:"font-semibold",children:(0,b.x)(er.total_nssf)})]}),(0,r.jsxs)("div",{className:"bg-white p-3 rounded-xl text-left border flex flex-col gap-2 md:gap-3",children:[(0,r.jsx)(h.Z,{variant:"bodySmall",weight:"font-semibold",children:"Housing Levy"}),(0,r.jsx)(h.Z,{size:"text-2xl",weight:"font-semibold",children:(0,b.x)(er.total_housing_levy)})]})]})]}),!!er.period&&(0,r.jsx)("div",{className:"p-4 bg-gray-50 rounded-lg",children:(0,r.jsxs)(h.Z,{variant:"caption",children:["Showing data for ",er.period," (",er.payslip_count||0," payslips processed)"]})})]})})]})}),(0,r.jsx)(x.Z,{padding:4,children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"flex items-center gap-4 mb-4",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(h.Z,{variant:"label",children:"Year:"}),(0,r.jsx)(l.P,{name:"yearEnd",onChange:eh,options:M.map(e=>({value:String(e),label:String(e)})),selected:String(O)})]})}),!!(eo||ec)&&(0,r.jsx)(i.Z,{description:ec?"Please try refreshing the page.":"Loading year-end report...",design:"wrapped",isError:!!ec,isLoading:eo,message:ec?"Failed to load report":"Loading..."}),!!(!eo&&!ec)&&(0,r.jsx)(c.Z,{isFetching:ed,message:"Updating year-end report",children:(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,r.jsxs)("div",{className:"bg-white p-3 rounded-xl text-left border flex flex-col gap-2 md:gap-3",children:[(0,r.jsx)(h.Z,{variant:"bodySmall",weight:"font-semibold",children:"Total Gross Pay"}),(0,r.jsx)(h.Z,{size:"text-2xl",weight:"font-semibold",children:(0,b.x)(em.total_gross||0)})]}),(0,r.jsxs)("div",{className:"bg-white p-3 rounded-xl text-left border flex flex-col gap-2 md:gap-3",children:[(0,r.jsx)(h.Z,{variant:"bodySmall",weight:"font-semibold",children:"Total PAYE"}),(0,r.jsx)(h.Z,{size:"text-2xl",weight:"font-semibold",children:(0,b.x)(em.total_paye||0)})]}),(0,r.jsxs)("div",{className:"bg-white p-3 rounded-xl text-left border flex flex-col gap-2 md:gap-3",children:[(0,r.jsx)(h.Z,{variant:"bodySmall",weight:"font-semibold",children:"Total Net Pay"}),(0,r.jsx)(h.Z,{size:"text-2xl",weight:"font-semibold",children:(0,b.x)(em.total_net||0)})]}),(0,r.jsxs)("div",{className:"bg-white p-3 rounded-xl text-left border flex flex-col gap-2 md:gap-3",children:[(0,r.jsx)(h.Z,{variant:"bodySmall",weight:"font-semibold",children:"Employees"}),(0,r.jsx)(h.Z,{size:"text-2xl",weight:"font-semibold",children:String(em.employee_count||0)})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(h.Z,{className:"mb-3",variant:"sectionHeader",children:"Annual Statutory Deductions"}),(0,r.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,r.jsxs)("div",{className:"bg-white p-3 rounded-xl text-left border flex flex-col gap-2 md:gap-3",children:[(0,r.jsx)(h.Z,{variant:"bodySmall",weight:"font-semibold",children:"PAYE"}),(0,r.jsx)(h.Z,{size:"text-2xl",weight:"font-semibold",children:(0,b.x)((null===(a=em.statutory_totals)||void 0===a?void 0:a.paye)||0)})]}),(0,r.jsxs)("div",{className:"bg-white p-3 rounded-xl text-left border flex flex-col gap-2 md:gap-3",children:[(0,r.jsx)(h.Z,{variant:"bodySmall",weight:"font-semibold",children:"NHIF"}),(0,r.jsx)(h.Z,{size:"text-2xl",weight:"font-semibold",children:(0,b.x)((null===(f=em.statutory_totals)||void 0===f?void 0:f.nhif)||0)})]}),(0,r.jsxs)("div",{className:"bg-white p-3 rounded-xl text-left border flex flex-col gap-2 md:gap-3",children:[(0,r.jsx)(h.Z,{variant:"bodySmall",weight:"font-semibold",children:"NSSF"}),(0,r.jsx)(h.Z,{size:"text-2xl",weight:"font-semibold",children:(0,b.x)((null===(j=em.statutory_totals)||void 0===j?void 0:j.nssf)||0)})]}),(0,r.jsxs)("div",{className:"bg-white p-3 rounded-xl text-left border flex flex-col gap-2 md:gap-3",children:[(0,r.jsx)(h.Z,{variant:"bodySmall",weight:"font-semibold",children:"Housing Levy"}),(0,r.jsx)(h.Z,{size:"text-2xl",weight:"font-semibold",children:(0,b.x)((null===(w=em.statutory_totals)||void 0===w?void 0:w.housing_levy)||0)})]})]})]}),(0,r.jsx)("div",{className:"p-4 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)(y.G,{className:"text-yellow-600 mt-0.5",icon:v.eHv}),(0,r.jsxs)("div",{children:[(0,r.jsx)(h.Z,{className:"text-yellow-800",variant:"labelValue",children:"P9 Tax Certificates"}),(0,r.jsxs)(h.Z,{className:"block text-yellow-700 mt-1",variant:"caption",children:["Remember to issue P9 tax certificates to all employees for the ",O," tax year. Deadline: February 28, ",O+1,"."]})]})]})})]})})]})}),(0,r.jsx)(x.Z,{padding:0,children:(0,r.jsx)(I,{error:eu,isLoading:eg,violationsData:ep})}),(0,r.jsxs)(x.Z,{padding:4,children:[!!(V||J||N()(K))&&(0,r.jsx)(i.Z,{description:J?"Please try refreshing the page.":V?"
1Loading audit trail...":"No compliance actions have been recorded yet.",design:"wrapped",isError:!!J,isLoading:V,message:J?"Failed to load audit trail":V?"Loading...":"No audit entries"}),!!(!V&&!J&&!N()(K))&&(0,r.jsxs)("div",{children:[(0,r.jsx)(c.Z,{isFetching:Q,children:(0,r.jsx)("div",{className:"divide-y divide-gray-100",children:K.map(e=>(0,r.jsx)(H,{entry:e},e.id))})}),X.last_page>1&&(0,r.jsx)("div",{className:"mt-6 flex justify-center",children:(0,r.jsx)(p.Z,{currentPage:X.current_page,onPageChange:e=>S(e),totalPages:X.last_page})})]})]})]})})})]})]})};B.propTypes={tenantName:k().string.isRequired},B.getInitialProps=async e=>{let{tenant:t}=e.query;return{tenantName:t}};var M=(0,f.withAuthSync)((0,O.Z)(B))},16049:function(e,t,a){"use strict";var r=a(52322),s=a(2369),n=a(92942),i=a(13980),l=a.n(i),o=a(2784),d=a(47023);let c=e=>{let{home:t,links:a}=e,i=e=>"undefined"===e?"unknown":e;return(0,r.jsx)("nav",{"aria-label":"Breadcrumb",children:(0,r.jsxs)("ul",{className:"flex w-full flex-row items-center breadcrumbs overflow-x-auto py-2 md:py-4",children:[(0,r.jsx)("li",{className:"flex items-center",children:(0,r.jsx)(d.Z,{asDefaultATag:!0,className:"!px-0 !py-0",design:"plain",href:t,children:(0,r.jsx)(n.FontAwesomeIcon,{className:"text-lg text-gray-400 hover:text-blue-dark",icon:s.J9Y,size:"sm"})})}),a.map((e,t)=>{let l=t+1===a.length,c="Link"===e.nodeType||"a"===e.nodeType;return(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)("li",{"aria-hidden":"true",className:"text-sm flex items-center",children:(0,r.jsx)(n.FontAwesomeIcon,{className:"text-xs text-gray-400 px-2",icon:s._tD,size:"xs"})}),(0,r.jsxs)("li",{className:"font-medium text-sm flex items-center",children:[!!c&&(0,r.jsx)("a",{"aria-current":l?"page":void 0,className:"text-sm whitespace-nowrap ".concat(l?"text-blue-dark":""),href:e.href,children:i(e.name)}),"Button"===e.nodeType&&(0,r.jsx)(d.Z,{asDefaultATag:!0,className:"text-blue-dark",design:"plain",href:e.href,children:i(e.name)}),!!(!c&&"Button"!==e.nodeType)&&(0,r.jsx)("span",{className:"text-sm whitespace-nowrap",children:i(e.name)})]})]},"".concat(e.href,"-").concat(t))})]})})};c.propTypes={home:l().string.isRequired,links:l().arrayOf(l().shape({nodeType:l().oneOf(["Link","a","Button"]).isRequired,href:l().string.isRequired,name:l().string.isRequired}))},c.defaultProps={links:[]},t.Z=c},63798:function(e,t,a){"use strict";a.d(t,{P:function(){return d}});var r=a(52322),s=a(12524),n=a.n(s),i=a(13980),l=a.n(i);a(2784);let{parseUnderScore:o}=a(77590),d=e=>{let{name:t,error:a,label:s,description:i,options:l,onChange:d,selected:c,required:m=!1,defaultOption:p,...g}=e,u=n()("block","tracking-wide","text-sm","font-medium","mb-2",{"text-gray-700":!a},{"text-red-400":a}),x=n()("block appearance-none w-full bg-blue-50 border border-gray-200 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500 capitalize",{border:a},{"border-red-400":a}),h=e=>"object"==typeof e&&null!==e?e.label||e.value||"":"string"!=typeof e?String(e):e.replace(/_/g," ").replace(/-/g," ");return(0,r.jsxs)(r.Fragment,{children:[s?(0,r.jsxs)("label",{className:u,htmlFor:t,children:[s,m?(0,r.jsx)("span",{className:"text-red-400 text-xs ml-1",children:"*"}):null]}):null,(0,r.jsx)("div",{className:"flex relative w-full",children:(0,r.jsxs)("select",{className:x,id:t,name:t,onChange:d,value:null!=c?c:"",...g,children:[(0,r.jsx)("option",{value:"",children:p||"Select ".concat(o(t))}),null==l?void 0:l.map((e,t)=>{let a="object"==typeof e&&null!==e?e.value:"string"==typeof e?e.toLowerCase():e;return(0,r.jsx)("option",{value:a,children:h(e)},"option-".concat(t))})]})}),i?(0,r.jsx)("span",{className:"text-gray-500 text-sm mt-1 block",children:i}):null,a?(0,r.jsx)("span",{className:"text-red-400 text-xs",children:a}):null]})};d.propTypes={label:l().string,name:l().string.isRequired,options:l().array.isRequired,selected:l().string,error:l().string,onChange:l().func.isRequired,required:l().bool,defaultOption:l().string}},23825:function(e,t,a){"use strict";var r=a(52322),s=a(13980),n=a.n(s),i=a(2784),l=a(42369);let o=e=>
1{let{isFetching:t=!1,delayMs:a=200,size:s="sm",message:n,className:o="",children:d}=e,[c,m]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{if(!t){m(!1);return}let e=setTimeout(()=>m(!0),a);return()=>clearTimeout(e)},[t,a]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{"aria-busy":!!t,className:"relative ".concat(o),children:[!!c&&(0,r.jsx)(l.J,{className:"pointer-events-none",fixed:!1,size:s,zIndexClass:"z-10"}),d]}),!!c&&(0,r.jsx)("span",{className:"sr-only",role:"status",children:n||"Updating"})]})};o.propTypes={isFetching:n().bool,delayMs:n().number,size:n().string,message:n().string,className:n().string,children:n().node.isRequired},t.Z=o},75588:function(e,t,a){"use strict";var r=a(52322),s=a(13980),n=a.n(s);a(2784);var i=a(16049),l=a(76467);let o=e=>{let{tenantName:t,breadcrumbs:a,title:s,description:n,actions:o,titleProps:d,fullWidth:c=!0}=e;return(0,r.jsxs)("div",{className:c?"w-full":"container mx-auto px-4 md:px-8 lg:px-12",children:[(0,r.jsx)("div",{children:(0,r.jsx)(i.Z,{home:"/hr/".concat(t,"/"),links:a})}),(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 py-4",children:[(0,r.jsxs)("div",{...d,children:[(0,r.jsx)(l.Z,{variant:"heading1",children:s}),!!n&&(0,r.jsx)(l.Z,{className:"mt-1",variant:"bodySmall",children:n})]}),!!o&&(0,r.jsx)("div",{className:"flex items-center gap-3",children:o})]})]})};o.propTypes={tenantName:n().string.isRequired,breadcrumbs:n().arrayOf(n().shape({href:n().string.isRequired,name:n().string.isRequired,nodeType:n().string})).isRequired,title:n().node.isRequired,description:n().string,actions:n().node,titleProps:n().object,fullWidth:n().bool},t.Z=o},42399:function(e,t,a){"use strict";var r=a(52322);a(2784);var s=a(13980),n=a.n(s),i=a(92942),l=a(2369),o=a(37492),d=a.n(o),c=a(47023);let m=e=>{let{lastPage:t,currentPage:a,onChange:s}=e;return t&&a&&!(t<=1)?(0,r.jsx)("div",{className:"w-full md:w-auto overflow-auto md:bg-blue-50 py-3 md:px-3 rounded-lg flex justify-center",children:(0,r.jsx)(d(),{activeLinkClassName:"!bg-white !border-blue !text-blue",breakLabel:"...",breakLinkClassName:"inline-block md:h-10 md:w-10 flex items-center justify-center md:mr-2",className:"cx-pagination h-full flex flex-row justify-center items-center",forcePage:Number(a)-1,marginPagesDisplayed:1,nextClassName:"ml-auto md:ml-10",nextLabel:(0,r.jsx)(c.Z,{beforeIcon:(0,r.jsx)(i.FontAwesomeIcon,{className:"text-base",icon:l._tD}),className:"h-10 w-10 bg-white border !text-blue-darkest hover:!bg-blue hover:!border-blue hover:!text-white !rounded-lg"}),nextLinkClassName:"flex items-center gap-1 md:gap-3 ml-1 md:ml-3",onPageChange:e=>s(e.selected),pageClassName:"",pageCount:Number(t),pageLinkClassName:"inline-block h-10 w-10 flex items-center justify-center border border-transparent rounded-lg text-base font-normal text-blue-darkest leading-none hover:border-blue hover:bg-white md:mr-2 hover:!text-blue",pageRangeDisplayed:3,previousClassName:"mr-auto md:mr-10",previousLabel:(0,r.jsx)(c.Z,{beforeIcon:(0,r.jsx)(i.FontAwesomeIcon,{className:"text-base",icon:l.A35}),className:"h-10 w-10 bg-white border !text-blue-darkest hover:!bg-blue hover:!border-blue hover:!text-white !rounded-lg"}),previousLinkClassName:"flex items-center gap-1 md:gap-3 mr-1 md:mr-3",renderOnZeroPageCount:null})}):null};m.propTypes={onChange:n().func,currentPage:n().number.isRequired,lastPage:n().number.isRequired},t.Z=m},51634:function(e,t,a){"use strict";var r=a(52322),s=a(13980),n=a.n(s);let i=(0,a(2784).memo)(function(e){let{children:t,padding:a=0,className:s=""}=e;return(0,r.jsx)("div",{className:"w-full ".concat(a?"p-".concat(a):""," ").concat(s).trim(),children:t})});i.displayName="TabPanel",i.propTypes={children:n().node,padding:n().oneOfType([n().number,n().string]),className:n().string},t.Z=i},64792:function(e,t,a){"use strict";a.d(t,{x:function(){return r}});let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"KES";return new Intl.NumberFormat("en-KE",{style:"currency",currency:t,minimumFractionDigits:2}).format(null!=e?e:0)}},37492:function(e,t,a){var r;r=e=>(()=>{var t={703:(e,t,a)=>{"use strict";var r=a(414);function s(){}function n(){}n.resetWarningCache=s,e.exports=function(){function e(e,t,a,s,n,i){if(i!==r){var l=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol
1:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:n,resetWarningCache:s};return a.PropTypes=a,a}},697:(e,t,a)=>{e.exports=a(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},98:t=>{"use strict";t.exports=e}},a={};function r(e){var s=a[e];if(void 0!==s)return s.exports;var n=a[e]={exports:{}};return t[e](n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{"use strict";r.r(s),r.d(s,{default:()=>b});var e=r(98),t=r.n(e),a=r(697),n=r.n(a);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}var l=function(e){var a=e.pageClassName,r=e.pageLinkClassName,s=e.page,n=e.selected,l=e.activeClassName,o=e.activeLinkClassName,d=e.getEventListener,c=e.pageSelectedHandler,m=e.href,p=e.extraAriaContext,g=e.pageLabelBuilder,u=e.rel,x=e.ariaLabel||"Page "+s+(p?" "+p:""),h=null;return n&&(h="page",x=e.ariaLabel||"Page "+s+" is your current page",a=void 0!==a?a+" "+l:l,void 0!==r?void 0!==o&&(r=r+" "+o):r=o),t().createElement("li",{className:a},t().createElement("a",i({rel:u,role:m?void 0:"button",className:r,href:m,tabIndex:n?"-1":"0","aria-label":x,"aria-current":h,onKeyPress:c},d(c)),g(s)))};function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}l.propTypes={pageSelectedHandler:n().func.isRequired,selected:n().bool.isRequired,pageClassName:n().string,pageLinkClassName:n().string,activeClassName:n().string,activeLinkClassName:n().string,extraAriaContext:n().string,href:n().string,ariaLabel:n().string,page:n().number.isRequired,getEventListener:n().func.isRequired,pageLabelBuilder:n().func.isRequired,rel:n().string};var d=function(e){var a=e.breakLabel,r=e.breakAriaLabel,s=e.breakClassName,n=e.breakLinkClassName,i=e.breakHandler,l=e.getEventListener;return t().createElement("li",{className:s||"break"},t().createElement("a",o({className:n,role:"button",tabIndex:"0","aria-label":r,onKeyPress:i},l(i)),a))};function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!=e?e:t}function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(){return(p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(this,arguments)}function g(e,t){return(g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function u(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}d.propTypes={breakLabel:n().oneOfType([n().string,n().node]),breakAriaLabel:n().string,breakClassName:n().string,breakLinkClassName:n().string,breakHandler:n().func.isRequired,getEventListener:n().func.isRequired};var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(n,e);var a,r,s=(r=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=x(n);return e=r?Reflect.construct(t,arguments,x(this).constructor):t.apply(this,arguments),function(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return u(e)}(this,e)});function n(e){var a,r;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),h(u(a=s.call(this,e)),"handlePreviousPage",function(e){var t=a.state.selected;a.handleClick(e,null,t>0?t-1:void 0,{isPrevious:!0})}),h(u(a),"handleNextPage",function(e){var t=a.state.selected,r=a.props.pageCount;a.handleClick(e,null,t<r-1?t+1:void 0,{isNext:!0})}),h(u(a),"handlePageSelected",function(e,t){if(a.state.selected===e)return a.callActiveCallback(e),void a.handleClick(t,null,void 0,{isActive:!0});a.handleClick(t,null,e)}),h(u(a),"handlePageChange",function(e){a.state.selected!==e&&(a.setState({selected:e}
1),a.callCallback(e))}),h(u(a),"getEventListener",function(e){return h({},a.props.eventListener,e)}),h(u(a),"handleClick",function(e,t,r){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=s.isPrevious,i=s.isNext,l=s.isBreak,o=s.isActive;e.preventDefault?e.preventDefault():e.returnValue=!1;var d=a.state.selected,c=a.props.onClick,m=r;if(c){var p=c({index:t,selected:d,nextSelectedPage:r,event:e,isPrevious:void 0!==n&&n,isNext:void 0!==i&&i,isBreak:void 0!==l&&l,isActive:void 0!==o&&o});if(!1===p)return;Number.isInteger(p)&&(m=p)}void 0!==m&&a.handlePageChange(m)}),h(u(a),"handleBreakClick",function(e,t){var r=a.state.selected;a.handleClick(t,e,r<e?a.getForwardJump():a.getBackwardJump(),{isBreak:!0})}),h(u(a),"callCallback",function(e){void 0!==a.props.onPageChange&&"function"==typeof a.props.onPageChange&&a.props.onPageChange({selected:e})}),h(u(a),"callActiveCallback",function(e){void 0!==a.props.onPageActive&&"function"==typeof a.props.onPageActive&&a.props.onPageActive({selected:e})}),h(u(a),"getElementPageRel",function(e){var t=a.state.selected,r=a.props,s=r.nextPageRel,n=r.prevPageRel,i=r.selectedPageRel;return t-1===e?n:t===e?i:t+1===e?s:void 0}),h(u(a),"pagination",function(){var e=[],r=a.props,s=r.pageRangeDisplayed,n=r.pageCount,i=r.marginPagesDisplayed,l=r.breakLabel,o=r.breakClassName,c=r.breakLinkClassName,m=r.breakAriaLabels,p=a.state.selected;if(n<=s)for(var g=0;g<n;g++)e.push(a.getPageElement(g));else{var u=s/2,x=s-u;p>n-s/2?u=s-(x=n-p):p<s/2&&(x=s-(u=p));var h,f,b=function(e){return a.getPageElement(e)},v=[];for(h=0;h<n;h++){var y=h+1;if(y<=i)v.push({type:"page",index:h,display:b(h)});else if(y>n-i)v.push({type:"page",index:h,display:b(h)});else if(h>=p-u&&h<=p+(0===p&&s>1?x-1:x))v.push({type:"page",index:h,display:b(h)});else if(l&&v.length>0&&v[v.length-1].display!==f&&(s>0||i>0)){var j=h<p?m.backward:m.forward;f=t().createElement(d,{key:h,breakAriaLabel:j,breakLabel:l,breakClassName:o,breakLinkClassName:c,breakHandler:a.handleBreakClick.bind(null,h),getEventListener:a.getEventListener}),v.push({type:"break",index:h,display:f})}}v.forEach(function(t,a){var r=t;"break"===t.type&&v[a-1]&&"page"===v[a-1].type&&v[a+1]&&"page"===v[a+1].type&&v[a+1].index-v[a-1].index<=2&&(r={type:"page",index:t.index,display:b(t.index)}),e.push(r.display)})}return e}),void 0!==e.initialPage&&void 0!==e.forcePage&&console.warn("(react-paginate): Both initialPage (".concat(e.initialPage,") and forcePage (").concat(e.forcePage,") props are provided, which is discouraged.")+" Use exclusively forcePage prop for a controlled component.\nSee https://reactjs.org/docs/forms.html#controlled-components"),r=e.initialPage?e.initialPage:e.forcePage?e.forcePage:0,a.state={selected:r},a}return a=[{key:"componentDidMount",value:function(){var e=this.props,t=e.initialPage,a=e.disableInitialCallback,r=e.extraAriaContext,s=e.pageCount,n=e.forcePage;void 0===t||a||this.callCallback(t),r&&console.warn("DEPRECATED (react-paginate): The extraAriaContext prop is deprecated. You should now use the ariaLabelBuilder instead."),Number.isInteger(s)||console.warn("(react-paginate): The pageCount prop value provided is not an integer (".concat(s,"). Did you forget a Math.ceil()?")),void 0!==t&&t>s-1&&console.warn("(react-paginate): The initialPage prop provided is greater than the maximum page index from pageCount prop (".concat(t," > ").concat(s-1,").")),void 0!==n&&n>s-1&&console.warn("(react-paginate): The forcePage prop provided is greater than the maximum page index from pageCount prop (".concat(n," > ").concat(s-1,")."))}},{key:"componentDidUpdate",value:function(e){void 0!==this.props.forcePage&&this.props.forcePage!==e.forcePage&&(this.props.forcePage>this.props.pageCount-1&&console.warn("(react-paginate): The forcePage prop provided is greater than the maximum page index from pageCount prop (".concat(this.props.forcePage," > ").concat(this.props.pageCount-1,").")),this.setState({selected:this.props.forcePage})),Number.isInteger(e.pageCount)&&!Number.isInteger(this.props.pageCount)&&console.warn("(react-paginate): The pageCount prop value provided is not an integer (".concat(this.props.pageCount,"). Did you forget a Math.ceil()?"))}},{key:"getForwardJump",value:function(){var e=this.state.selected,t=this.props,a=t.pageCount,r=e+t.pageRangeDisplayed;return r>=a?a-1:r}},{key:"getBackwardJump",value:function(){var e=this.state.selected-this.props.pageRangeDisplayed;return e<0?0:e}},{key:"getElementHref",value:function(e){var t=this.props,a=t.hrefBuilder,r=t.pageCount,s=t.hrefAllControls;if(a)return s||e>=0&&e<r?a(e+1,r,this.state.selected):void 0}},{key:"ariaLabelBuilder",value:function(e){var t=e===this.state.selected;if(this.props.ariaLabelBuilder&&e>=0&&e<this.props.pageCount){var a=this.props.ariaLabelBuilder(e+1,t);return this.props.extraAriaContext&&!t&&(a=a+" "+this.props.extraAriaContext),a}}},{key:"getPageElement",value:function(e){var a=this.state.selected,r=this.props,s=r.pageClassName,n=r.pageLinkClassName,i=r.activeClassName,o=r.activeLinkClassName,d=r.extraAriaContext,c=r.pageLabelBuilder;return t().createElement(l,{key:e,pageSelectedHandler:this.handlePageSelected.bind(null,e),selected:a===e,rel:this.getElementPageRel(e),pageClassName:s,pageLinkClassName:n,activeClassName:i,activeLinkClassName:o,extraAriaContext:d,href:this.getElementHref(e),ariaLabel:this.ariaLabelBuilder(e),page:e+1,pageLabelBuilder:c,getEventListener:this.getEventListener})}},{key:"render",value:function(){var e=this.props.renderOnZeroPageCount;if(0===this.props.pageCount&&void 0!==e)return e?e(this.props):e;var a=this.props,r=a.disabledClassName,s=a.disabledLinkClassName,n=a.pageCount,i=a.className,l=a.containerClassName,o=a.previousLabel,d=a.previousClassName,m=a.previousLinkClassName,g=a.previousAriaLabel,u=a.prevRel,x=a.nextLabel,h=a.nextClassName,f=a.nextLinkClassName,b=a.nextAriaLabel,v=a.nextRel,y=this.state.selected,j=0===y,N=y===n-1,w="".concat(c(d)).concat(j?" ".concat(c(r)):""),k="".concat(c(h)).concat(N?" ".concat(c(r)):""),P="".concat(c(m)).concat(j?" ".concat(c(s)):""),C="".concat(c(f)).concat(N?" ".concat(c(s)):"");return t().createElement("ul",{className:i||l,role:"navigation","aria-label":"Pagination"},t().createElement("li",{className:w},t().createElement("a",p({className:P,href:this.getElementHref(y-1),tabIndex:j?"-1":"0",role:"button",onKeyPress:this.handlePreviousPage,"aria-disabled":j?"true":"false","aria-label":g,rel:u},this.getEventListener(this.handlePreviousPage)),o)),this.pagination(),t().createElement("li",{className:k},t().createElement("a",p({className:C,href:this.getElementHref(y+1),tabIndex:N?"-1":"0",role:"button",onKeyPress:this.handleNextPage,"aria-disabled":N?"true":"false","aria-label":b,rel:v},this.getEventListener(this.handleNextPage)),x)))}}],function(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,a),Object.defineProperty(n,"prototype",{writable:!1}),n}(e.Component);h(f,"propTypes",{pageCount:n().number.isRequired,pageRangeDisplayed:n().number,marginPagesDisplayed:n().number,previousLabel:n().node,previousAriaLabel:n().string,prevPageRel:n().string,prevRel:n().string,nextLabel:n().node,nextAriaLabel:n().string,nextPageRel:n().string,nextRel:n().string,breakLabel:n().oneOfType([n().string,n().node]),breakAriaLabels:n().shape({forward:n().string,backward:n().string}),hrefBuilder:n().func,hrefAllControls:n().bool,onPageChange:n().func,onPageActive:n().func,onClick:n().func,initialPage:n().number,forcePage:n().number,disableInitialCallback:n().bool,containerClassName:n().string,className:n().string,pageClassName:n().string,pageLinkClassName:n().string,pageLabelBuilder:n().func,activeClassName:n().string,activeLinkClassName:n().string,previousClassName:n().string,nextClassName:n().string,previousLinkClassName:n().string,nextLinkClassName:n().string,disabledClassName:n().string,disabledLinkClassName:n().string,breakClassName:n().string,breakLinkClassName:n().string,extraAriaContext:n().string,ariaLabelBuilder:n().func,eventListener:n().string,renderOnZeroPageCount:n().func,selectedPageRel:n().string}),h(f,"defaultProps",{pageRangeDisplayed:2,marginPagesDisplayed:3,activeClassName:"selected",previousLabel:"Previous",previousClassName:"previous",previousAriaLabel:"Previous page",prevPageRel:"prev",prevRel:"prev",nextLabel:"Next",nextClassName:"next",nextAriaLabel:"Next page",nextPageRel:"next",nextRel:"next",breakLabel:"...",breakAriaLabels:{forward:"Jump forward",backward:"Jump backward"},disabledClassName:"disabled",disableInitialCallback:!1,pageLabelBuilder:function(e){return e},eventListener:"onClick",renderOnZeroPageCount:void 0,selectedPageRel:"canonical",hrefAllControls:!1});let b=f})(),s})(),e.exports=r(a(2784))}},function(e){e.O(0,[4976,5351,9603,1282,4278,2888,9774,179],function(){return e(e.s=14970)}),_N_E=e.O()}]);

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.