| 12345678910111213 |
- // Reuse the operations defaults instead of maintaining a second mobile price list.
- export function legacyAppointmentDefaults(operationsCode) {
- const start=operationsCode.indexOf('const TEACHING_STAGE_DEFAULTS='),end=operationsCode.indexOf('async function teachingCategoryRows(',start);
- if(start<0||end<start)throw Error('缺少旧预约核对所需的默认课时规则');
- return '\nfunction legacyAppointmentSeedRules(){function text(value){return String(value==null?\'\':value).trim();}\n'+operationsCode.slice(start,end)+'\nreturn defaultTeachingRules();}\n';
- }
- // The admin review and automatic preparation use the same grade and conflict rules.
- export function legacyWritingStageSupport(integrityCode) {
- const start=integrityCode.indexOf('function writingSchoolYear('),end=integrityCode.indexOf('async function writingMappingPage(',start);
- if(start<0||end<start)throw Error('缺少旧写作预约的学段核对规则');
- return '\nconst legacyWritingStageAssessment=(()=>{\nfunction text(value){return String(value??"").trim();}\n'+integrityCode.slice(start,end)+'\nreturn writingStageAssessment;\n})();\n';
- }
|