05/07 Phase 3: initial codes
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
{% extends "tenant/layouts/base.html" %}
|
||||
{% block title %}Appointment #{{ appointment.id }}{% endblock %}
|
||||
{% block content %}
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h4 class="fw-bold mb-0">Appointment #{{ appointment.id }}</h4>
|
||||
<div class="d-flex gap-2">
|
||||
<a href="{{ url_for('appointments.edit', appt_id=appointment.id) }}" class="btn btn-outline-secondary btn-sm">Edit</a>
|
||||
{% if appointment.status in ['pending','confirmed','in_progress'] %}
|
||||
<a href="{{ url_for('pos.checkout') }}?appointment_id={{ appointment.id }}" class="btn btn-success btn-sm">
|
||||
<i class="bi bi-cash-register me-1"></i>Checkout
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row g-3 mb-4">
|
||||
<div class="col-md-6">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body">
|
||||
<dl class="row mb-0">
|
||||
<dt class="col-sm-4">Customer</dt><dd class="col-sm-8">{{ appointment.customer.name if appointment.customer else 'Walk-in' }}</dd>
|
||||
<dt class="col-sm-4">Service</dt><dd class="col-sm-8">{{ appointment.service.name if appointment.service else '—' }}</dd>
|
||||
<dt class="col-sm-4">Staff</dt><dd class="col-sm-8">{{ appointment.staff.name if appointment.staff else '—' }}</dd>
|
||||
<dt class="col-sm-4">Start</dt><dd class="col-sm-8">{{ appointment.start_time.strftime('%Y-%m-%d %I:%M %p') }}</dd>
|
||||
<dt class="col-sm-4">End</dt><dd class="col-sm-8">{{ appointment.end_time.strftime('%I:%M %p') if appointment.end_time else '—' }}</dd>
|
||||
<dt class="col-sm-4">Type</dt><dd class="col-sm-8">{{ 'Walk-in' if appointment.is_walk_in else 'Booked' }}</dd>
|
||||
<dt class="col-sm-4">Source</dt><dd class="col-sm-8">{{ appointment.rebook_source or 'manual' }}</dd>
|
||||
{% if appointment.notes %}
|
||||
<dt class="col-sm-4">Notes</dt><dd class="col-sm-8">{{ appointment.notes }}</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header fw-semibold">Update Status</div>
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ url_for('appointments.set_status', appt_id=appointment.id) }}">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<div class="mb-3">
|
||||
<select class="form-select" name="status">
|
||||
{% for s in ['pending','confirmed','in_progress','completed','cancelled','no_show'] %}
|
||||
<option value="{{ s }}" {{ 'selected' if appointment.status == s }}>{{ s.replace('_',' ').title() }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3" id="cancel-reason-field">
|
||||
<label class="form-label small">Cancellation reason</label>
|
||||
<input type="text" class="form-control form-control-sm" name="reason"
|
||||
value="{{ appointment.cancellation_reason or '' }}">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-sm">Update Status</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="{{ url_for('appointments.index', date=appointment.start_time.date().isoformat()) }}"
|
||||
class="btn btn-outline-secondary btn-sm">
|
||||
<i class="bi bi-arrow-left me-1"></i>Back to Calendar
|
||||
</a>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user