PageSourceSearch

https://udgifoundation.org/_next/static/chunks/1912.4437bdfb92e0f79f.js

js udgifoundation.org collected 2026-10-07 07:46:54 UTC 30,286 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1912],{21767:(e,t,s)=>{s.d(t,{d:()=>r});var a=s(95155);s(12115);var l=s(8678),n=s(40980);function r({className:e,...t}){return(0,a.jsx)(l.bL,{"data-slot":"switch",className:(0,n.cn)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:(0,a.jsx)(l.zi,{"data-slot":"switch-thumb",className:(0,n.cn)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}},29991:(e,t,s)=>{s.d(t,{bq:()=>m,eb:()=>h,gC:()=>x,l6:()=>c,yv:()=>o});var a=s(95155);s(12115);var l=s(87059),n=s(66088),r=s(94514),i=s(9921),d=s(40980);function c({...e}){return(0,a.jsx)(l.bL,{"data-slot":"select",...e})}function o({...e}){return(0,a.jsx)(l.WT,{"data-slot":"select-value",...e})}function m({className:e,size:t="default",children:s,...r}){return(0,a.jsxs)(l.l9,{"data-slot":"select-trigger","data-size":t,className:(0,d.cn)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[s,(0,a.jsx)(l.In,{asChild:!0,children:(0,a.jsx)(n.A,{className:"size-4 opacity-50"})})]})}function x({className:e,children:t,position:s="popper",...n}){return(0,a.jsx)(l.ZL,{children:(0,a.jsxs)(l.UC,{"data-slot":"select-content",className:(0,d.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===s&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:s,...n,children:[(0,a.jsx)(p,{}),(0,a.jsx)(l.LM,{className:(0,d.cn)("p-1","popper"===s&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),(0,a.jsx)(u,{})]})})}function h({className:e,children:t,...s}){return(0,a.jsxs)(l.q7,{"data-slot":"select-item",className:(0,d.cn)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...s,children:[(0,a.jsx)("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,a.jsx)(l.VF,{children:(0,a.jsx)(r.A,{className:"size-4"})})}),(0,a.jsx)(l.p4,{children:t})]})}function p({className:e,...t}){return(0,a.jsx)(l.PP,{"data-slot":"select-scroll-up-button",className:(0,d.cn)("flex cursor-default items-center justify-center py-1",e),...t,children:(0,a.jsx)(i.A,{className:"size-4"})})}function u({className:e,...t}){return(0,a.jsx)(l.wn,{"data-slot":"select-scroll-down-button",className:(0,d.cn)("flex cursor-default items-center justify-center py-1",e),...t,children:(0,a.jsx)(n.A,{className:"size-4"})})}},33807:(e,t,s)=>{s.d(t,{J:()=>r});var a=s(95155);s(12115);var l=s(29486),n=s(40980);function r({className:e,...t}){return(0,a.jsx)(l.b,{"data-slot":"label",className:(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}},41912:(e,t,s)=>{s.r(t),s.d(t,{AdminPmuContacts:()=>T});var a=s(95155),l=s(12115),n=s(86079),r=s(58120),i=s(89363),d=s(91958),c=s(6962),o=s(21975),m=s(47339),x=s(51914),h=s(51997),p=s(12651),u=s(24538),j=s(50049),g=s(61878),f=s(56053),v=s(92289),N=s(6296),b=s(68459),w=s(55243),y=s(44478),A=s(81477),C=s(89239),S=s(45160),k=s(60529),P=s(33807),M=s(21767),E=s(86846),U=s(97916),D=s(42763),z=s(29991),I=s(69613),_=s(52300),F=s(92900),$=s(42631),L=s(21389),J=s(66609);function T(){let{user:e}=(0,F.CU)(),[t,T]=(0,l.useState)([]),[H,O]=(0,l.useState)(!0),[q,B]=(0,l.useState)(""),[G,R]=(0,l.useState)("all"),[V,W]=(0,l.useState)("all"),[Z,X]=(0,l.useState)(null),[K,Q]=(0,l.useState)({phone:"+91 91515 90150",email:"pmu.supp
1[email protected]",hours:"Mon - Sat: 9:00 AM - 6:00 PM",address:"Moradabad, Uttar Pradesh"}),[Y,ee]=(0,l.useState)(!1),[et,es]=(0,l.useState)(!1),[ea,el]=(0,l.useState)(!1),[en,er]=(0,l.useState)(null),[ei,ed]=(0,l.useState)(!1),[ec,eo]=(0,l.useState)({name:"",designation:"",phone:"",email:"",state:"All India",district:"All Districts",department:"General PMU Support",active:!0}),[em,ex]=(0,l.useState)(!1),[eh,ep]=(0,l.useState)(!1),[eu,ej]=(0,l.useState)([]),eg=(0,l.useCallback)(async()=>{O(!0);try{let[e,t]=await Promise.all([fetch("/api/admin/pmu-contacts").then(e=>e.json()),fetch("/api/admin/pmu-contacts/settings").then(e=>e.json())]);e.ok?T(e.data||[]):J.toast.error("Failed to load PMU contacts"),t.ok&&t.data&&Q(t.data)}catch{J.toast.error("Network error loading PMU contacts")}finally{O(!1)}},[]);(0,l.useEffect)(()=>{eg()},[eg]);let ef=(0,l.useMemo)(()=>ec.state&&"All India"!==ec.state&&L.XE[ec.state]||[],[ec.state]),ev=(0,l.useMemo)(()=>{let e=new Set;return t.forEach(t=>{t.state&&e.add(t.state)}),Array.from(e)},[t]),eN=(0,l.useMemo)(()=>{let e=new Set;return t.forEach(t=>{t.department&&e.add(t.department)}),Array.from(e)},[t]),eb=(0,l.useMemo)(()=>t.filter(e=>{if("all"!==G&&e.state!==G||"all"!==V&&e.department!==V)return!1;if(!q.trim())return!0;let t=q.toLowerCase().trim();return e.name.toLowerCase().includes(t)||e.designation&&e.designation.toLowerCase().includes(t)||e.phone.includes(t)||e.email&&e.email.toLowerCase().includes(t)||e.state&&e.state.toLowerCase().includes(t)||e.district&&e.district.toLowerCase().includes(t)||e.department&&e.department.toLowerCase().includes(t)}),[t,G,V,q]),ew=(0,l.useMemo)(()=>({total:t.length,active:t.filter(e=>e.active).length,states:new Set(t.map(e=>e.state).filter(Boolean)).size,departments:new Set(t.map(e=>e.department).filter(Boolean)).size}),[t]),ey=async()=>{if(!ec.name.trim()||!ec.phone.trim())return void J.toast.error("Name and Phone number are required");ed(!0);try{let e=en?{id:en,...ec}:ec,t=await fetch("/api/admin/pmu-contacts",{method:en?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();if(!s.ok)throw Error(s.error||"Failed");J.toast.success(en?"PMU Contact updated":"PMU Contact added"),el(!1),eg()}catch(e){J.toast.error("Save failed",{description:e.message})}finally{ed(!1)}},eA=async()=>{if(!K.phone.trim()||!K.email.trim())return void J.toast.error("Helpline phone and email are required");es(!0);try{let e=await fetch("/api/admin/pmu-contacts/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(K)}),t=await e.json();if(!t.ok)throw Error(t.error||"Failed to update helpline settings");J.toast.success("PMU Helpline settings updated successfully"),ee(!1)}catch(e){J.toast.error("Settings update failed",{description:e.message})}finally{es(!1)}},eC=async e=>{if(confirm("Are you sure you want to delete this PMU contact person?")){X(e);try{let t=await fetch(`/api/admin/pmu-contacts?id=${e}`,{method:"DELETE"});if(!(await t.json()).ok)throw Error();J.toast.success("PMU contact deleted"),T(t=>t.filter(t=>t.id!==e))}catch{J.toast.error("Delete failed")}finally{X(null)}}},eS=async()=>{if(0===eu.length)return void J.toast.error("No rows to import");ep(!0);try{let e=await fetch("/api/admin/pmu-contacts/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({rows:eu})}),t=await e.json();if(!t.ok)throw Error(t.error||"Import failed");J.toast.success(t.message),ex(!1),ej([]),eg()}catch(e){J.toast.error("Bulk import failed",{description:e.message})}finally{ep(!1)}};return e&&!["admin","superadmin","sub_admin","subadmin"].includes(e.role)?(0,a.jsx)("div",{className:"p-8 text-center text-muted-foreground",children:"Admin access required"}):(0,a.jsxs)("div",{className:"p-4 md:p-6 lg:p-8 space-y-6",children:[(0,a.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h1",{className:"text-2xl md:text-3xl font-bold font-heading flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-xl bg-gradient-brand flex items-center justify-center text-white shadow-soft",children:(0,a.jsx)(r.A,{className:"w-5 h-5"})}),"PMU Contact Team Management"]}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Manage Project Management Unit (PMU) state & district contact persons visible on Member Dashboards."})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,a.jsxs)(C.$,{variant:"outline",size:"sm",onClick:()=>ee(!0),className:"gap-1.5 border-primary/30",children:[(0,a.jsx)(i.A,{className:"w-4 h-4 text-primary"}
1)," Edit Helpline Config"]}),(0,a.jsxs)(C.$,{variant:"outline",size:"sm",onClick:eg,disabled:H,className:"gap-1.5",children:[(0,a.jsx)(d.A,{className:`w-4 h-4 ${H?"animate-spin":""}`})," Refresh"]}),(0,a.jsxs)(C.$,{variant:"outline",size:"sm",onClick:()=>{(0,$.bJ)([{Name:"Rajesh Kumar",Designation:"State PMU Manager",Phone:"9876543210",Email:"[email protected]",State:"Uttar Pradesh",District:"Lucknow",Department:"PMU Operations"},{Name:"Anita Sharma",Designation:"District PMU Coordinator",Phone:"9123456789",Email:"[email protected]",State:"Bihar",District:"Patna",Department:"IT & Beneficiary Support"}],"UDGI_PMU_Contacts_Import_Template"),J.toast.success("Sample import template downloaded")},className:"gap-1.5",children:[(0,a.jsx)(c.A,{className:"w-4 h-4"})," Sample Template"]}),(0,a.jsxs)(C.$,{variant:"outline",size:"sm",onClick:()=>ex(!0),className:"gap-1.5",children:[(0,a.jsx)(o.A,{className:"w-4 h-4 text-brand"})," Import Excel"]}),(0,a.jsxs)(C.$,{variant:"outline",size:"sm",onClick:()=>{let e=eb.map(e=>({"Contact Name":e.name,Designation:e.designation||"",Phone:e.phone,Email:e.email||"",State:e.state||"All India",District:e.district||"All Districts",Department:e.department||"",Status:e.active?"Active":"Inactive"}));(0,$.bJ)(e,`UDGI_PMU_Contacts_${new Date().toISOString().slice(0,10)}`),J.toast.success("Exported to Excel")},disabled:0===eb.length,className:"gap-1.5",children:[(0,a.jsx)(m.A,{className:"w-4 h-4 text-emerald-600"})," Export Excel"]}),(0,a.jsxs)(C.$,{size:"sm",onClick:()=>{er(null),eo({name:"",designation:"",phone:"",email:"",state:"All India",district:"All Districts",department:"General PMU Support",active:!0}),el(!0)},className:"gap-1.5 shadow-soft",children:[(0,a.jsx)(x.A,{className:"w-4 h-4"})," Add PMU Contact"]})]})]}),(0,a.jsx)(A.Zp,{className:"border-cyan-500/20 bg-gradient-to-r from-cyan-500/10 via-blue-500/5 to-transparent shadow-soft",children:(0,a.jsxs)(A.Wu,{className:"p-4 flex flex-col md:flex-row items-start md:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-xl bg-cyan-600 text-white flex items-center justify-center shrink-0",children:(0,a.jsx)(r.A,{className:"w-5 h-5"})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"font-bold text-sm text-foreground flex items-center gap-2",children:["PMU Central Helpline: ",(0,a.jsx)("span",{className:"font-mono text-cyan-600 dark:text-cyan-400",children:K.phone}),(0,a.jsx)(S.E,{variant:"outline",className:"text-[10px] border-cyan-500/30",children:K.hours})]}),(0,a.jsxs)("p",{className:"text-xs text-muted-foreground mt-0.5",children:["Support Email: ",(0,a.jsx)("strong",{children:K.email})," • Location: ",(0,a.jsx)("strong",{children:K.address})]})]})]}),(0,a.jsxs)(C.$,{variant:"outline",size:"sm",onClick:()=>ee(!0),className:"gap-1.5 text-xs",children:[(0,a.jsx)(h.A,{className:"w-3.5 h-3.5"})," Edit Toll-Free Info"]})]})}),(0,a.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[{label:"Total PMU Contacts",value:ew.total,icon:r.A,color:"#0e7490"},{label:"Active Support Contacts",value:ew.active,icon:p.A,color:"#16a34a"},{label:"States Covered",value:ew.states,icon:u.A,color:"#2563eb"},{label:"Departments",value:ew.departments,icon:j.A,color:"#7c3aed"}].map((e,t)=>(0,a.jsx)(n.P.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.05*t},children:(0,a.jsx)(A.Zp,{className:"shadow-soft border",children:(0,a.jsxs)(A.Wu,{className:"p-4 flex items-center gap-4",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-xl bg-accent flex items-center justify-center shrink-0",style:{color:e.color},children:(0,a.jsx)(e.icon,{className:"w-5 h-5"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-2xl font-bold tabular-nums",children:H?(0,a.jsx)(E.E,{className:"h-7 w-12"}):(0,a.jsx)(_.q,{value:e.value})}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground font-medium",children:e.label})]})]})})},e.label))}),(0,a.jsx)(A.Zp,{className:"shadow-soft border",children:(0,a.jsxs)(A.Wu,{className:"p-4 flex flex-col md:flex-row items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"relative w-full md:w-80",children:[(0,a.jsx)(g.A,{className:"absolute left-3 top-2.5 w-4 h-4 text-muted-foreground"}),(0,a.jsx)(k.p,{placeholder:"Search name, phone, email, state…",value:q,onChange:e=>B(e.target.value),className:"pl-9 text-sm"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3 w-full md:w-auto",children:[(0,a.jsxs)(z.l6,{value:G,onValueChange:R,children:[(0,a.jsx)(z.bq,{className:"w-40 text-xs",children:(0,a.jsx)(z.yv,{placeholder:"All States"})}),(0,a.jsxs)(z.gC,{className:"max-h-60",children:[(0,a.jsx)(z.eb,{value:"all",children:"All States"}),ev.map(e=>(0,a.jsx)(z.eb,{value:e,children:e},e))]})]}),(0,a.jsxs)(z.l6,{value:V,onValueChange:W,children:[(0,a.jsx)(z.bq,{className:"w-44 text-xs",children:(0,a.jsx)(z.yv,{placeholder:"All Departments"})}),(0,a.jsxs)(z.gC,{children:[(0,a.jsx)(z.eb,{value:"all",children:"All Departments"}),eN.map(e=>(0,a.jsx)(z.eb,{value:e,children:e},e))]})]})]})]})}),(0,a.jsxs)(A.Zp,{className:"shadow-soft border overflow-hidden",children:[(0,a.jsx)(A.aR,{className:"pb-3",children:(0,a.jsxs)(A.ZB,{className:"text-base flex items-center justify-between",children:[(0,a.jsx)("span",{children:"PMU Directory"}),(0,a.jsxs)(S.E,{variant:"outline",className:"font-normal text-xs",children:["Showing ",eb.length," of ",t.length]})]})}),(0,a.jsx)(A.Wu,{children:H?(0,a.jsx)("div",{className:"space-y-3 py-4",children:[0,1,2,3].map(e=>(0,a.jsx)(E.E,{className:"h-12 w-full rounded-lg"},e))}):0===eb.length?(0,a.jsxs)("div",{className:"text-center py-12 text-muted-foreground",children:[(0,a.jsx)(r.A,{className:"w-10 h-10 mx-auto text-muted-foreground
1/40 mb-3"}),(0,a.jsx)("p",{className:"font-medium text-sm",children:"No PMU contact persons found."})]}):(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)(I.XI,{children:[(0,a.jsx)(I.A0,{children:(0,a.jsxs)(I.Hj,{children:[(0,a.jsx)(I.nd,{children:"Contact Name"}),(0,a.jsx)(I.nd,{children:"Designation / Role"}),(0,a.jsx)(I.nd,{children:"Phone / Mobile"}),(0,a.jsx)(I.nd,{children:"Email Address"}),(0,a.jsx)(I.nd,{children:"State & District"}),(0,a.jsx)(I.nd,{children:"Department"}),(0,a.jsx)(I.nd,{children:"Status"}),(0,a.jsx)(I.nd,{className:"text-right",children:"Actions"})]})}),(0,a.jsx)(I.BF,{children:eb.map(e=>(0,a.jsxs)(I.Hj,{className:"hover:bg-accent/40 transition-colors",children:[(0,a.jsx)(I.nA,{className:"font-bold text-sm",children:e.name}),(0,a.jsx)(I.nA,{className:"text-xs text-muted-foreground",children:e.designation||"—"}),(0,a.jsx)(I.nA,{className:"font-mono text-xs font-semibold",children:(0,a.jsxs)("a",{href:`tel:${e.phone}`,className:"hover:underline flex items-center gap-1 text-primary",children:[(0,a.jsx)(f.A,{className:"w-3.5 h-3.5"})," ",e.phone]})}),(0,a.jsx)(I.nA,{className:"text-xs text-muted-foreground",children:e.email?(0,a.jsxs)("a",{href:`mailto:${e.email}`,className:"hover:underline flex items-center gap-1",children:[(0,a.jsx)(v.A,{className:"w-3.5 h-3.5"})," ",e.email]}):"—"}),(0,a.jsxs)(I.nA,{className:"text-xs",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1 font-medium",children:[(0,a.jsx)(u.A,{className:"w-3.5 h-3.5 text-muted-foreground"}),(0,a.jsx)("span",{children:e.state||"All India"})]}),e.district&&"All Districts"!==e.district&&(0,a.jsx)("div",{className:"text-[10px] text-muted-foreground pl-4.5",children:e.district})]}),(0,a.jsx)(I.nA,{children:(0,a.jsx)(S.E,{variant:"outline",className:"text-[10px] bg-accent/50",children:e.department||"General"})}),(0,a.jsx)(I.nA,{children:(0,a.jsx)(S.E,{variant:e.active?"default":"secondary",className:"text-[10px]",children:e.active?"Active":"Inactive"})}),(0,a.jsx)(I.nA,{className:"text-right",children:(0,a.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,a.jsx)(C.$,{size:"sm",variant:"ghost",onClick:()=>{er(e.id),eo({name:e.name,designation:e.designation||"",phone:e.phone,email:e.email||"",state:e.state||"All India",district:e.district||"All Districts",department:e.department||"General PMU Support",active:e.active}),el(!0)},className:"h-8 w-8 p-0",children:(0,a.jsx)(h.A,{className:"w-4 h-4 text-muted-foreground hover:text-foreground"})}),(0,a.jsx)(C.$,{size:"sm",variant:"ghost",onClick:()=>eC(e.id),disabled:Z===e.id,className:"h-8 w-8 p-0 text-destructive hover:bg-destructive/10",children:Z===e.id?(0,a.jsx)(N.A,{className:"w-4 h-4 animate-spin"}):(0,a.jsx)(b.A,{className:"w-4 h-4"})})]})})]},e.id))})]})})})]}),(0,a.jsx)(D.lG,{open:Y,onOpenChange:ee,children:(0,a.jsxs)(D.Cf,{className:"max-w-md",children:[(0,a.jsxs)(D.c7,{children:[(0,a.jsxs)(D.L3,{className:"flex items-center gap-2 text-lg",children:[(0,a.jsx)(i.A,{className:"w-5 h-5 text-primary"})," Edit PMU Toll-Free Helpline Info"]}),(0,a.jsx)(D.rr,{children:"Update the central PMU Helpline number, email, and support hours shown on Member Dashboards."})]}),(0,a.jsxs)("div",{className:"space-y-4 py-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(P.J,{htmlFor:"hlp-phone",className:"text-xs font-semibold",children:"Toll-Free / Helpline Phone *"}),(0,a.jsx)(k.p,{id:"hlp-phone",value:K.phone,onChange:e=>Q({...K,phone:e.target.value}),placeholder:"e.g. +91 91515 90150",className:"mt-1 font-mono text-sm"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(P.J,{htmlFor:"hlp-email",className:"text-xs font-semibold",children:"Support Email Address *"}),(0,a.jsx)(k.p,{id:"hlp-email",value:K.email,onChange:e=>Q({...K,email:e.target.value}),placeholder:"e.g. [email protected]",className:"mt-1 text-sm"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(P.J,{htmlFor:"hlp-hours",className:"text-xs font-semibold",children:"Support Working Hours"}),(0,a.jsx)(k.p,{id:"hlp-hours",value:K.hours,onChange:e=>Q({...K,hours:e.target.value}),placeholder:"e.g. Mon - Sat: 9:00 AM - 6:00 PM",className:"mt-1 text-sm"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(P.J,{htmlFor:"hlp-addr",className:"text-xs font-semibold",children:"Office Location / State"}),(0,a.jsx)(k.p,{id:"hlp-addr",value:K.address,onChange:e=>Q({...K,address:e.target.value}),placeholder:"e.g. Moradabad, Uttar Pradesh",className:"mt-1 text-sm"})]})]}),(0,a.jsxs)(D.Es,{className:"gap-2",children:[(0,a.jsx)(C.$,{variant:"outline",onClick:()=>ee(!1),children:"Cancel"}),(0,a.jsxs)(C.$,{onClick:eA,disabled:et,className:"gap-2",children:[et?(0,a.jsx)(N.A,{className:"w-4 h-4 animate-spin"}):(0,a.jsx)(w.A,{className:"w-4 h-4"}),"Save Helpline Settings"]})]})]})}),(0,a.jsx)(D.lG,{open:ea,onOpenChange:el,children:(0,a.jsxs)(D.Cf,{className:"max-w-xl",children:[(0,a.jsxs)(D.c7,{children:[(0,a.jsxs)(D.L3,{className:"flex items-center gap-2 text-lg",children:[(0,a.jsx)(r.A,{className:"w-5 h-5 text-primary"}),en?"Edit PMU Contact":"Add PMU Contact Person"]}),(0,a.jsx)(D.rr,{children:"Select state and district from real Indian geographic data for accurate member assignment."})]}),(0,a.jsxs)("div",{className:"space-y-4 py-2",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(P.J,{htmlFor:"pmu-name",className:"text-xs font-semibold",children:"Contact Name *"}),(0,a.jsx)(k.p,{id:"pmu-name",value:ec.name,onChange:e=>eo({...ec,name:e.target.value}),placeholder:"e.g. Rajesh Kumar",className:"mt-1 text-sm"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(P.J,{htmlFor:"pmu-designation",className:"text-xs font-semibold",children:"Designation / Role"}),(0,a.jsx)(k.p,{id:"pmu-designation",value:ec.designation,onChange:e=>eo({...ec,designation:e.target.value}),placeholder:"e.g. State Project Lead",className:"mt-1 text-sm"})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(P.J,{htmlFor:"pmu-phone",className:"text-xs font-semibold",children:"Phone / Mobile *"}),(0,a.jsx)(k.p,{id:"pmu-phone",value:ec.phone,onChange:e=>eo({...ec,phone:e.target.value}),placeholder:"e.g. 9876543210",className:"mt-1 text-sm"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(P.J,{htmlFor:"pmu-email",className:"text-xs font-semibold",children:"Email Address"}),(0,a.jsx)(k.p,{id:"pmu-email",value:ec.email,onChange:e=>eo({...ec,email:e.target.value}
1),placeholder:"e.g. [email protected]",className:"mt-1 text-sm"})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(P.J,{className:"text-xs font-semibold",children:"State *"}),(0,a.jsxs)(z.l6,{value:ec.state,onValueChange:e=>eo({...ec,state:e,district:"All Districts"}),children:[(0,a.jsx)(z.bq,{className:"mt-1 text-xs",children:(0,a.jsx)(z.yv,{placeholder:"Select State"})}),(0,a.jsxs)(z.gC,{className:"max-h-60",children:[(0,a.jsx)(z.eb,{value:"All India",children:"All India (National)"}),L.Vd.map(e=>(0,a.jsx)(z.eb,{value:e,children:e},e))]})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(P.J,{className:"text-xs font-semibold",children:"District"}),(0,a.jsxs)(z.l6,{value:ec.district,onValueChange:e=>eo({...ec,district:e}),disabled:"All India"===ec.state,children:[(0,a.jsx)(z.bq,{className:"mt-1 text-xs",children:(0,a.jsx)(z.yv,{placeholder:"Select District"})}),(0,a.jsxs)(z.gC,{className:"max-h-60",children:[(0,a.jsx)(z.eb,{value:"All Districts",children:"All Districts"}),ef.map(e=>(0,a.jsx)(z.eb,{value:e,children:e},e))]})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(P.J,{htmlFor:"pmu-department",className:"text-xs font-semibold",children:"Department"}),(0,a.jsx)(k.p,{id:"pmu-department",value:ec.department,onChange:e=>eo({...ec,department:e.target.value}),placeholder:"e.g. PMU Operations",className:"mt-1 text-sm"})]})]}),(0,a.jsx)(U.w,{}),(0,a.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-xl border bg-muted/20",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-semibold",children:"Active Status"}),(0,a.jsx)("div",{className:"text-xs text-muted-foreground",children:"Visible to members on dashboard when active"})]}),(0,a.jsx)(M.d,{checked:ec.active,onCheckedChange:e=>eo({...ec,active:e})})]})]}),(0,a.jsxs)(D.Es,{className:"gap-2",children:[(0,a.jsx)(C.$,{variant:"outline",onClick:()=>el(!1),children:"Cancel"}),(0,a.jsxs)(C.$,{onClick:ey,disabled:ei,className:"gap-2",children:[ei?(0,a.jsx)(N.A,{className:"w-4 h-4 animate-spin"}):(0,a.jsx)(y.A,{className:"w-4 h-4"}),en?"Update Contact":"Save Contact"]})]})]})}),(0,a.jsx)(D.lG,{open:em,onOpenChange:ex,children:(0,a.jsxs)(D.Cf,{className:"max-w-2xl",children:[(0,a.jsxs)(D.c7,{children:[(0,a.jsxs)(D.L3,{className:"flex items-center gap-2",children:[(0,a.jsx)(o.A,{className:"w-5 h-5 text-brand"})," Bulk Import PMU Contacts from Excel"]}),(0,a.jsx)(D.rr,{children:"Upload an Excel (.xlsx / .xls) file containing Name, Phone, Email, State, District, and Department columns."})]}),(0,a.jsxs)("div",{className:"space-y-4 py-2",children:[(0,a.jsxs)("div",{className:"border-2 border-dashed rounded-2xl p-6 text-center bg-muted/20 hover:bg-muted/40 transition-colors",children:[(0,a.jsx)(m.A,{className:"w-10 h-10 text-brand mx-auto mb-2"}),(0,a.jsx)("div",{className:"text-sm font-semibold",children:"Select Excel File to Upload"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground mt-1 mb-4",children:"Supported formats: .xlsx, .xls"}),(0,a.jsx)(k.p,{type:"file",accept:".xlsx, .xls",onChange:e=>{let t=e.target.files?.[0];if(!t)return;let a=new FileReader;a.onload=async e=>{try{let t=await Promise.resolve().then(s.bind(s,15967)),a=t.read(e.target?.result,{type:"binary"}),l=a.SheetNames[0],n=a.Sheets[l],r=t.utils.sheet_to_json(n);if(0===r.length)return void J.toast.error("Excel file is empty");ej(r),J.toast.success(`Parsed ${r.length} rows from Excel`)}catch{J.toast.error("Failed to parse Excel file")}},a.readAsBinaryString(t)},className:"max-w-xs mx-auto text-xs"})]}),eu.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,a.jsxs)("span",{className:"text-xs font-semibold text-emerald-600 dark:text-emerald-400",children:["✓ Parsed ",eu.length," Row(s) Ready for Import"]})}),(0,a.jsxs)("div",{className:"max-h-48 overflow-y-auto border rounded-xl p-2 text-xs bg-card",children:[(0,a.jsxs)(I.XI,{children:[(0,a.jsx)(I.A0,{children:(0,a.jsxs)(I.Hj,{children:[(0,a.jsx)(I.nd,{className:"py-1",children:"Name"}),(0,a.jsx)(I.nd,{className:"py-1",children:"Phone"}),(0,a.jsx)(I.nd,{className:"py-1",children:"State"}),(0,a.jsx)(I.nd,{className:"py-1",children:"Department"})]})}),(0,a.jsx)(I.BF,{children:eu.slice(0,10).map((e,t)=>(0,a.jsxs)(I.Hj,{children:[(0,a.jsx)(I.nA,{className:"py-1 font-medium",children:e.Name||e.name||e["Contact Name"]}),(0,a.jsx)(I.nA,{className:"py-1",children:e.Phone||e.phone||e.Mobile}),(0,a.jsx)(I.nA,{className:"py-1",children:e.State||e.state||"All India"}),(0,a.jsx)(I.nA,{className:"py-1",children:e.Department||e.department||"General"})]},t))})]}),eu.length>10&&(0,a.jsxs)("div",{className:"text-center text-[10px] text-muted-foreground pt-2",children:["+ ",eu.length-10," more rows…"]})]})]})]}),(0,a.jsxs)(D.Es,{className:"gap-2",children:[(0,a.jsx)(C.$,{variant:"outline",onClick:()=>ex(!1),children:"Cancel"}),(0,a.jsxs)(C.$,{onClick:eS,disabled:eh||0===eu.length,className:"gap-2",children:[eh?(0,a.jsx)(N.A,{className:"w-4 h-4 animate-spin"}):(0,a.jsx)(o.A,{className:"w-4 h-4"}),"Import ",eu.length," Contacts"]})]})]})})]})}},52300:(e,t,s)=>{s.d(t,{q:()=>d});var a=s(95155),l=s(61792),n=s(28245),r=s(19211),i=s(12115);function d({value:e,suffix:t="",prefix:s="",duration:c=2,className:o}){let m=(0,i.useRef)(null),x=(0,l.W)(m,{once:!0,margin:"-50px"}),h=(0,n.d)(0),p=(0,r.z)(h,{duration:1e3*c,bounce:0});return(0,i.useEffect)(()=>{x&&h.set(e)},[x,e,h]),(0,i.useEffect)(()=>p.on("change",e=>
1{m.current&&(m.current.textContent=s+Math.floor(e).toLocaleString("en-IN")+t)}),[p,s,t]),(0,a.jsxs)("span",{ref:m,className:o,children:[s,"0",t]})}},69613:(e,t,s)=>{s.d(t,{A0:()=>r,BF:()=>i,Hj:()=>d,XI:()=>n,nA:()=>o,nd:()=>c});var a=s(95155);s(12115);var l=s(40980);function n({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,a.jsx)("table",{"data-slot":"table",className:(0,l.cn)("w-full caption-bottom text-sm",e),...t})})}function r({className:e,...t}){return(0,a.jsx)("thead",{"data-slot":"table-header",className:(0,l.cn)("[&_tr]:border-b",e),...t})}function i({className:e,...t}){return(0,a.jsx)("tbody",{"data-slot":"table-body",className:(0,l.cn)("[&_tr:last-child]:border-0",e),...t})}function d({className:e,...t}){return(0,a.jsx)("tr",{"data-slot":"table-row",className:(0,l.cn)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function c({className:e,...t}){return(0,a.jsx)("th",{"data-slot":"table-head",className:(0,l.cn)("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function o({className:e,...t}){return(0,a.jsx)("td",{"data-slot":"table-cell",className:(0,l.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}},86846:(e,t,s)=>{s.d(t,{E:()=>n});var a=s(95155),l=s(40980);function n({className:e,...t}){return(0,a.jsx)("div",{"data-slot":"skeleton",className:(0,l.cn)("bg-accent animate-pulse rounded-md",e),...t})}},97916:(e,t,s)=>{s.d(t,{w:()=>r});var a=s(95155);s(12115);var l=s(15763),n=s(40980);function r({className:e,orientation:t="horizontal",decorative:s=!0,...i}){return(0,a.jsx)(l.b,{"data-slot":"separator",decorative:s,orientation:t,className:(0,n.cn)("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...i})}}}]);

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.