Improve the frontend and fix TODOs
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user