This commit is contained in:
@@ -86,18 +86,18 @@ namespace AyaNova.Api.Controllers
|
||||
s.Id = v.WoItemSchedUserId;
|
||||
s.Color = ColorFromWOItem(v, p);
|
||||
s.TextColor = TextColor(s.Color);
|
||||
s.Start = EpochSeconds(v.StartDate);
|
||||
s.End = EpochSeconds(v.StopDate);
|
||||
s.Start = EpochSeconds(v.StartDate, p.TZOffset);
|
||||
s.End = EpochSeconds(v.StopDate, p.TZOffset);
|
||||
s.Type = AyaType.WorkOrderItemScheduledUser;
|
||||
s.Name = NameFromWOItem(v, p);
|
||||
return s;
|
||||
}
|
||||
|
||||
private static long? EpochSeconds(DateTime? dt)
|
||||
private static long? EpochSeconds(DateTime? dt, int tzOffset = 0)
|
||||
{
|
||||
if (dt == null) return null;
|
||||
DateTimeOffset dto = new DateTimeOffset((DateTime)dt);
|
||||
return dto.ToUnixTimeMilliseconds();
|
||||
return dto.ToUnixTimeMilliseconds() + (tzOffset * 60000);
|
||||
}
|
||||
|
||||
private static string ColorFromWOItem(ViewSchedulePersonalWorkOrder v, PersonalScheduleParams p)
|
||||
@@ -151,6 +151,7 @@ namespace AyaNova.Api.Controllers
|
||||
public class PersonalScheduleParams
|
||||
{
|
||||
public ScheduleView View { get; set; }
|
||||
public int TZOffset { get; set; }
|
||||
public DateTime Start { get; set; }
|
||||
public DateTime End { get; set; }
|
||||
public PersonalScheduleWorkOrderColorSource ColorSource { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user