display the /HairCut/Brush profile
This commit is contained in:
@ -125,7 +125,7 @@ namespace Yavsc.Controllers
|
||||
};
|
||||
model.HaveProfessionalSettings = _dbContext.Performers.Any(x => x.PerformerId == user.Id);
|
||||
var usrActs = _dbContext.UserActivities.Include(a=>a.Does).Where(a=> a.UserId == user.Id).ToArray();
|
||||
|
||||
// TODO remember me who this magical a.Settings is built
|
||||
var usrActToSet = usrActs.Where( a => ( a.Settings == null && a.Does.SettingsClassName != null )).ToArray();
|
||||
model.HaveActivityToConfigure = usrActToSet .Count()>0;
|
||||
model.Activity = _dbContext.UserActivities.Include(a=>a.Does).Where(u=>u.UserId == user.Id).ToList();
|
||||
|
@ -68,7 +68,6 @@ namespace Yavsc.Controllers
|
||||
Settings = settings,
|
||||
NeedsSettings = hasConfigurableSettings
|
||||
};
|
||||
logger.LogInformation(JsonConvert.SerializeObject(gift.Settings));
|
||||
return View (gift);
|
||||
}
|
||||
|
||||
|
@ -24,8 +24,11 @@ namespace Yavsc.Controllers
|
||||
ILogger _logger;
|
||||
|
||||
IStringLocalizer _SR;
|
||||
private IBillingService _billing;
|
||||
|
||||
public FrontOfficeController(ApplicationDbContext context,
|
||||
UserManager<ApplicationUser> userManager,
|
||||
IBillingService billing,
|
||||
ILoggerFactory loggerFactory,
|
||||
IStringLocalizer<Yavsc.Resources.YavscLocalisation> SR)
|
||||
{
|
||||
@ -33,6 +36,7 @@ namespace Yavsc.Controllers
|
||||
_userManager = userManager;
|
||||
_logger = loggerFactory.CreateLogger<FrontOfficeController>();
|
||||
_SR = SR;
|
||||
_billing = billing;
|
||||
}
|
||||
public ActionResult Index()
|
||||
{
|
||||
@ -61,7 +65,7 @@ namespace Yavsc.Controllers
|
||||
throw new NotImplementedException("No Activity code");
|
||||
}
|
||||
ViewBag.Activity = _context.Activities.FirstOrDefault(a => a.Code == id);
|
||||
var result = _context.ListPerformers(id);
|
||||
var result = _context.ListPerformers(_billing, id);
|
||||
return View(result);
|
||||
}
|
||||
[AllowAnonymous]
|
||||
@ -72,7 +76,7 @@ namespace Yavsc.Controllers
|
||||
throw new NotImplementedException("No Activity code");
|
||||
}
|
||||
ViewBag.Activity = _context.Activities.FirstOrDefault(a => a.Code == id);
|
||||
var result = _context.ListPerformers(id);
|
||||
var result = _context.ListPerformers(_billing, id);
|
||||
return View(result);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user