{"size": 7177, "ext": "js", "max_stars_repo_path": "epekerja/static/js/52.99423b13.chunk.js", "max_stars_repo_name": "novadwisaptanainseven/e-pekerja", "max_stars_repo_stars_event_min_datetime": "2021-05-17T16:53:23.000Z", "max_stars_repo_stars_event_max_datetime": "2021-07-28T02:52:53.000Z", "max_issues_repo_path": "epekerja/static/js/52.99423b13.chunk.js", "max_issues_repo_name": "novadwisaptanainseven/e-pekerja", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "epekerja/static/js/52.99423b13.chunk.js", "max_forks_repo_name": "novadwisaptanainseven/e-pekerja", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 3588.5, "max_line_length": 7131, "alphanum_fraction": 0.6828758534}
(this["webpackJsonp@coreui/coreui-free-react-admin-template"]=this["webpackJsonp@coreui/coreui-free-react-admin-template"]||[]).push([[52],{1044:function(e,t,n){"use strict";n.r(t);var a,c,r=n(9),i=n(640),s=n(1),o=n.n(s),l=n(627),d=n(641),j=n.n(d),u=n(643),b=n(20),h=n(637),O=n(979),x=n(626),p=n(749),f=n(629),m=n(17),g=function(){var e=Object(s.useState)(null),t=Object(r.a)(e,2),n=t[0],a=t[1],c=Object(s.useState)([]),i=Object(r.a)(c,2),o=i[0],d=i[1],j=Object(s.useState)(!1),u=Object(r.a)(j,2),b=u[0],h=u[1],O=Object(s.useState)(""),g=Object(r.a)(O,2),w=g[0],y=g[1],C=o.filter((function(e){return e.nama&&e.nama.toLowerCase().includes(w.toLowerCase())}));return Object(s.useEffect)((function(){!function(e,t){e(!0),x.a.get("admin/pegawai/pegawai-cuti").then((function(n){console.log(n.data),t(n.data.data),e(!1)})).catch((function(t){console.log(t.response.data),e(!1)}))}(h,d)}),[]),Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(l.x,{children:Object(m.jsx)(l.y,{row:!0,className:"justify-content-center",children:Object(m.jsx)(l.n,{md:"6",children:Object(m.jsx)(l.E,{type:"text",id:"cari",name:"cari",placeholder:"Pencarian nama",value:w,onChange:function(e){return y(e.target.value)}})})})}),Object(m.jsxs)("div",{id:"accordion",children:[b&&Object(m.jsx)(l.X,{children:Object(m.jsx)(l.n,{className:"text-center",children:Object(m.jsx)("img",{className:"mt-4 ml-3",width:30,src:f.d,alt:"load-animation"})})}),C.map((function(e,t){return Object(m.jsxs)(l.h,{className:"mb-0",children:[Object(m.jsx)(l.l,{id:"headingOne",children:Object(m.jsx)(l.f,{block:!0,color:"link",className:"text-left m-0 p-0",onClick:function(){return a(n===t?null:t)},children:Object(m.jsx)("h5",{className:"m-0 p-0 text-dark",children:e.nama})})}),Object(m.jsx)(l.o,{show:n===t,children:Object(m.jsx)(l.i,{children:Object(m.jsx)("table",{className:"table table-striped",children:Object(m.jsxs)("tbody",{children:[Object(m.jsxs)("tr",{children:[Object(m.jsx)("th",{style:{width:"130px"},children:"Jenis Cuti"}),Object(m.jsx)("td",{children:e.jenis_cuti})]}),Object(m.jsxs)("tr",{children:[Object(m.jsx)("th",{children:"Tgl. Mulai Cuti"}),Object(m.jsx)("td",{children:Object(p.a)(new Date(e.tgl_mulai),"dd/MM/yyyy")})]}),Object(m.jsxs)("tr",{children:[Object(m.jsx)("th",{children:"Tgl. Selesai Cuti"}),Object(m.jsx)("td",{children:Object(p.a)(new Date(e.tgl_selesai),"dd/MM/yyyy")})]}),Object(m.jsxs)("tr",{children:[Object(m.jsx)("th",{children:"Keterangan"}),Object(m.jsx)("td",{children:e.keterangan})]})]})})})})]},t)}))]})]})},w=n(163),y=n(681),C=u.default.input(a||(a=Object(i.a)(["\n  height: 37px;\n  width: 200px;\n  border-radius: 3px;\n  border-top-left-radius: 5px;\n  border-bottom-left-radius: 5px;\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 0;\n  border: 1px solid #e5e5e5;\n  padding: 0 32px 0 16px;\n\n  &:hover {\n    cursor: pointer;\n  }\n"]))),v=u.default.button(c||(c=Object(i.a)(["\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n  border-top-right-radius: 5px;\n  border-bottom-right-radius: 5px;\n  height: 37px;\n  text-align: center;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  background-color: #3e5973;\n  border: none;\n  color: white;\n  padding: 0 10px;\n  transition: 0.3s;\n\n  &:hover {\n    background-color: #283c4f;\n  }\n"]))),k=function(e){var t=e.filterText,n=e.onFilter,a=e.onClear;return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(C,{id:"search",type:"text",placeholder:"Cari pegawai","aria-label":"Search Input",value:t,onChange:n}),Object(m.jsx)(v,{type:"button",onClick:a,children:"Reset"})]})};t.default=function(){var e=Object(s.useState)(!1),t=Object(r.a)(e,2),n=t[0],a=t[1],c=Object(b.g)(),i=Object(s.useState)(""),d=Object(r.a)(i,2),u=d[0],x=d[1],p=Object(s.useState)(!1),C=Object(r.a)(p,2),v=C[0],N=C[1],S=Object(s.useContext)(w.a),P=S.pnsState,D=S.pnsDispatch,H=P.data,R=P.loading,E=H.filter((function(e){return e.nama&&e.nama.toLowerCase().includes(u.toLowerCase())}));Object(s.useEffect)((function(){Object(y.a)(D)}),[D]);var F=[{name:"No",selector:"no",sortable:!0,wrap:!0,width:"50px"},{name:"NIP",selector:"nip",sortable:!0,wrap:!0},{name:"Nama",selector:"nama",sortable:!0,wrap:!0},{name:"Jabatan",selector:"jabatan",sortable:!0,wrap:!0},{maxWidth:"150px",name:"Action",sortable:!0,cell:function(e){return Object(m.jsx)("div",{"data-tag":"allowRowEvents",children:Object(m.jsx)(l.f,{color:"info",onClick:function(){return z(e.id_pegawai)},children:"Buat Cuti"})})}}],M={headCells:{style:{fontSize:"1.15em"}}},L=o.a.useMemo((function(){return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(k,{onFilter:function(e){return x(e.target.value)},onClear:function(){u&&(N(!v),x(""))},filterText:u}),Object(m.jsxs)(l.f,{type:"button",color:"info",className:"ml-2",onClick:function(){c.push("/epekerja/admin/cuti/cuti-pegawai")},children:[Object(m.jsx)("span",{className:"my-text-button",children:"Cek Semua Cuti Pegawai"})," ",Object(m.jsx)(h.a,{content:O.a})]}),Object(m.jsx)(l.V,{content:"Untuk melihat daftar pegawai yang sedang cuti",children:Object(m.jsxs)(l.f,{type:"button",color:"warning",className:"ml-2",onClick:function(){return a(!n)},children:[Object(m.jsx)("span",{className:"my-text-button",children:"Daftar Pegawai Cuti"})," ",Object(m.jsx)(h.a,{content:O.a})]})})]})}),[u,v,n,c]),z=function(e){c.push("/epekerja/admin/cuti/riwayat/".concat(e))};return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsxs)(l.h,{children:[Object(m.jsx)(l.l,{children:Object(m.jsx)("h3",{children:"Cuti Pegawai"})}),Object(m.jsx)(l.i,{children:H.length>0?Object(m.jsx)(j.a,{columns:F,data:E,noHeader:!0,responsive:!0,customStyles:M,pagination:!0,paginationResetDefaultPage:v,subHeader:!0,subHeaderComponent:L,highlightOnHover:!0}):R?Object(m.jsx)("div",{children:Object(m.jsx)(l.X,{children:Object(m.jsx)(l.n,{className:"text-center",children:Object(m.jsx)("img",{className:"mt-4 ml-3",width:30,src:f.d,alt:"load-animation"})})})}):Object(m.jsx)(j.a,{columns:F,data:E,noHeader:!0,responsive:!0,customStyles:M,pagination:!0,paginationResetDefaultPage:v,subHeader:!0,subHeaderComponent:L,highlightOnHover:!0})})]}),Object(m.jsxs)(l.N,{show:n,onClose:function(){return a(!n)},size:"lg",children:[Object(m.jsx)(l.Q,{closeButton:!0,children:Object(m.jsx)(l.R,{children:"Daftar Pegawai Cuti"})}),Object(m.jsx)(l.O,{children:Object(m.jsx)(g,{})})]})]})}},640:function(e,t,n){"use strict";function a(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,"a",(function(){return a}))},644:function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},681:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(40),c=n(626),r=function(e){e({type:a.LOADING}),c.a.get("admin/pegawai/pns").then((function(t){e({type:a.SUCCESS,payload:t.data.data})})).catch((function(t){e({type:a.ERROR,payload:t.response.data.message})}))}}}]);
//# sourceMappingURL=52.99423b13.chunk.js.map