PageSourceSearch

https://aff.wifly.co.il/static/PayoutsListView-CW4cqfv1.js

js wifly.co.il collected 2026-10-01 16:03:04 UTC 6,790 bytes, 2 lines download raw bytes

1import{a7 as q,j as t,aZ as j,b2 as ae,b as V,M as C,m as Y,A as h,f as oe,c as k,bo as re,E as ie,a9 as n,bg as ne,b3 as G,b8 as le,b5 as ce,B as b,cx as de,bk as w,Z as E,iC as ue,bl as U,bm as $,c7 as me,P as fe,iD as ye,I as z,K as H}from"./index-tSDSGNZs.js";import{P as W}from"./PriceFromat-sbbXw0kU.js";import{g as xe}from"./payoutActions-CQBRYFPD.js";import{C as he}from"./ColoredLabel-DzUFQSzW.js";import{H as pe}from"./Header-DBkRScxH.js";import{D as ge}from"./DataGrid-BciRv3wS.js";import{D as je}from"./datagridUtils-BM7CCuWV.js";import{P as be}from"./PaymentMethodViewDrawer-CZjAxJzL.js";import{A as Ce}from"./AutoCompleteFormik-CCH-agDe.js";import"./index-RemrO-0t.js";import"./Tabs-DaLmw1t7.js";import"./LastPage-DGhR5chT.js";import"./TableCell-BrrFBAt-.js";import"./debugUtils-ByMxgS5z.js";const N={APPROVED:{key:"approved",value:0},PENDING:{key:"pending",value:1},DECLINED:{key:"declined",value:2}},Se=Y(o=>({root:{},action:{marginBottom:o.spacing(1),"& + &":{marginLeft:o.spacing(1)}},actionIcon:{marginRight:o.spacing(1)}}));function Z({formikProps:o,intl:p,fetchData:S,loading:d,..._}){Se();const{values:r,isSubmitting:u,setFieldValue:m,handleChange:I,resetForm:v}=o,P=D=>{const i=D();m("startDate",i==null?void 0:i[0]),m("endDate",i==null?void 0:i[1])};return t.jsxs(j,{container:!0,spacing:3,alignItems:"center",children:[t.jsx(j,{item:!0,lg:4,md:6,xl:4,xs:12,children:t.jsx(ae,{isSingle:!1,value:[r==null?void 0:r.startDate,r==null?void 0:r.endDate],setValue:P})}),t.jsx(j,{item:!0,lg:2,md:3,xl:2,xs:6,children:t.jsx(Ce,{elements:r.statuses,formikProps:o,field:"selectedStatuses",placeholder:p.formatMessage({id:"statuses"})})}),t.jsxs(j,{item:!0,lg:6,md:3,xl:6,xs:6,gap:2,display:"flex",justifyContent:"flex-end",children:[t.jsx(V,{sx:{ml:1},color:"primary",variant:"outlined",disabled:u,onClick:()=>v(),children:t.jsx(C,{id:"clear_filters"})}),t.jsx(V,{color:"primary",variant:"contained",loading:d,disabled:u,onClick:()=>{S()},children:t.jsx(C,{id:"filter"})})]})]})}Z.propTypes={className:h.string,formikProps:h.any,intl:h.any};const ve=q(Z),Pe=Y(o=>({root:{backgroundColor:o.palette.background.dark,minHeight:"100%",paddingBottom:o.spacing(3)}}));function K({intl:o,embedded:p=!1}){var L,A;const S=oe(),d=k(re),_=k(e=>{var s,a;return(a=(s=e==null?void 0:e.company)==null?void 0:s.currency)==null?void 0:a.sign}),{defaultDateFilter:r,splitUsersBalances:u}=k(ie),m=Pe(),[I,v]=n.useState([]),[P,D]=n.useState(0),[i,R]=n.useState(!0),[O,T]=n.useState(null),[f,J]=n.useState({page:0,pageSize:10}),[y,Q]=n.useState([{field:"creationDate",sort:"desc"}]),M=(e,s)=>{R(!0),xe(e,s==null?void 0:s.page,s==null?void 0:s.pageSize,y==null?void 0:y[0]).then(a=>{a!=null&&a.content&&(v(a.content),D(a==null?void 0:a.totalElements))}).catch(a=>{}).finally(()=>{R(!1)})},X=e=>{S.push(`/app/affiliate/payouts/invoices/${e}`)},ee={startDate:n.useMemo(()=>{var e;return d?ne(d):(e=G)==null?void 0:e[r??"CURRENT_YEAR"].getValue()[0]},[d,r]),endDate:(L=G)==null?void 0:L[r??"CURRENT_YEAR"].getValue()[1],startDatePickerState:!1,endDatePickerState:!1,statuses:Object.values(N).map(e=>({label:o.formatMessage({id:e.key}),value:e.key.toUpperCase()})),selectedStatuses:[],selectedTimePeriodId:(A=ye.LAST_YEAR.key)==null?void 0:A.toUpperCase()},x=le({initialValues:ee,onSubmit:async(e,{setErrors:s,setStatus:a,setSubmitting:l})=>{try{await M(e,f)}catch(c){a({success:!1}),s({submit:c.message}),l(!1)}},validateOnChange:!1}),te=n.useMemo(()=>[{field:"requestedCommission",headerName:o.formatMessage({id:"requested_commission"}),flex:1,renderCell:e=>{var s,a;return t.jsx(W,{value:e.value,currency:(a=(s=e.row)==null?void 0:s.currencyObject)==null?void 0:a.code})}},{field:"requestedCommissionWithTax",headerName:t.jsx(C,{id:"total_commission_with_tax"}),flex:1,renderCell:e=>{var s,a;return t.jsx(W,{value:e.value,currency:(a=(s=e.row)==null?void 0:s.currencyObject)==null?void 0:a.code})}},{field:"creationDate",headerName:o.formatMessage({id:"created_at"}),flex:1,renderCell:e=>ce(e.value)},{field:"status",headerName:o.formatMessage({id:"status"}),flex:1,renderCell:e=>{var l,c,g,B;const s=N,a=e.value===N.APPROVED.value;return t.jsxs(b,{style:{display:"flex",justifyContent:"center",alignItems:"center",gap:2},children:[t.jsx(he,{color:(l=de[Object.keys(s)[e.value]])==null?void 0:l.color,children:o.formatMessage({id:((c=Object.keys(s)[e.value])==null?void 0:c.toLowerCase())??" "})}),!!((g=e.row)!=null&&g.reason)&&t.jsx(w,{title:(B=e.row)==null?void 0:B.reason,children:t.jsx(E,{size:"large",children:t.jsx(ue,{})})}),a&&t.jsx(w,{title:o.formatMessage({id:"view_invoice"}),children:t.jsx(E,{onClick:()=>X(e.row.identity),children:t.jsx(U,{icon:$.actions.payoutInvoice})})})]})}},{field:"paymentMethodName",headerName:o.formatMessage({id:"payment_method"}),flex:1,sortable:!1,renderCell:e=>{var l,c;const s=((l=e.row)==null?void 0:l.preferredPayoutSettingsObject)??null;let a="-";return s!==null?a=`${e.value===null?"":e.value}
2             (${s==null?void 0:s.title})`:e.value?a=e.value:(c=e.row)!=null&&c.adminOverride&&(a=t.jsx(C,{id:"admin_not_set_payment_method"})),t.jsxs(b,{sx:{display:"flex",alignItems:"center",gap:.5,minWidth:0,width:"100%"},children:[s&&t.jsx(w,{title:o.formatMessage({id:"view"}),children:t.jsx(E,{size:"small",onClick:g=>{g.stopPropagation(),T(s)},children:t.jsx(U,{icon:$.actions.eye})})}),t.jsx(b,{sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a})]})}},{field:"currencyObject",headerName:o.formatMessage({id:"currency"}),sortable:!1,valueGetter:e=>{var s,a;return((a=(s=e.row)==null?void 0:s.currencyObject)==null?void 0:a.code)||"-"}},{field:"balanceType",headerName:o.formatMessage({id:"balance_type"}),sortable:!1,delete:!u},{field:"merchantComment",headerName:o.formatMessage({id:"comment"}),flex:1}].filter(e=>!(e!=null&&e.delete)),[o,_,u]);n.useEffect(()=>{M(x.values,f)},[f,y]);const se=()=>M(x.values,f),F=t.jsxs(b,{mt:p?0:3,children:[t.jsx(z,{children:t.jsx(H,{children:t.jsx(ve,{formikProps:x,header:"payouts",fetchData:se,loading:i})})}),t.jsx("br",{}),t.jsx(z,{children:t.jsx(H,{sx:{py:1},children:t.jsx(ge,{rows:I,columns:te,name:je.payoutList,paginationModel:f,onPaginationModelChange:J,pagination:!0,getRowId:e=>e.identity,paginationMode:"server",sortingMode:"server",sortModel:y,onSortModelChange:Q,rowCount:P,loading:i})})}),t.jsx(be,{open:!!O,onClose:()=>T(null),method:O})]});return p?t.jsx("form",{onSubmit:x.handleSubmit,children:F}):t.jsx(me,{redirect:!0,children:t.jsx("form",{className:m.root,onSubmit:x.handleSubmit,children:t.jsxs(fe,{className:m.root,title:"Payouts List",children:[t.jsx(pe,{title:"all_payouts",breadcrumbs:[{title:"dashboard",link:"/"},{title:"payouts",link:""}],includeTitle:!1}),F]})})})}K.propTypes={intl:h.any,embedded:h.bool};const Ve=q(K);export{Ve as default};

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.