PageSourceSearch

https://goaleapp.com/_next/static/chunks/pages/match/detail/[id]/update-aeb822d3eec35d1a.js

js goaleapp.com collected 2026-10-02 01:31:41 UTC 4,763 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[456],{34495:function(t,e,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/match/detail/[id]/update",function(){return a(42256)}])},27997:function(t,e,a){"use strict";var i,d;a.d(e,{R:function(){return i}}),(d=i||(i={}))[d.UPCOMING=0]="UPCOMING",d[d.CANCEL=1]="CANCEL",d[d.IN_PROGRESS=2]="IN_PROGRESS",d[d.COMPLETE=3]="COMPLETE",d[d.CLOSE=4]="CLOSE"},42256:function(t,e,a){"use strict";a.r(e);var i=a(85893),d=a(86886),o=a(80008),c=a.n(o),l=a(11163),n=a(67294),r=a(4480),s=a(7020),_=a(6311),m=a(58793),u=a(74626),h=a(590),v=a(6605),p=a(18307),f=a(9571),y=a(66055),x=a(61591),b=a(27997),g=a(61238);let E=()=>{let t=(0,f.Z)("v2"),e=(0,r.sJ)(g.Fr),a=(0,l.useRouter)(),o=(0,r.Zl)(g._C),E=(0,r.Zl)(g.fU),C=(0,r.Zl)(g.EV),O=(0,r.Zl)(g.zK),[q,M]=(0,n.useState)(b.R.UPCOMING),[N,Z]=(0,n.useState)({match_type:"HOME",event:"FOOTBALL",match_date:void 0,vote_end_date:void 0,quarter:2,quarter_time:25}),[w,P]=(0,n.useState)({match_type:"HOME",event:"FOOTBALL",match_date:void 0,vote_end_date:void 0,quarter:2,quarter_time:25}),k=async()=>{try{let t=await (null==e?void 0:e.request({method:"get",url:"/api/match",params:{match_id:a.query.id}}));if(null==t?void 0:t.success){let{data:e}=t.data,i=e.match.match_type,d={match_date:(0,x.WU)(e.match.match_date,"YYYY-MM-DD HH:mm:ss"),vote_end_date:(0,x.WU)(e.match.vote_end_date,"YYYY-MM-DD HH:mm:ss"),stadium_info:{...e.stadium_info},event:e.match.event,quarter:e.match.quarter,quarter_time:e.match.quarter_time,match_type:i,uniform_color:e.match.uniform_color,notice:e.match.notice,opposing_id:"HOME"===i?e.match_detail.away_id:e.match_detail.home_id,opposing_name:"HOME"===i?e.match_detail.away_name:e.match_detail.home_name,opposing_logo:"HOME"===i?e.match_detail.away_logo:e.match_detail.home_logo};Z(d),P(d),M(e.match.status),a.replace({pathname:a.pathname,query:{...a.query,clubUrl:"AWAY"===i?e.match_detail.away_url:e.match_detail.home_url}})}}catch(t){console.log(t)}};(0,n.useEffect)(()=>{a.isReady&&k()},[a.isReady]);let Y=()=>{o({variant:"confirm",version:"v2",closeButton:!0,title:"변경중인 매치 정보가 있어요",body:"작성된 정보는 저장되지 않아요",clickText:"나가기",cancelText:"계속 작성",onClick:()=>a.replace({pathname:"/match/detail/[id]",query:{...a.query}})})},j=()=>{o({variant:"confirm",version:"v2",title:"매치를 삭제 하시겠어요?",body:"삭제 시 정보를 복구할 수 없어요",clickText:"삭제",cancelText:"아니요",onClick:async()=>{a.query.id||E({text:"삭제할 매치 데이터를 찾을 수 없습니다."});try{let t=await (null==e?void 0:e.request({method:"delete",url:"/api/match",params:{match_id:a.query.id}}));(null==t?void 0:t.success)&&a.push("/dashboard")}catch(t){console.log(t)}}})},H=t=>{void 0!==w.match_date&&void 0!==w.vote_end_date&&P({...w,...t})},T=async()=>{var t;let i=Number(a.query.id);if(O(!0),!i){E({text:"수정할 매치 데이터를 찾을 수 없습니다."});return}let d={...w,id:i};if((null===(t=d.stadium_info)||void 0===t?void 0:t.field_info)===null&&(d.stadium_info.field_info=void 0),w.select_vote_end_date){let t=w.select_vote_end_date,e=Number(t[0]),a="d"===t[1]?"d":"h";d.vote_end_date=c()(w.match_date).subtract(e,a).format("YYYY-MM-DD HH:mm:ss"),delete d.select_vote_end_date}try{let t=await (null==e?void 0:e.request({url:"/api/match",method:"put",data:d}));if(O(!1),null==t?void 0:t.success){let{data:e}=t.data;C({text:"매치 정보가 수정 되었어요"}),a.replace({pathname:"/match/detail/[id]",query:{id:e.id}})}(null==t?void 0:t.status)===400&&(null==t?void 0:t.data.msg)==="기록이 있는 매치는 매치 유형을 수정할 수 없어요."&&E({text:"기록이 있으면 홈, 원정, 자체전 변경을 할 수 없어요."})}catch(t){console.log(t),O(!1)}},D=q>b.R.UPCOMING;return(0,i.jsxs)(y.Z,{theme:"light",isPaddingBottom:!1,style:{backgroundColor:t.cr_bg_00},children:[(0,i.jsx)(s.Z,{}),(0,i.jsx)(_.Z,{title:" ",borderBottom:"1px solid ".concat(t.cr_bg_06),backCallback:Y,endArea:(0,i.jsx)(v.z,{onClick:j,children:(0,i.jsx)(p.Z,{icon:"trash",width:24,height:24,color:t.cr_bg_04})})}),(0,i.jsxs)(d.ZP,{item:!0,xs:12,position:"relative",bgcolor:t.cr_bg_00,children:[(0,i.jsx)(u.Z,{initData:N,data:w,setData:H,active:!0,modify:!0,disabled:D}),(0,i.jsx)(d.ZP,{marginTop:"18px",item:!0,xs:12,borderBottom:"1px solid ".concat(t.cr_bg_06)}),(0,i.jsx)(h.Z,{initData:N,data:w,setData:H,active:!0,modify:!0,disabled:D}),(0,i.jsx)(d.ZP,{item:!0,xs:12,padding:"24px 20px",children:(0,i.jsx)(m.Z,{onClick:T,disabled:D,text:D?"종료된 매치는 수정이 불가능해요":"수정하기"})})]})]})};e.default=E}},function(t){t.O(0,[2460,1903,2770,1074,2720,5054,8559,5958,3488,9373,1454,9774,2888,179],function(){return t(t.s=34495)}),_N_E=t.O()}]);

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.