Backend for Custom Frontend OSPRO Surveyor Indonesia
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
1.6 MiB

/*! For license information please see 44.12a62cb7.chunk.js.LICENSE.txt */
(this["webpackJsonpsimpro-web"]=this["webpackJsonpsimpro-web"]||[]).push([[44,4],{2328:function(e,t,r){"use strict";r.r(t);var n=r(607),a=r(618),o=r(2),i=r.n(o),s=r(806),c=r(819),l=r(792),u=r(793),f=r(783),h=r(807),d=r(901),p=r(757),m=r(656),g=r.n(m),v=r(719),b=r(665),w=r.n(b),y=r(817),E=r(814),C=r(815),_=r(816),S=r(822),k=r(827),O=r(828),x=r(663),A=r(841),T=r(597),B=r.n(T),R=(r(431),x.default.Option),D=function(e){var t=e.openDialog,r=e.closeDialog,n=e.toggleDialog,s=e.typeDialog,c=e.dataEdit,h=e.dataRole,d=Object(o.useState)(0),m=Object(a.a)(d,2),g=m[0],v=m[1],b=Object(o.useState)(0),w=Object(a.a)(b,2),T=w[0],D=w[1],I=Object(o.useState)(""),N=Object(a.a)(I,2),P=N[0],M=N[1],F=Object(o.useState)(""),j=Object(a.a)(F,2),L=j[0],U=j[1],z=Object(o.useState)(""),V=Object(a.a)(z,2),H=V[0],W=V[1],Y=Object(o.useState)(B()(B()().format("YYYY-MM-DD"))),G=Object(a.a)(Y,2),X=G[0],K=G[1],$=Object(o.useState)(""),Z=Object(a.a)($,2),q=Z[0],J=Z[1],Q=Object(o.useState)(""),ee=Object(a.a)(Q,2),te=ee[0],re=ee[1],ne=Object(o.useState)(""),ae=Object(a.a)(ne,2),oe=ae[0],ie=ae[1],se=Object(o.useState)("Laki-laki"),ce=Object(a.a)(se,2),le=ce[0],ue=ce[1],fe=Object(o.useState)(""),he=Object(a.a)(fe,2),de=he[0],pe=he[1],me=Object(o.useState)(null),ge=Object(a.a)(me,2),ve=ge[0],be=ge[1];Object(o.useEffect)((function(){"Edit"===s?c&&(v(c.id),be(c.role_id),D(c.user_id),c.join&&(M(c.join.m_users_name),J(c.join.m_users_email),K(c.join.m_users_birth_date?B()(B()(c.join.m_users_birth_date).format("YYYY-MM-DD")):B()(B()())),W(c.join.m_users_birth_place),re(c.join.m_users_phone_number),ue(c.join.m_users_gender||"Laki-laki"),ie(c.join.m_users_address),U(c.join.m_users_username))):(v(0),M(""),J(""),K(B()(B()().format("YYYY-MM-DD"))),W(""),re(""),ue("Laki-laki"),ie(""),U(""),pe(""),be(null),D(0))}),[c,t]);var we=function(e,t){K(e)},ye=function(e){be(e)};return i.a.createElement(y.a,{size:"lg",isOpen:t,toggle:n},i.a.createElement(E.a,{className:"capitalize",toggle:r},"Save"==s?"Tambah":"Edit"," Admin"),i.a.createElement(C.a,null,i.a.createElement(S.a,null,i.a.createElement(l.a,null,i.a.createElement(u.a,null,i.a.createElement(k.a,null,i.a.createElement(O.a,{className:"capitalize"},"Nama"),i.a.createElement(f.a,{type:"text",value:P,onChange:function(e){return M(e.target.value)},placeholder:"Nama.."})),i.a.createElement(k.a,null,i.a.createElement(O.a,null,"Tempat Lahir"),i.a.createElement(f.a,{type:"text",value:H,onChange:function(e){return W(e.target.value)},placeholder:"Tempat lahir.."})),i.a.createElement(k.a,null,i.a.createElement(O.a,null,"Tanggal Lahir"),i.a.createElement(A.a,{style:{width:"100%"},value:X,onChange:we,allowClear:!1})),i.a.createElement(k.a,null,i.a.createElement(O.a,{className:"capitalize"},"Jenis Kelamin"),i.a.createElement(f.a,{type:"select",value:le,onChange:function(e){return ue(e.target.value)},placeholder:"Jenis Kelamin.."},i.a.createElement("option",{value:"Laki-laki"},"Laki-laki"),i.a.createElement("option",{value:"Perempuan"},"Perempuan"))),i.a.createElement(k.a,null,i.a.createElement(O.a,{className:"capitalize"},"Alamat"),i.a.createElement(f.a,{type:"textarea",value:oe,onChange:function(e){return ie(e.target.value)},placeholder:"Alamat.."}))),i.a.createElement(u.a,null,i.a.createElement(k.a,null,i.a.createElement(O.a,null,"Username"),i.a.createElement(f.a,{type:"text",value:L,onChange:function(e){return U(e.target.value)},placeholder:"username.."})),i.a.createElement(k.a,null,i.a.createElement(O.a,null,"Email"),i.a.createElement(f.a,{type:"text",value:q,onChange:function(e){return J(e.target.value)},placeholder:"email.."})),i.a.createElement(k.a,null,i.a.createElement(O.a,null,"Nomor Hp"),i.a.createElement(f.a,{type:"text",value:te,onChange:function(e){return re(e.target.value)},placeholder:"Nomor Hp.."})),i.a.createElement(k.a,null,i.a.createElement(O.a,null,"Password"),i.a.createElement(f.a,{type:"password",value:de,onChange:function(e){return pe(e.target.value)},placeholder:"password.."})),i.a.createElement(k.a,null,i.a.createElement(O.a,null,"Role"),i.a.createElement(x.default,{showSearch:!0,defaultValue:ve,onChange:ye,placeho