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

/*! For license information please see 24.2b3b69ef.chunk.js.LICENSE.txt */
(this["webpackJsonpsimpro-web"]=this["webpackJsonpsimpro-web"]||[]).push([[24,5,8],{2534:function(e,t,n){"use strict";n.r(t);var r=n(608),a=n(621),o=n(2),i=n.n(o),s=n(812),c=n(829),l=n(810),u=n(811),f=n(796),d=n(813),h=n(776),p=(n(727),n(673)),m=n.n(p),g=n(831),v=n(836),b=n(837),y=n(827),w=n(822),C=n(823),E=n(824),O=n(763),S=n(666),x=n(850),_=n(598),k=n.n(_),A=(n(431),n(744)),T=n(636),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)("")),_=Object(a.a)(m,2),T=(_[0],_[1],Object(o.useState)(0)),j=Object(a.a)(T,2),R=(j[0],j[1],Object(o.useState)("green")),I=Object(a.a)(R,2),P=(I[0],I[1],Object(o.useState)(0)),B=Object(a.a)(P,2),D=(B[0],B[1],Object(o.useState)("")),M=Object(a.a)(D,2),F=(M[0],M[1],Object(o.useState)(k()())),L=Object(a.a)(F,2),U=(L[0],L[1],Object(o.useState)(k()())),z=Object(a.a)(U,2),H=(z[0],z[1],Object(o.useState)("")),V=Object(a.a)(H,2),W=(V[0],V[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),Z=($[0],$[1],Object(o.useState)("")),q=Object(a.a)(Z,2),J=(q[0],q[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),_e=xe[0],ke=xe[1],Ae=Object(o.useState)(""),Te=Object(a.a)(Ae,2),Ne=Te[0],je=Te[1],Re=Object(o.useState)(""),Ie=Object(a.a)(Re,2),Pe=Ie[0],Be=Ie[1],De=Object(o.useState)(k()()),Me=Object(a.a)(De,2),Fe=Me[0],Le=Me[1],Ue=Object(o.useState)(""),ze=Object(a.a)(Ue,2),He=ze[0],Ve=ze[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),Ze=$e[0],qe=$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),ke(c.phone_number),je(c.email),Be(c.gender),Le(c.birth_date?k()(c.birth_date):k()()),Ve(c.birth_place),Ge(c.blood_type),qe(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(""),ke(""),je(""),Be(""),Le(""),Ve(""),Ge(""),qe(""),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