Fix the header claiming an unapproved script was approved

"locked" used to mean "the script is approved" and now means "not on the layout
stage", so the price card read Approved on every stage but one — including on a
script still waiting to be read. It should follow whether the words are still
open, which is what canEditScript says.
This commit is contained in:
gator 2026-09-07 23:25:29 +00:00
parent 29a054f8c8
commit 13a45d2e87

View file

@ -240,7 +240,9 @@ function render(r) {
var head = '<div class="quote" style="margin-bottom:22px">'
+ '<div><div class="big">$' + Number(p.price_usd || 0).toFixed(2) + '</div>'
+ '<div class="sub">' + ((p.segments || 4) * 8) + ' seconds · ' + (p.segments || 4) + ' shots</div></div>'
+ '<div class="sub">' + (locked ? "Approved" : left + " rewrite" + (left === 1 ? "" : "s") + " left") + '</div></div>';
+ '<div class="sub">' + (canEditScript
? left + " rewrite" + (left === 1 ? "" : "s") + " left"
: "Words approved") + '</div></div>';
var full = s.full_text
? '<h2 class="sec">The whole piece</h2><div class="full">' + esc(s.full_text) + '</div>' : "";