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

2 years ago
/*! For license information please see 45.eab14ba4.chunk.js.LICENSE.txt */
(this["webpackJsonpsimpro-web"]=this["webpackJsonpsimpro-web"]||[]).push([[45],{2293:function(e,t,r){"use strict";r.r(t);var n=r(601),a=r(616),i=r(700),o=r(2),s=r.n(o),c=r(801),l=r(772),f=r(773),u=r(813),h=r(814),d=r(760),p=r(793),g=r(788),m=r(789),v=r(790),b=r(990),w=(r(429),function(e){var t=e.openDialog,r=e.closeDialog,n=e.toggleDialog,i=e.typeDialog,w=e.dataEdit,y=Object(o.useState)(0),E=Object(a.a)(y,2),C=E[0],S=E[1],_=Object(o.useState)(""),A=Object(a.a)(_,2),k=A[0],O=A[1],x=Object(o.useState)(""),T=Object(a.a)(x,2),B=T[0],I=T[1];Object(o.useEffect)((function(){"Edit"===i?(console.log("cel data Edit",w),S(w.id),I(w.description),O(w.name)):R()}),[w,t]);var R=function(){S(0),O(""),I("")};return s.a.createElement(s.a.Fragment,null,s.a.createElement(p.a,{size:"lg",isOpen:t,toggle:n},s.a.createElement(g.a,{className:"capitalize",toggle:r},"Save"==i?"Add":"Edit"," Resource"),s.a.createElement(m.a,null,s.a.createElement(c.a,null,s.a.createElement(l.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:k,onChange:function(e){return O(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(v.a,null,s.a.createElement(b.a,{color:"primary",onClick:function(){return"Save"===i?r("save",{name:k,description:B}):r("edit",{id:C,name:k,description:B}),void R()}},i)," ",s.a.createElement(b.a,{className:"capitalize",color:"secondary",onClick:function(){return r("cancel","none"),void R()}},"Batal"))))}),y=r(654),E=r.n(y),C=r(745),S=r(779),_=r(791),A=r(780),k=r(887),O=r(679),x=r(639),T=r(603),B=r(714),I=r(623);function R(){R=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(k){s=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof u?t:u,i=Object.create(a.prototype),o=new S(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 A()}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 c=l(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,o),i}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(k){return{type:"throw",arg:k}}}e.wrap=c;var f={};function u(){}function h(){}function d(){}var p={};s(p,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(_([])));m&&m!==t&&r.call(m,a)&&(p=m);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 c=l(e[a],e,i);if("throw"!==c.type){var f=c.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(c.arg)}(a,i,n,o)}))}return n=n?n.then(o,o):o()}}function y(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=