feat: убирает недействующие компании из справочника формы
Tests / frontend-test (pull_request) Successful in 14s
Tests / frontend-test (pull_request) Successful in 14s
СЛМ (CL MANAGEMENT), Selin Invest, ОСН Беркут, ТехЛаб и Seline Holding Ltd по сути не действуют — фильтруем их по Id при получении справочника компаний из api.tnsu.kz, чтобы они не появлялись в выпадающем списке формы. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+15
-1
@@ -11,6 +11,19 @@ export interface ICompany {
|
|||||||
Name: string;
|
Name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Компании из справочника, которые по сути не действуют и не должны попадать
|
||||||
|
* в форму (просьба HR, 2026-09-09): СЛМ (CL MANAGEMENT), Selin Invest,
|
||||||
|
* ОСН Беркут, ТехЛаб, Seline Holding Ltd.
|
||||||
|
*/
|
||||||
|
const EXCLUDED_COMPANY_IDS = new Set<string>([
|
||||||
|
'9de064a4-44c8-88ef-11ec-831c058b1141', // ТОО CL MANAGEMENT (СЛМ)
|
||||||
|
'15009595-005d-00fa-11ef-11309f5e395d', // ТОО Selin Invest
|
||||||
|
'8028beac-ac23-8fd8-11f0-5351706e5996', // ТОО ОСН Беркут
|
||||||
|
'15009595-005d-00fa-11ef-1131801d9f3e', // ТОО ТехЛаб
|
||||||
|
'03f4deac-f543-e8cf-11f1-84f51483f59e' // Частная компания Seline Holding Ltd
|
||||||
|
]);
|
||||||
|
|
||||||
let cached: { companies: ICompany[]; expiresAt: number } | null = null;
|
let cached: { companies: ICompany[]; expiresAt: number } | null = null;
|
||||||
|
|
||||||
export async function getCompanies(): Promise<ICompany[]> {
|
export async function getCompanies(): Promise<ICompany[]> {
|
||||||
@@ -29,7 +42,8 @@ export async function getCompanies(): Promise<ICompany[]> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const companies = (await response.json()) as ICompany[];
|
const allCompanies = (await response.json()) as ICompany[];
|
||||||
|
const companies = allCompanies.filter((company) => !EXCLUDED_COMPANY_IDS.has(company.Id));
|
||||||
cached = { companies, expiresAt: Date.now() + CACHE_TTL_MS };
|
cached = { companies, expiresAt: Date.now() + CACHE_TTL_MS };
|
||||||
return companies;
|
return companies;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user