NexLab_System / templates /lab_info.html
alisaleem97's picture
Upload folder using huggingface_hub
6ea020b verified
Raw History Blame Contribute Delete
28.9 kB
<!-- templates/lab_info.html -->
{% extends "base.html" %}
{% block title %}Lab Information - NexLab{% endblock %}
{% block page_title %}Lab Information{% endblock %}
{% block content %}
<div class="bg-white rounded-xl shadow-sm border border-slate-200">
<div class="p-6 border-b border-slate-200 flex justify-between items-center">
<div>
<h3 class="text-lg font-semibold text-slate-800">Lab Information</h3>
<p class="text-sm text-slate-500">Configure your laboratory details and branding</p>
</div>
{% if not edit_mode %}
<a href="/lab-info/edit"
class="bg-indigo-600 hover:bg-indigo-700 text-white px-4 py-2 rounded-lg text-sm font-medium transition duration-200">
<svg class="w-5 h-5 inline mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"></path></svg>
Edit
</a>
{% else %}
<a href="/lab-info"
class="bg-slate-600 hover:bg-slate-700 text-white px-4 py-2 rounded-lg text-sm font-medium transition duration-200">
<svg class="w-5 h-5 inline mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>
Cancel
</a>
{% endif %}
</div>
{% if not edit_mode %}
<!-- VIEW MODE - Read Only Display -->
<div class="p-6">
{% if lab_info %}
<!-- Basic Information -->
<div class="mb-8">
<h4 class="text-md font-semibold text-slate-700 mb-4 flex items-center">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"></path></svg>
Basic Information
</h4>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="p-3 bg-slate-50 rounded-lg">
<label class="block text-xs font-medium text-slate-500 mb-1">Lab Name</label>
<p class="text-sm font-medium text-slate-800">{{ lab_info.lab_name if lab_info.lab_name else '-' }}</p>
</div>
<div class="p-3 bg-slate-50 rounded-lg">
<label class="block text-xs font-medium text-slate-500 mb-1">Lab Title</label>
<p class="text-sm font-medium text-slate-800">{{ lab_info.lab_title if lab_info.lab_title else '-' }}</p>
</div>
<div class="md:col-span-2 p-3 bg-slate-50 rounded-lg">
<label class="block text-xs font-medium text-slate-500 mb-1">Welcome Message</label>
<p class="text-sm font-medium text-slate-800 whitespace-pre-wrap">{{ lab_info.welcome_message if lab_info.welcome_message else '-' }}</p>
</div>
<div class="p-3 bg-green-50 rounded-lg border border-green-200">
<label class="block text-xs font-medium text-green-600 mb-1">Welcome Template Name (Wati)</label>
<p class="text-sm font-medium text-green-800">{{ lab_info.welcome_template_name if lab_info.welcome_template_name else '-' }}</p>
</div>
<div class="md:col-span-2 p-3 bg-slate-50 rounded-lg">
<label class="block text-xs font-medium text-slate-500 mb-1">Lab Province</label>
<p class="text-sm font-medium text-slate-800">{{ province_name if province_name else '-' }}</p>
</div>
<div class="p-3 bg-slate-50 rounded-lg">
<label class="block text-xs font-medium text-slate-500 mb-1">First Doctor Name</label>
<p class="text-sm font-medium text-slate-800 whitespace-pre-wrap">{{ lab_info.first_doctor_name if lab_info.first_doctor_name else '-' }}</p>
</div>
<div class="p-3 bg-slate-50 rounded-lg">
<label class="block text-xs font-medium text-slate-500 mb-1">Second Doctor Name</label>
<p class="text-sm font-medium text-slate-800 whitespace-pre-wrap">{{ lab_info.second_doctor_name if lab_info.second_doctor_name else '-' }}</p>
</div>
<div class="md:col-span-2 p-3 bg-slate-50 rounded-lg">
<label class="block text-xs font-medium text-slate-500 mb-1">Lab Address</label>
<p class="text-sm font-medium text-slate-800">{{ lab_info.lab_address if lab_info.lab_address else '-' }}</p>
</div>
</div>
</div>
<!-- Contact Information -->
<div class="mb-8">
<h4 class="text-md font-semibold text-slate-700 mb-4 flex items-center">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"></path></svg>
Contact Information
</h4>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="p-3 bg-slate-50 rounded-lg">
<label class="block text-xs font-medium text-slate-500 mb-1">Lab Phone 1</label>
<p class="text-sm font-medium text-slate-800">{{ lab_info.lab_phone_1 if lab_info.lab_phone_1 else '-' }}</p>
</div>
<div class="p-3 bg-slate-50 rounded-lg">
<label class="block text-xs font-medium text-slate-500 mb-1">Lab Phone 2</label>
<p class="text-sm font-medium text-slate-800">{{ lab_info.lab_phone_2 if lab_info.lab_phone_2 else '-' }}</p>
</div>
<div class="p-3 bg-slate-50 rounded-lg">
<label class="block text-xs font-medium text-slate-500 mb-1">Lab E-mail</label>
<p class="text-sm font-medium text-slate-800">{{ lab_info.lab_email if lab_info.lab_email else '-' }}</p>
</div>
<div class="p-3 bg-slate-50 rounded-lg">
<label class="block text-xs font-medium text-slate-500 mb-1">Lab Website</label>
<p class="text-sm font-medium text-slate-800">{{ lab_info.lab_website if lab_info.lab_website else '-' }}</p>
</div>
<div class="p-3 bg-amber-50 rounded-lg border border-amber-200">
<label class="block text-xs font-medium text-amber-600 mb-1">Tax Percentage</label>
<p class="text-sm font-medium text-amber-800">{{ lab_info.tax_percentage if lab_info.tax_percentage else '0' }}%</p>
</div>
</div>
</div>
<!-- Messaging APIs -->
<div class="mb-8">
<h4 class="text-md font-semibold text-slate-700 mb-4 flex items-center">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"></path></svg>
Messaging APIs
</h4>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="p-4 bg-green-50 rounded-lg border border-green-200">
<h5 class="text-sm font-semibold text-green-800 mb-3">WhatsApp</h5>
<div class="space-y-2">
<div>
<label class="block text-xs font-medium text-green-600 mb-1">WhatsApp API</label>
<p class="text-sm text-green-800">{{ lab_info.whatsapp_api if lab_info.whatsapp_api else '-' }}</p>
</div>
<div>
<label class="block text-xs font-medium text-green-600 mb-1">WhatsApp Token</label>
<p class="text-sm text-green-800">{{ lab_info.whatsapp_token if lab_info.whatsapp_token else '-' }}</p>
</div>
</div>
</div>
<div class="p-4 bg-blue-50 rounded-lg border border-blue-200">
<h5 class="text-sm font-semibold text-blue-800 mb-3">Telegram</h5>
<div class="space-y-2">
<div>
<label class="block text-xs font-medium text-blue-600 mb-1">Telegram API</label>
<p class="text-sm text-blue-800">{{ lab_info.telegram_api if lab_info.telegram_api else '-' }}</p>
</div>
<div>
<label class="block text-xs font-medium text-blue-600 mb-1">Telegram Token</label>
<p class="text-sm text-blue-800">{{ lab_info.telegram_token if lab_info.telegram_token else '-' }}</p>
</div>
</div>
</div>
</div>
</div>
<!-- Images & Branding -->
<div class="mb-8">
<h4 class="text-md font-semibold text-slate-700 mb-4 flex items-center">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"></path></svg>
Images & Branding
</h4>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
{% set images = [
('Lab Logo', lab_info.lab_logo),
('Lab QR 1', lab_info.lab_qr_1),
('Lab QR 2', lab_info.lab_qr_2),
('Lab Stamp 1', lab_info.lab_stamp_1),
('Lab Stamp 2', lab_info.lab_stamp_2),
('Lab Signature 1', lab_info.lab_signature_1),
('Lab Signature 2', lab_info.lab_signature_2),
('Lab Image 1', lab_info.lab_image_1),
('Lab Image 2', lab_info.lab_image_2)
] %}
{% for label, image_path in images %}
<div class="p-4 bg-slate-50 rounded-lg border border-slate-200">
<label class="block text-sm font-medium text-slate-700 mb-2">{{ label }}</label>
{% if image_path %}
<img src="/uploads/{{ image_path }}" alt="{{ label }}" class="w-full h-32 object-contain rounded">
{% else %}
<div class="w-full h-32 flex items-center justify-center bg-slate-200 rounded">
<span class="text-slate-400 text-sm">Not uploaded</span>
</div>
{% endif %}
</div>
{% endfor %}
</div>
</div>
<!-- Notes -->
<div class="mb-8">
<h4 class="text-md font-semibold text-slate-700 mb-4 flex items-center">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg>
Notes
</h4>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="p-3 bg-slate-50 rounded-lg">
<label class="block text-xs font-medium text-slate-500 mb-1">Lab Note 1</label>
<p class="text-sm font-medium text-slate-800">{{ lab_info.lab_note_1 if lab_info.lab_note_1 else '-' }}</p>
</div>
<div class="p-3 bg-slate-50 rounded-lg">
<label class="block text-xs font-medium text-slate-500 mb-1">Lab Note 2</label>
<p class="text-sm font-medium text-slate-800">{{ lab_info.lab_note_2 if lab_info.lab_note_2 else '-' }}</p>
</div>
</div>
</div>
{% if lab_info.edited_at %}
<div class="text-xs text-slate-500 text-right">
Last updated: {{ lab_info.edited_at.strftime('%Y-%m-%d %H:%M') }}
</div>
{% endif %}
{% else %}
<div class="text-center py-12">
<svg class="mx-auto h-12 w-12 text-slate-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"></path>
</svg>
<h3 class="mt-2 text-sm font-medium text-slate-900">No lab information configured</h3>
<p class="mt-1 text-sm text-slate-500">Click Edit to add your laboratory details.</p>
</div>
{% endif %}
</div>
{% else %}
<!-- EDIT MODE - Form -->
<form method="POST" enctype="multipart/form-data" id="labInfoForm" action="/lab-info/update" class="p-6">
<!-- Basic Information -->
<div class="mb-8">
<h4 class="text-md font-semibold text-slate-700 mb-4 flex items-center">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"></path></svg>
Basic Information
</h4>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">Lab Name *</label>
<input type="text" id="lab_name" name="lab_name" value="{{ lab_info.lab_name if lab_info else '' }}" required
class="w-full border border-slate-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-indigo-500 focus:outline-none">
</div>
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">Lab Title</label>
<input type="text" id="lab_title" name="lab_title" value="{{ lab_info.lab_title if lab_info else '' }}"
class="w-full border border-slate-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-indigo-500 focus:outline-none">
</div>
<div class="md:col-span-2">
<label class="block text-sm font-medium text-slate-700 mb-1">Welcome Message</label>
<textarea id="welcome_message" name="welcome_message" rows="3"
class="w-full border border-slate-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-indigo-500 focus:outline-none">{{ lab_info.welcome_message if lab_info else '' }}</textarea>
</div>
<div>
<label class="block text-sm font-medium text-green-700 mb-1">Welcome Template Name (Wati)</label>
<input type="text" id="welcome_template_name" name="welcome_template_name" value="{{ lab_info.welcome_template_name if lab_info else '' }}"
placeholder="e.g. welcome_message"
class="w-full border border-green-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-green-500 focus:outline-none bg-green-50">
<p class="text-xs text-slate-400 mt-1">Template name from your Wati dashboard (for new contacts)</p>
</div>
<div class="md:col-span-2">
<label class="block text-sm font-medium text-slate-700 mb-1">Lab Province</label>
<select id="province_id" name="province_id" class="w-full border border-slate-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-indigo-500 focus:outline-none">
<option value="">Select Province</option>
{% for province in provinces %}
<option value="{{ province.id }}" {% if lab_info and lab_info.province_id == province.id %}selected{% endif %}>{{ province.province_name }}</option>
{% endfor %}
</select>
</div>
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">First Doctor Name</label>
<textarea id="first_doctor_name" name="first_doctor_name" rows="2"
class="w-full border border-slate-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-indigo-500 focus:outline-none">{{ lab_info.first_doctor_name if lab_info else '' }}</textarea>
</div>
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">Second Doctor Name</label>
<textarea id="second_doctor_name" name="second_doctor_name" rows="2"
class="w-full border border-slate-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-indigo-500 focus:outline-none">{{ lab_info.second_doctor_name if lab_info else '' }}</textarea>
</div>
<div class="md:col-span-2">
<label class="block text-sm font-medium text-slate-700 mb-1">Lab Address</label>
<textarea id="lab_address" name="lab_address" rows="2"
class="w-full border border-slate-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-indigo-500 focus:outline-none">{{ lab_info.lab_address if lab_info else '' }}</textarea>
</div>
</div>
</div>
<!-- Contact Information -->
<div class="mb-8">
<h4 class="text-md font-semibold text-slate-700 mb-4 flex items-center">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"></path></svg>
Contact Information
</h4>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">Lab Phone 1 *</label>
<input type="text" id="lab_phone_1" name="lab_phone_1" value="{{ lab_info.lab_phone_1 if lab_info else '' }}" required
class="w-full border border-slate-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-indigo-500 focus:outline-none">
</div>
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">Lab Phone 2</label>
<input type="text" id="lab_phone_2" name="lab_phone_2" value="{{ lab_info.lab_phone_2 if lab_info else '' }}"
class="w-full border border-slate-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-indigo-500 focus:outline-none">
</div>
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">Lab E-mail</label>
<input type="email" id="lab_email" name="lab_email" value="{{ lab_info.lab_email if lab_info else '' }}"
class="w-full border border-slate-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-indigo-500 focus:outline-none">
</div>
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">Lab Website</label>
<input type="text" id="lab_website" name="lab_website" value="{{ lab_info.lab_website if lab_info else '' }}"
class="w-full border border-slate-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-indigo-500 focus:outline-none">
</div>
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">Tax Percentage (%)</label>
<input type="number" id="tax_percentage" name="tax_percentage" value="{{ lab_info.tax_percentage if lab_info and lab_info.tax_percentage else '0' }}" step="0.01" min="0" max="100"
class="w-full border border-amber-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-amber-500 focus:outline-none bg-amber-50">
</div>
</div>
</div>
<!-- Messaging APIs -->
<div class="mb-8">
<h4 class="text-md font-semibold text-slate-700 mb-4 flex items-center">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"></path></svg>
Messaging APIs
</h4>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<!-- WhatsApp -->
<div class="p-4 bg-green-50 rounded-lg border border-green-200">
<h5 class="text-sm font-semibold text-green-800 mb-3">WhatsApp</h5>
<div class="space-y-3">
<div>
<label class="block text-xs font-medium text-green-700 mb-1">WhatsApp API</label>
<input type="text" id="whatsapp_api" name="whatsapp_api" value="{{ lab_info.whatsapp_api if lab_info else '' }}"
class="w-full border border-green-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-green-500 focus:outline-none">
</div>
<div>
<label class="block text-xs font-medium text-green-700 mb-1">WhatsApp Token</label>
<input type="text" id="whatsapp_token" name="whatsapp_token" value="{{ lab_info.whatsapp_token if lab_info else '' }}"
class="w-full border border-green-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-green-500 focus:outline-none">
</div>
</div>
</div>
<!-- Telegram -->
<div class="p-4 bg-blue-50 rounded-lg border border-blue-200">
<h5 class="text-sm font-semibold text-blue-800 mb-3">Telegram</h5>
<div class="space-y-3">
<div>
<label class="block text-xs font-medium text-blue-700 mb-1">Telegram API</label>
<input type="text" id="telegram_api" name="telegram_api" value="{{ lab_info.telegram_api if lab_info else '' }}"
class="w-full border border-blue-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:outline-none">
</div>
<div>
<label class="block text-xs font-medium text-blue-700 mb-1">Telegram Token</label>
<input type="text" id="telegram_token" name="telegram_token" value="{{ lab_info.telegram_token if lab_info else '' }}"
class="w-full border border-blue-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:outline-none">
</div>
</div>
</div>
</div>
</div>
<!-- Images & Branding -->
<div class="mb-8">
<h4 class="text-md font-semibold text-slate-700 mb-4 flex items-center">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"></path></svg>
Images & Branding
</h4>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
{% set images = [
('Lab Logo', 'lab_logo'),
('Lab QR 1', 'lab_qr_1'),
('Lab QR 2', 'lab_qr_2'),
('Lab Stamp 1', 'lab_stamp_1'),
('Lab Stamp 2', 'lab_stamp_2'),
('Lab Signature 1', 'lab_signature_1'),
('Lab Signature 2', 'lab_signature_2'),
('Lab Image 1', 'lab_image_1'),
('Lab Image 2', 'lab_image_2')
] %}
{% for label, field_name in images %}
<div class="p-4 bg-slate-50 rounded-lg border border-slate-200">
<label class="block text-sm font-medium text-slate-700 mb-2">{{ label }}</label>
{% if lab_info and lab_info[field_name] %}
<img src="/uploads/{{ lab_info[field_name] }}" alt="{{ label }}" class="w-full h-32 object-contain mb-2 rounded">
{% endif %}
<input type="file" id="{{ field_name }}" name="{{ field_name }}" accept="image/*"
class="w-full text-sm text-slate-500 file:mr-4 file:py-2 file:px-4 file:rounded-lg file:border-0 file:text-sm file:font-semibold file:bg-indigo-50 file:text-indigo-700 hover:file:bg-indigo-100">
</div>
{% endfor %}
</div>
</div>
<!-- Notes -->
<div class="mb-8">
<h4 class="text-md font-semibold text-slate-700 mb-4 flex items-center">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg>
Notes
</h4>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">Lab Note 1</label>
<textarea id="lab_note_1" name="lab_note_1" rows="3"
class="w-full border border-slate-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-indigo-500 focus:outline-none">{{ lab_info.lab_note_1 if lab_info else '' }}</textarea>
</div>
<div>
<label class="block text-sm font-medium text-slate-700 mb-1">Lab Note 2</label>
<textarea id="lab_note_2" name="lab_note_2" rows="3"
class="w-full border border-slate-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-indigo-500 focus:outline-none">{{ lab_info.lab_note_2 if lab_info else '' }}</textarea>
</div>
</div>
</div>
<div class="flex gap-2">
<button type="submit" class="bg-indigo-600 hover:bg-indigo-700 text-white px-6 py-3 rounded-lg text-sm font-medium">
<svg class="w-5 h-5 inline mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"></path></svg>
Save Lab Information
</button>
<a href="/lab-info" class="bg-slate-600 hover:bg-slate-700 text-white px-6 py-3 rounded-lg text-sm font-medium">
Cancel
</a>
</div>
</form>
{% endif %}
</div>
{% endblock %}