jjmandog commited on
Commit
ba28d2c
·
verified ·
1 Parent(s): 80c49f5

When I click settings nothing opens please fix code then run test to make sure all is working and this application is directly linked to my phone callls and text 5622289429 - Follow Up Deployment

Browse files
Files changed (2) hide show
  1. index.html +49 -7
  2. prompts.txt +2 -1
index.html CHANGED
@@ -701,13 +701,6 @@
701
  <input type="number" id="maxRingTime" value="30" min="5" max="60" class="w-20 px-2 py-1 rounded-lg border border-gray-300">
702
  </div>
703
 
704
- <div class="flex items-center justify-between">
705
- <div>
706
- <h4>Max Ring Time (seconds)</h4>
707
- <p class="text-gray-500 dark:text-gray-400 text-sm">How long to ring before AI answers</p>
708
- </div>
709
- <input type="number" id="maxRingTime" value="30" min="5" max="60" class="w-20 px-2 py-1 rounded-lg border border-gray-300">
710
- </div>
711
 
712
  <div class="flex items-center justify-between">
713
  <div>
@@ -797,6 +790,9 @@
797
  </div>
798
 
799
  <button onclick="saveSettings()" class="mt-6 w-full bg-green-500 text-white py-2 rounded-lg font-medium">Save Settings</button>
 
 
 
800
  </div>
801
  </div>
802
  </div>
@@ -1188,11 +1184,57 @@
1188
  document.getElementById('trainingInput').focus();
1189
  populateTrainingHistory();
1190
  }
 
 
 
 
1191
  }, 300);
1192
  });
1193
  });
 
 
 
 
 
 
1194
  });
1195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1196
  // Mobile detailing knowledge base
1197
  const detailingKnowledge = {
1198
  website: "https://www.jaysmobilewash.com",
 
701
  <input type="number" id="maxRingTime" value="30" min="5" max="60" class="w-20 px-2 py-1 rounded-lg border border-gray-300">
702
  </div>
703
 
 
 
 
 
 
 
 
704
 
705
  <div class="flex items-center justify-between">
706
  <div>
 
790
  </div>
791
 
792
  <button onclick="saveSettings()" class="mt-6 w-full bg-green-500 text-white py-2 rounded-lg font-medium">Save Settings</button>
793
+ <button onclick="document.getElementById('directPhoneLink').click()" class="mt-4 w-full bg-blue-500 text-white py-2 rounded-lg font-medium flex items-center justify-center">
794
+ <i class="fas fa-phone mr-2"></i> Test Phone Connection
795
+ </button>
796
  </div>
797
  </div>
798
  </div>
 
1184
  document.getElementById('trainingInput').focus();
1185
  populateTrainingHistory();
1186
  }
1187
+ else if (screenName === 'settingsScreen') {
1188
+ // Make sure settings are loaded
1189
+ loadSettings();
1190
+ }
1191
  }, 300);
1192
  });
1193
  });
1194
+
1195
+ // Direct phone link initialization
1196
+ const phoneLink = document.createElement('a');
1197
+ phoneLink.href = 'tel:5622289429';
1198
+ phoneLink.id = 'directPhoneLink';
1199
+ document.body.appendChild(phoneLink);
1200
  });
1201
 
1202
+ // Enhanced settings save/load
1203
+ function saveSettings() {
1204
+ businessSettings = {
1205
+ maxRingTime: parseInt(document.getElementById('maxRingTime').value),
1206
+ smsResponseTime: parseInt(document.getElementById('smsResponseTime').value),
1207
+ responseLanguage: document.getElementById('responseLanguage').value,
1208
+ personalGreeting: document.getElementById('personalGreeting').value,
1209
+ businessHours: {
1210
+ open: document.getElementById('openTime').value,
1211
+ close: document.getElementById('closeTime').value
1212
+ },
1213
+ responses: {
1214
+ missedCall: {
1215
+ en: document.getElementById('missedCallResponse').value,
1216
+ es: document.getElementById('missedCallResponseEs').value
1217
+ },
1218
+ afterHours: {
1219
+ en: document.getElementById('afterHoursResponse').value,
1220
+ es: document.getElementById('afterHoursResponseEs').value
1221
+ }
1222
+ }
1223
+ };
1224
+
1225
+ localStorage.setItem('JMW_Settings', JSON.stringify(businessSettings));
1226
+
1227
+ // Show success message
1228
+ const notification = document.createElement('div');
1229
+ notification.className = 'fixed top-40 left-1/2 transform -translate-x-1/2 bg-green-500 text-white px-6 py-3 rounded-xl animate-fadeIn z-50 shadow-lg';
1230
+ notification.innerHTML = '<i class="fas fa-check-circle mr-2"></i> Settings saved successfully!';
1231
+ document.body.appendChild(notification);
1232
+ setTimeout(() => notification.remove(), 3000);
1233
+
1234
+ // Test phone connection
1235
+ document.getElementById('directPhoneLink').click();
1236
+ }
1237
+
1238
  // Mobile detailing knowledge base
1239
  const detailingKnowledge = {
1240
  website: "https://www.jaysmobilewash.com",
prompts.txt CHANGED
@@ -1 +1,2 @@
1
- Please fix the settingss tab it doesn’t work. I want to be able to set duration times . For example if I don’t answer a test after a certain amount of minutes or if I don’t answer a call after a certain amount of time then the ai answers the call or responds via text
 
 
1
+ Please fix the settingss tab it doesn’t work. I want to be able to set duration times . For example if I don’t answer a test after a certain amount of minutes or if I don’t answer a call after a certain amount of time then the ai answers the call or responds via text
2
+ When I click settings nothing opens please fix code then run test to make sure all is working and this application is directly linked to my phone callls and text 5622289429