PageSourceSearch

https://newlod.com/_next/static/chunks/app/instructor/dashboard/page-7c353063106a2261.js

js newlod.com collected 2026-10-04 11:00:00 UTC 8,301 bytes, 1 lines download raw bytes

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.