Show contract renewal in businesses and align SSL/view charts.

Add annual renewal column with color-coded days left, owner title and renewal fields on create, SSL expiry display, and updated view chart kinds.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-26 10:13:06 +03:30
co-authored by Cursor
parent a52f963f52
commit e2fb08cccd
11 changed files with 243 additions and 27 deletions
+18 -4
View File
@@ -323,7 +323,13 @@ export function WebsitesPage() {
return {
...prev,
items: prev.items.map((item) =>
item.id === domain.id ? { ...item, sslEnabled: result.sslEnabled } : item,
item.id === domain.id
? {
...item,
sslEnabled: result.sslEnabled,
sslExpiresAt: result.sslExpiresAt,
}
: item,
),
}
})
@@ -561,7 +567,7 @@ export function WebsitesPage() {
<tr>
<th className={tableStyles.th}>Name</th>
<th className={tableStyles.th}>Owner business</th>
<th className={tableStyles.th}>Days to expire</th>
<th className={tableStyles.th}>Service expires</th>
<th className={tableStyles.th}>SSL</th>
<th className={tableStyles.th}>Latest deploy</th>
<th className={`${tableStyles.th} ${tableStyles.thActions}`}>Actions</th>
@@ -602,7 +608,11 @@ export function WebsitesPage() {
{domain.sslEnabled ? (
<span
className={tableStyles.sslIcon}
title="SSL certificate valid"
title={
domain.sslExpiresAt
? `SSL valid until ${new Date(domain.sslExpiresAt).toLocaleDateString()}`
: 'SSL certificate valid'
}
aria-label="SSL certificate valid"
>
<Lock size={16} className={tableStyles.sslOk} aria-hidden="true" />
@@ -621,7 +631,11 @@ export function WebsitesPage() {
</span>
)}
<span className={tableStyles.subText}>
{domain.sslEnabled ? 'Valid' : 'Invalid'}
{domain.sslEnabled
? domain.sslExpiresAt
? `Valid · ${formatDaysLeft(domain.sslExpiresAt)}`
: 'Valid'
: 'Invalid'}
</span>
</div>
</td>