using Microsoft.AspNetCore.Components; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using TIAMWebApp.Shared.Application.Interfaces; using TIAMWebApp.Shared.Application.Models; namespace TIAMSharedUI.Pages.User { public partial class HotelComponent: ComponentBase { [Inject] ISupplierService SupplierService { get; set; } [Inject] IUserDataService UserDataService { get; set; } object? OrderData { get; set; } object? AffiliateData { get; set; } object? Data { get; set; } bool isUserLoggedIn; int userType = 0; protected override async Task OnInitializedAsync() { base.OnInitialized(); OrderData = new object[] { new { Date = DateTime.Now.AddDays(3), Income = "$5", TransactionId = "POX987532582", Status = "Finished" }, new { Date = DateTime.Today.AddDays(-2), Income = "$5", TransactionId = "POX645646382", Status = "Finished" }, new { Date = DateTime.Today.AddDays(-6), Income = "$8", TransactionId = "POX645766311", Status = "Finished" }, }; AffiliateData = new object[] { new { AffiliateId = 1, IncomeThisMonth = "$5", IncomeAlltime = "9425", CompanyName = "Upgen Ltd.", Status = "Active" }, new { AffiliateId = 2, IncomeThisMonth = "$538", IncomeAlltime = "13425", CompanyName = "Kovacs hotel Ltd.", Status = "Active" }, new { AffiliateId = 3, IncomeThisMonth = "$0", IncomeAlltime = "134200", CompanyName = "Innosaurus Ltd.", Status = "Passive" }, }; var suppliers = await SupplierService.GetSuppliersAsync(); Data = suppliers.Select(s => { return new { CompanyName = s.CompanyName, ContactName = s.ContactName, ContactTitle = s.ContactTitle, Country = s.Country, City = s.City, Address = s.Address, Phone = s.Phone }; }); } [Parameter] public bool ShowSeriesPointMarkers { get; set; } [Parameter] public bool ShowSeriesLabels { get; set; } } }