Skip to content

Commit 4274dfc

Browse files
authored
Merge pull request #143 from mark-szabo/v2.2
CarWash App v2.2 - Graphisoft Park Expansion
2 parents fd3cf82 + 83d5bcd commit 4274dfc

File tree

77 files changed

+38240
-18260
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+38240
-18260
lines changed

.github/workflows/mimosonk.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build and deploy to PROD
2+
on:
3+
push:
4+
branches:
5+
- main
6+
env:
7+
AZURE_WEBAPP_NAME: mimosonk
8+
AZURE_WEBAPP_PACKAGE_PATH: CarWash.PWA\publish
9+
CONFIGURATION: Release
10+
DOTNET_CORE_VERSION: 8.0.x
11+
WORKING_DIRECTORY: CarWash.PWA
12+
jobs:
13+
build:
14+
runs-on: windows-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Setup .NET SDK
18+
uses: actions/setup-dotnet@v3
19+
with:
20+
dotnet-version: ${{ env.DOTNET_CORE_VERSION }}
21+
- name: Restore
22+
run: dotnet restore "${{ env.WORKING_DIRECTORY }}"
23+
- name: Build
24+
run: dotnet build "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-restore
25+
- name: Test
26+
run: dotnet test "${{ env.WORKING_DIRECTORY }}" --no-build
27+
- name: Publish
28+
run: dotnet publish "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-build --output "${{ env.AZURE_WEBAPP_PACKAGE_PATH }}"
29+
- name: Publish Artifacts
30+
uses: actions/upload-artifact@v3
31+
with:
32+
name: webapp
33+
path: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
34+
deploy:
35+
runs-on: windows-latest
36+
needs: build
37+
steps:
38+
- name: Download artifact from build job
39+
uses: actions/download-artifact@v3
40+
with:
41+
name: webapp
42+
path: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
43+
- name: Deploy to Azure WebApp
44+
uses: azure/webapps-deploy@v2
45+
with:
46+
app-name: ${{ env.AZURE_WEBAPP_NAME }}
47+
publish-profile: ${{ secrets.mimosonk_E838 }}
48+
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ CarWash\.PWA\.Windows/bld/
2222
CarWash\.PWA\.Windows/_pkginfo\.txt
2323

2424
TestResults/
25+
CarWash.PWA/Properties/serviceDependencies.mimosonk.json
Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,42 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
2-
1+
<Project Sdk="Microsoft.NET.Sdk">
32
<PropertyGroup>
4-
<TargetFramework>netstandard2.1</TargetFramework>
3+
<TargetFramework>net8.0</TargetFramework>
54
</PropertyGroup>
6-
75
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
86
<DocumentationFile>bin\Debug\netstandard2.0\CarWash.ClassLibrary.xml</DocumentationFile>
97
</PropertyGroup>
10-
118
<ItemGroup>
129
<Compile Remove="Migrations\20180902003120_PushSubscription.cs" />
1310
<Compile Remove="Migrations\20180902003549_PushSubscription.cs" />
1411
<Compile Remove="Migrations\20180902233002_Keys.cs" />
1512
<Compile Remove="Migrations\20180905115640_PushSubscription.cs" />
1613
</ItemGroup>
17-
1814
<ItemGroup>
19-
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.13.1" />
20-
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.3" />
21-
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="4.1.3" />
22-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.3" />
23-
<PackageReference Include="Microsoft.EntityFrameworkCore.Analyzers" Version="3.1.3" />
24-
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.3" />
25-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.3" />
26-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="3.1.3" />
27-
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="3.1.3" />
28-
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="3.1.3" />
29-
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="3.1.3" />
30-
<PackageReference Include="Microsoft.Graph" Version="3.3.0" />
31-
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
32-
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />
33-
<PackageReference Include="WebPush" Version="1.0.11" />
34-
<PackageReference Include="WindowsAzure.Storage" Version="9.3.3" />
15+
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.18.2" />
16+
<PackageReference Include="Azure.Storage.Common" Version="12.21.1" />
17+
<PackageReference Include="Azure.Storage.Queues" Version="12.20.1" />
18+
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.22.0" />
19+
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0">
20+
<PrivateAssets>all</PrivateAssets>
21+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
22+
</PackageReference>
23+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.9.2" />
24+
<PackageReference Include="Microsoft.Graph" Version="5.61.0" />
25+
<PackageReference Include="WebPush" Version="1.0.12" />
26+
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.10" />
27+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.10" />
28+
<PackageReference Include="Microsoft.EntityFrameworkCore.Analyzers" Version="8.0.10" />
29+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.10">
30+
<PrivateAssets>all</PrivateAssets>
31+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
32+
</PackageReference>
33+
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.10" />
34+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.10" />
35+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
36+
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
37+
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="8.0.10" />
38+
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="8.0.10" />
39+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
40+
<PackageReference Include="System.Text.Json" Version="8.0.5" />
3541
</ItemGroup>
36-
37-
</Project>
42+
</Project>

CarWash.ClassLibrary/Enums/ServiceType.cs

Lines changed: 135 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Collections.Generic;
2+
using System.Text.Json.Serialization;
23
using static CarWash.ClassLibrary.Enums.ServiceType;
34

45
namespace CarWash.ClassLibrary.Enums
@@ -86,20 +87,129 @@ public static class ServiceTypes
8687
/// </summary>
8788
public static readonly List<Service> Types = new List<Service>
8889
{
89-
new Service {Type = Exterior, TimeInMinutes = 12, Price = 3213, PriceMpv = 4017, Hidden = false},
90-
new Service {Type = Interior, TimeInMinutes = 12, Price = 1607, PriceMpv = 2410, Hidden = false},
91-
new Service {Type = Carpet, TimeInMinutes = 24, Price = -1, PriceMpv = -1, Hidden = false},
92-
new Service {Type = SpotCleaning, TimeInMinutes = 0, Price = 3534, PriceMpv = 3534, Hidden = false},
93-
new Service {Type = VignetteRemoval, TimeInMinutes = 0, Price = 466, PriceMpv = 466, Hidden = false},
94-
new Service {Type = Polishing, TimeInMinutes = 0, Price = 4498, PriceMpv = 4498, Hidden = false},
95-
new Service {Type = AcCleaningOzon, TimeInMinutes = 0, Price = 8033, PriceMpv = 8033, Hidden = false},
96-
new Service {Type = AcCleaningBomba, TimeInMinutes = 0, Price = 6426, PriceMpv = 6426, Hidden = false},
97-
new Service {Type = BugRemoval, TimeInMinutes = 0, Price = 804, PriceMpv = 804, Hidden = true},
98-
new Service {Type = WheelCleaning, TimeInMinutes = 0, Price = 964, PriceMpv = 964, Hidden = true},
99-
new Service {Type = TireCare, TimeInMinutes = 0, Price = 804, PriceMpv = 804, Hidden = true},
100-
new Service {Type = LeatherCare, TimeInMinutes = 0, Price = 8033, PriceMpv = 8033, Hidden = true},
101-
new Service {Type = PlasticCare, TimeInMinutes = 0, Price = 7230, PriceMpv = 7230, Hidden = true},
102-
new Service {Type = PreWash, TimeInMinutes = 0, Price = 804, PriceMpv = 804, Hidden = true}
90+
new Service {
91+
Type = Exterior,
92+
Name = "exterior",
93+
TimeInMinutes = 12,
94+
Price = 3712,
95+
PriceMpv = 4641,
96+
Hidden = false
97+
},
98+
new Service {
99+
Type = Interior,
100+
Name = "interior",
101+
TimeInMinutes = 12,
102+
Price = 2124,
103+
PriceMpv = 3180,
104+
Hidden = false},
105+
new Service {
106+
Type = Carpet,
107+
Name = "carpet",
108+
Description = "whole carpet cleaning, including all the seats",
109+
TimeInMinutes = 24,
110+
Price = -1,
111+
PriceMpv = -1,
112+
Hidden = false
113+
},
114+
new Service {
115+
Type = SpotCleaning,
116+
Name = "spot cleaning",
117+
Description = "partial cleaning of the carpet, only where it is needed (eg. when something is spilled in the car)",
118+
TimeInMinutes = 0,
119+
Price = 4474,
120+
PriceMpv = 4474,
121+
Hidden = false
122+
},
123+
new Service {
124+
Type = VignetteRemoval,
125+
Name = "vignette removal",
126+
Description = "eg. highway vignettes on the windscreen",
127+
TimeInMinutes = 0,
128+
Price = 593,
129+
PriceMpv = 593,
130+
Hidden = false
131+
},
132+
new Service {
133+
Type = Polishing,
134+
Name = "polishing",
135+
Description = "for small scratches",
136+
TimeInMinutes = 0,
137+
Price = 5693,
138+
PriceMpv = 5693,
139+
Hidden = false
140+
},
141+
new Service {
142+
Type = AcCleaningOzon,
143+
Name = "AC cleaning 'ozon'",
144+
Description = "disinfects molecules with ozone",
145+
TimeInMinutes = 0,
146+
Price = 10166,
147+
PriceMpv = 10166,
148+
Hidden = false
149+
},
150+
new Service {
151+
Type = AcCleaningBomba,
152+
Name = "AC cleaning 'bomba'",
153+
Description = "blowing chemical spray in the AC system",
154+
TimeInMinutes = 0,
155+
Price = 8131,
156+
PriceMpv = 8131,
157+
Hidden = false
158+
},
159+
new Service {
160+
Type = BugRemoval,
161+
Name = "bug removal",
162+
Description = "we'll add this if it's needed",
163+
TimeInMinutes = 0,
164+
Price = 1018,
165+
PriceMpv = 1018,
166+
Hidden = true
167+
},
168+
new Service {
169+
Type = WheelCleaning,
170+
Name = "wheel cleaning",
171+
Description = "we'll add this if it's needed",
172+
TimeInMinutes = 0,
173+
Price = 1219,
174+
PriceMpv = 1219,
175+
Hidden = true
176+
},
177+
new Service {
178+
Type = TireCare,
179+
Name = "tire care",
180+
Description = "we'll add this if it's needed",
181+
TimeInMinutes = 0,
182+
Price = 1018,
183+
PriceMpv = 1018,
184+
Hidden = true
185+
},
186+
new Service {
187+
Type = LeatherCare,
188+
Name = "leather care",
189+
Description = "we'll add this if it's needed",
190+
TimeInMinutes = 0,
191+
Price = 10166,
192+
PriceMpv = 10166,
193+
Hidden = true
194+
},
195+
new Service {
196+
Type = PlasticCare,
197+
Name = "plastic care",
198+
Description = "we'll add this if it's needed",
199+
TimeInMinutes = 0,
200+
Price = 9149,
201+
PriceMpv = 9149,
202+
Hidden = true
203+
},
204+
new Service {
205+
Type = PreWash,
206+
Name = "prewash",
207+
Description = "we'll add this if it's needed",
208+
TimeInMinutes = 0,
209+
Price = 1018,
210+
PriceMpv = 1018,
211+
Hidden = true
212+
}
103213
};
104214
}
105215

@@ -111,8 +221,19 @@ public class Service
111221
/// <summary>
112222
/// Gets or sets the type of the service.
113223
/// </summary>
224+
[JsonPropertyName("id")]
114225
public ServiceType Type { get; set; }
115226

227+
/// <summary>
228+
/// Gets or sets the name of the service.
229+
/// </summary>
230+
public string Name { get; set; }
231+
232+
/// <summary>
233+
/// Gets or sets the description of the service.
234+
/// </summary>
235+
public string Description { get; set; }
236+
116237
/// <summary>
117238
/// Gets or sets the time needed for this service.
118239
/// </summary>

0 commit comments

Comments
 (0)