feat: убирает недействующие компании из справочника формы (#3)
build-and-deploy / prepare (push) Successful in 1s
Tests / frontend-test (push) Successful in 12s
build-and-deploy / build-and-push (., Dockerfile, hr-appeals-web) (push) Successful in 14s
build-and-deploy / build-and-push (server, server/Dockerfile, hr-appeals-auth) (push) Successful in 8s
build-and-deploy / deploy (push) Successful in 15s
build-and-deploy / prepare (push) Successful in 1s
Tests / frontend-test (push) Successful in 12s
build-and-deploy / build-and-push (., Dockerfile, hr-appeals-web) (push) Successful in 14s
build-and-deploy / build-and-push (server, server/Dockerfile, hr-appeals-auth) (push) Successful in 8s
build-and-deploy / deploy (push) Successful in 15s
СЛМ (CL MANAGEMENT), Selin Invest, ОСН Беркут, ТехЛаб и Seline Holding Ltd по сути не действуют — фильтруем их по Id при получении справочника компаний из api.tnsu.kz, чтобы они не появлялись в выпадающем списке формы. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Reviewed-on: http://git.tnsu.kz/gorbenko.pavel/hr-appeals/pulls/3
This commit was merged in pull request #3.
This commit is contained in:
+15
-1
@@ -11,6 +11,19 @@ export interface ICompany {
|
||||
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;
|
||||
|
||||
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 };
|
||||
return companies;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user