Squashed commit of the following:
commit9bb3374ba0Author: ncoronel <ncoronel@quo.ar> Date: Wed Jul 29 09:20:17 2026 -0300 feat: add submitPurchaseForReview method and update checkout flow to handle purchase review status commit76327d34ecAuthor: ncoronel <ncoronel@quo.ar> Date: Wed Jul 29 08:33:54 2026 -0300 refactor: update styles for category items page header and title commit4cb81ed70dAuthor: ncoronel <ncoronel@quo.ar> Date: Tue Jul 28 17:02:12 2026 -0300 feat: implement payment verification error component and update checkout flow commitc233845ce0Author: ncoronel <ncoronel@quo.ar> Date: Tue Jul 28 16:57:00 2026 -0300 feat: add WhatsApp support and improve payment timeout handling in checkout process commit15a74bb56eAuthor: ncoronel <ncoronel@quo.ar> Date: Tue Jul 28 16:26:45 2026 -0300 feat: enhance purchase status page with ticket handling and WhatsApp integration commit58e9dc06b1Author: ncoronel <ncoronel@quo.ar> Date: Tue Jul 28 16:03:17 2026 -0300 refactor: simplify purchase status page by removing polling logic and updating messages
This commit is contained in:
@@ -68,6 +68,8 @@ export interface PurchaseDetailResponse extends PurchaseStatusResponse {
|
||||
email: string | null;
|
||||
items_source: 'purchase';
|
||||
items: PurchaseDetailItemResponse[];
|
||||
tickets_count?: number;
|
||||
has_generated_tickets?: boolean;
|
||||
subtotal: string;
|
||||
total: string;
|
||||
}
|
||||
@@ -199,6 +201,25 @@ export class CheckoutService {
|
||||
};
|
||||
}
|
||||
|
||||
async submitPurchaseForReview(
|
||||
tenantCode: string,
|
||||
purchaseId: number,
|
||||
): Promise<PurchaseStatusResponse> {
|
||||
const response = await firstValueFrom(
|
||||
this.http.post<{ data?: PurchaseStatusResponse } | PurchaseStatusResponse>(
|
||||
`${environment.url}tenants/${tenantCode}/compras/${purchaseId}/review`,
|
||||
{},
|
||||
),
|
||||
);
|
||||
|
||||
const purchase = this.extractResponseData<PurchaseStatusResponse>(response);
|
||||
if (!purchase) {
|
||||
throw new Error('Error al enviar la compra a revisi\u00f3n.');
|
||||
}
|
||||
|
||||
return { status: purchase.status ?? null };
|
||||
}
|
||||
|
||||
async cancelPurchase(tenantCode: string, purchaseId: number): Promise<PurchaseStatusResponse> {
|
||||
const response = await firstValueFrom(
|
||||
this.http.post<{ data?: PurchaseStatusResponse } | PurchaseStatusResponse>(
|
||||
|
||||
Reference in New Issue
Block a user