mirror of
https://github.com/we-promise/sure.git
synced 2026-04-07 14:31:25 +00:00
fix: Fix layout UI issues for rule creation (#852)
* fix: Fix layout UI issues for rule creation * Update app/views/rule/conditions/_condition.html.erb Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Alessio Cappa <104093777+alessiocappa@users.noreply.github.com> * Update app/views/rule/actions/_action.html.erb Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Alessio Cappa <104093777+alessiocappa@users.noreply.github.com> --------- Signed-off-by: Alessio Cappa <104093777+alessiocappa@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<li data-controller="rule--actions" data-rule--actions-action-executors-value="<%= rule.action_executors.to_json %>" class="flex items-center gap-3">
|
||||
<%= form.hidden_field :_destroy, value: false, data: { rule__actions_target: "destroyField" } %>
|
||||
|
||||
<div class="grow flex gap-2 items-center h-full">
|
||||
<div class="grid grid-cols-1 gap-2 items-center h-full w-full">
|
||||
<div class="grow">
|
||||
<%= form.select :action_type, rule.action_executors.map { |executor| [ executor.label, executor.key ] }, {}, data: { action: "rule--actions#handleActionTypeChange" } %>
|
||||
</div>
|
||||
|
||||
@@ -13,16 +13,16 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="grow flex gap-2 items-center h-full">
|
||||
<div class="grid grid-cols-2 gap-2 items-center h-full">
|
||||
<%= form.hidden_field :_destroy, value: false, data: { rule__conditions_target: "destroyField" } %>
|
||||
|
||||
<div class="w-2/5 shrink-0">
|
||||
<div class="w-full">
|
||||
<%= form.select :condition_type, rule.condition_filters.map { |filter| [ filter.label, filter.key ] }, {}, data: { action: "rule--conditions#handleConditionTypeChange" } %>
|
||||
</div>
|
||||
|
||||
<%= form.select :operator, condition.operators, { container_class: "w-fit min-w-36" }, data: { rule__conditions_target: "operatorSelect", action: "rule--conditions#handleOperatorChange" } %>
|
||||
<%= form.select :operator, condition.operators, { container_class: "w-full" }, data: { rule__conditions_target: "operatorSelect", action: "rule--conditions#handleOperatorChange" } %>
|
||||
|
||||
<div data-rule--conditions-target="filterValue" class="grow">
|
||||
<div data-rule--conditions-target="filterValue" class="col-span-2 w-full">
|
||||
<% if condition.filter.type == "select" %>
|
||||
<%= form.select :value, condition.options, {} %>
|
||||
<% else %>
|
||||
|
||||
Reference in New Issue
Block a user