PageSourceSearch

https://opensports.net/_next/static/chunks/pages/[aliasID]/admin/d…/[discountNodeID]/edit-c5347768fb8feea6.js

js opensports.net collected 2026-09-24 12:19:02 UTC 4,088 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9d3b01b1-547f-54b5-b5d4-35cd0acf4af9")}catch(e){}}();
3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[18560],{36498:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[aliasID]/admin/discount-nodes/[discountNodeID]/edit",function(){return n(73995)}])},73995:function(e,t,n){"use strict";n.r(t);var o=n(85893),s=n(67294),r=n(11163),a=n(41484),i=n(30381),u=n.n(i),l=n(64928),d=n(56989),c=n(83216),p=n(77775),m=n(69716),h=n(99717),g=n(11467),D=n(43764),f=n(86153),y=n(48452),I=n(11524),x=n(68254),b=n(10168),C=n(35648),w=n(95714),j=n(92444),N=n(6310);function E(e){return(0,o.jsx)("div",{className:"flex items-center gap-10",children:(0,o.jsx)(c.Z,{segments:[{text:e.t("helpers:home"),href:"/".concat(e.groupAliasID,"/admin/home")},{text:e.t("helpers:discounts"),href:"/".concat(e.groupAliasID,"/admin/discount-nodes")}],text:e.t("discountNode:editLeagueAndTournamentDiscount")})})}t.default=(0,I.cA)((0,D.r)("Discounts")(function(e){let{t}=(0,a.$G)(["common","helpers","league","discountNode"]),n=(0,r.useRouter)(),i=(0,y.Qy)(e=>e.auth.user),c=(0,y.u5)(),D=(0,s.useMemo)(()=>(0,C.i9)(n.query.discountNodeID),[n.query]),I=(0,b.V)((0,s.useCallback)(async()=>D?await (0,x.Kb)({discountNodeID:D},i):null,[D,i])),Z=(0,b.V)((0,s.useCallback)(async()=>{let[t,n]=await Promise.all([(0,N.rw)({groupID:e.groupID},i),(0,N.AQ)({groupID:e.groupID},i),(0,l.Bk)({groupID:e.groupID},i)]),o=(0,N.g8)(n);return t.sort(o),{tags:t,tagGroups:n}},[e.groupID,i])),_=(0,b.V)((0,s.useCallback)(async()=>await (0,l.Bk)({groupID:e.groupID},i).then(t=>{var n,o,s,r;return{id:e.groupID,aliasID:null!==(o=t.aliasID)&&void 0!==o?o:"",timeZone:null!==(s=t.timeZone)&&void 0!==s?s:u().tz.guess(),currency:t.countryShort&&null!==(r=null===(n=(0,d.getCurrencyFromCountryCode)(t.countryShort))||void 0===n?void 0:n.code)&&void 0!==r?r:"USD"}}),[e.groupID,i]));async function k(n){if(D)try{let{confirm:s,reason:r}=await new Promise(e=>{c((0,f.Ll)({showCloseButton:!1,shouldCloseOnOverlayClick:!1,content:(0,o.jsx)(h.Z,{title:"Reason for Update",body:"Enter a reason for this discount update. This will be shown in the revision history.",placeholder:"Reason for update (optional)",hideModal:()=>c((0,f.GZ)()),options:[{text:t("helpers:cancel"),className:"btn btn-default btn-sm",onPress:()=>e({confirm:!1,reason:null})},{text:t("helpers:save"),className:"btn btn-primary btn-sm",onPressWithText:t=>e({confirm:!0,reason:t.trim()?t.trim():null})}]})}))});if(!s)return;await (0,x.dH)({...n,discountNodeID:D,reason:r},i),w.Z.push("/[aliasID]/admin/discount-nodes","/".concat(e.aliasID,"/admin/discount-nodes"))}catch(e){c((0,f.b0)((0,d.prettifyErrorMessage)(t,e,"Could not update league discount.")))}}let v=(0,g.W)([[I,!1],[Z,!1],[_,!1]]);return(0,o.jsxs)(o.Fragment,{children:[(0,j.D)({title:t("discountNode:editLeagueAndTournamentDiscount")}),(0,o.jsx)(g.Z,{query:v.query,LoadingComponent:(0,o.jsx)(p.Z,{LeftComponent:(0,o.jsx)(E,{groupAliasID:e.aliasID,t:t}),children:(0,o.jsx)(p.Z.Loading,{})}),ErrorComponent:(0,o.jsx)(p.Z,{LeftComponent:(0,o.jsx)(E,{groupAliasID:e.aliasID,t:t}),children:(0,o.jsx)(p.Z.Error,{message:(0,d.prettifyErrorMessage)(t,v.query.error),children:(0,o.jsx)("button",{type:"button",onClick:()=>{I.reload(),Z.reload(),_.reload()},className:"btn btn-primary btn-sm",children:t("helpers:reload")})})}),EmptyComponent:null,isEmpty:v.isEmpty,children:(0,o.jsx)(p.Z,{LeftComponent:(0,o.jsx)(E,{groupAliasID:e.aliasID,t:t}),children:I.data&&Z.data&&_.data&&(0,o.jsx)(m.Z,{discountNode:I.data,tags:Z.data.tags,tagGroups:Z.data.tagGroups,group:_.data,mode:"edit",onSubmit:k})})})]})}))}},function(e){e.O(0,[87536,96825,30239,41160,29195,43764,91138,89674,35648,92796,34921,95192,34351,37072,80935,5723,98809,64462,92888,49774,40179],function(){return e(e.s=36498)}),_N_E=e.O()}]);
4//# sourceMappingURL=edit-c5347768fb8feea6.js.map
5//# debugId=9d3b01b1-547f-54b5-b5d4-35cd0acf4af9

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.