Ignore:
Timestamp:
11/05/20 06:57:35 (2 years ago)
Author:
DimitarSlezenkovski <dslezenkovski@…>
Branches:
master
Children:
afc9a9a
Parents:
1f4846d
Message:

Add SystemService, Auth, fix a lil bugs :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Farmatiko/ClientApp/src/app/shared/services/auth.service.ts

    r1f4846d rd23bf72  
    1111  username: string;
    1212  role: string;
     13  originalUserName?: string;
    1314  accessToken: string;
    1415  refreshToken: string;
    15   head: IPharmacyHead;
     16  head?: IPharmacyHead;
    1617}
    1718
     
    3536        this.http.get<LoginResult>(`${this.apiUrl}/user`).subscribe((x) => {
    3637          this._user.next({
    37             Email: x.username,
    38             Role: x.role,
     38            Email: x.head.Email,
     39            Role: x.head.Role,
     40            originalUserName: x.head.originalUserName,
    3941            Passwd: x.head.Passwd,
    40             Name: x.head.Name
     42            Name: x.head.Name,
     43            PharmacyMedicines: x.head.PharmacyMedicines,
     44            Pharmacy: x.head.Pharmacy
    4145          });
    4246        });
     
    6064        map((x) => {
    6165          this._user.next({
    62             Email: x.username,
    63             Role: x.role,
     66            Email: x.head.Email,
     67            Role: x.head.Role,
     68            originalUserName: x.head.originalUserName,
    6469            Passwd: x.head.Passwd,
    65             Name: x.head.Name
     70            Name: x.head.Name,
     71            PharmacyMedicines: x.head.PharmacyMedicines,
     72            Pharmacy: x.head.Pharmacy
    6673          });
    6774          this.setLocalStorage(x);
     
    98105        map((x) => {
    99106          this._user.next({
    100             Email: x.username,
    101             Role: x.role,
     107            Email: x.head.Email,
     108            Role: x.head.Role,
     109            originalUserName: x.head.originalUserName,
    102110            Passwd: x.head.Passwd,
    103             Name: x.head.Name
     111            Name: x.head.Name,
     112            PharmacyMedicines: x.head.PharmacyMedicines,
     113            Pharmacy: x.head.Pharmacy
    104114          });
    105115          this.setLocalStorage(x);
Note: See TracChangeset for help on using the changeset viewer.