Files
openfoodnetwork/app/components/webhook_endpoint_form_component.rb
Gaetan Craig-Riou 4073238654 Per review, fix test webhook
- only show button for payment status changed webhook
- update translation
2025-12-10 10:28:12 +11:00

17 lines
335 B
Ruby

# frozen_string_literal: true
class WebhookEndpointFormComponent < ViewComponent::Base
def initialize(webhooks:, webhook_type:)
@webhooks = webhooks
@webhook_type = webhook_type
end
private
attr_reader :webhooks, :webhook_type
def is_webhook_payment_status?
webhook_type == "payment_status_changed"
end
end