Skip to content

Commit

Permalink
grid no total added
Browse files Browse the repository at this point in the history
bzashev committed Jun 11, 2024
1 parent b1a61b9 commit 92c9606
Showing 8 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion WebVella.Erp.Plugins.SDK/WebVella.Erp.Plugins.SDK.csproj
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Version>1.5.0</Version>
<Version>1.5.1</Version>
<PackageId>WebVella.Erp.Plugins.SDK</PackageId>
<Authors>WebVella</Authors>
<Product />
2 changes: 1 addition & 1 deletion WebVella.Erp.Web/Components/PcGrid/Display.cshtml
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@
name="@options.Name" culture="@options.Culture" class="@options.Class" query-string-sortby="@options.QueryStringSortBy"
query-string-sort-order="@options.QueryStringSortOrder" query-string-page="@options.QueryStringPage" columns="columns"
page="@pager" total-count="@totalCount" page-size="@pageSize" has-thead="@options.HasThead" has-tfoot="@options.HasTfoot"
is-visible="(bool)ViewBag.IsVisible">
is-visible="(bool)ViewBag.IsVisible" no-total="@options.NoTotal">
@foreach (var record in records)
{
<wv-grid-row>
5 changes: 5 additions & 0 deletions WebVella.Erp.Web/Components/PcGrid/Options.cshtml
Original file line number Diff line number Diff line change
@@ -77,6 +77,11 @@
<wv-field-checkbox name="has_tfoot" value="@options.HasTfoot" label-text="Footer" text-true="show footer"></wv-field-checkbox>
</wv-column>
</wv-row>
<wv-row>
<wv-column span="4">
<wv-field-checkbox name="no_total" value="@options.NoTotal" label-text="Total Count" text-true="not available"></wv-field-checkbox>
</wv-column>
</wv-row>

<div class="alert alert-info p-2">
In nested components, use <code>RowRecord</code> datasource as a reference to the record renedered in the current row
3 changes: 3 additions & 0 deletions WebVella.Erp.Web/Components/PcGrid/PcGrid.cs
Original file line number Diff line number Diff line change
@@ -95,6 +95,9 @@ public class PcGridOptions
[JsonProperty(PropertyName = "has_tfoot")]
public bool HasTfoot { get; set; } = true;

[JsonProperty(PropertyName = "no_total")]
public bool NoTotal { get; set; } = false;

[JsonProperty(PropertyName = "empty_text")]
public string EmptyText { get; set; } = "No records";

2 changes: 1 addition & 1 deletion WebVella.Erp.Web/Theme/styles.css
Original file line number Diff line number Diff line change
@@ -4408,7 +4408,7 @@ wv-pb-node-container {
}

wv-pb-node-container > .wv-container-inner:not(.empty) {
padding-bottom: 10px;
padding-bottom: 20px;
}

wv-pb-node-container > .wv-container-inner.first.empty:after {
12 changes: 6 additions & 6 deletions WebVella.Erp.Web/WebVella.Erp.Web.csproj
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
<RootNamespace>WebVella.Erp.Web</RootNamespace>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<Version>1.5.6</Version>
<Version>1.5.8</Version>
<Authors>WebVella</Authors>
<Product>WebVella.Erp.Web</Product>
<Description>The web components library for the open-source and free platform WebVella ERP. It allows a quick and painless creation of business web applications.</Description>
@@ -125,10 +125,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.9.2" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.9.2" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.9.2" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.9.2" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.10.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.10.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.10.0" />
<PackageReference Include="CS-Script" Version="4.8.16" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.61" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.6" />
@@ -139,7 +139,7 @@
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.4" />
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="2.1.3" />
<PackageReference Include="Wangkanai.Detection" Version="8.14.0" />
<PackageReference Include="WebVella.TagHelpers" Version="1.5.1" />
<PackageReference Include="WebVella.TagHelpers" Version="1.5.3" />
<PackageReference Include="YUICompressor.NET" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.6" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.6.0" />
2 changes: 1 addition & 1 deletion WebVella.Erp/Api/DataSourceManager.cs
Original file line number Diff line number Diff line change
@@ -181,7 +181,7 @@ public DatabaseDataSource Create(string name, string description, int weight, st
validation.CheckAndThrow();

rep.Create(ds.Id, ds.Name, ds.Description, ds.Weight, ds.EqlText, ds.SqlText,
JsonConvert.SerializeObject(ds.Parameters), JsonConvert.SerializeObject(ds.Fields), ds.EntityName);
JsonConvert.SerializeObject(ds.Parameters), JsonConvert.SerializeObject(ds.Fields), ds.EntityName, ds.ReturnTotal);

RemoveFromCache();

2 changes: 1 addition & 1 deletion WebVella.Erp/WebVella.Erp.csproj
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Description>The core library of the open-source and free platform WebVella ERP. It allows a quick and painless creation of business web applications. </Description>
<Version>1.5.6</Version>
<Version>1.5.7</Version>
<Authors>WebVella</Authors>
<Company>WebVella</Company>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>

0 comments on commit 92c9606

Please sign in to comment.