mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-12 03:50:22 +00:00
Adding FilterProducts 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 "FilterProducts"
|
||||
newRule.peferred_variant_tags = []
|
||||
newRule.preferred_matched_variants_visibility = "visible"
|
||||
tagGroup.rules.push(newRule)
|
||||
updateRuleCounts()
|
||||
|
||||
|
||||
@@ -7,10 +7,11 @@ angular.module("admin.tagRules").directive 'newTagRuleDialog', ($compile, $templ
|
||||
|
||||
scope.ruleTypes = [
|
||||
# { id: "DiscountOrder", name: 'Apply a discount to orders' }
|
||||
{ id: "FilterShippingMethods", name: 'Show/Hide shipping methods' }
|
||||
{ id: "FilterProducts", name: 'Show or Hide variants in my shopfront' }
|
||||
{ id: "FilterShippingMethods", name: 'Show or Hide shipping methods at checkout' }
|
||||
]
|
||||
|
||||
scope.ruleType = "DiscountOrder"
|
||||
scope.ruleType = scope.ruleTypes[0].id
|
||||
|
||||
# Set Dialog options
|
||||
template.dialog
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
angular.module("admin.tagRules").directive "filterProducts", ->
|
||||
restrict: "E"
|
||||
replace: true
|
||||
templateUrl: "admin/tag_rules/filter_products.html"
|
||||
Reference in New Issue
Block a user