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 26.ca9e6781.chunk.js.LICENSE.txt */
(this["webpackJsonpsimpro-web"]=this["webpackJsonpsimpro-web"]||[]).push([[26,4,7],{2509:function(e,t,n){"use strict";n.r(t);var r=n(604),a=n(619),o=n(707),i=n(2),s=n.n(i),c=n(819),l=n(785),u=n(786),f=n(826),d=n(827),h=n(774),p=n(813),m=n(807),g=n(808),v=n(809),b=n(1013),y=n(661),w=(n(731),n(596),n(430),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),j=I[0],R=I[1],P=Object(i.useState)(),D=Object(a.a)(P,2),F=(D[0],D[1]);Object(i.useEffect)((function(){"Edit"===o?(console.log("cel data Edit",y),O(y.id),R(y.description),F(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:j,onChange:function(e){return R(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:j}):n("edit",{id:C,name:_,description:j}),O(0),void R("")}},o)," ",s.a.createElement(b.a,{className:"capitalize",color:"secondary",onClick:function(){return n("cancel","none"),O(0),void R("")}},"Batal"))))}),E=n(723),C=n(640),O=n(874),S=n(683),x=n(662),_=n.n(x),k=n(628),A=n(752),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