|
|
@@ -39,7 +39,6 @@ if (selectForcePhase && groupPlatforms) {
|
|
|
|
|
|
const jsonStrategy = document.getElementById('json-strategy');
|
|
|
const jsonBlueprint = document.getElementById('json-blueprint');
|
|
|
-const jsonCaps = document.getElementById('json-caps');
|
|
|
const jsonSource = document.getElementById('json-source');
|
|
|
const jsonRaw = document.getElementById('json-raw');
|
|
|
|
|
|
@@ -987,24 +986,6 @@ window.jumpToCase = function (caseId) {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-async function fetchMemo(index) {
|
|
|
- const elTextarea = document.getElementById('memo-textarea');
|
|
|
- const elStatus = document.getElementById('memo-status');
|
|
|
- if (!elTextarea) return;
|
|
|
- elTextarea.value = 'Loading...';
|
|
|
- elTextarea.disabled = true;
|
|
|
- try {
|
|
|
- const res = await fetch(`/api/requirements/${index}/memo`);
|
|
|
- const data = await res.json();
|
|
|
- elTextarea.value = data.memo || '';
|
|
|
- elStatus.textContent = '';
|
|
|
- } catch (e) {
|
|
|
- elTextarea.value = '';
|
|
|
- console.error("Failed to fetch memo", e);
|
|
|
- }
|
|
|
- elTextarea.disabled = false;
|
|
|
-}
|
|
|
-
|
|
|
async function fetchPromptsList() {
|
|
|
try {
|
|
|
const res = await fetch('/api/prompts');
|
|
|
@@ -1278,8 +1259,6 @@ async function fetchRequirementData(index) {
|
|
|
}
|
|
|
};
|
|
|
}
|
|
|
- jsonCaps.innerHTML = renderAggregatedPerCaseData(casesList, 'capabilities');
|
|
|
-
|
|
|
const btnUpload = document.getElementById('btn-upload-source-ex');
|
|
|
const fileInput = document.getElementById('input-upload-source-ex');
|
|
|
if (btnUpload && fileInput) {
|
|
|
@@ -1423,10 +1402,8 @@ function selectRequirement(index) {
|
|
|
// Fetch data
|
|
|
if (jsonStrategy) jsonStrategy.textContent = 'Loading...';
|
|
|
if (jsonBlueprint) jsonBlueprint.textContent = 'Loading...';
|
|
|
- if (jsonCaps) jsonCaps.textContent = 'Loading...';
|
|
|
if (jsonRaw) jsonRaw.textContent = 'Loading...';
|
|
|
fetchRequirementData(index);
|
|
|
- fetchMemo(index);
|
|
|
}
|
|
|
|
|
|
function updateDetailBannerStatus(status) {
|
|
|
@@ -1567,12 +1544,6 @@ function setupEventListeners() {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- // Toggle Memo
|
|
|
- document.getElementById('btn-toggle-memo').addEventListener('click', () => {
|
|
|
- const memo = document.getElementById('memo-container');
|
|
|
- memo.classList.toggle('hidden');
|
|
|
- });
|
|
|
-
|
|
|
// Refresh Data without changing page position
|
|
|
const btnRefresh = document.getElementById('btn-refresh-data');
|
|
|
if (btnRefresh) {
|
|
|
@@ -1806,42 +1777,6 @@ function setupEventListeners() {
|
|
|
modalLogs.classList.add('hidden');
|
|
|
});
|
|
|
|
|
|
- const btnSaveMemo = document.getElementById('btn-save-memo');
|
|
|
- if (btnSaveMemo) {
|
|
|
- btnSaveMemo.addEventListener('click', async () => {
|
|
|
- if (currentSelectedIndex === null) return;
|
|
|
- const elTextarea = document.getElementById('memo-textarea');
|
|
|
- const elStatus = document.getElementById('memo-status');
|
|
|
- elStatus.textContent = 'Saving...';
|
|
|
- elStatus.style.color = 'var(--text-muted)';
|
|
|
-
|
|
|
- try {
|
|
|
- const res = await fetch(`/api/requirements/${currentSelectedIndex}/memo`, {
|
|
|
- method: 'POST',
|
|
|
- headers: { 'Content-Type': 'application/json' },
|
|
|
- body: JSON.stringify({ memo: elTextarea.value })
|
|
|
- });
|
|
|
- if (res.ok) {
|
|
|
- elStatus.textContent = 'Saved!';
|
|
|
- elStatus.style.color = 'var(--success)';
|
|
|
- setTimeout(() => elStatus.textContent = '', 2000);
|
|
|
-
|
|
|
- const req = requirements.find(r => r.index === currentSelectedIndex);
|
|
|
- if (req) {
|
|
|
- req.memo = elTextarea.value;
|
|
|
- renderTaskList(requirements);
|
|
|
- }
|
|
|
- } else {
|
|
|
- throw new Error("Bad response");
|
|
|
- }
|
|
|
- } catch (e) {
|
|
|
- console.error("Failed to save memo", e);
|
|
|
- elStatus.textContent = 'Save failed';
|
|
|
- elStatus.style.color = 'var(--danger)';
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
const btnOpenPrompts = document.getElementById('btn-open-prompts');
|
|
|
if (btnOpenPrompts) {
|
|
|
btnOpenPrompts.addEventListener('click', () => {
|