-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from Backiaraj/schedule
Update the project
- Loading branch information
Showing
50 changed files
with
1,629 additions
and
1,276 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,10 +1,12 @@ | ||
<Router AppAssembly="@typeof(Program).Assembly"> | ||
<Found Context="routeData"> | ||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" /> | ||
</Found> | ||
<NotFound> | ||
<LayoutView Layout="@typeof(MainLayout)"> | ||
<p>Sorry, there's nothing at this address.</p> | ||
</LayoutView> | ||
</NotFound> | ||
</Router> | ||
<Router AppAssembly="@typeof(App).Assembly"> | ||
<Found Context="routeData"> | ||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" /> | ||
<FocusOnNavigate RouteData="@routeData" Selector="h1" /> | ||
</Found> | ||
<NotFound> | ||
<PageTitle>Not found</PageTitle> | ||
<LayoutView Layout="@typeof(MainLayout)"> | ||
<p role="alert">Sorry, there's nothing at this address.</p> | ||
</LayoutView> | ||
</NotFound> | ||
</Router> |
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 |
---|---|---|
@@ -1,16 +1,18 @@ | ||
@page "/counter" | ||
|
||
<h1>Counter</h1> | ||
|
||
<p>Current count: @currentCount</p> | ||
|
||
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button> | ||
|
||
@code { | ||
private int currentCount = 0; | ||
|
||
private void IncrementCount() | ||
{ | ||
currentCount++; | ||
} | ||
} | ||
@page "/counter" | ||
|
||
<PageTitle>Counter</PageTitle> | ||
|
||
<h1>Counter</h1> | ||
|
||
<p role="status">Current count: @currentCount</p> | ||
|
||
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button> | ||
|
||
@code { | ||
private int currentCount = 0; | ||
|
||
private void IncrementCount() | ||
{ | ||
currentCount++; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,55 +1,47 @@ | ||
@page "/fetchdata" | ||
@inject HttpClient Http | ||
|
||
<h1>Weather forecast</h1> | ||
|
||
<p>This component demonstrates fetching data from the server.</p> | ||
|
||
@if (forecasts == null) | ||
{ | ||
<p><em>Loading...</em></p> | ||
} | ||
else | ||
{ | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th>Date</th> | ||
<th>Temp. (C)</th> | ||
<th>Temp. (F)</th> | ||
<th>Summary</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@foreach (var forecast in forecasts) | ||
{ | ||
<tr> | ||
<td>@forecast.Date.ToShortDateString()</td> | ||
<td>@forecast.TemperatureC</td> | ||
<td>@forecast.TemperatureF</td> | ||
<td>@forecast.Summary</td> | ||
</tr> | ||
} | ||
</tbody> | ||
</table> | ||
} | ||
|
||
@code { | ||
private WeatherForecast[] forecasts; | ||
|
||
protected override async Task OnInitializedAsync() | ||
{ | ||
forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("sample-data/weather.json"); | ||
} | ||
|
||
public class WeatherForecast | ||
{ | ||
public DateTime Date { get; set; } | ||
|
||
public int TemperatureC { get; set; } | ||
|
||
public string Summary { get; set; } | ||
|
||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); | ||
} | ||
} | ||
@page "/fetchdata" | ||
@using WorkingWithAppointments.Shared | ||
@inject HttpClient Http | ||
|
||
<PageTitle>Weather forecast</PageTitle> | ||
|
||
<h1>Weather forecast</h1> | ||
|
||
<p>This component demonstrates fetching data from the server.</p> | ||
|
||
@if (forecasts == null) | ||
{ | ||
<p><em>Loading...</em></p> | ||
} | ||
else | ||
{ | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th>Date</th> | ||
<th>Temp. (C)</th> | ||
<th>Temp. (F)</th> | ||
<th>Summary</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@foreach (var forecast in forecasts) | ||
{ | ||
<tr> | ||
<td>@forecast.Date.ToShortDateString()</td> | ||
<td>@forecast.TemperatureC</td> | ||
<td>@forecast.TemperatureF</td> | ||
<td>@forecast.Summary</td> | ||
</tr> | ||
} | ||
</tbody> | ||
</table> | ||
} | ||
|
||
@code { | ||
private WeatherForecast[]? forecasts; | ||
|
||
protected override async Task OnInitializedAsync() | ||
{ | ||
forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("sample-data/weather.json"); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,38 +1,38 @@ | ||
@page "/" | ||
|
||
<SfSchedule TValue="AppointmentDataModel" Readonly="true" @bind-SelectedDate="@DateValue" @bind-CurrentView="@CurrentView"> | ||
<ScheduleEventSettings DataSource="@ScheduleData" EnableTooltip="true"> | ||
</ScheduleEventSettings> | ||
</SfSchedule> | ||
|
||
@code { | ||
DateTime DateValue = new DateTime(2021, 5, 2); | ||
View CurrentView = View.Month; | ||
public class AppointmentDataModel | ||
{ | ||
public int Id { get; set; } | ||
|
||
public string Subject { get; set; } | ||
|
||
public DateTime StartTime { get; set; } | ||
|
||
public DateTime EndTime { get; set; } | ||
|
||
public bool IsAllDay { get; set; } | ||
|
||
public string RecurrenceRule { get; set; } | ||
|
||
public bool IsBlock { get; set; } | ||
|
||
} | ||
|
||
List<AppointmentDataModel> ScheduleData = new List<AppointmentDataModel> | ||
{ | ||
new AppointmentDataModel { Id = 1, Subject = "Scrum Meeting", StartTime = new DateTime(2021, 5, 3, 10, 0, 0) , EndTime = new DateTime(2021, 5, 3, 11, 0, 0), RecurrenceRule = "FREQ=DAILY;INTERVAL=1;COUNT=5"}, | ||
new AppointmentDataModel { Id = 2, Subject = "Demo Meeting", StartTime = new DateTime(2021, 5, 4, 11, 0, 0) , EndTime = new DateTime(2021, 5, 4, 12, 0, 0), IsBlock = true }, | ||
new AppointmentDataModel { Id = 3, Subject = "Core Team Meeting", StartTime = new DateTime(2021, 5, 6, 14, 30, 0) , EndTime = new DateTime(2021, 5, 6, 15, 30, 0) }, | ||
new AppointmentDataModel { Id = 4, Subject = "Project Discussion", StartTime = new DateTime(2021, 5, 5, 16, 45, 0) , EndTime = new DateTime(2021, 5, 5, 17, 30, 0) }, | ||
new AppointmentDataModel { Id = 5, Subject = "Testing", StartTime = new DateTime(2021, 5, 7, 10, 30, 0) , EndTime = new DateTime(2021, 5, 7, 12, 00, 0), IsAllDay = true }, | ||
|
||
}; | ||
@page "/" | ||
|
||
<SfSchedule TValue="AppointmentDataModel" Readonly="true" @bind-SelectedDate="@DateValue" @bind-CurrentView="@CurrentView"> | ||
<ScheduleEventSettings DataSource="@ScheduleData" EnableTooltip="true"> | ||
</ScheduleEventSettings> | ||
</SfSchedule> | ||
|
||
@code { | ||
DateTime DateValue = new DateTime(2021, 5, 2); | ||
View CurrentView = View.Month; | ||
public class AppointmentDataModel | ||
{ | ||
public int Id { get; set; } | ||
|
||
public string Subject { get; set; } | ||
|
||
public DateTime StartTime { get; set; } | ||
|
||
public DateTime EndTime { get; set; } | ||
|
||
public bool IsAllDay { get; set; } | ||
|
||
public string RecurrenceRule { get; set; } | ||
|
||
public bool IsBlock { get; set; } | ||
|
||
} | ||
|
||
List<AppointmentDataModel> ScheduleData = new List<AppointmentDataModel> | ||
{ | ||
new AppointmentDataModel { Id = 1, Subject = "Scrum Meeting", StartTime = new DateTime(2021, 5, 3, 10, 0, 0) , EndTime = new DateTime(2021, 5, 3, 11, 0, 0), RecurrenceRule = "FREQ=DAILY;INTERVAL=1;COUNT=5"}, | ||
new AppointmentDataModel { Id = 2, Subject = "Demo Meeting", StartTime = new DateTime(2021, 5, 4, 11, 0, 0) , EndTime = new DateTime(2021, 5, 4, 12, 0, 0), IsBlock = true }, | ||
new AppointmentDataModel { Id = 3, Subject = "Core Team Meeting", StartTime = new DateTime(2021, 5, 6, 14, 30, 0) , EndTime = new DateTime(2021, 5, 6, 15, 30, 0) }, | ||
new AppointmentDataModel { Id = 4, Subject = "Project Discussion", StartTime = new DateTime(2021, 5, 5, 16, 45, 0) , EndTime = new DateTime(2021, 5, 5, 17, 30, 0) }, | ||
new AppointmentDataModel { Id = 5, Subject = "Testing", StartTime = new DateTime(2021, 5, 7, 10, 30, 0) , EndTime = new DateTime(2021, 5, 7, 12, 00, 0), IsAllDay = true }, | ||
|
||
}; | ||
} |
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,12 @@ | ||
using Microsoft.AspNetCore.Components.Web; | ||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting; | ||
using WorkingWithAppointments.Client; | ||
using Syncfusion.Blazor; | ||
|
||
var builder = WebAssemblyHostBuilder.CreateDefault(args); | ||
builder.RootComponents.Add<App>("#app"); | ||
builder.RootComponents.Add<HeadOutlet>("head::after"); | ||
|
||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); | ||
builder.Services.AddSyncfusionBlazor(); | ||
await builder.Build().RunAsync(); |
69 changes: 40 additions & 29 deletions
69
Properties/launchSettings.json → Client/Properties/launchSettings.json
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 |
---|---|---|
@@ -1,29 +1,40 @@ | ||
{ | ||
"iisSettings": { | ||
"windowsAuthentication": false, | ||
"anonymousAuthentication": true, | ||
"iisExpress": { | ||
"applicationUrl": "http://localhost:55042", | ||
"sslPort": 44380 | ||
} | ||
}, | ||
"profiles": { | ||
"IIS Express": { | ||
"commandName": "IISExpress", | ||
"launchBrowser": true, | ||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
}, | ||
"Scheduler": { | ||
"commandName": "Project", | ||
"launchBrowser": true, | ||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", | ||
"applicationUrl": "https://localhost:5001;http://localhost:5000", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
} | ||
} | ||
} | ||
{ | ||
"iisSettings": { | ||
"windowsAuthentication": false, | ||
"anonymousAuthentication": true, | ||
"iisExpress": { | ||
"applicationUrl": "http://localhost:16162", | ||
"sslPort": 44301 | ||
} | ||
}, | ||
"profiles": { | ||
"http": { | ||
"commandName": "Project", | ||
"dotnetRunMessages": true, | ||
"launchBrowser": true, | ||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", | ||
"applicationUrl": "http://localhost:5107", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
}, | ||
"https": { | ||
"commandName": "Project", | ||
"dotnetRunMessages": true, | ||
"launchBrowser": true, | ||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", | ||
"applicationUrl": "https://localhost:7167;http://localhost:5107", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
}, | ||
"IIS Express": { | ||
"commandName": "IISExpress", | ||
"launchBrowser": true, | ||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
} | ||
} | ||
} |
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,17 @@ | ||
@inherits LayoutComponentBase | ||
|
||
<div class="page"> | ||
<div class="sidebar"> | ||
<NavMenu /> | ||
</div> | ||
|
||
<main> | ||
<div class="top-row px-4"> | ||
<a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a> | ||
</div> | ||
|
||
<article class="content px-4"> | ||
@Body | ||
</article> | ||
</main> | ||
</div> |
Oops, something went wrong.