mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
1-Edited New Event page. 2-Changed Gabinete-Digital workkflow. 3-Changed App Name. Added Expediente View
This commit is contained in:
@@ -5,16 +5,20 @@ import { Router } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { AuthConnstants } from '../config/auth-constants';
|
||||
import axios from "axios";
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AuthService {
|
||||
|
||||
|
||||
|
||||
constructor(
|
||||
private httpService: HttpService,
|
||||
private storageService: StorageService,
|
||||
private router: Router
|
||||
private router: Router,
|
||||
private http: HttpClient
|
||||
) { }
|
||||
|
||||
async login(postData: any): Promise<any> {
|
||||
@@ -62,4 +66,19 @@ export class AuthService {
|
||||
})
|
||||
|
||||
} */
|
||||
validateLogin(){
|
||||
const options = { headers: {'Authorization': 'Basic cGF1bG8ucGludG86dGFidGVzdGVAMDA2'}};
|
||||
const url = 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/api/calendar/ValidateAuth';
|
||||
/* return this.http.get(`${url}`, options); */
|
||||
axios.get(url, options)
|
||||
.then(resp => {
|
||||
if(resp.data)
|
||||
console.log(resp.data);
|
||||
})
|
||||
.catch(err => {
|
||||
// Handle Error Here
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,8 +11,6 @@ import { Observable } from 'rxjs';
|
||||
})
|
||||
export class EventsService {
|
||||
/* Set events */
|
||||
private eventos: Event[];
|
||||
|
||||
private events: Event[] = [
|
||||
{
|
||||
EventId: '1',
|
||||
@@ -71,21 +69,6 @@ export class EventsService {
|
||||
return this.http.get<Event>(`${url + ev}`, this.options)
|
||||
}
|
||||
|
||||
getAllEvents(){
|
||||
//Return a copy of the events in my array
|
||||
console.log("All eventes loaded");
|
||||
const options = { headers: {'Authorization': 'Basic cGF1bG8ucGludG86dGFidGVzdGVAMDA2'}};
|
||||
axios.get(this.url, options)
|
||||
.then((response) => {
|
||||
console.log(this.eventos);
|
||||
this.eventos = response.data;
|
||||
console.log(this.eventos);
|
||||
return this.events;
|
||||
});
|
||||
return this.eventos;
|
||||
//return [...this.events];
|
||||
}
|
||||
|
||||
getStaticEvent(eventId: string){
|
||||
return {
|
||||
// The find() function looks for an event in a array and return true if found
|
||||
|
||||
Reference in New Issue
Block a user