Lock customer page after choice, archive files on revision, add file checkboxes for delivery
This commit is contained in:
parent
51d1b4a4d9
commit
0f6b68cf5d
4 changed files with 144 additions and 48 deletions
|
|
@ -97,6 +97,26 @@
|
|||
margin-top:0;
|
||||
color:#f87171;
|
||||
}
|
||||
.file-select{
|
||||
background:#111827;
|
||||
padding:.6rem;
|
||||
border-radius:.5rem;
|
||||
margin:.3rem 0;
|
||||
}
|
||||
.file-select input{
|
||||
width:auto;
|
||||
margin-right:.5rem;
|
||||
}
|
||||
.file-select label{
|
||||
display:inline;
|
||||
margin:0;
|
||||
font-weight:400;
|
||||
}
|
||||
.old-rev{
|
||||
font-size:.85rem;
|
||||
color:#9ca3af;
|
||||
margin-left:1.8rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -125,7 +145,7 @@
|
|||
{% if req.revision_note %}
|
||||
<!-- Revisions requested by the customer -->
|
||||
<div class="revision-note">
|
||||
<h3>📝 Revisions Requested</h3>
|
||||
<h3>📝 Revisions Requested{% if req.revision_count %}<span style="float:right">Revision #{{ req.revision_count }}</span>{% endif %}</h3>
|
||||
<p>{{ req.revision_note }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
@ -238,10 +258,36 @@
|
|||
</p>
|
||||
<form method="POST">
|
||||
<input type="hidden" name="action" value="mark_paid_deliver">
|
||||
|
||||
<p style="color:#93c5fd;font-weight:600">Select files to deliver:</p>
|
||||
|
||||
{% set all_files = [] %}
|
||||
{% if req.song_a_path and file_exists(req.song_a_path) %}
|
||||
{% set _ = all_files.append(req.song_a_path) %}
|
||||
{% endif %}
|
||||
{% if req.song_b_path and file_exists(req.song_b_path) %}
|
||||
{% set _ = all_files.append(req.song_b_path) %}
|
||||
{% endif %}
|
||||
|
||||
<!-- List all MP3 files in the request's upload folder (includes revisions) -->
|
||||
{% set files_to_show = all_files + extra_files %}
|
||||
{% for fpath in files_to_show %}
|
||||
<div class="file-select">
|
||||
<input type="checkbox" id="file_{{ loop.index }}" name="deliver_file" value="{{ fpath }}"
|
||||
{% if fpath in all_files %}checked{% endif %}>
|
||||
<label for="file_{{ loop.index }}">{{ basename(fpath) }}</label>
|
||||
{% if not (fpath == req.song_a_path or fpath == req.song_b_path) %}
|
||||
<div class="old-rev">archived / revision file</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<p>No files available. Upload songs first.</p>
|
||||
{% endfor %}
|
||||
|
||||
<label for="square_payment_ref">Square Payment Reference</label>
|
||||
<input type="text" id="square_payment_ref" name="square_payment_ref" placeholder="e.g. sq0idp-... or receipt number">
|
||||
<div class="actions">
|
||||
<button type="submit" class="success" {% if req.customer_approved == 'none' %}disabled{% endif %}>Mark Paid & Deliver</button>
|
||||
<button type="submit" class="success">Mark Paid & Deliver</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
Reference in a new issue