feat(back-end and front-end) cad bill with order
This commit is contained in:
@@ -115,6 +115,10 @@ export interface AdminQuoteSession {
|
||||
createdAt: string;
|
||||
expiresAt: string;
|
||||
convertedOrderId?: string;
|
||||
sourceRequestId?: string;
|
||||
cadHours?: number;
|
||||
cadHourlyRateChf?: number;
|
||||
cadTotalChf?: number;
|
||||
}
|
||||
|
||||
export interface AdminQuoteSessionDetailItem {
|
||||
@@ -136,14 +140,45 @@ export interface AdminQuoteSessionDetail {
|
||||
setupCostChf?: number;
|
||||
supportsEnabled?: boolean;
|
||||
notes?: string;
|
||||
sourceRequestId?: string;
|
||||
cadHours?: number;
|
||||
cadHourlyRateChf?: number;
|
||||
};
|
||||
items: AdminQuoteSessionDetailItem[];
|
||||
printItemsTotalChf: number;
|
||||
cadTotalChf: number;
|
||||
itemsTotalChf: number;
|
||||
shippingCostChf: number;
|
||||
globalMachineCostChf: number;
|
||||
grandTotalChf: number;
|
||||
}
|
||||
|
||||
export interface AdminCreateCadInvoicePayload {
|
||||
sessionId?: string;
|
||||
sourceRequestId?: string;
|
||||
cadHours: number;
|
||||
cadHourlyRateChf?: number;
|
||||
notes?: string;
|
||||
}
|
||||
|
||||
export interface AdminCadInvoice {
|
||||
sessionId: string;
|
||||
sessionStatus: string;
|
||||
sourceRequestId?: string;
|
||||
cadHours: number;
|
||||
cadHourlyRateChf: number;
|
||||
cadTotalChf: number;
|
||||
printItemsTotalChf: number;
|
||||
setupCostChf: number;
|
||||
shippingCostChf: number;
|
||||
grandTotalChf: number;
|
||||
convertedOrderId?: string;
|
||||
convertedOrderStatus?: string;
|
||||
checkoutPath: string;
|
||||
notes?: string;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
@@ -279,4 +314,20 @@ export class AdminOperationsService {
|
||||
{ withCredentials: true },
|
||||
);
|
||||
}
|
||||
|
||||
listCadInvoices(): Observable<AdminCadInvoice[]> {
|
||||
return this.http.get<AdminCadInvoice[]>(`${this.baseUrl}/cad-invoices`, {
|
||||
withCredentials: true,
|
||||
});
|
||||
}
|
||||
|
||||
createCadInvoice(
|
||||
payload: AdminCreateCadInvoicePayload,
|
||||
): Observable<AdminCadInvoice> {
|
||||
return this.http.post<AdminCadInvoice>(
|
||||
`${this.baseUrl}/cad-invoices`,
|
||||
payload,
|
||||
{ withCredentials: true },
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user