dashboard design
This commit is contained in:
@@ -7,6 +7,7 @@ import type {
|
||||
RideStatus,
|
||||
CancelRequestType,
|
||||
LoadingSheetStatus,
|
||||
DeliveryTaskStatus,
|
||||
} from '@/types/api'
|
||||
|
||||
import type { PageParams } from './master'
|
||||
@@ -16,7 +17,7 @@ import type { PageParams } from './master'
|
||||
export interface RideBody {
|
||||
vehicleId: string
|
||||
driverProfileId: string
|
||||
meterstart: number
|
||||
meterstart?: number
|
||||
}
|
||||
|
||||
export interface RideListParams extends PageParams {
|
||||
@@ -95,6 +96,10 @@ export interface DeliveryTaskItemQuantity {
|
||||
quantityFulfilled: number
|
||||
}
|
||||
|
||||
export interface DeliveryTaskListParams extends PageParams {
|
||||
status?: DeliveryTaskStatus
|
||||
}
|
||||
|
||||
export const deliveryTasks = {
|
||||
generate: (rideId: string) =>
|
||||
api.post<DeliveryTaskResponse[]>(`/rides/${rideId}/tasks/generate`).then(r => r.data),
|
||||
@@ -102,6 +107,9 @@ export const deliveryTasks = {
|
||||
listByRide: (rideId: string) =>
|
||||
api.get<DeliveryTaskResponse[]>(`/rides/${rideId}/tasks`).then(r => r.data),
|
||||
|
||||
list: (params?: DeliveryTaskListParams) =>
|
||||
api.get<PaginatedResponse<DeliveryTaskResponse>>('/delivery-tasks', { params }).then(r => r.data),
|
||||
|
||||
get: (id: string) =>
|
||||
api.get<DeliveryTaskResponse>(`/delivery-tasks/${id}`).then(r => r.data),
|
||||
|
||||
|
||||
@@ -4,10 +4,12 @@ import type {
|
||||
ShopPOResponse,
|
||||
InvoiceResponse,
|
||||
InvoiceStatus,
|
||||
PaymentStatus,
|
||||
PaymentResponse,
|
||||
PaymentMethod,
|
||||
EntryMode,
|
||||
ShopPOStatus,
|
||||
OutstandingPaymentsResponse,
|
||||
} from '@/types/api'
|
||||
|
||||
import type { PageParams } from './master'
|
||||
@@ -69,12 +71,16 @@ export interface InvoiceListParams extends PageParams {
|
||||
routeId?: string
|
||||
shopId?: string
|
||||
status?: InvoiceStatus
|
||||
paymentStatus?: PaymentStatus
|
||||
}
|
||||
|
||||
export const invoices = {
|
||||
list: (params?: InvoiceListParams) =>
|
||||
api.get<PaginatedResponse<InvoiceResponse>>('/invoices', { params }).then(r => r.data),
|
||||
|
||||
outstandingSummary: () =>
|
||||
api.get<OutstandingPaymentsResponse>('/invoices/outstanding-summary').then(r => r.data),
|
||||
|
||||
get: (id: string) =>
|
||||
api.get<InvoiceResponse>(`/invoices/${id}`).then(r => r.data),
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import type {
|
||||
PaginatedResponse,
|
||||
StockBalanceResponse,
|
||||
StockMovementResponse,
|
||||
LowStockItemResponse,
|
||||
LocationType,
|
||||
MovementType,
|
||||
} from '@/types/api'
|
||||
@@ -40,6 +41,9 @@ export const stock = {
|
||||
movements: (params?: StockMovementParams) =>
|
||||
api.get<PaginatedResponse<StockMovementResponse>>('/stock/movements', { params }).then(r => r.data),
|
||||
|
||||
lowStock: (locationId?: string) =>
|
||||
api.get<LowStockItemResponse[]>('/stock/low-stock', { params: { locationId } }).then(r => r.data),
|
||||
|
||||
adjust: (body: AdjustmentBody) =>
|
||||
api.post('/stock/adjustment', body).then(r => r.data),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user