3.0.0.3 Control Repository Schema & Logs.
This commit is contained in:
@@ -280,7 +280,8 @@ namespace Sarand.BusinessMgr.Web.Portal.App
|
||||
{
|
||||
// New Session context.
|
||||
ushort sessionContextIdx = sessionContextIdx_Next++;
|
||||
sessionContextData = new SessionContextData_Control(new SbmSessionContext_Web(sessionContextIdx, Sbm.Application.WebPortal), owner.Id, repository.Id);
|
||||
bool demoRepository = repositoryContext.EqualsCI(Sbm.RepositoryContext_Demo);
|
||||
sessionContextData = new SessionContextData_Control(new SbmSessionContext_Web(sessionContextIdx, demoRepository ? Sbm.Application.WebDemo : Sbm.Application.WebPortal), owner.Id, repository.Id);
|
||||
sessionContexts.Add(sessionContextData.SessionContext.Index, sessionContextData);
|
||||
SaLogger.Info($"{SysUtil.Fn} Control Instance initialised: Context: {repository.Context}. Database: {repository.DatabaseName}.");
|
||||
}
|
||||
|
||||
@@ -65,6 +65,7 @@ namespace Sarand.BusinessMgr.Web.Portal.Components
|
||||
// Business components.
|
||||
// NB Keep these accessors protected to avoid them being called by the model binding logic before the session data is ready.
|
||||
protected SbmInternals Internals { get { if (internals == null) internals = new SbmInternals(SessionData_Portal); return internals; } }
|
||||
public SbmInternals GetInternals() { return Internals; }
|
||||
// Managers.
|
||||
protected SbmAccountMgr AccountMgr { get { return Internals.AccountMgr; } }
|
||||
protected SbmCommodityMgr CommodityMgr { get { return Internals.CommodityMgr; } }
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Sarand.BusinessMgr.Web.Portal.Models.Contacts
|
||||
}
|
||||
public Sbm.AffiliateType GetFilterContactType()
|
||||
{
|
||||
Sbm.AffiliateType affiliateType = (Sbm.AffiliateType)Internals.AffiliateTypeCodes.GetTypeForCode(Filter.ContactType);
|
||||
Sbm.AffiliateType affiliateType = (Sbm.AffiliateType)SbmSystem.GetSystemCodes(Sbm.SystemCode.AffiliateType).GetTypeForCode(Filter.ContactType);
|
||||
if (affiliateType == 0 && !StringUtil.IsBlank(Filter.ContactType) && StringUtil.IsNumeric(Filter.ContactType, true))
|
||||
affiliateType = (Sbm.AffiliateType)StringUtil.ToInt(Filter.ContactType);
|
||||
return affiliateType;
|
||||
|
||||
@@ -99,13 +99,13 @@ else
|
||||
|
||||
#tblWelcome tr th
|
||||
{
|
||||
padding: 4px 4px;
|
||||
padding: 6px 8px 4px 8px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
#tblWelcome tr td
|
||||
{
|
||||
padding: 4px 4px;
|
||||
padding: 4px 8px;
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
@@ -120,30 +120,36 @@ else
|
||||
<th style="min-width:200px;">@Localiser["label.context"]</th>
|
||||
<th class="center" style="min-width:80px;">@Localiser["label.count"]</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr class="sbm-action-text" onclick="sbm.goToPage('Contacts')">
|
||||
<td class="">@Localiser["label.contacts"]</td>
|
||||
<td class="center sbm-action-text" onclick="sbm.goToPage('Contacts')">@Model.GetContactCount()</td>
|
||||
<td class="center sbm-action-text">@Model.GetContactCount()</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr class="sbm-action-text" onclick="sbm.goToPage('Customers')">
|
||||
<td class="">@Localiser["label.customers"]</td>
|
||||
<td class="center sbm-action-text" onclick="sbm.goToPage('Customers')">@Model.GetCustomerCount()</td>
|
||||
<td class="center">@Model.GetCustomerCount()</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr class="sbm-action-text" onclick="sbm.goToPage('Suppliers')">
|
||||
<td class="">@Localiser["label.suppliers"]</td>
|
||||
<td class="center sbm-action-text" onclick="sbm.goToPage('Suppliers')">@Model.GetSupplierCount()</td>
|
||||
<td class="center">@Model.GetSupplierCount()</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr class="sbm-action-text" onclick="sbm.goToPage('Commodity')">
|
||||
<td class="">@Localiser["label.commodities"]</td>
|
||||
<td class="center sbm-action-text" onclick="sbm.goToPage('Commodity')">@Model.GetCommodityCount()</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="">@Localiser["label.assets"]</td>
|
||||
<td class="center sbm-action-text" onclick="sbm.goToPage('Assets/Asset')">@Model.GetAssetCount()</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="">@Localiser["label.vehicles"]</td>
|
||||
<td class="center sbm-action-text" onclick="sbm.goToPage('Vehicles/Vehicle')">@Model.GetVehicleCount()</td>
|
||||
<td class="center">@Model.GetCommodityCount()</td>
|
||||
</tr>
|
||||
@if (Model.GetInternals().SessionConsole.AllowOption(Sbm.ConfigOption.Assets))
|
||||
{
|
||||
<tr class="sbm-action-text" onclick="sbm.goToPage('Assets/Asset')">
|
||||
<td class="">@Localiser["label.assets"]</td>
|
||||
<td class="center">@Model.GetAssetCount()</td>
|
||||
</tr>
|
||||
}
|
||||
@if (Model.GetInternals().SessionConsole.AllowOption(Sbm.ConfigOption.Vehicles))
|
||||
{
|
||||
<tr class="sbm-action-text" onclick="sbm.goToPage('Vehicles/Vehicle')">
|
||||
<td class="">@Localiser["label.vehicles"]</td>
|
||||
<td class="center">@Model.GetVehicleCount()</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -109,9 +109,11 @@
|
||||
</button>
|
||||
<div class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse">
|
||||
<ul class="navbar-nav flex-grow-1">
|
||||
@*
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">@Localiser["label.home"]</a>
|
||||
</li>
|
||||
*@
|
||||
@if (Model.AwaitingLogin)
|
||||
{
|
||||
<li class="nav-item">
|
||||
|
||||
@@ -4534,7 +4534,7 @@ input[type="button"].btn-block {
|
||||
}
|
||||
|
||||
.navbar-dark .navbar-toggler-icon {
|
||||
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
|
||||
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255, 255, 255, 1.0)' stroke-width='4' stroke-linecap='round' stroke-miterlimit='10' d='M4 6h22M4 14h22M4 22h22'/%3e%3c/svg%3e");
|
||||
}
|
||||
|
||||
.navbar-dark .navbar-text {
|
||||
|
||||
Reference in New Issue
Block a user