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 23.50ecb56c.chunk.js.LICENSE.txt */
(this["webpackJsonpsimpro-web"]=this["webpackJsonpsimpro-web"]||[]).push([[23,4,7],{2288:function(e,t,n){"use strict";n.r(t);var r=n(601),a=n(616),o=(n(700),n(2)),i=n.n(o),s=n(801),c=n(772),l=n(773),u=n(813),f=n(814),d=n(760),h=n(793),p=n(788),m=n(789),g=n(790),v=n(990),b=n(657),y=n(828),w=n(594),E=n.n(w),C=(n(429),n(726)),O=n(623),S=b.default.Option,x=window.localStorage.getItem("token"),k=("Bearer ".concat(x),function(e){var t=e.openDialog,n=e.closeDialog,r=e.toggleDialog,w=e.typeDialog,O=e.dataEdit,x=e.roleList,k=e.divisiList,_=Object(o.useState)(!1),A=Object(a.a)(_,2),T=(A[0],A[1],Object(o.useState)(0)),N=Object(a.a)(T,2),j=N[0],R=N[1],P=Object(o.useState)(""),I=Object(a.a)(P,2),D=I[0],B=I[1],M=Object(o.useState)(""),F=Object(a.a)(M,2),L=F[0],z=F[1],U=Object(o.useState)(""),V=Object(a.a)(U,2),H=V[0],W=V[1],K=Object(o.useState)(""),Y=Object(a.a)(K,2),G=Y[0],X=Y[1],$=Object(o.useState)(""),q=Object(a.a)($,2),Z=q[0],J=q[1],Q=Object(o.useState)(""),ee=Object(a.a)(Q,2),te=ee[0],ne=ee[1],re=Object(o.useState)(""),ae=Object(a.a)(re,2),oe=ae[0],ie=ae[1],se=Object(o.useState)(""),ce=Object(a.a)(se,2),le=ce[0],ue=ce[1],fe=Object(o.useState)(""),de=Object(a.a)(fe,2),he=de[0],pe=de[1],me=Object(o.useState)(""),ge=Object(a.a)(me,2),ve=ge[0],be=ge[1],ye=Object(o.useState)(""),we=Object(a.a)(ye,2),Ee=we[0],Ce=we[1],Oe=Object(o.useState)(""),Se=Object(a.a)(Oe,2),xe=Se[0],ke=Se[1],_e=Object(o.useState)(""),Ae=Object(a.a)(_e,2),Te=Ae[0],Ne=Ae[1],je=Object(o.useState)(""),Re=Object(a.a)(je,2),Pe=Re[0],Ie=Re[1],De=Object(o.useState)(""),Be=Object(a.a)(De,2),Me=Be[0],Fe=Be[1],Le=Object(o.useState)(""),ze=Object(a.a)(Le,2),Ue=ze[0],Ve=ze[1],He=Object(o.useState)("active"),We=Object(a.a)(He,2),Ke=We[0],Ye=We[1];Object(o.useEffect)((function(){"Edit"===w||"Set"===w?(console.log("cel data Edit",O),R(O.id),B(O.name),z(O.username),W(""),X(""),J(O.employee_type),ne(O.phone_number),ie(O.email),ue(O.gender),pe(O.birth_date?E()(O.birth_date):""),be(O.birth_place),Ce(O.blood_type),ke(O.ktp_number?O.ktp_number:""),Ne(O.biaya_per_jam?Object(C.g)(O.biaya_per_jam):""),Ie(O.role_id),Ve(O.divisi_id),Fe(O.address)):(R(0),B(""),z(""),W(""),X(""),J(""),ne(""),ie(""),ue(""),pe(""),be(""),Ce(""),ke(""),Ne(""),Ie(""),Ve(""),Fe(""),Ye("active"))}),[O,t]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(h.a,{size:"lg",isOpen:t,toggle:r},i.a.createElement(p.a,{className:"capitalize",toggle:n},"Save"==w?"Add":"Edit"," Human Resource"),i.a.createElement(m.a,null,"Set"!==w?i.a.createElement(s.a,null,i.a.createElement(c.a,null,i.a.createElement(l.a,{md:6},i.a.createElement(u.a,null,i.a.createElement(f.a,{className:"capitalize"},"NIK (KTP / ID Card) *"),i.a.createElement(d.a,{type:"text",value:xe,onChange:function(e){return ke(e.target.value)},placeholder:"Input NIK (KTP)...",maxLength:"16"}))),i.a.createElement(l.a,{md:6},i.a.createElement(u.a,null,i.a.createElement(f.a,{className:"capitalize"},"Resource Name *"),i.a.createElement(d.a,{type:"text",value:D,onChange:function(e){return B(e.target.value)},placeholder:"Input resource name..."})))),i.a.createElement(c.a,null,i.a.createElement(l.a,{md:6},i.a.createElement(u.a,null,i.a.createElement(f.a,{className:"capitalize"},"Employee Type *"),i.a.createElement(b.default,{showSearch:!0,value:Z,defaultValue:Z,onChange:function(e){return J(e)},placeholder:"Select Employee Type",style:{width:"100%"}},i.a.createElement(S,{value:"employee"},"Employee"),i.a.createElement(S,{value:"subcon"},"Subcon"),i.a.createElement(S,{value:"freelance"},"Freelance")))),i.a.createElement(l.a,{md:6},i.a.createElement(u.a,null,i.a.createElement(f.a,{className:"capitalize"},"Phone No."),i.a.createElement(d.a,{type:"text",value:te,onChange:function(e){return ne(e.target.value.replace(/[^0-9]/g,""))},placeholder:"Input phone number...",maxLength:"15"})))),i.a.createElement(c.a,null,i.a.createElement(l.a,{md:6},i.a.createElement(u.a,null,i.a.createElement(f.a,{className:"capitalize"},"Email"),i.a.createElement(d.a,{type:"text",value:oe,onChange:function(e){return ie(e.target.value)},placeholder:"Input email..."}))),i.a.createElement(l.a