-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add a button in admin settings to enable/disable validation of organizer billing #504
base: development
Are you sure you want to change the base?
Add a button in admin settings to enable/disable validation of organizer billing #504
Conversation
Reviewer's Guide by SourceryThis pull request introduces a new toggle button in the admin settings to enable or disable the validation of organizer billing information. When enabled, organizers are required to provide valid billing information. Disabling the toggle removes this requirement. Sequence diagram for toggling billing validationsequenceDiagram
actor Admin
participant UI
participant ToggleBillingValidationView
participant GlobalSettings
Admin->>UI: Access billing validation settings
UI->>ToggleBillingValidationView: GET request
ToggleBillingValidationView->>GlobalSettings: Get billing_validation setting
GlobalSettings-->>ToggleBillingValidationView: Return current state
ToggleBillingValidationView-->>UI: Display toggle button
UI-->>Admin: Show current validation state
Admin->>UI: Click toggle button
UI->>ToggleBillingValidationView: POST request with new state
ToggleBillingValidationView->>GlobalSettings: Update billing_validation setting
ToggleBillingValidationView-->>UI: Redirect to success URL
UI-->>Admin: Show updated state
Class diagram for billing validation implementationclassDiagram
class ToggleBillingValidationView {
+ValidState: StrEnum
-gs: GlobalSettingsObject
+get_context_data()
+post(request)
+get_success_url()
}
class ValidState {
<<enumeration>>
DISABLED
ENABLED
}
class Event {
+live_issues()
}
class GlobalSettingsObject {
+settings
}
ToggleBillingValidationView --> GlobalSettingsObject
ToggleBillingValidationView --> ValidState
Event --> GlobalSettingsObject
note for ToggleBillingValidationView "Handles billing validation toggle"
note for Event "Modified to check billing validation setting"
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @HungNgien - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider consolidating the default value handling for billing_validation - it's currently set in both ToggleBillingValidationView.get_context_data() and implicitly in Event.live_issues(). This could lead to maintenance issues if the defaults get out of sync.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the URL from /control/admin/global/toggle_billing_validation/ to /control/admin/global/billing_validation/
…en/eventyay-tickets into admin_publish_validation
Button in admin panels
When validation is enabled
When validation is disabled
This PR resolves #486
Summary by Sourcery
New Features: