| @@ -147,10 +147,9 @@ export class SchedulesComponent implements OnInit { | |||||
| scheduleHolidays() { | scheduleHolidays() { | ||||
| this.selectedHolidays = this.selectedDatesForSchedule.map(selectedDates => this.getTodayString(selectedDates.toString())) | this.selectedHolidays = this.selectedDatesForSchedule.map(selectedDates => this.getTodayString(selectedDates.toString())) | ||||
| this.outletTiming.holidays = JSON.stringify(this.selectedHolidays) | this.outletTiming.holidays = JSON.stringify(this.selectedHolidays) | ||||
| this.outletTiming.schedules.outlet_id = this.profile_info.outlet_id | |||||
| console.log(this.outletTiming) | console.log(this.outletTiming) | ||||
| this.outletService.addOutletSchedules(this.outletTiming).then((data) => { | |||||
| this.outletService.addOutletSchedules(this.outletTiming, this.profile_info.outlet_id).then((data) => { | |||||
| console.log(data) | console.log(data) | ||||
| }, err=>{ | }, err=>{ | ||||
| console.log("Unable to Update Holidays") | console.log("Unable to Update Holidays") | ||||
| @@ -13,12 +13,12 @@ export class FaqService { | |||||
| async mallFaqs() { | async mallFaqs() { | ||||
| const httpOptions = { | const httpOptions = { | ||||
| headers: new HttpHeaders({ | |||||
| 'Access-Control-Allow-Origin': '*', | |||||
| 'Content-Type': 'application/json', | |||||
| 'Authorization': 'Bearer ' + localStorage.access_Token | |||||
| }) | |||||
| }; | |||||
| headers: new HttpHeaders({ | |||||
| 'Access-Control-Allow-Origin': '*', | |||||
| 'Content-Type': 'application/json', | |||||
| 'Authorization': 'Bearer ' + localStorage.token | |||||
| }) | |||||
| }; | |||||
| return await this.http.get(URL + '/api/maioraservice/faq/getall/', httpOptions).toPromise() | return await this.http.get(URL + '/api/maioraservice/faq/getall/', httpOptions).toPromise() | ||||
| } | } | ||||
| @@ -11,7 +11,12 @@ export class OutletService { | |||||
| private http: HttpClient | private http: HttpClient | ||||
| ) { } | ) { } | ||||
| addOutletSchedules(schedules: any) { | |||||
| addOutletSchedules(schedule: any, outlet_id: number) { | |||||
| schedule.outlet = { | |||||
| outlet_id: outlet_id | |||||
| } | |||||
| const httpOptions = { | const httpOptions = { | ||||
| headers: new HttpHeaders({ | headers: new HttpHeaders({ | ||||
| 'Access-Control-Allow-Origin': '*', | 'Access-Control-Allow-Origin': '*', | ||||
| @@ -20,6 +25,6 @@ export class OutletService { | |||||
| }) | }) | ||||
| }; | }; | ||||
| return this.http.post(URL + "/api/maioraservice/schedule/v2/create", schedules, httpOptions).toPromise() | |||||
| return this.http.post(URL + "/api/maioraservice/schedule/v2/create", schedule, httpOptions).toPromise() | |||||
| } | } | ||||
| } | } | ||||