From c6af5240d6c7231bc841acc16ef9bf9219728af5 Mon Sep 17 00:00:00 2001 From: Fang Lin Date: Thu, 11 Jul 2024 11:34:14 -0700 Subject: [PATCH] Resolve MUWM-4369 (#3117) Resolve MUWM-4369 --------- Co-authored-by: William Washington --- .../teaching/classlist/photo-list.vue | 64 ++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/myuw_vue/components/teaching/classlist/photo-list.vue b/myuw_vue/components/teaching/classlist/photo-list.vue index c36f5a05c..9e9b29f49 100644 --- a/myuw_vue/components/teaching/classlist/photo-list.vue +++ b/myuw_vue/components/teaching/classlist/photo-list.vue @@ -6,8 +6,19 @@

Grid of Student Photos

+
+ Sort by: +
    -
  1. { + if (a[key] < b[key]) return -1; + if (a[key] > b[key]) return 1; + return 0; + }); + }, + }, + methods: { + setSortKey(key) { + this.sortKey = key; + }, + buttonClass(key) { + return { + 'btn': true, + 'btn-link': true, + 'active': this.sortKey === key, + 'inactive': this.sortKey !== key, + 'disabled': this.sortKey === key, + 'myuw-text-md': true, + 'px-1': true, + 'py-1': true + }; + } + } }; +