65 lines
4.0 KiB
HTML
65 lines
4.0 KiB
HTML
<!-- Paired Device Info for Modem Detail Page -->
|
|
{% if device %}
|
|
<div class="flex items-center gap-4 p-4 bg-green-50 dark:bg-green-900/20 rounded-lg">
|
|
<div class="bg-green-100 dark:bg-green-900/30 p-3 rounded-lg">
|
|
{% if device.device_type == "slm" or device.device_type == "sound_level_meter" %}
|
|
<svg class="w-6 h-6 text-green-600 dark:text-green-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"></path>
|
|
</svg>
|
|
{% else %}
|
|
<svg class="w-6 h-6 text-green-600 dark:text-green-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z"></path>
|
|
</svg>
|
|
{% endif %}
|
|
</div>
|
|
<div class="flex-1">
|
|
<p class="text-sm text-gray-500 dark:text-gray-400">Currently paired with</p>
|
|
<a href="/unit/{{ device.id }}" class="text-lg font-semibold text-green-700 dark:text-green-400 hover:underline">
|
|
{{ device.id }}
|
|
</a>
|
|
<div class="flex items-center gap-2 mt-1 text-sm text-gray-600 dark:text-gray-400">
|
|
<span class="capitalize">{{ device.device_type | replace("_", " ") }}</span>
|
|
{% if device.project_id %}
|
|
<span class="text-gray-400">|</span>
|
|
<span>{{ device.project_id }}</span>
|
|
{% endif %}
|
|
{% if device.deployed %}
|
|
<span class="px-1.5 py-0.5 bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300 text-xs rounded">Deployed</span>
|
|
{% else %}
|
|
<span class="px-1.5 py-0.5 bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300 text-xs rounded">Benched</span>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<div class="flex items-center gap-2">
|
|
<button onclick="openModemPairDeviceModal()"
|
|
class="px-3 py-1.5 text-sm bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-700 dark:text-gray-300 rounded-lg transition-colors">
|
|
Edit Pairing
|
|
</button>
|
|
<a href="/unit/{{ device.id }}" class="text-gray-400 hover:text-seismo-orange transition-colors">
|
|
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path>
|
|
</svg>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="flex items-center gap-4 p-4 bg-gray-50 dark:bg-gray-800 rounded-lg">
|
|
<div class="bg-gray-200 dark:bg-gray-700 p-3 rounded-lg">
|
|
<svg class="w-6 h-6 text-gray-500 dark:text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"></path>
|
|
</svg>
|
|
</div>
|
|
<div class="flex-1">
|
|
<p class="text-gray-600 dark:text-gray-400">No device currently paired</p>
|
|
<p class="text-sm text-gray-500 dark:text-gray-500">This modem is available for assignment</p>
|
|
</div>
|
|
<button onclick="openModemPairDeviceModal()"
|
|
class="px-4 py-2 text-sm bg-seismo-orange hover:bg-orange-600 text-white rounded-lg transition-colors flex items-center gap-2">
|
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"></path>
|
|
</svg>
|
|
Pair Device
|
|
</button>
|
|
</div>
|
|
{% endif %}
|