1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[922],{1928:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/dppForms/religion-ethnicity",function(){return s(24829)}])},24829:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});var a=s(37876),i=s(77328),n=s.n(i),l=s(45580),c=s(73382);let o=()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n(),{children:(0,a.jsx)("title",{children:"Edit Religion and Ethnicity | Jeevansathi Matrimony"})}),(0,a.jsx)(l.A,{})]}),r=o;o.getLayout=e=>(0,a.jsx)(c.O,{showTopBar:!1,showNavigation:!1,children:e})},45580:(e,t,s)=>{"use strict";s.d(t,{A:()=>N});var a=s(37876),i=s(98727),n=s(42592),l=s(12815),c=s(14232),o=s(81590),r=s(61920),u=s(45382),h=s(35770),p=s(45226),g=s(77328),m=s.n(g),d=s(49896),f=s(53147),S=s(66843),E=s(74218),C=s(42283),x=s(77489),j=s(69130),v=s(97503),y=s(21797),b=s(89099);let N=e=>{let{isCrmPanel:t=!1}=e,{flashMessage:s,flashError:g}=(0,y.J)(),[N,R]=(0,c.useState)(!1),A=(0,b.useRouter)(),{source:G}=A.query,{setValues:M,loadDppDefaultValues:T,...w}=(0,o.useRematchDispatch)(e=>e.editDpp),{resetMatchCountData:D}=(0,o.useRematchDispatch)(e=>e.matchesCount),I=(0,o.useRematchSelector)(e=>e.profileFieldOptions.options),{values:_,dataLoaded:O,initialState:X}=(0,o.useRematchSelector)(e=>e.editDpp);(0,c.useEffect)(()=>{O||T()},[O,T]);let k=_.RELIGION.map(e=>String(e)),P=w.setReligions,q=(0,c.useMemo)(()=>Object.fromEntries(I.religion.map(e=>{let{value:t,label:s}=e;return[t,s]})),[I.religion]),L=(0,c.useMemo)(()=>I.sect.filter(e=>k.includes(e.parent)).map(e=>({...e,religion:q[e.parent]})),[I.sect,k,q]),Y=L.length>0,$=_.SECT.map(e=>String(e)),F=w.setSects,U=(0,o.useRematchDispatch)(e=>e.selfDetails.fetchSelfInfo);(0,c.useEffect)(()=>{let e=new Set(L.map(e=>e.value)),t=$.filter(t=>e.has(t));t.length<$.length&&F(t)},[L,F,$]),(0,c.useEffect)(()=>{Y||F([])},[Y,F]);let B=(0,c.useMemo)(()=>(0,i.Ie)({caste:I.caste,subcaste:I.subcaste,casteGroup:I.casteGroup,religions:I.religion,sects:I.sect}).filter(e=>k.includes(e.religionId)||(0===$.length&&k.includes("2")?["151","152"]:$).some(t=>t===e.religionId)),[I.caste,I.subcaste,I.casteGroup,I.religion,I.sect,$,k]),V=B.length>0,J=_.CASTE.map(e=>String(e)),z=w.setCastes;(0,c.useEffect)(()=>{let e=new Set(B.filter(i.S0).map(e=>e.caste)),t=J.filter(t=>e.has(t));J.length!=t.length&&z(t)},[B,J,z]);let H=_.SUBCASTE.map(e=>String(e)),K=w.setSubcastes;(0,c.useEffect)(()=>{let e=new Set(B.filter(i.S0).filter(e=>null!=e.subCaste).map(e=>e.subCaste)),t=H.filter(t=>e.has(t));H.length!=t.length&&K(t)},[B,H,K]);let Q=_.CASTEGROUPID.map(e=>String(e)),W=w.setCasteGroups;(0,c.useEffect)(()=>{let e=new Set(B.filter(i.GS).map(e=>e.value)),t=Q.filter(t=>e.has(t));Q.length!=t.length&&W(t)},[B,Q,W]),(0,c.useEffect)(()=>{V||(z([]),K([]),W([]))},[V,z,W,K]);let Z=k.some(e=>i.bz.includes(e)),ee=_.MANGLIK,et=w.setManglikStatus;(0,c.useEffect)(()=>{!Z&&ee.length>0&&et([])},[ee.length,et,Z]);let es=_.MTONGUE.map(e=>String(e)),ea=w.setMotherTongues,ei=(0,o.useRematchDispatch)(e=>e.myMatchesResults.removeCache),en=A.asPath.includes("/dppCrm");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(m(),{children:(0,a.jsx)("title",{children:"Edit Religion and Ethnicity | Jeevansathi Matrimony"})}),(0,a.jsx)(u.A,{heading:"".concat(n.Y$,"Religion & Ethnicity"),subheading:"Update these details to get suitable matches",className:"space-y-8 px-0 lg:px-17",backToDpp:!0,onSave:()=>{(0,l.Qv)({initialState:X,newState:_,setLoading:R,MyMatchesCatcheBurst:ei,source:Array.isArray(G)?G[0]:null!=G?G:"editDpp"}).then(e=>{e.error?g({message:j.y[p.tG[e.error]]||j.y[p.tG.XXXXXXX],ttl:6e3}):(M(_),t||U(),A.asPath.includes("/dppCrm")&&D(!1),setTimeout(()=>s({message:n.o3,ttl:n.HP}),500))}).finally(()=>(()=>{let e=A.asPath.includes("/dppCrm");A.push("".concat(e?(0,S.s5)("dppCrm"):(0,S.s5)("editDpp"),"#").concat(l.Gv.RELIGION))})())},saveButtonDisable:!1,loading:N,children:O?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(E.A,{id:"custom-qa-religion",options:I.religion,value:k,onChange:P,className:"",title:"".concat(n.Y$,"Religion")}),!en&&(0,a.jsx)(x.a,{title:"Religions",setValues:e=>P(Array.from(new Set([...k,...e]))),type:"RELIGION",selectedValues:k})]}),Y&&(0,a.jsx)(C.A,{id:"custom-qa-sect",options:L,value:$,onChange:F,className:"mb-8",title:"".concat(n.Y$,"Sect")}),V&&(0,a.jsx)(r.A,{id:"custom-qa-caste",options:B,value:{castes:J,subcastes:H,casteGroups:Q},onChange:e=>{z(e.castes),K(e.subcastes),W(e.casteGroups)},className:"mb-8",title:"".concat(n.Y$,"Caste")}),(0,a.jsxs)("div",{children:[(0,a.jsx)(f.A,{id:"custom-qa-mother-tongue",options:I.mtongue,value:es,onChange:ea,className:"",fieldTitle:"".concat(n.Y$,"Mother Tongue")}),!en&&(0,a.jsx)(x.a,{title:"Mother Tongue(s)",setValues:e=>ea(Array.from(new Set([...es,...e]))),type:"MTONGUE",selectedValues:es})]}),Z&&(0,a.jsx)(d.A,{id:"custom-qa-manglik",options:v.sE,value:ee,onChange:et,className:"mb-8",fieldTitle:"".concat(n.Y$,"Manglik Status")})]}):(0,a.jsx)(h.o,{})})]})}}},e=>{e.O(0,[2815,2367,139,8986,3350,636,6593,8792],()=>e(e.s=1928)),_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.