feat(training): 培训模块改造!
This commit is contained in:
1 parent
57652ae581
commit
5f713f2c0c
11 files changed
+226
-51
No files matched your search
@@ -242,7 +242,7 @@ const saveType = async () => {
|
||||
'新人培训': 'onboarding',
|
||||
'安全培训': 'safety',
|
||||
} as Record<string, string>)[rawType] || rawType.toLowerCase();
|
||||
if (!['onboarding', 'safety'].includes(typeForm.value.training_type) || !typeForm.value.name.trim()) {
|
||||
if (!/^[a-z][a-z0-9_-]*$/.test(typeForm.value.training_type) || !typeForm.value.name.trim()) {
|
||||
msg.warning(t('admin.trainingConfig.messages.typeRequired'));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user