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.6 MiB
2 lines
1.6 MiB
2 years ago
|
/*! For license information please see 43.d69e74d9.chunk.js.LICENSE.txt */
|
||
|
(this["webpackJsonpsimpro-web"]=this["webpackJsonpsimpro-web"]||[]).push([[43,4],{2312:function(e,t,r){"use strict";r.r(t);var n=r(601),a=r(616),i=r(2),o=r.n(i),s=r(779),l=r(791),c=r(772),f=r(773),u=r(760),h=r(780),d=r(887),p=r(745),m=r(700),g=r(654),v=r.n(g),b=r(801),y=r(813),w=r(814),E=r(793),_=r(788),C=r(789),S=r(790),k=r(990),O=r(657),A=(r(726),r(594),r(429),O.default.Option,function(e){var t=e.openDialog,r=e.closeDialog,n=e.toggleDialog,s=e.typeDialog,l=e.dataEdit,h=Object(i.useState)(0),d=Object(a.a)(h,2),p=d[0],m=d[1],g=Object(i.useState)(""),v=Object(a.a)(g,2),O=v[0],A=v[1],x=Object(i.useState)(""),T=Object(a.a)(x,2),B=(T[0],T[1]),I=Object(i.useState)(""),R=Object(a.a)(I,2),P=R[0],D=R[1],N=Object(i.useState)(),F=Object(a.a)(N,2),M=(F[0],F[1]);Object(i.useEffect)((function(){"Edit"===s?(console.log("cel data Edit",l),m(l.id),D(l.description),M(l.unit_price),B(l.uom),A(l.name)):m(0)}),[l,t]);return o.a.createElement(o.a.Fragment,null,o.a.createElement(E.a,{size:"lg",isOpen:t,toggle:n},o.a.createElement(_.a,{className:"capitalize",toggle:r},"Save"==s?"Add":"Edit"," Resource"),o.a.createElement(C.a,null,o.a.createElement(b.a,null,o.a.createElement(c.a,null,o.a.createElement(f.a,{md:6},o.a.createElement(y.a,null,o.a.createElement(w.a,{className:"capitalize"},"Name"),o.a.createElement(u.a,{type:"text",value:O,onChange:function(e){return A(e.target.value)},placeholder:"Input name..."}))),o.a.createElement(f.a,{md:6},o.a.createElement(y.a,null,o.a.createElement(w.a,{className:"capitalize"},"Description"),o.a.createElement(u.a,{row:"4",type:"textarea",value:P,onChange:function(e){return D(e.target.value)},placeholder:"Description ..."})))))),o.a.createElement(S.a,null,o.a.createElement(k.a,{color:"primary",onClick:function(){return"Save"===s?r("save",{name:O,description:P}):r("edit",{id:p,name:O,description:P}),m(0),void D("")}},s)," ",o.a.createElement(k.a,{className:"capitalize",color:"secondary",onClick:function(){return r("cancel","none"),m(0),void D("")}},"Batal"))))}),x=r(679),T=r(639),B=r(603),I=r(714),R=r(623);function P(){P=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",o=n.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(O){s=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof u?t:u,i=Object.create(a.prototype),o=new C(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(a,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw i;return k()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=w(o,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=c(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,o),i}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(O){return{type:"throw",arg:O}}}e.wrap=l;var f={};function u(){}function h(){}function d(){}var p={};s(p,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==t&&r.call(g,a)&&(p=g);var v=d.prototype=u.prototype=Object.create(p);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function y(e,t){var n;this._invoke=function(a,i){function o(){return new t((function(n,o){!function n(a,i,o,s){var l=c(e[a],e,i);if("throw"!==l.type){var f=l.arg,u=f.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,o,s)}),(function(e){n("throw",e,o,s)})):t.resolve(u).then((function(e){f.value=e,o(f)}),(function(e){return n("throw",e,o,s)}))}s(l.arg)}(a,i,n,o)
|