Skip to content

Commit 72b1aa9

Browse files
authored
Merge pull request #3 from VladStandard/develop
VERSION: 2.1.0.1
2 parents cb6a0ba + ec568b1 commit 72b1aa9

File tree

23 files changed

+58
-29
lines changed

23 files changed

+58
-29
lines changed

Src/Apps/Desktop/ScalesDesktop/Platforms/Windows/Package.appxmanifest

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
xmlns:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2"
1212
IgnorableNamespaces="uap rescap uap3 uap6 iot uap4 uap2">
1313

14-
<Identity Name="maui-package-name-placeholder" Publisher="CN=Владимирский Стандарт" Version="2.0.2.6" />
14+
<Identity Name="maui-package-name-placeholder" Publisher="CN=Владимирский Стандарт" Version="2.1.0.1" />
1515

1616
<mp:PhoneIdentity PhoneProductId="EC66F7DD-78BD-4919-99F7-6D5AD5A05E41" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
1717

Src/Apps/Desktop/ScalesDesktop/Source/Shared/Refit/Clients/DesktopRefitClient.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public void Configure(MauiAppBuilder builder)
1414
ServerCertificateCustomValidationCallback =
1515
HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
1616
})
17-
.AddHttpMessageHandler<HostNameMessageHandler>();
17+
.AddHttpMessageHandler<HostNameMessageHandler>()
18+
.AddHttpMessageHandler<AcceptLanguageHandler>();
1819
}
1920
}

Src/Apps/Desktop/ScalesDesktop/appsettings.DevelopVS.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"MockPrinter": false,
44
"MockScales": false,
55
"Api": {
6-
"BaseUrl": "https://scales-api-dev.kolbasa-vs.local/api/desktop"
6+
"BaseUrl": "https://scales-api-dev.kolbasa-vs.local/desktop"
77
}
88
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"FullScreenMode": true,
33
"Api": {
4-
"BaseUrl": "https://scales-api.kolbasa-vs.local/api/desktop"
4+
"BaseUrl": "https://scales-api.kolbasa-vs.local/desktop"
55
}
66
}

Src/Apps/Desktop/Ws.Desktop.Api/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
{
6161
SupportedCultures = supportedCultures,
6262
SupportedUICultures = supportedCultures,
63-
DefaultRequestCulture = new(Cultures.En.Name)
63+
DefaultRequestCulture = new(Cultures.Ru.Name)
6464
};
6565

6666
WebApplication app = builder.Build();

Src/Apps/Exchange/Ws.PalychExchange.Api/App/Features/Boxes/Impl/BoxApiService.private.cs

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ private void SaveBoxes(HashSet<BoxDto> validDtos)
1616
{
1717
DbContext.BulkInsertOrUpdate(boxes, options =>
1818
{
19+
options.UseTempDB = true;
1920
options.UpdateByProperties = [nameof(BoxEntity.Id)];
2021
options.PropertiesToExcludeOnUpdate = [nameof(BoxEntity.CreateDt)];
2122
});

Src/Apps/Exchange/Ws.PalychExchange.Api/App/Features/Brands/Impl/BrandApiService.cs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using Ws.PalychExchange.Api.App.Features.Brands.Common;
22
using Ws.PalychExchange.Api.App.Features.Brands.Dto;
3+
using Ws.PalychExchange.Api.App.Shared.Middlewares;
34

45
namespace Ws.PalychExchange.Api.App.Features.Brands.Impl;
56

Src/Apps/Exchange/Ws.PalychExchange.Api/App/Features/Brands/Impl/BrandApiService.private.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ private void SaveBrands(HashSet<BrandDto> validDtos)
4141
{
4242
DbContext.BulkInsertOrUpdate(brands, options =>
4343
{
44+
options.UseTempDB = true;
4445
options.UpdateByProperties = [nameof(BrandEntity.Id)];
4546
options.PropertiesToExcludeOnUpdate = [nameof(BrandEntity.CreateDt)];
4647
});
@@ -49,7 +50,7 @@ private void SaveBrands(HashSet<BrandDto> validDtos)
4950

5051
OutputDto.AddSuccess(brands.ConvertAll(i => i.Id));
5152
}
52-
catch (Exception)
53+
catch (Exception ex)
5354
{
5455
transaction.Rollback();
5556
OutputDto.AddError(brands.ConvertAll(i => i.Id), "Не предвиденная ошибка");

Src/Apps/Exchange/Ws.PalychExchange.Api/App/Features/Bundles/Impl/BundleApiService.private.cs

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ private void SaveBundles(HashSet<BundleDto> validDtos)
1616
{
1717
DbContext.BulkInsertOrUpdate(bundles, options =>
1818
{
19+
options.UseTempDB = true;
1920
options.UpdateByProperties = [nameof(BundleEntity.Id)];
2021
options.PropertiesToExcludeOnUpdate = [nameof(BundleEntity.CreateDt)];
2122
});

Src/Apps/Exchange/Ws.PalychExchange.Api/App/Features/Characteristics/Impl/CharacteristicApiService.private.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ private void SaveCharacteristics(HashSet<GroupedCharacteristic> dtos)
7979
{
8080
DbContext.BulkInsertOrUpdate(characteristics, options =>
8181
{
82+
options.UseTempDB = true;
8283
options.UpdateByProperties = [nameof(CharacteristicEntity.Id)];
8384
options.PropertiesToExcludeOnUpdate = [nameof(CharacteristicEntity.CreateDt)];
8485
});
@@ -106,7 +107,7 @@ private void DeleteCharacteristics(HashSet<GroupedCharacteristic> dtos)
106107
using IDbContextTransaction transaction = DbContext.Database.BeginTransaction();
107108
try
108109
{
109-
DbContext.BulkDelete(characteristicToDelete);
110+
DbContext.BulkDelete(characteristicToDelete, config => config.UseTempDB = true);
110111
transaction.Commit();
111112
OutputDto.AddSuccess(deletedUid);
112113
}

Src/Apps/Exchange/Ws.PalychExchange.Api/App/Features/Clips/Impl/ClipApiService.private.cs

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ private void SaveClips(HashSet<ClipDto> validDtos)
1616
{
1717
DbContext.BulkInsertOrUpdate(clips, options =>
1818
{
19+
options.UseTempDB = true;
1920
options.UpdateByProperties = [nameof(ClipEntity.Id)];
2021
options.PropertiesToExcludeOnUpdate = [nameof(ClipEntity.CreateDt)];
2122
});

Src/Apps/Exchange/Ws.PalychExchange.Api/App/Features/Plus/Impl/PluApiService.private.cs

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ private void SavePlus(HashSet<PluDto> validDtos)
5151
{
5252
DbContext.BulkInsertOrUpdate(plus, options =>
5353
{
54+
options.UseTempDB = true;
5455
options.UpdateByProperties = [nameof(PluEntity.Id)];
5556
options.PropertiesToExcludeOnUpdate = [nameof(PluEntity.CreateDt), nameof(PluEntity.TemplateId)];
5657
});
@@ -109,6 +110,7 @@ private void SaveNestings(HashSet<PluDto> validDtos)
109110
{
110111
DbContext.BulkInsertOrUpdate(nestings, options =>
111112
{
113+
options.UseTempDB = true;
112114
options.UpdateByProperties = [nameof(NestingEntity.Id)];
113115
options.PropertiesToExcludeOnUpdate = [nameof(NestingEntity.CreateDt)];
114116
});

Src/Apps/Other/Api.Gateway/appsettings.Development.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"Routes": [
99
{
10-
"UpstreamPathTemplate": "/api/desktop/{everything}",
10+
"UpstreamPathTemplate": "/desktop/{everything}",
1111
"DownstreamPathTemplate": "/api/{everything}",
1212
"DownstreamHostAndPorts": [
1313
{
@@ -18,7 +18,7 @@
1818
"DangerousAcceptAnyServerCertificateValidator": true
1919
},
2020
{
21-
"UpstreamPathTemplate": "/api/exchange/{everything}",
21+
"UpstreamPathTemplate": "/exchange/{everything}",
2222
"DownstreamPathTemplate": "/api/{everything}",
2323
"DownstreamHostAndPorts": [
2424
{
@@ -29,7 +29,7 @@
2929
"DangerousAcceptAnyServerCertificateValidator": true
3030
},
3131
{
32-
"UpstreamPathTemplate": "/api/device-control/{everything}",
32+
"UpstreamPathTemplate": "/device-control/{everything}",
3333
"DownstreamPathTemplate": "/api/{everything}",
3434
"DownstreamHostAndPorts": [
3535
{

Src/Apps/Other/Api.Gateway/appsettings.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"Routes": [
99
{
10-
"UpstreamPathTemplate": "/api/desktop/{everything}",
10+
"UpstreamPathTemplate": "/desktop/{everything}",
1111
"DownstreamPathTemplate": "/api/{everything}",
1212
"DownstreamHostAndPorts": [
1313
{
@@ -18,7 +18,7 @@
1818
"DangerousAcceptAnyServerCertificateValidator": true
1919
},
2020
{
21-
"UpstreamPathTemplate": "/api/exchange/{everything}",
21+
"UpstreamPathTemplate": "/exchange/{everything}",
2222
"DownstreamPathTemplate": "/api/{everything}",
2323
"DownstreamHostAndPorts": [
2424
{
@@ -29,7 +29,7 @@
2929
"DangerousAcceptAnyServerCertificateValidator": true
3030
},
3131
{
32-
"UpstreamPathTemplate": "/api/device-control/{everything}",
32+
"UpstreamPathTemplate": "/device-control/{everything}",
3333
"DownstreamPathTemplate": "/api/{everything}",
3434
"DownstreamHostAndPorts": [
3535
{

Src/Apps/Web/DeviceControl/Source/Features/BarcodeConfigurator/BarcodeConfigurator.razor

+4-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
</div>
2727
</CascadingValue>
2828

29-
<div class="flex w-full py-4 gap-2 justify-end items-center overflow-hidden flex-wrap gap-y-8">
29+
<div class="flex w-full py-4 gap-2 justify-between items-center overflow-hidden flex-wrap gap-y-8">
30+
<Badge Type="@BadgeType.Outline">
31+
@WsDataLocalizer["ColLength"]: @ExtendedBarcodeDictionary.Sum(x => x.Example.Count(char.IsDigit))
32+
</Badge>
3033
<div class="gap-2 flex">
3134
<Button Variant="ButtonVariantType.Outline" OnClick="@ResetBarcode">
3235
<ArrowUturnLeftIcon class="size-[1.1rem] md:mr-2"/>

Src/Apps/Web/DeviceControl/appsettings.Development.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
"Authority": "http://10.0.204.55:7561",
1414
"RequireHttpsMetadata": false
1515
},
16-
"WebApi": "https://scales-api-dev.kolbasa-vs.local/api/device-control",
16+
"WebApi": "https://scales-api-dev.kolbasa-vs.local/device-control",
1717
"LabelaryApi": "http://api.labelary.com"
1818
}

Src/Apps/Web/DeviceControl/appsettings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"Authority": "http://10.0.204.55:80",
1414
"RequireHttpsMetadata": false
1515
},
16-
"WebApi": "https://scales-api.kolbasa-vs.local/api/device-control",
16+
"WebApi": "https://scales-api.kolbasa-vs.local/device-control",
1717
"LabelaryApi": "http://api.labelary.com",
1818
"AllowedHosts": "*"
1919
}

Src/Apps/Web/Ws.DeviceControl.Api/App/Shared/Helpers/UserHelper.cs

+7
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@ public async Task<bool> ValidatePolicyAsync(string policy) =>
2929

3030
public async Task CanUserWorkWithProductionSiteAsync(Guid productionSiteId)
3131
{
32+
if (productionSiteId == DefaultConsts.GuidMax)
33+
{
34+
bool isDeveloper = await ValidatePolicyAsync(PolicyEnum.Developer);
35+
if (isDeveloper) return;
36+
}
37+
3238
bool isSenior = await ValidatePolicyAsync(PolicyEnum.SeniorSupport);
39+
3340
if (isSenior && productionSiteId != DefaultConsts.GuidMax) return;
3441

3542
bool canWork =

Src/Apps/Web/Ws.DeviceControl.Api/Ws.DeviceControl.Api.csproj

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
</ItemGroup>
77

88
<ItemGroup Label="Packages">
9-
<PackageReference Include="Keycloak.AuthServices.Authentication" Version="2.5.3" />
10-
<PackageReference Include="Keycloak.AuthServices.Authorization" Version="2.5.3" />
11-
<PackageReference Include="Keycloak.AuthServices.Common" Version="2.5.3" />
12-
<PackageReference Include="ProjectionTools" Version="1.0.17" />
9+
<PackageReference Include="Keycloak.AuthServices.Authentication" VersionOverride="2.5.3" />
10+
<PackageReference Include="Keycloak.AuthServices.Authorization" VersionOverride="2.5.3" />
11+
<PackageReference Include="Keycloak.AuthServices.Common" VersionOverride="2.5.3" />
12+
<PackageReference Include="ProjectionTools" VersionOverride="1.0.17" />
1313
</ItemGroup>
1414

1515
<ItemGroup Label="Projects">
@@ -18,11 +18,11 @@
1818
<ProjectReference Include="..\..\..\Libs\Ws.Shared\Ws.Shared.csproj" PrivateAssets="All" />
1919
<ProjectReference Include="..\..\..\Infrastructure\Ws.Database.EntityFramework\Ws.Database.EntityFramework.csproj" PrivateAssets="All" />
2020
</ItemGroup>
21-
21+
2222
<ItemGroup Label="For testing additional files">
2323
<Content Include="zHttp\.profiles\*" />
2424
</ItemGroup>
25-
25+
2626
<ItemGroup>
2727
<EmbeddedResource Update="App\Shared\Localization\ApplicationResources.resx">
2828
<Generator>PublicResXFileCodeGenerator</Generator>
@@ -41,7 +41,7 @@
4141
<LastGenOutput>ApplicationResources.ru-RU.Designer.cs</LastGenOutput>
4242
</EmbeddedResource>
4343
</ItemGroup>
44-
44+
4545
<ItemGroup>
4646
<Compile Update="App\Shared\Localization\ApplicationResources.Designer.cs">
4747
<DesignTime>True</DesignTime>

Src/Apps/Web/Ws.DeviceControl.Api/appsettings.json

+10
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,15 @@
55
"Microsoft.AspNetCore": "Warning"
66
}
77
},
8+
"Keycloak": {
9+
"realm": "blazor",
10+
"auth-server-url": "http://10.0.204.55:80",
11+
"ssl-required": "none",
12+
"resource": "blazor-client",
13+
"verify-token-audience": false,
14+
"credentials": {
15+
"secret": "8XOoLh9GSbMfyee97EHmnJ2udv3Vt3pw"
16+
}
17+
},
818
"AllowedHosts": "*"
919
}

Src/Apps/Web/Ws.DeviceControl.Models/Ws.DeviceControl.Models.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
</ItemGroup>
66

77
<ItemGroup Label="Packages">
8-
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="8.0.8" />
9-
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="8.0.8" />
10-
<PackageReference Include="TscZebra.Plugin.Abstractions" Version="1.0.4" />
8+
<PackageReference Include="Microsoft.AspNetCore.Authorization" VersionOverride="8.0.8" />
9+
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" VersionOverride="8.0.8" />
10+
<PackageReference Include="TscZebra.Plugin.Abstractions" VersionOverride="1.0.4" />
1111
</ItemGroup>
1212

1313
<ItemGroup Label="Projects">

Src/Libs/Ws.Barcodes/Features/Barcodes/Utils/BarcodeVarUtils.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ private static List<BarcodeVarInfo> GenerateVariablesInfo()
6262
CreateVariable(() => barcodeBuilder.WeightNet, "{0:D5}"),
6363
CreateVariable(() => barcodeBuilder.BundleCount, "{0:D2}"),
6464
CreateVariable(() => barcodeBuilder.ExpirationDay, "{0:D3}"),
65-
CreateVariable(() => barcodeBuilder.ProductDt, "{0:yyMMdd}"),
66-
CreateVariable(() => barcodeBuilder.ExpirationDt, "{0:yyMMdd}")
65+
CreateVariable(() => barcodeBuilder.ProductDt, "{0:yyMMdd}", true),
66+
CreateVariable(() => barcodeBuilder.ExpirationDt, "{0:yyMMdd}", true)
6767
];
6868
}
6969

Src/Libs/Ws.Shared/Utils/ConfigurationUtil.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static class ConfigurationUtil
1313

1414
public static ConfigurationType Config =>
1515
#if RELEASEVS
16-
EnumConfiguration.ReleaseVs;
16+
ConfigurationType.ReleaseVs;
1717
#else
1818
ConfigurationType.DevelopVs;
1919
#endif

0 commit comments

Comments
 (0)