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.8 MiB

2 years ago
/*! For license information please see 22.dd8ff649.chunk.js.LICENSE.txt */
(this["webpackJsonpsimpro-web"]=this["webpackJsonpsimpro-web"]||[]).push([[22,4,7],{2303:function(e,t,n){"use strict";n.r(t);var r=n(601),a=n(616),o=n(2),i=n.n(o),s=n(779),c=n(791),l=n(772),u=n(773),f=n(760),d=n(780),h=n(745),p=(n(700),n(654)),m=n.n(p),g=n(801),v=n(813),b=n(814),y=n(793),w=n(788),C=n(789),E=n(790),O=n(990),S=n(657),x=n(828),k=n(594),_=n.n(k),A=(n(429),n(726)),T=n(623),N=S.default.Option,j=window.localStorage.getItem("token"),R=("Bearer ".concat(j),function(e){var t=e.openDialog,n=e.closeDialog,r=e.toggleDialog,s=e.typeDialog,c=e.dataEdit,d=e.roleList,h=Object(o.useState)(""),p=Object(a.a)(h,2),m=(p[0],p[1],Object(o.useState)("")),k=Object(a.a)(m,2),T=(k[0],k[1],Object(o.useState)(0)),j=Object(a.a)(T,2),R=(j[0],j[1],Object(o.useState)("green")),P=Object(a.a)(R,2),I=(P[0],P[1],Object(o.useState)(0)),B=Object(a.a)(I,2),D=(B[0],B[1],Object(o.useState)("")),M=Object(a.a)(D,2),F=(M[0],M[1],Object(o.useState)(_()())),L=Object(a.a)(F,2),U=(L[0],L[1],Object(o.useState)(_()())),V=Object(a.a)(U,2),z=(V[0],V[1],Object(o.useState)("")),H=Object(a.a)(z,2),W=(H[0],H[1],Object(o.useState)("")),K=Object(a.a)(W,2),Y=(K[0],K[1],Object(o.useState)(!1)),G=Object(a.a)(Y,2),X=(G[0],G[1],Object(o.useState)("")),$=Object(a.a)(X,2),q=($[0],$[1],Object(o.useState)("")),Z=Object(a.a)(q,2),J=(Z[0],Z[1],Object(o.useState)(0)),Q=Object(a.a)(J,2),ee=(Q[0],Q[1],Object(o.useState)(0)),te=Object(a.a)(ee,2),ne=te[0],re=te[1],ae=Object(o.useState)(""),oe=Object(a.a)(ae,2),ie=oe[0],se=oe[1],ce=Object(o.useState)(""),le=Object(a.a)(ce,2),ue=le[0],fe=le[1],de=Object(o.useState)(""),he=Object(a.a)(de,2),pe=he[0],me=he[1],ge=Object(o.useState)(""),ve=Object(a.a)(ge,2),be=ve[0],ye=ve[1],we=Object(o.useState)(""),Ce=Object(a.a)(we,2),Ee=Ce[0],Oe=Ce[1],Se=Object(o.useState)(""),xe=Object(a.a)(Se,2),ke=xe[0],_e=xe[1],Ae=Object(o.useState)(""),Te=Object(a.a)(Ae,2),Ne=Te[0],je=Te[1],Re=Object(o.useState)(""),Pe=Object(a.a)(Re,2),Ie=Pe[0],Be=Pe[1],De=Object(o.useState)(_()()),Me=Object(a.a)(De,2),Fe=Me[0],Le=Me[1],Ue=Object(o.useState)(""),Ve=Object(a.a)(Ue,2),ze=Ve[0],He=Ve[1],We=Object(o.useState)(""),Ke=Object(a.a)(We,2),Ye=Ke[0],Ge=Ke[1],Xe=Object(o.useState)(""),$e=Object(a.a)(Xe,2),qe=$e[0],Ze=$e[1],Je=Object(o.useState)(""),Qe=Object(a.a)(Je,2),et=Qe[0],tt=Qe[1],nt=Object(o.useState)(""),rt=Object(a.a)(nt,2),at=rt[0],ot=rt[1],it=Object(o.useState)(""),st=Object(a.a)(it,2),ct=st[0],lt=st[1];Object(o.useEffect)((function(){"Edit"===s?(console.log("cel data Edit",c),re(c.id),se(c.name),fe(c.username),me(""),ye(""),Oe(c.working_hours),_e(c.phone_number),je(c.email),Be(c.gender),Le(c.birth_date?_()(c.birth_date):_()()),He(c.birth_place),Ge(c.blood_type),Ze(c.ktp_number?c.ktp_number:""),tt(c.biaya_per_jam?Object(A.g)(c.biaya_per_jam):""),ot(c.role_id),lt(c.address)):(re(0),se(""),fe(""),me(""),ye(""),Oe(""),_e(""),je(""),Be(""),Le(""),He(""),Ge(""),Ze(""),tt(""),ot(""),lt(""))}),[c,t]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(y.a,{size:"lg",isOpen:t,toggle:r},i.a.createElement(w.a,{className:"capitalize",toggle:n},"Save"==s?"Add":"Edit"," Resource"),i.a.createElement(C.a,null,i.a.createElement(g.a,null,i.a.createElement(l.a,null,i.a.createElement(u.a,{md:6},i.a.createElement(v.a,null,i.a.createElement(b.a,{className:"capitalize"},"Resource Name"),i.a.createElement(f.a,{type:"text",value:ie,onChange:function(e){return se(e.target.value)},placeholder:"Input resource name..."}))),i.a.createElement(u.a,{md:6},i.a.createElement(v.a,null,i.a.createElement(b.a,{className:"capitalize"},"Username"),i.a.createElement(f.a,{type:"text",value:ue,onChange:function(e){return fe(e.target.value)},placeholder:"Input username..."})))),"Save"===s&&i.a.createElement(l.a,null,i.a.createElement(u.a,{md:6},i.a.createElement(v.a,null,i.a.createElement(b.a,{className:"capitalize"},"Password"),i.a.createElement(f.a,{type:"password",value:pe,onChange:function(e){return me(e.target.value)},placeholder:"Password..."}))),i.a.createElement(u.a,{md:6},i.a.createElement(v.a,null,i.a.createElement(b.a,{className:"capitalize"},"Retry Password"),i.a.createElement(f.a