diff --git a/Source/PartnerCenter.CustomerPortal/Controllers/CustomerAccountController.cs b/Source/PartnerCenter.CustomerPortal/Controllers/CustomerAccountController.cs index 7a1f414..37bd82f 100644 --- a/Source/PartnerCenter.CustomerPortal/Controllers/CustomerAccountController.cs +++ b/Source/PartnerCenter.CustomerPortal/Controllers/CustomerAccountController.cs @@ -56,9 +56,20 @@ public async Task GetCustomerAccount() CreationDate = item.CreationDate.ToString("d", responseCulture) }).ToList(); + List allUsageSubscriptionsOfCustomer = (from item in customerAllSubscriptions.Items + where item.BillingType == BillingType.Usage + select new CustomerUsageSubscriptionsModel() + { + Id = item.Id, + Name = item.FriendlyName, + Status = this.GetStatusType(item.Status), + CreationDate = item.CreationDate.ToString("d", responseCulture) + }).ToList(); + return new CustomerViewModel() { - Licenses = allSubscriptionsOfCustomer.OrderBy(items => items.OfferName) + Licenses = allSubscriptionsOfCustomer.OrderBy(items => items.OfferName), + UsageSubscriptions = allUsageSubscriptionsOfCustomer.OrderBy(items => items.Name) }; } diff --git a/Source/PartnerCenter.CustomerPortal/Models/CustomerUsageSubscriptionsModel.cs b/Source/PartnerCenter.CustomerPortal/Models/CustomerUsageSubscriptionsModel.cs new file mode 100644 index 0000000..0f3ed3a --- /dev/null +++ b/Source/PartnerCenter.CustomerPortal/Models/CustomerUsageSubscriptionsModel.cs @@ -0,0 +1,34 @@ +// ----------------------------------------------------------------------- +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// ----------------------------------------------------------------------- + +namespace Microsoft.Store.PartnerCenter.CustomerPortal.Models +{ + /// + /// The customer licenses view model. + /// + public class CustomerUsageSubscriptionsModel + { + /// + /// Gets or sets the customer license Id. + /// + public string Id { get; set; } + + /// + /// Gets or sets the friendly name. + /// + public string Name { get; set; } + + /// + /// Gets or sets the customer license status like None, Active, Suspended or Deleted + /// + public string Status { get; set; } + + /// + /// Gets or sets the license creation date. + /// + public string CreationDate { get; set; } + } +} \ No newline at end of file diff --git a/Source/PartnerCenter.CustomerPortal/Models/CustomerViewModel.cs b/Source/PartnerCenter.CustomerPortal/Models/CustomerViewModel.cs index dd4aea8..12fd6e3 100644 --- a/Source/PartnerCenter.CustomerPortal/Models/CustomerViewModel.cs +++ b/Source/PartnerCenter.CustomerPortal/Models/CustomerViewModel.cs @@ -124,5 +124,10 @@ public class CustomerViewModel /// Gets or sets the customers licenses in this summary. /// public IEnumerable Licenses { get; set; } + + /// + /// Gets or sets the customers usage subscriptions in this summary. + /// + public IEnumerable UsageSubscriptions { get; set; } } } \ No newline at end of file diff --git a/Source/PartnerCenter.CustomerPortal/PartnerCenter.CustomerPortal.csproj b/Source/PartnerCenter.CustomerPortal/PartnerCenter.CustomerPortal.csproj index 437c915..94c7346 100644 --- a/Source/PartnerCenter.CustomerPortal/PartnerCenter.CustomerPortal.csproj +++ b/Source/PartnerCenter.CustomerPortal/PartnerCenter.CustomerPortal.csproj @@ -263,6 +263,7 @@ + @@ -582,6 +583,7 @@ PublicResXFileCodeGenerator + Designer Resources.Designer.cs Designer diff --git a/Source/PartnerCenter.CustomerPortal/Resources.Designer.cs b/Source/PartnerCenter.CustomerPortal/Resources.Designer.cs index 3c566c7..fc76a84 100644 --- a/Source/PartnerCenter.CustomerPortal/Resources.Designer.cs +++ b/Source/PartnerCenter.CustomerPortal/Resources.Designer.cs @@ -3147,6 +3147,15 @@ public static string UpdatingOfferMessage { } } + /// + /// Looks up a localized string similar to . + /// + public static string UsageBasedSubscriptionsCaption { + get { + return ResourceManager.GetString("UsageBasedSubscriptionsCaption", resourceCulture); + } + } + /// /// Looks up a localized string similar to Licenses. /// diff --git a/Source/PartnerCenter.CustomerPortal/Resources.de.resx b/Source/PartnerCenter.CustomerPortal/Resources.de.resx index 1c2e177..0ef5da5 100644 --- a/Source/PartnerCenter.CustomerPortal/Resources.de.resx +++ b/Source/PartnerCenter.CustomerPortal/Resources.de.resx @@ -1176,4 +1176,7 @@ Sie können eine Application Insights Instrumentationsschlüssel angeben, um die Telemetrie-Daten aus dem Portal zu erfassen. + + Nutzung-Abonnements + \ No newline at end of file diff --git a/Source/PartnerCenter.CustomerPortal/Resources.es.resx b/Source/PartnerCenter.CustomerPortal/Resources.es.resx index e3e67eb..09f746c 100644 --- a/Source/PartnerCenter.CustomerPortal/Resources.es.resx +++ b/Source/PartnerCenter.CustomerPortal/Resources.es.resx @@ -1176,4 +1176,7 @@ Puede especificar una clave de instrumentación de aplicación de conocimientos con el fin de capturar los datos de telemetría desde el portal. + + Suscripciones de uso basado en + \ No newline at end of file diff --git a/Source/PartnerCenter.CustomerPortal/Resources.fr.resx b/Source/PartnerCenter.CustomerPortal/Resources.fr.resx index c5f0976..a10182c 100644 --- a/Source/PartnerCenter.CustomerPortal/Resources.fr.resx +++ b/Source/PartnerCenter.CustomerPortal/Resources.fr.resx @@ -1176,4 +1176,7 @@ Vous pouvez spécifier une clé d’instrumentation aperçus de l’Application afin de capturer les données de télémétrie à partir du portail. + + Abonnements d’utilisation en fonction + \ No newline at end of file diff --git a/Source/PartnerCenter.CustomerPortal/Resources.ja.resx b/Source/PartnerCenter.CustomerPortal/Resources.ja.resx index 4781fbb..f06a1f5 100644 --- a/Source/PartnerCenter.CustomerPortal/Resources.ja.resx +++ b/Source/PartnerCenter.CustomerPortal/Resources.ja.resx @@ -1176,4 +1176,7 @@ ポータルからのテレメトリ データをキャプチャするために、アプリケーションのインサイト インストルメンテーション キーを指定できます。 + + 使用状況ベースのサブスクリプション + \ No newline at end of file diff --git a/Source/PartnerCenter.CustomerPortal/Resources.nl.resx b/Source/PartnerCenter.CustomerPortal/Resources.nl.resx index c8ab0a3..a7f6d9f 100644 --- a/Source/PartnerCenter.CustomerPortal/Resources.nl.resx +++ b/Source/PartnerCenter.CustomerPortal/Resources.nl.resx @@ -1176,4 +1176,7 @@ U kunt een toepassing inzichten instrumentatie sleutel opgeven om te vangen telemetrie gegevens vanaf de portal. + + Gebruik op basis abonnementen + \ No newline at end of file diff --git a/Source/PartnerCenter.CustomerPortal/Resources.resx b/Source/PartnerCenter.CustomerPortal/Resources.resx index af15b88..8eb5173 100644 --- a/Source/PartnerCenter.CustomerPortal/Resources.resx +++ b/Source/PartnerCenter.CustomerPortal/Resources.resx @@ -1176,4 +1176,7 @@ You can specify an Application Insights instrumentation key in order to capture telemetry data from the portal. + + Usage based subscriptions + \ No newline at end of file diff --git a/Source/PartnerCenter.CustomerPortal/Scripts/Plugins/CustomerAccountPresenter.js b/Source/PartnerCenter.CustomerPortal/Scripts/Plugins/CustomerAccountPresenter.js index 9b67215..19508c0 100644 --- a/Source/PartnerCenter.CustomerPortal/Scripts/Plugins/CustomerAccountPresenter.js +++ b/Source/PartnerCenter.CustomerPortal/Scripts/Plugins/CustomerAccountPresenter.js @@ -40,6 +40,7 @@ Microsoft.WebPortal.CustomerAccountPresenter.prototype.onRender = function () { customerInfoProgress.done(function (customerInformation) { self.viewModel.Licenses = customerInformation.Licenses; + self.viewModel.UsageSubscriptions = customerInformation.UsageSubscriptions; self.viewModel.IsSet(true); }).fail(function (result, status, error) { var notification = new Microsoft.WebPortal.Services.Notification(Microsoft.WebPortal.Services.Notification.NotificationType.Error, diff --git a/Source/PartnerCenter.CustomerPortal/Views/Shared/CustomerAccount.cshtml b/Source/PartnerCenter.CustomerPortal/Views/Shared/CustomerAccount.cshtml index 641f613..ee234cb 100644 --- a/Source/PartnerCenter.CustomerPortal/Views/Shared/CustomerAccount.cshtml +++ b/Source/PartnerCenter.CustomerPortal/Views/Shared/CustomerAccount.cshtml @@ -31,6 +31,7 @@ + @@ -52,5 +53,47 @@ +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + +
+
+