%PDF- %PDF-
Direktori : /home/opti/public_html/ncf/static/js/ |
Current File : /home/opti/public_html/ncf/static/js/58.74e21ccd.chunk.js |
(this["webpackJsonpncf-nigeria"]=this["webpackJsonpncf-nigeria"]||[]).push([[58],{544:function(e,t,s){"use strict";s.r(t);var c=s(1),a=s(138),n=(s(51),s(27)),o=s(48),r=s(202),i=(s(23),s(18)),l=s(21),d=s(304),m=s(305),u=s(2);var p=function(e){var t=Object(c.useState)([]),s=Object(o.a)(t,2),a=s[0],p=s[1],b=Object(c.useState)(""),j=Object(o.a)(b,2),x=j[0],h=j[1],f=Object(c.useState)([]),g=Object(o.a)(f,2),O=g[0],y=g[1],N=Object(c.useState)([]),v=Object(o.a)(N,2),_=v[0],w=v[1],C=Object(c.useState)([]),q=Object(o.a)(C,2),S=q[0],T=q[1],k=Object(c.useState)([]),R=Object(o.a)(k,2),E=R[0],P=R[1],D=Object(c.useState)(e.membershipType),I=Object(o.a)(D,2),V=I[0],L=(I[1],Object(c.useState)(Number(100*e.price))),A=Object(o.a)(L,2),F=A[0],M=(A[1],Object(c.useState)()),U=Object(o.a)(M,2),z=U[0],G=U[1],H=Object(c.useState)(),J=Object(o.a)(H,2),B=J[0],K=J[1];Object(c.useEffect)((function(){fetch("".concat(l.SERVER_URL,"/location/country")).then((function(e){return e.json()})).then((function(e){200===e.status?p(e.data):console.log("Oops couldn't fetch data")}))}),[]);var Q,W,X,Y=Object(r.a)(),Z=Y.register,$=Y.handleSubmit,ee=Y.formState,te=ee.errors;ee.isDirty,ee.isValid,Object(c.useEffect)((function(){fetch("".concat(l.SERVER_URL,"/gateway/payment")).then((function(e){return e.json()})).then((function(e){200===e.status?G(e.data):console.log(e.message)}))}),[]),z&&z.map((function(e){Q=e.public_key,W=e.id})),B&&(X=B);var se={reference:(new Date).getTime().toString(),email:X,amount:F,publicKey:Q},ce=Object(m.a)(se);return Object(u.jsx)("form",{onSubmit:$((function(e){var t=V,s=e.full_name,c=e.ownership_type,a=x,n=_,o=E,r=e.head_office,i=e.email_address,l=e.phone_number,m=e.staff_strength,u=e.manager_director,p=e.regDate,b=e.contact_person,j=e.contact_person_email,h=e.contact_person_telephone,f=e.contact_person_designation;void 0!==B&&void 0!==Q?ce((function(e){var x,g=e.reference,O=W;x="success"===e.status?1:2;var y={type:t,company_name:s,ownership_type:c,country_id:a,state_id:n,city_id:o,office_address:r,company_email:i,company_tel:l,company_strength:m,company_director:u,date_started:p,contact_name:b,contact_email:j,contact_tel:h,contact_designation:f,payment_gateway_id:O,transaction_reference:g,payment_status:x,amount:F};Object(d.a)(y)}),(function(){console.log("closed")})):console.log("none")})),className:"mb-8 w-full",children:Object(u.jsx)("div",{className:"overflow-hidden sm:rounded-md",children:Object(u.jsxs)("div",{className:"px-4 py-5 sm:p-6",children:[Object(u.jsxs)("div",{className:"grid grid-cols-6 gap-y-3 gap-x-6 mb-8",children:[Object(u.jsx)("div",{className:"col-span-6 sm:col-span-6",children:Object(u.jsx)("h2",{className:"text-lg font-bold text-black uppercase mb-4",children:"General Information"})}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(n.a)(Object(n.a)({type:"text",name:"company_name",id:"company-name"},Z("full_name",{required:!0})),{},{placeholder:"Company name",autoComplete:"company-name",className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.full_name&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(n.a)(Object(n.a)({type:"text"},Z("ownership_type",{required:!0})),{},{placeholder:"Type of ownership",id:"ownership-type",autoComplete:"ownership-type",className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.company_name&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(n.a)(Object(n.a)({type:"date"},Z("regDate",{required:!0})),{},{placeholder:"Company Registered Date",id:"reg-date",autoComplete:"reg-date",className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.regDate&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(n.a)(Object(n.a)({type:"text"},Z("head_office",{required:!0})),{},{placeholder:"(Head) Office Address",id:"head-office",autoComplete:"head-office",className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.head_office&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsxs)("div",{className:"w-full block relative",children:[Object(u.jsxs)("select",Object(n.a)(Object(n.a)({id:"country"},Z("country",{required:!0})),{},{placeholder:"Country",autoComplete:"country",defaultValue:a[0],className:"block appearance-none w-full py-2 px-2 pr-8 border border-gray-300 bg-white leading-tight rounded-sm shadow-sm focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 sm:text-sm",onChange:function(e){var t=e.target.value;fetch("".concat(l.SERVER_URL,"/location/state/").concat(t)).then((function(e){return e.json()})).then((function(e){console.log(e.message,"json"),200===e.status?y(e.data):console.log("Oops couldn't fetch data")})),h(e.target.value)},children:[Object(u.jsx)("option",{children:"Country"}),a.map((function(e){return Object(u.jsx)("option",{value:e.id,children:e.name},e.id)}))]})),Object(u.jsx)("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700",children:Object(u.jsx)(i.d,{})})]}),te.country&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(n.a)(Object(n.a)({type:"text"},Z("phone_number",{required:!0})),{},{placeholder:"Phone number",id:"phone_number",className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.phone_number&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsxs)("div",{className:"relative",children:[Object(u.jsxs)("select",Object(n.a)(Object(n.a)({id:"state"},Z("state",{required:!0})),{},{placeholder:"State",autoComplete:"state",className:"block appearance-none w-full py-2 px-2 pr-8 border border-gray-300 bg-white rounded-sm shadow-sm focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 sm:text-sm",defaultValue:O[0],onChange:function(e){var t=e.target.value;fetch("".concat(l.SERVER_URL,"/location/city/").concat(t)).then((function(e){return e.json()})).then((function(e){console.log(e.message,"json"),200===e.status?T(e.data):console.log("Oops couldn't fetch data")})),w(e.target.value)},children:[Object(u.jsx)("option",{children:"State"}),O.map((function(e){return Object(u.jsx)("option",{value:e.id,children:e.name},e.id)}))]})),Object(u.jsx)("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700",children:Object(u.jsx)(i.d,{})})]}),te.state&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(n.a)(Object(n.a)({type:"text"},Z("email_address",{required:!0})),{},{placeholder:"Email address",id:"email-address",autoComplete:"email",onChange:function(e){console.log(),K(e.target.value)},className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.email_address&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsxs)("div",{className:"relative",children:[Object(u.jsxs)("select",Object(n.a)(Object(n.a)({id:"city"},Z("city",{required:!0})),{},{placeholder:"City",autoComplete:"city",className:"block appearance-none w-full py-2 px-2 pr-8 border border-gray-300 bg-white rounded-sm shadow-sm focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 sm:text-sm",defaultValue:S[0],onChange:function(e){P(e.target.value)},children:[Object(u.jsx)("option",{children:"City"}),S.map((function(e){return Object(u.jsx)("option",{value:e.id,children:e.name},e.id)}))]})),Object(u.jsx)("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700",children:Object(u.jsx)(i.d,{})})]}),te.state&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(n.a)(Object(n.a)({type:"text"},Z("manager_director",{required:!0})),{},{placeholder:"Manager director",id:"manager-director",autoComplete:"manager-director",className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.manager_director&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(n.a)(Object(n.a)({type:"text"},Z("staff_strength",{required:!0})),{},{placeholder:"Staff Strength",id:"staff-strength",autoComplete:"staff-strength",className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.staff_strength&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]})]}),Object(u.jsxs)("div",{className:"grid grid-cols-6 gap-y-3 gap-x-6",children:[Object(u.jsx)("div",{className:"col-span-6 sm:col-span-6",children:Object(u.jsxs)("div",{className:"mb-4",children:[Object(u.jsx)("h2",{className:"text-lg font-bold text-black uppercase",children:"Contact Information"}),Object(u.jsx)("span",{className:"text-sm text-gray-600",children:"This section gathers information about the contact persons for your organization. All correspondences between the NCF and your organization will be addressed to the persons specified below."})]})}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(n.a)(Object(n.a)({type:"text",name:"contact_person",id:"contact-person-name"},Z("contact_person",{required:!0})),{},{placeholder:"Contact Person's Name",autoComplete:"contact-person-name",className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.contact_person&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(n.a)(Object(n.a)({type:"text"},Z("contact_person_email",{required:!0})),{},{placeholder:"Contact Person's Email",id:"contact-person-email",autoComplete:"contact-person-email",className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.contact_person_email&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(n.a)(Object(n.a)({type:"text"},Z("contact_person_designation",{required:!0})),{},{placeholder:"Contact Person's Designation",id:"contact-person-designation",autoComplete:"contact-person-designation",className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.contact_person_designation&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsx)("input",Object(n.a)(Object(n.a)({type:"text"},Z("contact_person_telephone",{required:!0})),{},{placeholder:"Contact Person's Telephone",id:"contact-person-telephone",autoComplete:"contact-person-telephone",className:"py-2 px-3 focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 block w-full shadow-sm sm:text-sm border border-solid border-gray-300 rounded-sm"})),te.contact_person_telephone&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[Object(u.jsxs)("div",{className:"relative",children:[Object(u.jsxs)("select",Object(n.a)(Object(n.a)({id:"contact-person-gender"},Z("contact_person_gender",{required:!0})),{},{placeholder:"Contact Person's Gender",autoComplete:"contact-person-gender",className:"block appearance-none w-full py-2 px-2 pr-8 border border-gray-300 bg-white rounded-sm shadow-sm focus:outline-none focus:ring-2 focus:ring-green focus:ring-opacity-50 sm:text-sm",children:[Object(u.jsx)("option",{value:"Lagos",children:"Male"}),Object(u.jsx)("option",{value:"Abuja",children:"Female"})]})),Object(u.jsx)("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700",children:Object(u.jsx)(i.d,{})})]}),te.contact_person_gender&&Object(u.jsx)("span",{className:"text-xs text-red-500",children:"This field is required"})]}),Object(u.jsx)("div",{className:"col-span-4",children:Object(u.jsx)("fieldset",{children:Object(u.jsxs)("div",{className:"mt-4 space-y-4",children:[Object(u.jsxs)("div",{className:"flex items-center",children:[Object(u.jsx)("div",{className:"flex items-center h-5",children:Object(u.jsx)("input",Object(n.a)(Object(n.a)({id:"new-account"},Z("new_account")),{},{type:"checkbox",className:"focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded"}))}),Object(u.jsx)("div",{className:"ml-3 text-sm mt-0.5",children:Object(u.jsx)("label",{htmlFor:"new-account",className:"font-medium text-gray-700",children:"Please confirm that the information provided on this form is true and accurate."})})]}),Object(u.jsxs)("div",{className:"flex items-center",children:[Object(u.jsx)("div",{className:"flex items-center h-5",children:Object(u.jsx)(i.b,{fontSize:"large",color:"#666"})}),Object(u.jsx)("div",{className:"ml-3 text-sm mt-0.5",children:Object(u.jsx)("label",{htmlFor:"shipping-address",className:"font-medium text-gray-700",children:"DATA PROTECTION: The personal information provided by you will be held on our database and will not be shared with any third party.."})})]})]})})})]}),Object(u.jsx)("div",{className:"flex justify-center space-x-12 px-4 py-3 bg-gray-50 text-right sm:px-6 mt-12",children:Object(u.jsx)("button",{type:"submit",className:"bg-green hover:bg-green-800 inline-flex justify-center py-2 px-12 shadow-sm text-sm font-mediumrounded-sm text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green",children:"Submit"})})]})})})},b=(s(306),s(105)),j=s(103);t.default=function(e){var t=window.location.search,s=new URLSearchParams(t),c=s.get("type"),n=s.get("price"),o=localStorage.getItem("login-error"),r=localStorage.getItem("login-success");return setTimeout((function(){localStorage.removeItem("login-error")}),15e3),setTimeout((function(){localStorage.removeItem("login-success")}),15e3),Object(u.jsxs)("div",{className:"bg-white",children:[Object(u.jsx)(a.a,{page:"membership"}),Object(u.jsxs)("div",{className:"w-full md:px-8 pt-16 pb-8",children:[Object(u.jsx)(b.a,{}),Object(u.jsxs)("div",{className:"mx-auto md:px-0",children:[Object(u.jsxs)("div",{className:"text-left mb-6 px-8",children:[Object(u.jsxs)("h1",{className:"font-black text-2xl text-green uppercase tracking-tight",children:[c," MEMBERSHIP FORM"]}),o?Object(u.jsx)(j.a,{color:"danger",children:o}):null,r?Object(u.jsx)(j.a,{color:"success",children:r}):null,Object(u.jsx)("span",{className:"text-sm text-gray-600",children:"Please complete this section with information about your organization"})]}),Object(u.jsx)("div",{className:"grid md:grid-cols-12 md:gap-8 gap-y-8 items-start",children:Object(u.jsx)("div",{className:"sm:col-span-12 col-span-12",children:Object(u.jsx)("div",{children:Object(u.jsx)(p,{membershipType:c,price:n})})})})]})]})]})}}}]); //# sourceMappingURL=58.74e21ccd.chunk.js.map