PageSourceSearch

https://mysc-ac.web.app/assets/ObserverProgramSelectPage-CwxN_89Q.js

js mysc-ac.web.app collected 2026-10-03 12:31:20 UTC 16,951 bytes, 16 lines download raw bytes

1import{a as f,j as t}from"./react-core-J_7RjpUG.js";import{u as pe}from"./index-B9Jtilyd.js";import{T as xe}from"./firebase-CfFPESPl.js";import{u as fe}from"./useMediaQuery-BbrAH9Rl.js";import{f as ge}from"./programAccess-ByAh8Srq.js";import{c as me}from"./react-router-CcaebsRy.js";import"./react-dom-DLZKqo1_.js";import"./vendor-misc-DmbfenWV.js";import"./vendor-icons-H0eO60Jx.js";function Ce(){var w;const p=me(),{user:o,signOut:le,isSuperAdmin:u,observerProgramIds:g}=pe(),{isMobile:n}=fe(),[m,b]=f.useState([]),[de,v]=f.useState(!0),j=f.useCallback(async()=>{try{if(v(!0),g.length===0){b([]),u&&p("/super-admin",{replace:!0});return}b(await ge(g))}catch(i){console.error("프로그램 목록 로드 실패:",i)}finally{v(!1)}},[u,p,g]);f.useEffect(()=>{j()},[j]);const ce=async()=>{await le(),p("/")},S=(o==null?void 0:o.displayName)||((w=o==null?void 0:o.email)==null?void 0:w.split("@")[0])||"관전자",h=i=>i?i instanceof Date?i:i instanceof xe?i.toDate():typeof i=="object"&&"seconds"in i?new Date(i.seconds*1e3):null:null,a=i=>{const s=h(i);return s?`${s.getFullYear()}.${String(s.getMonth()+1).padStart(2,"0")}.${String(s.getDate()).padStart(2,"0")}`:"-"},y=(i,s)=>{const l=h(i),d=h(s);if(!l||!d)return{status:"upcoming",label:"미정",color:"#94a3b8"};const c=new Date;return c<l?{status:"upcoming",label:"예정",color:"#f59e0b"}:c>d?{status:"ended",label:"종료",color:"#94a3b8"}:{status:"active",label:"진행중",color:"#10b981"}};return de?t.jsxs("div",{style:e.loadingContainer,children:[t.jsx("div",{style:e.loadingSpinner}),t.jsx("p",{style:e.loadingText,children:"프로그램 목록을 불러오는 중..."}),t.jsx("style",{children:`
2          @keyframes spin {
3            to { transform: rotate(360deg); }
4          }
5        `})]}):t.jsxs("div",{style:e.container,children:[t.jsx("header",{className:n?"px-3 py-2":"",style:n?{...e.header,padding:void 0}:e.header,children:t.jsxs("div",{className:n?"h-auto":"",style:n?{...e.headerContent,height:void 0}:e.headerContent,children:[t.jsxs("div",{style:e.logoSection,children:[t.jsx("div",{style:e.logo,children:t.jsx("img",{src:"/MYSC_main.png",alt:"MYSC",style:{width:120,height:"auto"}})}),!n&&t.jsx("span",{style:e.roleTag,children:"관전자"})]}),t.jsxs("div",{className:`flex items-center ${n?"gap-1":"gap-3"}`,style:n?{...e.userSection,gap:void 0}:e.userSection,children:[!n&&t.jsx("div",{style:e.userAvatar,children:S.charAt(0).toUpperCase()}),!n&&t.jsx("span",{style:e.userEmail,children:o==null?void 0:o.email}),t.jsx("button",{onClick:ce,className:n?"px-2 py-1.5 text-xs":"",style:n?{...e.logoutButton,padding:void 0,fontSize:void 0}:e.logoutButton,children:"로그아웃"})]})]})}),t.jsxs("main",{className:n?"p-4":"",style:n?{...e.main,padding:void 0}:e.main,children:[t.jsxs("section",{className:n?"flex-col gap-4 p-5 rounded-xl mb-4":"",style:n?{...e.welcomeSection,flexDirection:void 0,gap:void 0,padding:void 0,borderRadius:void 0,marginBottom:void 0}:e.welcomeSection,children:[t.jsxs("div",{style:e.welcomeContent,children:[t.jsxs("h1",{className:n?"text-xl mb-1":"",style:n?{...e.welcomeTitle,fontSize:void 0,marginBottom:void 0}:e.welcomeTitle,children:["안녕하세요, ",t.jsx("span",{style:e.userName,children:S}),"님"]}),t.jsx("p",{className:n?"text-sm":"",style:n?{...e.welcomeSubtitle,fontSize:void 0}:e.welcomeSubtitle,children:"열람할 프로그램을 선택해주세요."})]}),t.jsxs("div",{className:n?"flex flex-col gap-3 w-full":"",style:n?{...e.welcomeActions,flexDirection:void 0,gap:void 0,width:void 0}:e.welcomeActions,children:[t.jsx("div",{className:n?"flex gap-3":"",style:n?{...e.statsBar,gap:void 0}:e.statsBar,children:t.jsxs("div",{className:n?"px-4 py-3 rounded-lg":"",style:n?{...e.statItem,padding:void 0,borderRadius:void 0}:e.statItem,children:[t.jsx("span",{className:n?"text-lg":"",style:n?{...e.statIcon,fontSize:void 0}:e.statIcon,children:"👁️"}),t.jsx("span",{className:n?"text-xl":"",style:n?{...e.statValue,fontSize:void 0}:e.statValue,children:m.length}),t.jsx("span",{className:n?"text-xs":"",style:n?{...e.statLabel,fontSize:void 0}:e.statLabel,children:"열람 가능 프로그램"})]})}),t.jsxs("div",{style:e.readOnlyNotice,children:[t.jsx("span",{style:e.readOnlyIcon,children:"🔒"}),"읽기 전용 모드입니다"]})]})]}),t.jsxs("section",{style:e.programSection,children:[t.jsx("h2",{style:e.sectionTitle,children:"프로그램 목록"}),m.length===0?t.jsxs("div",{style:e.emptyState,children:[t.jsx("div",{style:e.emptyIcon,
5children:"📭"}),t.jsx("h3",{style:e.emptyTitle,children:"열람 가능한 프로그램이 없습니다"}),t.jsxs("p",{style:e.emptyDescription,children:["아직 관전자 권한이 부여된 프로그램이 없습니다.",t.jsx("br",{}),"슈퍼 관리자에게 문의해주세요."]})]}):t.jsx("div",{style:e.programList,children:m.map((i,s)=>{var I,C,z,T,B,N,D,k,R,W,L,A,H,M,P,Y,E,O,$,F,G,U,V,_,q,J,K,Q,X,Z,ee,te,ie,ne,re,oe,se,ae;const l=y((C=(I=i.periods)==null?void 0:I.application)==null?void 0:C.start,(T=(z=i.periods)==null?void 0:z.application)==null?void 0:T.end),d=y((N=(B=i.periods)==null?void 0:B.documentReview)==null?void 0:N.start,(k=(D=i.periods)==null?void 0:D.documentReview)==null?void 0:k.end),c=y((W=(R=i.periods)==null?void 0:R.interview)==null?void 0:W.start,(A=(L=i.periods)==null?void 0:L.interview)==null?void 0:A.end);return t.jsxs("div",{style:{...e.programCard,animationDelay:`${s*.1}s`},onClick:()=>p(`/observer/${i.id}`),onMouseEnter:r=>{r.currentTarget.style.transform="translateY(-4px)",r.currentTarget.style.boxShadow="0 12px 40px rgba(245, 158, 11, 0.15)",r.currentTarget.style.borderColor="#f59e0b"},onMouseLeave:r=>{r.currentTarget.style.transform="translateY(0)",r.currentTarget.style.boxShadow="0 4px 20px rgba(0, 0, 0, 0.08)",r.currentTarget.style.borderColor="#e2e8f0"},children:[t.jsxs("div",{style:e.cardHeader,children:[t.jsxs("div",{style:e.cardHeaderLeft,children:[t.jsx("div",{style:e.programIcon,children:((H=i.displayName)==null?void 0:H.charAt(0))||"📋"}),t.jsxs("div",{children:[t.jsx("h3",{style:e.programName,children:i.displayName}),t.jsxs("p",{style:e.programId,children:["ID: ",i.id]})]})]}),t.jsxs("div",{style:e.cardHeaderRight,children:[t.jsx("div",{style:{...e.cardBadge,background:i.isActive?"#d1fae5":"#fef3c7",color:i.isActive?"#059669":"#92400e"},children:i.isActive?"활성":"비활성"}),t.jsx("div",{style:e.yearBadge,children:i.year})]})]}),t.jsx("div",{style:e.descriptionSection,children:t.jsx("p",{style:e.programDescription,children:((M=i.description)==null?void 0:M.trim())||"프로그램 설명이 없습니다."})}),t.jsxs("div",{className:n?"grid grid-cols-1 gap-3":"",style:n?{...e.infoGrid,display:void 0,gridTemplateColumns:void 0,gap:void 0}:e.infoGrid,children:[t.jsxs("div",{style:e.infoCard,children:[t.jsxs("div",{style:e.infoCardHeader,children:[t.jsx("span",{style:e.infoIcon,children:"📅"}),t.jsx("span",{style:e.infoTitle,children:"주요 기간"})]}),t.jsxs("div",{style:e.infoContent,children:[t.jsxs("div",{style:e.periodItem,children:[t.jsx("span",{style:e.periodLabel,children:"접수기간"}),t.jsx("span",{style:{...e.periodStatus,background:l.color+"20",color:l.color},children:l.label}),t.jsxs("span",{style:e.periodDate,children:[a((Y=(P=i.periods)==null?void 0:P.application)==null?void 0:Y.start)," ~ ",a((O=(E=i.periods)==null?void 0:E.application)==null?void 0:O.end)]})]}),t.jsxs("div",{style:e.periodItem,children:[t.jsx("span",{style:e.periodLabel,children:"서류심사"}),t.jsx("span",{style:{...e.periodStatus,background:d.color+"20",color:d.color},children:d.label}),t.jsxs("span",{style:e.periodDate,children:[a((F=($=i.periods)==null?void 0:$.documentReview)==null?void 0:F.start)," ~ ",a((U=(G=i.periods)==null?void 0:G.documentReview)==null?void 0:U.end)]})]}),t.jsxs("div",{style:e.periodItem,children:[t.jsx("span",{style:e.periodLabel,children:"대면심사"}),t.jsx("span",{style:{...e.periodStatus,background:c.color+"20",color:c.color},children:c.label}),t.jsxs("span",{style:e.periodDate,children:[a((_=(V=i.periods)==null?void 0:V.interview)==null?void 0:_.start)," ~ ",a((J=(q=i.periods)==null?void 0:q.interview)==null?void 0:J.end)]})]})]})]}),t.jsxs("div",{style:e.infoCard,children:[t.jsxs("div",{style:e.infoCardHeader,children:[t.jsx("span",{style:e.infoIcon,children:"👥"}),t.jsx("span",{style:e.infoTitle,children:"심사위원"})]}),t.jsxs("div",{style:e.infoContent,children:[t.jsxs("div",{style:e.evaluatorSummary,children:[t.jsxs("span",{style:e.evaluatorCount,children:[((Q=(K=i.evaluators)==null?void 0:K.list)==null?void 0:Q.length)||0,"명"]}),t.jsx("span",{style:e.evaluatorLabel,children:"등록된 심사위원"})]}),(Z=(X=i.evaluators)==null?void 0:X.list)==null?void 0:Z.slice(0,3).map((r,x)=>t.jsxs("div",{style:e.evaluatorItem,children:[t.jsx("span",{style:e.evaluatorDot,children:"•"}),t.jsx("span",{style:e.evaluatorName,children:r.name})]},x)),(((te=(ee=i.evaluators)==null?void 0:ee.list)==null?void 0:te.length)||0)>3&&t.jsxs("div",{style:e.evaluatorMore,children:["+",(((ne=(ie=i.evaluators)==null?void 0:ie.list)==null?void 0:ne.length)||0)-3,"명 더보기"]})]})]}),t.jsxs("div",{style:e.infoCard,children:[t.jsxs("div",{style:e.infoCardHeader,children:[t.jsx("span",{style:e.infoIcon,children:"📊"}),t.jsx("span",{style:e.infoTitle,children:"평가 기준"})]}),t.jsx("div",{style:e.infoContent,children:(oe=(re=i.evaluation)==null?void 0:re.phases)==null?void 0:oe.filter(r=>r.phase===1||r.phase===3).map(r=>{var x;return t.jsxs("div",{style:e.criteriaPhase,children:[t.jsx("span",{style:e.criteriaPhaseLabel,children:r.phase===1?"서류심사":"대면심사"}),t.jsxs("span",{style:e.criteriaCount,children:[((x=r.criteria)==null?void 0:x.length)||0,"개 항목"]})]},r.phase)})})]})]}),t.jsxs("div",{style:e.cardFooter,children:[t.jsx("div",{style:e.programMeta,children:t.jsxs("span",{style:e.metaItem,children:[t.jsx("span",{style:e.metaIcon,children:"📝"}),"지원서 양식 ",((ae=(se=i.applicationForm)==null?void 0:se.pages)==null?void 0:ae.length)||0,"페이지"]})}),t.jsxs("button",{style:e.enterButton,children:["현황 열람",t.jsx("span",{style:e.enterArrow,children:"→"})]})]})]},i.id)})})]})]}),t.jsx("footer",{style:e.footer,children:t.jsx("p",{style:e.footerText,children:"MYSC Apply 관전자 시스템"})}),t.jsx("style",{children:`
6        @keyframes fadeInUp {
7          from {
8            opacity: 0;
9            transform: translateY(20px);
10          }
11          to {
12            opacity: 1;
13            transform: translateY(0);
14          }
15        }
16      `})]})}const e={container:{minHeight:"100vh",background:"linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%)",display:"flex",flexDirection:"column"},loadingContainer:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"100vh",background:"linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%)"},loadingSpinner:{width:"48px",height:"48px",border:"4px solid #fef3c7",borderTopColor:"#f59e0b",borderRadius:"50%",animation:"spin 1s linear infinite",marginBottom:"16
16px"},loadingText:{fontSize:"1rem",color:"#92400e"},header:{background:"white",borderBottom:"1px solid #e2e8f0",padding:"0 32px",position:"sticky",top:0,zIndex:100},headerContent:{maxWidth:"1400px",margin:"0 auto",display:"flex",justifyContent:"space-between",alignItems:"center",height:"72px"},logoSection:{display:"flex",alignItems:"center",gap:"16px"},logo:{display:"flex",alignItems:"center"},roleTag:{padding:"6px 14px",background:"linear-gradient(135deg, #f59e0b 0%, #d97706 100%)",color:"white",fontSize:"0.85rem",fontWeight:600,borderRadius:"20px"},userSection:{display:"flex",alignItems:"center",gap:"12px"},userAvatar:{width:"40px",height:"40px",borderRadius:"50%",background:"linear-gradient(135deg, #f59e0b 0%, #d97706 100%)",color:"white",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:600,fontSize:"1rem"},userEmail:{color:"#64748b",fontSize:"0.9rem"},logoutButton:{padding:"8px 16px",background:"#f1f5f9",border:"none",borderRadius:"8px",color:"#64748b",fontSize:"0.9rem",fontWeight:500,cursor:"pointer",transition:"all 0.2s ease"},main:{flex:1,padding:"32px",maxWidth:"1400px",margin:"0 auto",width:"100%"},welcomeSection:{display:"flex",justifyContent:"space-between",alignItems:"center",background:"linear-gradient(135deg, #f59e0b 0%, #d97706 100%)",borderRadius:"20px",padding:"32px",marginBottom:"32px",color:"white"},welcomeContent:{},welcomeTitle:{fontSize:"1.75rem",fontWeight:700,marginBottom:"8px"},userName:{color:"#fef3c7"},welcomeSubtitle:{fontSize:"1rem",opacity:.9},welcomeActions:{display:"flex",alignItems:"center",gap:"20px"},statsBar:{display:"flex",gap:"16px"},statItem:{display:"flex",alignItems:"center",gap:"8px",background:"rgba(255, 255, 255, 0.2)",padding:"12px 20px",borderRadius:"12px"},statIcon:{fontSize:"1.5rem"},statValue:{fontSize:"1.75rem",fontWeight:700},statLabel:{fontSize:"0.85rem",opacity:.9},readOnlyNotice:{display:"flex",alignItems:"center",gap:"8px",background:"rgba(255, 255, 255, 0.95)",color:"#92400e",padding:"12px 20px",borderRadius:"12px",fontSize:"0.9rem",fontWeight:600},readOnlyIcon:{fontSize:"1rem"},programSection:{},sectionTitle:{fontSize:"1.25rem",fontWeight:700,color:"#1e293b",marginBottom:"20px"},emptyState:{textAlign:"center",padding:"80px 20px",background:"white",borderRadius:"16px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.08)"},emptyIcon:{fontSize:"4rem",marginBottom:"20px"},emptyTitle:{fontSize:"1.5rem",fontWeight:700,color:"#1e293b",marginBottom:"12px"},emptyDescription:{color:"#64748b",lineHeight:1.6},programList:{display:"flex",flexDirection:"column",gap:"24px"},programCard:{background:"white",borderRadius:"16px",padding:"24px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.08)",border:"2px solid #e2e8f0",cursor:"pointer",transition:"all 0.3s ease",animation:"fadeInUp 0.5s ease forwards",opacity:0,animationFillMode:"forwards"},cardHeader:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"16px"},cardHeaderLeft:{display:"flex",alignItems:"center",gap:"16px"},programIcon:{width:"48px",height:"48px",borderRadius:"12px",background:"linear-gradient(135deg, #f59e0b 0%, #d97706 100%)",color:"white",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.25rem",fontWeight:700},programName:{fontSize:"1.25rem",fontWeight:700,color:"#1e293b",marginBottom:"4px"},programId:{fontSize:"0.85rem",color:"#94a3b8"},cardHeaderRight:{display:"flex",alignItems:"center",gap:"8px"},cardBadge:{padding:"4px 12px",borderRadius:"20px",fontSize:"0.8rem",fontWeight:600},yearBadge:{padding:"4px 12px",background:"#f1f5f9",color:"#64748b",borderRadius:"20px",fontSize:"0.8rem",fontWeight:600},descriptionSection:{marginBottom:"20px"},programDescription:{color:"#64748b",fontSize:"0.95rem",lineHeight:1.6,whiteSpace:"pre-line",overflowWrap:"anywhere"},infoGrid:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"16px",marginBottom:"20px"},infoCard:{background:"#fefce8",borderRadius:"12px",padding:"16px"},infoCardHeader:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"12px"},infoIcon:{fontSize:"1rem"},infoTitle:{fontSize:"0.9rem",fontWeight:600,color:"#1e293b"},infoContent:{display:"flex",flexDirection:"column",gap:"8px"}
16,periodItem:{display:"flex",alignItems:"center",gap:"8px",fontSize:"0.85rem"},periodLabel:{color:"#64748b",minWidth:"60px"},periodStatus:{padding:"2px 8px",borderRadius:"4px",fontSize:"0.75rem",fontWeight:600},periodDate:{color:"#1e293b",marginLeft:"auto",fontSize:"0.8rem"},evaluatorSummary:{display:"flex",alignItems:"baseline",gap:"8px",marginBottom:"8px"},evaluatorCount:{fontSize:"1.5rem",fontWeight:700,color:"#f59e0b"},evaluatorLabel:{fontSize:"0.85rem",color:"#64748b"},evaluatorItem:{display:"flex",alignItems:"center",gap:"6px",fontSize:"0.85rem"},evaluatorDot:{color:"#f59e0b"},evaluatorName:{color:"#1e293b"},evaluatorMore:{fontSize:"0.8rem",color:"#f59e0b",fontWeight:500,marginTop:"4px"},criteriaPhase:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid #fef3c7"},criteriaPhaseLabel:{fontSize:"0.9rem",color:"#1e293b",fontWeight:500},criteriaCount:{fontSize:"0.85rem",color:"#f59e0b",fontWeight:600},cardFooter:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:"16px",borderTop:"1px solid #f1f5f9"},programMeta:{display:"flex",gap:"16px"},metaItem:{display:"flex",alignItems:"center",gap:"6px",fontSize:"0.85rem",color:"#64748b"},metaIcon:{fontSize:"1rem"},enterButton:{display:"flex",alignItems:"center",gap:"8px",padding:"12px 24px",background:"linear-gradient(135deg, #f59e0b 0%, #d97706 100%)",color:"white",border:"none",borderRadius:"12px",fontSize:"0.95rem",fontWeight:600,cursor:"pointer",transition:"all 0.2s ease"},enterArrow:{fontSize:"1.1rem"},footer:{textAlign:"center",padding:"24px",borderTop:"1px solid #fef3c7",background:"white"},footerText:{color:"#94a3b8",fontSize:"0.9rem"}};export{Ce as ObserverProgramSelectPage,Ce 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.