Only show communications if we have a method to do them.

This commit is contained in:
Eli Ribble 2026-03-14 16:23:09 +00:00
parent 4c71cab973
commit 299b72eac3
No known key found for this signature in database

View file

@ -764,39 +764,53 @@
<hr />
<!-- Message Reporter -->
<div class="mb-3">
<h6><i class="bi bi-chat-dots"></i> Message Reporter</h6>
<div class="mb-2">
<label class="form-label small text-muted"
>Quick Templates</label
>
<select
class="form-select form-select-sm"
@change="applyMessageTemplate($event.target.value)"
>
<option value="">Select a template...</option>
<option value="received">Report Received</option>
<option value="scheduled">Service Scheduled</option>
<option value="completed">Service Completed</option>
<option value="need_info">Need More Information</option>
</select>
<template
x-if="!(this.selectedCommunication?.public_report.reporter.has_email && this.selectedCommunication?.public_report.reporter.has_phone)"
>
<div class="mb-3">
<h6>
<i class="bi bi-chat-dots"></i> No Reporter Communications
Available
</h6>
</div>
<textarea
class="form-control mb-2"
rows="5"
x-model="messageText"
placeholder="Type your message to the reporter..."
></textarea>
<div class="d-grid">
<button
class="btn btn-primary"
@click="sendMessage()"
:disabled="!messageText.trim()"
>
<i class="bi bi-send me-2"></i>Send Message
</button>
</template>
<template
x-if="this.selectedCommunication?.public_report.reporter.has_email || this.selectedCommunication?.public_report.reporter.has_phone"
>
<div class="mb-3">
<h6><i class="bi bi-chat-dots"></i> Message Reporter</h6>
<div class="mb-2">
<label class="form-label small text-muted"
>Quick Templates</label
>
<select
class="form-select form-select-sm"
@change="applyMessageTemplate($event.target.value)"
>
<option value="">Select a template...</option>
<option value="received">Report Received</option>
<option value="scheduled">Service Scheduled</option>
<option value="completed">Service Completed</option>
<option value="need_info">Need More Information</option>
</select>
</div>
<textarea
class="form-control mb-2"
rows="5"
x-model="messageText"
placeholder="Type your message to the reporter..."
></textarea>
<div class="d-grid">
<button
class="btn btn-primary"
@click="sendMessage()"
:disabled="!messageText.trim()"
>
<i class="bi bi-send me-2"></i>Send Message
</button>
</div>
</div>
</div>
</template>
<hr />