Files
BusinessMgr-2019/SaBusinessMgrCoreWebPortal/Views/Home/Index.cshtml
T

158 lines
4.6 KiB
Plaintext

@* Home page *@
@model Model_Home
@inject SbmLocaliser Localiser
@{
ViewData["Title"] = "Home";
}
@if (Model.AwaitingLogin)
{
@* ------------------------------------------------------------------- *@
@* User not logged in. *@
<div class="text-center">
<h1 class="display-4">Welcome</h1>
</div>
<style>
.sbm-panel-home-info
{
height: 100%;
margin: 0 4px;
padding: 4px 12px;
font-size: 16px;
border: 2px solid #b0b0b0;
border-radius: 4px;
background-color: #fff;
}
.sbm-panel-home-info div
{
margin: 0 0 8px 0;
font-size: 16px;
line-height: 1.25em;
}
</style>
<div class="row">
<div class="col-sm-6 sbm-flex-column">
<div class="sbm-flex-1">
<div class="sbm-panel-home-info" style="border-color:var(--color-KellyGreen);">
<h1>What's On Offer</h1>
<div class="">
Business Manager helps you look after the day-to-day operational data necsssary in running your business.
</div>
<div class="">
&bull; Contacts - your customers and suppliers.
</div>
<div class="">
&bull; Products and services that you offer.
</div>
<div class="">
&bull; Sales and purchase orders.
</div>
<div class="">
&bull; Optional modules including stock, time recording, assets, accounts integration.
</div>
</div>
</div>
</div>
<div class="col-sm-6 sbm-flex-column">
<div class="spacer2 d-sm-none"></div>
<div class="">
<div class="sbm-panel-home-info" style="border-color:var(--color-RoyalBlue);">
<h1>Existing users</h1>
<div style="margin:12px 24px 8px 24px;"><button onclick="sbm.goToPage('Security')" style="padding:4px 12px;border-radius:4px;">@Localiser["label.signin"]</button></div>
</div>
</div>
<div class="spacer2"></div>
<div class="sbm-flex-1">
<div class="sbm-panel-home-info" style="border-color:var(--color-BrightPurple);">
<h1>Demo environment</h1>
<div>You can set up an account to access the demo environment and try out a selection of application modules in a matter of minutes.</div>
<div>Request access and you'll be emailed a link to register your account.</div>
<div style="margin:12px 24px 8px 24px;"><button onclick="sbm.goToPage('Demo/Request')" style="padding:4px 12px;border-radius:4px;">@Localiser["label.request"]</button></div>
<div>The demo data is reset every 24 hours.</div>
</div>
</div>
</div>
</div>
@* ------------------------------------------------------------------- *@
}
else
{
@* ------------------------------------------------------------------- *@
@* User Session is active. *@
<style>
#tblWelcome
{
margin: 0 auto;
font-size: 20px;
border-spacing: 0;
}
#tblWelcome tr:hover
{
background-color: lightyellow;
}
#tblWelcome tr th
{
padding: 6px 8px 4px 8px;
font-size: 20px;
}
#tblWelcome tr td
{
padding: 4px 8px;
font-size: 16px;
}
</style>
<div class="text-center">
<h1 class="display-4">Welcome</h1>
</div>
<div class="">
<table id="tblWelcome" class="table-hover">
<tr style="font-weight:bold;background-color:lightsteelblue;">
<th style="min-width:200px;">@Localiser["label.context"]</th>
<th class="center" style="min-width:80px;">@Localiser["label.count"]</th>
</tr>
<tr class="sbm-action-text" onclick="sbm.goToPage('Contacts')">
<td class="">@Localiser["label.contacts"]</td>
<td class="center sbm-action-text">@Model.GetContactCount()</td>
</tr>
<tr class="sbm-action-text" onclick="sbm.goToPage('Customers')">
<td class="">@Localiser["label.customers"]</td>
<td class="center">@Model.GetCustomerCount()</td>
</tr>
<tr class="sbm-action-text" onclick="sbm.goToPage('Suppliers')">
<td class="">@Localiser["label.suppliers"]</td>
<td class="center">@Model.GetSupplierCount()</td>
</tr>
<tr class="sbm-action-text" onclick="sbm.goToPage('Commodity')">
<td class="">@Localiser["label.commodities"]</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>
@* ------------------------------------------------------------------- *@
}