Skip to content

restore Blazor maps #80

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

Open
wants to merge 13 commits into
base: 25.1.3+
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
public IMapsMarker Center{ get; set; }
[Parameter][EditorRequired]
public MapRouteMode MapRouteMode{ get; set; }
private string GetLocation(IMapsMarker mapsMarker) => $"{mapsMarker.Latitude}, {mapsMarker.Longitude}";
private string GetLocation(IMapsMarker mapsMarker){
return $"{mapsMarker.Latitude}, {mapsMarker.Longitude}";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ private void MapItemListEditorOnSelectionChanged(object sender, EventArgs e) {
.ToArray();
mapItemListEditor.ApplyColors(dataSource, item => IsCustomer ? item.ProductName : item.CustomerName);
_chartListEditor.DataSource = dataSource;

}

private static MapItem[] MapItems(MapItemListEditor mapItemListEditor) => ((ProxyCollection)mapItemListEditor.DataSource).Cast<MapItem>().ToArray();
Expand Down
15 changes: 0 additions & 15 deletions CS/OutlookInspired.Blazor.Server/Features/WelcomeController.cs

This file was deleted.

14 changes: 7 additions & 7 deletions CS/OutlookInspired.Blazor.Server/Model.xafml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
</DetailView>
<DetailView Id="Customer_DetailView_Maps" AllowEdit="False">
<Items>
<PropertyEditor Id="CitySales" View="Customer_CitySales_ListView" />
<PropertyEditor Id="HomeOfficeLine" PropertyEditorType="OutlookInspired.Blazor.Server.Editors.Label.LabelPropertyEditor" />
<PropertyEditor Id="Logo" ImageSizeMode="StretchImage" ImageEditorCustomHeight="100" ImageEditorFixedHeight="100" ImageEditorFixedWidth="100" />
<PropertyEditor Id="Name" PropertyEditorType="OutlookInspired.Blazor.Server.Editors.Label.LabelPropertyEditor" />
Expand Down Expand Up @@ -440,9 +441,9 @@
</ListView>
<ListView Id="Order_ListView_Detail" AutoExpandAllGroups="True">
<Columns>
<ColumnInfo Id="ShipDate" Width="124" />
<ColumnInfo Id="InvoiceNumber" Width="175" />
<ColumnInfo Id="OrderDate" Width="137" />
<ColumnInfo Id="ShipDate" Width="124" />
<ColumnInfo Id="ShipmentStatus" PropertyName="ShipmentStatus" PropertyEditorType="OutlookInspired.Blazor.Server.Editors.EnumPropertyEditor" MinWidth="30" />
<ColumnInfo Id="PaymentStatus" PropertyName="PaymentStatus" PropertyEditorType="OutlookInspired.Blazor.Server.Editors.EnumPropertyEditor" MinWidth="30" />
</Columns>
Expand Down Expand Up @@ -557,16 +558,15 @@
<ListView Id="Quote_ListView" DataAccessMode="Client" EditorTypeName="OutlookInspired.Blazor.Server.Editors.Pivot.PivotGridListEditor" />
<ListView Id="QuoteAnalysis_ListView" EditorTypeName="OutlookInspired.Blazor.Server.Editors.Pivot.PivotGridListEditor" />
<ListView Id="QuoteMapItem_ListView" EditorTypeName="OutlookInspired.Blazor.Server.Editors.Maps.MapItemListEditor" />
<DetailView Id="TaskAttachedFile_DetailView">
<Items>
<PropertyEditor Id="Preview" PropertyEditorType="DevExpress.ExpressApp.Office.Blazor.Editors.RichTextPropertyEditor" />
</Items>
</DetailView>
<ListView Id="ViewFilter_ListView" AllowEdit="False">
<Columns>
<ColumnInfo Id="Name" AllowEdit="True" />
</Columns>
</ListView>
<DetailView Id="Welcome_DetailView">
<Layout>
<LayoutGroup Id="Main" RelativeSize="3.865546218487395" />
<LayoutItem Id="Item1" Index="1" RelativeSize="96.1344537815126" IsNewNode="True" />
</Layout>
</DetailView>
</Views>
</Application>
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,9 @@

<Content Include="Editors\LayoutViewStacked\StackedLayoutView.razor.css" />
</ItemGroup>
<ItemGroup>
<None Update="UnusableNodes1.xml">
<DependentUpon>Model.xafml</DependentUpon>
</None>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"DevExpress": {
"ExpressApp": {
"EnableDiagnosticActions": false
"EnableDiagnosticActions": true
}
}
}
15 changes: 10 additions & 5 deletions CS/OutlookInspired.Blazor.Server/wwwroot/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,18 @@ app {
z-index: 100001;
}

.welcome-pdf-viewer {

.welcome-image-viewer {
width: 100%;
height: 500px;
}

.welcome-pdf-viewer .dxbrv-toolbar {
height: 2rem;
margin-top: 1.5rem;
padding-top: 1.5rem;
}
.welcome-image-viewer .img-thumbnail {
border: none !important;
box-shadow: none !important;
padding: 0 !important;
background: none !important;
}

.pe-pdf-viewer .dxbrv-toolbar {
Expand Down
2 changes: 0 additions & 2 deletions CS/OutlookInspired.Module/BusinessObjects/Order.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.DC;
using DevExpress.ExpressApp.Utils;
using DevExpress.Persistent.Base;
Expand Down Expand Up @@ -68,7 +67,6 @@ public class Order :OutlookInspiredBaseObject, IViewFilter,IRouteMapsMarker{


[EditorAlias(EditorAliases.PdfViewerEditor)]
// [HideInUI(HideInUI.DetailView)]
[VisibleInDetailView(false)]
[NotMapped]
public virtual byte[] InvoiceDocument{ get; set; } = [];
Expand Down
29 changes: 0 additions & 29 deletions CS/OutlookInspired.Module/BusinessObjects/Welcome.cs

This file was deleted.

2 changes: 1 addition & 1 deletion CS/OutlookInspired.Module/DatabaseUpdate/Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ byte[] Bytes( Stream stream){
}

void NewMailMergeData(string name, Type dataType, byte[] bytes){
var richTextMailMergeData = ObjectSpace.CreateObject<RichTextMailMergeData>();
var richTextMailMergeData =ObjectSpace.GetObjectsQuery<RichTextMailMergeData>().FirstOrDefault(data => data.Name==name)?? ObjectSpace.CreateObject<RichTextMailMergeData>();
richTextMailMergeData.Name = name;
richTextMailMergeData.Template = bytes;
richTextMailMergeData.DataType = dataType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using OutlookInspired.Module.BusinessObjects;

namespace OutlookInspired.Module.Features.Customers{
class MapCustomerController:ObjectViewController<ListView,Customer>{
public class MapCustomerController:ObjectViewController<ListView,Customer>{
public const string MapItActionId = "MapCustomer";
public MapCustomerController(){
MapCustomerAction = new PopupWindowShowAction(this, MapItActionId, PredefinedCategory.View){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using OutlookInspired.Module.BusinessObjects;

namespace OutlookInspired.Module.Features.Employees{
class MapEmployeeController:ObjectViewController<ListView,Employee>{
public class MapEmployeeController:ObjectViewController<ListView,Employee>{
public const string MapItActionId = "MapEmployee";
public MapEmployeeController(){
MapEmployeeAction = new PopupWindowShowAction(this, MapItActionId, PredefinedCategory.View){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using OutlookInspired.Module.BusinessObjects;

namespace OutlookInspired.Module.Features.Orders{
class MapOrderController:ObjectViewController<ObjectView,Order>{
public class MapOrderController:ObjectViewController<ObjectView,Order>{
public const string MapItActionId = "MapOrder";
public MapOrderController(){
MapOrderAction = new PopupWindowShowAction(this, MapItActionId, PredefinedCategory.View){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using OutlookInspired.Module.BusinessObjects;

namespace OutlookInspired.Module.Features.Products{
class MapProductController:ObjectViewController<ObjectView,Product>{
public class MapProductController:ObjectViewController<ObjectView,Product>{
public const string MapItActionId = "MapProduct";
public MapProductController(){
MapProductAction = new PopupWindowShowAction(this, MapItActionId, PredefinedCategory.View){
Expand Down
Binary file added CS/OutlookInspired.Module/Images/Welcome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 36 additions & 13 deletions CS/OutlookInspired.Module/Model.DesignedDiffs.xafml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</ActionContainer>
</ActionToContainerMapping>
</ActionDesign>
<NavigationItems StartupNavigationItem="Welcome_DetailView">
<NavigationItems StartupNavigationItem="Welcome">
<Items>
<Item Id="Admin Portal">
<Items>
Expand All @@ -23,7 +23,8 @@
</Item>
<Item Id="Default">
<Items>
<Item Id="Welcome_DetailView" Index="0" ImageName="About" ObjectKey="{8B8DF685-AD96-4BE9-A08A-8DD8C2A9F4C2}" />
<Item Id="Welcome" ViewId="Welcome" Caption="Welcome" ImageName="About" Index="0" IsNewNode="True" />
<Item Id="Welcome_DetailView" Index="0" ImageName="About" ObjectKey="{8B8DF685-AD96-4BE9-A08A-8DD8C2A9F4C2}" Removed="True" />
<Item Id="Employee_ListView" ImageName="BO_Employee" Index="1" />
<Item Id="Evaluation_ListView" Index="2" ImageName="EvaluationYes" />
<Item Id="Customer_ListView" ImageName="BO_Customer" Index="3" />
Expand Down Expand Up @@ -90,6 +91,9 @@
<ColumnInfo Id="AnnualSales" Index="8" />
<ColumnInfo Id="Crest" Index="9" />
</Columns>
<HiddenActions>
<ActionLink ActionId="FullTextSearch" IsNewNode="True" />
</HiddenActions>
</ListView>
<DetailView Id="Customer_DetailView" CustomizationFormEnabled="True">
<Layout>
Expand Down Expand Up @@ -179,6 +183,10 @@
</Layout>
</DetailView>
<DetailView Id="Customer_DetailView_Maps" FreezeLayout="True">
<Items>
<PropertyEditor Id="CitySales" PropertyName="CitySales" IsNewNode="True" />
<PropertyEditor Id="Sales" PropertyName="Sales" IsNewNode="True" />
</Items>
<Layout IsNewNode="True" Removed="True">
<LayoutGroup Id="Main" Index="0" ShowCaption="False" RelativeSize="100" IsNewNode="True">
<LayoutGroup Id="SimpleEditors" Index="0" ShowCaption="False" RelativeSize="100" Caption="SimpleEditors" Direction="Horizontal" IsNewNode="True">
Expand Down Expand Up @@ -728,6 +736,9 @@
<SplitLayout SplitterPosition="600" RelativePosition="70" />
</ListView>
<ListView Id="EmployeeTask_AttachedFiles_ListView" MasterDetailMode="ListViewAndDetailView">
<Columns>
<ColumnInfo Id="Preview" Index="-1" />
</Columns>
<SplitLayout RelativePosition="30" />
</ListView>
<DetailView Id="EmployeeTask_DetailView" FreezeLayout="True">
Expand Down Expand Up @@ -835,7 +846,7 @@
<LayoutItem Id="ShippingAmount" ViewItem="ShippingAmount" Index="5" RelativeSize="3.3653846153846154" CaptionLocation="Left" IsNewNode="True" />
<LayoutItem Id="TotalAmount" ViewItem="TotalAmount" Index="6" RelativeSize="3.3653846153846154" CaptionLocation="Left" IsNewNode="True" />
<LayoutItem Id="Tax" ViewItem="Tax" Index="7" RelativeSize="3.3653846153846154" CaptionLocation="Left" IsNewNode="True" />
<LayoutItem Id="ShipDate" ViewItem="ShipDate" Index="8" RelativeSize="3.3653846153846154" CaptionLocation="Left" IsNewNode="True" />
<LayoutItem Id="ShipDate" ViewItem="ShipDate" Index="8" RelativeSize="3.3653846153846154" CaptionLocation="Left" IsNewNode="True" />
<LayoutItem Id="ShipMethod" ViewItem="ShipMethod" Index="9" RelativeSize="72.43589743589743" CaptionLocation="Left" IsNewNode="True" />
</LayoutGroup>
<LayoutGroup Id="Order_col2" ShowCaption="False" Index="1" RelativeSize="50.11135857461024" IsNewNode="True">
Expand Down Expand Up @@ -924,6 +935,7 @@
<Items>
<PropertyEditor Id="Customer" PropertyName="Customer.Name" IsNewNode="True" />
<PropertyEditor Id="Logo" PropertyName="Customer.Logo" IsNewNode="True" />
<PropertyEditor Id="ShipmentDetail" PropertyName="ShipmentDetail" IsNewNode="True" />
</Items>
<Layout IsNewNode="True" Removed="True">
<LayoutGroup Id="Main" Index="0" ShowCaption="False" RelativeSize="100" IsNewNode="True">
Expand Down Expand Up @@ -992,6 +1004,16 @@
</Variants>
</ListView>
<ListView Id="Order_ListView_Detail" DataAccessMode="ServerView" MasterDetailMode="ListViewAndDetailView" MasterDetailView="Order_DetailView_Child">
<Columns>
<ColumnInfo Id="ActualWeight" Index="-1" />
<ColumnInfo Id="Customer" Index="-1" />
<ColumnInfo Id="Employee" Index="-1" />
<ColumnInfo Id="Location" Index="-1" />
<ColumnInfo Id="ShipDate" Index="-1" />
<ColumnInfo Id="ShipmentCourier" Index="-1" />
<ColumnInfo Id="Store" Index="-1" />
<ColumnInfo Id="InvoiceNumber" Width="98" />
</Columns>
<SplitLayout SplitterPosition="0" RelativePosition="70" />
</ListView>
<DetailView Id="OrderItem_DetailView">
Expand Down Expand Up @@ -1107,6 +1129,9 @@
</Layout>
</DetailView>
<DetailView Id="Product_DetailView_Maps" FreezeLayout="True">
<Items>
<PropertyEditor Id="CitySales" PropertyName="CitySales" View="Product_CitySales_ListView" IsNewNode="True" />
</Items>
<Layout IsNewNode="True" Removed="True">
<LayoutGroup Id="Main" Index="0" ShowCaption="False" RelativeSize="100" IsNewNode="True">
<LayoutGroup Id="SimpleEditors" Index="0" ShowCaption="False" RelativeSize="100" Caption="SimpleEditors" Direction="Horizontal" IsNewNode="True">
Expand Down Expand Up @@ -1317,17 +1342,15 @@
</Columns>
<SplitLayout RelativePosition="30" />
</ListView>
<DetailView Id="Welcome_DetailView">
<HiddenActions>
<ActionLink ActionId="FullTextSearch" IsNewNode="True" />
</HiddenActions>
<Layout>
<LayoutGroup Id="Main" RelativeSize="100">
<LayoutGroup Id="About_Group" ShowCaption="False" Direction="Vertical" RelativeSize="100">
<LayoutItem Id="About" RelativeSize="100" CaptionLocation="Top" ShowCaption="False" />
</LayoutGroup>
<DashboardView Id="Welcome" IsNewNode="True">
<Items IsNewNode="True">
<StaticImage Id="Welcome" ImageName="Welcome" HorizontalAlign="Center" VerticalAlign="Middle" IsNewNode="True" />
</Items>
<Layout IsNewNode="True">
<LayoutGroup Id="Main" IsNewNode="True">
<LayoutItem Id="Welcome" ViewItem="Welcome" Index="0" IsNewNode="True" />
</LayoutGroup>
</Layout>
</DetailView>
</DashboardView>
</Views>
</Application>
10 changes: 1 addition & 9 deletions CS/OutlookInspired.Module/Module.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.CompilerServices;
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Model;
using DevExpress.ExpressApp.Model.Core;
Expand Down Expand Up @@ -84,9 +83,6 @@ public override void Setup(XafApplication application) {
}

private void Application_ObjectSpaceCreated(object sender, ObjectSpaceCreatedEventArgs e) {
if(e.ObjectSpace is NonPersistentObjectSpace nonPersistentObjectSpace) {
nonPersistentObjectSpace.ObjectByKeyGetting += nonPersistentObjectSpace_ObjectByKeyGetting;
}
if (e.ObjectSpace is not CompositeObjectSpace { Owner: not CompositeObjectSpace } compositeObjectSpace) return;
compositeObjectSpace.PopulateAdditionalObjectSpaces((XafApplication)sender);
}
Expand All @@ -108,9 +104,5 @@ public override void AddGeneratorUpdaters(ModelNodesGeneratorUpdaters updaters)

}

private void nonPersistentObjectSpace_ObjectByKeyGetting(object sender, ObjectByKeyGettingEventArgs e) {
if (e.ObjectType!=typeof(Welcome)) return;
e.Object = ((IObjectSpace)sender).CreateObject<Welcome>();
}
}

3 changes: 2 additions & 1 deletion CS/OutlookInspired.Module/OutlookInspired.Module.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
</PackageReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Images\Welcome.png" />
<EmbeddedResource Include="Model.DesignedDiffs.xafml" />
<None Remove="Images\Skype.svg" />
<EmbeddedResource Include="Images\Skype.svg" />
Expand Down Expand Up @@ -109,7 +110,7 @@
<None Remove="Resources\Welcome.docx" />
<None Remove="Images\Welcome.png" />
<None Remove="Resources\Welcome.pdf" />
<EmbeddedResource Include="Resources\Welcome.pdf" />
<None Remove="Resources\Welcome.png" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="DevExpress.Document.Processor" />
Expand Down
Binary file removed CS/OutlookInspired.Module/Resources/Welcome.pdf
Binary file not shown.
Loading