Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tickets #274

Open
wants to merge 43 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
857d125
Add Tickets
TheR00st3r Jan 10, 2023
ff15ec5
Tickets
TheR00st3r Jan 12, 2023
b5bbafa
SQ Update
TheR00st3r Jan 12, 2023
f58e344
Start add Tickets View
TheR00st3r Jan 19, 2023
1322c1a
.
TheR00st3r Jan 20, 2023
a71a360
Nuget Updates
TheR00st3r Jan 20, 2023
1bbb4bd
Add TicketType Table
TheR00st3r Jan 24, 2023
43721a4
Events
TheR00st3r Jan 25, 2023
bb203cd
add temporary build
Apfelwurm Jan 26, 2023
b3edd41
Start Add TicketPurchase
TheR00st3r Jan 26, 2023
226baac
Merge branch 'feature/Andy_Tickets' of https://github.com/Lan2Play/Ne…
TheR00st3r Jan 26, 2023
9903f88
Start Add TicketCheckout
TheR00st3r Feb 1, 2023
c737b12
:
TheR00st3r Feb 1, 2023
9506528
Update Payment
TheR00st3r Feb 2, 2023
fb07143
Update Packages
TheR00st3r Feb 2, 2023
d349cc9
Move Directory.Build.Props
TheR00st3r Feb 2, 2023
1b7665d
add npm to dockerfile
Apfelwurm Feb 2, 2023
29b83db
fixed local build (default version arg) and disabled pulling of the o…
Apfelwurm Feb 2, 2023
0c704e9
remove bad things :D
Apfelwurm Feb 2, 2023
9439268
Start add Checkout
TheR00st3r Feb 3, 2023
3391e1a
Merge branch 'feature/Andy_Tickets' of https://github.com/Lan2Play/Ne…
TheR00st3r Feb 3, 2023
3f5ecaa
checkout
TheR00st3r Feb 14, 2023
1c15e44
Continue Payment
TheR00st3r Feb 16, 2023
6ff4f16
Update Payment
TheR00st3r Feb 20, 2023
db2f21b
Use Linter
TheR00st3r Feb 21, 2023
d3a804c
Update Nugetpackages
TheR00st3r Feb 21, 2023
d49a55b
Update packages
TheR00st3r Mar 8, 2023
a5dd3ae
Fix Build
TheR00st3r Apr 6, 2023
82c0b72
Fix Build
TheR00st3r May 16, 2023
97fd2c3
Update Nuget Packages
TheR00st3r May 16, 2023
7712669
Update Packages
TheR00st3r Jun 13, 2023
ee63883
Update sonarlint rules
TheR00st3r Jun 13, 2023
9e2f615
Remove deprecated dependency
TheR00st3r Jun 13, 2023
5c2e35e
Compression and async script
TheR00st3r Jun 13, 2023
ab18169
Warnings
TheR00st3r Jun 30, 2023
c2e60af
Usings
TheR00st3r Jun 30, 2023
7384df5
Warnings
TheR00st3r Jun 30, 2023
690c09e
Warnings
TheR00st3r Jun 30, 2023
a04a64c
Warnings
TheR00st3r Jul 18, 2023
cb3b55b
Update Packages
TheR00st3r Jul 19, 2023
f9f9ef6
Update Packages
TheR00st3r Dec 12, 2023
c9fa8d1
Merge Main
TheR00st3r Dec 12, 2023
1791bef
Merge
TheR00st3r Apr 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,8 @@ dotnet_diagnostic.SA1602.severity = none
dotnet_diagnostic.SA1202.severity = none

[**/Migrations/**/*.cs]
dotnet_analyzer_diagnostic.severity = none
dotnet_analyzer_diagnostic.severity = none

[*.razor]
dotnet_diagnostic.S927.severity = none
dotnet_diagnostic.S2696.severity = none
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

# NetEvent specific
NetEvent/Client/wwwroot/lib/
NetEvent/Client/wwwroot/js/

# User-specific files
*.rsuser
Expand Down
122 changes: 122 additions & 0 deletions .sonarlint/lan2play_netevent_css_settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"sonarlint.rules": {
"css:S4659": {
"level": "On",
"parameters": {
"ignorePseudoClasses": "local,global,export,import,deep"
},
"severity": "Major"
},
"css:S4655": {
"level": "On",
"severity": "Major"
},
"css:S4670": {
"level": "On",
"parameters": {
"ignoreTypes": "/^(mat|md|fa)-/",
"ignore": "custom-elements"
},
"severity": "Critical"
},
"css:S4649": {
"level": "On",
"severity": "Major"
},
"css:S4662": {
"level": "On",
"parameters": {
"ignoreAtRules": "value,at-root,content,debug,each,else,error,for,function,if,include,mixin,return,warn,while,extend,use,forward,tailwind,apply,layer,/^@.*/"
},
"severity": "Major"
},
"css:S4667": {
"level": "On",
"severity": "Major"
},
"css:S4648": {
"level": "On",
"severity": "Major"
},
"css:S4647": {
"level": "On",
"severity": "Blocker"
},
"css:S1116": {
"level": "On",
"severity": "Minor"
},
"css:S1128": {
"level": "On",
"severity": "Minor"
},
"css:S4656": {
"level": "On",
"parameters": {
"ignoreFallbacks": "true"
},
"severity": "Major"
},
"css:S4666": {
"level": "On",
"severity": "Major"
},
"css:S4668": {
"level": "On",
"severity": "Blocker"
},
"css:S4661": {
"level": "On",
"severity": "Major"
},
"css:S4663": {
"level": "On",
"severity": "Minor"
},
"css:S4660": {
"level": "On",
"parameters": {
"ignorePseudoElements": "ng-deep,v-deep,deep"
},
"severity": "Major"
},
"css:S4654": {
"level": "On",
"parameters": {
"ignoreSelectors": "/^:export.*/, /^:import.*/",
"ignoreTypes": "composes, /^mso-/"
},
"severity": "Blocker"
},
"css:S4657": {
"level": "On",
"severity": "Critical"
},
"css:S4651": {
"level": "On",
"severity": "Critical"
},
"css:S4650": {
"level": "On",
"severity": "Blocker"
},
"css:S4653": {
"level": "On",
"severity": "Blocker"
},
"css:S4652": {
"level": "On",
"severity": "Major"
},
"css:S4658": {
"level": "On",
"severity": "Major"
},
"css:S5362": {
"level": "Off"
},
"css:S4664": {
"level": "Off"
}
}
}
32 changes: 32 additions & 0 deletions .sonarlint/lan2play_netevent_secrets_settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"sonarlint.rules": {
"secrets:S6338": {
"level": "On",
"severity": "Blocker"
},
"secrets:S6337": {
"level": "On",
"severity": "Blocker"
},
"secrets:S6290": {
"level": "On",
"severity": "Blocker"
},
"secrets:S6334": {
"level": "On",
"severity": "Blocker"
},
"secrets:S6336": {
"level": "On",
"severity": "Blocker"
},
"secrets:S6335": {
"level": "On",
"severity": "Blocker"
},
"secrets:S6292": {
"level": "On",
"severity": "Blocker"
}
}
}
8 changes: 4 additions & 4 deletions CodeCoverage.runsettings
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<ModulePaths>
<Exclude>
<ModulePath>.*Migrations.*</ModulePath>
</Exclude>
</ModulePaths
<Exclude>
<ModulePath>.*Migrations.*</ModulePath>
</Exclude>
</ModulePaths>
20 changes: 11 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@ LABEL stage=builder
LABEL org.opencontainers.image.authors="[email protected]"

#args
ARG NETEVENTNETVER
ARG NETEVENTNETVER=0.0.1
ENV NETEVENTNETVER=$NETEVENTNETVER

#install prereqs
WORKDIR /
RUN apt-get update -qqy && DEBIAN_FRONTEND=noninteractive apt-get install -y \
wget bash apt-transport-https
RUN wget -q -O - https://deb.nodesource.com/setup_current.x | bash -
RUN wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb
RUN rm packages-microsoft-prod.deb
RUN apt-get update -qqy && apt-get install -y dotnet-sdk-7.0 python3 python3-pip wget
RUN apt-get update -qqy && apt-get install -y dotnet-sdk-7.0 python3 python3-pip nodejs
RUN pip install lastversion
RUN eval apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Expand Down Expand Up @@ -61,13 +62,14 @@ RUN chmod +x /usr/local/bin/start-container
RUN chmod +x /usr/local/bin/wait-for.sh

#install prereqs
RUN apt-get update -qqy && DEBIAN_FRONTEND=noninteractive apt-get install -y \
wget apt-transport-https
RUN wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb
RUN rm packages-microsoft-prod.deb
RUN apt-get update -qqy && apt-get install -y aspnetcore-runtime-7.0 netcat curl
RUN eval apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN apt-get update -qqy && \
DEBIAN_FRONTEND=noninteractive apt-get install -y wget apt-transport-https && \
wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb && \
rm packages-microsoft-prod.deb && \
apt-get update -qqy && \
apt-get install -y aspnetcore-runtime-7.0 netcat curl && \
eval apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

#copy NetEvent files
WORKDIR /NetEvent
Expand Down
1 change: 1 addition & 0 deletions NetEvent.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
.gitignore = .gitignore
CodeCoverage.runsettings = CodeCoverage.runsettings
NetEvent\Directory.Build.props = NetEvent\Directory.Build.props
Makefile = Makefile
NetEvent\TestHelper\NetEvent.TestHelper.csproj = NetEvent\TestHelper\NetEvent.TestHelper.csproj
README.md = README.md
Expand Down
4 changes: 4 additions & 0 deletions NetEvent/Client.Tests/NetEvent.Client.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.7.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.8">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{
<MudField Label="@Localize[SystemSetting.LabelKey]" Margin="Margin.Dense" Variant="Variant.Outlined" HelperText="@(string.IsNullOrEmpty(SystemSetting.DescriptionKey) ? string.Empty : Localize[SystemSetting.DescriptionKey])">
<MudText Style="height: 500px; overflow-y: scroll;">
<Editor Value="@SettingValue" ValueChanged="@OnSettingsValueChanged" Inline="true" ScriptSrc="/lib/tinymce/tinymce.min.js" Conf="NetEvent.Client.Extensions.TinyMceConfig.EditorConf" />
<Editor Value="@SettingValue" ValueChanged="@OnSettingsValueChanged" Inline="true" ScriptSrc="@NetEvent.Client.Extensions.TinyMceConfig.ScriptSrc" Conf="NetEvent.Client.Extensions.TinyMceConfig.EditorConf" />
</MudText>
</MudField>
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<MudTabPanel Text="@Localizer[$"Administration.Settings.{SettingsGroup.SettingGroup}"]">
@if (_Loading)
{
<div>@Localizer["Administration.Settings.LoadingData"]</div>
}
else
{
<MudGrid>
@foreach (var systemSetting in SettingsGroup.Settings)
{
<MudItem xs="12" md="6">
<SystemSettingControl SystemSetting="systemSetting" Value="@GetValue(systemSetting.Key)" />
</MudItem>
}
</MudGrid>
}

</MudTabPanel>
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Localization;
using NetEvent.Client.Services;
using NetEvent.Shared.Config;
using NetEvent.Shared.Dto;

namespace NetEvent.Client.Components.Administration
{
public partial class SystemSettingGroupTab
{
#region Injects

[Inject]
private IStringLocalizer<App> Localizer { get; set; } = default!;

[Inject]
private ISystemSettingsDataService SystemSettingsDataService { get; set; } = default!;

#endregion

#region Parameters

[Parameter]
public ISettingsGroup SettingsGroup { get; set; } = default!;

#endregion

private IList<SystemSettingValueDto> _Data = new List<SystemSettingValueDto>();
private bool _Loading = true;

protected override async Task OnInitializedAsync()
{
var cts = new CancellationTokenSource();
_Data = await SystemSettingsDataService.GetSystemSettingsAsync(SettingsGroup.SettingGroup, cts.Token);
_Loading = false;
}

private SystemSettingValueDto? GetValue(string key)
{
return _Data.FirstOrDefault(x => x.Key.Equals(key, StringComparison.Ordinal))
?? new SystemSettingValueDto(key, string.Empty);
}
}
}
33 changes: 33 additions & 0 deletions NetEvent/Client/Extensions/CurrencyConverter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;
using System.Globalization;
using NetEvent.Shared.Dto.Event;

namespace NetEvent.Client.Extensions
{
public class CurrencyConverter : MudBlazor.Converter<int, string>
{
private readonly CurrencyDto _Currency;

public CurrencyConverter(CurrencyDto currency)
{
SetFunc = ToInputValue;
GetFunc = ToCurrencyValue;
_Currency = currency;
}

private int ToCurrencyValue(string arg)
{
if (!double.TryParse(arg, CultureInfo.InvariantCulture, out var value))
{
return 0;
}

return _Currency.ToCurrencyBaseValue(value);
}

private string ToInputValue(int arg)
{
return Convert.ToString(_Currency.ToCurrencyValue(arg), Culture);
}
}
}
2 changes: 2 additions & 0 deletions NetEvent/Client/Extensions/TinyMceConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ public static class TinyMceConfig
private const int _HeaderHeight = 64;
private const int _EditorHeight = 500;

public const string ScriptSrc = "/lib/tinymce/tinymce.min.js";

/// <summary>
/// Provide Editor Config for TinyMce
/// More Information: https://www.tiny.cloud/docs/tinymce/6/editor-important-options/
Expand Down
5 changes: 5 additions & 0 deletions NetEvent/Client/Extensions/UrlHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,10 @@ public static string GetVenueLink(object id, bool edit)

return $"/venue/{id}";
}

public static string GetTicketTypesLink(object eventId, object id)
{
return $"/administration/event/{eventId}/tickettype/{id}";
}
}
}
Loading
Loading