diff --git a/src/app/mall-details/mall-details.page.html b/src/app/mall-details/mall-details.page.html
index 308d573..8968b8d 100644
--- a/src/app/mall-details/mall-details.page.html
+++ b/src/app/mall-details/mall-details.page.html
@@ -11,7 +11,7 @@
{{ mallDetails.mall.mall_distance }} km
-
-
+
diff --git a/src/app/outlet-details/outlet-details.page.ts b/src/app/outlet-details/outlet-details.page.ts
index 0431f40..bfa5a2f 100644
--- a/src/app/outlet-details/outlet-details.page.ts
+++ b/src/app/outlet-details/outlet-details.page.ts
@@ -3,6 +3,7 @@ import { ActivatedRoute, Router } from '@angular/router';
import { Location } from '@angular/common';
import { ICart } from '../cart/cart.page';
import * as moment from 'moment';
+import { MallService } from '../services/mall.service';
@Component({
selector: 'app-outlet-details',
@@ -28,10 +29,16 @@ export class OutletDetailsPage implements OnInit {
private route: ActivatedRoute,
private router: Router,
private location: Location,
+ private mallService: MallService
) { }
ngOnInit() { }
+ toggleOutletBookmark() {
+ this.outlet_details.is_bookmarked = !this.outlet_details.is_bookmarked;
+ this.mallService.updateOutlet(this.outlet_details);
+ }
+
shareOutletDetails() {
if (window.navigator && window.navigator['share']) {
const shareData = {
diff --git a/src/app/services/mall.service.ts b/src/app/services/mall.service.ts
index 4609f12..f792d78 100644
--- a/src/app/services/mall.service.ts
+++ b/src/app/services/mall.service.ts
@@ -60,5 +60,18 @@ export class MallService {
};
return await this.http.put(URL + '/api/maioraservice/mall/v1/update/', mallData.mall , httpOptions).toPromise();
+ }
+
+
+ async updateOutlet(outletData: any) {
+ const httpOptions = {
+ headers: new HttpHeaders({
+ 'Access-Control-Allow-Origin': '*',
+ 'Content-Type': 'application/json',
+ 'Authorization': 'Bearer ' + localStorage.access_Token
+ })
+ };
+
+ return await this.http.put(URL + '/api/maioraservice/outlet/v1/update/', outletData , httpOptions).toPromise();
}
}