Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/inactive subscriptions #112

Merged
merged 19 commits into from
Feb 23, 2024

Conversation

sokratis1988
Copy link
Contributor

This feature enables users to mark a subscription as inactive, catering to those who wish to monitor both active and inactive subscriptions. Inactive subscriptions will be visually distinguished at the bottom of the display through subtle CSS styling. Moreover, these inactive subscriptions will be omitted from the overall statistics. Additionally, when at least one subscription is set to inactive, a new statistical indicator will appear, providing a count of the inactive subscriptions.

Bildschirmfoto 2024-02-12 um 20 03 06 Bildschirmfoto 2024-02-12 um 19 59 00 Bildschirmfoto 2024-02-12 um 20 02 28

@sokratis1988
Copy link
Contributor Author

  • By default, subscriptions are active, which is why the form displays the checkbox as selected to avoid confusion.
  • I have withdrawn the modifications made to createdatabase.php and have adjusted the default value in the database to true, as specified in the migration file 000006.php.
  • endpoints/cronjobs/sendnotifications.php: Disable notifications for inactive subscriptions
  • endpoints/cronjobs/updatenextpayment.php: Ensure only subscriptions that are active will be updated
  • endpoints/subscription/add.php: Update statements and add field activated
  • endpoints/subscription/get.php: Add field activated
  • endpoints/subscriptions/get.php: Add field activated
  • includes/i18n/*.php: Update languages
  • includes/list_subscriptions.php: Add usort to put inactive subscriptions on bottom and update css class based on status to decorate the inactive subscriptions
  • index.php: Add field and checkbox in form with checked state on new creation
  • migrations/000006.php: create migration to update database
  • scripts/dashboard.js: add const for new field activated
  • stats.php: inactive subscriptions will be omitted from the overall statistics; new statistic for inactive subscriptions
  • styles/styles.css: css for inactive subscriptions

migrations/000006.php Outdated Show resolved Hide resolved
Copy link
Owner

@ellite ellite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check the comment I made on the migration.
If I am not being clear, or you don't have the time, I already have a branch with this feature mostly implemented. I can just clean it up and merge it.

Copy link
Owner

@ellite ellite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Just a couple of conflicts to resolve 👍

stats.php Outdated Show resolved Hide resolved
migrations/000006.php Outdated Show resolved Hide resolved
@ellite ellite merged commit 91e53a4 into ellite:main Feb 23, 2024
1 check failed
@ellite
Copy link
Owner

ellite commented Feb 23, 2024

Thank you 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants