Przeglądaj źródła

Faq credentials Update and Schedule Api --Partial Commit

master
prahalad 4 lat temu
rodzic
commit
eec538a0b3
3 zmienionych plików z 14 dodań i 10 usunięć
  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 Wyświetl plik

@@ -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")


+ 6
- 6
src/app/services/faq.service.ts Wyświetl plik

@@ -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()
} }


+ 7
- 2
src/app/services/outlet.service.ts Wyświetl plik

@@ -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()
} }
} }

Ładowanie…
Anuluj
Zapisz