1 line
9.0 KiB
JavaScript
1 line
9.0 KiB
JavaScript
"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[7157],{1367:(e,n,t)=>{t.d(n,{A:()=>l});var i=t(89379),r=(t(9950),t(16491)),a=t(93230),s=t(82053),o=t(44414);const l=e=>{let{sx:n,title:t,children:l,starticon:c}=e;return(0,o.jsx)(r.A,{sx:(0,i.A)({},n),children:(0,o.jsxs)(a.A,{direction:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",gap:1,children:[(0,o.jsxs)(a.A,{children:[c&&c,(0,o.jsx)(s.A,{variant:"h3",children:t})]}),l]})})}},59212:(e,n,t)=>{t.d(n,{A:()=>c});var i=t(89379),r=t(9950),a=t(77922),s=t(29925),o=t(26910),l=t(44414);const c=(0,r.forwardRef)(((e,n)=>{let{setAppId:t,setLocoName:c,setPage:d,sx:h,textfeildSx:x}=e;const[u,A]=(0,r.useState)(JSON.parse(localStorage.getItem("applocations")||"[]"));return(0,r.useEffect)((()=>{0===u.length&&(async()=>{try{const e=localStorage.getItem("userid");if(!e)return;const n=await o.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/partners/getlocations/?userid=").concat(e));if(n.data.status){const e=[...n.data.details,{locationname:"All",applocationid:0}];localStorage.setItem("applocations",JSON.stringify(e)),A(e)}}catch(e){console.error("Error fetching locations in LocationAutocomplete:",e)}})()}),[u.length]),(0,l.jsx)(a.A,{id:"location-autocomplete",options:u||[],getOptionLabel:e=>{var n;return null!==(n=null===e||void 0===e?void 0:e.locationname)&&void 0!==n?n:""},sx:(0,i.A)({},h),onChange:(e,n,i)=>{"clear"===i?(null===t||void 0===t||t(0),null===c||void 0===c||c(""),null===d||void 0===d||d(0)):n&&(null===t||void 0===t||t(n.applocationid),null===c||void 0===c||c(n.locationname),null===d||void 0===d||d(0))},renderInput:e=>(0,l.jsx)(s.A,(0,i.A)((0,i.A)({},e),{},{inputRef:n,label:"Select Zones",sx:(0,i.A)({},x)}))})}))},82917:(e,n,t)=>{t.d(n,{A:()=>M});var i=t(57528),r=t(98587),a=t(58168),s=t(9950),o=t(72004),l=t(88283),c=t(3484);function d(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function h(e){return parseFloat(e)}var x=t(97497),u=t(59254),A=t(18463),p=t(45558),m=t(1614);function g(e){return(0,m.Ay)("MuiSkeleton",e)}(0,p.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var j,w,f,v,b=t(44414);const y=["animation","className","component","height","style","variant","width"];let S,C,k,I;const N=(0,l.i7)(S||(S=j||(j=(0,i.A)(["\n 0% {\n opacity: 1;\n }\n\n 50% {\n opacity: 0.4;\n }\n\n 100% {\n opacity: 1;\n }\n"])))),R=(0,l.i7)(C||(C=w||(w=(0,i.A)(["\n 0% {\n transform: translateX(-100%);\n }\n\n 50% {\n /* +0.5s of delay between each loop */\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(100%);\n }\n"])))),F=(0,u.Ay)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,n)=>{const{ownerState:t}=e;return[n.root,n[t.variant],!1!==t.animation&&n[t.animation],t.hasChildren&&n.withChildren,t.hasChildren&&!t.width&&n.fitContent,t.hasChildren&&!t.height&&n.heightAuto]}})((e=>{let{theme:n,ownerState:t}=e;const i=d(n.shape.borderRadius)||"px",r=h(n.shape.borderRadius);return(0,a.A)({display:"block",backgroundColor:n.vars?n.vars.palette.Skeleton.bg:(0,x.X4)(n.palette.text.primary,"light"===n.palette.mode?.11:.13),height:"1.2em"},"text"===t.variant&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:"".concat(r).concat(i,"/").concat(Math.round(r/.6*10)/10).concat(i),"&:empty:before":{content:'"\\00a0"'}},"circular"===t.variant&&{borderRadius:"50%"},"rounded"===t.variant&&{borderRadius:(n.vars||n).shape.borderRadius},t.hasChildren&&{"& > *":{visibility:"hidden"}},t.hasChildren&&!t.width&&{maxWidth:"fit-content"},t.hasChildren&&!t.height&&{height:"auto"})}),(e=>{let{ownerState:n}=e;return"pulse"===n.animation&&(0,l.AH)(k||(k=f||(f=(0,i.A)(["\n animation: "," 2s ease-in-out 0.5s infinite;\n "]))),N)}),(e=>{let{ownerState:n,theme:t}=e;return"wave"===n.animation&&(0,l.AH)(I||(I=v||(v=(0,i.A)(["\n position: relative;\n overflow: hidden;\n\n /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n &::after {\n animation: "," 2s linear 0.5s infinite;\n background: linear-gradient(\n 90deg,\n transparent,\n ",",\n transparent\n );\n content: '';\n position: absolute;\n transform: translateX(-100%); /* Avoid flash during server-side hydration */\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n }\n "]))),R,(t.vars||t).palette.action.hover)})),M=s.forwardRef((function(e,n){const t=(0,A.b)({props:e,name:"MuiSkeleton"}),{animation:i="pulse",className:s,component:l="span",height:d,style:h,variant:x="text",width:u}=t,p=(0,r.A)(t,y),m=(0,a.A)({},t,{animation:i,component:l,variant:x,hasChildren:Boolean(p.children)}),j=(e=>{const{classes:n,variant:t,animation:i,hasChildren:r,width:a,height:s}=e,o={root:["root",t,i,r&&"withChildren",r&&!a&&"fitContent",r&&!s&&"heightAuto"]};return(0,c.A)(o,g,n)})(m);return(0,b.jsx)(F,(0,a.A)({as:l,ref:n,className:(0,o.A)(j.root,s),ownerState:m},p,{style:(0,a.A)({width:u,height:d},h)}))}))},96646:(e,n,t)=>{t.d(n,{r:()=>l});var i=t(9213),r=t(21671),a=t(82917),s=t(93230),o=t(44414);const l=e=>{let{rowsPerPage:n=5,col:t=1}=e;return(0,o.jsx)(o.Fragment,{children:Array.from(new Array(n)).map(((e,n)=>(0,o.jsxs)(i.A,{children:[(0,o.jsx)(r.A,{children:(0,o.jsx)(a.A,{variant:"circular",width:24,height:24})}),(0,o.jsx)(r.A,{children:(0,o.jsx)(a.A,{variant:"text",width:30})}),Array.from({length:t}).map(((e,n)=>(0,o.jsx)(r.A,{children:(0,o.jsxs)(s.A,{spacing:.5,children:[(0,o.jsx)(a.A,{variant:"text",width:100}),(0,o.jsx)(a.A,{variant:"text",width:80})]})},n))),(0,o.jsx)(r.A,{children:(0,o.jsx)(a.A,{variant:"text",width:150})}),(0,o.jsx)(r.A,{children:(0,o.jsx)(a.A,{variant:"rounded",width:60,height:24})}),(0,o.jsx)(r.A,{align:"center",children:(0,o.jsxs)(s.A,{direction:"row",spacing:1,justifyContent:"flex-end",children:[(0,o.jsx)(a.A,{variant:"circular",width:28,height:28}),(0,o.jsx)(a.A,{variant:"circular",width:28,height:28})]})})]},n)))})}},97157:(e,n,t)=>{t.r(n),t.d(n,{default:()=>f});var i=t(9950),r=t(26910),a=t(93230),s=t(1320),o=t(15769),l=t(69780),c=t(9213),d=t(21671),h=t(34075),x=t(25277),u=t(50027),A=t(52351),p=t(1367),m=t(59212),g=t(13838),j=t(96646),w=t(44414);const f=()=>{const[e,n]=(0,i.useState)(0),[t,f]=(0,i.useState)(""),[v,b]=(0,i.useState)([]),[y,S]=(0,i.useState)([]);function C(e){return new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:2}).format(e)}function k(e){return new Intl.NumberFormat("en-IN",{minimumFractionDigits:2}).format(e)}return(0,i.useEffect)((()=>{(async()=>{S(!0);try{const n=await r.A.get("".concat("https://jupiter.nearle.app/live/api/v1","/utils/getallpricing/?applocationid=").concat(e));console.log("pricingres",n.data.details),b(n.data.details),S(!1)}catch(n){console.log("pricingres",n)}})()}),[e]),(0,w.jsxs)(w.Fragment,{children:[y&&(0,w.jsx)(A.A,{}),(0,w.jsxs)(a.A,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{my:1},children:[(0,w.jsx)(p.A,{title:"Pricing"}),(0,w.jsx)(a.A,{sx:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},children:(0,w.jsx)(m.A,{locaName:t,setAppId:n,setLocoName:f,sx:{width:{xs:"100%",custom450:300},zIndex:"100"}})})]}),(0,w.jsx)(u.A,{content:!1,sx:{mt:2},children:(0,w.jsx)(s.A,{children:(0,w.jsxs)(o.A,{children:[(0,w.jsx)(l.A,{sx:{bgcolor:"#e1bee7"},children:(0,w.jsxs)(c.A,{children:[(0,w.jsx)(d.A,{children:"S.No"}),(0,w.jsx)(d.A,{children:"Location"}),(0,w.jsx)(d.A,{align:"center",children:"Pricing Id"}),(0,w.jsx)(d.A,{children:"Name"}),(0,w.jsx)(d.A,{children:"Slab"}),(0,w.jsx)(d.A,{align:"center",children:"Base Price"}),(0,w.jsx)(d.A,{align:"center",children:"MinKm"}),(0,w.jsx)(d.A,{align:"center",children:"Price/Km"}),(0,w.jsx)(d.A,{align:"center",children:"MaxKm"}),(0,w.jsx)(d.A,{children:"Min Orders"})]})}),(0,w.jsxs)(h.A,{children:[y&&(0,w.jsx)(j.r,{col:5}),0!==(null===v||void 0===v?void 0:v.length)||y?null===v||void 0===v?void 0:v.map(((e,n)=>(0,w.jsxs)(c.A,{children:[(0,w.jsx)(d.A,{children:n+1}),(0,w.jsx)(d.A,{children:e.applocation}),(0,w.jsx)(d.A,{align:"center",children:(0,w.jsx)(x.A,{size:"small",color:"info",label:e.pricingid,sx:{width:50}})}),(0,w.jsx)(d.A,{sx:{whiteSpace:"nowrap"},children:e.appname}),(0,w.jsx)(d.A,{children:e.slab}),(0,w.jsx)(d.A,{align:"center",children:(0,w.jsx)(x.A,{size:"small",color:"primary",label:C(e.baseprice),sx:{width:100}})}),(0,w.jsx)(d.A,{align:"center",children:(0,w.jsx)(x.A,{size:"small",color:"warning",label:k(e.minkm),sx:{width:100}})}),(0,w.jsx)(d.A,{align:"center",children:(0,w.jsx)(x.A,{size:"small",color:"success",label:C(e.priceperkm),sx:{width:100}})}),(0,w.jsx)(d.A,{align:"center",children:(0,w.jsx)(x.A,{size:"small",color:"error",label:k(e.maxkm),sx:{width:100}})}),(0,w.jsx)(d.A,{children:e.minorder})]},e.pricingid||n))):(0,w.jsx)(c.A,{children:(0,w.jsx)(d.A,{colSpan:10,align:"center",children:(0,w.jsx)(g.A,{description:"No Pricing List"})})})]})]})})})]})}}}]); |