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

/*! For license information please see 27.ce2e2301.chunk.js.LICENSE.txt */
(this["webpackJsonpsimpro-web"]=this["webpackJsonpsimpro-web"]||[]).push([[27,5,8],{2511:function(e,t,n){"use strict";n.r(t);var r=n(608),a=n(621),o=n(727),i=n(2),s=n.n(i),c=n(831),l=n(810),u=n(811),f=n(836),d=n(837),h=n(796),p=n(827),m=n(822),g=n(823),v=n(824),b=n(763),y=n(666),w=(n(744),n(598),n(431),y.default.Option,function(e){var t=e.openDialog,n=e.closeDialog,r=e.toggleDialog,o=e.typeDialog,y=e.dataEdit,w=Object(i.useState)(0),E=Object(a.a)(w,2),C=E[0],O=E[1],S=Object(i.useState)(""),x=Object(a.a)(S,2),_=x[0],k=x[1],A=Object(i.useState)(""),T=Object(a.a)(A,2),N=(T[0],T[1]),B=Object(i.useState)(""),I=Object(a.a)(B,2),R=I[0],P=I[1],j=Object(i.useState)(),D=Object(a.a)(j,2),M=(D[0],D[1]);Object(i.useEffect)((function(){"Edit"===o?(console.log("cel data Edit",y),O(y.id),P(y.description),M(y.unit_price),N(y.uom),k(y.name)):O(0)}),[y,t]);return s.a.createElement(s.a.Fragment,null,s.a.createElement(p.a,{size:"lg",isOpen:t,toggle:r},s.a.createElement(m.a,{className:"capitalize",toggle:n},"Save"==o?"Add":"Edit"," Resource"),s.a.createElement(g.a,null,s.a.createElement(c.a,null,s.a.createElement(l.a,null,s.a.createElement(u.a,{md:6},s.a.createElement(f.a,null,s.a.createElement(d.a,{className:"capitalize"},"Project Type"),s.a.createElement(h.a,{type:"text",value:_,onChange:function(e){return k(e.target.value)},placeholder:"Input material name..."}))),s.a.createElement(u.a,{md:6},s.a.createElement(f.a,null,s.a.createElement(d.a,{className:"capitalize"},"Description"),s.a.createElement(h.a,{row:"4",type:"textarea",value:R,onChange:function(e){return P(e.target.value)},placeholder:"Description ..."})))))),s.a.createElement(v.a,null,s.a.createElement(b.a,{color:"primary",onClick:function(){return"Save"===o?n("save",{name:_,description:R}):n("edit",{id:C,name:_,description:R}),O(0),void P("")}},o)," ",s.a.createElement(b.a,{className:"capitalize",color:"secondary",onClick:function(){return n("cancel","none"),O(0),void P("")}},"Batal"))))}),E=n(740),C=n(645),O=n(869),S=n(697),x=n(673),_=n.n(x),k=n(636),A=n(776),T=function(e){var t=e.openDialog,n=e.closeDialog,r=e.toggleDialog,o=e.typeDialog,l=e.dataEdit,u=e.idActivity,y=e.projectTypeId,w=Object(i.useState)(0),E=Object(a.a)(w,2),C=E[0],O=E[1],S=Object(i.useState)(""),x=Object(a.a)(S,2),_=x[0],k=x[1];Object(i.useEffect)((function(){"edit"===o?(O(l.id),k(l.name_activity)):(O(0),k(""))}),[l,t]);return s.a.createElement(s.a.Fragment,null,s.a.createElement(p.a,{isOpen:t,toggle:r},s.a.createElement(m.a,{className:"capitalize",toggle:n},"add"==o?"Add":"Edit"," Activity"),s.a.createElement(g.a,null,s.a.createElement(c.a,null,s.a.createElement(f.a,null,s.a.createElement(d.a,{className:"capitalize"},"Activity"),s.a.createElement(h.a,{row:"4",type:"textarea",value:_,onChange:function(e){return k(e.target.value)},placeholder:"Persiapan ..."})))),s.a.createElement(v.a,null,s.a.createElement(b.a,{className:"capitalize",color:"primary",onClick:function(){return function(){var e="";"add"===o?(e={name_activity:_,proyek_type_id:y},u&&u>0&&(e.parent_id=u),console.log("cek cek cek"),n("save",e)):(e={id:C,name_activity:_,proyek_type_id:y},u&&u>0&&(e.parent_id=u),console.log("cek cek cek 2"),n("edit",e)),O(0),k("")}()}},o)," ",s.a.createElement(b.a,{className:"capitalize",color:"secondary",onClick:function(){return n("cancel","none"),O(0),void k("")}},"Batal"))))};function N(){N=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(_){s=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new O(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return x()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var s=w(i,n);if(s){if(