add clear cache to edu programs, fix relationships bugs

This commit is contained in:
F4ilji
2025-04-07 20:37:22 +05:00
parent 41b4642c9b
commit bf21022eda
11 changed files with 143 additions and 23 deletions
+21
View File
@@ -0,0 +1,21 @@
class EducationForm {
static BUDGET_QUANTITY_POSITION = { value: 1, label: 'Бюджетные места', color: 'info', name: 'BUDGET_QUANTITY_POSITION' };
static NON_BUDGET_QUANTITY_POSITION = { value: 2, label: 'С оплатой обучения', color: 'primary', name: 'NON_BUDGET_QUANTITY_POSITION' };
// Метод для получения статуса по имени
static fromName(name) {
return this[name] || null;
}
static fromValue(value) {
return Object.values(this).find(item => item.value == value) || null;
}
// Метод для получения имени
getName() {
return this.name;
}
}
export default EducationForm;
+1 -1
View File
@@ -9,7 +9,7 @@ class EducationForm {
}
static fromValue(value) {
return Object.values(this).find(item => item.value === value) || null;
return Object.values(this).find(item => item.value == value) || null;
}