Browse Source

Faq credentials Update and Schedule Api --Partial Commit

master
prahalad 4 years ago
parent
commit
eec538a0b3
3 changed files with 14 additions and 10 deletions
  1. +1
    -2
      src/app/schedules/schedules.component.ts
  2. +6
    -6
      src/app/services/faq.service.ts
  3. +7
    -2
      src/app/services/outlet.service.ts

+ 1
- 2
src/app/schedules/schedules.component.ts View File

@@ -147,10 +147,9 @@ export class SchedulesComponent implements OnInit {
scheduleHolidays() {
this.selectedHolidays = this.selectedDatesForSchedule.map(selectedDates => this.getTodayString(selectedDates.toString()))
this.outletTiming.holidays = JSON.stringify(this.selectedHolidays)
this.outletTiming.schedules.outlet_id = this.profile_info.outlet_id
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)
}, err=>{
console.log("Unable to Update Holidays")


+ 6
- 6
src/app/services/faq.service.ts View File

@@ -13,12 +13,12 @@ export class FaqService {

async mallFaqs() {
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()
}


+ 7
- 2
src/app/services/outlet.service.ts View File

@@ -11,7 +11,12 @@ export class OutletService {
private http: HttpClient
) { }

addOutletSchedules(schedules: any) {
addOutletSchedules(schedule: any, outlet_id: number) {

schedule.outlet = {
outlet_id: outlet_id
}

const httpOptions = {
headers: new HttpHeaders({
'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()
}
}

Loading…
Cancel
Save