ordered models for lessons and units

Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
2026-07-20 04:39:28 +08:00
parent 2c70f4714e
commit 565a32477a
4 changed files with 9 additions and 5 deletions
+3 -1
View File
@@ -57,8 +57,9 @@ async function recomputeParentDurations(lessonId) {
const LESSON_LIST_COMPUTED = [
{
key: "course_count",
label: "Used in courses",
label: "Affiliated",
type: "number",
order: 2, // 1: Title, 2: Affiliated, 3: Course Status — see lessons.mdl.js
literal: `(
SELECT CAST(COUNT(DISTINCT c.course_id) AS INTEGER)
FROM unit_lessons ul
@@ -72,6 +73,7 @@ const LESSON_LIST_COMPUTED = [
key: "course_status",
label: "Course Status",
type: "text",
order: 3, // 1: Title, 2: Affiliated, 3: Course Status — see lessons.mdl.js
filterable: false,
literal: `(
CASE
+1
View File
@@ -87,6 +87,7 @@ const UNIT_LIST_COMPUTED = [
key: "course_status",
label: "Course Status",
type: "text",
order: 3, // 1: Title, 2: Affiliated, 3: Course Status, 4: Subscription, 5: Duration — see units.mdl.js
filterable: false,
literal: `(
CASE