Skip to content

Commit

Permalink
Upgraded to .NET 7
Browse files Browse the repository at this point in the history
  • Loading branch information
bislerium committed Oct 25, 2023
1 parent ff7336c commit 47099c7
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 23 deletions.
21 changes: 9 additions & 12 deletions BikeSparesInventorySystem.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>BikeSparesInventorySystem</RootNamespace>
<UseMaui>true</UseMaui>
Expand All @@ -22,27 +22,24 @@
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">24.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0-maccatalyst|AnyCPU'">
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-maccatalyst|AnyCPU'">
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net6.0-maccatalyst|AnyCPU'">
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0-maccatalyst|AnyCPU'">
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0-windows10.0.19041.0|AnyCPU'">
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-windows10.0.19041.0|AnyCPU'">
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net6.0-windows10.0.19041.0|AnyCPU'">
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net7.0-windows10.0.19041.0|AnyCPU'">
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>

Expand All @@ -67,9 +64,9 @@
<ItemGroup>
<PackageReference Include="Bogus" Version="34.0.2" />
<PackageReference Include="CsvHelper" Version="30.0.1" />
<PackageReference Include="ExcelMapper" Version="5.2.472" />
<PackageReference Include="MudBlazor" Version="6.1.7" />
<PackageReference Include="PSC.Blazor.Components.Chartjs" Version="6.0.35" />
<PackageReference Include="ExcelMapper" Version="5.2.542" />
<PackageReference Include="MudBlazor" Version="6.11.0" />
<PackageReference Include="PSC.Blazor.Components.Chartjs" Version="6.0.41" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Pages/ChangePassword.razor
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<MudTextField T="string" Label="Current Password" @bind-Value="@CurrentPassword" InputType="InputType.Password" Required="true"/>
<MudTextField T="string" Label="New Password" @bind-Value="@NewPassword" Required="true" InputType="InputType.Password" Validation="@(new Func<string, IEnumerable<string>>(Hasher.PasswordStrength))" />
<MudStack Row="true" Class="mt-6 justify-end">
<MudButton Variant="Variant.Filled" Color="Color.Default" DisableElevation="true" OnClick="@(()=>Form.Reset())">Reset</MudButton>
<MudButton Variant="Variant.Filled" Color="Color.Default" DisableElevation="true" OnClick="@(()=>Form.ResetAsync())">Reset</MudButton>
<MudButton Variant="Variant.Filled" Color="Color.Primary" DisableElevation="true" OnClick="@ChangePasswordHandler">Change</MudButton>
</MudStack>
</MudForm>
Expand Down
2 changes: 1 addition & 1 deletion Pages/ChangePassword.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ private void ChangePasswordHandler()
{
_authService.ChangePassword(CurrentPassword, NewPassword);
SnackBar.Add("The password has been changed successfully.", Severity.Success);
Form.Reset();
Form.ResetAsync();
}
}
catch (Exception e)
Expand Down
8 changes: 4 additions & 4 deletions Pages/Dashboard.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,28 +99,28 @@ protected sealed override void OnInitialized()

BarDataset ApprovedDeductionQuantitySet = new()
{
Data = new List<decimal>(),
Data = new List<decimal?>(),
BackgroundColor = new() { "rgb(0, 163, 68)" },
Label = "Approved Deduction (Taken Out)",
};

BarDataset AvailableQuantitySet = new()
{
Data = new List<decimal>(),
Data = new List<decimal?>(),
BackgroundColor = new() { "rgb(111, 83, 255)" },
Label = "Available"
};

BarDataset PendingDeductionQuantitySet = new()
{
Data = new List<decimal>(),
Data = new List<decimal?>(),
BackgroundColor = new() { "rgb(252, 152, 0)" },
Label = "Pending Deduction (On Hold)"
};

BarDataset DisapprovedDeductionQuantitySet = new()
{
Data = new List<decimal>(),
Data = new List<decimal?>(),
BackgroundColor = new() { "rgb(255, 45, 13)" },
Label = "Disapproved Deduction",
};
Expand Down
4 changes: 2 additions & 2 deletions Pages/Inventory.razor
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@
@if (GetShow(@context.Id))
{
<td colspan="6">
<MudContainer MaxWidth="MaxWidth.Medium">
<MudText Style="padding: 40px">@context.Description</MudText>
<MudContainer MaxWidth="MaxWidth.Medium">
<MudText Style="padding: 40px">@context.Description</MudText>
</MudContainer>
</td>
}
Expand Down
4 changes: 2 additions & 2 deletions Shared/Dialogs/AddSpareDialog.razor
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
<MudTextField T="string" @bind-Value="@Description" Label="Description" Required="true" RequiredError="Description is required!" Lines="5" />
<MudTextField T="string" @bind-Value="@Company" Label="Company" Required="true" RequiredError="Company is required!" />
<MudTextField T="Decimal" @bind-Value="@Price" Label="Price" Variant="Variant.Text" Adornment="Adornment.End" AdornmentText="NPR" Validation="@(new RangeAttribute(1, 10000000) { ErrorMessage = "Price must be between 1 and 10000000"})" />
<MudNumericField @bind-Value="@AvailableQuantity" Required="true" Label="Quantity" Variant="Variant.Text" Min="1" Max="100000" />
<MudNumericField @bind-Value="@AvailableQuantity" Required="true" Label="Quantity" Variant="Variant.Text" Min="0" Max="100000" Validation="@(new RangeAttribute(1, 100000) { ErrorMessage = "Quantity must be between 1 and 100000"})" />
</MudForm>
</DialogContent>
<DialogActions>
<MudButton OnClick="Cancel">Cancel</MudButton>
<MudButton Variant="Variant.Filled" DisableElevation="true" OnClick="@(()=> form.Reset())" Class="mx-2">Reset</MudButton>
<MudButton Variant="Variant.Filled" DisableElevation="true" OnClick="@(()=> form.ResetAsync())" Class="mx-2">Reset</MudButton>
<MudButton Variant="Variant.Filled" Color="Color.Primary" DisableElevation="true" OnClick="@AddSpare">Add</MudButton>
</DialogActions>
</MudDialog>
2 changes: 1 addition & 1 deletion Shared/Dialogs/AddUserDialog.razor
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</DialogContent>
<DialogActions>
<MudButton OnClick="Cancel">Cancel</MudButton>
<MudButton Variant="Variant.Filled" DisableElevation="true" OnClick="@(()=> form.Reset())" Class="mx-2">Reset</MudButton>
<MudButton Variant="Variant.Filled" DisableElevation="true" OnClick="@(()=> form.ResetAsync())" Class="mx-2">Reset</MudButton>
<MudButton Variant="Variant.Filled" Color="Color.Primary" DisableElevation="true" OnClick="AddUser">Add</MudButton>
</DialogActions>
</MudDialog>

0 comments on commit 47099c7

Please sign in to comment.