mirror of
https://github.com/s-frick/effigenix.git
synced 2026-03-28 12:09:35 +01:00
feat(scanner): Mobile Scanner App mit echten Produktionsaufträgen
Scanner-App Tauri v2 Android App mit Login, Barcode-Scanner, Consume/Move/Book-Flows und Aufgabenliste. TasksPage lädt echte RELEASED/IN_PROGRESS Produktionsaufträge via API, Consume-Flow nutzt den konkreten Auftrag für korrekte Rezept-Skalierung statt blind den ersten IN_PROGRESS-Auftrag zu nehmen. Backend: FindStockByBatchId Use Case + REST-Endpoint für Stock-Lookup per Chargennummer.
This commit is contained in:
parent
72979c9537
commit
bf09e3b747
93 changed files with 8977 additions and 60 deletions
|
|
@ -2,7 +2,7 @@
|
|||
* Base axios client for the Effigenix API
|
||||
*/
|
||||
|
||||
import axios, { type AxiosInstance } from 'axios';
|
||||
import axios, { type AxiosAdapter, type AxiosInstance } from 'axios';
|
||||
import { type ApiConfig, DEFAULT_API_CONFIG } from '@effigenix/config';
|
||||
import { setupAuthInterceptor } from './interceptors/auth-interceptor.js';
|
||||
import { setupRefreshInterceptor } from './interceptors/refresh-interceptor.js';
|
||||
|
|
@ -30,6 +30,7 @@ export function createApiClient(
|
|||
'Content-Type': 'application/json',
|
||||
Accept: 'application/json',
|
||||
},
|
||||
...(resolvedConfig.adapter ? { adapter: resolvedConfig.adapter as AxiosAdapter } : {}),
|
||||
});
|
||||
|
||||
setupAuthInterceptor(client, tokenProvider);
|
||||
|
|
|
|||
|
|
@ -89,6 +89,11 @@ export function createStocksResource(client: AxiosInstance) {
|
|||
return res.data;
|
||||
},
|
||||
|
||||
async findByBatchId(batchId: string): Promise<StockDTO[]> {
|
||||
const res = await client.get<StockDTO[]>(`${BASE}/by-batch/${encodeURIComponent(batchId)}`);
|
||||
return res.data;
|
||||
},
|
||||
|
||||
async create(request: CreateStockRequest): Promise<CreateStockResponse> {
|
||||
const res = await client.post<CreateStockResponse>(BASE, request);
|
||||
return res.data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue