Improve the frontend and fix TODOs

This commit is contained in:
Urtzi Alfaro
2025-10-24 13:05:04 +02:00
parent 07c33fa578
commit 61376b7a9f
100 changed files with 8284 additions and 3419 deletions

View File

@@ -405,6 +405,25 @@ export class ProductionService {
return apiClient.get(url);
}
// ===================================================================
// OPERATIONS: Scheduler
// ===================================================================
/**
* Trigger production scheduler manually (for testing/development)
* POST /tenants/{tenant_id}/production/operations/scheduler/trigger
*/
static async triggerProductionScheduler(tenantId: string): Promise<{
success: boolean;
message: string;
tenant_id: string
}> {
return apiClient.post(
`/tenants/${tenantId}/production/operations/scheduler/trigger`,
{}
);
}
}
export const productionService = new ProductionService();

View File

@@ -21,6 +21,7 @@ import {
TenantStatistics,
TenantSearchParams,
TenantNearbyParams,
AddMemberWithUserCreate,
} from '../types/tenant';
export class TenantService {
@@ -125,8 +126,8 @@ export class TenantService {
// Backend: services/tenant/app/api/tenant_members.py
// ===================================================================
async addTeamMember(
tenantId: string,
userId: string,
tenantId: string,
userId: string,
role: string
): Promise<TenantMemberResponse> {
return apiClient.post<TenantMemberResponse>(`${this.baseUrl}/${tenantId}/members`, {
@@ -135,6 +136,16 @@ export class TenantService {
});
}
async addTeamMemberWithUserCreation(
tenantId: string,
memberData: AddMemberWithUserCreate
): Promise<TenantMemberResponse> {
return apiClient.post<TenantMemberResponse>(
`${this.baseUrl}/${tenantId}/members/with-user`,
memberData
);
}
async getTeamMembers(tenantId: string, activeOnly: boolean = true): Promise<TenantMemberResponse[]> {
const queryParams = new URLSearchParams();
queryParams.append('active_only', activeOnly.toString());