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
2 lines
1.6 MiB
2 years ago
|
/*! For license information please see 40.82ca3cd1.chunk.js.LICENSE.txt */
|
||
|
(this["webpackJsonpsimpro-web"]=this["webpackJsonpsimpro-web"]||[]).push([[40,4],{2290:function(e,t,r){"use strict";r.r(t);var n=r(601),a=r(616),i=r(2),o=r.n(i),s=r(779),c=r(791),l=r(772),u=r(773),f=r(760),h=r(780),d=r(887),p=r(990),m=r(649),g=r.n(m),v=r(700),b=r(654),w=r.n(b),y=r(793),E=r(788),C=r(789),_=r(790),S=r(801),O=r(813),k=r(814),x=r(657),A=r(828),T=r(594),B=r.n(T),R=(r(429),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(i.useState)(0),m=Object(a.a)(d,2),g=m[0],v=m[1],b=Object(i.useState)(0),w=Object(a.a)(b,2),T=w[0],D=w[1],I=Object(i.useState)(""),P=Object(a.a)(I,2),N=P[0],F=P[1],M=Object(i.useState)(""),j=Object(a.a)(M,2),L=j[0],U=j[1],V=Object(i.useState)(""),z=Object(a.a)(V,2),H=z[0],W=z[1],Y=Object(i.useState)(B()(B()().format("YYYY-MM-DD"))),G=Object(a.a)(Y,2),X=G[0],K=G[1],$=Object(i.useState)(""),q=Object(a.a)($,2),Z=q[0],J=q[1],Q=Object(i.useState)(""),ee=Object(a.a)(Q,2),te=ee[0],re=ee[1],ne=Object(i.useState)(""),ae=Object(a.a)(ne,2),ie=ae[0],oe=ae[1],se=Object(i.useState)("Laki-laki"),ce=Object(a.a)(se,2),le=ce[0],ue=ce[1],fe=Object(i.useState)(""),he=Object(a.a)(fe,2),de=he[0],pe=he[1],me=Object(i.useState)(null),ge=Object(a.a)(me,2),ve=ge[0],be=ge[1];Object(i.useEffect)((function(){"Edit"===s?c&&(v(c.id),be(c.role_id),D(c.user_id),c.join&&(F(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"),oe(c.join.m_users_address),U(c.join.m_users_username))):(v(0),F(""),J(""),K(B()(B()().format("YYYY-MM-DD"))),W(""),re(""),ue("Laki-laki"),oe(""),U(""),pe(""),be(null),D(0))}),[c,t]);var we=function(e,t){K(e)},ye=function(e){be(e)};return o.a.createElement(y.a,{size:"lg",isOpen:t,toggle:n},o.a.createElement(E.a,{className:"capitalize",toggle:r},"Save"==s?"Tambah":"Edit"," Admin"),o.a.createElement(C.a,null,o.a.createElement(S.a,null,o.a.createElement(l.a,null,o.a.createElement(u.a,null,o.a.createElement(O.a,null,o.a.createElement(k.a,{className:"capitalize"},"Nama"),o.a.createElement(f.a,{type:"text",value:N,onChange:function(e){return F(e.target.value)},placeholder:"Nama.."})),o.a.createElement(O.a,null,o.a.createElement(k.a,null,"Tempat Lahir"),o.a.createElement(f.a,{type:"text",value:H,onChange:function(e){return W(e.target.value)},placeholder:"Tempat lahir.."})),o.a.createElement(O.a,null,o.a.createElement(k.a,null,"Tanggal Lahir"),o.a.createElement(A.a,{style:{width:"100%"},value:X,onChange:we,allowClear:!1})),o.a.createElement(O.a,null,o.a.createElement(k.a,{className:"capitalize"},"Jenis Kelamin"),o.a.createElement(f.a,{type:"select",value:le,onChange:function(e){return ue(e.target.value)},placeholder:"Jenis Kelamin.."},o.a.createElement("option",{value:"Laki-laki"},"Laki-laki"),o.a.createElement("option",{value:"Perempuan"},"Perempuan"))),o.a.createElement(O.a,null,o.a.createElement(k.a,{className:"capitalize"},"Alamat"),o.a.createElement(f.a,{type:"textarea",value:ie,onChange:function(e){return oe(e.target.value)},placeholder:"Alamat.."}))),o.a.createElement(u.a,null,o.a.createElement(O.a,null,o.a.createElement(k.a,null,"Username"),o.a.createElement(f.a,{type:"text",value:L,onChange:function(e){return U(e.target.value)},placeholder:"username.."})),o.a.createElement(O.a,null,o.a.createElement(k.a,null,"Email"),o.a.createElement(f.a,{type:"text",value:Z,onChange:function(e){return J(e.target.value)},placeholder:"email.."})),o.a.createElement(O.a,null,o.a.createElement(k.a,null,"Nomor Hp"),o.a.createElement(f.a,{type:"text",value:te,onChange:function(e){return re(e.target.value)},placeholder:"Nomor Hp.."})),o.a.createElement(O.a,null,o.a.createElement(k.a,null,"Password"),o.a.createElement(f.a,{type:"password",value:de,onChange:function(e){return pe(e.target.value)},placeholder:"password.."})),o.a.createElement(O.a,null,o.a.createElement(k.a,null,"Role"),o.a.createElement(x.default,{showSearch:!0,defaultValue:ve,onChange:ye,placeho
|