mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-03 06:59:14 +00:00
Adding FilterPaymentMethods rules to tag rule UI
This commit is contained in:
@@ -26,6 +26,9 @@ angular.module("admin.tagRules").controller "TagRulesCtrl", ($scope, $http, ente
|
||||
when "FilterShippingMethods"
|
||||
newRule.peferred_shipping_method_tags = []
|
||||
newRule.preferred_matched_shipping_methods_visibility = "visible"
|
||||
when "FilterPaymentMethods"
|
||||
newRule.peferred_payment_method_tags = []
|
||||
newRule.preferred_matched_payment_methods_visibility = "visible"
|
||||
when "FilterProducts"
|
||||
newRule.peferred_variant_tags = []
|
||||
newRule.preferred_matched_variants_visibility = "visible"
|
||||
|
||||
@@ -9,6 +9,7 @@ angular.module("admin.tagRules").directive 'newTagRuleDialog', ($compile, $templ
|
||||
# { id: "DiscountOrder", name: 'Apply a discount to orders' }
|
||||
{ id: "FilterProducts", name: 'Show or Hide variants in my shopfront' }
|
||||
{ id: "FilterShippingMethods", name: 'Show or Hide shipping methods at checkout' }
|
||||
{ id: "FilterPaymentMethods", name: 'Show or Hide payment methods at checkout' }
|
||||
]
|
||||
|
||||
scope.ruleType = scope.ruleTypes[0].id
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
angular.module("admin.tagRules").directive "filterPaymentMethods", ->
|
||||
restrict: "E"
|
||||
replace: true
|
||||
templateUrl: "admin/tag_rules/filter_payment_methods.html"
|
||||
Reference in New Issue
Block a user