Dashboard commit 6 ...80% complete #11
 Merged
	
	
		
		
			
		
		
		
			
		
		
			
			
				barhen
				merged 2 commits from BISK2023-21-develop-the-frontend-for-the-dashboard into dev 2 years ago
			
		
	
	
				 15 changed files with 290 additions and 98 deletions
			
			
		@ -1,17 +1,39 @@ | 
				
			|||
@using Biskilog_Accounting.Shared.Interfaces | 
				
			|||
@using Microsoft.Fast.Components.FluentUI | 
				
			|||
@inject ICalculator m_calculator | 
				
			|||
 | 
				
			|||
<div class="card"> | 
				
			|||
    <div class="card-body"> | 
				
			|||
        <div class="card-title d-flex align-items-start justify-content-between"> | 
				
			|||
            <div class="avatar flex-shrink-0"> | 
				
			|||
                <img src="@Icon" | 
				
			|||
                     alt="chart success" | 
				
			|||
                     class="rounded" /> | 
				
			|||
@if (!IsLoading) | 
				
			|||
{ | 
				
			|||
    <div class="card"> | 
				
			|||
        <div class="card-body"> | 
				
			|||
            <div class="card-title d-flex align-items-start justify-content-between"> | 
				
			|||
                <div class="avatar flex-shrink-0"> | 
				
			|||
                    <img src="@Icon" | 
				
			|||
                         alt="chart success" | 
				
			|||
                         class="rounded" /> | 
				
			|||
                </div> | 
				
			|||
            </div> | 
				
			|||
            <span class="fw-semibold d-block mb-1">@Title</span> | 
				
			|||
            <h6 class="card-title mb-2">@(m_calculator.FormatMoneyWithCurrency(Value))</h6> | 
				
			|||
            <small class="@(Percentage > 0 ? "text-success" : Percentage == 0 ? "bx-forward-arrow-alt" : "text-danger") fw-semibold"><i class="bx @(Percentage > 0 ? "bx-up-arrow-alt" : Percentage == 0 ? "bx-forward-arrow-alt" : "bx-down-arrow-alt")"></i> @(Percentage.ToString("0.00")) %</small> | 
				
			|||
        </div> | 
				
			|||
        <span class="fw-semibold d-block mb-1">@Title</span> | 
				
			|||
        <h6 class="card-title mb-2">@(m_calculator.FormatMoneyWithCurrency(Value))</h6> | 
				
			|||
        <small class="@(Percentage > 0 ? "text-success" : Percentage == 0 ? "bx-forward-arrow-alt" : "text-danger") fw-semibold"><i class="bx @(Percentage > 0 ? "bx-up-arrow-alt" : Percentage == 0 ? "bx-forward-arrow-alt" : "bx-down-arrow-alt")"></i> @(Percentage.ToString("0.00")) %</small> | 
				
			|||
    </div> | 
				
			|||
</div> | 
				
			|||
} | 
				
			|||
else | 
				
			|||
{ | 
				
			|||
    <FluentCard class="card-padding"> | 
				
			|||
        <FluentSkeleton style="border-radius: 4px; width: 50px; height: 50px;" Shape="SkeletonShape.Circle" Shimmer="true"></FluentSkeleton> | 
				
			|||
        <FluentSkeleton style="border-radius: 4px; margin-top: 10px; height: 10px;" Shape="SkeletonShape.Rect" Shimmer="true"></FluentSkeleton> | 
				
			|||
        <FluentSkeleton style="border-radius: 4px; margin-top: 10px; height: 10px;" Shape="SkeletonShape.Rect" Shimmer="true"></FluentSkeleton> | 
				
			|||
        <FluentSkeleton style="border-radius: 4px; margin-top: 10px; height: 10px;" Shape="SkeletonShape.Rect" Shimmer="true"></FluentSkeleton> | 
				
			|||
        <FluentSkeleton style=" | 
				
			|||
                border-radius: 4px; | 
				
			|||
                width: 75px; | 
				
			|||
                height: 30px; | 
				
			|||
                margin-top: 20px; | 
				
			|||
                margin-bottom: 10px; | 
				
			|||
            " | 
				
			|||
                        Shape="SkeletonShape.Rect" | 
				
			|||
                        Shimmer="true"></FluentSkeleton> | 
				
			|||
    </FluentCard> | 
				
			|||
} | 
				
			|||
@ -1,31 +1,58 @@ | 
				
			|||
@using Biskilog_Accounting.Shared.CustomModels; | 
				
			|||
@using Biskilog_Accounting.Shared.Interfaces; | 
				
			|||
@using Microsoft.Fast.Components.FluentUI | 
				
			|||
@inject ICalculator m_calculator | 
				
			|||
 | 
				
			|||
<div class="card h-100"> | 
				
			|||
    <div class="card-header d-flex align-items-center justify-content-between"> | 
				
			|||
        <h5 class="card-title m-0 me-2">Last 50 Transactions</h5> | 
				
			|||
    </div> | 
				
			|||
    <div class="card-body" style="padding:5px !important;"> | 
				
			|||
        <RadzenDataGrid Data="@Sales" TItem="SaleItem" AllowPaging="true" AllowSorting="true"> | 
				
			|||
            <Columns> | 
				
			|||
                <RadzenDataGridColumn TItem="SaleItem" Property="Transno" Title="Receipt#" /> | 
				
			|||
                <RadzenDataGridColumn TItem="SaleItem" Property="Date" Title="Timestamp" /> | 
				
			|||
                <RadzenDataGridColumn TItem="SaleItem" Property="Total" Title="Total"> | 
				
			|||
                    <Template Context="detail"> | 
				
			|||
                        @(m_calculator.FormatMoneyWithCurrencyKilo((double)detail.Total)) | 
				
			|||
                    </Template> | 
				
			|||
                </RadzenDataGridColumn> | 
				
			|||
@if (!IsLoading) | 
				
			|||
{ | 
				
			|||
    <div class="card h-100"> | 
				
			|||
        <div class="card-header d-flex align-items-center justify-content-between"> | 
				
			|||
            <h5 class="card-title m-0 me-2">Last 50 Transactions</h5> | 
				
			|||
        </div> | 
				
			|||
        <div class="card-body" style="padding:5px !important;"> | 
				
			|||
            <RadzenDataGrid Data="@Sales" TItem="SaleItem" AllowPaging="true" AllowSorting="true"> | 
				
			|||
                <Columns> | 
				
			|||
                    <RadzenDataGridColumn TItem="SaleItem" Property="Transno" Title="Receipt#" /> | 
				
			|||
                    <RadzenDataGridColumn TItem="SaleItem" Property="Date" Title="Timestamp" /> | 
				
			|||
                    <RadzenDataGridColumn TItem="SaleItem" Property="Total" Title="Total"> | 
				
			|||
                        <Template Context="detail"> | 
				
			|||
                            @( | 
				
			|||
                                m_calculator.FormatMoneyWithCurrencyKilo((double)detail.Total) | 
				
			|||
                                ) | 
				
			|||
                        </Template> | 
				
			|||
                    </RadzenDataGridColumn> | 
				
			|||
 | 
				
			|||
            </Columns> | 
				
			|||
        </RadzenDataGrid> | 
				
			|||
                </Columns> | 
				
			|||
            </RadzenDataGrid> | 
				
			|||
        </div> | 
				
			|||
    </div> | 
				
			|||
</div> | 
				
			|||
 | 
				
			|||
} | 
				
			|||
else | 
				
			|||
{ | 
				
			|||
    <FluentCard class="card-padding"> | 
				
			|||
        <FluentSkeleton style="border-radius: 4px; width: 50px; height: 50px;" Shape="SkeletonShape.Circle" Shimmer="true"></FluentSkeleton> | 
				
			|||
        <FluentSkeleton style="border-radius: 4px; margin-top: 10px; height: 10px;" Shape="SkeletonShape.Rect" Shimmer="true"></FluentSkeleton> | 
				
			|||
        <FluentSkeleton style="border-radius: 4px; margin-top: 10px; height: 10px;" Shape="SkeletonShape.Rect" Shimmer="true"></FluentSkeleton> | 
				
			|||
        <FluentSkeleton style="border-radius: 4px; margin-top: 10px; height: 10px;" Shape="SkeletonShape.Rect" Shimmer="true"></FluentSkeleton> | 
				
			|||
        <FluentSkeleton style=" | 
				
			|||
                border-radius: 4px; | 
				
			|||
                width: 75px; | 
				
			|||
                height: 30px; | 
				
			|||
                margin-top: 20px; | 
				
			|||
                margin-bottom: 10px; | 
				
			|||
            " | 
				
			|||
                    Shape="SkeletonShape.Rect" | 
				
			|||
                    Shimmer="true"></FluentSkeleton> | 
				
			|||
    </FluentCard> | 
				
			|||
} | 
				
			|||
<style> | 
				
			|||
    .rz-datatable-thead th, .rz-grid-table thead th { | 
				
			|||
        background-color: #a4d5d3; | 
				
			|||
        padding: 0; | 
				
			|||
        color: white; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    .rz-datatable { | 
				
			|||
        border: none !important; | 
				
			|||
    } | 
				
			|||
</style> | 
				
			|||
@ -1,25 +1,47 @@ | 
				
			|||
@using Biskilog_Accounting.Shared.Interfaces; | 
				
			|||
@using Microsoft.Fast.Components.FluentUI | 
				
			|||
@inject ICalculator m_calculator; | 
				
			|||
 | 
				
			|||
<div class="card"> | 
				
			|||
    <div class="d-flex align-items-end row"> | 
				
			|||
        <div class="col-sm-7"> | 
				
			|||
            <div class="card-body"> | 
				
			|||
                <h5 class="card-title text-primary">@(TradeSummary.CurrentTradeSales > TradeSummary.LastTradeSales ? "Congratulations 🎉" : TradeSummary.LastTradeSales > TradeSummary.CurrentTradeSales ? "Tough shift there" : "Well Done") @Username!</h5> | 
				
			|||
                <p class="mb-4"> | 
				
			|||
                    @m_remarks | 
				
			|||
                </p> | 
				
			|||
                <a href="javascript:;" class="btn btn-sm btn-outline-primary">View Trade Summary</a> | 
				
			|||
@if (!IsLoading) | 
				
			|||
{ | 
				
			|||
    <div class="card"> | 
				
			|||
        <div class="d-flex align-items-end row"> | 
				
			|||
            <div class="col-sm-7"> | 
				
			|||
                <div class="card-body"> | 
				
			|||
                    <h5 class="card-title text-primary">@(TradeSummary.CurrentTradeSales > TradeSummary.LastTradeSales ? "Congratulations 🎉" : TradeSummary.LastTradeSales > TradeSummary.CurrentTradeSales ? "Tough shift there" : "Well Done") @Username!</h5> | 
				
			|||
                    <p class="mb-4"> | 
				
			|||
                        @m_remarks | 
				
			|||
                    </p> | 
				
			|||
                    <a href="javascript:;" class="btn btn-sm btn-outline-primary">View Trade Summary</a> | 
				
			|||
                </div> | 
				
			|||
            </div> | 
				
			|||
        </div> | 
				
			|||
        <div class="col-sm-5 text-center text-sm-left"> | 
				
			|||
            <div class="card-body pb-0 px-0 px-md-4"> | 
				
			|||
                <img src="../assets/img/illustrations/man-with-laptop-light.png" | 
				
			|||
                     height="140" | 
				
			|||
                     alt="View Badge User" | 
				
			|||
                     data-app-dark-img="illustrations/man-with-laptop-dark.png" | 
				
			|||
                     data-app-light-img="illustrations/man-with-laptop-light.png" /> | 
				
			|||
            <div class="col-sm-5 text-center text-sm-left"> | 
				
			|||
                <div class="card-body pb-0 px-0 px-md-4"> | 
				
			|||
                    <img src="../assets/img/illustrations/man-with-laptop-light.png" | 
				
			|||
                         height="140" | 
				
			|||
                         alt="View Badge User" | 
				
			|||
                         data-app-dark-img="illustrations/man-with-laptop-dark.png" | 
				
			|||
                         data-app-light-img="illustrations/man-with-laptop-light.png" /> | 
				
			|||
                </div> | 
				
			|||
            </div> | 
				
			|||
        </div> | 
				
			|||
    </div> | 
				
			|||
</div> | 
				
			|||
} | 
				
			|||
else | 
				
			|||
{ | 
				
			|||
    <FluentCard class="card-padding"> | 
				
			|||
        <FluentSkeleton style="border-radius: 4px; width: 50px; height: 50px;" Shape="SkeletonShape.Circle" Shimmer="true"></FluentSkeleton> | 
				
			|||
        <FluentSkeleton style="border-radius: 4px; margin-top: 10px; height: 10px;" Shape="SkeletonShape.Rect" Shimmer="true"></FluentSkeleton> | 
				
			|||
        <FluentSkeleton style="border-radius: 4px; margin-top: 10px; height: 10px;" Shape="SkeletonShape.Rect" Shimmer="true"></FluentSkeleton> | 
				
			|||
        <FluentSkeleton style="border-radius: 4px; margin-top: 10px; height: 10px;" Shape="SkeletonShape.Rect" Shimmer="true"></FluentSkeleton> | 
				
			|||
        <FluentSkeleton style=" | 
				
			|||
                border-radius: 4px; | 
				
			|||
                width: 75px; | 
				
			|||
                height: 30px; | 
				
			|||
                margin-top: 20px; | 
				
			|||
                margin-bottom: 10px; | 
				
			|||
            " | 
				
			|||
                        Shape="SkeletonShape.Rect" | 
				
			|||
                        Shimmer="true"></FluentSkeleton> | 
				
			|||
    </FluentCard> | 
				
			|||
} | 
				
			|||
					Loading…
					
					
				
		Reference in new issue