PageSourceSearch

https://client.apikurir.id/_next/static/chunks/pages/partner-0fc645c41f00c339.js

js apikurir.id collected 2026-10-02 06:30:17 UTC 13,339 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8551],{86548:function(n,e,i){"use strict";i.d(e,{Z:function(){return l}});var t=i(1413),a=i(67294),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},c=i(89099),s=function(n,e){return a.createElement(c.Z,(0,t.Z)((0,t.Z)({},n),{},{ref:e,icon:r}))};s.displayName="EditOutlined";var l=a.forwardRef(s)},72269:function(n,e,i){"use strict";i.d(e,{Z:function(){return y}});var t=i(77322),a=i(94184),r=i.n(a),c=i(87462),s=i(4942),l=i(97685),d=i(91),o=i(67294),h=i(21770),g=i(15105),u=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],p=o.forwardRef(function(n,e){var i,t=n.prefixCls,a=void 0===t?"rc-switch":t,p=n.className,w=n.checked,x=n.defaultChecked,m=n.disabled,S=n.loadingIcon,I=n.checkedChildren,$=n.unCheckedChildren,f=n.onClick,M=n.onChange,b=n.onKeyDown,v=(0,d.Z)(n,u),k=(0,h.Z)(!1,{value:w,defaultValue:x}),Z=(0,l.Z)(k,2),j=Z[0],P=Z[1];function E(n,e){var i=j;return m||(P(i=n),null==M||M(i,e)),i}var C=r()(a,p,(i={},(0,s.Z)(i,"".concat(a,"-checked"),j),(0,s.Z)(i,"".concat(a,"-disabled"),m),i));return o.createElement("button",(0,c.Z)({},v,{type:"button",role:"switch","aria-checked":j,disabled:m,className:C,ref:e,onKeyDown:function(n){n.which===g.Z.LEFT?E(!1,n):n.which===g.Z.RIGHT&&E(!0,n),null==b||b(n)},onClick:function(n){var e=E(!j,n);null==f||f(e,n)}}),S,o.createElement("span",{className:"".concat(a,"-inner")},o.createElement("span",{className:"".concat(a,"-inner-checked")},I),o.createElement("span",{className:"".concat(a,"-inner-unchecked")},$)))});p.displayName="Switch";var w=i(53124),x=i(98866),m=i(97647),S=i(45353),I=i(63329),$=i(67968),f=i(45503),M=i(14747);let b=n=>{let{componentCls:e}=n,i=`${e}-inner`;return{[e]:{[`&${e}-small`]:{minWidth:n.switchMinWidthSM,height:n.switchHeightSM,lineHeight:`${n.switchHeightSM}px`,[`${e}-inner`]:{paddingInlineStart:n.switchInnerMarginMaxSM,paddingInlineEnd:n.switchInnerMarginMinSM,[`${i}-checked`]:{marginInlineStart:`calc(-100% + ${n.switchPinSizeSM+2*n.switchPadding}px - ${2*n.switchInnerMarginMaxSM}px)`,marginInlineEnd:`calc(100% - ${n.switchPinSizeSM+2*n.switchPadding}px + ${2*n.switchInnerMarginMaxSM}px)`},[`${i}-unchecked`]:{marginTop:-n.switchHeightSM,marginInlineStart:0,marginInlineEnd:0}},[`${e}-handle`]:{width:n.switchPinSizeSM,height:n.switchPinSizeSM},[`${e}-loading-icon`]:{top:(n.switchPinSizeSM-n.switchLoadingIconSize)/2,fontSize:n.switchLoadingIconSize},[`&${e}-checked`]:{[`${e}-inner`]:{paddingInlineStart:n.switchInnerMarginMinSM,paddingInlineEnd:n.switchInnerMarginMaxSM,[`${i}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${i}-unchecked`]:{marginInlineStart:`calc(100% - ${n.switchPinSizeSM+2*n.switchPadding}px + ${2*n.switchInnerMarginMaxSM}px)`,marginInlineEnd:`calc(-100% + ${n.switchPinSizeSM+2*n.switchPadding}px - ${2*n.switchInnerMarginMaxSM}px)`}},[`${e}-handle`]:{insetInlineStart:`calc(100% - ${n.switchPinSizeSM+n.switchPadding}px)`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${i}`]:{[`${i}-unchecked`]:{marginInlineStart:n.marginXXS/2,marginInlineEnd:-n.marginXXS/2}},[`&${e}-checked ${i}`]:{[`${i}-checked`]:{marginInlineStart:-n.marginXXS/2,marginInlineEnd:n.marginXXS/2}}}}}}},v=n=>{let{componentCls:e}=n;return{[e]:{[`${e}-loading-icon${n.iconCls}`]:{position:"relative",top:(n.switchPinSize-n.fontSize)/2,color:n.switchLoadingIconColor,verticalAlign:"top"},[`&${e}-checked ${e}-loading-icon`]:{color:n.switchColor}}}},k=n=>{let{componentCls:e}=n,i=`${e}-handle`;return{[e]:{[i]:{position:"absolute",top:n.switchPadding,insetInlineStart:n.switchPadding,width:n.switchPinSize,height:n.switchPinSize,transition:`all ${n.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:n.colorWhite,borderRadius:n.switchPinSize/2,boxShadow:n.switchHandleShadow,transition:`all ${n.switchDuration} ease-in-out`,content:'""'}},[`&${e}-checked ${i}`]:{insetInlineStart:`calc(100% - ${n.switchPinSize+n.switchPadding}px)`},[`&:not(${e}-disabled):active`]:{[`${i}::before`]:{insetInlineEnd:n.switchHandleActiveInset,insetInlineStart:0},[`&${e}-checked ${i}::before`]:{insetInlineEnd:0,insetInlineStart:n.switchHandleActiveInset}}}}},Z=n=>{let{componentCls:e}=n,i=`${e}-inner`;return{[e]:{[i]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:n.switchInnerMarginMax,paddingInlineEnd:n.switchInnerMarginMin,transition:`padding-inline-start ${n.switchDuration} ease-in-out, padding-inline-end ${n.switchDuration} ease-in-out`,[`${i}-checked, ${i}-unchecked`]:{display:"block",color:n.colorTextLightSolid,fontSize:n.fontSizeSM,transition:`margin-inline-start ${n.switchDuration} ease-in-out, margin-inline-end ${n.switchDuration} ease-in-out`,pointerEvents:"none"},[`${i}-checked`]:{marginInlineStart:`calc(-100% + ${n.switchPinSize+2*n.switchPadding}px - ${2*n.switchInnerMarginMax}px)`,marginInlineEnd:`calc(100% - ${n.switchPinSize+2*n.switchPadding}px + ${2*n.switchInnerMarginMax}px)`},[`${i}-unchecked`]:{marginTop:-n.switchHeight,marginInlineStart:0,marginInlineEnd:0}},[`&${e}-checked ${i}`]:{paddingInlineStart:n.switchInnerMarginMin,paddingInlineEnd:n.switchInnerMarginMax,[`${i}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${i}-unchecked`]:{marginInlineStart:`calc(100% - ${n.switchPinSize+2*n.switchPadding}px + ${2*n.switchInnerMarginMax}px)`,marginInlineEnd:`calc(-100% + ${n.switchPinSize+2*n.switchPadding}px - ${2*n.switchInnerMarginMax}px)`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${i}`]:{[`${i}-unchecked`]:{marginInlineStart:2*n.switchPadding,marginInlineEnd:-(2*n.switchPadding)}},[`&${e}-checked ${i}`]:{[`${i}-checked`]:{marginInlineStart:-(2*n.switchPadding),marginInlineEnd:2*n.switchPadding}}}}}},j=n=>{let{componentCls:e}=n;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,M.Wf)(n)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:n.switchMinWidth,height:n.switchHeight,lineHeight:`${n.switchHeight}px`,verticalAlign:"middle",background:n.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${n.motionDurationMid}`,userSelect:"none",[`&:hover:not(${e}-disabled)`]:{background:n.colorTextTertiary}}),(0,M.Qy)(n)),{[`&${e}-checked`]:{background:n.switchColor,[`&:hover:not(${e}-disabled)`]:{background:n.colorPrimaryHover}},[`&${e}-loading, &${e}-disabled`]:{cursor:"not-allowed",opacity:n.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${e}-rtl`]:{direction:"rtl"}})}};var P=(0,$.Z)("Switch",n=>{let e=n.fontSize*n.lineHeight,i=n.controlHeight/2,t=e-4,a=i-4,r=(0,f.TS)(n,{switchMinWidth:2*t+8,switchHeight:e,switchDuration:n.motionDurationMid,switchColor:n.colorPrimary,switchDisabledOpacity:n.opacityLoading,switchInnerMarginMin:t/2,switchInnerMarginMax:t+2+4,switchPadding:2,switchPinSize:t,switchBg:n.colorBgContainer,switchMinWidthSM:2*a+4,switchHeightSM:i,switchInnerMarginMinSM:a/2,switchInnerMarginMaxSM:a+2+4,switchPinSizeSM:a,switchHandleShadow:`0 2px 4px 0 ${new I.C("#00230b").setAlpha(.2).toRgbString()}`,switchLoadingIconSize:.75*n.fontSizeIcon,switchLoadingIconColor:`rgba(0, 0, 0, ${n.opacityLoading})`,switchHandleActiveInset:"-30%"});return[j(r),Z(r),k(r),v(r),b(r)]}),E=function(n,e){var i={};for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&0>e.indexOf(t)&&(i[t]=n[t]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,t=Object.getOwnPropertySymbols(n);a<t.length;a++)0>e.indexOf(t[a])&&Object.prototype.propertyIsEnumerable.call(n,t[a])&&(i[t[a]]=n[t[a]]);return i};let C=o.forwardRef((n,e)=>{var{prefixCls:i,size:a,disabled:c,loading:s,className:l,rootClassName:d}=n,h=E(n,["prefixCls","size","disabled","loading","className","rootClassName"]);let{getPrefixCls:g,direction:u}=o.useContext(w.E_),I=o.useContext(m.Z),$=o.useContext(x.Z),f=g("switch",i),M=o.createElement("div",{className:`${f}-handle`},s&&o.createElement(t.Z,{className:`${f}-loading-icon`})),[b,v]=P(f),k=r()({[`${f}-small`]:"small"===(a||I),[`${f}-loading`]:s,[`${f}-rtl`]:"rtl"===u},l,d,v);return b(o.createElement(S.Z,null,o.createElement(p,Object.assign({},h,{prefixCls:f,className:k,disabled:(null!=c?c:$)||s,ref:e,loadingIcon:M}))))});C.__ANT_SWITCH=!0;var y=C},34043:function(n,e,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/partner",function(){return i(37091)}])},50349:function(n,e,i){"use strict";var t=i(85893),a=i(83473),r=i(7851),c=i(76920),s=i(67294);let l=(0,s.forwardRef)((n,e)=>{let{url:i,search:l,pageSize:d=10,className:o,rowKey:h,pageSizeOptions:g=[10,20,50,100],setCustomLoading:u=()=>{},onLoad:p}=n,w={current:1,pageSize:d,pageSizeOptions:g,showSizeChanger:!0,showTotal:n=>"Total ".concat((0,a.W_)(n))}
1,[x,m]=(0,s.useState)([]),[S,I]=(0,s.useState)(!1),[$,f]=(0,s.useState)({pagination:w}),M=(n,e,i)=>{f({pagination:n,filters:e,...i})},b=()=>{I(!0),u&&u(!0),i&&r.api.get(i,{params:{search:JSON.stringify(l),current:$.pagination.current,pageSize:$.pagination.pageSize,sort:$.field?"".concat($.field,":").concat($.order||"descend"):void 0}}).then(n=>{let{data:e,total:i}=n.data;I(!1),u&&u(!1),m(e),p&&"function"==typeof p&&p(n.data),f({...$,pagination:{...w,...$.pagination,total:i}})}).catch(n=>{I(!1),u&&u(!1)})};(0,s.useEffect)(()=>{b()},[$.field,$.order,$.pagination.current,$.pagination.pageSize]);let v=(0,s.useRef)(!0);return(0,s.useEffect)(()=>{if(v.current){v.current=!1;return}$.pagination.current>1?f(n=>({...n,pagination:{...n.pagination,current:1}})):b()},[l,i]),e&&(e.reload=b,e.loading=S),(0,t.jsx)("div",{className:o,children:(0,t.jsx)(c.Z,{...n,rowKey:n=>"function"==typeof h?h(n):n.id||n._id,pagination:$.pagination,dataSource:x,loading:S,onChange:M,scroll:{x:!0}})})});e.Z=l},37091:function(n,e,i){"use strict";i.r(e),i.d(e,{default:function(){return k}});var t=i(85893),a=i(67294),r=i(9008),c=i.n(r),s=i(50349),l=i(3321),d=i(73016),o=i(71577),h=i(4393),g=i(86548),u=i(7851),p=i(92477),w=i(26855),x=i(72269),m=i(11486),S=i(99330),I=i(32808),$=i(71230),f=i(15746);let M=n=>{let{id:e,table:i}=n,[r]=p.Z.useForm(),[c,s]=(0,a.useState)(!1);(0,a.useEffect)(()=>{s(!0),u.api.post("/api/user/partner",{id:e}).then(n=>{let{data:e}=n;r.setFieldsValue(e.data),s(!1)}).catch(()=>{s(!1)})},[]);let l=n=>{s(!0),u.api.post("/api/user/partner/"+e,n).then(n=>{let{data:e}=n;w.Z.success({message:"Berhasil merubah!",type:"success"}),i&&i.reload(),s(!1)}).catch(()=>{s(!1)})};return(0,t.jsx)("div",{children:(0,t.jsxs)(p.Z,{onFinish:l,form:r,layout:"vertical",disabled:c,children:[(0,t.jsx)(p.Z.Item,{name:"isPartnerLive",label:"Active",valuePropName:"checked",children:(0,t.jsx)(x.Z,{})}),(0,t.jsx)(p.Z.Item,{name:"partnerCode",label:"Partner code",children:(0,t.jsx)(m.Z,{})}),(0,t.jsx)(p.Z.Item,{name:"openApiRegisterUrl",label:"Callback register api",children:(0,t.jsx)(m.Z,{})}),(0,t.jsx)(p.Z.Item,{name:"partnerExtraDiscount",label:"Extra discount cashback (%)",children:(0,t.jsx)(S.Z,{min:0})}),(0,t.jsx)(p.Z.Item,{name:"access",label:"Access",children:(0,t.jsx)(I.Z.Group,{style:{width:"100%"},children:(0,t.jsxs)($.Z,{children:[(0,t.jsx)(f.Z,{span:8,children:(0,t.jsx)(I.Z,{value:"lead",children:"Lead"})}),(0,t.jsx)(f.Z,{span:8,children:(0,t.jsx)(I.Z,{value:"register",children:"Register"})}),(0,t.jsx)(f.Z,{span:8,children:(0,t.jsx)(I.Z,{value:"user-list",children:"User List"})}),(0,t.jsx)(f.Z,{span:8,children:(0,t.jsx)(I.Z,{value:"discount",children:"Discount"})}),(0,t.jsx)(f.Z,{span:8,children:(0,t.jsx)(I.Z,{value:"invoice",children:"Invoice"})}),(0,t.jsx)(f.Z,{span:8,children:(0,t.jsx)(I.Z,{value:"webhook",children:"Webhook"})}),(0,t.jsx)(f.Z,{span:8,children:(0,t.jsx)(I.Z,{value:"custom_no_order",children:"Custom No. Order"})})]})})}),(0,t.jsx)(o.ZP,{loading:c,type:"primary",htmlType:"submit",children:"Simpan"})]})})},b=()=>{let n=(0,a.useRef)(),{modal:e}=l.Z.useApp(),i=n=>{e.info({title:"Manage Partner",closable:!0,icon:null,footer:null,content:(0,t.jsx)(M,{id:n})})};return(0,t.jsx)(h.Z,{title:"Daftar Partner",children:(0,t.jsx)(s.Z,{ref:n,url:"/api/user/partner",columns:[{title:"Nama",dataIndex:"name",render:n=>(0,t.jsx)(d.Z.Text,{children:n})},{title:"Email",dataIndex:"email",render:n=>(0,t.jsx)(d.Z.Text,{children:n})},{title:"Status",dataIndex:"isPartnerLive",render:n=>(0,t.jsx)(d.Z.Text,{children:n?"Active":"Inactive"})},{title:"Action",dataIndex:"id",render:n=>(0,t.jsx)(o.ZP,{onClick:()=>i(n),icon:(0,t.jsx)(g.Z,{}),children:"Manage"})}]})})};function v(){return(0,t.jsxs)(a.Fragment,{children:[(0,t.jsxs)(c(),{children:[(0,t.jsx)("title",{children:"Daftar Partner"}),(0,t.jsx)("meta",{name:"Daftar Partner",content:"Daftar Partner Lincah.id"})]}),(0,t.jsx)("main",{children:(0,t.jsx)(b,{})})]})}v.layout="main";var k=v}},function(n){n.O(0,[4310,4393,2808,5742,4533,6920,9330,9774,2888,179],function(){return n(n.s=34043)}),_N_E=n.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.