Фронтенд для сервиса #5

Merged
gorbenko.pavel merged 29 commits from trynode22 into main 2026-07-30 06:11:24 +00:00
2 changed files with 5 additions and 2 deletions
Showing only changes of commit 61c7f7dd71 - Show all commits
@@ -23,7 +23,7 @@
"officeFabricIconFontName": "Page",
"properties": {
"apiBaseUrl": "http://localhost:5080",
"useDevAuth": true,
"useDevAuth": false,
"devUserEmail": "dev@tnsu.kz",
"aadResourceId": "api://9232d9e2-9807-4753-808f-07250e5474b0",
"portalBaseUrl": "https://api.tnsu.kz"
@@ -36,7 +36,10 @@ export default class ApprovalAdminWebPart extends BaseClientSideWebPart<IApprova
protected onInit(): Promise<void> {
this.properties.apiBaseUrl = this.properties.apiBaseUrl || 'http://localhost:5080';
this.properties.useDevAuth = this.properties.useDevAuth ?? true;
// Dev-режим ломает /resolve: наш бэкенд не получает Bearer-токен пользователя
// для пересылки в api.tnsu.kz и падает на собственном client_credentials
// (TnsuPortal:ClientSecret в appsettings.json пуст). По умолчанию — реальный AAD.
this.properties.useDevAuth = this.properties.useDevAuth ?? false;
this.properties.devUserEmail = this.properties.devUserEmail || 'dev@tnsu.kz';
this.properties.aadResourceId = this.properties.aadResourceId || 'api://9232d9e2-9807-4753-808f-07250e5474b0';
this.properties.portalBaseUrl = this.properties.portalBaseUrl || 'https://api.tnsu.kz';