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 50.b3a95af8.chunk.js.LICENSE.txt */
(this["webpackJsonpsimpro-web"]=this["webpackJsonpsimpro-web"]||[]).push([[50],{2346:function(e,t,r){"use strict";r.r(t);var n=r(607),a=r(618),o=r(719),i=r(2),s=r.n(i),l=r(822),c=r(792),f=r(793),u=r(827),h=r(828),d=r(783),p=r(817),m=r(814),g=r(815),b=r(816),v=r(757),w=(r(431),function(e){var t=e.openDialog,r=e.closeDialog,n=e.toggleDialog,o=e.typeDialog,w=e.dataEdit,E=Object(i.useState)(0),y=Object(a.a)(E,2),C=y[0],S=y[1],_=Object(i.useState)(""),A=Object(a.a)(_,2),x=A[0],k=A[1],O=Object(i.useState)(""),T=Object(a.a)(O,2),B=T[0],I=T[1];Object(i.useEffect)((function(){"Edit"===o?(console.log("cel data Edit",w),S(w.id),I(w.description),k(w.name)):S(0)}),[w,t]);return s.a.createElement(s.a.Fragment,null,s.a.createElement(p.a,{size:"lg",isOpen:t,toggle:n},s.a.createElement(m.a,{className:"capitalize",toggle:r},"Save"==o?"Add":"Edit"," Resource"),s.a.createElement(g.a,null,s.a.createElement(l.a,null,s.a.createElement(c.a,null,s.a.createElement(f.a,{md:6},s.a.createElement(u.a,null,s.a.createElement(h.a,{className:"capitalize"},"Name"),s.a.createElement(d.a,{type:"text",value:x,onChange:function(e){return k(e.target.value)},placeholder:"Input name..."}))),s.a.createElement(f.a,{md:6},s.a.createElement(u.a,null,s.a.createElement(h.a,{className:"capitalize"},"Description"),s.a.createElement(d.a,{row:"4",type:"textarea",value:B,onChange:function(e){return I(e.target.value)},placeholder:"Description ..."})))))),s.a.createElement(b.a,null,s.a.createElement(v.a,{color:"primary",onClick:function(){return"Save"===o?r("save",{name:x,description:B}):r("edit",{id:C,name:x,description:B}),S(0),void I("")}},o)," ",s.a.createElement(v.a,{className:"capitalize",color:"secondary",onClick:function(){return r("cancel","none"),S(0),void I("")}},"Batal"))))}),E=r(665),y=r.n(E),C=r(762),S=r(806),_=r(819),A=r(807),x=r(901),k=r(695),O=r(642),T=r(605),B=r(720),I=r(630);function R(){R=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=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(x){s=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof u?t:u,o=Object.create(a.prototype),i=new S(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return A()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var s=E(i,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,i),o}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(x){return{type:"throw",arg:x}}}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(_([])));g&&g!==t&&r.call(g,a)&&(p=g);var b=d.prototype=u.prototype=Object.create(p);function v(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,o){function i(){return new t((function(n,i){!function n(a,o,i,s){var l=c(e[a],e,o);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,i,s)}),(function(e){n("throw",e,i,s)})):t.resolve(u).then((function(e){f.value=e,i(f)}),(function(e){return n("throw",e,i,s)}))}s(l.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function E(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void