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

/*! For license information please see 47.5f80e8c7.chunk.js.LICENSE.txt */
(this["webpackJsonpsimpro-web"]=this["webpackJsonpsimpro-web"]||[]).push([[47,5],{2543:function(e,t,r){"use strict";r.r(t);var n=r(608),a=r(621),i=r(2),o=r.n(i),s=r(812),l=r(829),c=r(810),f=r(811),u=r(796),h=r(813),d=r(911),p=r(776),m=r(727),g=r(673),v=r.n(g),b=r(831),w=r(836),y=r(837),E=r(827),_=r(822),C=r(823),S=r(824),k=r(763),A=r(666),x=(r(744),r(598),r(431),A.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),A=v[0],x=v[1],O=Object(i.useState)(""),T=Object(a.a)(O,2),B=(T[0],T[1]),I=Object(i.useState)(""),R=Object(a.a)(I,2),D=R[0],N=R[1],P=Object(i.useState)(),M=Object(a.a)(P,2),F=(M[0],M[1]);Object(i.useEffect)((function(){"Edit"===s?(console.log("cel data Edit",l),m(l.id),N(l.description),F(l.unit_price),B(l.uom),x(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(w.a,null,o.a.createElement(y.a,{className:"capitalize"},"Name"),o.a.createElement(u.a,{type:"text",value:A,onChange:function(e){return x(e.target.value)},placeholder:"Input name..."}))),o.a.createElement(f.a,{md:6},o.a.createElement(w.a,null,o.a.createElement(y.a,{className:"capitalize"},"Description"),o.a.createElement(u.a,{row:"4",type:"textarea",value:D,onChange:function(e){return N(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:A,description:D}):r("edit",{id:p,name:A,description:D}),m(0),void N("")}},s)," ",o.a.createElement(k.a,{className:"capitalize",color:"secondary",onClick:function(){return r("cancel","none"),m(0),void N("")}},"Batal"))))}),O=r(697),T=r(645),B=r(605),I=r(722),R=r(636);function D(){D=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(A){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=y(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(A){return{type:"throw",arg:A}}}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 w(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)