Merge branch 'developer' into developer_mobilefirst

This commit is contained in:
Eudes Inácio
2021-06-29 11:58:57 +01:00
59 changed files with 664 additions and 1000 deletions
+5 -5
View File
@@ -41,7 +41,8 @@ export class AuthService {
async login(user: UserForm): Promise<boolean> {
user.BasicAuthKey = 'Basic ' + btoa(user.username + '@' + user.domainName + ':' + user.password); //conversão em base64 das credenciais inseridas
//user.BasicAuthKey = 'Basic ' + btoa(user.username + '@' + user.domainName + ':' + user.password);
user.BasicAuthKey = 'Basic ' + btoa(user.username + ':' + user.password); //conversão em base64 das credenciais inseridas
const options = { headers: {'Authorization': user.BasicAuthKey }};
@@ -55,12 +56,11 @@ export class AuthService {
let response: any;
try {
result = await this.http.get<boolean>(service, options).toPromise();
response = await this.http.post<User>(environment.apiURL + "UserAuthentication/Login", '', this.opts).toPromise();
console.log(response);
if (result) {
if (response) {
if( response.RoleID == 100000014) {
response.Profile = 'PR'
} else if(response.RoleID == 100000011) {
@@ -73,11 +73,11 @@ export class AuthService {
this.storageService.store(AuthConnstants.USER, response);
return result;
return true;
}
} catch (error) {
return result;
return false;
}
}
+8 -14
View File
@@ -90,11 +90,6 @@ export class EventsService {
this.headers = new HttpHeaders();
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
}
/* getAllEvents(startdate:string, enddate:string): Observable<Event[]>{
@@ -118,15 +113,6 @@ export class EventsService {
params = params.set("Start", startdate);
params = params.set("End", enddate);
/* switch (this.loggeduser.Profile == 'MDGPR') {
case value:
break;
default:
break;
} */
let options = {
headers: this.headersPrOficial,
@@ -306,6 +292,14 @@ export class EventsService {
return this.http.put<Event>(`${puturl}`, event, options)
}
changeAgenda(body:any){
const puturl = environment.apiURL + 'Calendar/MoveEvent';
let options = {
headers: this.headers,
};
return this.http.post<any>(`${puturl}`, body, options);
}
/* postEvent(event:Event, calendarName:string, sharedagenda:string)
{
const puturl = environment.apiURL + 'calendar/' + ((sharedagenda != '') ? sharedagenda : 'PostEvent');