fix: align growth UX across primary pages
All checks were successful
CD Pipeline / deploy (push) Successful in 1m2s
All checks were successful
CD Pipeline / deploy (push) Successful in 1m2s
This commit is contained in:
@@ -402,7 +402,7 @@ YOUTUBE_API_KEY = os.getenv('YOUTUBE_API_KEY', '')
|
||||
# ==========================================
|
||||
# 系統版本與路徑
|
||||
# ==========================================
|
||||
SYSTEM_VERSION = "V10.661"
|
||||
SYSTEM_VERSION = "V10.662"
|
||||
LOG_FILE_PATH = os.path.join(BASE_DIR, 'logs/system.log')
|
||||
public_url = PUBLIC_URL # 用於模板顯示
|
||||
|
||||
|
||||
@@ -738,3 +738,4 @@ POSTGRES_HOST=momo-db
|
||||
| 2026-05-21 | ElephantAlpha NIM/LLM 回應偶爾不是純 JSON,會觸發 `json.loads()` 失敗並落入舊式空泛策略 fallback | V10.383 起協調器容忍 fenced/混文字 JSON;無法解析時改用 DB/Hermes 實證 fallback,且 fallback 不再包含 OpenClaw `generate_*` 舊步驟或自動調價暗示 |
|
||||
| 2026-05-20 | Telegram HTML parse mode 不支援 `<br>`,可能導致告警或報告送出 400 | V10.321 起 Telegram template 發送前會把 `<br>` / `<br/>` / `<BR />` 轉為換行;保留其他 HTML 標籤,非 HTML parse mode 不改寫 |
|
||||
| 2026-05-20 | 部分舊 Telegram 入口繞過中央 sanitizer,且 RAG awaiting review 使用錯誤 `chat_id=` 參數會讓人工審核推播失敗 | V10.322 起 Bot API price decision 走 `send_telegram_with_result()`;`price_decision()` 補 `report_url` 相容並 escape 動態欄位;RAG awaiting review 改用 `chat_ids=[...]` 呼叫 `_send_telegram_raw()` |
|
||||
| 2026-06-25 | UI/UX 不可只修首頁,導覽主入口必須同一套 PChome 業績提升語言 | V10.662 起作戰、分析、營運、AI 助手主入口與廠商缺貨子工具都使用短句對齊「評估、分析、建議、解法、治理」流程;首頁今日行動卡維持 980px 上限與高對比主按鈕,禁止回到全寬長文說明。 |
|
||||
|
||||
@@ -394,6 +394,17 @@
|
||||
.growth-command-alert-action {
|
||||
min-width: 108px;
|
||||
justify-self: end;
|
||||
border-color: #8f442b;
|
||||
background: #8f442b;
|
||||
color: #fff;
|
||||
box-shadow: 0 8px 18px rgba(143, 68, 43, 0.18);
|
||||
}
|
||||
|
||||
.growth-command-alert-action:hover,
|
||||
.growth-command-alert-action:focus {
|
||||
border-color: #743620;
|
||||
background: #743620;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.ai-intel-hero {
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<span class="campaign-promo-id momo-mono">ID · {{ current_promo_page|upper }}</span>
|
||||
</div>
|
||||
<h1 class="campaign-title">{{ page_title }}</h1>
|
||||
<p class="campaign-growth-copy">用活動價格異動找主推、補貨與曝光機會。</p>
|
||||
<div class="campaign-meta-grid momo-mono">
|
||||
<div>
|
||||
<div class="campaign-meta-label">活動時段</div>
|
||||
|
||||
@@ -29,7 +29,10 @@
|
||||
<header class="ga-page-head">
|
||||
<div class="ga-page-head__title">
|
||||
<i class="fas fa-rocket ga-page-head__icon"></i>
|
||||
<h1 class="ga-page-head__h1">營運成長策略報表</h1>
|
||||
<div>
|
||||
<h1 class="ga-page-head__h1">營運成長策略報表</h1>
|
||||
<p class="ga-page-head__brief">用月趨勢評估成長缺口、價差壓力與毛利品質。</p>
|
||||
</div>
|
||||
</div>
|
||||
<span class="ga-page-head__meta">
|
||||
數據更新至 <strong>{{ chart_data.labels[-1] if chart_data.labels else '-' }}</strong>
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
<i class="fas fa-chart-pie" aria-hidden="true"></i>
|
||||
業績分析儀表板
|
||||
</h4>
|
||||
<p class="sa-page-head__brief">用分類、品牌與毛利找出 PChome 成長槓桿。</p>
|
||||
{% if db_data_range %}
|
||||
<span class="sa-tag sa-tag--neutral">
|
||||
<i class="fas fa-calendar-alt" aria-hidden="true"></i>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div>
|
||||
<span class="vendor-tools-kicker"><i class="fas fa-boxes-stacked"></i> Vendor Stockout</span>
|
||||
<h1>發送歷史</h1>
|
||||
<p>保留廠商缺貨通知的操作歷程入口;目前進階查詢、統計圖表與重試機制仍在後續階段。</p>
|
||||
<p>回看缺貨處理紀錄,找出需要補救的供貨風險。</p>
|
||||
</div>
|
||||
<div class="vendor-tools-nav" aria-label="廠商缺貨工具導覽">
|
||||
<a href="/vendor-stockout/" ><i class="fas fa-table-columns"></i>總覽</a>
|
||||
@@ -27,7 +27,7 @@
|
||||
<div class="card-body">
|
||||
<div class="alert alert-info mb-0">
|
||||
<i class="fas fa-circle-info me-2"></i>
|
||||
此頁面功能將在 Phase 6 實作:記錄查詢、統計圖表與重試機制。現階段請先使用「郵件記錄」查看正式發送狀態。
|
||||
現階段請先使用「郵件記錄」確認正式發送狀態。
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
<h1 class="stockout-import-title">Excel 匯入</h1>
|
||||
<p class="stockout-import-subtitle">
|
||||
上傳正式缺貨 Excel 後,系統會使用既有匯入 API 寫入 vendor_stockout,完成後直接回傳批次編號與成功、重複、失敗筆數。
|
||||
補齊缺貨資料,先保住主推商品供貨。
|
||||
</p>
|
||||
<div class="stockout-import-actions is-header">
|
||||
<a class="stockout-action" href="{{ url_for('vendor.index') }}">
|
||||
@@ -44,7 +44,7 @@
|
||||
</span>
|
||||
<span class="stockout-dropzone-title d-block">選擇或拖曳 Excel 檔案</span>
|
||||
<span class="stockout-dropzone-subtitle d-block">
|
||||
支援 .xlsx / .xls。檔案送出後會寫入正式缺貨資料表,請確認內容是可匯入的正式清單。
|
||||
支援 .xlsx / .xls。送出後直接回傳成功、重複與失敗筆數。
|
||||
</span>
|
||||
<span class="stockout-action is-primary stockout-file-picker">
|
||||
<i class="fas fa-folder-open"></i>選擇檔案
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
<h1 class="stockout-title">缺貨清單</h1>
|
||||
<p class="stockout-subtitle">
|
||||
依正式缺貨資料呈現,可用批次、廠商、商品與發送狀態篩選;桌機保留密度,手機改為逐筆資料卡。
|
||||
先看待發送與失敗,避免主推商品斷貨拖累業績。
|
||||
</p>
|
||||
</div>
|
||||
<div class="stockout-actions">
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div>
|
||||
<span class="vendor-tools-kicker"><i class="fas fa-boxes-stacked"></i> Vendor Stockout</span>
|
||||
<h1>郵件發送記錄</h1>
|
||||
<p>追蹤廠商缺貨通知的發送狀態、成功率與錯誤訊息,方便營運快速補救。</p>
|
||||
<p>先處理失敗通知,讓補貨協調不中斷。</p>
|
||||
</div>
|
||||
<div class="vendor-tools-nav" aria-label="廠商缺貨工具導覽">
|
||||
<a href="/vendor-stockout/" ><i class="fas fa-table-columns"></i>總覽</a>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div>
|
||||
<span class="vendor-tools-kicker"><i class="fas fa-boxes-stacked"></i> Vendor Stockout</span>
|
||||
<h1>廠商管理</h1>
|
||||
<p>維護來源供應商、收件信箱與 Excel 匯入,所有異動直接接正式廠商缺貨資料。</p>
|
||||
<p>維護供應商與收件人,讓缺貨補救能快速送達。</p>
|
||||
</div>
|
||||
<div class="vendor-tools-nav" aria-label="廠商缺貨工具導覽">
|
||||
<a href="/vendor-stockout/" ><i class="fas fa-table-columns"></i>總覽</a>
|
||||
|
||||
@@ -584,7 +584,27 @@ def test_primary_pages_use_growth_outcome_copy_instead_of_feature_explaining():
|
||||
"templates/price_comparison.html": "確認同款、判斷價差、決定下一步",
|
||||
"templates/vendor_stockout_index_v2.html": "避免主推商品斷貨",
|
||||
"templates/monthly_summary_analysis.html": "判斷成長、毛利與品類結構",
|
||||
"templates/dashboard_v2.html": "先看業績,再決定調價、曝光與組合",
|
||||
"templates/edm_dashboard_v2.html": "用活動價格異動找主推、補貨與曝光機會",
|
||||
"templates/sales_analysis.html": "用分類、品牌與毛利找出 PChome 成長槓桿",
|
||||
"templates/growth_analysis.html": "用月趨勢評估成長缺口、價差壓力與毛利品質",
|
||||
"templates/vendor_stockout_import_v2.html": "補齊缺貨資料,先保住主推商品供貨",
|
||||
"templates/vendor_stockout_list_v2.html": "先看待發送與失敗,避免主推商品斷貨拖累業績",
|
||||
"templates/vendor_stockout_send_email_v2.html": "先處理失敗通知,讓補貨協調不中斷",
|
||||
"templates/vendor_stockout_vendor_management_v2.html": "維護供應商與收件人,讓缺貨補救能快速送達",
|
||||
"templates/vendor_stockout_history_v2.html": "回看缺貨處理紀錄,找出需要補救的供貨風險",
|
||||
}
|
||||
|
||||
for path, marker in expected.items():
|
||||
assert marker in Path(path).read_text(encoding="utf-8")
|
||||
|
||||
|
||||
def test_homepage_next_action_cta_keeps_visible_primary_contrast():
|
||||
from pathlib import Path
|
||||
|
||||
template = Path("templates/ai_intelligence.html").read_text(encoding="utf-8")
|
||||
|
||||
assert ".growth-command-alert-action" in template
|
||||
assert "background: #8f442b" in template
|
||||
assert "color: #fff" in template
|
||||
assert "width: min(100%, 980px)" in template
|
||||
|
||||
@@ -161,6 +161,16 @@
|
||||
line-height: 1.05;
|
||||
}
|
||||
|
||||
.campaign-growth-copy {
|
||||
max-width: 42ch;
|
||||
margin: -8px 0 0;
|
||||
color: var(--momo-text-secondary);
|
||||
font-size: 0.9rem;
|
||||
font-weight: 760;
|
||||
line-height: 1.45;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
.campaign-meta-grid {
|
||||
display: flex;
|
||||
gap: 24px;
|
||||
@@ -784,6 +794,10 @@
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.campaign-growth-copy {
|
||||
font-size: 0.84rem;
|
||||
}
|
||||
|
||||
.campaign-kpi-grid {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
|
||||
@@ -36,6 +36,15 @@
|
||||
line-height: var(--momo-line-height-tight);
|
||||
letter-spacing: 0;
|
||||
}
|
||||
.growth-analysis-page .ga-page-head__brief {
|
||||
max-width: 52ch;
|
||||
margin: var(--momo-space-1, 4px) 0 0;
|
||||
color: var(--momo-text-secondary);
|
||||
font-size: 0.86rem;
|
||||
font-weight: 760;
|
||||
line-height: 1.45;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
.growth-analysis-page .ga-page-head__meta {
|
||||
flex: 0 0 auto;
|
||||
color: var(--momo-text-secondary);
|
||||
|
||||
@@ -32,6 +32,15 @@
|
||||
gap: 0.6rem;
|
||||
}
|
||||
.sa-page-head__title i { color: var(--momo-page-accent); }
|
||||
.sa-page-head__brief {
|
||||
max-width: 52ch;
|
||||
margin: 0;
|
||||
color: var(--momo-text-secondary);
|
||||
font-size: 0.86rem;
|
||||
font-weight: 760;
|
||||
line-height: 1.45;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
.sa-tag {
|
||||
display: inline-flex;
|
||||
|
||||
Reference in New Issue
Block a user