From 4410f72a17bd5eda411e8bbd1b3c00947eb255d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=ABl=20Mugnier?= Date: Mon, 30 Nov 2020 21:43:39 +0100 Subject: [PATCH] =?UTF-8?q?Update=20-=20Modification=20de=20la=20page=20de?= =?UTF-8?q?=20suivi=20des=20d=C3=A9clarations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/DeclarationsController.cs | 1 + .../Views/Declarations/Index.cshtml | 27 ++++++++++++------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Sheaft.Web.Manage/Controllers/DeclarationsController.cs b/Sheaft.Web.Manage/Controllers/DeclarationsController.cs index 0036e6f68..ba4b83c6f 100644 --- a/Sheaft.Web.Manage/Controllers/DeclarationsController.cs +++ b/Sheaft.Web.Manage/Controllers/DeclarationsController.cs @@ -45,6 +45,7 @@ public async Task Index(CancellationToken token, int page = 0, in var entities = await _context.Legals .OfType() + .ProjectTo(_configurationProvider) .OrderByDescending(c => c.CreatedOn) .Skip(page * take) .Take(take) diff --git a/Sheaft.Web.Manage/Views/Declarations/Index.cshtml b/Sheaft.Web.Manage/Views/Declarations/Index.cshtml index 96364dada..b2e7157c6 100644 --- a/Sheaft.Web.Manage/Views/Declarations/Index.cshtml +++ b/Sheaft.Web.Manage/Views/Declarations/Index.cshtml @@ -1,4 +1,4 @@ -@model IEnumerable +@model IEnumerable @{ ViewData["Title"] = "Declarations"; int take = ViewBag.Take; @@ -15,8 +15,7 @@ Name Email - Phone - Total + Declaration requise @@ -27,12 +26,20 @@ @entity.Name @entity.Email - @entity.Phone - @(entity.Total)€ + @(entity.Kind == LegalKind.Business) - - - + @if (entity.Kind == LegalKind.Business && entity.Declaration == null) + { + + + + } + @if (entity.Kind == LegalKind.Business && entity.Declaration != null) + { + + + + } } @@ -42,13 +49,13 @@ @if (currentPage >= 1) { - + } @if (take == Model.Count()) { - + }