Browse Source

Merge pull request #121 from onurpicakci/onur/bugfix

Use utc for admin side
pull/124/head
Berkan Sasmaz 4 years ago
committed by GitHub
parent
commit
afec7ad84b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/EventHub.Admin.Application/Events/EventAppService.cs
  2. 7
      src/EventHub.Admin.HttpApi.Host/EventHubAdminHttpApiHostModule.cs
  3. 4
      src/EventHub.Admin.Web/Pages/EventManagement.razor
  4. 4
      src/EventHub.Domain.Shared/Localization/EventHub/en.json

2
src/EventHub.Admin.Application/Events/EventAppService.cs

@ -64,7 +64,7 @@ namespace EventHub.Admin.Events
@event.SetTitle(input.Title); @event.SetTitle(input.Title);
@event.SetDescription(input.Description); @event.SetDescription(input.Description);
@event.Language = input.Language; @event.Language = input.Language;
@event.SetTime(input.StartTime, @event.EndTime); @event.SetTime(input.StartTime, input.EndTime);
await _eventManager.SetCapacityAsync(@event, input.Capacity); await _eventManager.SetCapacityAsync(@event, input.Capacity);
if (input.CoverImageStreamContent != null && input.CoverImageStreamContent.ContentLength > 0) if (input.CoverImageStreamContent != null && input.CoverImageStreamContent.ContentLength > 0)

7
src/EventHub.Admin.HttpApi.Host/EventHubAdminHttpApiHostModule.cs

@ -29,6 +29,7 @@ using Volo.Abp.Caching.StackExchangeRedis;
using Volo.Abp.Localization; using Volo.Abp.Localization;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.Swashbuckle; using Volo.Abp.Swashbuckle;
using Volo.Abp.Timing;
using Volo.Abp.VirtualFileSystem; using Volo.Abp.VirtualFileSystem;
namespace EventHub.Admin namespace EventHub.Admin
@ -61,6 +62,7 @@ namespace EventHub.Admin
ConfigureCookies(context); ConfigureCookies(context);
ConfigureSwaggerServices(context, configuration); ConfigureSwaggerServices(context, configuration);
ConfigureBackgroundJobs(); ConfigureBackgroundJobs();
ConfigureTiming();
ConfigureAutoApiControllers(); ConfigureAutoApiControllers();
} }
@ -85,6 +87,11 @@ namespace EventHub.Admin
{ {
Configure<AbpDistributedCacheOptions>(options => { options.KeyPrefix = "EventHub:"; }); Configure<AbpDistributedCacheOptions>(options => { options.KeyPrefix = "EventHub:"; });
} }
private void ConfigureTiming()
{
Configure<AbpClockOptions>(options => { options.Kind = DateTimeKind.Utc; });
}
private void ConfigureVirtualFileSystem(ServiceConfigurationContext context) private void ConfigureVirtualFileSystem(ServiceConfigurationContext context)
{ {

4
src/EventHub.Admin.Web/Pages/EventManagement.razor

@ -230,7 +230,7 @@
<Validation> <Validation>
<Field> <Field>
<FieldLabel>@L["StartTime"] *</FieldLabel> <FieldLabel>@L["StartTime"] *</FieldLabel>
<DateEdit TValue="DateTime" @bind-Date="@EditingEvent.StartTime"> <DateEdit TValue="DateTime" InputMode="DateInputMode.DateTime" @bind-Date="@EditingEvent.StartTime">
<Feedback> <Feedback>
<ValidationError/> <ValidationError/>
</Feedback> </Feedback>
@ -240,7 +240,7 @@
<Validation> <Validation>
<Field> <Field>
<FieldLabel>@L["EndTime"] *</FieldLabel> <FieldLabel>@L["EndTime"] *</FieldLabel>
<DateEdit TValue="DateTime" @bind-Date="@EditingEvent.EndTime"> <DateEdit TValue="DateTime" InputMode="DateInputMode.DateTime" @bind-Date="@EditingEvent.EndTime">
<Feedback> <Feedback>
<ValidationError/> <ValidationError/>
</Feedback> </Feedback>

4
src/EventHub.Domain.Shared/Localization/EventHub/en.json

@ -122,7 +122,7 @@
"Menu:Events": "Events", "Menu:Events": "Events",
"Title": "Title", "Title": "Title",
"OrganizationDisplayName": "Organization Display Name", "OrganizationDisplayName": "Organization Display Name",
"StartTime": "Start Time", "StartTime": "Start Time (UTC)",
"MinAttendeeCount": "Min Attendee Count", "MinAttendeeCount": "Min Attendee Count",
"MaxAttendeeCount": "Max Attendee Count", "MaxAttendeeCount": "Max Attendee Count",
"UpdateEvent": "Update Event", "UpdateEvent": "Update Event",
@ -133,7 +133,7 @@
"Country": "Country", "Country": "Country",
"City": "City", "City": "City",
"Capacity": "Capacity", "Capacity": "Capacity",
"EndTime": "End Time", "EndTime": "End Time (UTC)",
"ChooseCoverImage": "Choose a cover image", "ChooseCoverImage": "Choose a cover image",
"Permission:RegistrationManagement": "Registration Management", "Permission:RegistrationManagement": "Registration Management",
"Permission:AddAttendee": "Add Attendee", "Permission:AddAttendee": "Add Attendee",

Loading…
Cancel
Save