Skip to content

Commit

Permalink
Merge branch 'OY-4309' into MERGE__OK-345__OY-4309
Browse files Browse the repository at this point in the history
  • Loading branch information
marjakari committed Nov 20, 2023
2 parents 2488db4 + 3931b0a commit 643d34f
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/cljs/ataru/virkailija/application/application_review_view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,16 @@
[application-review-note idx])
selected-notes-idx)]])))

(defn- show-processing-states
(defn- show-processing-state
[processing-state-kw]
(not (or (= :processing-state processing-state-kw)
(= :selection-state processing-state-kw))))
(let [opinto-ohjaaja (subscribe [:editor/opinto-ohjaaja?])
toisen-asteen-yhteishaku? @(subscribe [:application/toisen-asteen-yhteishaku-selected?])]
(not
(and
opinto-ohjaaja
toisen-asteen-yhteishaku?
(or (= :processing-state processing-state-kw)
(= :selection-state processing-state-kw))))))

(defn- application-hakukohde-review-input
[label kw states]
Expand All @@ -288,7 +294,7 @@
@current-hakukohteet)))
multiple-values? (< 1 (count review-states-for-hakukohteet))
review-state-for-current (when-not multiple-values? (first review-states-for-hakukohteet))]
(when (show-processing-states kw)
(when (show-processing-state kw)
[:div.application-handling__review-state-container
{:class (str "application-handling__review-state-container-" (name kw))}
(when @settings-visible?
Expand Down Expand Up @@ -1005,6 +1011,7 @@
(group-by (comp :key first)))
lang (subscribe [:application/lang])
edit-rights-for-hakukohteet? @(subscribe [:application/edit-rights-for-selected-hakukohteet?])
opinto-ohjaaja (subscribe [:editor/opinto-ohjaaja?])
toisen-asteen-yhteishaku? @(subscribe [:application/toisen-asteen-yhteishaku-selected?])
show-attachment-review? @(subscribe [:state-query [:application :show-attachment-reviews?]])]
[:div.application-handling__review-outer
Expand All @@ -1029,7 +1036,8 @@
[application-hakukohde-selection]
(when (not-empty selected-review-hakukohde)
;; 2. asteen yhteishaussa piilotetaan käsittely jos valittuna hakukohde johon ei oikeuksia
(if (and (not edit-rights-for-hakukohteet?)
(if (and (not (or edit-rights-for-hakukohteet?
@opinto-ohjaaja))
toisen-asteen-yhteishaku?)
[:div.application-handling__review-row
[:span.hakukohde-review-rights-alert
Expand Down

0 comments on commit 643d34f

Please sign in to comment.