dev #14494 WPA CoffeeLike изменить апи для получения последней транзакции
This commit is contained in:
parent
eef97fd35f
commit
bef4ed1a48
@ -55,6 +55,7 @@ export class GuestCardComponent implements OnInit {
|
||||
this.loyaltyProgram.getLastPurchase(
|
||||
environment.systemId,
|
||||
token || '',
|
||||
this.customerInfo.id
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
@ -93,11 +93,11 @@ export class LoyaltyProgramService {
|
||||
return lvlPeriods[this.currentLvl];
|
||||
}
|
||||
|
||||
getLastPurchase(systemId: string, token: string) {
|
||||
getLastPurchase(systemId: string, token: string, customerId: string) {
|
||||
this.purchaseData.$loading = true;
|
||||
this.wpJsonService.getLastPurchase(systemId, token).subscribe({
|
||||
next: (res) => {
|
||||
this.purchaseData.lastPurchase = res;
|
||||
this.purchaseData.lastPurchase = res[customerId][0];
|
||||
},
|
||||
complete: () => {
|
||||
this.purchaseData.$loading = false;
|
||||
|
||||
@ -56,7 +56,7 @@ export class WpJsonService {
|
||||
)
|
||||
}
|
||||
|
||||
getLastPurchase(systemId: string, token: string): Observable<Purchase> {
|
||||
getLastPurchase(systemId: string, token: string): Observable<any> {
|
||||
return this._request(`last_trans/${systemId}/${token}/`, 'GET', null, false, environment.icardProxy);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user