/
home
/
infinitibizsol
/
.trash
/
static.1
/
js
/
File Upload :
llllll
Current File: /home/infinitibizsol/.trash/static.1/js/898.83d1f438.chunk.js
"use strict";(self.webpackChunk_minimal_material_kit_react=self.webpackChunk_minimal_material_kit_react||[]).push([[898],{5898:(e,t,n)=>{n.r(t),n.d(t,{default:()=>T});var o=n(5043),r=n(8185),i=n(9252),a=n(8911),s=n(5865),l=n(2110),c=n(8977),d=n(9650),u=n(1806),h=n(3460),m=n(8076),p=n(2420),v=n(3336),A=n(2500),x=n(7894),y=n(3216),g=n(9456),b=n(7154),f=n(9588),j=n(1036),w=n(9529),S=n(5869),_=n(3393),I=n(4397),C=n(9907),k=n(579);const R=(0,I.c)("pk_test_51ODisKJARDo7ZutI9zfuXZdCP0sAyicryawFWyQ71qjzVdLHLPVFUY3mm0RDg4ad60AFsaJYxP3HoloUeTzpM9WM000wawbv5I"),M=e=>{let{state:t,paymentIntent:n,paymentData:r,userInfo:I}=e;const[R,M]=(0,o.useState)({}),T=(0,y.Zp)(),D=(0,_.useStripe)(),N=(0,g.wA)();(0,o.useEffect)((()=>{let e={};r.map((t=>e[null===t||void 0===t?void 0:t.payemen_method_id]=!1)),M(e)}),[]);const L=async()=>{try{const e={headers:{"Content-Type":"application/json"}};await b.A.post("".concat(f.VY,"/subscribe/subscribe-auctioneer"),{user_id:null===I||void 0===I?void 0:I.user_id,auctioneer_id:null===t||void 0===t?void 0:t.auctioneerId},e),M(!1),N((0,C.Fn)({userId:null===I||void 0===I?void 0:I.user_id,weekId:null===t||void 0===t?void 0:t.week})),T(-2)}catch(e){M(!1),j.oR.error((null===e||void 0===e?void 0:e.message)||"Something went wrong"),console.log("[Error]",e)}};return(0,k.jsxs)(i.A,{children:[(0,k.jsx)(a.A,{direction:"column",mb:2,children:(0,k.jsx)(s.A,{variant:"h4",sx:{mb:5},children:"Select Payment Method"})}),(0,k.jsxs)(l.A,{children:[(0,k.jsxs)(a.A,{direction:"row",alignItems:"center",justifyContent:"space-between",margin:"20px",children:[(0,k.jsx)(c.A,{variant:"contained",onClick:()=>{T("/dashboard/newPaymentMehod")},children:"Add Payment Method"}),(0,k.jsxs)(a.A,{direction:"column",alignItems:"center",justifyContent:"space-between",children:[(0,k.jsxs)(s.A,{variant:"h4",sx:{mb:1},children:["Auctioneer : ",null===t||void 0===t?void 0:t.first_name]}),(0,k.jsx)(s.A,{variant:"h4",sx:{mb:1},children:"Amount : $50"})]})]}),(0,k.jsx)(A.A,{children:(0,k.jsx)(d.A,{sx:{minWidth:800},children:(0,k.jsxs)(u.A,{children:[(0,k.jsx)(x.K,{headLabel:[{id:"brand",label:"Brand",alignRight:!1},{id:"expiry",label:"Expiry",alignRight:!1},{id:"last4",label:"Card Number",alignRight:!1},{id:""},{id:""}]}),(0,k.jsxs)(h.A,{children:[null===r||void 0===r?void 0:r.map(((e,r)=>{const{card:i,payemen_method_id:a}=e,{brand:s,exp_year:l,exp_month:c,last4:d}=i;return(0,k.jsx)(o.Fragment,{children:(0,k.jsxs)(m.A,{hover:!0,tabIndex:-1,role:"checkbox",children:[(0,k.jsx)(p.A,{align:"left",children:s}),(0,k.jsx)(p.A,{align:"left",children:c+"/"+l}),(0,k.jsx)(p.A,{align:"left",children:d}),(0,k.jsx)(p.A,{align:"left",children:(0,k.jsx)(w.A,{loading:null===R||void 0===R?void 0:R[a],variant:"outlined",startIcon:(0,k.jsx)(S.A,{icon:"eva:checkmark-circle-2-outline"}),onClick:()=>(async e=>{if(!D)return;M((t=>({...t,[e]:!0})));const o=await D.confirmPayment({clientSecret:n.clientSecret,confirmParams:{payment_method:e,return_url:f.RM+"/dashboard/app/subscription-success?auctioneer_id="+(null===t||void 0===t?void 0:t.auctioneerId)},redirect:"if_required"});o.error&&(M(!1),j.oR.error(o.error.message),M((t=>({...t,[e]:!1})))),"succeeded"===o.paymentIntent.status&&(L(),M((t=>({...t,[e]:!1}))))})(a),children:"Complete Payment"})})]},a)})})),!(null!==r&&void 0!==r&&r.length)>0&&(0,k.jsx)(m.A,{style:{height:265},children:(0,k.jsx)(p.A,{align:"center",colSpan:6,sx:{py:5},children:(0,k.jsx)(v.A,{sx:{textAlign:"center"},children:(0,k.jsx)(s.A,{variant:"h4",paragraph:!0,children:"No results found"})})})})]})]})})})]})]})},T=()=>{const{state:e}=(0,y.zy)(),[t,n]=(0,o.useState)(),{userInfo:i}=(0,g.d4)((e=>e.auth)),{paymentData:a}=(0,g.d4)((e=>e.users));(0,o.useEffect)((()=>{s()}),[]);const s=async t=>{try{const t={headers:{"Content-Type":"application/json"}},{data:o}=await b.A.post("".concat(f.VY,"/payment/create-payment-intent"),{email:null===i||void 0===i?void 0:i.email,name:null===i||void 0===i?void 0:i.name,amount:50,currency:"USD",auctioneer_id:null===e||void 0===e?void 0:e.auctioneerId,user_id:null===i||void 0===i?void 0:i.user_id},t);null!==o&&void 0!==o&&o.success&&n({clientSecret:null===o||void 0===o?void 0:o.clientSecret,ephemeralKey:null===o||void 0===o?void 0:o.ephemeralKey})}catch(o){j.oR.error((null===o||void 0===o?void 0:o.message)||"Something went wrong"),console.log("[Error]",o)}};return t&&a?(0,k.jsx)(_.Elements,{stripe:R,options:t,children:(0,k.jsx)(M,{state:e,paymentIntent:t,paymentData:a,userInfo:i})}):(0,k.jsx)(r.A,{variant:"rectangular",width:"100%",height:300})}},7894:(e,t,n)=>{n.d(t,{K:()=>d,H:()=>I});var o=n(4882),r=n(8076),i=n(2420),a=n(8093),s=n(6446),l=n(579);const c={border:0,margin:-1,padding:0,width:"1px",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",clip:"rect(0 0 0 0)"};function d(e){let{order:t,orderBy:n,rowCount:d,headLabel:u,numSelected:h,onRequestSort:m,onSelectAllClick:p}=e;return(0,l.jsx)(o.A,{children:(0,l.jsx)(r.A,{children:u.map((e=>{return(0,l.jsx)(i.A,{align:e.alignRight?"right":"left",sortDirection:n===e.id&&t,children:(0,l.jsxs)(a.A,{hideSortIcon:!0,active:n===e.id,direction:n===e.id?t:"asc",onClick:(o=e.id,e=>{m(e,o)}),children:[e.label,n===e.id?(0,l.jsx)(s.A,{sx:{...c},children:"desc"===t?"sorted descending":"sorted ascending"}):null]})},e.id);var o}))})})}var u=n(4535),h=n(310),m=n(5263),p=n(9859),v=n(5865),A=n(5869),x=n(5043),y=n(8977),g=n(688),b=n(2143),f=n(9456),j=n(9907);const w=[{value:"auctioneer",label:"Auctioneer"},{value:"auction",label:"Auction"},{value:"condition_light",label:"Condition Light"},{value:"sale_status",label:"Sale Status"}];function S(e){let{weekId:t,userId:n}=e;const[o,r]=(0,x.useState)(null),[i,a]=(0,x.useState)("Auctioneer"),s=(0,f.wA)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(y.A,{color:"inherit",disableRipple:!0,onClick:e=>{r(e.currentTarget)},endIcon:(0,l.jsx)(A.A,{icon:o?"eva:chevron-up-fill":"eva:chevron-down-fill"}),children:["Filter by \xa0",(0,l.jsx)(v.A,{component:"span",variant:"subtitle2",sx:{color:"text.secondary"},children:i})]}),(0,l.jsx)(g.A,{keepMounted:!0,anchorEl:o,open:Boolean(o),onClose:()=>{r(null)},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:w.map(((e,o)=>(0,l.jsx)(b.A,{selected:"auctioneer"===e.value,onClick:()=>{return o=e.value,i=e.label,console.log("Key",o),"auctioneer"===o?s((0,j.Np)({userId:n,weekId:t})):"auction"===o?s((0,j.x1)({user_id:n,week_id:t})):"condition_light"===o?s((0,j.S4)({user_id:n,week_id:t})):"sale_status"===o&&s((0,j.yh)({user_id:n,week_id:t})),a(i),void r(null);var o,i},sx:{typography:"body2"},children:e.label},e.value+"_"+e.label)))})]})}const _=(0,u.Ay)(m.A)((e=>{let{theme:t}=e;return{height:96,display:"flex",justifyContent:"flex-end",padding:t.spacing(0,1,0,3)}}));(0,u.Ay)(p.A)((e=>{let{theme:t}=e;return{width:240,transition:t.transitions.create(["box-shadow","width"],{easing:t.transitions.easing.easeInOut,duration:t.transitions.duration.shorter}),"&.Mui-focused":{width:320,boxShadow:t.customShadows.z8},"& fieldset":{borderWidth:"1px !important",borderColor:"".concat((0,h.X4)(t.palette.grey[500],.32)," !important")}}}));function I(e){let{numSelected:t,filterName:n,onFilterName:o,weekId:r,userId:i}=e;return(0,l.jsx)(_,{sx:{...t>0&&{color:"primary.main",bgcolor:"primary.lighter"}},children:t>0?(0,l.jsxs)(v.A,{component:"div",variant:"subtitle1",children:[t," selected"]}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(S,{weekId:r,userId:i})})})}},9650:(e,t,n)=>{n.d(t,{A:()=>A});var o=n(8168),r=n(8587),i=n(5043),a=n(9292),s=n(8606),l=n(2876),c=n(4535),d=n(7056),u=n(2400);function h(e){return(0,u.Ay)("MuiTableContainer",e)}(0,d.A)("MuiTableContainer",["root"]);var m=n(579);const p=["className","component"],v=(0,c.Ay)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),A=i.forwardRef((function(e,t){const n=(0,l.A)({props:e,name:"MuiTableContainer"}),{className:i,component:c="div"}=n,d=(0,r.A)(n,p),u=(0,o.A)({},n,{component:c}),A=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},h,t)})(u);return(0,m.jsx)(v,(0,o.A)({ref:t,as:c,className:(0,a.A)(A.root,i),ownerState:u},d))}))},4882:(e,t,n)=>{n.d(t,{A:()=>g});var o=n(8168),r=n(8587),i=n(5043),a=n(9292),s=n(8606),l=n(1573),c=n(2876),d=n(4535),u=n(7056),h=n(2400);function m(e){return(0,h.Ay)("MuiTableHead",e)}(0,u.A)("MuiTableHead",["root"]);var p=n(579);const v=["className","component"],A=(0,d.Ay)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),x={variant:"head"},y="thead",g=i.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiTableHead"}),{className:i,component:d=y}=n,u=(0,r.A)(n,v),h=(0,o.A)({},n,{component:d}),g=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"]},m,t)})(h);return(0,p.jsx)(l.A.Provider,{value:x,children:(0,p.jsx)(A,(0,o.A)({as:d,className:(0,a.A)(g.root,i),ref:t,role:d===y?null:"rowgroup",ownerState:h},u))})}))},8093:(e,t,n)=>{n.d(t,{A:()=>j});var o=n(8587),r=n(8168),i=n(8606),a=n(9292),s=n(5043),l=n(5429),c=n(9662),d=n(579);const u=(0,c.A)((0,d.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");var h=n(4535),m=n(2876),p=n(6803),v=n(7056),A=n(2400);function x(e){return(0,A.Ay)("MuiTableSortLabel",e)}const y=(0,v.A)("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc"]),g=["active","children","className","direction","hideSortIcon","IconComponent"],b=(0,h.Ay)(l.A,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.active&&t.active]}})((e=>{let{theme:t}=e;return{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:(t.vars||t).palette.text.secondary},"&:hover":{color:(t.vars||t).palette.text.secondary,["& .".concat(y.icon)]:{opacity:.5}},["&.".concat(y.active)]:{color:(t.vars||t).palette.text.primary,["& .".concat(y.icon)]:{opacity:1,color:(t.vars||t).palette.text.secondary}}}})),f=(0,h.Ay)("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,t["iconDirection".concat((0,p.A)(n.direction))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:t.transitions.create(["opacity","transform"],{duration:t.transitions.duration.shorter}),userSelect:"none"},"desc"===n.direction&&{transform:"rotate(0deg)"},"asc"===n.direction&&{transform:"rotate(180deg)"})})),j=s.forwardRef((function(e,t){const n=(0,m.A)({props:e,name:"MuiTableSortLabel"}),{active:s=!1,children:l,className:c,direction:h="asc",hideSortIcon:v=!1,IconComponent:A=u}=n,y=(0,o.A)(n,g),j=(0,r.A)({},n,{active:s,direction:h,hideSortIcon:v,IconComponent:A}),w=(e=>{const{classes:t,direction:n,active:o}=e,r={root:["root",o&&"active"],icon:["icon","iconDirection".concat((0,p.A)(n))]};return(0,i.A)(r,x,t)})(j);return(0,d.jsxs)(b,(0,r.A)({className:(0,a.A)(w.root,c),component:"span",disableRipple:!0,ownerState:j,ref:t},y,{children:[l,v&&!s?null:(0,d.jsx)(f,{as:A,className:(0,a.A)(w.icon),ownerState:j})]}))}))}}]); //# sourceMappingURL=898.83d1f438.chunk.js.map
Copyright ©2k19 -
Hexid
|
Tex7ure