mirror of
https://github.com/we-promise/sure.git
synced 2026-04-20 04:24:06 +00:00
Fix subconditions and condition group form (#2256)
This commit is contained in:
committed by
GitHub
parent
e569ad0a8c
commit
1b4577e21e
@@ -28,13 +28,13 @@
|
||||
|
||||
<%# Sub-condition template, used by Stimulus controller to add new sub-conditions dynamically %>
|
||||
<template data-rule--conditions-target="subConditionTemplate">
|
||||
<%= form.fields_for :sub_conditions, Rule::Condition.new(parent: condition, condition_type: rule.condition_filters.first.key), child_index: "IDX_PLACEHOLDER" do |scf| %>
|
||||
<%= form.fields_for :sub_conditions, Rule::Condition.new(parent: condition, condition_type: rule.condition_filters.first.key), child_index: "IDX_CHILD_PLACEHOLDER" do |scf| %>
|
||||
<%= render "rule/conditions/condition", form: scf, show_prefix: false %>
|
||||
<% end %>
|
||||
</template>
|
||||
|
||||
<ul data-rule--conditions-target="subConditionsList" class="space-y-3">
|
||||
<%= form.fields_for :sub_conditions do |scf| %>
|
||||
<%= form.fields_for :sub_conditions, condition.sub_conditions.select(&:persisted?) do |scf| %>
|
||||
<%= render "rule/conditions/condition", form: scf, show_prefix: false %>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user