Added the IsRoot user Field in employee profile VM
This commit is contained in:
parent
540c3e75fd
commit
bd4f1d5e69
@ -35,6 +35,7 @@ namespace Marco.Pms.Model.Mapper
|
|||||||
PhoneNumber = model.PhoneNumber,
|
PhoneNumber = model.PhoneNumber,
|
||||||
Photo = base64String,
|
Photo = base64String,
|
||||||
IsActive = model.IsActive,
|
IsActive = model.IsActive,
|
||||||
|
IsRootUser = model.ApplicationUser!.IsRootUser!.Value,
|
||||||
IsSystem = model.IsSystem,
|
IsSystem = model.IsSystem,
|
||||||
JoiningDate = model.JoiningDate,
|
JoiningDate = model.JoiningDate,
|
||||||
TenantId = model.TenantId
|
TenantId = model.TenantId
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
public string? AadharNumber { get; set; }
|
public string? AadharNumber { get; set; }
|
||||||
|
|
||||||
public bool IsActive { get; set; } = true;
|
public bool IsActive { get; set; } = true;
|
||||||
|
public bool IsRootUser { get; set; }
|
||||||
public string? PanNumber { get; set; }
|
public string? PanNumber { get; set; }
|
||||||
|
|
||||||
public string? Photo { get; set; } // To store the captured photo
|
public string? Photo { get; set; } // To store the captured photo
|
||||||
|
@ -29,7 +29,7 @@ namespace MarcoBMS.Services.Helpers
|
|||||||
{
|
{
|
||||||
var result = await _context.Employees.Where(c => c.ApplicationUserId == ApplicationUserID && c.IsActive == true).ToListAsync();
|
var result = await _context.Employees.Where(c => c.ApplicationUserId == ApplicationUserID && c.IsActive == true).ToListAsync();
|
||||||
|
|
||||||
return await _context.Employees.Where(c => c.ApplicationUserId == ApplicationUserID && c.IsActive == true).SingleOrDefaultAsync() ?? new Employee { };
|
return await _context.Employees.Include(e => e.ApplicationUser).Where(c => c.ApplicationUserId == ApplicationUserID && c.ApplicationUser != null && c.IsActive == true).SingleOrDefaultAsync() ?? new Employee { };
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user