@takagaki/cortex-decisions-viewer 0.4.4 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/render.js +33 -1
- package/package.json +1 -1
package/dist/render.js
CHANGED
|
@@ -285,6 +285,13 @@ a:hover { text-decoration: underline; }
|
|
|
285
285
|
background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px;
|
|
286
286
|
padding: 10px 14px; margin: 12px 0 4px; font-size: 13.5px; color: #92400e; line-height: 1.7;
|
|
287
287
|
}
|
|
288
|
+
.adoption-note {
|
|
289
|
+
display: flex; gap: 8px; align-items: flex-start;
|
|
290
|
+
background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px;
|
|
291
|
+
padding: 10px 14px; margin: 0 0 14px; font-size: 13.5px; color: #1e40af; line-height: 1.7;
|
|
292
|
+
}
|
|
293
|
+
.chip.adoption-existing, .chip.adoption-migration { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
|
|
294
|
+
.chip.adoption-new { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
|
|
288
295
|
.chip {
|
|
289
296
|
display: inline-block; padding: 2px 10px; border-radius: 999px;
|
|
290
297
|
font-size: 12.5px; background: #f1f3f5; color: #41474f; border: 1px solid var(--border);
|
|
@@ -522,12 +529,29 @@ const CLIENT_JS = `
|
|
|
522
529
|
renderGenericList();
|
|
523
530
|
}
|
|
524
531
|
|
|
532
|
+
// 導入経緯(overview.adoption)の表示情報。existing/migration は Decision の薄さを注記する。
|
|
533
|
+
function adoptionInfo(v) {
|
|
534
|
+
// existing/migration は同一文言で「導入前の意思決定が揃わない」旨を注記する
|
|
535
|
+
var note = "この案件はAIS導入前から進行しているため、導入以前の意思決定はDecisionログに残っていない場合があります。";
|
|
536
|
+
if (v === "existing") return { label: "既存案件に導入", note: note };
|
|
537
|
+
if (v === "migration") return { label: "Cortex移行", note: note };
|
|
538
|
+
if (v === "new") return { label: "新規導入", note: "" };
|
|
539
|
+
return null;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
function homeAdoption() {
|
|
543
|
+
return SITE.home && SITE.home.fm ? adoptionInfo(SITE.home.fm.adoption) : null;
|
|
544
|
+
}
|
|
545
|
+
|
|
525
546
|
// ---------- ホーム(着地画面: Markdownをそのまま表示) ----------
|
|
526
547
|
function renderHome() {
|
|
527
548
|
var h = SITE.home;
|
|
528
549
|
countEl.textContent = "";
|
|
529
550
|
var head = el("div", { class: "detail-head" });
|
|
530
|
-
|
|
551
|
+
var titleWrap = el("div", {}, [ el("h1", { class: "detail-title", text: h.title }) ]);
|
|
552
|
+
var ai = h.fm ? adoptionInfo(h.fm.adoption) : null;
|
|
553
|
+
if (ai) titleWrap.appendChild(el("span", { class: "chip adoption-" + String(h.fm.adoption), text: ai.label }));
|
|
554
|
+
head.appendChild(titleWrap);
|
|
531
555
|
if (h.editUrl) {
|
|
532
556
|
head.appendChild(el("a", { class: "edit-btn", href: h.editUrl, target: "_blank", rel: "noopener", text: "✏️ GitHubで編集" }));
|
|
533
557
|
}
|
|
@@ -539,6 +563,14 @@ const CLIENT_JS = `
|
|
|
539
563
|
|
|
540
564
|
// ---------- Decisions一覧(フィルタ付き) ----------
|
|
541
565
|
function renderDecisionList() {
|
|
566
|
+
// 既存案件・移行案件は導入前/移行前の意思決定が揃わないため、その旨を最初に注記する
|
|
567
|
+
var ai = homeAdoption();
|
|
568
|
+
if (ai && ai.note) {
|
|
569
|
+
app.appendChild(el("div", { class: "adoption-note" }, [
|
|
570
|
+
el("span", { text: "ℹ️" }),
|
|
571
|
+
el("span", { text: ai.note }),
|
|
572
|
+
]));
|
|
573
|
+
}
|
|
542
574
|
var filters = el("div", { class: "filters" });
|
|
543
575
|
var search = el("input", { type: "search", placeholder: "キーワード検索(タイトル・要約・本文)" });
|
|
544
576
|
search.value = listState.q;
|