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(
|
this.loyaltyProgram.getLastPurchase(
|
||||||
environment.systemId,
|
environment.systemId,
|
||||||
token || '',
|
token || '',
|
||||||
|
this.customerInfo.id
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@ -93,11 +93,11 @@ export class LoyaltyProgramService {
|
|||||||
return lvlPeriods[this.currentLvl];
|
return lvlPeriods[this.currentLvl];
|
||||||
}
|
}
|
||||||
|
|
||||||
getLastPurchase(systemId: string, token: string) {
|
getLastPurchase(systemId: string, token: string, customerId: string) {
|
||||||
this.purchaseData.$loading = true;
|
this.purchaseData.$loading = true;
|
||||||
this.wpJsonService.getLastPurchase(systemId, token).subscribe({
|
this.wpJsonService.getLastPurchase(systemId, token).subscribe({
|
||||||
next: (res) => {
|
next: (res) => {
|
||||||
this.purchaseData.lastPurchase = res;
|
this.purchaseData.lastPurchase = res[customerId][0];
|
||||||
},
|
},
|
||||||
complete: () => {
|
complete: () => {
|
||||||
this.purchaseData.$loading = false;
|
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);
|
return this._request(`last_trans/${systemId}/${token}/`, 'GET', null, false, environment.icardProxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user