From 1acd6a5833ed47f05416aebcd9777b96c9151859 Mon Sep 17 00:00:00 2001 From: Loretta Date: Sat, 1 Nov 2025 19:43:44 +0100 Subject: [PATCH] improvements --- FruitBank.Common/FruitBankConstClient.cs | 2 +- .../Components/GridShippingItem.razor | 5 +- .../Components/GridShippingItemPallets.razor | 111 ++ .../Components/PalletItemComponent.razor | 9 +- .../Layout/MainLayout.razor.cs | 11 +- .../Pages/MeasuringIn.razor | 9 +- .../Pages/ShippingsAdmin.razor | 2 +- SqlSchemaCompare_Dev_to_Prod.scmp | 1109 +++++++++++++++++ 8 files changed, 1239 insertions(+), 19 deletions(-) create mode 100644 FruitBankHybrid.Shared/Components/GridShippingItemPallets.razor create mode 100644 SqlSchemaCompare_Dev_to_Prod.scmp diff --git a/FruitBank.Common/FruitBankConstClient.cs b/FruitBank.Common/FruitBankConstClient.cs index 3f20aff..69f33f5 100644 --- a/FruitBank.Common/FruitBankConstClient.cs +++ b/FruitBank.Common/FruitBankConstClient.cs @@ -10,7 +10,7 @@ public static class FruitBankConstClient public static string BaseUrl = "https://localhost:59579"; //FrutiBank nop #if RELEASE - // public static string BaseUrl = "https://shop.fruitbank.hu"; //FrutiBank nop + //public static string BaseUrl = "https://shop.fruitbank.hu"; //FrutiBank nop #endif //public static string BaseUrl = "http://10.0.2.2:59579"; //FrutiBank (android) nop diff --git a/FruitBankHybrid.Shared/Components/GridShippingItem.razor b/FruitBankHybrid.Shared/Components/GridShippingItem.razor index b2e573b..96e75b9 100644 --- a/FruitBankHybrid.Shared/Components/GridShippingItem.razor +++ b/FruitBankHybrid.Shared/Components/GridShippingItem.razor @@ -38,7 +38,10 @@ - @* *@ + @{ + var shippingItemPallets = ((ShippingItem)context.DataItem).ShippingItemPallets; + + } + + + + + + + + + + + + + + + + + + + + + + + +@code { + IGrid gridOrderItemPallet; + + [Parameter] public bool IsMasterGrid { get; set; } = false; + [Parameter] public List? ShippingItemPallets { get; set; } + + protected override async Task OnInitializedAsync() + { + if (ShippingItemPallets == null) + { + //TODO: A ShippingItemPallet-eknek SignalR Endpoint! - J. + ShippingItemPallets = (await FruitBankSignalRClient.GetShippingItems())!.SelectMany(si => si.ShippingItemPallets!).ToList(); + + if (ShippingItemPallets != null && ShippingItemPallets.Any(sip => sip.ShippingItem?.ProductDto != null)) + { + gridOrderItemPallet.BeginUpdate(); + + gridOrderItemPallet.GetColumns().FirstOrDefault(x => x.Name == "ProductId")!.Visible = true; + gridOrderItemPallet.GetColumns().FirstOrDefault(x => x.Name == "ProductName")!.Visible = true; + + gridOrderItemPallet.EndUpdate(); + } + + } + } + + protected override Task OnAfterRenderAsync(bool firstRender) + { + if (firstRender) + { + // if (OrderItemPallets != null && OrderItemPallets.Any(oip => oip.OrderItemDto?.ProductDto != null)) + // { + // gridOrderItemPallet.BeginUpdate(); + + // gridOrderItemPallet.GetColumns().FirstOrDefault(x => x.Name == "ProductId")!.Visible = true; + // gridOrderItemPallet.GetColumns().FirstOrDefault(x => x.Name == "ProductName")!.Visible = true; + + // gridOrderItemPallet.EndUpdate(); + // } + } + + return base.OnAfterRenderAsync(firstRender); + } + +} + +@* List GenericAttributes { get; set; } + List OrderItemPallets { get; set; } + OrderDto OrderDto { get; set; } + bool IsMeasured + bool IsMeasurable + int TrayQuantity + double NetWeight + double GrossWeight + + public Guid OrderItemGuid { get; set; } + public int OrderId { get; set; } + public int ProductId { get; set; } + public int Quantity { get; set; } + + public decimal UnitPriceInclTax { get; set; } + public decimal UnitPriceExclTax { get; set; } + + public decimal PriceInclTax { get; set; } + public decimal PriceExclTax { get; set; } + + public string AttributesXml { get; set; } + public decimal? ItemWeight { get; set; } + + public string ProductName => ProductDto?.Name ?? "ProductDto is null!!!"; + + public TProductDto? ProductDto { get; set; } + *@ \ No newline at end of file diff --git a/FruitBankHybrid.Shared/Components/PalletItemComponent.razor b/FruitBankHybrid.Shared/Components/PalletItemComponent.razor index 140671a..85bac89 100644 --- a/FruitBankHybrid.Shared/Components/PalletItemComponent.razor +++ b/FruitBankHybrid.Shared/Components/PalletItemComponent.razor @@ -20,12 +20,12 @@ @* *@ @@ -37,11 +37,12 @@ - + @(PalletItem.NetWeight) kg. diff --git a/FruitBankHybrid.Shared/Layout/MainLayout.razor.cs b/FruitBankHybrid.Shared/Layout/MainLayout.razor.cs index 25bbabb..a868768 100644 --- a/FruitBankHybrid.Shared/Layout/MainLayout.razor.cs +++ b/FruitBankHybrid.Shared/Layout/MainLayout.razor.cs @@ -48,15 +48,15 @@ public partial class MainLayout : LayoutComponentBase } } - private Task SignalRClientOnMessageReceived(int messageTag, string? jsonMessage) + private async Task SignalRClientOnMessageReceived(int messageTag, string? jsonMessage) { - if (messageTag != SignalRTags.NotificationReceived || !LoggedInModel.IsLoggedIn) return Task.CompletedTask; + if (messageTag != SignalRTags.NotificationReceived || !LoggedInModel.IsLoggedIn) return; var notificationMessage = jsonMessage?.JsonTo>(); if (notificationMessage == null) { _logger.Error($"notificationMessage == null"); - return Task.CompletedTask; + return; } var orderDto = notificationMessage.Content; @@ -68,15 +68,12 @@ public partial class MainLayout : LayoutComponentBase _logger.Debug($"NotificationMessage received. {toastMessage}"); - InvokeAsync(() => + await InvokeAsync(() => { orderNotificationToast?.Show(); StateHasChanged(); }); - - return Task.CompletedTask; } - return Task.CompletedTask; } private void OnLogoutClick() diff --git a/FruitBankHybrid.Shared/Pages/MeasuringIn.razor b/FruitBankHybrid.Shared/Pages/MeasuringIn.razor index 05bee03..4eed6ec 100644 --- a/FruitBankHybrid.Shared/Pages/MeasuringIn.razor +++ b/FruitBankHybrid.Shared/Pages/MeasuringIn.razor @@ -162,12 +162,11 @@ TOTAL: - - - + + Rekesz: @(SelectedShippingItem.MeasuredQuantity) db - Br: @(SelectedShippingItem.MeasuredGrossWeight) kg - Net: @(SelectedShippingItem.MeasuredNetWeight) kg + Br: @(SelectedShippingItem.MeasuredGrossWeight) kg + Net: @(SelectedShippingItem.MeasuredNetWeight) kg diff --git a/FruitBankHybrid.Shared/Pages/ShippingsAdmin.razor b/FruitBankHybrid.Shared/Pages/ShippingsAdmin.razor index 82b94df..590b0a3 100644 --- a/FruitBankHybrid.Shared/Pages/ShippingsAdmin.razor +++ b/FruitBankHybrid.Shared/Pages/ShippingsAdmin.razor @@ -30,7 +30,7 @@ - @* *@ + diff --git a/SqlSchemaCompare_Dev_to_Prod.scmp b/SqlSchemaCompare_Dev_to_Prod.scmp new file mode 100644 index 0000000..477f3a1 --- /dev/null +++ b/SqlSchemaCompare_Dev_to_Prod.scmp @@ -0,0 +1,1109 @@ + + + 10 + + + Data Source=195.26.231.218;Initial Catalog=FruitBank_DEV;Integrated Security=False;Persist Security Info=False;User ID=sa;Pooling=False;Trust Server Certificate=True + + + + + Data Source=195.26.231.218;Initial Catalog=FruitBank_PROD;Integrated Security=False;Persist Security Info=False;User ID=sa;Pooling=False;Trust Server Certificate=True + + + + + + Version + 1 + + + + + PlanGenerationType + SqlDeploymentOptions + + + AllowExistingModelErrors + False + + + AllowIncompatiblePlatform + False + + + AllowTableRecreation + True + + + BackupDatabaseBeforeChanges + False + + + IgnoreIndexesStatisticsOnEnclaveEnabledColumns + False + + + BlockOnPossibleDataLoss + True + + + BlockWhenDriftDetected + False + + + CompareUsingTargetCollation + False + + + CommentOutSetVarDeclarations + False + + + CreateNewDatabase + False + + + DeployDatabaseInSingleUserMode + False + + + DisableAndReenableDdlTriggers + True + + + DisableIndexesForDataPhase + True + + + DisableParallelismForEnablingIndexes + False + + + DoNotAlterChangeDataCaptureObjects + True + + + DoNotAlterReplicatedObjects + True + + + DropConstraintsNotInSource + True + + + DropDmlTriggersNotInSource + True + + + DropExtendedPropertiesNotInSource + True + + + DropIndexesNotInSource + True + + + DropPermissionsNotInSource + False + + + DropObjectsNotInSource + True + + + DropRoleMembersNotInSource + False + + + DropStatisticsNotInSource + True + + + GenerateSmartDefaults + False + + + HashObjectNamesInLogs + False + + + IgnoreDdlTriggerOrder + False + + + IgnoreDdlTriggerState + False + + + IgnoreObjectPlacementOnPartitionScheme + True + + + IgnoreAuthorizer + False + + + IgnoreDefaultSchema + False + + + IgnoreRouteLifetime + True + + + IgnoreCryptographicProviderFilePath + True + + + IgnoreComments + False + + + IgnoreWhitespace + True + + + IgnoreKeywordCasing + True + + + IgnoreSemicolonBetweenStatements + True + + + IgnorePartitionSchemes + False + + + IgnoreTablePartitionOptions + False + + + IgnoreWithNocheckOnCheckConstraints + False + + + IgnoreWithNocheckOnForeignKeys + False + + + IgnoreIdentitySeed + False + + + IgnoreIncrement + False + + + IgnoreFillFactor + True + + + IgnoreIndexPadding + True + + + IgnoreColumnCollation + False + + + IgnoreColumnOrder + False + + + IgnoreLockHintsOnIndexes + False + + + IgnoreTableOptions + False + + + IgnoreIndexOptions + False + + + IgnoreDmlTriggerOrder + False + + + IgnoreDmlTriggerState + False + + + IgnoreAnsiNulls + True + + + IgnoreQuotedIdentifiers + True + + + IgnoreUserSettingsObjects + False + + + IgnoreFilegroupPlacement + True + + + IgnoreFullTextCatalogFilePath + True + + + IgnoreFileAndLogFilePath + True + + + IgnoreLoginSids + True + + + IgnoreNotForReplication + False + + + IgnoreFileSize + True + + + IgnoreSensitivityClassifications + False + + + AllowUnsafeRowLevelSecurityDataMovement + False + + + IncludeCompositeObjects + False + + + IncludeTransactionalScripts + False + + + IsAlwaysEncryptedParameterizationEnabled + False + + + NoAlterStatementsToChangeCLRTypes + False + + + PopulateFilesOnFileGroups + True + + + PreserveIdentityLastValues + False + + + RegisterDataTierApplication + False + + + PerformIndexOperationsOnline + False + + + RebuildIndexesOfflineForDataPhase + False + + + RestoreSequenceCurrentValue + True + + + ScriptDatabaseCollation + True + + + ScriptDatabaseCompatibility + True + + + ScriptDatabaseOptions + True + + + ScriptDeployStateChecks + False + + + ScriptFileSize + False + + + ScriptNewConstraintValidation + True + + + ScriptRefreshModule + True + + + TargetDatabaseName + FruitBank_PROD + + + TargetConnectionString + Data Source=195.26.231.218;Initial Catalog=FruitBank_PROD;Integrated Security=False;Persist Security Info=False;User ID=sa;Pooling=False;Multiple Active Result Sets=False;Trust Server Certificate=True;Application Name="Microsoft SQL Server Data Tools, Schema Compare" + + + TreatVerificationErrorsAsWarnings + False + + + UnmodifiableObjectWarnings + True + + + VerifyCollationCompatibility + True + + + VerifyDeployment + True + + + RunDeploymentPlanExecutors + False + + + AllowDropBlockingAssemblies + False + + + DoNotEvaluateSqlCmdVariables + True + + + DoNotDropAggregates + False + + + DoNotDropApplicationRoles + False + + + DoNotDropAssemblies + False + + + DoNotDropAsymmetricKeys + False + + + DoNotDropAudits + False + + + DoNotDropBrokerPriorities + False + + + DoNotDropCertificates + False + + + DoNotDropClrUserDefinedTypes + False + + + DoNotDropColumnEncryptionKeys + False + + + DoNotDropColumnMasterKeys + False + + + DoNotDropContracts + False + + + DoNotDropCredentials + False + + + DoNotDropDatabaseScopedCredentials + False + + + DoNotDropCryptographicProviders + False + + + DoNotDropDatabaseAuditSpecifications + False + + + DoNotDropDatabaseRoles + False + + + DoNotDropDatabaseTriggers + False + + + IgnoreDatabaseWorkloadGroups + False + + + DoNotDropDatabaseWorkloadGroups + False + + + IgnoreWorkloadClassifiers + False + + + DoNotDropWorkloadClassifiers + False + + + DoNotDropDefaults + False + + + DoNotDropEndpoints + False + + + DoNotDropErrorMessages + False + + + DoNotDropEventNotifications + False + + + DoNotDropEventSessions + False + + + DoNotDropExtendedProperties + False + + + DoNotDropExternalDataSources + False + + + DoNotDropExternalFileFormats + False + + + DoNotDropExternalLanguages + False + + + DoNotDropExternalLibraries + False + + + DoNotDropExternalStreamingJobs + False + + + DoNotDropExternalTables + False + + + DoNotDropExternalStreams + False + + + DoNotDropFilegroups + False + + + DoNotDropFiles + False + + + DoNotDropFileTables + False + + + DoNotDropFullTextCatalogs + False + + + DoNotDropFullTextStoplists + False + + + DoNotDropTableValuedFunctions + False + + + DoNotDropLinkedServerLogins + False + + + DoNotDropLinkedServers + False + + + DoNotDropLogins + False + + + DoNotDropMessageTypes + False + + + DoNotDropPartitionFunctions + False + + + DoNotDropPartitionSchemes + False + + + DoNotDropPermissions + False + + + DoNotDropQueues + False + + + DoNotDropRemoteServiceBindings + False + + + DoNotDropRoleMembership + False + + + DoNotDropRoutes + False + + + DoNotDropRules + False + + + DoNotDropScalarValuedFunctions + False + + + DoNotDropSearchPropertyLists + False + + + DoNotDropSecurityPolicies + False + + + DoNotDropSequences + False + + + DoNotDropServerAuditSpecifications + False + + + DoNotDropServerRoleMembership + False + + + DoNotDropServerRoles + False + + + DoNotDropServerTriggers + False + + + DoNotDropServices + False + + + DoNotDropSignatures + False + + + DoNotDropStoredProcedures + False + + + DoNotDropSymmetricKeys + False + + + DoNotDropSynonyms + False + + + DoNotDropTables + False + + + DoNotDropUserDefinedDataTypes + False + + + DoNotDropUserDefinedTableTypes + False + + + DoNotDropUsers + False + + + DoNotDropViews + False + + + DoNotDropXmlSchemaCollections + False + + + ExcludeAggregates + False + + + ExcludeApplicationRoles + False + + + ExcludeAssemblies + False + + + ExcludeAsymmetricKeys + False + + + ExcludeAudits + False + + + ExcludeBrokerPriorities + False + + + ExcludeCertificates + False + + + ExcludeClrUserDefinedTypes + False + + + ExcludeColumnEncryptionKeys + False + + + ExcludeColumnMasterKeys + False + + + ExcludeContracts + False + + + ExcludeCredentials + False + + + ExcludeDatabaseScopedCredentials + False + + + ExcludeCryptographicProviders + False + + + ExcludeDatabaseAuditSpecifications + False + + + ExcludeDatabaseRoles + False + + + ExcludeDatabaseTriggers + False + + + ExcludeDefaults + False + + + ExcludeEndpoints + False + + + ExcludeErrorMessages + False + + + ExcludeEventNotifications + False + + + ExcludeExternalDataSources + False + + + ExcludeExternalFileFormats + False + + + ExcludeExternalLanguages + False + + + ExcludeExternalLibraries + False + + + ExcludeExternalStreamingJobs + False + + + ExcludeExternalTables + False + + + ExcludeExternalStreams + False + + + ExcludeEventSessions + False + + + ExcludeFilegroups + False + + + ExcludeFiles + False + + + ExcludeFileTables + False + + + ExcludeFullTextCatalogs + False + + + ExcludeFullTextStoplists + False + + + ExcludeTableValuedFunctions + False + + + ExcludeLinkedServerLogins + False + + + ExcludeLinkedServers + False + + + ExcludeLogins + False + + + ExcludeMessageTypes + False + + + ExcludePartitionFunctions + False + + + ExcludePartitionSchemes + False + + + ExcludeQueues + False + + + ExcludeRemoteServiceBindings + False + + + ExcludeRoutes + False + + + ExcludeRules + False + + + ExcludeScalarValuedFunctions + False + + + ExcludeSearchPropertyLists + False + + + ExcludeSecurityPolicies + False + + + ExcludeSequences + False + + + ExcludeServerAuditSpecifications + False + + + ExcludeServerRoleMembership + False + + + ExcludeServerRoles + False + + + ExcludeServerTriggers + False + + + ExcludeServices + False + + + ExcludeSignatures + False + + + ExcludeStoredProcedures + False + + + ExcludeSymmetricKeys + False + + + ExcludeSynonyms + False + + + ExcludeTables + False + + + ExcludeUserDefinedDataTypes + False + + + ExcludeUserDefinedTableTypes + False + + + ExcludeUsers + False + + + ExcludeViews + False + + + ExcludeXmlSchemaCollections + False + + + AllowExternalLibraryPaths + False + + + AllowExternalLanguagePaths + False + + + Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlAssemblyFile + ExcludedType + + + + + 2 + 100 + Equals_Objects,Not_Supported_Deploy + + + + Anata_Development_Team + + + TIAM_DEV_log + + + TIAM_DEV + + + TIAM_DEVRELEASE + + + TIAM_DEVRELEASE_log + + + dbo + Address + + + FruitBank_Test_log + + + FruitBank_Test + + + + + + dbo + fbOrderItemPallet + + + dbo + DF_fbOrderItemPallet_IsValidated + + + dbo + fbOrderItemPallet + IX_fbOrderItemPallet_OrderItemId + + + dbo + fbShipping + + + + + dbo + AvalaraItemClassification + + + dbo + PK_AvalaraItemClassification + + + dbo + FacebookPixelConfiguration + + + dbo + PK_FacebookPixelConfiguration + + + dbo + GoogleAuthenticatorRecord + + + dbo + PK_GoogleAuthenticatorRecord + + + dbo + TaxTransactionLog + + + dbo + PK_TaxTransactionLog + + + dbo + vOrder + + + SqlView + dbo + vOrder + MS_DiagramPane1 + + + SqlView + dbo + vOrder + MS_DiagramPaneCount + + + dbo + vOrderItem + + + SqlView + dbo + vOrderItem + MS_DiagramPane1 + + + SqlView + dbo + vOrderItem + MS_DiagramPaneCount + + + dbo + vOrderItemPallet + + + SqlView + dbo + vOrderItemPallet + MS_DiagramPane1 + + + SqlView + dbo + vOrderItemPallet + MS_DiagramPaneCount + + + dbo + vProduct + + + SqlView + dbo + vProduct + MS_DiagramPane1 + + + SqlView + dbo + vProduct + MS_DiagramPaneCount + + + dbo + Address + + + + + + dbo + fbOrderItemPallet + + + dbo + DF_fbOrderItemPallet_IsAudited + + + dbo + fbShipping + + + dbo + DF_fbShipping_IsAllMeasured + + + \ No newline at end of file