PageSourceSearch

https://id.movevn.com/assets/TableUserSessions-D9EhGdHD.js

js movevn.com collected 2026-09-24 13:59:56 UTC 4,312 bytes, 1 lines download raw bytes

1import{j as e,B as F,z as I,a8 as U,a9 as A,aa as M,ab as R,ac as a,S as H,a3 as V}from"./vendor-mui-DFXKyM2E.js";import{E as q}from"./EnhancedTableHead-vPc_oX9J.js";import{F as O}from"./FilterTable-CSAQgpZl.js";import{N as W}from"./NavHeader-BROh2czj.js";import{u as $,P as G,f as J,c as K}from"./index-DGSpuRBj.js";import{P as Q}from"./Pagination-75_tvtre.js";import{e as X}from"./Users-B12Mx37p.js";import{l as Y,a as s,k as Z,L as p}from"./vendor-react-CrXZvyk_.js";import{b as u}from"./timezone-DGogyvEL.js";import"./useDebouncedValue-CkrckZR6.js";import"./Search-By0g-prq.js";import"./Home-CqZgsyW_.js";import"./vendor-redux-Bi3kFs4E.js";import"./vendor-utils-BFUpClQh.js";import"./vendor-form-Df9-JY-v.js";const ee=[{id:"check_in_token",numeric:!1,disablePadding:!1,label:"Class"},{id:"transaction_type",numeric:!1,disablePadding:!1,label:"Trainer"},{id:"share_with",numeric:!1,disablePadding:!1,label:"Share with"},{id:"transaction_amount",numeric:!1,disablePadding:!1,label:"Start in"},{id:"duration",numeric:!1,disablePadding:!1,label:"Duration"},{id:"status",numeric:!1,disablePadding:!1,label:"Status"},{id:"no_show",numeric:!1,disablePadding:!1,label:"No show"},{id:"transaction_status",numeric:!1,disablePadding:!1,label:"Checked in"},{id:"created_at",numeric:!1,disablePadding:!1,label:"Checked out"},{id:"action",numeric:!1,disablePadding:!1,label:"Action"}],fe=()=>{const{id:b}=Y(),{t}=$(),[f,y]=s.useState(!1),[ae,g]=s.useState(!1),[n,T]=Z(),[C,N]=s.useState({total:0,current_page:0,from:0,last_page:0,per_page:0}),[c,j]=s.useState({search:n.get("search"),order:n.get("order")||"desc",start_date:n.get("start_date"),end_date:n.get("end_date"),paged:n.get("paged")||1,per_page:n.get("per_page")||12}),[x,_]=s.useState([]),P=async r=>{try{g(!0);const i=J(r);T(i);const l=await X(Number(b),i);if(l&&!l.error){const{data:d,meta:m}=l;Array.isArray(d)&&d?.length?(_(d),N(m)):_([])}}catch{}finally{g(!1),y(!0)}};if(s.useEffect(()=>{f&&P(c)},[c]),s.useEffect(()=>{P(c)},[]),s.useEffect(()=>{},[x]),!f)return e.jsx(G,{height:500});const E=({rowData:r})=>{const{check_in_token:i,no_show:l,name_shared:d,check_in_time:m,check_out_time:w,status:o,late_cancel:L,session:h}=r,[D,v]=s.useState(!1),{trainer:k,class_types:z,start_time:S,duration_minutes:B}=h??{};return e.jsx(s.Fragment,{children:e.jsxs(R,{hover:!0,role:"checkbox",tabIndex:-1,onClick:()=>v(!D),sx:{cursor:"pointer"},children:[e.jsx(a,{children:e.jsxs(H,{direction:"row",spacing:2,alignItems:"center",children:[e.jsx(p,{to:"/admin/sessions/"+h?.id,children:e.jsx("strong",{className:"uppercase",children:z})}),h?.deleted_at&&e.jsx("span",{className:"border border-red-200 bg-red-50 text-red-500 px-1 text-xs ml-1",children:"Deleted"})]})}),e.jsx(a,{children:e.jsx(p,{to:`/admin/trainers/${k?.id}`,children:e.jsx("p",{children:k?.full_name})})}),e.jsx(a,{children:e.jsx("p",{children:d||"-"})}),e.jsx(a,{children:e.jsx("p",{children:S?u(S):"-"})}),e.jsx(a,{children:e.jsxs("p",{children:[B," minutes"]})}),e.jsx(a,{component:"th",scope:"row",children:o?L?e.jsx("span",{className:"border border-orange-200 bg-orange-100 text-orange-600 px-1 capitalize text-sm",children:t("Late Cancelled")}):e.jsx("span",{className:K("border px-1 capitalize text-sm",{"border-green-200 bg-green-100 text-green-600":o=="active","border-red-200 bg-red-100 text-red-600":o=="cancelled","border-yellow-200 bg-yellow-100 text-yellow-600":o=="pending"}),children:{active:t("Booked"),pending:t("Pending"),cancelled:t("Canceled")}[o]}):"-"}),e.jsx(a,{children:e.jsx("p",{children:l?t("No show"):"-"})}),e.jsx(a,{children:e.jsx("p",{children:m?u(m):"-"})}),e.jsx(a,{children:e.jsx("p",{children:w?u(w):"-"})}),e.jsx(a,{sx:{width:120},children:e.jsx(p,{to:"/admin/sessions/"+h?.id,children:e.jsx(V,{variant:"contained",size:"small",children:t("View")})})})]},i)})};return e.jsxs(F,{children:[e.jsx(W,{title:t("User's sessions"),breadcrumb:[{title:t("User's sessions")}],backLink:"/admin/users/"+b}),e.jsx(O,{filter:c,setFilter:j}),e.jsxs(I,{sx:{width:"100%",mb:2},children:[e.jsx(U,{children:e.jsxs(A,{sx:{minWidth:750},"aria-labelledby":"tableTitle",size:"medium",children:[e.jsx(q,{headCells:ee,multiple:!1,rowCount:x?.length}),e.jsx(M,{children:x.map(r=>e.jsx(E,{rowData:r},r.id))})]})}),e.jsx(Q,{meta:C,onChange:r=>j(i=>({...i,...r}))})]})]})};export{fe as default};

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.