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 lines
1.8 MiB
3 years ago
|
/*! For license information please see 25.b90364dd.chunk.js.LICENSE.txt */
|
||
|
(this["webpackJsonpsimpro-web"]=this["webpackJsonpsimpro-web"]||[]).push([[25,4,7],{2278:function(e,t,n){"use strict";n.r(t);var r=n(601),a=n(616),o=n(700),i=n(2),s=n.n(i),c=n(801),l=n(772),u=n(773),f=n(813),d=n(814),h=n(760),p=n(793),m=n(788),g=n(789),v=n(790),b=n(990),y=n(657),w=(n(726),n(594),n(429),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(721),C=n(639),O=n(864),S=n(679),x=n(654),_=n.n(x),k=n(623),A=n(745),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(
|