Skip to content

Commit

Permalink
Add CSV Download button to Data Management page
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinqian00 committed Feb 7, 2025
1 parent 8248bd6 commit c45b8cf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/com/yetanalytics/lrs_admin_ui/language.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
:datamgmt.title {:en-US "DATA MANAGEMENT"}
:datamgmt.delete.title {:en-US "Delete Actor"}
:datamgmt.delete.button {:en-US "DELETE"}
:datamgmt.download.title {:en-US "Download CSV"}
:datamgmt.download.button {:en-US "DOWNLOAD"}

;;Reactions
:reactions.title {:en-us "REACTIONS"}
Expand Down
19 changes: 14 additions & 5 deletions src/com/yetanalytics/lrs_admin_ui/views/data_management.cljs
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
(ns com.yetanalytics.lrs-admin-ui.views.data-management
(:require [re-frame.core :refer [subscribe]]
(:require [re-frame.core :refer [dispatch subscribe]]
[com.yetanalytics.lrs-admin-ui.views.data-management.delete-actor :refer [delete-actor]]))

(defn data-management []
[:div {:class "left-content-wrapper"}
[:h2 {:class "content-title"}
@(subscribe [:lang/get :datamgmt.title])]
[delete-actor]])
[:div {:class "left-content-wrapper"}
;; Delete Actor
[:h2 {:class "content-title"}
@(subscribe [:lang/get :datamgmt.title])]
[delete-actor]
[:div {:class "h-divider"}]
;; Download CSV
[:h4 {:class "content-title"}
@(subscribe [:lang/get :datamgmt.download.title])]
[:input {:type "button",
:class "btn-brand-bold",
:on-click #(dispatch [:notification/notify false "TODO: Implement CSV Download"])
:value @(subscribe [:lang/get :datamgmt.download.button])}]])

0 comments on commit c45b8cf

Please sign in to comment.