feat: implement shopping cart and sales functionality with new component, service, and environment configuration.
This commit is contained in:
@@ -28,7 +28,7 @@ export class ShoppingService {
|
||||
constructor(
|
||||
private httpClient: HttpClient,
|
||||
private messageService: MessageService
|
||||
) {}
|
||||
) { }
|
||||
|
||||
getShoppingItems(idCart: string): Observable<ShoppingItem[]> {
|
||||
if (idCart == null || idCart === '') {
|
||||
@@ -72,7 +72,7 @@ export class ShoppingService {
|
||||
|
||||
updateShopping(shopping: Shopping) {
|
||||
const resp = this.httpClient
|
||||
.put<Shopping>(`${environment.url}shopping/${shopping.id}`, shopping)
|
||||
.put<Shopping>(`${environment.url}shopping/cart`, shopping)
|
||||
.pipe(
|
||||
map((response) => {
|
||||
console.log('Retorno atualização item: ' + response);
|
||||
@@ -115,11 +115,11 @@ export class ShoppingService {
|
||||
const url = `${environment.url}shopping/update/payment/${idCart}`;
|
||||
console.log(
|
||||
'Url: ' +
|
||||
url +
|
||||
' - cart: ' +
|
||||
idCart +
|
||||
' - payment: ' +
|
||||
JSON.stringify(payment)
|
||||
url +
|
||||
' - cart: ' +
|
||||
idCart +
|
||||
' - payment: ' +
|
||||
JSON.stringify(payment)
|
||||
);
|
||||
const resp = this.httpClient.put<ResultApi>(url, payment).pipe(
|
||||
map((response) => {
|
||||
|
||||
Reference in New Issue
Block a user