Médicos: modal de detalle con tab Info e Historial (citas, visitas, ventas recetadas)
This commit is contained in:
@@ -257,6 +257,46 @@ export interface Doctor {
|
||||
card_30d?: number;
|
||||
}
|
||||
|
||||
export interface DoctorHistoryCita {
|
||||
id: number;
|
||||
date: string | null;
|
||||
time: string;
|
||||
patient: string;
|
||||
service: string;
|
||||
state: string;
|
||||
}
|
||||
|
||||
export interface DoctorHistoryVisita {
|
||||
id: number;
|
||||
date_start: string | null;
|
||||
patient: string;
|
||||
motivo: string;
|
||||
state: string;
|
||||
}
|
||||
|
||||
export interface DoctorHistoryVenta {
|
||||
id: number;
|
||||
venta: string;
|
||||
date: string | null;
|
||||
patient: string;
|
||||
item: string;
|
||||
subtotal: number;
|
||||
state: string;
|
||||
}
|
||||
|
||||
export interface DoctorHistory {
|
||||
status: string;
|
||||
citas: DoctorHistoryCita[];
|
||||
visitas: DoctorHistoryVisita[];
|
||||
ventas: DoctorHistoryVenta[];
|
||||
totales: {
|
||||
citas_total: number;
|
||||
visitas_total: number;
|
||||
ventas_total_lineas: number;
|
||||
monto_total: number;
|
||||
};
|
||||
}
|
||||
|
||||
export interface Product {
|
||||
id: number;
|
||||
name: string;
|
||||
@@ -1090,6 +1130,11 @@ export const odooApi = {
|
||||
return data;
|
||||
},
|
||||
|
||||
async getDoctorHistory(id: number): Promise<DoctorHistory> {
|
||||
const { data } = await axios.get(`${ODOO_BASE}/skeen/frontend/v1/doctors/${id}/history`);
|
||||
return data;
|
||||
},
|
||||
|
||||
// Comisiones
|
||||
async getCommissions(start?: string, end?: string): Promise<{ status: string; start: string; end: string; total_base: number; total_commission: number; commissions: CommissionRow[] }> {
|
||||
const { data } = await axios.get(`${ODOO_BASE}/skeen/frontend/v1/reports/commissions`, { params: { start, end } });
|
||||
|
||||
Reference in New Issue
Block a user