feat: Enhance AutoScore functionality with interval triggers and JSON tree support

- Added support for trigger trees in AutoScoreRule interface.
- Implemented functions to convert query trees to JSON and vice versa.
- Updated IntervalValue to use days, hours, and minutes instead of a single amount and unit.
- Refactored IntervalValueWidget to allow separate input for days, hours, and minutes.
- Added validation to ensure at least one interval trigger is present.
- Enhanced user interface with informative alerts and tooltips for better user experience.
- Updated localization files to include new strings for interval triggers and UI elements.
This commit is contained in:
NanGua-QWQ
2026-04-10 21:09:04 +08:00
parent 3caea0afe5
commit eef6b703f7
13 changed files with 931 additions and 294 deletions
+5
View File
@@ -772,6 +772,7 @@
"addTrigger": "Add Rule",
"addAction": "Add Action",
"whenTriggered": "When the following rules trigger",
"triggerScheduleHint": "Note: whether a rule runs is still scheduled by the interval trigger. Tags, SQL, and AND / OR / NOT only decide which students are matched for that run.",
"triggeredActions": "Actions triggered when rules are met",
"addAutomation": "Add Automation",
"updateAutomation": "Update Automation",
@@ -785,6 +786,7 @@
"fetchFailed": "Failed to get automation",
"unsupportedLogic": "Saving currently supports AND-only conditions. OR / NOT logic is not wired to backend persistence yet",
"triggerRequired": "Please add at least one trigger",
"intervalTriggerRequired": "Please add at least one interval trigger, otherwise the rule will never run automatically",
"actionRequired": "Please add at least one action",
"createSuccess": "Automation created successfully",
"updateSuccess": "Automation updated successfully",
@@ -841,6 +843,9 @@
"intervalUnitMonth": "month(s) later",
"intervalUnitDay": "day(s) later",
"intervalUnitMinute": "minute(s) later",
"intervalPartDay": "Days",
"intervalPartHour": "Hours",
"intervalPartMinute": "Minutes",
"minutesPlaceholder": "Enter minutes",
"minutes": "minutes",
"tagsPlaceholder": "Enter tag name",