PageSourceSearch

https://profesea.id/_next/static/chunks/pages/account/my-training-dfeab87c823d5c36.js

js profesea.id collected 2026-09-24 13:51:26 UTC 12,709 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3846],{12963:function(e,t,r){"use strict";r.d(t,{Z:function(){return z}});var n=r(87462),l=r(63366),o=r(67294);r(59864);var i=r(86010),s=r(94780),a=r(90948),c=r(71657),d=r(15861),u=r(41796),x=r(88169),p=r(85893),h=(0,x.Z)((0,p.jsx)("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),f=r(49990);let g=(0,a.ZP)(f.Z)(({theme:e})=>(0,n.Z)({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},"light"===e.palette.mode?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":(0,n.Z)({},"light"===e.palette.mode?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":(0,n.Z)({boxShadow:e.shadows[0]},"light"===e.palette.mode?{backgroundColor:(0,u._4)(e.palette.grey[200],.12)}:{backgroundColor:(0,u._4)(e.palette.grey[600],.12)})})),m=(0,a.ZP)(h)({width:24,height:16});var b=function(e){return(0,p.jsx)("li",{children:(0,p.jsx)(g,(0,n.Z)({focusRipple:!0},e,{ownerState:e,children:(0,p.jsx)(m,{ownerState:e})}))})},j=r(1588),Z=r(34867);function v(e){return(0,Z.ZP)("MuiBreadcrumbs",e)}let y=(0,j.Z)("MuiBreadcrumbs",["root","ol","li","separator"]),w=["children","className","component","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],C=e=>{let{classes:t}=e;return(0,s.Z)({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},v,t)},S=(0,a.ZP)(d.Z,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${y.li}`]:t.li},t.root]})({}),k=(0,a.ZP)("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),F=(0,a.ZP)("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8}),P=o.forwardRef(function(e,t){var r,s;let a=(0,c.Z)({props:e,name:"MuiBreadcrumbs"}),{children:d,className:u,component:x="nav",expandText:h="Show path",itemsAfterCollapse:f=1,itemsBeforeCollapse:g=1,maxItems:m=8,separator:j="/"}=a,Z=(0,l.Z)(a,w),[v,y]=o.useState(!1),P=(0,n.Z)({},a,{component:x,expanded:v,expandText:h,itemsAfterCollapse:f,itemsBeforeCollapse:g,maxItems:m,separator:j}),z=C(P),_=o.useRef(null),D=o.Children.toArray(d).filter(e=>o.isValidElement(e)).map((e,t)=>(0,p.jsx)("li",{className:z.li,children:e},`child-${t}`));return(0,p.jsx)(S,(0,n.Z)({ref:t,component:x,color:"text.secondary",className:(0,i.Z)(z.root,u),ownerState:P},Z,{children:(0,p.jsx)(k,{className:z.ol,ref:_,ownerState:P,children:(r=v||m&&D.length<=m?D:(e=>{let t=()=>{y(!0);let e=_.current.querySelector("a[href],button,[tabindex]");e&&e.focus()};return g+f>=e.length?e:[...e.slice(0,g),(0,p.jsx)(b,{"aria-label":h,onClick:t},"ellipsis"),...e.slice(e.length-f,e.length)]})(D),s=z.separator,r.reduce((e,t,n)=>(n<r.length-1?e=e.concat(t,(0,p.jsx)(F,{"aria-hidden":!0,className:s,ownerState:P,children:j},`separator-${n}`)):e.push(t),e),[]))})}))});var z=P},76843:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/my-training",function(){return r(34565)}])},83569:function(e,t,r){"use strict";var n=r(85893),l=r(99226),o=r(15861),i=r(86886),s=r(67294);let a=e=>{let{tabs:t,setTabs:r,label:i,value:a,onSelect:c}=e,d=t===a,u=(0,s.useRef)(null);return(0,s.useEffect)(()=>{d&&u.current&&c(u.current)},[d]),(0,n.jsx)(l.Z,{ref:u,onClick:()=>r(a),sx:{cursor:"pointer",flex:1,py:"16px",display:"flex",justifyContent:"center",alignItems:"center"},children:(0,n.jsx)(o.Z,{sx:{color:d?"#32497A":"#BFBFBF",fontSize:{xs:12,md:16},fontWeight:"700",userSelect:"none","&:hover":{color:"#32497A"}},children:i})})},c=e=>{let{tabItems:t,tabs:r,setTabs:o}=e,[c,d]=(0,s.useState)({left:0,width:0}),u=e=>{let{offsetLeft:t,offsetWidth:r}=e;d({left:t,width:r})};return(0,n.jsxs)(i.ZP,{container:!0,sx:{borderBottom:1.5,borderColor:"#E7E7E7",flexWrap:"nowrap",position:"relative"},children:[(0,n.jsx)(l.Z,{sx:{position:"absolute",bottom:0,height:"3px",bgcolor:"#32497A",transition:"all 0.3s ease-in-out",left:c.left,width:c.width}}),t.map((e,t)=>(0,n.jsx)(a,{tabs:r,setTabs:o,label:e.label,value:e.value,onSelect:u},t))]})};t.Z=c},2015:function(e,t,r){"use strict";var n=r(85893),l=r(2734),o=r(98396),i=r(86886),s=r(12963),a=r(23795),c=r(15861),d=r(99226),u=r(67720),x=r(18972),p=r(18360),h=r(67218),f=r(19031),g=r(5434),m=r(11163),b=r(6734),j=r(72425),Z=r(60585),v=r(70187),y=r(37363);let w=e=>{let{children:t,page:r,subPage:l}=e,o=(0,m.useRouter)(),{user:i}=(0,h.a)(),s=(null==i?void 0:i.photo)||(0,y.p)("/images/avatars/default-user.png");return(0,n.jsx)(C,{page:r,subPage:l,router:o,user:i,userPhoto:s,children:t})},C=e=>{var t;let{children:r,page:h,subPage:m,router:y,user:w,userPhoto:C}=e,{t:S}=(0,b.$G)("settings"),k=[{label:S("tab_account"),href:"/account/my-account"}];((null==w?void 0:w.team_id)===2||(null==w?void 0:w.team_id)===3&&(null==w?void 0:w.organization_role)==="owner")&&k.push({label:S("tab_subscription"),href:"/account/subscription"});let F=(0,l.Z)(),P=(0,o.Z)(F.breakpoints.down("sm")),z=e=>{var t;let r=null===(t=k.find(t=>t.label===e.target.value))||void 0===t?void 0:t.href;r&&y.push(r)},_=(null===(t=k.find(e=>y.asPath.startsWith(e.href)))||void 0===t?void 0:t.label)||S("tab_account");return(0,n.jsxs)(i.ZP,{container:!0,sx:{flexDirection:"column",gap:"24px"},children:[!P&&(0,n.jsx)(i.ZP,{item:!0,container:!0,children:(0,n.jsxs)(s.Z,{separator:(0,n.jsx)(g.sOJ,{fontSize:"17px",color:"black"}),"aria-label":"breadcrumb",children:[(0,n.jsx)(a.Z,{href:"/home",sx:{textDecoration:"none"},children:(0,n.jsx)(c.Z,{sx:{color:"#32497A",fontSize:12},children:S("breadcrumb_homepage")})}),(0,n.jsx)(c.Z,{sx:{color:"#32497A",fontSize:12},children:S("breadcrumb_account")}
1),(0,n.jsx)(c.Z,{sx:{color:m?"#32497A":"#525252",fontSize:12},children:h}),m&&(0,n.jsx)(c.Z,{sx:{color:"#525252",fontSize:12},children:m})]})}),(0,n.jsxs)(i.ZP,{item:!0,container:!0,sx:{display:"flex",gap:"24px"},children:[!P&&(0,n.jsx)(i.ZP,{item:!0,children:(0,n.jsxs)(d.Z,{sx:{backgroundColor:"#FFF",width:"276px",borderRadius:"12px",border:"1px solid #F0F0F0"},children:[(0,n.jsxs)(d.Z,{sx:{p:"16px",display:"flex",gap:"12px",alignItems:"center"},children:[(0,n.jsx)(j.Z,{alt:"Profile Picture",src:C,sx:{width:54,height:54}}),(0,n.jsxs)(d.Z,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",gap:"4px"},children:[(0,n.jsxs)(c.Z,{fontSize:16,fontWeight:700,children:[null==w?void 0:w.name,(0,n.jsx)(Z.Z,{size:25})]}),(0,n.jsx)(c.Z,{fontSize:14,children:(null==w?void 0:w.team_id)===2?(0,f.Q0)((0,v.Mu)(w)):(null==w?void 0:w.role)!=="Company"?null==w?void 0:w.role:"Company"})]})]}),(0,n.jsx)(u.Z,{sx:{mt:0}}),(0,n.jsx)(d.Z,{sx:{p:"16px",display:"flex",flexDirection:"column",gap:"8px"},children:k.map(e=>{let t=y.asPath.startsWith(e.href);return(0,n.jsx)(x.Z,{component:a.Z,href:e.href,sx:{p:"8px 16px",fontSize:14,borderRadius:1,color:t?"#0B58A6":"inherit",backgroundColor:t?"#F2F8FE":"transparent","&:hover":{backgroundColor:"#F2F8FE",color:"#0B58A6"}},children:e.label},e.href)})})]})}),(0,n.jsxs)(i.ZP,{item:!0,sx:{flex:1},children:[P&&(0,n.jsx)(p.Z,{fullWidth:!0,value:_,onChange:z,sx:{mb:"24px",borderRadius:"8px",backgroundColor:"#FFF",borderColor:"#D1D1D1"},children:k.map(e=>(0,n.jsx)(x.Z,{value:e.label,sx:{fontSize:14},children:e.label},e.href))}),r]})]})]})};t.Z=w},34565:function(e,t,r){"use strict";r.r(t);var n=r(85893),l=r(2015),o=r(99226),i=r(86886),s=r(51233),a=r(15861),c=r(87918),d=r
1(98456),u=r(83569),x=r(67294),p=r(11280),h=r(76416),f=r(19031),g=r(1954),m=r(11163),b=r(36798),j=r(37363);let Z=[{label:"Ongoing",value:"ongoing"},{label:"Completed Training",value:"completed"}],v=e=>{var t;let r,{tabs:l,participant:d}=e,u=(0,m.useRouter)(),x=d.training;if(!x)return null;let p=null==x?void 0:x.organization;return r="instant_access"===x.booking_scheme?d.schedule?new Date(d.schedule):null:new Date(x.schedule),(0,n.jsx)(o.Z,{onClick:()=>u.push("my-training/".concat(d.id)),sx:{p:"24px",borderRadius:"8px",border:"1px solid #DDD"},children:(0,n.jsxs)(i.ZP,{container:!0,spacing:8,alignItems:"center",sx:{cursor:"pointer"},children:[(0,n.jsx)(i.ZP,{item:!0,xs:12,md:6,children:(0,n.jsx)(o.Z,{sx:{backgroundColor:"#DDD",height:"171px",borderRadius:"6px",alignContent:"center"},children:(0,n.jsx)(o.Z,{component:"img",src:x.thumbnail,alt:"Training Picture",sx:{height:"100%",width:"auto",maxWidth:"100%",objectFit:"contain",display:"block",margin:"0 auto"}})})}),(0,n.jsx)(i.ZP,{item:!0,xs:12,md:6,children:(0,n.jsxs)(s.Z,{gap:"12px",children:[(0,n.jsxs)(o.Z,{sx:{display:"flex",gap:"24px",justifyContent:"space-between",alignItems:"center"},children:[(0,n.jsx)(a.Z,{sx:{color:"#32497A",fontSize:16,fontWeight:700,flex:1,whiteSpace:"normal",wordBreak:"break-word"},children:x.title}),(0,n.jsx)(g.JO,{icon:"mdi:chevron-right",fontSize:18})]}),(0,n.jsx)(o.Z,{sx:{display:"flex"},children:(0,n.jsx)(c.Z,{label:x.category.category,variant:"outlined",sx:{borderRadius:"8px",border:"1px solid #525252",color:"#525252",p:"4px 2px"}})}),(0,n.jsxs)(o.Z,{sx:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,n.jsx)(b.Z,{user:null==x?void 0:x.trainer,src:null==p?void 0:p.photo,sx:{width:36,height:36}}),(0,n.jsx)(a.Z,{sx:{color:"#2D3436",fontSize:14},children:null!==(t=null==p?void 0:p.name)&&void 0!==t?t:"-"})]}),(0,n.jsxs)(o.Z,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:[(0,n.jsx)(g.JO,{icon:"ph:clock",fontSize:16}),(0,n.jsxs)(a.Z,{sx:{fontSize:14},children:["Starting on"," ",(0,n.jsx)("b",{style:{color:"#1E266D"},children:r?(0,f.Oc)(r,!1,!0):"Unscheduled"})]})]}),"completed"===l&&(0,n.jsx)(o.Z,{sx:{borderRadius:"4px",p:"6px",backgroundColor:"complete"===d.status?"#D9F2DA":"#FFD9D9",textAlign:"center"},children:(0,n.jsx)(a.Z,{sx:{color:"complete"===d.status?"#4CAF50":"##FF2222",fontWeight:700},children:"complete"===d.status?"Completed":"Canceled"})})]})})]})})},y=()=>{let[e,t]=(0,x.useState)(!1),[r,c]=(0,x.useState)(),[f,g]=(0,x.useState)("ongoing"),m=async()=>{await p.e.get(h.X.baseUrl+"/training/user-joined-training",{page:1,take:100,tabs:f}).then(e=>{let t=e.data.participated.data;c(t)}),t(!1)};return(0,x.useEffect)(()=>{t(!0),m()},[f]),(0,n.jsx)(l.Z,{page:"Order History",children:(0,n.jsxs)(i.ZP,{item:!0,container:!0,sx:{backgroundColor:"#FFF",borderRadius:"12px",border:"1px solid #F0F0F0",p:"24px",display:"flex",gap:"12px"},children:[(0,n.jsx)(a.Z,{sx:{fontSize:20,fontWeight:700},children:"My Training"}),(0,n.jsx)(u.Z,{tabItems:Z,tabs:f,setTabs:g}),(0,n.jsx)(s.Z,{spacing:4,sx:{width:"100%"},children:e?(0,n.jsx)(o.Z,{sx:{py:8,display:"flex",justifyContent:"center"},children:(0,n.jsx)(d.Z,{})}):r?r.map((e,t)=>(0,n.jsx)(v,{tabs:f,participant:e},t)):(0,n.jsx)(o.Z,{sx:{py:8,display:"flex",flexDirection:"column",alignItems:"center",gap:"12px"},children:(0,n.jsx)(o.Z,{component:"img",src:(0,j.p)("/images/empty-states/connections.png"),sx:{height:"160px",width:"160px"}})})})]})})};y.acl={action:"read",subject:"home"},t.default=y},88357:function(e,t,r){"use strict";r.d(t,{w_:function(){return a}});var n=r(67294),l={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},o=n.createContext&&n.createContext(l),i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var l in t=arguments[r])Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l]);return e}).apply(this,arguments)},s=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)0>t.indexOf(n[l])&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(r[n[l]]=e[n[l]]);return r};function a(e){return function(t){return n.createElement(c,i({attr:i({},e.attr)},t),function e(t){return t&&t.map(function(t,r){return n.createElement(t.tag,i({ke
1y:r},t.attr),e(t.child))})}(e.child))}}function c(e){var t=function(t){var r,l=e.attr,o=e.size,a=e.title,c=s(e,["attr","size","title"]),d=o||t.size||"1em";return t.className&&(r=t.className),e.className&&(r=(r?r+" ":"")+e.className),n.createElement("svg",i({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,l,c,{className:r,style:i(i({color:e.color||t.color},t.style),e.style),height:d,width:d,xmlns:"http://www.w3.org/2000/svg"}),a&&n.createElement("title",null,a),e.children)};return void 0!==o?n.createElement(o.Consumer,null,function(e){return t(e)}):t(l)}}},function(e){e.O(0,[1228,9774,2888,179],function(){return e(e.s=76843)}),_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.