diff --git a/SeniorAssistant/Startup.cs b/SeniorAssistant/Startup.cs index 138f4da..8ae6eaa 100644 --- a/SeniorAssistant/Startup.cs +++ b/SeniorAssistant/Startup.cs @@ -152,8 +152,8 @@ namespace SeniorAssistant users.Add(new User { Name = "Alfredo", LastName = "Parise", Email = "alfred.pary@libero.it", Username = "alfredigno", Password = "alfy", Avatar = "/uploads/default.jpg" }); users.Add(new User { Name = "Edoardo", LastName = "Marzio", Email = "edo.marzio@libero.it", Username = "marzietto", Password = "edo64", Avatar = "/uploads/default.jpg" }); - docs.Add(new Doctor { Username = "alfredigno", Location = "Brasile", PhoneNumber = "+0 123456789" }); - docs.Add(new Doctor { Username = "marzietto", Location = "Uganda", PhoneNumber = "+9 87654321" }); + docs.Add(new Doctor { Username = "alfredigno", Location = "Brasile", PhoneNumber = "+0 123456789", Schedule = "Solo feriali 9:00-13:00/15:00-19:00" }); + docs.Add(new Doctor { Username = "marzietto", Location = "Uganda", PhoneNumber = "+9 87654321", Schedule = "Feriali e festivi 9:00-13:00" }); foreach (var doc in docs) db.InsertOrReplace(doc); diff --git a/SeniorAssistant/Views/Home/Message.cshtml b/SeniorAssistant/Views/Home/Message.cshtml index 84da4a2..36d93e1 100644 --- a/SeniorAssistant/Views/Home/Message.cshtml +++ b/SeniorAssistant/Views/Home/Message.cshtml @@ -4,7 +4,7 @@ @using LinqToDB; @{ - ViewBag.Title = "Hello Razor"; + ViewBag.Title = "Chat"; var session = HttpContextAccessor.HttpContext.Session; var username = session.GetString("username"); var db = dbFactory.Create(); @@ -67,12 +67,11 @@ Tu @message.Time - + User image
@message.Body
- } diff --git a/SeniorAssistant/Views/Home/Profile.cshtml b/SeniorAssistant/Views/Home/Profile.cshtml index b4ce25e..cfa6b7b 100644 --- a/SeniorAssistant/Views/Home/Profile.cshtml +++ b/SeniorAssistant/Views/Home/Profile.cshtml @@ -10,8 +10,6 @@

Dati utente

- -
@@ -47,7 +45,7 @@
-
+
} @@ -96,13 +94,12 @@ var doctor = (from u in db.Users join d in db.Doctors on u.Username equals d.Username where d.Username.Equals(Model.Pat.Doctor) - select new { u.Username, u.Name, u.LastName, d.Location }).ToArray().First(); + select new { u.Username, u.Name, u.LastName, d.Location, d.PhoneNumber, d.Schedule }).ToArray().First();

Contatti con il dottore: @doctor.Name @doctor.LastName

-
@@ -110,26 +107,12 @@
-
Recapito telefonico: +0 00000000
+
Recapito telefonico: @doctor.PhoneNumber
-
-
-

Orari visite

-
    -
  • Sunday Closed
  • -
  • Monday 9:00-22:00
  • -
  • Tuesday 9:00-22:00
  • -
  • Wednesday 9:00-22:00
  • -
  • Thursday 9:00-22:00
  • -
  • Friday 9:00-23:30
  • -
  • Saturday 14:00-23:30
  • -
+
Orario visite: @doctor.Schedule
@@ -139,11 +122,8 @@ Scrivi un messaggio
- -
-
} else @@ -256,10 +236,7 @@ $(document).ready(function () { $(".opening-hours li").eq(new Date().getDay()).addClass("today"); }); - - $("#show-schedule").on("click", function () { - $("#tab-schedule").toggleClass("hide"); - }); + $("#files").kendoUpload({ async: { saveUrl: "/Account/_save", diff --git a/SeniorAssistant/Views/Home/Register.cshtml b/SeniorAssistant/Views/Home/Register.cshtml index 5fe2a5a..51e90b8 100644 --- a/SeniorAssistant/Views/Home/Register.cshtml +++ b/SeniorAssistant/Views/Home/Register.cshtml @@ -5,7 +5,6 @@

Registrazione

-
@@ -72,17 +71,14 @@
- - -
diff --git a/SeniorAssistant/Views/Home/User.cshtml b/SeniorAssistant/Views/Home/User.cshtml index c6c5688..7a75c76 100644 --- a/SeniorAssistant/Views/Home/User.cshtml +++ b/SeniorAssistant/Views/Home/User.cshtml @@ -3,7 +3,7 @@ @model User @{ - ViewBag.Title = "Hello Razor"; + ViewBag.Title = "Dati paziente"; var session = HttpContextAccessor.HttpContext.Session; var username = session.GetString("username"); bool filter = HttpContextAccessor.HttpContext.Request.Query["from"] != (String)null; @@ -39,7 +39,6 @@ else
-
@@ -49,9 +48,7 @@ else
-
-
@if (isDoc) @@ -249,7 +246,14 @@ else }); } if (document.getElementById("show-table").checked) { + var dati = "Dati di @Model.Name @Model.LastName" $("#chart-data").kendoGrid({ + toolbar: ["excel"], + excel: { + fileName: dati, + filterable: false, + columns: [{ autowidth: true}] + }, dataSource: { data: allData, serverPaging: false, @@ -288,7 +292,13 @@ else field: "Sleep", title: "Sonno" } - ] + ], + excelExport: function (e) { + var sheet = e.workbook.sheets[0]; + for (var i = 1; i < sheet.columns.length; i++) { + sheet.columns[i].width = 10; + } + } }); } else diff --git a/SeniorAssistant/Views/Home/Users.cshtml b/SeniorAssistant/Views/Home/Users.cshtml index 27fec0e..5c25700 100644 --- a/SeniorAssistant/Views/Home/Users.cshtml +++ b/SeniorAssistant/Views/Home/Users.cshtml @@ -1,6 +1,6 @@ @model IEnumerable @{ - ViewBag.Title = "Hello Razor"; + ViewBag.Title = "Tutti gli utenti"; }
diff --git a/SeniorAssistant/Views/Shared/_Layout.cshtml b/SeniorAssistant/Views/Shared/_Layout.cshtml index 836c060..d9e55b3 100644 --- a/SeniorAssistant/Views/Shared/_Layout.cshtml +++ b/SeniorAssistant/Views/Shared/_Layout.cshtml @@ -39,7 +39,7 @@ scratch. This page gets rid of all links and provides the needed markup only. - +