{{ course['class_time'] }}
- {{ $store.getters.extra(`${course['course_id']}-${course['teacher_id']}`).number }}/{{
- $store.getters.extra(`${course['course_id']}-${course['teacher_id']}`).capacity }}人
+ {{ $store.getters.extra(`${course['course_id']}-${course['teacher_id']}`).number }} / {{
+ $store.getters.extra(`${course['course_id']}-${course['teacher_id']}`).capacity }} 人
{{ course['campus'] }}
{{ $store.getters.extra(`${course['course_id']}-${course['teacher_id']}`).venue }}
+
+ {{ getCourseProperty(course['course_id']) }}
+
+ {{ getLessonCollegeOrMajor(course['course_id'], "major") }}
+
+ {{ getLessonCollegeOrMajor(course['course_id'], "college") }}
import {conflictSolvingMixin} from '../../../../mixins/common/conflictsSolver';
import {LookupPanelMixin} from '../../../../mixins/LookupPanel';
+import { GetCoursePropertyMixin } from '../../../../mixins/common/getCourseProperty';
import LookupConditions from './LookupConditions';
@@ -148,7 +155,7 @@ export default {
components: {
LookupConditions,
},
- mixins: [conflictSolvingMixin, LookupPanelMixin],
+ mixins: [conflictSolvingMixin, LookupPanelMixin, GetCoursePropertyMixin],
data() {
return {
pagination: {
diff --git a/src/pages/m/components/ReservedClassesList/CourseMeta.vue b/src/pages/m/components/ReservedClassesList/CourseMeta.vue
index 49586d3..4c05f6f 100644
--- a/src/pages/m/components/ReservedClassesList/CourseMeta.vue
+++ b/src/pages/m/components/ReservedClassesList/CourseMeta.vue
@@ -2,7 +2,7 @@
{{ course.courseName }}{{ ' ' }}
-
({{ id }})
+
{{ id }}{{ expanded ? ` ${getCourseInfo(id)}` : `` }}
@@ -21,6 +21,14 @@
{{ course.classes[selectedClassKey].classTime }}
+
+ {{ getCourseProperty(id) }}
+
+
+
+ {{ getCourseInfo(id, false) }}
+
+
{{ course.classes[selectedClassKey].campus }}
@@ -52,6 +60,7 @@
diff --git a/src/pages/m/components/ScheduleTable/ClassCard.vue b/src/pages/m/components/ScheduleTable/ClassCard.vue
index 15df8f5..43b3205 100644
--- a/src/pages/m/components/ScheduleTable/ClassCard.vue
+++ b/src/pages/m/components/ScheduleTable/ClassCard.vue
@@ -32,7 +32,7 @@
default: false,
},
theme: {
- type: Number,
+ type: String,
}
},
mixins: [ClassCardMixin],
diff --git a/src/workers/filter.js b/src/workers/filter.js
index 39dbf16..051e836 100644
--- a/src/workers/filter.js
+++ b/src/workers/filter.js
@@ -2,7 +2,7 @@ import registerPromiseWorker from 'promise-worker/register';
import { getPeriods } from '../utils';
-function concatRegExp(parts) {
+function concatRegExp (parts) {
parts.forEach((part, index) => {
parts[index] = part.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
});
@@ -112,7 +112,13 @@ registerPromiseWorker(function (message) {
let conditionsRegExp = {};
for (let condition in message.conditions.search) {
if (message.conditions.search.hasOwnProperty(condition)) {
- if (message.conditions.regexpMode) {
+ if (condition.startsWith('class_sort')) {
+ if (JSON.parse(message.conditions.search[condition]).name !== '') {
+ // eslint-disable-next-line no-console
+ console.log('adding condition', condition, JSON.parse(message.conditions.search[condition]).name, JSON.parse(message.conditions.search[condition]).regex);
+ conditionsRegExp[condition] = new RegExp(JSON.parse(message.conditions.search[condition]).regex.slice(1, -1));
+ }
+ } else if (message.conditions.regexpMode) {
try {
conditionsRegExp[condition] = new RegExp(message.conditions.search[condition], 'i');
} catch (e) {
@@ -135,7 +141,11 @@ registerPromiseWorker(function (message) {
}
for (let condition in conditionsRegExp) {
if (conditionsRegExp.hasOwnProperty(condition)) {
- if (!conditionsRegExp[condition].test(row[condition])) {
+ if (condition.startsWith('class_sort')) {
+ if (conditionsRegExp[condition] && !conditionsRegExp[condition].test(row['course_id'])) {
+ return;
+ }
+ } else if (!conditionsRegExp[condition].test(row[condition])) {
return;
}
}
diff --git a/yarn.lock b/yarn.lock
index a33bc0b..8905cd2 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -11573,6 +11573,13 @@ __metadata:
languageName: node
linkType: hard
+"shu-course-number-parser@npm:^0.2.0":
+ version: 0.2.0
+ resolution: "shu-course-number-parser@npm:0.2.0"
+ checksum: 95dde18c822ceafee92eff8d48bd74fb8778d31b292584a983e0581dfe2b0aec126f889e9704bf1cb1bf1dff7cdf74ff3e93c63a360c4a58fff6bf833e08ac96
+ languageName: node
+ linkType: hard
+
"shu-scheduling-helper-frontend@workspace:.":
version: 0.0.0-use.local
resolution: "shu-scheduling-helper-frontend@workspace:."
@@ -11599,6 +11606,7 @@ __metadata:
murmurhash-js: ^1.0.0
pako: ^1.0.11
promise-worker: ^2.0.1
+ shu-course-number-parser: ^0.2.0
v-viewer: ~1.7.0
vue: ^2.7.14
vue-cli-plugin-ant-design: ^1.0.1
@@ -12654,11 +12662,11 @@ __metadata:
"typescript@patch:typescript@^4.6.4#~builtin":
version: 4.9.5
- resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76"
+ resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=289587"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
- checksum: ab417a2f398380c90a6cf5a5f74badd17866adf57f1165617d6a551f059c3ba0a3e4da0d147b3ac5681db9ac76a303c5876394b13b3de75fdd5b1eaa06181c9d
+ checksum: 1f8f3b6aaea19f0f67cba79057674ba580438a7db55057eb89cc06950483c5d632115c14077f6663ea76fd09fce3c190e6414bb98582ec80aa5a4eaf345d5b68
languageName: node
linkType: hard