PageSourceSearch

https://admin.lunchbox.io/static/js/289.95db8aaf.chunk.js

js lunchbox.io collected 2026-09-24 09:28:03 UTC 5,112 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkadmin_web=self.webpackChunkadmin_web||[]).push([[289],{60289:function(e,l,t){t.r(l);var s=t(1413),n=t(74165),i=t(15861),r=(t(72791),t(67571)),a=t(27927),o=t(74649),u=t(28304),c=t(30914),d=t(36206),p=t(66001),_=t(59930),x=t(19741),h=t(53913),b=t(78531),g=t(46196),f=t(80184),m=_.eK.Titles,j=m.BlueCardTitle,v=m.SectionTitle,T=_.eK.Row,Z=_.eK.Button,B=_.eK.T,y=h.P6.mapAxiosError,w=_.nB.Cards.BlueCard,S=_.nB.Tables.LocationToggleTable,C=_.nB.EntityToggle,L=_.nB.ConfirmationButton,A=h.OC.UpsellSchema;l.default=function(e){var l=e.locations,t=(0,b.g)().Upsells,h=(0,r.UO)().upsellId,m=(0,a.Wf)({path:"/upsells/".concat(h)}),k=m.resource,U=m.fetching,F=m.fetch,I=k.priority,D=k.disabledLocations,E=k.excludedLocations,N=k.item,K=void 0===N?{}:N,z=k.group,O=void 0===z?{}:z,V=function(){var e=(0,i.Z)((0,n.Z)().mark((function e(l){return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.update(h,l);case 3:o.Z.success("Succesfully Saved"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),o.Z.error(y(e.t0));case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(l){return e.apply(this,arguments)}}(),W=function(){var e=(0,i.Z)((0,n.Z)().mark((function e(){return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.delete(h);case 3:o.Z.success("Succesfully Saved"),F(),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),o.Z.error(y(e.t0));case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}();return U?(0,f.jsx)(d.T,{}):(0,f.jsx)(p.J9,{initialValues:{priority:I,excludedLocations:E,disabledLocations:D},validateOnChange:!1,validationSchema:A,enableReinitialize:!0,onSubmit:function(){var e=(0,i.Z)((0,n.Z)().mark((function e(l,t){var i;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=(0,s.Z)({},l)).disabledLocations=l.disabledLocations.map((function(e){return"object"===typeof e?e.id:e})),e.next=4,V(i);case 4:t.setSubmitting(!1);case 5:case"end":return e.stop()}}),e)})));return function(l,t){return e.apply(this,arguments)}}(),render:function(e){var t=e.handleSubmit,s=e.isSubmitting,n=e.values,i=e.setFieldValue;return(0,f.jsx)(u.Z,{onSubmit:t,children:(0,f.jsxs)(w,{children:[(0,f.jsxs)(T,{children:[(0,f.jsx)(c.Z,{xs:15,children:(0,f.jsx)(j,{children:"".concat(K.name," Upsell")})}),(0,f.jsx)(c.Z,{xs:9,className:g.Z.entityToggle,children:(0,f.jsx)(C,{checked:k.isActive,path:"/upsells/".concat(h)})})]}),(0,f.jsxs)(T,{spacing:10,children:[(0,f.jsxs)(c.Z,{children:[(0,f.jsx)(B,{label:!0,inline:!0,children:"Item: "}),(0,f.jsx)(B,{copyable:{text:K.externalId},inline:!0,children:(0,f.jsx)(x.rU,{to:"/item/".concat(null===K||void 0===K?void 0:K.id),children:K.externalId})})]}),(0,f.jsxs)(c.Z,{children:[(0,f.jsx)(B,{label:!0,inline:!0,children:"Group: "}),(0,f.jsx)(B,{copyable:{text:O.externalId},inline:!0,children:(0,f.jsx)(x.rU,{to:"/group/".concat(null===O||void 0===O?void 0:O.id),children:O.externalId})})]})]}),(0,f.jsx)(c.Z,{xs:24,sm:12,children:(0,f.jsxs)("div",{className:g.Z.detailsContainer,children:[(0,f.jsx)(v,{children:"Edit Details"}),(0,f.jsx)(T,{spacing:230,children:(0,f.jsx)(p.gN,{name:"priority",label:"Priority",placeholder:"0",size:"small",type:"number",component:_.Iv.Input})}),(0,f.jsx)(c.Z,{xs:12,className:g.Z.saveButton,children:(0,f.jsx)(Z,{width:"90%",htmlType:"submit",size:"small",disabled:s,loading:s,color:"blue",children:"Save"})}),(0,f.jsx)(c.Z,{xs:12,className:g.Z.rightAlign,children:(0,f.jsx)(L,{placement:"bottom",title:"Are you sure you want to delete this upsell",okText:"Yes",onConfirm:W,children:(0,f.jsx)(Z,{size:"small",color:"red",disabled:k.isDeleted,children:k.isDeleted?"Deleted":"Delete"})})})]})}),(0,f.jsx)(c.Z,{xs:24,sm:12,children:(0,f.jsx)(S,{height:300,onSelection:V,excludedLocations:E,disabledLocations:n.disabledLocations,locations:l,setFieldValue:i,loading:U||s})})]})})}})}},46196:function(e,l){l.Z={progressCard:"upsells_progressCard__Lf6zF",buttonWrapper:"upsells_buttonWrapper__2wllA",progressButton:"upsells_progressButton__Is4LC",progressButtonText:"upsells_progressButtonText__M+6qC",buttonTextWrapper:"upsells_buttonTextWrapper__ANcMw",progressLine:"upsells_progressLine__x0JZb",upsellDrawerTitle:"upsells_upsellDrawerTitle__5mBpX",detailsDrawerTable:"upsells_detailsDrawerTable__Nk5SU",selectedButton:"upsells_selectedButton__K-aEe",selectedButtonSubgroup:"upsells_selectedButtonSubgroup__Kv1Eo",unselectedButton:"upsells_unselectedButton__qbevl",selectedText:"upsells_selectedText__fyjdE",selectedTextSubgroup:"upsells_selectedTextSubgroup__iwGdE",unselectedText:"upsells_unselectedText__0s+2U",lineFillAfter:"upsells_lineFillAfter__udkLA",lineFillAfterSubgroup:"upsells_lineFillAfterSubgroup__gVBPI",lineFillBefore:"upsells_lineFillBefore__VjEw4",lineUnfilled:"upsells_lineUnfilled__FArcO",upsellTableTitle:"upsells_upsellTableTitle__t7Oua",rightAlign:"upsells_rightAlign__0yMdf",detailsContainer:"upsells_detailsContainer__LtNgP",entityToggle:"upsells_entityToggle__m8U47"}}}]);
2//# sourceMappingURL=289.95db8aaf.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.