1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[34623],{59231:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>n});var a=t(95155),r=t(12115),d=t(73321),l=t(80848),i=t(15229);function n(){let e,s,t,n,c,x,m,h=(0,d.useRouter)(),[o,g]=(0,r.useState)(null),[u,j]=(0,r.useState)(!0),[N,f]=(0,r.useState)("");(0,r.useEffect)(()=>{p()},[h]);let p=async()=>{try{let e=await (0,i.nU)();if(e.isLogin&&e.user)if(e.user.isPro)return void await v();else return void h.push("/signin?message=instructor_required");h.push("/signin?returnUrl=/instructor/dashboard")}catch(e){h.push("/signin?returnUrl=/instructor/dashboard")}},v=async()=>{try{j(!0);let e=await fetch("/nextjs-api/api/instructor/dashboard?t=".concat(Date.now()),{method:"GET",credentials:"include",headers:{"Content-Type":"application/json","Cache-Control":"no-cache, no-store, must-revalidate",Pragma:"no-cache",Expires:"0"}}),s=await e.json();s.success?(g(s.data),f("")):401===e.status?h.push("/signin"):f(s.error||"ããã·ã¥ãã¼ãæ
å ±ã®åå¾ã«å¤±æãã¾ãã")}catch(e){f("ãµã¼ãã¼ã¨ã©ã¼ãçºçãã¾ãã")}finally{j(!1)}},y=e=>{let s=new Date(e),t=String(s.getUTCHours()).padStart(2,"0"),a=String(s.getUTCMinutes()).padStart(2,"0");return"".concat(t,":").concat(a)},b=e=>"\xa5".concat(e.toLocaleString()),w=e=>(0,a.jsx)("span",{className:"inline-flex px-2 py-1 text-xs font-medium rounded-full ".concat({PEN:"bg-yellow-100 text-yellow-800",CNF:"bg-green-100 text-green-800",CAN:"bg-red-100 text-red-800",COM:"bg-blue-100 text-blue-800"}[e]||"bg-gray-100 text-gray-800"),children:{PEN:"ä»®äºç´",CNF:"äºç´ç¢ºå®",CAN:"ãã£ã³ã»ã«",COM:"å®äº"}[e]||e});return u?(0,a.jsx)("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-indigo-600 mx-auto"}),(0,a.jsx)("p",{className:"mt-4 text-gray-600",children:"èªã¿è¾¼ã¿ä¸..."})]})}):N?(0,a.jsx)("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:(0,a.jsx)("div",{className:"text-center",children:(0,a.jsxs)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-6",children:[(0,a.jsx)("p",{className:"text-red-800",children:N}),(0,a.jsx)("button",{onClick:v,className:"mt-4 bg-red-600 text-white px-4 py-2 rounded-lg hover:bg-red-700",children:"å試è¡"})]})})}):o?(0,a.jsx)("div",{className:"min-h-screen bg-gray-50",children:(0,a.jsx)("div",{className:"container mx-auto px-4 py-4 md:py-8",children:(0,a.jsxs)("div",{className:"flex gap-6",children:[(0,a.jsx)("div",{className:"hidden lg:block w-64 flex-shrink-0",children:(0,a.jsx)(l.A,{isPro:!0})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("div",{className:"bg-white rounded-lg shadow mb-6",children:(0,a.jsxs)("div",{className:"border-b px-4 md:px-6 py-3 md:py-4",children:[(0,a.jsx)("h1",{className:"text-xl md:text-2xl font-bold",children:"è¬å¸«ããã·ã¥ãã¼ã"}),(0,a.jsxs)("p",{className:"text-gray-600 text-sm md:text-base",children:["ããã«ã¡ã¯ã",o.instructor.name,"ãã"]})]})}),(0,a.jsxs)("main",{children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-8",children:[(0,a.jsx)("div",{className:"bg-white overflow-hidden shadow rounded-lg",children:(0,a.jsx)("div",{className:"p-5",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"flex-shrink-0",children:(0,a.jsx)("div",{className:"w-8 h-8 bg-blue-500 rounded-full flex items-center justify-center",children:(0,a.jsx)("span",{className:"text-white text-sm font-bold",children:"ä»"})})}),(0,a.jsx)("div",{className:"ml-5 w-0 flex-1",children:(0,a.jsxs)("dl",{children:[(0,a.jsx)("dt",{className:"text-sm font-medium text-gray-500 truncate",children:"仿¥ã®ã¬ãã¹ã³"}),(0,a.jsxs)("dd",{className:"text-lg font-medium text-gray-900",children:[o.stats.todayLessons,"ä»¶"]})]})})]})})}),(0,a.jsx)("div",{className:"bg-white overflow-hidden shadow rounded-lg",children:(0,a.jsx)("div",{className:"p-5",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"flex-shrink-0",children:(0,a.jsx)("div",{className:"w-8 h-8 bg-green-500 rounded-full flex items-center justify-center",children:(0,a.jsx)("span",{className:"text-white text-sm font-bold",children:"é±"})})}),(0,a.jsx)("div",{className:"ml-5 w-0 flex-1",children:(0,a.jsxs)("dl",{children:[(0,a.jsx)("dt",{className:"text-sm font-medium text-gray-500 truncate",children:"ä»é±ã®äºç´"}),(0,a.jsxs)("dd",{className:"text-lg font-medium text-gray-900",children:[o.stats.thisWeekLessons,"ä»¶"]})]})})]})})}),(0,a.jsx)("div",{className:"bg-white overflow-hidden shadow rounded-lg",children:(0,a.jsx)("div",{className:"p-5",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"flex-shrink-0",children:(0,a.jsx)("div",{className:"w-8 h-8 bg-purple-500 rounded-full flex items-center justify-center",children:(0,a.jsx)("span",{className:"text-white text-sm font-bold",children:"\xa5"})})}),(0,a.jsx)("div",{className:"ml-5 w-0 flex-1",children:(0,a.jsxs)("dl",{children:[(0,a.jsx)("dt",{className:"text-sm font-medium text-gray-500 truncate",children:"仿ã®å£²ä¸"}),(0,a.jsx)("dd",{className:"text-lg font-medium text-gray-900",children:b(o.stats.totalRevenue)})]})})]})})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[(0,a.jsxs)("div",{className:"bg-white shadow rounded-lg",children:[(0,a.jsx)("div",{className:"px-6 py-4 border-b border-gray-200",children:(0,a.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"仿¥ã®ã¹ã±ã¸ã¥ã¼ã«"})}),(0,a.jsx)("div",{className:"divide-y divide-gray-200",children:0===o.todaySchedule.length?(0,a.jsx)("div",{className:"p-6 text-center text-gray-500",children:"仿¥ã®äºå®ã¯ããã¾ãã"}):o.todaySchedule.map(e=>(0,a.jsx)("div",{className:"p-6",children:(0,a.jsx)("div",{className:"flex items-start justify-between",children:(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-900",children:e.studentName}),w(e.status)]}),(0,a.jsxs)("p",{className:"text-sm text-gray-500 mt-1",children:[y(e.startTime)," - ",y(e.endTime)]}),(0,a.jsx)("p",{className:"text-sm text-gray-500",children:b(e.fee)}),e.notes&&(0,a.jsx)("p",{className:"text-sm text-gray-400 mt-2",children:e.notes})]})})},e.bookingId))})]}),(0,a.jsxs)("div",{className:"bg-white shadow rounded-lg",children:[(0,a.jsx)("div",{className:"px-6 py-4 border-b border-gray-200",children:(0,a.jsx)("h3",{className:"text-lg font-medium text-gray-900",children:"æè¿ã®äºç´å±¥æ´"})}),(0,a.jsx)("div",{className:"divide-y divide-gray-200",children:0===o.recentHistory.length?(0,a.jsx)("div",{className:"p-6 text-center text-gray-500",children:"å±¥æ´ãããã¾ãã"}):o.recentHistory.map(e=>{let s,t,r,d;return(0,a.jsx)("div",{className:"p-6",children:(0,a.jsx)("div",{className:"flex items-start justify-between",children:(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-900",children:e.studentName}),w(e.status)]}),(0,a.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:(t=(s=new Date(e.startTime)).getUTCFullYear(),r=String(s.getUTCMonth()+1).padStart(2,"0"),d=String(s.getUTCDate()).padStart(2,"0"),"".concat(t,"å¹´").concat(r,"æ").concat(d,"æ¥"))}),(0,a.jsx)("p",{className:"text-sm text-gray-500",children:b(e.fee)})]})})},e.bookingId)})})]})]}),(0,a.jsxs)("div",{className:"mt-8 text-center text-sm text-gray-500",children:["æçµæ´æ°: ",(s=(e=new Date(o.lastUpdated)).getUTCFullYear(),t=String(e.getUTCMonth()+1).padStart(2,"0"),n=String(e.getUTCDate()).padStart(2,"0"),c=String(e.getUTCHours()).padStart(2,"0"),x=String(e.getUTCMinutes()).padStart(2,"0"),m=String(e.getUTCSeconds()).padStart(2,"0"),"".concat(s,"å¹´").concat(t,"æ").concat(n,"æ¥ ").concat(c,":").concat(x,":").concat(m))]})]})]})]})})}):null}},69717:(e,s,t)=>{Promise.resolve().then(t.bind(t,59231))}},e=>{e.O(0,[18096,72076,28441,77358],()=>e(e.s=69717)),_N_E=e.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.