published v0.8.59-beta

This commit is contained in:
Frede Hundewadt 2022-06-29 16:07:05 +02:00
parent 631af750c1
commit 200433b8e1
3 changed files with 13 additions and 12 deletions

View file

@ -93,7 +93,7 @@
</th> </th>
<td> <td>
<button type="button" class="btn btn-success" <button type="button" class="btn btn-success"
@onclick="SubmitReport" disabled="@(_noFigures)"> @onclick="SubmitReport" disabled="@(_noFigures || _working)">
Gem Rapport Gem Rapport
</button> </button>
</td> </td>

View file

@ -13,6 +13,7 @@
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
// //
using System.Globalization;
using System.Runtime.Intrinsics; using System.Runtime.Intrinsics;
using System.Text.Json; using System.Text.Json;
using Blazored.Toast.Services; using Blazored.Toast.Services;
@ -72,8 +73,8 @@ public partial class SalesReportNew : IDisposable
_leaveBegin = _workDate; _leaveBegin = _workDate;
_leaveEnd = _workDate; _leaveEnd = _workDate;
_report.FromDateTime = $"{_workDate:yyyy-MM-dd 12:00}"; _report.FromDateTime = $"{_workDate:yyyy-MM-dd'T'12:00:00}";
_report.ToDateTime = $"{_workDate:yyyy-MM-dd 12:00}"; _report.ToDateTime = $"{_workDate:yyyy-MM-dd'T'12:00:00}";
_report.Figures.Distance = 0; _report.Figures.Distance = 0;
_report.Figures.DistancePrivateMonth = 0; _report.Figures.DistancePrivateMonth = 0;
@ -117,14 +118,14 @@ public partial class SalesReportNew : IDisposable
checkOut = new DateTime(_workDate.Year, _workDate.Month, _workDate.Day, _checkOut.Hour, _checkOut.Minute, 0); checkOut = new DateTime(_workDate.Year, _workDate.Month, _workDate.Day, _checkOut.Hour, _checkOut.Minute, 0);
} }
_report.FromDateTime = $"{checkIn:yyyy-MM-dd hh:mm}"; _report.FromDateTime = checkIn.ToString("yyyy-MM-dd'T'HH:mm:ss", CultureInfo.InvariantCulture);
_report.ToDateTime = $"{checkOut:yyyy-MM-dd hh:mm}"; _report.ToDateTime = checkOut.ToString("yyyy-MM-dd'T'HH:mm:ss", CultureInfo.InvariantCulture);
_report.Figures.Distance = _report.Figures.KmEvening - _report.Figures.KmMorning; _report.Figures.Distance = _report.Figures.KmEvening - _report.Figures.KmMorning;
_report.Figures.DistanceMonth += _report.Figures.Distance; _report.Figures.DistanceMonth += _report.Figures.Distance;
_report.Figures.DistancePrivateMonth += _report.Figures.DistancePrivate; _report.Figures.DistancePrivateMonth += _report.Figures.DistancePrivate;
_logger.LogDebug("_workDate => {workDate}", $"{_workDate:yyyyy-MM-dd}"); _logger.LogDebug("_workDate => {workDate}", $"{_workDate:yyyy-MM-dd}");
_logger.LogDebug("_report => {report}", JsonSerializer.Serialize(_report)); _logger.LogDebug("_report => {report}", JsonSerializer.Serialize(_report));
var result = await _reportRepo.PostReport($"{_workDate:yyyy-MM-dd}", _report); var result = await _reportRepo.PostReport($"{_workDate:yyyy-MM-dd}", _report);
@ -138,10 +139,10 @@ public partial class SalesReportNew : IDisposable
private void OnTimeChanged() private void OnTimeChanged()
{ {
var f = new DateTime(_workDate.Year, _workDate.Month, _workDate.Day, _checkIn.Hour, _checkIn.Minute,0); var f = new DateTime(_workDate.Year, _workDate.Month, _workDate.Day, _checkIn.Hour, _checkIn.Minute,0);
_report.FromDateTime = $"{f:yyyy-MM-dd hh:mm}"; _report.FromDateTime = $"{f:yyyy-MM-dd'T'HH:mm}";
var t = new DateTime(_workDate.Year, _workDate.Month, _workDate.Day, _checkOut.Hour, _checkOut.Minute,0); var t = new DateTime(_workDate.Year, _workDate.Month, _workDate.Day, _checkOut.Hour, _checkOut.Minute,0);
_report.ToDateTime = $"{t:yyyy-MM-dd hh:mm}"; _report.ToDateTime = $"{t:yyyy-MM-dd'T'HH:mm}";
} }
private void SetWorkDate(string workDate) private void SetWorkDate(string workDate)
@ -157,8 +158,8 @@ public partial class SalesReportNew : IDisposable
_report.Figures.DistanceMonth = 0; _report.Figures.DistanceMonth = 0;
_report.Figures.DistancePrivate = 0; _report.Figures.DistancePrivate = 0;
_report.Figures.DistancePrivateMonth = 0; _report.Figures.DistancePrivateMonth = 0;
_report.FromDateTime = $"{_workDate:yyyy-MM-dd 12:00}"; _report.FromDateTime = $"{_workDate:yyyy-MM-dd'T'12:00}";
_report.ToDateTime = $"{_workDate:yyyy-MM-dd 12:00}"; _report.ToDateTime = $"{_workDate:yyyy-MM-dd'T'12:00}";
} }
private async Task GetKeyFigures() private async Task GetKeyFigures()

View file

@ -1,7 +1,7 @@
{ {
"appInfo": { "appInfo": {
"name": "Wonky Client", "name": "Wonky Client",
"version": "0.8.57", "version": "0.8.59",
"isBeta": true, "isBeta": true,
"image": "grumpy-coder.png" "image": "grumpy-coder.png"
}, },