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

/*! For license information please see 26.946d238e.chunk.js.LICENSE.txt */
(this["webpackJsonpsimpro-web"]=this["webpackJsonpsimpro-web"]||[]).push([[26,4,7],{2298:function(e,t,n){"use strict";n.r(t);var r=n(601),a=n(616),o=n(700),i=n(2),s=n.n(i),c=n(793),l=n(788),u=n(789),f=n(790),d=n(801),h=n(772),p=n(773),m=n(813),g=n(814),v=n(760),b=n(990),y=n(657),w=(n(594),n(429),y.default.Option),E=function(e){var t=e.openDialog,n=e.closeDialog,r=e.toggleDialog,o=e.typeDialog,E=e.dataEdit,C=e.dataMenu,O=Object(i.useState)(0),S=Object(a.a)(O,2),x=S[0],_=S[1],k=Object(i.useState)(""),A=Object(a.a)(k,2),T=A[0],N=A[1],I=Object(i.useState)(""),B=Object(a.a)(I,2),R=B[0],P=B[1],j=Object(i.useState)(""),D=Object(a.a)(j,2),F=D[0],M=D[1],L=Object(i.useState)(""),U=Object(a.a)(L,2),z=U[0],V=U[1],H=Object(i.useState)(0),W=Object(a.a)(H,2),K=W[0],Y=W[1],G=Object(i.useState)(null),X=Object(a.a)(G,2),$=X[0],q=X[1];Object(i.useEffect)((function(){"Edit"===o?(console.log("data edit",E),_(E.id),N(E.name),P(E.url),V(E.icon),q(E.parent_id),Y(E.sequence),M(E.alias_name)):(_(0),N(""),P(""),V(""),q(null),Y(0),M(""))}),[E,t]);var Z=function(e){q(e)};return s.a.createElement(c.a,{size:"lg",isOpen:t,toggle:r},s.a.createElement(l.a,{className:"capitalize",toggle:n},"Save"==o?"Tambah":"Edit"," Menu"),s.a.createElement(u.a,null,s.a.createElement(d.a,null,s.a.createElement(h.a,null,s.a.createElement(p.a,null,s.a.createElement(m.a,null,s.a.createElement(g.a,{className:"capitalize"},"Nama Menu"),s.a.createElement(v.a,{type:"text",value:T,onChange:function(e){return N(e.target.value)},placeholder:"Menu.."})),s.a.createElement(m.a,null,s.a.createElement(g.a,{className:"capitalize"},"URL"),s.a.createElement(v.a,{type:"text",value:R,onChange:function(e){return P(e.target.value)},placeholder:"Url.."})),s.a.createElement(m.a,null,s.a.createElement(g.a,{className:"capitalize"},"Icon"),s.a.createElement(v.a,{type:"text",value:z,onChange:function(e){return V(e.target.value)},placeholder:"Ikon.."}))),s.a.createElement(p.a,null,s.a.createElement(m.a,null,s.a.createElement(g.a,{className:"capitalize"},"Urutan"),s.a.createElement(v.a,{type:"number",value:K,onChange:function(e){return Y(e.target.value)},placeholder:"urutan.."})),s.a.createElement(m.a,null,s.a.createElement(g.a,{className:"capitalize"},"Parent"),s.a.createElement(y.default,{showSearch:!0,defaultValue:$,onChange:Z,placeholder:"Select Parent",style:{width:"100%"}},s.a.createElement(s.a.Fragment,null,C.map((function(e,t){return s.a.createElement(w,{key:t,value:e.id},e.name)}))))),s.a.createElement(m.a,null,s.a.createElement(g.a,{className:"capitalize"},"Alias Menu"),s.a.createElement(v.a,{type:"text",value:F,onChange:function(e){return M(e.target.value)},placeholder:"Alias.."})))))),s.a.createElement(f.a,null,s.a.createElement(b.a,{color:"primary",onClick:function(){return function(){var e="";"Save"===o?(e={name:T,url:R,sequence:parseInt(K),icon:z,alias_name:F},$&&$>0&&(e.parent_id=$),n("save",e)):(e={id:x,name:T,url:R,sequence:parseInt(K),icon:z,alias_name:F},$&&$>0&&(e.parent_id=$),n("edit",e)),_(0),N(""),P(""),V(""),q(null),Y(0),M("")}()}},o)," ",s.a.createElement(b.a,{className:"capitalize",color:"secondary",onClick:function(){return n("cancel","none"),_(0),N(""),P(""),V(""),q(null),Y(0),void M("")}},"Batal")))},C=n(654),O=n.n(C),S=n(649),x=n.n(S),_=n(779),k=n(791),A=n(780),T=n(623),N=n(679),I=n(639),B=n(864),R=n(714);function P(){P=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(_){s=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new O(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return x()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var s=w(i,n);if(s){if(s===u)continue;return s}}