sryle
This commit is contained in:
@@ -512,8 +512,8 @@ function populateDemoShell() {
|
||||
<div class="contract-info">
|
||||
<span class="contract-type">Trainee \u2013 Monthly</span>
|
||||
<span class="contract-expires">expires 2026-07-10</span>
|
||||
<a class="contract-extend-link" href="#" onclick="event.preventDefault();openBillingPortal()">Resubscribe →</a>
|
||||
</div>
|
||||
<a class="contract-extend-link" href="#" onclick="event.preventDefault();openBillingPortal()">Resubscribe →</a>
|
||||
</div>`;
|
||||
|
||||
// Backups
|
||||
@@ -1549,7 +1549,10 @@ function renderContract(data) {
|
||||
const product = stripQuotes(item.product || "");
|
||||
const period = stripQuotes(item.period || "");
|
||||
const type = stripQuotes(item.type || "");
|
||||
const expires = stripQuotes(item.expires || "");
|
||||
|
||||
// Look up expires from the agent data (new field in agents list API)
|
||||
const agent = agents.find((a) => (a.UUID || a.uuid) === activeUUID);
|
||||
const expires = agent ? stripQuotes(agent.expires || "") : "";
|
||||
const hasExpiry = expires && expires !== "null" && expires !== "";
|
||||
|
||||
const label =
|
||||
@@ -1568,12 +1571,18 @@ function renderContract(data) {
|
||||
|
||||
if (hasExpiry) {
|
||||
html += `
|
||||
<span class="contract-expires">expires ${escHtml(expires)}</span>
|
||||
<a class="contract-extend-link" href="#" onclick="event.preventDefault();openBillingPortal()">Resubscribe →</a>`;
|
||||
<span class="contract-expires">expires ${escHtml(expires)}</span>`;
|
||||
}
|
||||
|
||||
html += `
|
||||
</div>`;
|
||||
|
||||
if (hasExpiry) {
|
||||
html += `
|
||||
<a class="contract-extend-link" href="#" onclick="event.preventDefault();openBillingPortal()">Resubscribe →</a>`;
|
||||
}
|
||||
|
||||
html += `
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
body.innerHTML = html;
|
||||
|
||||
+2
-1
@@ -2182,11 +2182,12 @@ body.auth-layout #signin-btn {
|
||||
|
||||
.contract-extend-link {
|
||||
display: inline-block;
|
||||
margin-top: 5px;
|
||||
margin-left: auto;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--danger);
|
||||
text-decoration: none;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.contract-extend-link:hover {
|
||||
|
||||
Reference in New Issue
Block a user