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 45.7a04e2d4.chunk.js.LICENSE.txt */
(this["webpackJsonpsimpro-web"]=this["webpackJsonpsimpro-web"]||[]).push([[45,4],{2334:function(e,t,r){"use strict";r.r(t);var n=r(607),a=r(618),i=r(719),o=r(2),s=r.n(o),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),v=r(816),b=r(757),w=r(663),y=(r(739),r(597),r(431),w.default.Option),E=function(e){var t=e.openDialog,r=e.closeDialog,n=e.toggleDialog,i=e.typeDialog,E=e.dataEdit,_=e.dataDivisions,C=Object(o.useState)(0),S=Object(a.a)(C,2),k=S[0],A=S[1],x=Object(o.useState)(""),O=Object(a.a)(x,2),T=O[0],B=O[1],I=Object(o.useState)(null),R=Object(a.a)(I,2),D=R[0],N=R[1],P=Object(o.useState)(""),M=Object(a.a)(P,2),F=M[0],L=M[1],j=function(e){N(e)};Object(o.useEffect)((function(){"Edit"===i?(A(E.id),L(E.description),B(E.name),N(E.parent)):A(0)}),[E,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"==i?"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:T,onChange:function(e){return B(e.target.value)}})))),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"},"Parent"),s.a.createElement(w.default,{showSearch:!0,value:D,onChange:j,style:{width:"100%"},filterOption:function(e,t){return t.children.toLowerCase().includes(e.toLowerCase())}},_.map((function(e,t){return s.a.createElement(y,{key:t,value:t},e)})))))),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"},"Description"),s.a.createElement(d.a,{row:"4",type:"textarea",value:F,onChange:function(e){return L(e.target.value)}})))))),s.a.createElement(v.a,null,s.a.createElement(b.a,{color:"primary",onClick:function(){return"Save"===i?r("save",{name:T,description:F,parent:D}):r("edit",{id:k,name:T,description:F,parent:D}),A(0),void L("")}},i)," ",s.a.createElement(b.a,{className:"capitalize",color:"secondary",onClick:function(){return r("cancel","none"),A(0),void L("")}},"Batal"))))},_=r(665),C=r.n(_),S=r(762),k=r(806),A=r(819),x=r(807),O=r(901),T=r(630),B=r(695),I=r(642),R=r(605),D=r(720);function N(){N=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,