1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[66],{19713:function(e,t,s){"use strict";var n=s(65988),a=s(67294),r=s(85893);t.Z=function(e){var t=e.id,s=e.label,i=e.checked,o=void 0!==i&&i,l=e.disabled,u=void 0!==l&&l,d=e.onChange;return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)("div",{className:"jsx-3009064724 form-group",children:[(0,r.jsx)("input",{type:"checkbox",name:t,id:t,defaultChecked:o,checked:o,disabled:u,onChange:d,className:"jsx-3009064724"}),(0,r.jsx)("label",{htmlFor:t,className:"jsx-3009064724",children:s})]}),(0,r.jsx)(n.default,{id:"3009064724",children:[".form-group.jsx-3009064724{box-sizing:border-box;margin-bottom:1rem;position:relative;}",".form-group.jsx-3009064724 label.jsx-3009064724{font-family:'Volvo Novum',sans-serif;font-size:14px;-webkit-transition:all 100ms ease-in-out;transition:all 100ms ease-in-out;cursor:default;}",".checkbox-group.jsx-3009064724 label.jsx-3009064724{font-family:'Volvo Novum',sans-serif;font-size:14px;}"]})]})}},17998:function(e,t,s){"use strict";var n,a=s(49711),r=s(52209),i=s(50319),o=(0,s(57241).ZP)(n||(n=(0,r.Z)(["\n mutation updateCustomerState(\n $site: String!\n $customerId: String!\n $key: String!\n $value: Boolean!\n ) {\n updateCustomerState(\n site: $site\n customerId: $customerId\n key: $key\n value: $value\n ) {\n id\n }\n }\n"])));t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},t=(0,i.D)(o,{onCompleted:e}),s=(0,a.Z)(t,1),n=s[0];return function(e,t,s,a){return n({variables:{site:e,customerId:t,key:s,value:a}})}}},63643:function(e,t,s){"use strict";s.r(t),s.d(t,{__N_SSP:function(){return fe},default:function(){return pe}});var n,a,r,i,o,l,u=s(67294),d=s(51604),c=s(98203),x=s(11163),m=s(65988),f=s(74626),p=s(29509),j=s(30266),h=s(40037),b=s(49711),v=s(809),g=s.n(v),S=s(16103),w=s(82930),C=s(59152),y=s(85273),N=s(10585),k=s(83045),Z=s(73845),I=s(60935),V=s(85893),D=function(e){var t,s=e.customer,n=(0,f.Z)(),a=(0,u.useState)(s.address.company),r=a[0],i=a[1],o=(0,u.useState)(s.address.address1),l=o[0],d=o[1],c=(0,u.useState)(s.address.address2),x=c[0],m=c[1],p=(0,u.useState)(s.address.city),v=p[0],D=p[1],$=(0,u.useState)(s.address.postalCode),T=$[0],P=$[1],_=(0,u.useState)(s.address.country),A=_[0],U=_[1],E=(0,u.useState)(s.address.state),O=E[0],R=E[1],L=(0,u.useState)(s.address.phone),F=L[0],B=L[1],z=(0,u.useState)(!0),J=z[0],G=z[1],q=(0,u.useState)(""),H=q[0],M=q[1],Y=(0,w.Z)(),W=(0,b.Z)(Y,1)[0],X=(0,y.Z)(),K=(0,N.Z)(),Q=function(e){return{label:e.name,value:e.stateCode}},ee=K.filter((function(e){return"US"===e.code||"CA"===e.code||"PR"===e.code||"SE"===e.code})).map((function(e){return{label:e.name,value:e.code}})),te=function(){var e=(0,j.Z)(g().mark((function e(t){var n,a,i,o,u,d;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),M(""),l&&v&&T&&A&&O&&F){e.next=5;break}return M("All fields are required, except for Company and Address 2."),e.abrupt("return");case 5:if(!(r.length>50)){e.next=8;break}return M("Company name cannot exceed 50 characters."),e.abrupt("return");case 8:if(n=/^\d-\d{3}-\d{3}-\d{4}$/,/^\d{3}-\d{3}-\d{4}$/.test(F)||n.test(F)){e.next=13;break}return M("Invalid phone number format."),e.abrupt("return");case 13:return a={id:s.id,accountId:"VTI",username:s.username,firstName:s.firstName,lastName:s.lastName,address:{attention:"".concat(s.firstName," ").concat(s.lastName),company:r,address1:l,address2:x,county:"",country:A,city:v,state:O,postalCode:T,phone:F,email:s.address.email},attributes:s.attributes},i=function(e,t){return"__typename"===e?void 0:t},o=JSON.parse(JSON.stringify(s.attributes),i),a.attributes=o,e.next=19,W({input:a});case 19:u=e.sent,(d=u.data).editCustomer3.error?M(d.editCustomer3.error):M("Successfully updated address details.");case 22:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),se=n&&(null===n||void 0===n||null===(t=n.customer)||void 0===t?void 0:t.permissions.some((function(e){return"GDST"===e})));return(0,V.jsxs)("form",{children:[(0,V.jsx)("h2",{children:"Address"}),(0,V.jsx)(S.Z,{id:"addressCompany",label:"Company",type:"text",maxLength:50,defaultValue:r,onChange:function(e){return i(e.target.value)}}),(0,V.jsx)(S.Z,{id:"address1",label:"Address 1",type:"text",defaultValue:l,onCh
1ange:function(e){G(!1),d(e.target.value)}}),(0,V.jsx)(S.Z,{id:"address2",label:"Address 2",type:"text",defaultValue:x,onChange:function(e){return m(e.target.value)}}),(0,V.jsx)(k.Z,{id:"addressCountry",label:"Country",value:A,options:[{label:"- Choose One -",value:""}].concat((0,h.Z)(ee)),onChange:function(e){G(!1),U(e.target.value)}}),(0,V.jsx)(S.Z,{id:"addressCity",label:"City",type:"text",defaultValue:v,onChange:function(e){G(!1),D(e.target.value)}}),(0,V.jsx)(S.Z,{id:"addressPostalCode",label:"Postal code",type:"text",defaultValue:T,onChange:function(e){G(!1),P(e.target.value)}}),function(){var e=X.filter((function(e){return e.countryCode===A})).map(Q);return e.length?(0,V.jsx)(k.Z,{id:"addressState",label:"State",value:O,options:[{label:"- Choose One -",value:""}].concat((0,h.Z)(e)),onChange:function(e){G(!1),R(e.target.value)}}):(0,V.jsx)(S.Z,{id:"addressState",label:"State",type:"text",defaultValue:O,onChange:function(e){G(!1),R(e.target.value)}})}(),(0,V.jsx)(S.Z,{id:"addressPhone",label:"Phone",hint:"Use the format 123-456-7890 or 1-123-456-7890 (with country code).",type:"tel",autoComplete:"tel",defaultValue:F,onChange:function(e){return B((0,Z.Z)(e.target.value))}}),!se&&(0,V.jsx)(I.Z,{address:{attention:"",company:r,address1:l,address2:x,county:"",city:v,state:O,postalCode:T,country:A,phone:F,email:s.address.email},updateAddress:function(e){U(e.country),R(e.state),D(e.city),P(e.postalCode),d(e.address1),m(e.address2),G(!0)}}),(J||se)&&(0,V.jsx)(C.Z,{text:"Save",onClick:te}),H&&(0,V.jsx)("p",{children:H})]})},$=function(e){var t=e.id,s=e.name,n=e.label,a=e.checked,r=e.onChange;return(0,V.jsxs)(u.Fragment,{children:[(0,V.jsxs)("div",{className:"jsx-1297908429 radiobox-group",children:[(0,V.jsx)("input",{type:"radio",name:s,id:t,onChange:r,defaultChecked:a,className:"jsx-1297908429"}),(0,V.jsx)("label",{htmlFor:t,className:"jsx-1297908429",children:n})]}),(0,V.jsx)(m.default,{id:"1297908429",children:[".radiobox-group.jsx-1297908429 label.jsx-1297908429{font-family:'Volvo Novum',sans-serif;font-size:14px;}"]})]})},T=s(52209),P=s(50319),_=s(57241),A=(0,_.ZP)(n||(n=(0,T.Z)(["\n mutation updateCustomerRole(\n $site: String!\n $customerId: String!\n $role: String!\n ) {\n updateCustomerRole(site: $site, customerId: $customerId, role: $role) {\n id\n }\n }\n"]))),U=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},t=(0,P.D)(A,{onCompleted:e}),s=(0,b.Z)(t,1),n=s[0];return function(e,t,s){return n({variables:{site:e,customerId:t,role:s}})}},E=function(e){var t=e.customer,s=(0,u.useState)(t.role),n=s[0],a=s[1],r=(0,u.useState)(""),i=r[0],o=r[1],l=U();return(0,V.jsxs)("form",{className:"jsx-629338799",children:[(0,V.jsx)("h2",{className:"jsx-629338799",children:"Role"}),(0,V.jsx)("div",{className:"jsx-629338799 roles",children:[{id:"consumer",label:"Consumer"},{id:"internal",label:"Volvo Internal"},{id:"retailer",label:"Volvo Retailer"},{id:"government",label:"Government User"},{id:"TDS",label:"Tourist and Diplomat Sales"},{id:"callCenter",label:"KCC Call Center"},{id:"Fleet",label:"Fleet User"},{id:"retailGuideVendor",label:"Retailer Guide Vendor"}].map((function(e){return(0,V.jsx)($,{name:"role",id:e.id,label:e.label,checked:e.id.toLowerCase()===n.toLowerCase(),onChange:function(){return a(e.id)}},e.id)}))}),i&&(0,V.jsx)("p",{className:"jsx-629338799",children:i}),(0,V.jsx)(C.Z,{text:"Save",onClick:function(){l("VTI",t.id,n),o("Successfully updated role details.")}}),(0,V.jsx)(m.default,{id:"629338799",children:[".roles.jsx-629338799{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;}",".roles.jsx-629338799>.radiobox-group{-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;width:33%;margin-bottom:1rem;}"]})]})},O=s(19713),R=(0,_.ZP)(a||(a=(0,T.Z)(["\n mutation updateCustomerPermissions(\n $site: String!\n $customerId: String!\n $permissions: [String]!\n ) {\n updateCustomerPermissions(\n site: $site\n customerId: $customerId\n permissions: $permissions\n ) {\n id\n }\n }\n"]))),L=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},t=(0,P.D)(R,{onCompleted:e}),s=(0,b.Z)(t,1),n=s[0];return function(e,t,s){return n({variables:{site:e,customerId:t,permissions:s}})}},F=function(e){var t=e.customer,s=(0,u.useState)(t.permissions),n=s[0],a=s[1],r=(0,u.useState)(""),i=r[0],o=r[1],l=L(),d=function(){var e=(0,j.Z)(g().mark((function e(s){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s.preventDefault(),s.stopPropagation(),e.next=4,l("VTI",t.id,n);case 4:o("Successfully updated permission details.");case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,V.jsxs)("form",{className:"jsx-3066620198",children:[(0,V.jsx)("h2",{className:"jsx-3066620198",children:"Permissions"}),(0,V.jsx)("div",{className:"jsx-3066620198 permissions",children:[{id:"system_admin",label:"System Admin"},{id:"FOC",label:"Free of Charge"},{id:"helpSystemAdmin",label:"Help System Admin"},{id:"taxExempt",label:"Tax Exempt"},{id:"resaleCertified",label:"Retail Certified Tax Exemption"},{id:"forceCCPayment",label:"Force Credit Card Payment"},{id:"GDST",label:"GDST Admin"},{id:"partsDeptAdmin",label:"Modify Parts Depts Information"},{id:"bulletinTechnician",label:"Upload Bulletin Media"},{id:"specialToolAdmin",label:"Special Tool Admin"},{id:"consecutiveSWDL",label:"Consecutive SWDL"}].map((function(e){return(0,V.jsx)(O.Z,{id:e.id,label:e.label,checked:n.some((function(t){return t===e.id})),onChange:function(){return function(e){if(n.some((function(t){return t.toLowerCase()===e.toLowerCase()}))){var t=n.filter((function(t){return t.toLowerCase()!==e.toLowerCase()}));a(t)}else{var s=Object.assign([],n);s.push(e),a(s)}}(e.id)}},e.id)}))}),i&&(0,V.jsx)("p",{className:"jsx-3066620198",children:i}),(0,V.jsx)(C.Z,{text:"Save",onClick:d}),(0,V.jsx)(m.default,{id:"3066620198",children:[".permissions.jsx-3066620198{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;}",".permissions.jsx-3066620198>.form-group{-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;width:33%;margin-bottom:1rem;}"]})]})},B=(0,_.ZP)(r||(r=(0,T.Z)(["\n mutation updateCustomerStatus(\n $site: String!\n $customerId: String!\n $status: String!\n ) {\n updateCustomerStatus(\n site: $site\n customerId: $customerId\n status: $status\n ) {\n id\n }\n }\n"]))),z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},t=(0,P.D)(B,{onCompleted:e}),s=(0,b.Z)(t,1),n=s[0];return function(e,t,s){return n({variables:{site:e,customerId:t,status:s}})}},J=function(e){var t=e.customer,s="government"===t.role.toLowerCase(),n=(0,u.useState)(t.enabled?"USR_ENB":"USR_DSB"),a=n[0],r=n[1],i=(0,u.useState)(""),o=i[0],l=i[1],d=z();return(0,V.jsxs)("form",{onSubmit:function(e){e.preventDefault()},className:"jsx-1201392167",children:[(0,V.jsx)("h2",{className:"jsx-1201392167",children:"Status"}),(0,V.jsx)("div",{className:"jsx-1201392167 statuses",children:[{id:"USR_ENB",label:"Enabled"},{id:"USR_DSB",label:"Disabled"}].map((function(e){return(0,V.jsx)($,{name:"status",id:e.id,label:e.label,checked:e.id.toLowerCase()===a.toLowerCase(),onChange:function(){return r(e.id)}},e.id)}))}),o&&(0,V.jsx)("p",{className:"jsx-1201392167",children:o}),(0,V.jsx)(C.Z,{text:"Save",onClick:function(){s?l("You cannot change the status of a government user."):(d("VTI",t.id,a),l("Successfully updated status details."))}}),(0,V.jsx)(m.default,{id:"1201392167",children:[".statuses.jsx-1201392167{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;}",".statuses.jsx-1201392167>.radiobox-group{-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;width:33%;margin-bottom:1rem;}"]})]})},G=s(52891),q=s(36671),H=s(63144),M=s.n(H),Y=s(36808),W=s.n(Y),X=function(e){var t=e.id,s=function(){var e=(0,j.Z)(g().mark((function e(){var s,n;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=W().get("token"),e.next=3,M()("https://coreinterface.kencookpartners.com/tds/log-in-as",{method:"POST",body:JSON.stringify({id:t,accountId:"VTI",site:null}),headers:{Authorization:"Bearer ".concat(s),"Content-Type":"application/json"}});case 3:return n=e.sent,e.t0=window,e.next=7,n.text();case 7:e.t1=e.sent,e.t0.open.call(e.t0,e.t1,"_blank");case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,V.jsxs)("a",{onClick:function(e){e.preventDefault(),s()},children:[(0,V.jsx)("i",{className:"fas fa-user-cog"})," Log In As"]})},K=s(88024),Q=function(e){var t=e.customer,s=(0,u.useState)((0,K.k)(t.attributes,"retailerId")),n=s[0],a=s[1],r=(0,u.useState)((0,K.k)(t.attributes,"billingCode")),i=r[0],o=r[1],l=(0,u.useState)(""),d=l[0],c=l[1],x=(0,w.Z)(),m=(0,b.Z)(x,1)[0],f=function(){var e=(0,j.Z)(g().mark((function e(s){var a,r,o,l,u,d;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s.preventDefault(),a={id:t.id,accountId:"VTI",username:t.username,firstName:t.firstName,lastName:t.lastName,address:t.address,attributes:t.attributes},r=function(e,t){return"__typename"===e?void 0:t},o=JSON.parse(JSON.stringify(t.address),r),l=JSON.parse(JSON.stringify(t.attributes),r),l.find((function(e){return"billingCode"===e.code})).value="".concat(i),l.find((function(e){return"retailerId"===e.code})).value="".concat(n),l=l.filter((function(e){return"billingCode"!==e.code||"retailerId"!==e.code})),a.address=o,a.attributes=l,e.next=14,m({input:a});case 14:u=e.sent,(d=u.data).editCustomer3.error?c(d.editCustomer3.error):c("Successfully updated retailer details.");case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return"retailer"!==t.role?null:(0,V.jsxs)("form",{children:[(0,V.jsx)("h2",{children:"Retailer Details"}),(0,V.jsx)(S.Z,{id:"retailerCode",label:"Retailer Code",type:"text",onCh
1ange:function(e){return a(e.target.value)},defaultValue:n}),(0,V.jsx)(S.Z,{id:"billingCode",label:"Billing Code",type:"text",onChange:function(e){return o(e.target.value)},defaultValue:i}),(0,V.jsx)(C.Z,{text:"Save",onClick:f}),d&&(0,V.jsx)("p",{children:d})]})},ee=s(17998),te=function(e){var t=e.customer,s=(0,u.useState)((0,K.k)(t.attributes,"isEmailVerified")),n=s[0],a=s[1],r=(0,u.useState)(""),i=r[0],o=r[1],l=(0,ee.Z)((function(){o("Successfully updated is email verified details.")}));return(0,V.jsxs)("form",{onSubmit:function(e){e.preventDefault()},className:"jsx-3261576229",children:[(0,V.jsx)("h2",{className:"jsx-3261576229",children:"Is Email Verified?"}),(0,V.jsx)("div",{className:"jsx-3261576229 is-email-verified",children:[{id:"true",label:"Yes"},{id:"false",label:"No"}].map((function(e){return(0,V.jsx)($,{name:"status",id:e.id,label:e.label,checked:e.id.toLowerCase()===n.toLowerCase(),onChange:function(){return a(e.id)}},e.id)}))}),i&&(0,V.jsx)("p",{className:"jsx-3261576229",children:i}),(0,V.jsx)(C.Z,{text:"Save",onClick:function(){o(""),l("VTI",t.id,"isEmailVerified","true"===n)}}),(0,V.jsx)(m.default,{id:"3261576229",children:[".is-email-verified.jsx-3261576229{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;}",".is-email-verified.jsx-3261576229>.radiobox-group{-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;width:33%;margin-bottom:1rem;}"]})]})},se=function(e){var t=e.customer,s=(0,u.useState)((0,K.k)(t.attributes,"isTinValidated")),n=s[0],a=s[1],r=(0,u.useState)(""),i=r[0],o=r[1],l=(0,ee.Z)((function(){o("Successfully updated is Taxpayer Identification(TIN) details.")}));return(0,V.jsxs)("form",{onSubmit:function(e){e.preventDefault()},className:"jsx-3226454883",children:[(0,V.jsx)("h2",{className:"jsx-3226454883",children:"Is Taxpayer Identification (TIN) validated?"}),(0,V.jsx)("div",{className:"jsx-3226454883 is-tin-validated",children:[{id:"true",label:"Yes"},{id:"false",label:"No"}].map((function(e){return(0,V.jsx)($,{name:"status",id:e.id,label:e.label,checked:e.id.toLowerCase()===n.toLowerCase(),onChange:function(){return a(e.id)}},e.id)}))}),(0,V.jsx)(C.Z,{text:"Save",onClick:function(){o(""),l("VTI",t.id,"isTinValidated","true"===n)}}),i&&(0,V.jsx)("p",{style:{marginTop:"14px"},className:"jsx-3226454883",children:i}),(0,V.jsx)(m.default,{id:"3226454883",children:[".is-tin-validated.jsx-3226454883{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;}",".is-tin-validated.jsx-3226454883>.radiobox-group{-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;width:33%;margin-bottom:1rem;}"]})]})},ne=(0,_.ZP)(i||(i=(0,T.Z)(["\n mutation userVidaAccessStatusUpdate($id: String!, $status: String!) {\n userVidaAccessStatusUpdate(id: $id, status: $status) {\n id\n attributes {\n code\n value\n }\n }\n }\n"]))),ae=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){},s=(0,P.D)(ne,{onCompleted:e,onError:t}),n=(0,b.Z)(s,1),a=n[0];return function(e,t){return a({variables:{id:e,status:t}})}},re=function(e){var t=e.customer,s=(0,u.useState)((0,K.k)(t.attributes,"vidaAccessStatus")),n=s[0],a=s[1],r=(0,u.useState)(!1),i=r[0],o=r[1],l=(0,u.useState)(""),d=l[0],c=l[1],x=(0,u.useState)(""),f=x[0],p=x[1],j=ae((function(){o(!1),c("Updated successfully")}),(function(){o(!1),p("Update failed")}));return(0,V.jsxs)("form",{onSubmit:function(e){e.preventDefault()},className:"jsx-333245549",children:[(0,V.jsx)("h2",{className:"jsx-333245549",children:"VIDA Access Status"}),(0,V.jsx)("div",{className:"jsx-333245549 vida-access-status",children:(0,V.jsx)(k.Z,{id:"status",label:"Status",value:n,options:[{label:"- Choose One -",value:""},{label:"Needs Approval",value:"NEEDS_APPROVAL"},{label:"Approved",value:"APPROVED"},{label:"Denied",value:"DENIED"}],onChange:function(e){return a(e.target.value)}})}),i?(0,V.jsx)("p",{className:"jsx-333245549",children:"Updating..."}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(C.Z,{text:"Save",onClick:function(){o(!0),c(""),p(""),j(t.id,n)}}),d&&(0,V.jsx)("p",{style:{marginTop:"14px"},className:"jsx-333245549",children:d}),f&&(0,V.jsx)("p",{style:{marginTop:"14px",color:"red"},className:"jsx-333245549",children:f})]}),(0,V.jsx)(m.default,{id:"333245549",children:[".vida-access-status.jsx-333245549{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;}"]})]})},ie=(0,_.ZP)(o||(o=(0,T.Z)(["\n mutation sendUserVerification($customerId: String!) {\n sendUserVerification(customerId: $customerId) {\n statusCode\n message\n }\n }\n"]))),oe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){},t=(0,P.D)(ie,{onCompleted:e}),s=(0,b.Z)(t,1),n=s[0];return function(e){return n({variables:{customerId:e}})}},le=function(e){var t=e.customer,s=(0,u.useState)(""),n=s[0],a=s[1],r=(0,u.useState)(!1),i=r[0],o=r[1],l=oe((function(e){var t=e.sendUserVerification;a(t.message),o(200!==t.statusCode)}));return"true"===(0,K.k)(t.attributes,"isEmailVerified")?null:(0,V.jsxs)("form",{onSubmit:function(e){e.preventDefault()},className:"jsx-2767151770",children:[(0,V.jsx)("h2",{className:"jsx-2767151770",children:"Resend Email Verification"}),n&&(0,V.jsx)("p",{className:"jsx-2767151770 "+((i?"error":"")||""),children:n}),(0,V.jsx)(C.Z,{text:"Send",onClick:function(){a(""),o(!1),l(t.id)}}),(0,V.jsx)(m.default,{id:"2767151770",children:[".error.jsx-2767151770{color:red;}"]})]})},ue=function(e){var t=e.customer,s=(0,u.useState)(""),n=s[0],a=s[1],r=(0,u.useState)(!1),i=r[0],o=r[1],l=(0,u.useState)(!1),d=l[0],c=l[1],x=function(){var e=(0,j.Z)(g().mark((function e(s){var n;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a(""),o(!1),c(!0),s.preventDefault(),(n=new URLSearchParams).append("username",t.username),e.next=8,fetch("/api/forgot-password",{method:"post",body:n.toString()});case 8:e.sent.ok?(a("Password reset sent."),c(!1)):(o(!0),a("Password reset failed to send."),c(!1));case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,V.jsxs)("form",{onSubmit:function(e){e.preventDefault()},className:"jsx-2767151770",children:[(0,V.jsx)("h2",{className:"jsx-2767151770",children:"Send Password Reset"}),n&&(0,V.jsx)("p",{className:"jsx-2767151770 "+((i?"error":"")||""),children:n}),(0,V.jsx)(C.Z,{text:"Send",onClick:x,disabled:d}),(0,V.jsx)(m.default,{id:"2767151770",children:[".error.jsx-2767151770{color:red;}"]})]})},de=(0,_.ZP)(l||(l=(0,T.Z)(["\n mutation userNoteUpdate($userId: String!, $note: String!) {\n userNoteUpdate(userId: $userId, note: $note) {\n id\n attributes {\n code\n value\n }\n }\n }\n"]))),ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){},s=(0,P.D)(de,{onCompleted:e,onError:t}),n=(0,b.Z)(s,1),a=n[0];return function(e,t){return a({variables:{userId:e,note:t}})}},xe=function(e){var t=e.customer,s=(0,u.useState)((0,K.k)(t.attributes,"note")),n=s[0],a=s[1],r=(0,u.useState)(!1),i=r[0],o=r[1],l=(0,u.useState)(""),d=l[0],c=l[1],x=(0,u.useState)(""),f=x[0],p=x[1],j=ce((function(){o(!1),c("Updated successfully")}),(function(){o(!1),p("Update failed")}));return(0,V.jsxs)("form",{onSubmit:function(e){e.preventDefault()},className:"jsx-35806307",children:[(0,V.jsx)("h2",{className:"jsx-35806307",children:"User Note"}),(0,V.jsx)("div",{className:"jsx-35806307 user-note",children:(0,V.jsx)(S.Z,{id:"note",label:"",type:"text",width:"100%",multiline:!0,defaultValue:n,onChange:function(e){return a(e.target.value)}})}),i?(0,V.jsx)("p",{className:"jsx-35806307",children:"Updating..."}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(C.Z,{text:"Save",onClick:function(){o(!0),c(""),p(""),j(t.id,n)}}),d&&(0,V.jsx)("p",{style:{marginTop:"14px"},className:"jsx-35806307",children:d}),f&&(0,V.jsx)("p",{style:{marginTop:"14px",color:"red"},className:"jsx-35806307",children:f})]}),(0,V.jsx)(m.default,{id:"35806307",children:[".user-note.jsx-35806307{width:75%;}"]})]})},me=function(e){var t=e.id,s=(0,f.Z)(t);
1return s?(0,V.jsxs)(u.Fragment,{children:[(0,V.jsxs)("div",{className:"jsx-2398808806 content",children:[(0,V.jsxs)("div",{className:"jsx-2398808806 action-links",children:[(0,V.jsx)(q.Z,{href:"/admin/users/".concat(t,"/orders"),children:(0,V.jsxs)("a",{className:"jsx-2398808806",children:[(0,V.jsx)("i",{className:"jsx-2398808806 fas fa-clipboard-list"})," Order History"]})}),(0,V.jsx)(q.Z,{href:"/admin/users/".concat(t,"/requests"),children:(0,V.jsxs)("a",{className:"jsx-2398808806",children:[(0,V.jsx)("i",{className:"jsx-2398808806 fas fa-concierge-bell"})," Help Requests"]})}),(0,V.jsx)(q.Z,{href:"/admin/users/".concat(t,"/software"),children:(0,V.jsxs)("a",{target:"_blank",className:"jsx-2398808806",children:[(0,V.jsx)("i",{className:"jsx-2398808806 fas fa-arrow-alt-circle-down"})," Software Orders"]})}),(0,V.jsx)(q.Z,{href:"/admin/users/".concat(t,"/subscriptions"),children:(0,V.jsxs)("a",{target:"_blank",className:"jsx-2398808806",children:[(0,V.jsx)("i",{className:"jsx-2398808806 fas fa-clipboard"})," Subscription Orders"]})}),(0,V.jsx)(q.Z,{href:"/admin/users/".concat(t,"/buy-sell"),children:(0,V.jsxs)("a",{className:"jsx-2398808806",children:[(0,V.jsx)("i",{className:"jsx-2398808806 fas fa-exchange-alt"})," Buy/Sell"]})}),(0,V.jsx)(X,{id:t})]}),(0,V.jsx)(ue,{customer:s.customer}),(0,V.jsx)(p.Z,{customer:s.customer}),(0,V.jsx)(D,{customer:s.customer}),(0,V.jsx)(J,{customer:s.customer}),(0,V.jsx)(le,{customer:s.customer}),(0,V.jsx)(te,{customer:s.customer}),(0,V.jsx)(Q,{customer:s.customer}),(0,V.jsx)(E,{customer:s.customer}),(0,V.jsx)(F,{customer:s.customer}),(0,V.jsx)(G.Z,{customer:s.customer}),(0,V.jsx)(re,{customer:s.customer}),(0,V.jsx)(se,{customer:s.customer}),(0,V.jsx)(xe,{customer:s.customer})]}),(0,V.jsx)(m.default,{id:"2398808806",children:[".action-links.jsx-2398808806{font-family:'Volvo Novum',sans-serif;font-size:14px;margin-bottom:1rem;text-align:left;}",".action-links.jsx-2398808806 a{color:#333;-webkit-text-decoration:none;text-decoration:none;-webkit-transition:all 0.2s linear;transition:all 0.2s linear;cursor:pointer;}",".action-links.jsx-2398808806 a:not(:last-child){margin-right:1rem;}",".action-links.jsx-2398808806 a:hover{color:#707070;}",".content.jsx-2398808806 form{margin-bottom:2rem;}",".content.jsx-2398808806 h2{margin:0 0 1rem;font-family:'Volvo Novum',sans-serif;font-weight:400;}",".content.jsx-2398808806 p{font-family:'Volvo Novum',sans-serif;font-size:14px;margin:0;}",".content.jsx-2398808806 .account-dates{margin-bottom:1rem;}"]})]}):null},fe=!0,pe=function(){var e=(0,x.useRouter)().query.id;return(0,V.jsx)(d.Z,{title:"User Administration",children:(0,V.jsx)(c.Z,{title:"Manage User",breadcrumb:{url:"/admin/users/search",text:"Back to Users"},children:(0,V.jsx)(me,{id:e})})})}},54055:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/users/[id]",function(){return s(63643)}])}},function(e){e.O(0,[3903,1604,8018,9143,9774,2888,179],(function(){return t=54055,e(e.s=t);var t}));var t=e.O();_N_E=t}]); 2//# sourceMappingURL=[id]-6d62225d6a1156f7.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.