PageSourceSearch

https://umroh.in/assets/BankEdit-g7XIk2g1.js

js umroh.in collected 2026-10-01 15:05:09 UTC 7,086 bytes, 1 lines download raw bytes

1import{x as R,ah as S,a9 as u,A as H,aL as V,e as q,M as F,j as a,k as J,l as O,I as c,aK as W,ae as B,P as $,E as z,F as A,v as G,p as K}from"./index-D7Q1wY-x.js";import{r as C}from"./vendor-CBu0QuCz.js";import{H as D}from"./HeaderTransactionPage-COElB9a8.js";import{B as U}from"./Button-XTQGSwkw.js";import{L as Q}from"./LeaveConfirmationModal-C6AefQ_o.js";import{I as X}from"./InputListModalV2-Ddo9GWH8.js";import"./ArrowLeft-D5zIeGcK.js";/* empty css               */import"./MenuModal-OqoLYtT-.js";import"./X-Brf8dUEL.js";/* empty css               */import"./ArrowTop-BFk-t2FW.js";const ma=()=>{var x,h,f,g,b,j,N,_;const{enqueueSnackbar:d}=R(),[w,m]=C.useState(!1),{getAffiliateBank:v,updateAffiliateBank:y,affiliateState:r}=S();u(()=>{v()},[]);const{paymentsState:t,fetchPaymentChannelAll:E}=H(),[I,L]=V();u(()=>{E()},[]);const p=q(),s=F({mode:"onChange",defaultValues:{account_number:"",account_holder_name:"",bank:{id:"",type:""}}});C.useEffect(()=>{if(r!=null&&r.affiliateBank&&(t!=null&&t.paymentChannel)){const n=t.paymentChannel.find(o=>{var i;return o.id===((i=r==null?void 0:r.affiliateBank)==null?void 0:i.bank_id)});s.reset({account_number:r.affiliateBank.account_number||"",account_holder_name:r.affiliateBank.account_holder_name||"",bank:n||{id:"",type:""}})}},[r==null?void 0:r.affiliateBank,t==null?void 0:t.paymentChannel,s]);const P=()=>{var n,o,i;return{account_number:((n=r==null?void 0:r.affiliateBank)==null?void 0:n.account_number)||"",account_holder_name:((o=r==null?void 0:r.affiliateBank)==null?void 0:o.account_holder_name)||"",bank:((i=t==null?void 0:t.paymentChannel)==null?void 0:i.find(e=>{var l;return e.id===((l=r==null?void 0:r.affiliateBank)==null?void 0:l.bank_id)}))||{id:"",type:""},bank_code:"",bank_name:""}};u(()=>{const n=o=>{o.detail.register(10,()=>{m(!0)})};return document.addEventListener("ionBackButton",n),()=>{document.removeEventListener("ionBackButton",n)}},[]);const M=async n=>{var o,i,e;try{I({mode:"ios"});const l={id:(o=r==null?void 0:r.affiliateBank)==null?void 0:o.id,account_number:n==null?void 0:n.account_number,account_holder_name:n==null?void 0:n.account_holder_name,bank_id:(i=n==null?void 0:n.bank)==null?void 0:i.id,bank_name:n==null?void 0:n.bank_name,bank_code:(e=n==null?void 0:n.bank_name)==null?void 0:e.toUpperCase()};await y(l),d("Berhasil memperbarui informasi bank",{variant:"success"}),p.push("/affiliate/performance","root","replace")}catch(l){d("Terjadi kesalahan",{variant:"error"})}finally{L()}},k=()=>{p.push("/affiliate/bank","back")},T=()=>{const n=s.watch(),o=P();JSON.stringify(n)===JSON.stringify(o)?k():m(!0)};return a.jsx("form",{onSubmit:s.handleSubmit(M),children:a.jsxs(J,{children:[a.jsx(D,{handleBack:T,title:"Atur Informasi Bank"}),a.jsx(O,{className:"ion-padding",children:a.jsx("div",{className:"space-y-4 divide-y -m-4 font-poppins",children:a.jsxs("div",{className:"space-y-4 ion-padding",children:[a.jsx("p",{className:"font-poppinspy-2 text-sm",children:"Masukkan data akun pencairan yang nantinya akan digunakan untuk mengirim komisi yang Anda dapatkan."}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(c,{className:"!text-sm !font-medium !text-ui-gray-700 mt-10",children:"Akun Pencairan"}),a.jsx(W,{name:"bank",control:s.control,rules:{required:"Akun pencairan harus dipilih"},render:({field:{onChange:n,value:o}})=>{var i;return a.jsx(X,{name:"bank",setValue:e=>n(e),titleModal:"Akun Pencairan",placeholder:"Pilih akun pencairan",labelKey:"code",value:o,data:(i=t==null?void 0:t.paymentChannel)==null?void 0:i.filter(e=>e.code!=="ARTAJASA"&&e.code!=="SAHABAT_SAMPOERNA"),className:"!font-poppins ".concat(o?"!pl-16":""),renderLabel:e=>"".concat(e.code),renderItem:(e,l)=>a.jsx($,{className:"ion-no-padding",children:a.jsxs(z,{className:"flex justify-center items-center",children:[a.jsx(A,{size:"auto",className:"mr-4",children:e!=null&&e.logo?a.jsx(B,{src:e==null?void 0:e.logo,className:"w-[60px] relative"}):a.jsx("span",{className:"text-4xl",children:"🏦"})}),a.jsx(A,{children:a.jsx("div",{className:"font-medium text-sm",children:e==null?void 0:e.name})})]})},l),rightElement:e=>{if(e)return e!=null&&e.logo?a.jsx(B,{src:e==null?void 0:e.logo,className:"w-[60px] absolute left-3 top-0 h-full flex items-center"}):a.jsx("span",{className:"text-4xl absolute left-3 top-0 h-full flex items-center",children:"🏦"})}})}}),((x=s.formState.errors)==null?void 0:x.bank)&&a.jsx("p",{className:"text-xs text-red-500",children:(h=s.formState.errors.bank)==null?void 0:h.message})]}),((f=s.watch("bank"))==null?void 0:f.type)==="CREATE"&&a.jsxs("div",{className:"space-y-2",children:[a.jsx(c,{className:"!text-sm !font-medium !text-ui-gray-700 mt-10",children:"Nama Bank"}),a.jsx("input",{"aria-label":"Custom input",type:"text",placeholder:"Masukkan nama bank",className:"w-full py-[10px] px-3 bg-transparent border rounded-lg border-ui-gray-300 focus:outline-none",color:"none",autoComplete:"off",...s.register("bank_name",{required:"Nama bank wajib diisi"})}),s.formState.errors&&s.formState.errors.bank_name&&a.jsx("span",{className:"text-xs text-red-600",children:(g=s.formState.errors.bank_name)==null?void 0:g.message})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(c,{className:"!text-sm !font-medium !text-ui-gray-700 mt-10",children:((b=s.watch("bank"))==null?void 0:b.type)==="EWALLET"?"Nomor HP":"Nomor Rekening"}),a.jsx("input",{"aria-label":"Custom input",type:"number",placeholder:"Masukkan nomor ".concat(((j=s.watch("bank"))==null?void 0:j.type)==="EWALLET"?"HP":"rekening"),className:"w-full py-[10px] px-3 bg-transparent border rounded-lg border-ui-gray-300 focus:outline-none",color:"none",autoComplete:"off",...s.register("account_number",{required:"Nomor aku
1n pencairan wajib diisi"})}),s.formState.errors&&s.formState.errors.account_number&&a.jsx("span",{className:"text-xs text-red-600",children:(N=s.formState.errors.account_number)==null?void 0:N.message})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(c,{className:"!text-sm !font-medium !text-ui-gray-700 mt-10",children:"Nama Pemilik Akun"}),a.jsx("input",{"aria-label":"Custom input",type:"text",placeholder:"Masukkan nama pemilik akun",className:"w-full py-[10px] px-3 bg-transparent border rounded-lg border-ui-gray-300 focus:outline-none",color:"none",autoComplete:"off",...s.register("account_holder_name",{required:"Nama pemilik akun wajib diisi"})}),s.formState.errors&&s.formState.errors.account_holder_name&&a.jsx("span",{className:"text-xs text-red-600",children:(_=s.formState.errors.account_holder_name)==null?void 0:_.message}),a.jsx("div",{className:"!pt-2",children:a.jsx("p",{className:"text-sm",children:"Gunakan nama & nomor HP / nomor rekening yang benar untuk memudahkan pengecekan data."})})]})]})})}),a.jsx(G,{className:"border-t ion-no-padding",children:a.jsx(K,{className:"[--background:white] [--border-width:0px!important] !shadow-none !p-2 ",children:a.jsx(U,{loading:s.formState.isSubmitting,type:"submit",size:"large",label:"Simpan",className:"!rounded-full !font-poppins"})})}),a.jsx(Q,{onLeave:k,show:w,setShow:m})]})})};export{ma 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.