PageSourceSearch

https://gsxone.ai/assets/ChecklistRoadmapPage-CXZA9uU5.js

js gsxone.ai collected 2026-10-05 13:10:20 UTC 33,813 bytes, 1 lines download raw bytes

1import{k as e,d as s,o as t,u as a,a as r,h as n,p as l,j as i}from"./index-BTcPvoEA.js";import{a as d,ag as c,aU as o,aI as x,Y as m,a9 as u,T as p,p as h,R as g,l as b,s as j,c as y}from"./vendor-icons-Bkg-6Ex1.js";import{u as N}from"./useMutation-DR89m72b.js";import{d as f}from"./useChecklist---WNH67X.js";import{P as v}from"./portal-api-DtkhAdlX.js";import{a as k,r as w,b as S}from"./roadmap-api-D1516FCe.js";import"./charts-C6KVAqdT.js";import"./firebase-auth-C4eyY_b2.js";import"./firebase-core-IgwuAbwy.js";import"./firebase-firestore-Ccbuv3Eb.js";import"./firebase-storage-C3_x6E22.js";import"./firebase-functions-BKCZgKG_.js";import"./firebase-analytics-qm8UH2IR.js";import"./firebase-installations-CDeT25bw.js";import"./vendor-utils-DFWLJKD2.js";import"./checklist-api-BkosrHOD.js";const I={not_started:"未着手",in_progress:"対応中",done:"完了",deferred:"見送り"},C={high:"高",medium:"中",low:"低"},$={draft:"下書き",shared:"確定",archived:"保管"};function Q(e){const s=/^(\d{4})Q([1-4])$/.exec(e);return s?4*Number(s[1])+(Number(s[2])-1):null}function P(e){return`${Math.floor(e/4)}Q${e%4+1}`}function q(e,s=!1){const t=/^(\d{4})Q([1-4])$/.exec(e);if(!t)return e;const a=3*(Number(t[2])-1)+1;return s?`${String(t[1]).slice(2)}å¹´${a}-${a+2}月`:`${t[1]}å¹´${a}〜${a+2}月`}const E=["consultant","consultant-manager","system-admin"],L={in_progress:"回答中",submitted:"提出済み",under_review:"レビュー中",revision_requested:"差戻し",completed:"完了"},A={"未達":"bg-red-100 text-red-700","証跡不足":"bg-yellow-100 text-yellow-800","未回答":"bg-gray-100 text-gray-600","要対応":"bg-orange-100 text-orange-800"},_={not_started:"bg-gray-100 text-gray-600",in_progress:"bg-blue-100 text-blue-700",done:"bg-green-100 text-green-700",deferred:"bg-slate-100 text-slate-500"},M=[3,5,8,10,15,20,30],F=["open","in_progress","waiting_user","answered"],U=e=>{if(!e)return"—";const s=new Date(e);return Number.isNaN(s.getTime())?"—":s.toLocaleDateString("ja-JP",{year:"numeric",month:"long",day:"numeric"})},O=e=>{if(!e)return"—";const s=new Date(e);return Number.isNaN(s.getTime())?"—":s.toLocaleString("ja-JP",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})},T=["in_progress","revision_requested"],R=({value:e,source:s})=>e&&"unset"!==s?i.jsxs("span",{className:"inline-flex items-center gap-1 whitespace-nowrap",children:[i.jsx("span",{className:"font-medium text-gray-800 dark:text-slate-200",children:e}),"ai_estimate"===s&&i.jsx("span",{className:"px-1 py-0.5 text-[10px] rounded bg-blue-50 text-blue-700 border border-blue-200",title:"コンサルタントの監修前の、AI による目安です",children:"AI 推計"}),"client"===s&&i.jsx("span",{className:"px-1 py-0.5 text-[10px] rounded bg-gray-50 text-gray-500 border border-gray-200",children:"自社設定"})]}):i.jsx("span",{className:"text-xs text-gray-400",children:"未設定"});function K(e,s=[]){const t=Q(e);if(null===t)return[];const a=new Set;for(let r=t-4;r<=t+12;r++)a.add(r);for(const r of s){const e=r?Q(r):null;null!==e&&a.add(e)}return[...a].sort((e,s)=>e-s).map(P)}const D=({item:e,startQuarter:s,canManage:t,canEditEstimate:a,canEditProgress:r,saving:n,ownerCandidates:l,consultations:c,onPatch:o,onConsult:x,onOpenConsultation:m})=>{var u,p,h,g,b;const[j,N]=d.useState(e.ownerLabel),[f,v]=d.useState(e.clientNote);d.useEffect(()=>N(e.ownerLabel),[e.ownerLabel]),d.useEffect(()=>v(e.clientNote),[e.clientNote]);const k=K(s,[null==(u=e.schedule)?void 0:u.startQuarter,null==(p=e.schedule)?void 0:p.endQuarter]),w=(null==(h=e.schedule)?void 0:h.startQuarter)??"",S=(null==(g=e.schedule)?void 0:g.endQuarter)??"",C=c.find(e=>F.includes(e.status)),$=(e,s)=>{const t=Q(e),a=Q(s);null!==t&&null!==a&&o({schedule:{startQuarter:e,endQuarter:a<t?e:s}})},P="w-full rounded-md border border-gray-300 dark:border-slate-600 bg-white dark:bg-slate-900 text-sm text-gray-900 dark:text-white px-2 py-1.5 disabled:bg-gray-50 disabled:text-gray-400";return i.jsxs("div",{className:"space-y-4 text-sm print:hidden",children:[i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[i.jsxs("label",{className:"block",children:[i.jsx("span",{className:"block text-xs text-gray-500 mb-1",children:"進捗"}),i.jsx("select",{className:P,value:e.progress,disabled:!r||n,onChange:e=>o({progress:e.target.value}),children:Object.keys(I).map(e=>i.jsx("option",{value:e,children:I[e]},e))})]}),i.jsxs("label",{className:"block",children:[i.jsx("span",{className:"block text-xs text-gray-500 mb-1",children:"担当(部署・役割)"}),i.jsx("input",{className:P,value:j,maxLength:100,disabled:!t||n,placeholder:"ä¾
1‹: 情報システム課",onChange:e=>N(e.target.value),onBlur:()=>{j.trim()!==e.ownerLabel&&o({ownerLabel:j.trim()})}})]}),t&&i.jsxs("label",{className:"block",children:[i.jsx("span",{className:"block text-xs text-gray-500 mb-1",children:"担当者(進捗を更新できる人)"}),i.jsxs("select",{className:P,value:e.ownerUserId??"",disabled:n,onChange:s=>{const t=s.target.value||null,a=l.find(e=>e.userId===t);o(a&&!e.ownerLabel?{ownerUserId:t,ownerLabel:a.name}:{ownerUserId:t})},children:[i.jsx("option",{value:"",children:"(未設定)"}),l.map(e=>i.jsx("option",{value:e.userId,children:e.name},e.userId)),e.ownerUserId&&!l.some(s=>s.userId===e.ownerUserId)&&i.jsx("option",{value:e.ownerUserId,children:"(設定済みの担当者)"})]})]}),i.jsxs("div",{children:[i.jsxs("span",{className:"block text-xs text-gray-500 mb-1",children:["時期 ",e.schedule&&!e.schedule.pinned&&i.jsx("span",{className:"text-gray-400",children:"(自動割付)"})]}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsxs("select",{className:P,value:w,disabled:!t||n,"aria-label":"開始の四半期",onChange:e=>$(e.target.value,S||e.target.value),children:[!w&&i.jsx("option",{value:"",children:"—"}),k.map(e=>i.jsx("option",{value:e,children:q(e)},e))]}),i.jsx("span",{className:"text-gray-400",children:"〜"}),i.jsxs("select",{className:P,value:S,disabled:!t||n,"aria-label":"終了の四半期",onChange:e=>$(w||e.target.value,e.target.value),children:[!S&&i.jsx("option",{value:"",children:"—"}),k.map(e=>i.jsx("option",{value:e,children:q(e)},e))]})]}),t&&(null==(b=e.schedule)?void 0:b.pinned)&&i.jsx("button",{type:"button",className:"mt-1 text-xs text-gsx-700 hover:underline",disabled:n,onClick:()=>o({schedule:null}),children:"自動割付に戻す"})]})]}),t&&i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[!a&&i.jsx("p",{className:"sm:col-span-2 self-center text-xs text-gray-500",children:"工数・リスクの区分の編集は Basic Plus 以上でご利用いただけます。"}),a&&i.jsxs("label",{className:"block",children:[i.jsx("span",{className:"block text-xs text-gray-500 mb-1",children:"工数(自社で見直す場合)"}),i.jsxs("select",{className:P,value:"client"===e.estimate.effortSource?e.estimate.effort??"":"",disabled:n,onChange:e=>o({estimate:{effort:e.target.value||null}}),children:[i.jsx("option",{value:"",children:"指定しない"}),i.jsx("option",{value:"S",children:"S(数週間)"}),i.jsx("option",{value:"M",children:"M(1〜3 か月)"}),i.jsx("option",{value:"L",children:"L(3 か月超)"})]})]}),a&&i.jsxs("label",{className:"block",children:[i.jsx("span",{className:"block text-xs text-gray-500 mb-1",children:"リスク(自社で見直す場合)"}),i.jsxs("select",{className:P,value:"client"===e.estimate.riskSource?e.estimate.risk??"":"",disabled:n,onChange:e=>o({estimate:{risk:e.target.value||null}}),children:[i.jsx("option",{value:"",children:"指定しない"}),i.jsx("option",{value:"high",children:"高"}),i.jsx("option",{value:"medium",children:"中"}),i.jsx("option",{value:"low",children:"低"})]})]}),i.jsxs("label",{className:"block sm:col-span-2",children:[i.jsx("span",{className:"block text-xs text-gray-500 mb-1",children:"メモ"}),i.jsx("textarea",{className:P,rows:2,maxLength:2e3,value:f,disabled:n,onChange:e=>v(e.target.value),onBlur:()=>{f!==e.clientNote&&o({clientNote:f})}})]})]}),!t&&e.clientNote&&i.jsxs("p",{className:"text-gray-600 dark:text-slate-300 whitespace-pre-wrap",children:["メモ: ",e.clientNote]}),e.estimate.dependsOn.length>0&&i.jsxs("p",{className:"text-xs text-gray-500",children:["先に終える項目: ",e.estimate.dependsOn.join("・")]}),i.jsxs("div",{className:"flex flex-wrap items-center gap-2 pt-1 border-t border-gray-100 dark:border-slate-700",children:[i.jsx("span",{className:"text-xs text-gray-500 mr-1",children:"関連する相談"}),0===c.length&&i.jsx("span",{className:"text-xs text-gray-400",children:"まだありません"}),c.map(e=>i.jsxs("button",{type:"button",onClick:()=>m(e.id),className:"inline-flex items-center gap-1 text-xs text-gsx-700 hover:underline",children:[i.jsx(y,{className:"w-3 h-3"}),e.ticketNumber??"相談"," ",e.subject.slice(0,24),F.includes(e.status)?"(対応中)":"(解決済み)"]},e.id)),t&&(C?i.jsxs("button",{type:"button",onClick:()=>
1m(C.id),className:"ml-auto inline-flex items-center gap-1 px-3 py-1.5 text-xs font-medium rounded-lg border border-gsx-300 text-gsx-700 hover:bg-gsx-50",children:[i.jsx(y,{className:"w-3.5 h-3.5"})," 対応中の相談を開く"]}):i.jsxs("button",{type:"button",onClick:x,className:"ml-auto inline-flex items-center gap-1 px-3 py-1.5 text-xs font-medium text-white bg-gsx-600 rounded-lg hover:bg-gsx-700",children:[i.jsx(y,{className:"w-3.5 h-3.5"})," この項目について相談する"]})),t&&i.jsx("button",{type:"button",disabled:n,onClick:()=>o({excluded:!e.excluded}),className:"text-xs text-gray-500 hover:underline",children:e.excluded?"計画に戻す":"今回は計画に入れない"})]})]})},V=()=>{const{responseId:y=""}=e(),F=s(),V=t(),{currentUser:B}=a(),{selectedCompany:J}=r(),[G]=n(),X=E.includes((null==B?void 0:B.role)??""),Y=X&&(G.get("clientId")||(null==J?void 0:J.clientId))||void 0,z=d.useMemo(()=>["checklist","roadmap",y,Y??"self"],[y,Y]),{data:H,isLoading:W,error:Z}=l({queryKey:z,queryFn:()=>w.get(y,Y),enabled:!!y,retry:!1}),[ee,se]=d.useState(null),[te,ae]=d.useState(null),[re,ne]=d.useState(!1),[le,ie]=d.useState(!1),[de,ce]=d.useState(""),[oe,xe]=d.useState(null),me=()=>V.invalidateQueries({queryKey:z}),ue=e=>s=>ae({kind:"error",text:S(s,e)}),pe=N({mutationFn:()=>w.generate(y),onSuccess:e=>{ae({kind:"info",text:e.created?`ロードマップを作成しました(${e.itemCount} 項目)`:`最新の回答で更新しました(追加 ${e.summary.added} 件・解消の可能性 ${e.summary.resolved} 件)。担当・時期・進捗はそのままです`}),me()},onError:ue("ロードマップの作成に失敗しました")}),he=N({mutationFn:e=>w.updatePlanning(y,e),onSuccess:()=>{me()},onError:ue("設定の保存に失敗しました")}),ge=N({mutationFn:e=>w.updateItem(y,e.itemId,e.patch),onSuccess:()=>{ae(null),me()},onError:ue("保存に失敗しました")}),be=N({mutationFn:e=>w.addItem(y,e),onSuccess:()=>{ie(!1),ce(""),me()},onError:ue("項目の追加に失敗しました")}),je=N({mutationFn:()=>w.launchEstimate(y,Y),onSuccess:e=>{xe(e.jobId),ae({kind:"info",text:"AI による推計を開始しました。完了すると区分が表示されます"})},onError:ue("AI による推計を開始できませんでした")}),{data:ye,isError:Ne}=l({queryKey:["checklist","roadmap","estimate-job",y,oe],queryFn:()=>w.getEstimateJob(y,oe??"",Y),enabled:!!oe,retry:2,refetchInterval:e=>{var s;const t=null==(s=e.state.data)?void 0:s.status;return"completed"!==t&&"failed"!==t&&5e3}});d.useEffect(()=>{oe&&Ne&&(xe(null),ae({kind:"error",text:"AI による推計の進み具合を確認できませんでした。しばらくしてからこの画面を開き直してご確認ください"}))},[oe,Ne]),d.useEffect(()=>{ye&&("completed"===ye.status?(xe(null),ae({kind:"info",text:"AI による推計が完了しました"}),V.invalidateQueries({queryKey:z})):"failed"===ye.status&&(xe(null),ae({kind:"error",text:"AI による推計に失敗しました。時間をおいて再度お試しください(この失敗は、推計の回数には数えません)"})))},[ye,V,z]);const fe=H&&H.exists?H:null,ve=!0===(null==H?void 0:H.permissions.canManage),{data:ke}=l({queryKey:["checklist","roadmap","owners",y],queryFn:()=>w.getOwnerCandidates(y),enabled:!!fe&&ve,staleTime:3e5,retry:!1}),{data:we}=f(le?(null==H?void 0:H.response.templateId)??"":""),Se=d.useMemo(()=>{if(!fe||!we)return[];const e=new Set(fe.items.map(e=>e.questionId)),s=de.trim().toLowerCase(),t=[];for(const a of we.categories??[])for(const r of a.questions??[]){if(e.has(r.id))continue;const n=r.code??"",l=`${n?`${n} `:""}${r.questionText}`;s&&!l.toLowerCase().includes(s)||t.push({id:r.id,label:l,category:a.name})}return t.slice(0,100)},[fe,we,de]),Ie=d.useMemo(()=>{const e=new Map;for(const s of(null==fe?void 0:fe.consultations)??[]){const t=e.get(s.itemId)??[];t.push(s),e.set(s.itemId,t)}return e},[fe]),Ce=d.useMemo(()=>{if(!fe)return{quarters:[],truncated:!1};const e=Q(fe.roadmap.planning.startQuarter)??0;let s=e,t=e+3;for(const l of fe.items){if(!l.schedule)continue;const e=Q(l.schedule.startQuarter),a=Q(l.schedule.endQuarter);null!==e&&e<s&&(s=e),null!==a&&a>t&&(t=a)}const a=t-s+1>8,r=a?s+8-1:t,n=[];for(let l=s;l<=r;l++)n.push(P(l));return{quarters:n,truncated:a}},[fe]);if(W)return i.jsx("div",{className:"flex items-center justify-center min-h-[40vh] text-gray-500",children:"読み込み中..."});if(Z||!H){const{status:e,code:s}
1=k(Z),t="client_selection_required"===s?"顧客を選択してから開いてください。":404===e?"この機能はまだご利用いただけません。":403===e?"このロードマップを表示する権限がありません。":"ロードマップを読み込めませんでした。";return i.jsxs("div",{className:"p-8 text-center text-gray-500",children:[t,i.jsx("button",{onClick:()=>F("/app/checklist"),className:"ml-2 text-gsx-600 underline",children:"チェックリスト一覧へ"})]})}const $e=H.response.templateName??"チェックリスト",Qe=v[H.plan],Pe=ge.isPending,qe=i.jsxs("div",{className:"flex items-start justify-between flex-wrap gap-3",children:[i.jsxs("div",{children:[i.jsxs("button",{onClick:()=>F(`/app/checklist/responses/${y}/dashboard`),className:"inline-flex items-center gap-1 text-sm text-gray-500 hover:text-gray-700 mb-1 print:hidden",children:[i.jsx(c,{className:"w-4 h-4"})," 評価ダッシュボードへ戻る"]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(o,{className:"w-7 h-7 text-gsx-600 print:hidden"}),i.jsxs("h1",{className:"text-2xl font-bold text-gray-900 dark:text-white print:text-black",children:[$e," ロードマップ"]})]}),i.jsx("p",{className:"text-sm text-gray-500 mt-1",children:H.response.companyName})]}),i.jsxs("div",{className:"flex items-center gap-2 print:hidden",children:[i.jsxs("span",{className:"px-3 py-1 text-xs font-semibold rounded-full bg-gray-100 text-gray-600",children:[Qe," プラン"]}),fe&&i.jsxs("button",{onClick:()=>window.print(),className:"inline-flex items-center gap-1.5 rounded-lg border border-gray-300 dark:border-slate-600 px-3 py-1.5 text-xs font-medium text-gray-700 dark:text-slate-200 hover:bg-gray-50 dark:hover:bg-slate-700",children:[i.jsx(x,{className:"w-3.5 h-3.5"})," 印刷"]}),fe&&ve&&i.jsxs("button",{onClick:()=>pe.mutate(),disabled:pe.isPending,className:"inline-flex items-center gap-1.5 rounded-lg border border-gsx-300 px-3 py-1.5 text-xs font-medium text-gsx-700 hover:bg-gsx-50 disabled:opacity-50",title:"最新の回答からギャップを取り直します。担当・時期・進捗はそのまま残ります",children:[i.jsx(m,{className:"w-3.5 h-3.5"})," ",pe.isPending?"更新中…":"最新の回答で更新"]})]})]}),Ee=te&&i.jsx("div",{className:"rounded-lg border p-3 text-sm print:hidden "+("error"===te.kind?"border-red-200 bg-red-50 text-red-800":"border-green-200 bg-green-50 text-green-800"),role:"error"===te.kind?"alert":"status",children:te.text});if(!fe){const e=H.exists?null:H.candidates;return i.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-6",children:[qe,Ee,i.jsxs("div",{className:"bg-white dark:bg-slate-800 rounded-xl shadow-sm p-8 text-center",children:[i.jsx(o,{className:"w-10 h-10 text-gsx-500 mx-auto mb-3"}),i.jsx("p",{className:"text-gray-800 dark:text-slate-200 font-medium",children:"未対応の項目から、対応の順番と時期の計画を作成します"}),i.jsxs("p",{className:"text-sm text-gray-500 mt-2",children:["対象: ",(null==e?void 0:e.total)??0," 件(未達 ",(null==e?void 0:e.byStatus["未達"])??0,"・証跡不足 ",(null==e?void 0:e.byStatus["証跡不足"])??0,"・未回答"," ",(null==e?void 0:e.byStatus["未回答"])??0,")"]}),ve?i.jsxs("button",{onClick:()=>pe.mutate(),disabled:pe.isPending,className:"mt-5 inline-flex items-center gap-2 rounded-lg bg-gsx-600 hover:bg-gsx-700 px-5 py-2.5 text-sm font-medium text-white disabled:opacity-50",children:[i.jsx(o,{className:"w-4 h-4"}),pe.isPending?"作成中…":"ロードマップを作成"]}):i.jsx("p",{className:"text-sm text-gray-500 mt-4",children:X?"顧客の管理者が作成すると、ここに表示されます(スタッフは顧客の計画を作成・変更しません)。":"管理者が作成すると、ここに表示されます。"})]})]})}const{roadmap:Le}=fe,Ae=Le.planning.startQuarter,_e=fe.estimateCoverage,Me="basic"===fe.plan,Fe=T.includes(Le.baseResponseStatus??""),Ue=L[Le.baseResponseStatus??""]??"—",Oe=e=>{const s=e.schedule?Q(e.schedule.startQuarter):null,t=e.schedule?Q(e.sc
1hedule.endQuarter):null;return Ce.quarters.map((a,r)=>{var n,l;const d=Q(a),c=r===Ce.quarters.length-1,o=null!==s&&null!==t&&null!==d&&d>=s&&d<=t,x=Ce.truncated&&c&&null!==t&&null!==d&&t>d;return i.jsx("td",{className:"px-0.5 py-2 align-middle",children:o?i.jsx("div",{className:`h-3 rounded-sm ${"done"===e.progress?"bg-green-400":(null==(n=e.schedule)?void 0:n.pinned)?"bg-gsx-600":"bg-gsx-400"} print:border print:border-gray-600`,title:`${q(a)}${(null==(l=e.schedule)?void 0:l.pinned)?"":"(自動割付)"}`}):x?i.jsx("div",{className:"text-center text-xs text-gray-400",children:"→"}):i.jsx("div",{className:"h-3"})},a)})},Te=e=>s=>ge.mutate({itemId:e,patch:s}),Re=e=>ve||H.permissions.canUpdateOwnProgress&&!!B&&e.ownerUserId===(B.uid||B.id),Ke=e=>i.jsx(D,{item:e,startQuarter:Ae,canManage:ve,canEditEstimate:!0===H.permissions.canEditEstimate,canEditProgress:Re(e),saving:Pe,ownerCandidates:ke??[],consultations:Ie.get(e.id)??[],onPatch:Te(e.id),onConsult:()=>(e=>{const s=(null==H?void 0:H.response.templateName)??"チェックリスト",t=new URLSearchParams({source:"checklist",mode:"ai",subject:`【${s}】計画の相談: ${e.questionText.slice(0,60)}`,message:`チェックリスト「${s}」のロードマップの項目について、進め方を相談したいです。\n\n- カテゴリ: ${e.categoryName}\n- 項目: ${e.code?`${e.code} `:""}${e.questionText}\n- 状態: ${e.gapStatus}\n`,relatedResponseId:y,roadmapId:y,roadmapItemId:e.id});F(`/app/support/tickets/new?${t.toString()}`)})(e),onOpenConsultation:e=>F(`/app/support/tickets/${e}`)}),De=e=>i.jsxs(i.Fragment,{children:[e.code&&i.jsx("span",{className:"font-mono text-xs text-gray-500 mr-1.5",children:e.code}),i.jsx("span",{className:"text-gray-900 dark:text-white",children:e.questionText}),e.gapResolved&&"done"!==e.progress&&i.jsx("span",{className:"ml-2 px-1.5 py-0.5 text-[10px] rounded bg-green-50 text-green-700 border border-green-200 whitespace-nowrap",title:"最新の回答では未対応ã
1§ã¯ãªããªã£ã¦ã„ます。確認のうえ、進捗を「完了」にしてください",children:"解消済みの可能性"}),e.priority.factors.length>0&&i.jsxs("span",{className:"block text-[11px] text-gray-400 mt-0.5",children:["根拠: ",e.priority.factors.join("・")]})]});return i.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-6 print:p-0 print:space-y-3 print:max-w-none",children:[qe,Ee,i.jsxs("div",{className:"bg-white dark:bg-slate-800 rounded-xl shadow-sm p-5 print:shadow-none print:p-0 print:rounded-none",children:[i.jsxs("dl",{className:"grid grid-cols-2 lg:grid-cols-4 gap-x-6 gap-y-2 text-sm",children:[i.jsxs("div",{children:[i.jsx("dt",{className:"text-xs text-gray-500",children:"基準にした回答"}),i.jsxs("dd",{className:"text-gray-900 dark:text-white print:text-black",children:[Fe?`編集中の回答(${Ue})`:Le.baseVersion?`第 ${Le.baseVersion} 版(${Ue})`:`回答(${Ue})`,i.jsxs("span",{className:"block text-xs text-gray-500",children:[O(Le.generatedAt)," 時点の内容"]})]})]}),i.jsxs("div",{children:[i.jsx("dt",{className:"text-xs text-gray-500",children:"評価日(提出日)"}),i.jsx("dd",{className:"text-gray-900 dark:text-white print:text-black",children:Fe?i.jsxs(i.Fragment,{children:["未提出(編集中の回答から作成)",Le.baseVersion?i.jsxs("span",{className:"block text-xs text-gray-500",children:["直近に記録した版は第 ",Le.baseVersion," 版"]}):null]}):U(Le.baseSubmittedAt)})]}),i.jsxs("div",{children:[i.jsx("dt",{className:"text-xs text-gray-500",children:"計画の状態"}),i.jsx("dd",{className:"text-gray-900 dark:text-white print:text-black",children:$[Le.status]})]}),i.jsxs("div",{children:[i.jsx("dt",{className:"text-xs text-gray-500",children:"最終更新"}),i.jsx("dd",{className:"text-gray-900 dark:text-white print:text-black",children:U(Le.updatedAt)})]})]}),ve&&i.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-100 dark:border-slate-700 flex flex-wrap items-end gap-4 print:hidden",children:[i.jsxs("label",{className:"text-sm",children:[i.jsx("span",{className:"block text-xs text-gray-500 mb-1",children:"起点"}),i.jsx("select",{className:"rounded-md border border-gray-300 dark:border-slate-600 bg-white dark:bg-slate-900 text-sm px-2 py-1.5",value:Ae,disabled:he.isPending,onChange:e=>he.mutate({startQuarter:e.target.value}),children:K(Ae).map(e=>i.jsx("option",{value:e,children:q(e)},e))})]}),i.jsxs("label",{className:"text-sm",children:[i.jsx("span",{className:"block text-xs text-gray-500 mb-1",title:"工数 S=1・M=3・L=8 として、3 か月に進められる量",children:"3 か月に進める量"}),i.jsx("select",{className:"rounded-md border border-gray-300 dark:border-slate-600 bg-white dark:bg-slate-900 text-sm px-2 py-1.5",value:Le.planning.capacityPerQuarter,disabled:he.isPending,onChange:e=>he.mutate({capacityPerQuarter:Number(e.target.value)}),children:[...new Set([...M,Le.planning.capacityPerQuarter])].sort((e,s)=>e-s).map(e=>i.jsx("option",{value:e,children:e},e))})]}),i.jsx("button",{type:"button",disabled:he.isPending,onClick:()=>he.mutate({status:"shared"===Le.status?"draft":"shared"}),title:"shared"===Le.status?"計画の状態を「下書き」に戻します":"計画の状態を「確定」にします(担当コンサルタントへの通知は送られません。相談したい項目は「この項目について相談する」をご利用ください)",className:"rounded-lg border border-gsx-300 px-3 py-1.5 text-xs font-medium text-gsx-700 hover:bg-gsx-50 disabled:opacity-50",children:"shared"===Le.status?"下書きに戻す":"計画を確定する"}),i.jsxs("button",{type:"button",onClick:()=>ie(e=>!e),className:"inline-flex items-center gap-1 rounded-lg border border-gray-300 dark:border-slate-600 px-3 py-1.5 text-xs font-medium text-gray-700 dark:text-slate-200 hover:bg-gray-50 dark:hover:bg-slate-700",children:[i.jsx(u,{className:"w-3.5 h-3.5"})," 項目を追加"]})]}),le&&ve&&i.jsxs("div",{className:"mt-4 rounded-lg border border-gray-200 dark:border-slate-700 p-4 print:hidden",children:[i.jsx("p",{className:"text-sm text-gray-700 dark:text-slate-200 mb-2",children:"自由記述の設問など、自動では候補に入らない項目を計画に入れます(状態は「要対応」になります)。"}),i.jsx("input",{className:"w-full rounded-md border border-gray-300 dark:border-slate-600 bg-white dark:bg-slate-900 text-sm px-2 py-1.5 mb-2",placeholder:"設問を検索",value:de,onChange:e=>ce(e.target.value)}),i.jsxs("ul",{className:"max-h-64 overflow-y-auto divide-y divide-gray-100 dark:divide-slate-700",children:[0===Se.length&&i.jsx("li",{className:"py-2 text-sm text-gray-400",children:we?"追加できる設問がありません":"読み込み中…"}),Se.map(e=>i.jsxs("li",{className:"py-2 flex items-start justify-between gap-3",children:[i.jsxs("span",{className:"text-sm text-gray-800 dark:text-slate-200",children:[e.label,i.jsx("span",{className:"block text-xs text-gray-400",children:e.category})]}),i.jsx("button",{type:"button",disabled:be.isPending,onClick:()=>be.mutate(e.id),className:"shrink-0 rounded-md bg-gsx-600 hover:bg-gsx-700 px-2.5 py-1 text-xs font-medium text-white disabled:opacity-50",children:"追加"})]},e.id))]})]})]}),fe.dependencyCycle&&i.jsxs("div",{className:"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-800 flex items-start gap-2",role:"alert",children:[i.jsx(p,{className:"w-4 h-4 mt-0.5 shrink-0"}),i.jsxs("span",{children:["項目の前後関係が循環しているため、順番を正しく決められません(",fe.dependencyCycle.join(" → "),")。 表示の順番は前後関係を無視した参考値です。担当コンサルタントにご連絡ください。"]})]}),i.jsxs("div",{className:"text-xs text-gray-500 space-y-1 print:text-[10px]",children:[_e.ai_estimate>0&&i.jsxs("p",{children:["※「AI 推計」は、コンサルタントの監修前の目安です(",_e.ai_estimate," 件)。工数は S=数週間・M=1〜3 か月・L=3 か月超。"]}),_e.unset>0&&i.jsxs("p",{children:["※「未設定」の項目(",_e.unset," 件)は、リスク中・工数 M として順番を計算しています。",Me?"監修済みの区分が用意され次第、表示されます。":"",!0===H.permissions.canEditEstimate?"項目を開くと自社で設定できます。":""]}),i.jsx("p",{children:"※ 製品の選定や費用については、各項目の「この項目について相談する」からご相談ください。"}),i.jsx("p",{className:"print:hidden",children:"※ 項目からの相談は、作成時は月次の相談枠を消費しません(1 つの項目につき、対応中の相談は 1 件まで)。 ただし、その相談の中でコンサルタントに確認を依頼したとき、解決済みにした相談を再開したとき、 相談枠を消費しない相談の月あたりの上限を超えた分は、通常の相談と同じく月次の相談枠を使います。"})]}),fe.aiEstimate.available&&_e.unset>0&&(ve||X)&&i.jsxs("div",{className:"rounded-lg border border-blue-200 bg-blue-50 p-3 text-sm text-blue-900 flex flex-wrap items-center justify-between gap-2 print:hidden",children:[i.jsx("span",{children:"自社で取り込んだチェックリストのため、工数・リスクの
1区分が未設定です。AI で目安を作成できます(AI の利用量に計上されます)。"}),i.jsxs("button",{type:"button",disabled:je.isPending||!!oe,onClick:()=>je.mutate(),className:"inline-flex items-center gap-1 rounded-lg bg-blue-600 hover:bg-blue-700 px-3 py-1.5 text-xs font-medium text-white disabled:opacity-50",children:[i.jsx(h,{className:"w-3.5 h-3.5"}),oe?"推計中…"+((null==ye?void 0:ye.progress)?`(${ye.progress.completed}/${ye.progress.total})`:""):"AI で推計を作る"]})]}),X&&fe.consultationStats&&i.jsxs("div",{className:"rounded-lg border border-gray-200 dark:border-slate-700 bg-white dark:bg-slate-800 p-3 text-xs text-gray-600 dark:text-slate-300 print:hidden",children:["スタッフ向け: この顧客のロードマップ由来の相談(",fe.consultationStats.month,"・作成時は月次の相談枠を消費しません)— AI"," ",fe.consultationStats.ai," 件 / コンサルタント ",fe.consultationStats.consultant," 件"]}),i.jsx("div",{className:"bg-white dark:bg-slate-800 rounded-xl shadow-sm p-4 hidden md:block print:block print:shadow-none print:p-0",children:0===fe.items.length?i.jsx("p",{className:"text-sm text-green-600 py-6 text-center",children:"計画に入っている項目はありません。"}):i.jsxs("table",{className:"w-full text-sm border-collapse",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"text-left text-xs text-gray-500 border-b border-gray-200 dark:border-slate-700",children:[i.jsx("th",{className:"py-2 pr-2 font-medium w-10",children:"優先"}),i.jsx("th",{className:"py-2 pr-2 font-medium",children:"項目"}),i.jsx("th",{className:"py-2 pr-2 font-medium whitespace-nowrap",children:"状態"}),i.jsx("th",{className:"py-2 pr-2 font-medium whitespace-nowrap",children:"工数"}),i.jsx("th",{className:"py-2 pr-2 font-medium whitespace-nowrap",children:"リスク"}),i.jsx("th",{className:"py-2 pr-2 font-medium whitespace-nowrap",children:"担当"}),i.jsx("th",{className:"py-2 pr-2 font-medium whitespace-nowrap",children:"進捗"}),Ce.quarters.map(e=>i.jsx("th",{className:"py-2 px-0.5 font-medium text-center text-[10px] whitespace-nowrap w-14",children:q(e,!0)},e))]})}),i.jsx("tbody",{children:fe.items.map(e=>{const s=ee===e.id;return i.jsxs(g.Fragment,{children:[i.jsxs("tr",{className:"border-b border-gray-100 dark:border-slate-700/50 cursor-pointer hover:bg-gray-50 dark:hover:bg-slate-700/30 print:break-inside-avoid",onClick:()=>se(s?null:e.id),children:[i.jsx("td",{className:"py-2 pr-2 text-gray-700 dark:text-slate-200 align-top",children:i.jsxs("span",{className:"inline-flex items-center gap-0.5",children:[i.jsx("span",{className:"print:hidden text-gray-400",children:s?i.jsx(b,{className:"w-3.5 h-3.5"}):i.jsx(j,{className:"w-3.5 h-3.5"})}),e.priority.rank??"—"]})}),i.jsx("td",{className:"py-2 pr-2 align-top",children:De(e)}),i.jsx("td",{className:"py-2 pr-2 align-top",children:i.jsx("span",{className:`px-2 py-0.5 text-xs font-medium rounded-full whitespace-nowrap ${A[e.gapStatus]??"bg-gray-100 text-gray-600"}`,children:e.gapStatus})}),i.jsx("td",{className:"py-2 pr-2 align-top",children:i.jsx(R,{value:e.estimate.effort,source:e.estimate.effortSource})}),i.jsx("td",{className:"py-2 pr-2 align-top",children:i.jsx(R,{value:e.estimate.risk?C[e.estimate.risk]:null,source:e.estimate.riskSource})}),i.jsx("td",{className:"py-2 pr-2 align-top text-gray-700 dark:text-slate-200",children:e.ownerLabel||i.jsx("span",{className:"text-xs text-gray-400",children:"未設定"})}),i.jsx("td",{className:"py-2 pr-2 align-top",children:i.jsx("span",{className:`px-2 py-0.5 text-xs rounded-full whitespace-nowrap ${_[e.progress]}`,children:I[e.progress]})}),Oe(e)]}),s&&i.jsxs("tr",{className:"bg-gray-50 dark:bg-slate-900/40 print:hidden",children:[i.jsx("td",{}),i.jsx("td",{colSpan:6+Ce.quarters.length,className:"py-3 pr-3",children:Ke(e)})]})]},e.id)})})]})}),i.jsxs("div",{className:"md:hidden space-y-3 print:hidden",children:[0===fe.items.length&&i.jsx("p",{className:"text-sm text-green-600 py-6 text-center",children:"計画に入っている項目はありません。"}),fe.items.map(e=>{const s=ee===e.id;return i.jsxs("div",{className:"bg-white dark:bg-slate-800 rounded-xl shadow-sm p-4",children:[i.jsxs("button",{type:"button",className:"w-full text-left",onClick:()=>se(s?null:e.id),"aria-expanded":s,children:[i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("span",{className:"shrink-0 w-7 h-7 rounded-full bg-gsx-50 text-gsx-700 text-sm font-bold flex items-center justify-center",children:e.priority.rank??"—"}),i.jsx("span",{className:"text-sm",children:De(e)})]}),i.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs",children:[i.jsx("span",{className:`px-2 py-0.5 font-medium rounded-full ${A[e.gapStatus]??"bg-gray-100 text-gray-600"}`,children:e.gapStatus}),i.jsx("span",{className:`px-2 py-0.5 rounded-full ${_[e.progress]}`,children:I[e.progress]}),i.jsx("span",{className:"text-gray-500",children:"工数"}),i.jsx(R,{value:e.estimate.effort,source:e.estimate.effortSource}),i.jsx("span",{className:"text-gray-500",children:"リスク"}
1),i.jsx(R,{value:e.estimate.risk?C[e.estimate.risk]:null,source:e.estimate.riskSource})]}),i.jsxs("p",{className:"mt-2 text-xs text-gray-600 dark:text-slate-300",children:[e.schedule?e.schedule.startQuarter===e.schedule.endQuarter?q(e.schedule.startQuarter):`${q(e.schedule.startQuarter)} 〜 ${q(e.schedule.endQuarter)}`:"時期未定",e.ownerLabel?` / ${e.ownerLabel}`:""]})]}),s&&i.jsx("div",{className:"mt-3 pt-3 border-t border-gray-100 dark:border-slate-700",children:Ke(e)})]},e.id)})]}),fe.excludedItems.length>0&&i.jsxs("div",{className:"bg-white dark:bg-slate-800 rounded-xl shadow-sm p-4 print:hidden",children:[i.jsxs("button",{type:"button",onClick:()=>ne(e=>!e),className:"inline-flex items-center gap-1 text-sm text-gray-700 dark:text-slate-200","aria-expanded":re,children:[re?i.jsx(b,{className:"w-4 h-4"}):i.jsx(j,{className:"w-4 h-4"}),"計画に入れていない項目(",fe.excludedItems.length,")"]}),re&&i.jsx("ul",{className:"mt-3 divide-y divide-gray-100 dark:divide-slate-700",children:fe.excludedItems.map(e=>i.jsxs("li",{className:"py-2 flex items-start justify-between gap-3 text-sm",children:[i.jsx("span",{children:De(e)}),ve&&i.jsx("button",{type:"button",disabled:Pe,onClick:()=>Te(e.id)({excluded:!1}),className:"shrink-0 text-xs text-gsx-700 hover:underline",children:"計画に戻す"})]},e.id))})]}),i.jsxs("p",{className:"hidden print:block text-[10px] text-gray-500",children:["GSX One ロードマップ — 印刷日 ",U((new Date).toISOString()),"。優先度は未対応ã
1®ç¨®é¡žãƒ»ãƒªã‚¹ã‚¯ãƒ»å·¥æ•°ãƒ»å‰å¾Œé–¢ä¿‚から自動で計算しています。"]})]})};export{V as ChecklistRoadmapPage,V 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.