Skip to content

Commit 63b4d32

Browse files
authored
Merge pull request #189 from Gid733/master
Minor enhancement
2 parents b834912 + 52a66d5 commit 63b4d32

File tree

5 files changed

+25
-8
lines changed

5 files changed

+25
-8
lines changed

eFormAPI/eFormAPI/Controllers/CasesController.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ public OperationDataResult<CaseListModel> Index(CaseRequestModel requestModel)
2323
try
2424
{
2525
var core = _coreHelper.GetCore();
26-
var caseList = core.CaseReadAll(requestModel.TemplateId, null, null,
26+
CaseList caseList = core.CaseReadAll(requestModel.TemplateId, null, null,
2727
Constants.WorkflowStates.NotRemoved, requestModel.NameFilter,
28-
requestModel.IsSortDsc, requestModel.Sort);
28+
requestModel.IsSortDsc, requestModel.Sort, requestModel.PageIndex, requestModel.PageSize);
2929
var model = new CaseListModel()
3030
{
31-
NumOfElements = 40,
31+
NumOfElements = caseList.NumOfElements,
3232
PageNum = requestModel.PageIndex,
33-
Cases = caseList
33+
Cases = caseList.Cases
3434
};
3535

3636
return new OperationDataResult<CaseListModel>(true, model);

eFormAPI/eFormAPI/eFormAPI.Web.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
44
<PropertyGroup>
@@ -133,8 +133,8 @@
133133
<Reference Include="Microsoft.Owin.Security.OAuth, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
134134
<HintPath>..\packages\Microsoft.Owin.Security.OAuth.3.1.0\lib\net45\Microsoft.Owin.Security.OAuth.dll</HintPath>
135135
</Reference>
136-
<Reference Include="Microting.eForm, Version=3.0.94.0, Culture=neutral, processorArchitecture=MSIL">
137-
<HintPath>..\packages\Microting.eForm.3.0.94\lib\net45\Microting.eForm.dll</HintPath>
136+
<Reference Include="Microting.eForm, Version=3.0.101.0, Culture=neutral, processorArchitecture=MSIL">
137+
<HintPath>..\packages\Microting.eForm.3.0.101\lib\net45\Microting.eForm.dll</HintPath>
138138
</Reference>
139139
<Reference Include="Microting.eFormApi.BasePn, Version=1.1.50.0, Culture=neutral, processorArchitecture=MSIL">
140140
<HintPath>..\packages\Microting.eFormApi.BasePn.1.1.50\lib\net461\Microting.eFormApi.BasePn.dll</HintPath>

eFormAPI/eFormAPI/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<package id="Microsoft.Owin.Security.Cookies" version="3.1.0" targetFramework="net46" />
3939
<package id="Microsoft.Owin.Security.OAuth" version="3.1.0" targetFramework="net46" />
4040
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net46" />
41-
<package id="Microting.eForm" version="3.0.94" targetFramework="net461" />
41+
<package id="Microting.eForm" version="3.0.101" targetFramework="net461" />
4242
<package id="Microting.eFormApi.BasePn" version="1.1.50" targetFramework="net461" />
4343
<package id="Modernizr" version="2.8.3" targetFramework="net46" />
4444
<package id="MySql.Data" version="6.9.12" targetFramework="net461" />

eform-client/src/app/modules/cases/components/cases-table/cases-table.component.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,22 @@
179179
</tbody>
180180
</table>
181181
</div>
182+
<div class="row justify-content-between mr-2 ml-2">
183+
<div class="col-md-1">
184+
<eform-page-size
185+
[pageSize]="localPageSettings.pageSize"
186+
(onPageSizeChanged)="localPageSettings.pageSize = $event; casesRequestModel.pageIndex = 1;
187+
updateLocalPageSettings()">
188+
</eform-page-size>
189+
</div>
190+
<div class="col-md-4 ml-auto d-flex justify-content-end p-2">
191+
<eform-pagination *ngIf="caseListModel.numOfElements > casesRequestModel.pageSize"
192+
[limit]="casesRequestModel.pageSize"
193+
[size]="caseListModel.numOfElements"
194+
[offset]="casesRequestModel.offset"
195+
(onPageChanged)="changePage($event)"></eform-pagination>
196+
</div>
197+
</div>
182198
</div>
183199

184200
<eform-spinner [spinnerVisibility]="spinnerStatus"></eform-spinner>

eform-client/src/app/modules/cases/components/cases-table/cases-table.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export class CasesTableComponent implements OnInit {
7272
this.casesRequestModel.templateId = this.id;
7373
this.casesRequestModel.isSortDsc = this.localPageSettings.isSortDsc;
7474
this.casesRequestModel.sort = this.localPageSettings.sort;
75+
this.casesRequestModel.pageSize= this.localPageSettings.pageSize;
7576
this.casesService.getCases(this.casesRequestModel).subscribe(operation => {
7677
if (operation && operation.success) {
7778
this.caseListModel = operation.model;

0 commit comments

Comments
 (0)