1(this["webpackJsonpristobg-admin"]=this["webpackJsonpristobg-admin"]||[]).push([[42],{545:function(e,t,n){"use strict";n.r(t);var c=n(4),r=n.n(c),a=n(18),o=n(9),i=n(1),s=n(419),u=n(117),d=n(107),l=n(100),b=n(394),p=n(127),C=n(20),h=n(176),j=n(463),O=n(464),g=n(465),f=(n(466),n(467)),m=n(77),k=n(56),_=n(0),x=function(e){var t=e.inProcess,n=e.onCancel,c=e.onSubmit,r=(e.currentStep,e.categories),a=void 0===r?[]:r,o=e.products,s=void 0===o?[]:o,u=e.errors,d=e.handleResetErrors,C=Object(j.a)({title_de:"",title_en:"",title_es:"",title_fr:"",title_it:"",title_ru:"",description_de:"",description_en:"",description_es:"",description_fr:"",description_it:"",description_ru:"",price:0,can_be_chosen_count:1,mandatory:!1,can_be_excluded:!1,exclude_price:"0",option_types:["include"],option_categories:[h.a.getOptionsNewCategory()],option_items_attributes:[{uuid:Object(k.a)(),price:"00,00",title:""}]}),x=C.localState,v=C.onChange,y=C.onChangeProduct,S=C.onClickAddCategory,w=C.onClickAddProduct,D=C.onChangeCategoryStatus,P=C.onChangeCategory,R=C.onClickNumber,A=C.onChangeRadio,I=C.onClickRemoveCategory,E=C.onClickChip,N=C.onChangeItems,J=C.onClickAddNewItem,K=C.onClickDeleteItem,T=C.onClickDeleteDish;Object(i.useEffect)((function(){d&&d()}),[x]);var U=Object(i.useCallback)((function(e){e.preventDefault(),c(x)}),[c,x]);return Object(_.jsxs)(l.b,{as:"form",onSubmit:U,children:[Object(_.jsxs)("div",{children:[Object(_.jsx)(b.a,{children:Object(_.jsx)("p",{children:"Crea opzioni/aggiunte "})}),Object(_.jsx)(O.a,{data:x,onChange:v,errors:u,onClickChip:E,onChangeItems:N,onClickAddNewItem:J,onClickDelete:K}),Object(_.jsx)(g.a,{data:x,onChangeRadio:A,onClickNumber:R,onChangeNumber:v,errors:u}),Object(_.jsx)(f.a,{data:x,onChangeCategory:P,onChangeCategoryStatus:D,onChangeProduct:y,onClickAddProduct:w,onClickAddCategory:S,errors:u,categories:a,onClickDeleteDish:T,products:s,onClickRemoveCategory:I}),Object(_.jsx)(m.a,{errors:u})]}),Object(_.jsx)(p.a,{inProcess:t,cancelText:"Annula",isForm:!0,submitText:"Salva",onCancel:n})]})},v=n(138),y=n(29),S=n(6),w=n(71),D=n(55);t.default=function(e){var t=e.history,n=Object(i.useState)([]),c=Object(o.a)(n,2),b=c[0],p=c[1],h=Object(i.useState)([]),j=Object(o.a)(h,2),O=j[0],g=j[1],f=Object(v.a)(),m=f.step,k=f.handleChangeDishStep,P=f.handleUpdateOrCreate,R=f.handleResetSteps,A=f.createOrUpdateInProcess,I=f.errors,E=f.handleResetErrors,N=Object(w.a)(u.a).api,J=Object(w.a)(d.a).api,K=Object(i.useCallback)(function(){var e=Object(a.a)(r.a.mark((function e(t){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:P(t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[k,m,P]),T=Object(i.useCallback)((function(){var e=Object(y.o)(C.c,m);e?k(e):(R(),t.push(S.a.menu))}),[t,m,k]);return Object(i.useEffect)((function(){return function(){R()}}),[]),Object(i.useEffect)((function(){Object(a.a)(r.a.mark((function e(){var t,n;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(D.c)(N,{itemsKey:"dish_categories"});case 3:t=e.sent,p(t),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:return e.prev=9,e.next=12,Object(D.c)(J,{itemsKey:"dishes"});case 12:n=e.sent,g(n),e.next=18;break;case 16:e.prev=16,e.t1=e.catch(9);case 18:case"end":return e.stop()}}),e,null,[[0,7],[9,16]])})))()}),[]),Object(_.jsx)(s.a,{children:Object(_.jsx)(l.a,{alignItems:"stretch",minH:"75vh",children:Object(_.jsx)(x,{products:O,categories:b,onSubmit:K,onCancel:T,inProcess:A,currentStep:m,errors:I,handleResetErrors:E})})})}}}]); 2//# sourceMappingURL=42.15c1d42f.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.