This commit is contained in:
@@ -359,6 +359,16 @@
|
||||
<div class="card">
|
||||
<h3>📋 Get Contexts by Status <span class="status-indicator status-2">Status: 2</span></h3>
|
||||
<button onclick="getContextsByStatus(2)">Get Status 2 (Prompt Ready)</button>
|
||||
|
||||
<hr style="margin: 15px 0; border: 1px solid #e0e0e0;">
|
||||
|
||||
<button onclick="bulkUpdateStatus2To3()" style="background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); margin-top: 10px;">
|
||||
🚀 Quick Approve: All Status 2 → 3
|
||||
</button>
|
||||
<div class="result" id="bulkUpdateResultTop"></div>
|
||||
|
||||
<hr style="margin: 15px 0; border: 1px solid #e0e0e0;">
|
||||
|
||||
<div class="result" id="status2Result"></div>
|
||||
<div class="context-list" id="status2List"></div>
|
||||
</div>
|
||||
@@ -382,6 +392,14 @@
|
||||
</div>
|
||||
<button onclick="updateStatus()">Update Status</button>
|
||||
<div class="result" id="updateStatusResult"></div>
|
||||
|
||||
<hr style="margin: 20px 0; border: 1px solid #e0e0e0;">
|
||||
|
||||
<h4 style="color: #667eea; margin-bottom: 10px;">🚀 Bulk Update</h4>
|
||||
<button onclick="bulkUpdateStatus2To3()" style="background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);">
|
||||
Update All Status 2 → 3
|
||||
</button>
|
||||
<div class="result" id="bulkUpdateResult"></div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
@@ -643,6 +661,31 @@
|
||||
}
|
||||
}
|
||||
|
||||
async function bulkUpdateStatus2To3() {
|
||||
const headers = getHeaders();
|
||||
|
||||
if (!confirm('Are you sure you want to update ALL contexts from status 2 to status 3?')) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await fetch(`${API_BASE}/bulk/status-2-to-3`, {
|
||||
method: 'POST',
|
||||
headers: headers
|
||||
});
|
||||
const data = await response.json();
|
||||
showResult('bulkUpdateResult', data, response.ok);
|
||||
showResult('bulkUpdateResultTop', data, response.ok);
|
||||
if (response.ok) {
|
||||
getContextsByStatus(3);
|
||||
getContextsByStatus(2);
|
||||
}
|
||||
} catch (error) {
|
||||
showResult('bulkUpdateResult', { error: error.message }, false);
|
||||
showResult('bulkUpdateResultTop', { error: error.message }, false);
|
||||
}
|
||||
}
|
||||
|
||||
async function addImages() {
|
||||
const headers = getHeaders();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user