Honda219 commited on
Commit
b295860
·
verified ·
1 Parent(s): cfbfcaf

Add 2 files

Browse files
Files changed (2) hide show
  1. index.html +21 -3
  2. prompts.txt +1 -2
index.html CHANGED
@@ -310,10 +310,20 @@
310
  <div class="bg-white p-6 rounded-lg shadow">
311
  <h2 class="text-xl font-semibold text-blue-500 mb-4">Appointment Time Converter</h2>
312
  <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-4">
 
 
 
 
 
 
 
 
313
  <div>
314
  <label class="block text-sm font-medium text-gray-700 mb-1">Date</label>
315
  <input type="date" id="appointmentDate" class="w-full px-3 py-2 border rounded">
316
  </div>
 
 
317
  <div>
318
  <label class="block text-sm font-medium text-gray-700 mb-1">Time (EST)</label>
319
  <input type="time" id="appointmentTime" class="w-full px-3 py-2 border rounded">
@@ -872,6 +882,9 @@
872
  return;
873
  }
874
 
 
 
 
875
  // Format the date for the iCalendar file
876
  const icsDate = formatDateForICS(currentAppointmentDate);
877
 
@@ -885,12 +898,13 @@
885
  `DTSTAMP:${icsDate}`,
886
  `DTSTART:${icsDate}`,
887
  `DTEND:${icsDate}`,
888
- 'SUMMARY:Appointment with Derrin at UML',
889
  'DESCRIPTION:Your appointment with Derrin at UML',
890
  'LOCATION:Phone/Online',
 
891
  'END:VEVENT',
892
  'END:VCALENDAR'
893
- ].join('\r\n');
894
 
895
  // Create a blob and download it
896
  const blob = new Blob([icsContent], { type: 'text/calendar;charset=utf-8' });
@@ -1028,8 +1042,12 @@
1028
  // Format date as MM/DD/YYYY
1029
  const formattedDate = `${(estDate.getMonth() + 1).toString().padStart(2, '0')}/${estDate.getDate().toString().padStart(2, '0')}/${estDate.getFullYear()}`;
1030
 
 
 
 
 
1031
  // Generate the script
1032
- const script = `Hello, your appointment with Derrin at UML is booked for today ${formattedDate} at ${convertedTime} ${timezoneLabel}. Please reply with C to confirm or R to reschedule. Call or text this number (313) 723-0488 to reschedule.`;
1033
 
1034
  // Display the generated script
1035
  generatedScript.textContent = script;
 
310
  <div class="bg-white p-6 rounded-lg shadow">
311
  <h2 class="text-xl font-semibold text-blue-500 mb-4">Appointment Time Converter</h2>
312
  <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-4">
313
+ <div>
314
+ <label class="block text-sm font-medium text-gray-700 mb-1">Client Name</label>
315
+ <input type="text" id="clientName" class="w-full px-3 py-2 border rounded" placeholder="First Last">
316
+ </div>
317
+ <div>
318
+ <label class="block text-sm font-medium text-gray-700 mb-1">Client Email</label>
319
+ <input type="email" id="clientEmail" class="w-full px-3 py-2 border rounded" placeholder="email@example.com">
320
+ </div>
321
  <div>
322
  <label class="block text-sm font-medium text-gray-700 mb-1">Date</label>
323
  <input type="date" id="appointmentDate" class="w-full px-3 py-2 border rounded">
324
  </div>
325
+ </div>
326
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-4">
327
  <div>
328
  <label class="block text-sm font-medium text-gray-700 mb-1">Time (EST)</label>
329
  <input type="time" id="appointmentTime" class="w-full px-3 py-2 border rounded">
 
882
  return;
883
  }
884
 
885
+ const clientName = document.getElementById('clientName').value.trim();
886
+ const clientEmail = document.getElementById('clientEmail').value.trim();
887
+
888
  // Format the date for the iCalendar file
889
  const icsDate = formatDateForICS(currentAppointmentDate);
890
 
 
898
  `DTSTAMP:${icsDate}`,
899
  `DTSTART:${icsDate}`,
900
  `DTEND:${icsDate}`,
901
+ `SUMMARY:Appointment with Derrin at UML${clientName ? ' - ' + clientName : ''}`,
902
  'DESCRIPTION:Your appointment with Derrin at UML',
903
  'LOCATION:Phone/Online',
904
+ clientEmail ? `ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="${clientName || 'Client'}":mailto:${clientEmail}` : '',
905
  'END:VEVENT',
906
  'END:VCALENDAR'
907
+ ].filter(line => line !== '').join('\r\n');
908
 
909
  // Create a blob and download it
910
  const blob = new Blob([icsContent], { type: 'text/calendar;charset=utf-8' });
 
1042
  // Format date as MM/DD/YYYY
1043
  const formattedDate = `${(estDate.getMonth() + 1).toString().padStart(2, '0')}/${estDate.getDate().toString().padStart(2, '0')}/${estDate.getFullYear()}`;
1044
 
1045
+ // Get client name if provided
1046
+ const clientName = document.getElementById('clientName').value.trim();
1047
+ const greeting = clientName ? `Hello ${clientName},` : 'Hello,';
1048
+
1049
  // Generate the script
1050
+ const script = `${greeting} your appointment with Derrin at UML is booked for today ${formattedDate} at ${convertedTime} ${timezoneLabel}. Please reply with C to confirm or R to reschedule. Call or text this number (313) 723-0488 to reschedule.`;
1051
 
1052
  // Display the generated script
1053
  generatedScript.textContent = script;
prompts.txt CHANGED
@@ -1,2 +1 @@
1
- in the appointment time converter, give me the option to download an iCalendar file for the eastern time to put the appointment in my outlook calendar
2
- give me an option to import and export my scripts and labels
 
1
+ In the Appointment Time Converter and the script it generates allow me to add the client's name and email address to invite them as an attendee. Keep the same style and layout