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 30.ed1bb3d4.chunk.js.LICENSE.txt */
(this["webpackJsonpsimpro-web"]=this["webpackJsonpsimpro-web"]||[]).push([[30,4,8],{2339:function(e,t,n){"use strict";n.r(t);var r=n(607),a=n(618),o=n(719),i=n(2),s=n.n(i),c=n(817),l=n(814),u=n(815),f=n(816),d=n(822),h=n(792),p=n(793),m=n(827),g=n(828),v=n(783),b=n(757),y=n(663),w=(n(597),n(431),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,S=Object(i.useState)(0),O=Object(a.a)(S,2),x=O[0],_=O[1],k=Object(i.useState)(""),A=Object(a.a)(k,2),T=A[0],N=A[1],B=Object(i.useState)(""),I=Object(a.a)(B,2),R=I[0],P=I[1],D=Object(i.useState)(""),j=Object(a.a)(D,2),M=j[0],F=j[1],L=Object(i.useState)(""),U=Object(a.a)(L,2),z=U[0],H=U[1],V=Object(i.useState)(0),W=Object(a.a)(V,2),K=W[0],G=W[1],Y=Object(i.useState)(null),X=Object(a.a)(Y,2),$=X[0],Z=X[1];Object(i.useEffect)((function(){"Edit"===o?(console.log("data edit",E),_(E.id),N(E.name),P(E.url),H(E.icon),Z(E.parent_id),G(E.sequence),F(E.alias_name)):(_(0),N(""),P(""),H(""),Z(null),G(0),F(""))}),[E,t]);var q=function(e){Z(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 H(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 G(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:q,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:M,onChange:function(e){return F(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:M},$&&$>0&&(e.parent_id=$),n("save",e)):(e={id:x,name:T,url:R,sequence:parseInt(K),icon:z,alias_name:M},$&&$>0&&(e.parent_id=$),n("edit",e)),_(0),N(""),P(""),H(""),Z(null),G(0),F("")}()}},o)," ",s.a.createElement(b.a,{className:"capitalize",color:"secondary",onClick:function(){return n("cancel","none"),_(0),N(""),P(""),H(""),Z(null),G(0),void F("")}},"Batal")))},C=n(665),S=n.n(C),O=n(656),x=n.n(O),_=n(806),k=n(819),A=n(807),T=n(630),N=n(695),B=n(642),I=n(861),R=n(720);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 S(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}}