1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9928],{12162:function(e,a,s){"use strict";s.d(a,{Z:function(){return t}});var t=(0,s(30853).Z)("arrow-right","IconArrowRight",[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M13 18l6 -6",key:"svg-1"}],["path",{d:"M13 6l6 6",key:"svg-2"}]])},49801:function(e,a,s){"use strict";s.d(a,{Z:function(){return t}});var t=(0,s(30853).Z)("bell","IconBell",[["path",{d:"M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6",key:"svg-0"}],["path",{d:"M9 17v1a3 3 0 0 0 6 0v-1",key:"svg-1"}]])},36247:function(e,a,s){"use strict";s.d(a,{Z:function(){return t}});var t=(0,s(30853).Z)("bug","IconBug",[["path",{d:"M9 9v-1a3 3 0 0 1 6 0v1",key:"svg-0"}],["path",{d:"M8 9h8a6 6 0 0 1 1 3v3a5 5 0 0 1 -10 0v-3a6 6 0 0 1 1 -3",key:"svg-1"}],["path",{d:"M3 13l4 0",key:"svg-2"}],["path",{d:"M17 13l4 0",key:"svg-3"}],["path",{d:"M12 20l0 -6",key:"svg-4"}],["path",{d:"M4 19l3.35 -2",key:"svg-5"}],["path",{d:"M20 19l-3.35 -2",key:"svg-6"}],["path",{d:"M4 7l3.75 2.4",key:"svg-7"}],["path",{d:"M20 7l-3.75 2.4",key:"svg-8"}]])},83342:function(e,a,s){"use strict";s.d(a,{Z:function(){return t}});var t=(0,s(30853).Z)("currency-rupee","IconCurrencyRupee",[["path",{d:"M18 5h-11h3a4 4 0 0 1 0 8h-3l6 6",key:"svg-0"}],["path",{d:"M7 9l11 0",key:"svg-1"}]])},34625:function(e,a,s){"use strict";s.d(a,{Z:function(){return t}});var t=(0,s(30853).Z)("lasso-polygon","IconLassoPolygon",[["path",{d:"M4.028 13.252l-1.028 -3.252l2 -7l7 5l8 -3l1 9l-9 3l-5.144 -1.255",key:"svg-0"}],["path",{d:"M5 15m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M5 17c0 1.42 .316 2.805 1 4",key:"svg-2"}]])},48334:function(e,a,s){"use strict";s.d(a,{Z:function(){return t}});var t=(0,s(30853).Z)("leaf","IconLeaf",[["path",{d:"M5 21c.5 -4.5 2.5 -8 7 -10",key:"svg-0"}],["path",{d:"M9 18c6.218 0 10.5 -3.288 11 -12v-2h-4.014c-9 0 -11.986 4 -12 9c0 1 0 3 2 5h3z",key:"svg-1"}]])},19962:function(e,a,s){"use strict";s.d(a,{Z:function(){return t}});var t=(0,s(30853).Z)("plant-2","IconPlant2",[["path",{d:"M2 9a10 10 0 1 0 20 0",key:"svg-0"}],["path",{d:"M12 19a10 10 0 0 1 10 -10",key:"svg-1"}],["path",{d:"M2 9a10 10 0 0 1 10 10",key:"svg-2"}],["path",{d:"M12 4a9.7 9.7 0 0 1 2.99 7.5",key:"svg-3"}],["path",{d:"M9.01 11.5a9.7 9.7 0 0 1 2.99 -7.5",key:"svg-4"}]])},18487:function(e,a,s){"use strict";s.d(a,{Z:function(){return t}});var t=(0,s(30853).Z)("seeding","IconSeeding",[["path",{d:"M12 10a6 6 0 0 0 -6 -6h-3v2a6 6 0 0 0 6 6h3",key:"svg-0"}],["path",{d:"M12 14a6 6 0 0 1 6 -6h3v1a6 6 0 0 1 -6 6h-3",key:"svg-1"}],["path",{d:"M12 20l0 -10",key:"svg-2"}]])},33111:function(e,a,s){"use strict";s.d(a,{Z:function(){return t}});var t=(0,s(30853).Z)("settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]])},78605:function(e,a,s){"use strict";s.d(a,{Z:function(){return t}});var t=(0,s(30853).Z)("shield","IconShield",[["path",{d:"M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3",key:"svg-0"}]])},13499:function(e,a,s){"use strict";s.d(a,{Z:function(){return t}});var t=(0,s(30853).Z)("user-circle","IconUserCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 10m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]])},15710:function(e,a,s){"use strict";s.d(a,{Z:function(){return t}});var t=(0,s(30853).Z)("users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]])},34870:function(e,a,s){"use strict";s.d(a,{A:function(){return N},o:function(){return O}});var t=s(85893),n=s(67294),o=s(41664),r=s.n(o),i=s(54410),c=s(38878),d=s(24710),l=s(63213),u=s(30853),h=(0,u.Z)("building-bank","IconBuildingBank",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M3 10l18 0",key:"svg-1"}],["path",{d:"M5 6l7 -3l7 3",key:"svg-2"}],["path",{d:"M4 10l0 11",key:"svg-3"}],["path",{d:"M20 10l0 11",key:"svg-4"}
1],["path",{d:"M8 14l0 3",key:"svg-5"}],["path",{d:"M12 14l0 3",key:"svg-6"}],["path",{d:"M16 14l0 3",key:"svg-7"}]]),m=(0,u.Z)("message-2","IconMessage2",[["path",{d:"M8 9h8",key:"svg-0"}],["path",{d:"M8 13h6",key:"svg-1"}],["path",{d:"M9 18h-3a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-3l-3 3l-3 -3z",key:"svg-2"}]]),p=s(19962),v=s(33111),g=(0,u.Z)("box","IconBox",[["path",{d:"M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5",key:"svg-0"}],["path",{d:"M12 12l8 -4.5",key:"svg-1"}],["path",{d:"M12 12l0 9",key:"svg-2"}],["path",{d:"M12 12l-8 -4.5",key:"svg-3"}]]),f=s(48334),b=s(49801),y=(0,u.Z)("bulb","IconBulb",[["path",{d:"M3 12h1m8 -9v1m8 8h1m-15.4 -6.4l.7 .7m12.1 -.7l-.7 .7",key:"svg-0"}],["path",{d:"M9 16a5 5 0 1 1 6 0a3.5 3.5 0 0 0 -1 3a2 2 0 0 1 -4 0a3.5 3.5 0 0 0 -1 -3",key:"svg-1"}],["path",{d:"M9.7 17l4.6 0",key:"svg-2"}]]),k=s(78605),x=s(36247),M=(0,u.Z)("address-book","IconAddressBook",[["path",{d:"M20 6v12a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2z",key:"svg-0"}],["path",{d:"M10 16h6",key:"svg-1"}],["path",{d:"M13 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-2"}],["path",{d:"M4 8h3",key:"svg-3"}],["path",{d:"M4 12h3",key:"svg-4"}],["path",{d:"M4 16h3",key:"svg-5"}]]),Z=s(12162),j=s(36425);let N=e=>{let{isLoggedIn:a}=e,{canShowPath:s,loading:o}=(0,j.r)(),u=(0,n.useMemo)(()=>[{name:"Dashboard Home",path:"/dashboard/home",description:"KPIs and analytics cards",icon:h},{name:"Chat",path:"/dashboard/chat",description:"FAQ, feedback and training",icon:m},{name:"Crops",path:"/dashboard/crops",description:"Crop and season level management",icon:p.Z},{name:"Accounts",path:"/dashboard/accounts",description:"Users, roles and operations",icon:v.Z},{name:"Catalogue",path:"/dashboard/catalogue",description:"Products, categories, SKUs and stores",icon:g},{name:"Forest indices",path:"/dashboard/ffvi",description:"FFVI forests, indices date ranges and data collection",icon:f.Z},{name:"Notifications",path:"/dashboard/accounts/notifications",description:"Manual and automated notifications",icon:b.Z},{name:"Smart Advisory",path:"/dashboard/accounts/smartadvisory",description:"Farm smart advisory generation and settings",icon:y},{name:"Accounts-Admins",path:"/dashboard/accounts/admin",description:"Admin users and dashboard module access",icon:k.Z},{name:"Season Pass",path:"/dashboard/accounts/seasonpass",description:"Season pass users",icon:k.Z},{name:"App Logs",path:"/dashboard/accounts/app-logs",description:"Mobile crashes, auth/farm journey events",icon:x.Z},{name:"Leads & Enquiries",path:"/dashboard/leads",description:"Website demo requests, status, calls and reminders",icon:M}],[]),N=(0,n.useMemo)(()=>u.filter(e=>s(e.path)),[u,s]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.h4,{isLoggedIn:a}),(0,t.jsxs)("div",{className:"bg-[#F5F5F5] min-h-screen px-[4vw] py-6",children:[(0,t.jsx)("p",{className:"uppercase font-semibold mb-1",children:"Dashboard"}),(0,t.jsx)(i.x,{size:"sm",c:"dimmed",mb:"lg",children:"Quick internal links based on your access."}),o?(0,t.jsx)(c.Z,{className:"bg-white p-5",children:"Loading access..."}):(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:N.map(e=>(0,t.jsx)(r(),{href:e.path,className:"no-underline",children:(0,t.jsxs)(c.Z,{className:"bg-white p-4 h-full border border-gray-200 hover:border-blue-300 transition-colors",style:{boxShadow:"0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08)"},children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsx)("div",{className:"rounded-full w-10 h-10 bg-[#eff2f7] flex items-center justify-center",children:(0,t.jsx)(e.icon,{stroke:1.8,className:"text-[#2e96ff]",size:20})}),(0,t.jsx)(d.C,{color:"gray",variant:"light",size:"sm",children:"Internal"})]}),(0,t.jsx)(i.x,{fw:600,mt:"sm",mb:4,children:e.name}),(0,t.jsx)(i.x,{size:"sm",c:"dimmed",lineClamp:2,children:e.description}),(0,t.jsxs)("div",{className:"mt-3 text-blue-600 flex items-center gap-1 text-sm font-medium",children:["Open ",(0,t.jsx)(Z.Z,{size:15})]})]})},e.path))}),!o&&0===N.length&&(0,t.jsx)(c.Z,{className:"bg-white p-5 mt-4",children:(0,t.jsx)(i.x,{size:"sm",c:"dimmed",children:"No dashboard links are available for your account."})})]})]})};var I=s(45007),F=s(21493),w=s(40174),C=s(98450),S=s(13499),A=s(15710),B=s(34625),z=s(18487),P=s(83342),E=s(93319),U=s(55678),L=s(72795);let O=e=>{let{isLoggedIn:a}
1=e,[s,o]=(0,n.useState)({}),[r,i]=(0,n.useState)(0),[d,u]=(0,n.useState)({}),[h,m]=(0,n.useState)({}),[p,v]=(0,n.useState)([]),[g,f]=(0,n.useState)(0),[b,y]=(0,n.useState)({count:0,totalAmount:0}),[k,x]=(0,n.useState)({count:0,totalAmount:0}),[M,Z]=(0,n.useState)({count:0,totalAmount:0}),{userGroupData:j}=(0,I.v9)(e=>e.user),N=(0,I.v9)(e=>e.farmInfo.allFarmCount),O=(0,I.v9)(e=>e.farmInfo.farmsWithSubscriptionCount),_=(0,I.v9)(e=>e.farmInfo.activeFarms),G=(0,I.v9)(e=>e.farmInfo.farmsWithCoordinates),R=(0,C.TL)();(0,n.useEffect)(()=>{(null==j?void 0:j.length)<=0&&R((0,F.q)())},[R,j]),(0,n.useEffect)(()=>{R((0,w.rI)()),R((0,w.pI)()),R((0,w.Pj)()),R((0,w.wm)())},[R]),(0,n.useEffect)(()=>{(async()=>{try{let e=await (0,L.bG)();u(e)}catch(e){U.Am.error((null==e?void 0:e.message)||"Failed to load crop area data")}})()},[]);let H=(0,n.useMemo)(()=>{var e;return[{name:"Clients",icon:S.Z,number:(null==s?void 0:s.noOfUsers)||0},{name:"Accounts",icon:A.Z,number:r||0},{name:"Farmers",icon:A.Z,number:N||0},{name:"Partnered Services",icon:A.Z,number:"NAN"},{name:"No of Farms",icon:B.Z,number:"".concat((null==G?void 0:G.count)||0," / ").concat((null==G?void 0:G.totalHectares)||0," ha")},{name:"Active Farms",icon:B.Z,number:"".concat((null==_?void 0:_.count)||0," / ").concat((null==_?void 0:_.totalHectares)||0," ha")},{name:"Subscribed Farms",icon:B.Z,number:O},{name:"Crops",icon:z.Z,number:(null==h?void 0:null===(e=h.labels)||void 0===e?void 0:e.length)||0},{name:"Collections",icon:P.Z,number:"".concat((null==p?void 0:p.length)||0," / ").concat(g||0," INR")},{name:"Business Users",icon:P.Z,number:"".concat((null==M?void 0:M.count)||0," / ").concat((null==M?void 0:M.totalAmount)||0," INR")},{name:"BizFarms",icon:P.Z,number:"".concat((null==b?void 0:b.count)||0," / ").concat((null==b?void 0:b.totalAmount)||0," INR")},{name:"Premium Users",icon:P.Z,number:"".concat((null==k?void 0:k.count)||0," / ").concat((null==k?void 0:k.totalAmount)||0," INR")},{name:"Product Categories",icon:B.Z,number:O},{name:"Core Products",icon:B.Z,number:O},{name:"SKUs",icon:B.Z,number:O},{name:"Stores",icon:B.Z,number:O}]},[s,r,G,_,h,p,M,b,k,g,N,O]);return(0,n.useEffect)(()=>{let e=async()=>{try{let e=await (0,E.oK)("NonTrial");e.length>0&&v(e)}catch(e){U.Am.error(e.message)}};p&&0!==p.length||e()},[p]),(0,n.useEffect)(()=>{(null==p?void 0:p.length)!==0&&f(p.reduce((e,a)=>e+parseFloat(a.amountPaid||0),0))},[p]),(0,n.useEffect)(()=>{if(!p||0===p.length)return;let e=p.reduce((e,a)=>{let s=a.subscriptionType,t=parseFloat(a.amountPaid||0);return("BizFarms"===s||"Premium"===s||"Business"===s)&&(e[s]||(e[s]={count:0,totalAmount:0}),e[s].count+=1,e[s].totalAmount+=t),e},{});e.BizFarms&&y(e.BizFarms),e.Premium&&x(e.Premium),e.Business&&Z(e.Business)},[p]),(0,n.useEffect)(()=>{(null==j?void 0:j.length)<=0||(o(null==j?void 0:j.find(e=>(null==e?void 0:e.userGroupName)==="Client")),i(null==j?void 0:j.reduce((e,a)=>"Field Officer"===a.userGroupName||"Manager"===a.userGroupName||"Observer"===a.userGroupName||"Internal Client"===a.userGroupName||"Sub Client"===a.userGroupName?e+a.noOfUsers:e,0)))},[j]),(0,n.useEffect)(()=>{if(Object.keys(d||{}).length<=0)return;let e=Object.keys(d),a=Object.values(d).map(e=>parseFloat(e.toFixed(2))),s=["#02b2af","#2e96ff","#b800d8"],t=e.map((e,a)=>s[a%s.length]);m({labels:e,datasets:[{data:a,backgroundColor:t}]})},[d]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.h4,{isLoggedIn:a}),(0,t.jsxs)("div",{className:"bg-[#F5F5F5] px-[4vw] min-h-screen",children:[(0,t.jsx)("p",{className:"uppercase font-semibold py-6",children:"Dashboard Home"}),(0,t.jsx)("div",{className:"relative flex-col items-center justify-center",children:(0,t.jsx)("div",{className:"flex flex-wrap pr-[12vw]",children:H.map((e,a)=>(0,t.jsx)(c.Z,{className:"w-[300px] bg-white h-[88px] p-4 mb-4 mr-4",style:{boxShadow:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"},children:(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[13px] text-normal text-[#74788D]",children:e.name}),(0,t.jsx)("div",{children:e.number})]}),(0,t.jsx)("div",{className:"rounded-full w-10 h-10 bg-[#eff2f7] flex items-center justify-center",children:(0,t.jsx)(e.icon,{stroke:2,className:"text-[#59e5a7]",size:22})})]})},a))})})]})]})}},9008:function(e,a,s){e.exports=s(6665)},24710:function(e,a,s){"use strict";s.d(a,{C:function(){return p}});var t=s(85893);s(67294);var n=s(69429),o=s(13637),r=s(2979),i=s(90987),c=s(46976),d=s(58278),l=s(43362),u={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};let h={},m=(0,o.Z)((e,{radius:a,color:s,gradient:t,variant:o,size:i,autoContrast:c})=>{let d=e.variantColorResolver({color:s||e.primaryColor,theme:e,gradient:t,variant:o||"filled",autoContrast:c});return{root:{"--badge-height":(0,n.ap)(i,"badge-height"),"--badge-padding-x":(0,n.ap)(i,"badge-padding-x"),"--badge-fz":(0,n.ap)(i,"badge-fz"),"--badge-radius":void 0===a?void 0:(0,n.H5)(a),"--badge-bg":s||o?d.background:void 0,"--badge-color":s||o?d.color:void 0,"--badge-bd":s||o?d.border:void 0,"--badge-dot-color":"dot"===o?(0,r.p)(s,e):void 0}}}),p=(0,l.b)((e,a)=>{let s=(0,i.w)("Badge",h,e),{classNames:n,className:o,style:r,styles:l,unstyled:p,vars:v,radiu
1s:g,color:f,gradient:b,leftSection:y,rightSection:k,children:x,variant:M,fullWidth:Z,autoContrast:j,circle:N,mod:I,...F}=s,w=(0,c.y)({name:"Badge",props:s,classes:u,className:o,style:r,classNames:n,styles:l,unstyled:p,vars:v,varsResolver:m});return(0,t.jsxs)(d.x,{variant:M,mod:[{block:Z,circle:N,"with-right-section":!!k,"with-left-section":!!y},I],...w("root",{variant:M}),ref:a,...F,children:[y&&(0,t.jsx)("span",{...w("section"),"data-position":"left",children:y}),(0,t.jsx)("span",{...w("label"),children:x}),k&&(0,t.jsx)("span",{...w("section"),"data-position":"right",children:k})]})});p.classes=u,p.displayName="@mantine/core/Badge"}}]);
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.