1"use strict";(globalThis.webpackChunkpaxpay_vtu=globalThis.webpackChunkpaxpay_vtu||[]).push([[5551],{3054(e,a,n){n.d(a,{A:()=>t});n(5043);var s=n(3216),i=n(579);function t(e){let{title:a,backTo:n,icon:t,action:r}=e;const l=(0,s.Zp)();return(0,i.jsxs)("div",{className:"page-hdr",children:[(0,i.jsx)("button",{className:"page-hdr-back",onClick:()=>l(n||-1),children:(0,i.jsx)("i",{className:"fas fa-arrow-left"})}),(0,i.jsxs)("div",{className:"page-hdr-title",children:[t&&(0,i.jsx)("i",{className:`fas ${t} page-hdr-icon`}),(0,i.jsx)("h2",{children:a})]}),(0,i.jsx)("div",{className:"page-hdr-action",children:r||(0,i.jsx)("span",{})})]})}},5551(e,a,n){n.r(a),n.d(a,{default:()=>c});var s=n(5043),i=n(3768),t=n(4512),r=n(6047),l=n(3054),o=n(579);function c(){const[e,a]=(0,s.useState)(1),[n,c]=(0,s.useState)({code:"",new_pin:"",confirm_pin:""}),[d,m]=(0,s.useState)(!1),u=e=>a=>c(n=>({...n,[e]:a.target.value}));return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(l.A,{title:"Manage PIN",icon:"fa-key"}),(0,o.jsxs)("div",{className:"pin-page a a1",children:[(0,o.jsxs)("div",{className:"pin-info-banner",children:[(0,o.jsx)("i",{className:"fas fa-lock pin-info-icon"}),(0,o.jsxs)("div",{children:[(0,o.jsx)("b",{children:"Transaction PIN"}),(0,o.jsx)("p",{children:"Your 5-digit PIN is required to authorise all transactions and transfers."})]})]}),1===e&&(0,o.jsxs)("div",{className:"page-card a a2",children:[(0,o.jsx)("div",{className:"page-card-hdr",children:(0,o.jsx)("h3",{children:"Change Transaction PIN"})}),(0,o.jsxs)("div",{className:"page-card-body",children:[(0,o.jsx)("p",{style:{fontSize:13.5,color:"var(--text-muted)",marginBottom:20,fontWeight:500,lineHeight:1.6},children:"We'll send a verification code to your registered email address. Enter it along with your new PIN on the next step."}),(0,o.jsx)("button",{className:"btn btn-primary btn-full btn-md",onClick:async()=>{m(!0);try{const{data:e}=await(0,t.iF)();"success"===e.status?(i.Ay.success(e.msg||"Code sent to your email."),a(2)):i.Ay.error(e.msg||"Failed to send code.")}catch(e){i.Ay.error((0,r.vG)(e))}finally{m(!1)}},disabled:d,children:d?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:"spinner"})," Sending code\u2026"]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("i",{className:"fas fa-paper-plane"})," Send Verification Code"]})})]})]}),2===e&&(0,o.jsxs)("div",{className:"page-card a a2",children:[(0,o.jsx)("div",{className:"page-card-hdr",children:(0,o.jsx)("h3",{children:"Enter New PIN"})}),(0,o.jsx)("div",{className:"page-card-body",children:(0,o.jsxs)("form",{onSubmit:async e=>{if(e.preventDefault(),n.code&&n.new_pin&&n.confirm_pin)if(n.new_pin===n.confirm_pin){m(!0);try{const{data:e}=await(0,t.br)(n);"success"===e.status?(i.Ay.success("PIN updated successfully!"),a(1),c({code:"",new_pin:"",confirm_pin:""})):i.Ay.error(e.msg||"Update failed.")}catch(s){i.Ay.error((0,r.vG)(s))}finally{m(!1)}}else i.Ay.error("PINs do not match.");else i.Ay.error("Fill all fields.")},children:[(0,o.jsxs)("div",{className:"svc-field",children:[(0,o.jsx)("label",{className:"form-label",children:"Verification Code"}),(0,o.jsx)("input",{className:"form-control",type:"text",placeholder:"Code from email",maxLength:6,inputMode:"numeric",value:n.code,onChange:u("code")})]}),(0,o.jsxs)("div",{className:"svc-field",children:[(0,o.jsx)("label",{className:"form-label",children:"New PIN (5 digits)"}),(0,o.jsx)("input",{className:"form-control",type:"password",placeholder:"\u2022\u2022\u2022\u2022\u2022",maxLength:5,inputMode:"numeric",value:n.new_pin,onChange:u("new_pin")})]}),(0,o.jsxs)("div",{className:"svc-field",children:[(0,o.jsx)("label",{className:"form-label",children:"Confirm New PIN"}),(0,o.jsx)("input",{className:"form-control",type:"password",placeholder:"\u2022\u2022\u2022\u2022\u2022",maxLength:5,inputMode:"numeric",value:n.confirm_pin,onChange:u("confirm_pin")})]}),(0,o.jsx)("button",{type:"submit",className:"btn btn-primary btn-full btn-md",disabled:d,children:d?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:"spinner"})," Updating\u2026"]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("i",{className:"fas fa-key"})," Update PIN"]})}),(0,o.jsx)("button",{type:"button",className:"btn btn-ghost btn-full btn-md",style:{marginTop:8},onClick:()=>a(1),children:"\u2190 Resend Code"})]})})]})]})]})}},6047(e,a,n){n.d(a,{JU:()=>m,Js:()=>d,On:()=>o,Yq:()=>i,fF:()=>t,tj:()=>s,vG:()=>r,xv:()=>l});const s=function(e){let a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];
1const n=(parseFloat(e)||0).toLocaleString("en-NG",{minimumFractionDigits:2,maximumFractionDigits:2});return a?`\u20a6${n}`:n},i=function(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return"\u2014";const n=new Date(e);if(isNaN(n))return e;const s={day:"numeric",month:"short",year:"numeric"};return a&&(s.hour="2-digit",s.minute="2-digit",s.hour12=!0),n.toLocaleDateString("en-GB",s)},t=e=>{if(!e)return"";const a=Math.floor((Date.now()-new Date(e))/1e3);return a<60?"just now":a<3600?`${Math.floor(a/60)}m ago`:a<86400?`${Math.floor(a/3600)}h ago`:a<604800?`${Math.floor(a/86400)}d ago`:i(e)},r=e=>{var a,n,s,i;return(null===e||void 0===e||null===(a=e.response)||void 0===a||null===(n=a.data)||void 0===n?void 0:n.msg)||(null===e||void 0===e||null===(s=e.response)||void 0===s||null===(i=s.data)||void 0===i?void 0:i.message)||(null===e||void 0===e?void 0:e.message)||"Something went wrong."},l=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40;return e?e.length>a?e.slice(0,a)+"\u2026":e:""},o=()=>`TXN-${Date.now()}-${Math.random().toString(36).slice(2,7).toUpperCase()}`,c={0:{label:"Success",badge:"badge-success"},1:{label:"Failed",badge:"badge-danger"},2:{label:"Pending",badge:"badge-warning"},5:{label:"Processing",badge:"badge-warning"}},d=e=>c[parseInt(e)]||{label:"Unknown",badge:"badge-muted"},m=["Abia","Adamawa","Akwa Ibom","Anambra","Bauchi","Bayelsa","Benue","Borno","Cross River","Delta","Ebonyi","Edo","Ekiti","Enugu","FCT","Gombe","Imo","Jigawa","Kaduna","Kano","Katsina","Kebbi","Kogi","Kwara","Lagos","Nasarawa","Niger","Ogun","Ondo","Osun","Oyo","Plateau","Rivers","Sokoto","Taraba","Yobe","Zamfara"]}}]); 2//# sourceMappingURL=5551.f51a66af.chunk.js.map
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.