frontend fully integreated with the backend

This commit is contained in:
Kalana B. Thilakarathna
2026-08-25 23:47:33 +05:30
parent 1bee5f91c6
commit 83d3272784
151 changed files with 10724 additions and 573 deletions
+32
View File
@@ -0,0 +1,32 @@
import { api } from '@/lib/api'
import type {
PaginatedResponse,
StockBalanceResponse,
StockMovementResponse,
LocationType,
MovementType,
} from '@/types/api'
import type { PageParams } from './master'
export interface StockBalanceParams extends PageParams {
locationId?: string
locationType?: LocationType
itemId?: string
}
export interface StockMovementParams extends PageParams {
itemId?: string
locationId?: string
type?: MovementType
from?: string
to?: string
}
export const stock = {
balances: (params?: StockBalanceParams) =>
api.get<PaginatedResponse<StockBalanceResponse>>('/stock/balances', { params }).then(r => r.data),
movements: (params?: StockMovementParams) =>
api.get<PaginatedResponse<StockMovementResponse>>('/stock/movements', { params }).then(r => r.data),
}