Commit Graph

12 Commits

Author SHA1 Message Date
652107d0ee migrate with countries_states_cities_db 2025-02-08 17:42:50 +08:00
1286eff996 fix: update view count display in Ahoy Dashboard
Some checks are pending
CI / scan_ruby (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
Docker / docker (push) Waiting to run
- Change column header from '访问(日/周/年)' to '访问(DWMY)' to reflect
  updated metrics.
- Adjust metrics to include monthly view count alongside daily,
  weekly, and yearly counts.

This modification improves clarity by explicitly indicating the
metrics being displayed in the dashboard, thereby aiding users in
understanding the data better.
2025-02-07 17:42:17 +08:00
9ee8ed0d10 feat: enhance view count method for city
- Update view_count method to accept different time periods
- Modify ahoy_dashboard to display views per day, week, and year

These changes provide a more granular view of city visits, allowing for
better analytics and insights on user engagement over time.
2025-02-07 17:32:49 +08:00
9865c18d32 feat: add additional columns to city dashboards
Some checks are pending
Docker / docker (push) Waiting to run
- Add '图像个数' column to show the count of weather arts.
- Add '最后更新时间' column to display the last weather fetch time.

These additions enhance the information displayed in the Ahoy Dashboard and
Cities admin panel, providing more context for each city.
2025-02-07 16:41:23 +08:00
e6550aa86f feat: add active and inactive city counts to dashboard
- Add display of activated and non-activated city counts
- Introduce a new scope for inactive cities in City model
- Update Ahoy Dashboard to show the total count of both active and inactive cities

This update provides better insights into city activation status within the
Ahoy Dashboard. It introduces a new function in the City model and updates
the dashboard to reflect these statistics, assisting in better monitoring
of city status.
2025-02-07 13:11:42 +08:00
4dca074c6d feat: enhance Ahoy dashboard city listings
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
Docker / docker (push) Has been cancelled
- Add ID column to least popular active cities table
- Improve region display in cities table
- Remove commented-out code section for cleaner view

This update enhances the Ahoy dashboard by providing more
information in the cities listing, specifically the ID
of each city and a clearer representation of the region
it belongs to. Additionally, it removes outdated code to
improve maintainability.
2025-02-05 15:12:29 +08:00
ba8957e444 refactor: simplify city table queries
- Removed the limit on City queries in the Ahoy Dashboard
- Updated table_for calls for least popular active and most popular inactive cities to fetch all records instead of limiting to 10

This change allows the dashboard to display all relevant cities without
artificial limits, providing a more comprehensive overview of city
activity. The previous limitations may have hidden important data for
analysis and reporting purposes.
2025-02-05 14:57:08 +08:00
a60f1bfe38 feat: enhance city status management in dashboard
- Change table to display cities based on popularity
- Modify button logic to toggle between "停用" (disable) and "激活" (activate) based on current city status

This update improves the usability of the Ahoy Dashboard by providing
clearer management options for city statuses. Users can now easily
activate or deactivate cities from the dashboard, enhancing overall
administrative efficiency.
2025-02-05 14:39:43 +08:00
76a8275af6 feat: add city ranking panel to dashboard
- Implement a new panel in the Ahoy Dashboard
- Display least popular active cities along with their visit counts
- Include action buttons to toggle city statuses with confirmations

This addition enhances the admin dashboard by providing insights into
city rankings based on user visits. It allows administrators to
manage city statuses directly from the dashboard, improving usability
and functionality.
2025-02-05 14:18:59 +08:00
62bfe8888e feat: add toggle city status action
Some checks are pending
Docker / docker (push) Waiting to run
- Implement city status toggle functionality in the Ahoy Dashboard
- Add buttons for activating and deactivating cities
- Update the UI to show the current status of cities

This commit enhances the admin dashboard by allowing
administrators to toggle the activation status of cities.
The buttons provide confirmation prompts before executing
state changes, improving user experience and preventing
accidental actions.
2025-01-28 02:12:09 +08:00
f0f94de528 feat: refactor code organization and query complexity
- Simplify query for most popular inactive cities in City model
    - Minor layout changes in Admin Dashboards for Ahoy and Sidekiq tasks

    This refactoring improves code organization, reducing complexity in the City model and making it easier to read. Additionally, the Admin dashboard layouts have been simplified for a better user experience.
2025-01-28 01:44:07 +08:00
069b6d4a4f feat: add ahoy dashboard and city statistics
- Introduce a new admin dashboard for viewing Ahoy statistics.
- Display total visits, event counts, and unique visitors.
- List most popular and least popular active cities with their visit counts.
- Add a panel for recent events.
- Modify existing dashboard to include a section for inactive cities.

This commit introduces a comprehensive dashboard that helps
admin users monitor the traffic and engagement statistics of
various cities. The changes include functionality to show
active and inactive cities based on their popularity,
allowing for better insights into user engagement across
the application.
2025-01-28 01:43:59 +08:00