Spaces:
Sleeping
Sleeping
Update static/script.js
Browse files- static/script.js +4 -2
static/script.js
CHANGED
@@ -309,7 +309,8 @@ function showDescriptionPopup(item) {
|
|
309 |
const sectorItem = {
|
310 |
name: item.name,
|
311 |
image_url: item.image_url || '',
|
312 |
-
|
|
|
313 |
};
|
314 |
if (selectedItems.some(existing => existing.name === sectorItem.name)) {
|
315 |
addMessage('bot', `"${sectorItem.name}" is already in your selection!`);
|
@@ -417,7 +418,8 @@ function submitToSalesforce() {
|
|
417 |
|
418 |
const itemsToSubmit = selectedItems.map(item => ({
|
419 |
name: item.name,
|
420 |
-
|
|
|
421 |
}));
|
422 |
|
423 |
fetch('/submit_items', {
|
|
|
309 |
const sectorItem = {
|
310 |
name: item.name,
|
311 |
image_url: item.image_url || '',
|
312 |
+
category: item.category || 'Unknown',
|
313 |
+
description: item.description || 'No description available'
|
314 |
};
|
315 |
if (selectedItems.some(existing => existing.name === sectorItem.name)) {
|
316 |
addMessage('bot', `"${sectorItem.name}" is already in your selection!`);
|
|
|
418 |
|
419 |
const itemsToSubmit = selectedItems.map(item => ({
|
420 |
name: item.name,
|
421 |
+
category: item.category || 'Unknown', // Include Category__c
|
422 |
+
description: item.description || 'No description available' // Ensure description
|
423 |
}));
|
424 |
|
425 |
fetch('/submit_items', {
|