chore(observability): clarify quick review completion copy
All checks were successful
CD Pipeline / deploy (push) Successful in 1m4s

This commit is contained in:
OoO
2026-05-06 19:49:28 +08:00
parent dc7fe371bd
commit 308efdce25
23 changed files with 863 additions and 341 deletions

View File

@@ -194,11 +194,37 @@
<span class="momo-nav-label">活動看板</span>
<span class="momo-nav-code momo-mono">02</span>
</a>
<a class="momo-nav-link {% if _active_page in ['sales', 'daily_sales', 'monthly', 'growth'] %}is-active{% endif %}" href="/sales_analysis">
<span class="momo-nav-icon"><i class="fas fa-chart-line"></i></span>
<span class="momo-nav-label">分析報表</span>
<span class="momo-nav-code momo-mono">03</span>
</a>
<details class="momo-nav-tree" {% if _active_page in ['sales', 'daily_sales', 'monthly', 'growth'] %}open{% endif %}>
<summary class="momo-nav-link momo-nav-tree-summary {% if _active_page in ['sales', 'daily_sales', 'monthly', 'growth'] %}is-active{% endif %}">
<span class="momo-nav-icon"><i class="fas fa-chart-line"></i></span>
<span class="momo-nav-label">分析報表</span>
<span class="momo-nav-code momo-mono">03</span>
</summary>
<div class="momo-nav-subtree">
<a class="momo-nav-sublink {% if _active_page == 'sales' %}is-active{% endif %}" href="/sales_analysis">
<i class="fas fa-chart-bar"></i><span>業績分析</span><span class="momo-nav-code momo-mono">01</span>
</a>
<a class="momo-nav-sublink {% if _active_page == 'daily_sales' %}is-active{% endif %}" href="/daily_sales">
<i class="fas fa-calendar-day"></i><span>當日業績</span><span class="momo-nav-code momo-mono">02</span>
</a>
<a class="momo-nav-sublink {% if _active_page == 'growth' %}is-active{% endif %}" href="/growth_analysis">
<i class="fas fa-chart-line"></i><span>成長分析</span><span class="momo-nav-code momo-mono">03</span>
</a>
<a class="momo-nav-sublink {% if _active_page == 'monthly' %}is-active{% endif %}" href="/monthly_summary_analysis">
<i class="fas fa-table"></i><span>月份總表</span><span class="momo-nav-code momo-mono">04</span>
</a>
{% if metabase_url %}
<a class="momo-nav-sublink" href="{{ metabase_url }}" target="_blank" rel="noopener">
<i class="fas fa-chart-pie"></i><span>Metabase</span><span class="momo-nav-code momo-mono"><i class="fas fa-up-right-from-square"></i></span>
</a>
{% endif %}
{% if grist_url %}
<a class="momo-nav-sublink" href="{{ grist_url }}" target="_blank" rel="noopener">
<i class="fas fa-table"></i><span>Grist</span><span class="momo-nav-code momo-mono"><i class="fas fa-up-right-from-square"></i></span>
</a>
{% endif %}
</div>
</details>
</div>
<div class="momo-nav-group">

View File

@@ -846,6 +846,7 @@
}
}
</style>
<link rel="stylesheet" href="{{ url_for('static', filename='css/analysis-workbench.css') }}?v={{ system_version|default('v2') }}">
{% endblock %}
{% block ewooo_content %}
@@ -875,6 +876,8 @@
</div>
</section>
{% include 'components/_analysis_report_tabs.html' %}
<!-- Calendar View -->
{% if calendar_data %}
<div class="calendar-container">
@@ -1303,8 +1306,11 @@
</div>
{% endif %}
</div>
{% endblock %}
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
{% block extra_js %}
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.9.1/dist/chart.min.js"></script>
<script src="{{ url_for('static', filename='js/analysis-chart-theme.js') }}?v={{ system_version|default('v2') }}"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.11.5/js/dataTables.bootstrap5.min.js"></script>
@@ -1872,6 +1878,4 @@
}
{% endif %}
</script>
</body>
</html>
{% endblock %}

View File

@@ -1,3 +1,11 @@
{% set _path_active_page = (
'sales' if request.path == '/sales_analysis' else
'daily_sales' if request.path == '/daily_sales' else
'growth' if request.path == '/growth_analysis' else
'monthly' if request.path == '/monthly_summary_analysis' else
''
) if request is defined else '' %}
{% set active_page = active_page|default(_path_active_page, true) %}
<!DOCTYPE html>
<html lang="zh-TW">
<head>
@@ -5,6 +13,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{% block title %}EwoooC{% endblock %}</title>
<link rel="icon" type="image/svg+xml" href="{{ url_for('static', filename='images/logo_circle.svg') }}">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>

View File

@@ -1,13 +1,7 @@
<!-- cspell:ignore MOMO -->
<!DOCTYPE html>
<html lang="zh-TW">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>營運成長報表 - MOMO 監控系統</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.9.1/dist/chart.min.js"></script>
{% extends 'ewoooc_base.html' %}
{% block title %}營運成長報表 - WOOO TECH{% endblock %}
{% block extra_css %}
<style>
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background-color: #f4f6f9; }
.navbar { box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
@@ -23,15 +17,22 @@
.trend-up { color: #2ecc71; }
.trend-down { color: #e74c3c; }
</style>
</head>
<body class="bg-body-tertiary">
{% include 'components/_navbar.html' %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/analysis-workbench.css') }}?v={{ system_version|default('v2') }}">
{% endblock %}
<div class="container-fluid px-4">
<div class="d-flex justify-content-between align-items-center mb-4 mt-4">
<h4 class="mb-0 fw-bold text-dark"><i class="fas fa-rocket me-2 text-success"></i>營運成長策略報表</h4>
<span class="text-muted small">數據更新至: {{ chart_data.labels[-1] if chart_data.labels else '-' }}</span>
</div>
{% block ewooo_content %}
<div class="analysis-workbench growth-analysis-page">
<section class="analysis-page-hero">
<div>
<h1 class="analysis-page-title"><i class="fas fa-rocket"></i>營運成長策略報表</h1>
<p class="text-muted mb-0 mt-2">觀察年累計業績、客單價、訂單數與毛利率趨勢。</p>
</div>
<div class="analysis-page-meta">
<span class="badge bg-secondary"><i class="fas fa-clock me-1"></i>數據更新至 {{ chart_data.labels[-1] if chart_data.labels else '-' }}</span>
</div>
</section>
{% include 'components/_analysis_report_tabs.html' %}
<!-- KPI Cards -->
<div class="row mb-4">
@@ -134,9 +135,12 @@
</div>
</div>
</div>
{% endblock %}
{% block extra_js %}
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.9.1/dist/chart.min.js"></script>
<script src="{{ url_for('static', filename='js/analysis-chart-theme.js') }}?v={{ system_version|default('v2') }}"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<!-- Data Injection -->
<script id="chart-data" type="application/json">
{{ chart_data | tojson }}
@@ -246,5 +250,4 @@
}
});
</script>
</body>
</html>
{% endblock %}

View File

@@ -159,6 +159,7 @@
}
}
</style>
<link rel="stylesheet" href="{{ url_for('static', filename='css/analysis-workbench.css') }}?v={{ system_version|default('v2') }}">
{% endblock %}
{% block ewooo_content %}
@@ -178,6 +179,8 @@
</div>
</section>
{% include 'components/_analysis_report_tabs.html' %}
<!-- ═══════ 進階篩選器 (對標業績分析) ═══════ -->
<div class="filter-section">
<div class="row g-3">
@@ -574,6 +577,7 @@
<script src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.11.5/js/dataTables.bootstrap5.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3/dist/echarts.min.js"></script>
<script src="{{ url_for('static', filename='js/analysis-chart-theme.js') }}?v={{ system_version|default('v2') }}"></script>
<script>
let table;
let compareChart = echarts.init(document.getElementById('compareChart'));

View File

@@ -1,16 +1,10 @@
<!-- cspell:ignore MOMO datatables Treemap -->
<!DOCTYPE html>
<html lang="zh-TW">
{% extends 'ewoooc_base.html' %}
{% block title %}業績分析 - WOOO TECH{% endblock %}
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% block extra_css %}
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<title>業績分析 - WOOO TECH</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<!-- DataTables CSS -->
<link rel="stylesheet" href="https://cdn.datatables.net/1.11.5/css/dataTables.bootstrap5.min.css">
<!-- V-New: Flatpickr 日期選擇器 CSS -->
@@ -18,6 +12,7 @@
<!-- V-Fix: 使用 Chart.js v3.9.1 以確保與 Treemap v2.0.2 相容 -->
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.9.1/dist/chart.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chartjs-chart-treemap@2.0.2/dist/chartjs-chart-treemap.min.js"></script>
<script src="{{ url_for('static', filename='js/analysis-chart-theme.js') }}?v={{ system_version|default('v2') }}"></script>
<style>
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
@@ -563,10 +558,10 @@
color: rgba(255, 255, 255, 0.75);
}
</style>
</head>
<link rel="stylesheet" href="{{ url_for('static', filename='css/analysis-workbench.css') }}?v={{ system_version|default('v2') }}">
{% endblock %}
<body class="bg-body-tertiary">
{% include 'components/_navbar.html' %}
{% block ewooo_content %}
<!-- Loading Overlay -->
<div id="loadingOverlay">
@@ -607,17 +602,18 @@
</div>
</div>
<div class="container-fluid px-4">
<div class="d-flex justify-content-between align-items-center mb-4 mt-4">
<div class="d-flex align-items-center gap-3">
<h4 class="mb-0 fw-bold text-dark"><i class="fas fa-chart-pie me-2 text-primary"></i>業績分析儀表板</h4>
<div class="analysis-workbench sales-analysis-page">
<section class="analysis-page-hero">
<div>
<h1 class="analysis-page-title"><i class="fas fa-chart-pie"></i>業績分析儀表板</h1>
<p class="text-muted mb-0 mt-2">檢視即時業績、分類、品牌、廠商與行銷活動貢獻。</p>
{% if db_data_range %}
<span class="badge bg-secondary" style="font-size: 0.85rem; font-weight: normal;">
<span class="badge bg-secondary mt-2" style="font-size: 0.85rem; font-weight: normal;">
<i class="fas fa-calendar-alt me-1"></i>資料期間: {{ db_data_range }}
</span>
{% endif %}
</div>
<div class="text-end">
<div class="analysis-page-meta">
{% if not no_filter %}
<span class="badge bg-success">
<i class="fas fa-database me-1"></i>
@@ -636,7 +632,9 @@
</span>
{% endif %}
</div>
</div>
</section>
{% include 'components/_analysis_report_tabs.html' %}
{% if error %}
<div class="alert alert-warning">
@@ -1180,8 +1178,7 @@
</div>
</div>
<div class="col-md-2">
<div class="card kpi-card bg-success text-white h-100 shadow-sm"
style="background-color: #20c997 !important;">
<div class="card kpi-card bg-success text-white h-100 shadow-sm">
<div class="card-body p-3">
<div class="kpi-label text-white-50">毛利率 (%)</div>
<div class="kpi-value">{{ "{:.1f}%".format(kpi.gross_margin_rate) }}</div>
@@ -1960,6 +1957,7 @@
const cols = salesData.cols;
const selectedMetric = salesData.selectedMetric;
if (document.getElementById('barChart')) {
// 1. 橫向長條圖 (Horizontal Bar Chart) - 更易讀
const ctxBar = document.getElementById('barChart').getContext('2d');
new Chart(ctxBar, {
@@ -2620,6 +2618,7 @@
}
}
});
}
// 3. 初始化 DataTables (分頁、搜尋、排序)
$(document).ready(function () {
@@ -3160,7 +3159,4 @@
});
</script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
{% endblock %}