secondary email

This commit is contained in:
2026-05-06 17:04:16 -05:00
parent 6662b3cb18
commit f9b4916e40
5 changed files with 238 additions and 46 deletions

View File

@@ -248,15 +248,29 @@ export function openModal(customerId = null) {
<div class="grid grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Email</label>
<label class="block text-sm font-medium text-gray-700 mb-1">Primary Email</label>
<input type="email" id="cf-email" value="${customer?.email || ''}"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Secondary Email</label>
<input type="email" id="cf-secondary-email" value="${customer?.secondary_email || ''}"
placeholder="Optional — used for invoices when 'Both' is selected"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
</div>
</div>
<div class="grid grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Phone</label>
<input type="tel" id="cf-phone" value="${customer?.phone || ''}"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Phone (alt)</label>
<input type="tel" id="cf-phone2" value="${customer?.phone2 || ''}"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
</div>
</div>
<div>
@@ -303,8 +317,9 @@ async function handleSubmit(e) {
zip_code: document.getElementById('cf-zip').value || null,
account_number: document.getElementById('cf-account').value || null,
email: document.getElementById('cf-email').value || null,
secondary_email: document.getElementById('cf-secondary-email').value || null,
phone: document.getElementById('cf-phone').value || null,
phone2: null,
phone2: document.getElementById('cf-phone2').value || null,
taxable: document.getElementById('cf-taxable').checked,
remarks: document.getElementById('cf-remarks').value || null
};