first push message

This commit is contained in:
2026-07-01 14:41:49 +07:00
parent 6667dec2bf
commit 58b5f46cc4
2951 changed files with 316619 additions and 0 deletions
+200
View File
@@ -0,0 +1,200 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="party_voters_detail" name="Party Voters Detail">
<t t-call="portal.portal_layout">
<div class="container-fluid mt-4">
<!-- Auto-refresh -->
<meta http-equiv="refresh" content="3600"/>
<!-- Header -->
<div class="row mb-4">
<div class="col-12">
<div class="card bg-success text-white shadow-sm">
<div class="card-body py-3">
<div class="row align-items-center">
<div class="col-md-8">
<h3 class="mb-0 fw-bold">
<i class="fa fa-users me-2"/>
<t t-esc="party_name"/>
</h3>
<small>បញ្ជី្មោះអនកបោះឆនោត</small>
</div>
<div class="col-md-4 text-md-end">
<h4 class="mb-0 fw-bold">
<i class="fa fa-clock me-2"/>
ម៉ោង: <t t-esc="current_dt.strftime('%H:%M')"/>
</h4>
<small>ថ្ងៃ: <t t-esc="current_dt.strftime('%d/%m/%Y')"/></small>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Filters -->
<div class="row mb-4">
<div class="col-12">
<div class="card shadow-sm">
<div class="card-body">
<form method="get" t-attf-action="/my/cpp_entries/party_voters/#{party_key}" class="row g-3">
<div class="col-md-4">
<label class="form-label fw-bold">ស្រុក/ខណ្ឌ</label>
<select name="district_id" class="form-select" onchange="this.form.submit()">
<option value="">-- ទាំងអស់ --</option>
<t t-foreach="districts" t-as="district">
<option t-att-value="district.id" t-att-selected="sel_district == str(district.id)">
<t t-esc="district.location_name"/>
</option>
</t>
</select>
</div>
<div class="col-md-4">
<label class="form-label fw-bold">ឃុំ/សង្កាត់</label>
<select name="commune_id" class="form-select" onchange="this.form.submit()">
<option value="">-- ទាំងអស់ --</option>
<t t-foreach="communes" t-as="commune">
<option t-att-value="commune.id" t-att-selected="sel_commune == str(commune.id)">
<t t-esc="commune.location_name"/>
</option>
</t>
</select>
</div>
<div class="col-md-4 d-flex align-items-end">
<a t-attf-href="/my/cpp_entries/party_voters/#{party_key}" class="btn btn-outline-primary w-100">
<i class="fa fa-refresh me-1"/> រីផ្រេស
</a>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- Statistics Summary -->
<div class="row mb-4">
<div class="col-md-3 mb-3">
<div class="card bg-primary text-white h-100">
<div class="card-body text-center">
<h5>សរុប</h5>
<h2 class="display-4 fw-bold"><t t-esc="total"/></h2>
<small>នាក់</small>
</div>
</div>
</div>
<div class="col-md-3 mb-3">
<div class="card bg-success text-white h-100">
<div class="card-body text-center">
<h5>បានបោះឆ្ោត</h5>
<h2 class="display-4 fw-bold"><t t-esc="voted"/></h2>
<small><t t-esc="'%.1f' % (voted/total*100 if total > 0 else 0)"/>%</small>
</div>
</div>
</div>
<div class="col-md-3 mb-3">
<div class="card bg-info text-white h-100">
<div class="card-body text-center">
<h5>ប្រុស</h5>
<h2 class="display-4 fw-bold"><t t-esc="male"/></h2>
<small>នាក់</small>
</div>
</div>
</div>
<div class="col-md-3 mb-3">
<div class="card bg-danger text-white h-100">
<div class="card-body text-center">
<h5>ស្រី</h5>
<h2 class="display-4 fw-bold"><t t-esc="female"/></h2>
<small>នាក់</small>
</div>
</div>
</div>
</div>
<!-- Voters List Table -->
<div class="row mb-4">
<div class="col-12">
<div class="card shadow-sm">
<div class="card-header bg-primary text-white d-flex justify-content-between align-items-center">
<h5 class="mb-0">
<i class="fa fa-list me-2"/>
បញ្ជីឈ្មោះអ្នកបោះឆ្នោត
</h5>
<span class="badge bg-light text-primary">
<t t-esc="total"/> នាក់
</span>
</div>
<div class="card-body p-0">
<div class="table-responsive">
<table class="table table-bordered table-striped mb-0">
<thead class="table-light">
<tr>
<th class="text-center">ល.រ.</th>
<th>ឈ្មោះ</th>
<th class="text-center">ភេទ</th>
<th>ថ្ងៃខែឆ្នាំកំណើត</th>
<th>លេខទូរស័ព្ទ</th>
<th>ឃុំ/សង្កាត់</th>
<th>ស្រុក/ខណ្ឌ</th>
<th class="text-center">ស្ថានភាព</th>
</tr>
</thead>
<tbody>
<t t-foreach="voters_list" t-as="voter">
<tr>
<td class="text-center"><t t-esc="voter_index + 1"/></td>
<td class="fw-bold"><t t-esc="voter['name']"/></td>
<td class="text-center">
<t t-if="voter['gender'] == 'ប្រុស'">
<span class="badge bg-info"><t t-esc="voter['gender']"/></span>
</t>
<t t-else="">
<span class="badge bg-danger"><t t-esc="voter['gender']"/></span>
</t>
</td>
<td><t t-esc="voter['dob'] or '-'"/></td>
<td><t t-esc="voter['phone'] or ' '"/></td>
<td><t t-esc="voter['commune']"/></td>
<td><t t-esc="voter['district']"/></td>
<td class="text-center">
<t t-if="voter['status_vote']">
<span class="badge bg-success">បានបោះឆ្នោត</span>
</t>
<t t-else="">
<span class="badge bg-warning text-dark">មិនទាន់</span>
</t>
</td>
</tr>
</t>
<t t-if="not voters_list">
<tr>
<td colspan="8" class="text-center text-muted py-4">
<i class="fa fa-info-circle me-2"/>
មិនមានទិន្ននយ
</td>
</tr>
</t>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- Navigation Buttons -->
<div class="row">
<div class="col-12">
<a href="/my/cpp_entries/party_list" class="btn btn-secondary me-2">
<i class="fa fa-arrow-left me-1"/> ត្រឡប់ទៅបញ្ជីគណបក្ស
</a>
<a href="/my/cpp_entries/dashboard" class="btn btn-outline-primary">
<i class="fa fa-chart-line me-1"/> ទៅ Dashboard
</a>
</div>
</div>
</div>
</t>
</template>
</odoo>