generated from Kentico/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6617d7d
commit 41ee563
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
src/Kentico.Xperience.CRM.Common/Admin/CRMContactSyncItemListing.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using Kentico.Xperience.Admin.Base; | ||
using Kentico.Xperience.Admin.DigitalMarketing.UIPages; | ||
using Kentico.Xperience.CRM.Common.Admin; | ||
using CMS.ContactManagement; | ||
|
||
[assembly: UIPage( | ||
parentType: typeof(ContactManagementApplication), | ||
slug: "crm-contact-sync-listing", | ||
uiPageType: typeof(CRMContactSyncItemListing), | ||
name: "CRM contacts sync", | ||
templateName: TemplateNames.LISTING, | ||
order: 1000, | ||
icon: Icons.IntegrationScheme)] | ||
|
||
namespace Kentico.Xperience.CRM.Common.Admin; | ||
|
||
internal class CRMContactSyncItemListing : ListingPage | ||
{ | ||
protected override string ObjectType => CRMSyncItemInfo.OBJECT_TYPE; | ||
|
||
public override Task ConfigurePage() | ||
{ | ||
PageConfiguration.ColumnConfigurations | ||
.AddColumn(nameof(CRMSyncItemInfo.CRMSyncItemEntityID), "Email", maxWidth: 50) | ||
.AddColumn(nameof(CRMSyncItemInfo.CRMSyncItemEntityCRM), "CRM", maxWidth: 20) | ||
.AddColumn(nameof(CRMSyncItemInfo.CRMSyncItemCRMID), "CRM ID") | ||
.AddColumn(nameof(CRMSyncItemInfo.CRMSyncItemLastModified), "Last sync"); | ||
|
||
PageConfiguration.QueryModifiers.AddModifier(q => | ||
q.WhereEquals(nameof(CRMSyncItemInfo.CRMSyncItemEntityClass), ContactInfo.TYPEINFO.ObjectClassName) | ||
.OrderByDescending(nameof(CRMSyncItemInfo.CRMSyncItemLastModified))); | ||
|
||
return base.ConfigurePage(); | ||
} | ||
} |