Skip to content

Commit

Permalink
SQL-211 additional refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
milt committed Dec 5, 2023
1 parent 079076c commit 5c79cc8
Showing 1 changed file with 13 additions and 20 deletions.
33 changes: 13 additions & 20 deletions src/com/yetanalytics/lrs_admin_ui/views/reactions.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -436,26 +436,19 @@
or-clauses :or
not-clause :not
:as clause}]
(-> (cond
and-clauses
[render-and
mode reaction-path and-clauses]
or-clauses
[render-or
mode reaction-path or-clauses]
(find clause :not)
[render-not
mode reaction-path not-clause]
:else
[render-logic
mode reaction-path clause])
(cond->
(contains? #{:edit :new} mode)
(conj [delete-icon
:on-click
(fn []
(dispatch
[:reaction/delete-clause reaction-path]))]))))
(cond
and-clauses
[render-and
mode reaction-path and-clauses]
or-clauses
[render-or
mode reaction-path or-clauses]
(find clause :not)
[render-not
mode reaction-path not-clause]
:else
[render-logic
mode reaction-path clause]))

(defn- render-or-edit-condition-name
[mode condition-name]
Expand Down

0 comments on commit 5c79cc8

Please sign in to comment.