publish v.0.8.122 to production

This commit is contained in:
Frede Hundewadt 2022-07-07 08:08:18 +02:00
parent cf495eefd9
commit e782e7cac2
16 changed files with 329 additions and 366 deletions

View file

@ -18,13 +18,35 @@
@using Wonky.Entity.Configuration
@using Microsoft.Extensions.Options
<span class="version">@_app?.Version</span>@if(_app!.IsBeta){<span class="version">-beta</span>}
@if (_production)
{
<div class="badge text-bg-success mx-3">app version @_app?.Version</div>
}
else
{
<div class="badge text-bg-info mx-3">app version @_app?.Version</div>
}
@if (_app!.IsBeta)
{
<div class="badge text-bg-warning mx-3">Beta version</div>
}
@if (_app!.SandBox)
{
<div class="badge text-bg-danger mx-3">Sandkasse</div>
}
@code
{
[Inject] IOptions<AppInfo?>? AppInfo { get; set; }
private AppInfo? _app;
private bool _production = true;
protected override void OnInitialized()
{
_app = AppInfo?.Value;
var revision = _app?.Version.Split(".");
var x = Convert.ToInt32(revision?[^1]);
_production = x % 2 == 0;
}
}

View file

@ -15,7 +15,8 @@
//
*@
<table class="table table-sm table-bordered table-striped d-print-table">
<div class="report-ledger">
<table class="table table-sm table-bordered table-striped">
<thead>
<tr class="bg-dark text-white opacity-75 border-bottom">
<th></th>
@ -81,4 +82,6 @@
<td class="text-end">@ReportData.TotalTurnoverMonth</td>
</tr>
</tbody>
</table>
</table>
</div>

View file

@ -15,7 +15,8 @@
//
*@
<table class="table table-sm table-bordered table-striped d-print-table">
<div class="distance-ledger">
<table class="table table-sm table-bordered table-striped">
<thead>
<tr class="bg-dark text-white opacity-75 border-bottom">
<th colspan="2">
@ -49,4 +50,6 @@
<td class="text-end">@ReportData.DistancePrivateMonth</td>
</tr>
</tbody>
</table>
</table>
</div>

View file

@ -17,13 +17,20 @@
@using Wonky.Entity.Views
<h2 class="text-center">Ordre @ReportItem.OrderDate</h2>
<table class="table table-sm table-striped table-bordered d-print-table">
<div class="report-page">
@* <table class="table table-sm table-striped table-bordered d-print-table"> *@
<table class="table table-sm table-striped table-bordered">
<thead>
<tr class="bg-light text-black">
<th colspan="4">
Ordre @ReportItem.ESalesNumber
</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">EOrdre nr.</th>
<td>@ReportItem.ESalesNumber</td>
<th scope="row">Dato</th>
<td>@ReportItem.OrderDate</td>
<th scope="row">Konto</th>
<td>@ReportItem.Company.Account</td>
</tr>
@ -64,12 +71,10 @@
<td>@ReportItem.DlvZipCity</td>
</tr>
</tbody>
</table>
<h3 class="text-center">Varer</h3>
<table class="table table-sm table-striped table-bordered d-print-table">
</table>
<table class="table table-sm table-striped table-bordered">
<thead>
<tr>
<tr class="bg-light text-black">
<th scope="col">Antal</th>
<th scope="col">Varnr</th>
<th scope="col">Beskrivelse</th>
@ -96,15 +101,16 @@
<td class="text-end">@ReportItem.OrderAmount</td>
</tr>
</tbody>
</table>
@if (!string.IsNullOrWhiteSpace(@ReportItem.OfficeNote))
{
</table>
@if (!string.IsNullOrWhiteSpace(@ReportItem.OfficeNote))
{
<div class="alert alert-dark d-print-block">
<h4 class="text-center">
@ReportItem.OfficeNote
</h4>
</div>
}
}
</div>
@code{

View file

@ -15,7 +15,7 @@
//
*@
<table class="table table-sm table-bordered table-striped d-print-table">
<table class="table table-sm table-bordered table-striped">
<thead>
<tr class="bg-dark text-white opacity-75 border-bottom">
<th colspan="3">
@ -33,7 +33,7 @@
<td colspan="2">@ReportData.SupervisedBy</td>
</tr>
<tr>
<th scope="row">Indhold</th>
<th scope="row">Dækkende</th>
<td colspan="2">
@{
switch (ReportData.DayTypeEnum)
@ -61,7 +61,7 @@
</td>
</tr>
<tr>
<th scope="row">Fra/Til</th>
<th scope="row">Periode</th>
<td>
@{
switch (ReportData.DayTypeEnum)

View file

@ -22,7 +22,8 @@
@if (Report != null)
{
<div class="report-page d-print-table">
<div class="report-page">
<div class="d-print-block">
<PageTitle>@Report.ReportData.Name</PageTitle>
<div class="row">
<div class="col-md-6 d-print-none align-content-center">
@ -51,24 +52,19 @@
</div>
<ActivityTableComponent Activities="Report.ReportItems"></ActivityTableComponent>
<ReportActivityLedgerComponent ReportData="Report.ReportData"></ReportActivityLedgerComponent>
</div>
@* <div class="page-break d-block d-print-block"></div> *@
@if (_items.Any())
{
@foreach (var item in _items)
{
<div class="report-page">
<div class="d-print-block">
<ReportItemComponent ReportItem="@item"></ReportItemComponent>
</div>
</div>
}
}
}
else
{
<AppSpinner></AppSpinner>
}
@if (_items.Any())
{
@foreach (var item in _items)
{
<ReportItemComponent ReportItem="@item"></ReportItemComponent>
}
}

View file

@ -47,11 +47,13 @@ public partial class AdminSalesReportViewPage : IDisposable
/// Navigation Manager
/// </summary>
[Inject] private NavigationManager _navigator { get; set; }
/// <summary>
/// Report to render
/// </summary>
private ReportView Report { get; set; }
private List<ReportItemView> _items { get; set; }
private ReportView Report { get; set; } = new();
private List<ReportItemView> _items { get; set; } = new();
protected override async Task OnParametersSetAsync()
{

View file

@ -21,14 +21,14 @@
@using Microsoft.AspNetCore.Authorization
@page "/info"
@attribute [Authorize(Roles = "Adviser,Admin")]
@attribute [Authorize(Roles = "Adviser,Admin,Office,Warehouse")]
<div class="row mb-2">
<div class="col col-md-2">
<img class="grumpy-coder" src="@_app?.Image" alt="Wonky Logo"/>
</div>
<div class="col">
<h5>Browservalg</h5>
De nyeste udgaver af Firefox, Edge, Safari, Vivaldi, Chrome eller Chromium.
Den nyeste udgave af Google Chrome, Chromium, Microsoft Edge, Apple Safari eller Vivaldi.
</div>
</div>
<div class="row">
@ -38,10 +38,7 @@
</div>
<div class="row">
<div class="col">
<h5>
App version <AppVersion></AppVersion>
</h5>
<AppVersion></AppVersion>
</div>
</div>

View file

@ -22,7 +22,7 @@
@if (_report != null)
{
<div class="report-page d-block d-print-block">
<div class="report-page d-print-block">
<PageTitle>@_report.ReportData.Name</PageTitle>
<div class="row">
<div class="col-md-6 d-print-none align-content-center">
@ -60,18 +60,16 @@
</div>
</div>
</div>
@* <div class="page-break d-block d-print-block"></div> *@
}
else
{
<AppSpinner></AppSpinner>
}
@if (_items.Any())
{
@foreach (var item in _items)
{
<div class="report-page d-block d-print-block">
<ReportItemComponent ReportItem="@item"></ReportItemComponent>
</div>
}
}

View file

@ -69,11 +69,6 @@
<span class="oi oi-calendar" aria-hidden="true"></span> ToDo
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/activity-today">
<span class="oi oi-dashboard" aria-hidden="true"></span> Aktivitet
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/companies">
<span class="oi oi-file" aria-hidden="true"></span> Firmaer
@ -84,6 +79,11 @@
<span class="oi oi-spreadsheet" aria-hidden="true"></span> Priskatalog
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/activity-today">
<span class="oi oi-dashboard" aria-hidden="true"></span> Aktivitet
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/sales-reports">
<span class="oi oi-document" aria-hidden="true"></span> Dagsrapporter

View file

@ -1,12 +1,13 @@
{
"appInfo": {
"name": "Wonky Client",
"version": "0.8.118",
"version": "0.8.122",
"isBeta": true,
"sandBox": true,
"image": "grumpy-coder.png"
},
"apiConfig": {
"innoBaseUrl": "https://production.innotec.dk",
"innoBaseUrl": "https://staging.innotec.dk",
"glsTrackUrl": "https://www.gls-group.eu/276-I-PORTAL-WEB/content/GLS/DK01/DA/5004.htm?txtAction=71000&txtRefNo=",
"glsId": "",
"virkUrl": "api/v2/services/virk",

View file

@ -122,3 +122,42 @@ footer.version {
font-weight: bold;
padding: 0 10px 0 0;
}
.report-page {
page-break-after: always;
}
/* printer classes */
@media print {
@page {
size: a4;
}
@font-face {
font-family: 'Montserrat';
src: url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');
}
html, body {
height: 290mm;
width: 210mm;
-webkit-print-color-adjust: exact;
color-adjust: exact;
}
.report-page {
page-break-before: always;
page-break-after: always;
page-break-inside: avoid;
height: initial;
font-size: 10px;
border: initial;
border-radius: initial;
box-shadow: initial;
margin: 0;
width: initial;
-webkit-print-color-adjust: exact;
color-adjust: exact;
}
.distance-ledger {}
.report-ledger {
page-break-inside: avoid;
}
}

View file

@ -1,103 +0,0 @@
/* printer classes */
@media print {
@page {
size: a4;
}
@font-face {
font-family: 'Montserrat';
src: url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');
}
html, body {
/*height: 290mm;*/
/*width: 210mm;*/
-webkit-print-color-adjust: exact;
color-adjust: exact;
}
.page-break {
page-break-before: always;
}
.report-page {
page-break-after: always;
height: initial;
font-size: 10px;
border: initial;
border-radius: initial;
box-shadow: initial;
margin: 0;
width: initial;
-webkit-print-color-adjust: exact;
color-adjust: exact;
}
}
/*
@media print {
*,
*::before,
*::after {
text-shadow: none !important;
box-shadow: none !important;
}
a:not(.btn) {
text-decoration: underline;
}
abbr[title]::after {
content: " (" attr(title) ")";
}
pre {
white-space: pre-wrap !important;
}
pre,
blockquote {
border: 1px solid #adb5bd;
page-break-inside: avoid;
}
tr,
img {
page-break-inside: avoid;
}
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
h2 {
page-break-before: always;
page-break-after: avoid;
}
h3 {
page-break-after: avoid;
}
@page {
size: a4;
}
body {
min-width: 992px !important;
}
.container {
min-width: 992px !important;
}
.badge {
border: 1px solid #000;
}
.table {
border-collapse: collapse !important;
}
.table td,
.table th {
background-color: #fff !important;
}
.table-bordered th,
.table-bordered td {
border: 1px solid #dee2e6 !important;
}
.table-dark {
color: inherit;
}
.table-dark th,
.table-dark td,
.table-dark thead th,
.table-dark tbody + tbody {
border-color: #dee2e6;
}
}*/

View file

@ -5,11 +5,6 @@
<title>Inno Web CRM</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<!--
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="3600" />
-->
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
@ -21,12 +16,11 @@
<link href="css/app.css" rel="stylesheet" />
<link href="Wonky.Client.styles.css" rel="stylesheet" />
<link href="_content/Blazored.Toast/blazored-toast.min.css" rel="stylesheet" />
<link href="css/report-print-21.css" rel="stylesheet" />
</head>
<body>
<div id="app">
<div>
<img class="spinner" src="loader.gif" alt="Vent venligst..."/> Henter data...
<div class="spinner-border text-warning" role="status">
<span class="visually-hidden">Indlæser siden ...</span>
</div>
</div>
<script src="/bootstrap/js/bootstrap.bundle.min.js"></script>

View file

@ -36,4 +36,9 @@ public class AppInfo
/// Application beta version flag
/// </summary>
public bool IsBeta { get; set; }
/// <summary>
/// Sandbox version
/// </summary>
public bool SandBox { get; set; }
}