From 14bd00230ef07bb566188730dbc6129c44202f57 Mon Sep 17 00:00:00 2001 From: xiaomai Date: Mon, 15 Sep 2025 19:49:20 +0800 Subject: [PATCH] Update seats and sponsors data; enhance index.html and script.js for improved display and sorting --- 20250916/data/seats.json | 5 ++++- 20250916/data/sponsors.json | 11 +++++++++++ 20250916/sponsor-list/index.html | 4 ++-- 20250916/sponsor-list/script.js | 4 ++++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/20250916/data/seats.json b/20250916/data/seats.json index ae0732f..3ee8972 100644 --- a/20250916/data/seats.json +++ b/20250916/data/seats.json @@ -43,5 +43,8 @@ { "name": "永兴石灰", "seat": 1 }, { "name": "winbox", "seat": 1 }, { "name": "南利企业", "seat": 1 }, - { "name": "戴祖发", "seat": 1 } + { "name": "戴祖发", "seat": 1 }, + { "name": "大丰洪顺堂", "seat": 1 }, + { "name": "Jacky", "seat": 1 }, + { "name": "Alvin/Jon/Cola", "seat": 1 } ] diff --git a/20250916/data/sponsors.json b/20250916/data/sponsors.json index c5a1e61..f462daa 100644 --- a/20250916/data/sponsors.json +++ b/20250916/data/sponsors.json @@ -9,11 +9,22 @@ { "name": "联兴气车", "amount": 3500 }, { "name": "程华强", "amount": 3000 }, { "name": "吴厚雄", "amount": 3000 }, + { "name": "汤胜源", "amount": 2000 }, + { "name": "黄强华", "amount": 2000 }, + { "name": "Royal World", "amount": 2000 }, + { "name": "V World 2.0", "amount": 2000 }, { "name": "GoDrive Car Rental SDN BHD", "amount": 1888.88 }, { "name": "江先峰", "amount": 1547 }, { "name": "顺发吊车", "amount": 1000 }, { "name": "白俊雄", "amount": 1000 }, { "name": "裕源生果有限公司", "amount": 1000 }, + { "name": "拿督陈寿金", "amount": 1000 }, + { "name": "覃庆中", "amount": 1000 }, + { "name": "三合成宝号", "amount": 1000 }, + { "name": "李贸易", "amount": 1000 }, + { "name": "福名氏", "amount": 1000 }, + { "name": "袁瑞德", "amount": 1000 }, + { "name": "邬瑞东", "amount": 1000 }, { "name": "福泉风水", "amount": 800 }, { "name": "吴田财", "amount": 547 }, { "name": "许展鸿", "amount": 547 }, diff --git a/20250916/sponsor-list/index.html b/20250916/sponsor-list/index.html index 3e76fd4..ae776b4 100644 --- a/20250916/sponsor-list/index.html +++ b/20250916/sponsor-list/index.html @@ -18,7 +18,7 @@
总金额: RM 0
- +
席位总数: 0
@@ -30,7 +30,7 @@
-

席位赞助

+

席位赞助 (RM2000)

diff --git a/20250916/sponsor-list/script.js b/20250916/sponsor-list/script.js index 748e207..c194c13 100644 --- a/20250916/sponsor-list/script.js +++ b/20250916/sponsor-list/script.js @@ -8,6 +8,10 @@ function initSponsorsAndSeats(sponsors, seats) { const moneyList = document.getElementById("moneyList"); const seatList = document.getElementById("seatList"); + // Sort by amount descending + sponsors.sort((a, b) => parseFloat(b.amount) - parseFloat(a.amount)); + seats.sort((a, b) => parseInt(b.seat) - parseInt(a.seat)); + let totalAmount = 0; sponsors.forEach((s) => { totalAmount += parseFloat(s.amount);