- Migliorie
This commit is contained in:
@@ -13,14 +13,11 @@ using System.Net.Http.Headers;
|
||||
|
||||
namespace IdentityDemo.Controllers
|
||||
{
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
[Route("[controller]/[action]")]
|
||||
public class AccountController : BaseController
|
||||
{
|
||||
private static readonly string NoteModified = "Il tuo dottore ha modificato la nota per te";
|
||||
private static readonly string InvalidLogIn = "Username o Password sbagliati";
|
||||
private static readonly string AlreadyLogIn = "L'utente e' gia' loggato";
|
||||
private static readonly string UsernameDupl = "Lo username selezionato e' gia' in uso";
|
||||
private static readonly string ModNotExists = "L'oggetto da modificare non esiste";
|
||||
private static readonly string AlreadyPatie = "Sei gia' un paziente";
|
||||
private static readonly string DocNotExists = "Il dottore selezionato non esiste";
|
||||
@@ -105,11 +102,10 @@ namespace IdentityDemo.Controllers
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> _modify(User user)
|
||||
public async Task<IActionResult> _modify(User user, Doctor doctor)
|
||||
{
|
||||
return await LoggedAccessDataOf(user.Username, false, () => {
|
||||
var usr = Db.Users.Where(u => u.Username.Equals(user.Username)).FirstOrDefault();
|
||||
|
||||
if (user.Password.Equals(""))
|
||||
user.Password = usr.Password;
|
||||
if (user.Avatar.Equals(""))
|
||||
@@ -120,8 +116,20 @@ namespace IdentityDemo.Controllers
|
||||
user.LastName = usr.LastName;
|
||||
if (user.Name.Equals(""))
|
||||
user.Name = usr.Name;
|
||||
|
||||
|
||||
Db.UpdateAsync(user);
|
||||
|
||||
var doc = Db.Doctors.Where(d => d.Username.Equals(user.Username)).FirstOrDefault();
|
||||
if(doc!=null)
|
||||
{
|
||||
if (!doctor.PhoneNumber.Equals(""))
|
||||
doc.PhoneNumber = doctor.PhoneNumber;
|
||||
if (!doctor.Schedule.Equals(""))
|
||||
doc.Schedule = doctor.Schedule;
|
||||
|
||||
Db.UpdateAsync(doc);
|
||||
}
|
||||
|
||||
return Json(OkJson);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -6,12 +6,12 @@ using System.Linq;
|
||||
|
||||
namespace SeniorAssistant.Controllers
|
||||
{
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class HomeController : BaseController
|
||||
{
|
||||
[Route("")]
|
||||
[Route("Home")]
|
||||
[Route("Index")]
|
||||
[Route("Login")]
|
||||
public IActionResult Login()
|
||||
{
|
||||
return CheckUnAuthorized("Login");
|
||||
@@ -88,7 +88,7 @@ namespace SeniorAssistant.Controllers
|
||||
{
|
||||
if (IsLogged())
|
||||
{
|
||||
return RedirectToAction("Profile", "Home", GetUser(HttpContext.Session.GetString(Username)));
|
||||
return RedirectToAction("Profile", "Home");
|
||||
}
|
||||
|
||||
var forgot = Db.Forgot.Where(f => f.Username.Equals(username)).FirstOrDefault();
|
||||
@@ -101,7 +101,8 @@ namespace SeniorAssistant.Controllers
|
||||
{
|
||||
if (!IsLogged())
|
||||
{
|
||||
return RedirectToAction("Login", "Home", "/" + view);
|
||||
model = "/" + view;
|
||||
view = "Login";
|
||||
}
|
||||
return View(view, model);
|
||||
}
|
||||
@@ -110,7 +111,7 @@ namespace SeniorAssistant.Controllers
|
||||
{
|
||||
if (IsLogged())
|
||||
{
|
||||
return RedirectToAction("Profile", "Home", GetUser(HttpContext.Session.GetString(Username)));
|
||||
return RedirectToAction("Profile", "Home");
|
||||
}
|
||||
return View(view, model);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<p id="error" class="login-box-msg text-red"></p>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button type="button" class="btn btn-info">@Html.ActionLink("Torna al login", "Login")</button>
|
||||
<a href="/Login" type="button" class="btn btn-info">Torna al Login</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
<input type="reset" class="btn btn-default" value="Svuota" />
|
||||
<input type="submit" class="btn btn-info pull-right" id="login-btn" value="Login" />
|
||||
<p id="msg" class="login-box-msg"></p>
|
||||
</div>
|
||||
@@ -48,7 +47,7 @@
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button type="button" id="forgot" class="btn btn-default">Passsword dimenticata</button>
|
||||
<button type="button" class="btn btn-info pull-right">@Html.ActionLink("Registrati", "Register")</button>
|
||||
<a href="/Register" type="button" class="btn btn-info pull-right">Registrati</a>
|
||||
|
||||
<br />
|
||||
<form id="div-forgot" style="display:none" action="/Forgot" method="get">
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<!-- Conversations are loaded here -->
|
||||
<div class="direct-chat-messages">
|
||||
<div class="direct-chat-messages" style="overflow-x:hidden">
|
||||
@if (messages.Count() == 0)
|
||||
{
|
||||
<p class="text-red">Non hai messaggi</p>
|
||||
@@ -82,7 +82,7 @@
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
<form action="#" method="post">
|
||||
<div>
|
||||
<div class="input-group">
|
||||
<input type="text"id="res-message" name="message" placeholder="Scrivi un messaggio..." class="form-control">
|
||||
<span class="input-group-btn">
|
||||
@@ -90,7 +90,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<p id="message-error" class="text-red"></p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-footer-->
|
||||
</div>
|
||||
|
||||
@@ -8,28 +8,30 @@
|
||||
<div class="col-md-4">
|
||||
<div class="box box-info bg-gray-light" style="border-top-color: darkgray">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Dati utente</h3>
|
||||
<h2 class="box-title">Dati utente</h2>
|
||||
<p></p><label>Per modificare i dati: </label>
|
||||
<a href="#" type="button" class="text btn btn-default" id="btn-mod"> Premi qui</a>
|
||||
</div>
|
||||
<section class="form-horizontal">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<div class="col-sm-10">
|
||||
<input class="mod-data hide" type="text" value="@Model.Name" id="mod-name" />
|
||||
<input class="old-data" disabled type="text" value="@Model.Name" /><br />
|
||||
<input class="form-control mod-data hide" type="text" value="@Model.Name" id="mod-name" />
|
||||
<input class="form-control old-data form-control" disabled type="text" value="@Model.Name" /><br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-10">
|
||||
<input class="mod-data hide" type="text" value="@Model.LastName" id="mod-last" />
|
||||
<input class="old-data" disabled type="text" value="@Model.LastName" /><br />
|
||||
<input class="form-control mod-data hide" type="text" value="@Model.LastName" id="mod-last" />
|
||||
<input class="form-control old-data" disabled type="text" value="@Model.LastName" /><br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-10">
|
||||
<input class="mod-data hide" type="email" value="@Model.Email" id="mod-email" />
|
||||
<input class="old-data" disabled type="email" value="@Model.Email" /><br />
|
||||
<input class="form-control mod-data hide" type="email" value="@Model.Email" id="mod-email" />
|
||||
<input class="form-control old-data" disabled type="email" value="@Model.Email" /><br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -37,39 +39,39 @@
|
||||
{
|
||||
<div class="form-group">
|
||||
<div class="col-sm-10">
|
||||
<input class="mod-data hide" type="text" value="@Model.Doc.PhoneNumber" id="mod-phone" />
|
||||
<input class="old-data" disabled type="text" value="@Model.Doc.PhoneNumber" /><br />
|
||||
<input class="form-control mod-data hide" type="number" value="@Model.Doc.PhoneNumber" id="mod-phone" />
|
||||
<input class="form-control old-data" disabled type="number" value="@Model.Doc.PhoneNumber" /><br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-10">
|
||||
<input class="mod-data hide" type="text" value="@Model.Doc.Schedule" id="mod-schedule" />
|
||||
<input class="old-data" disabled type="text" value="@Model.Doc.Schedule" /><br />
|
||||
<input class="form-control mod-data hide" type="text" value="@Model.Doc.Schedule" id="mod-schedule" />
|
||||
<input class="form-control old-data" disabled type="text" value="@Model.Doc.Schedule" /><br />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="form-group">
|
||||
<div class="col-sm-10">
|
||||
<input type="text" value="@Model.Username" disabled /><br />
|
||||
<input class="form-control" type="text" value="@Model.Username" disabled /><br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-10">
|
||||
<input class="mod-data hide" type="password" id="mod-pass1" placeholder="Nuova password" /><br />
|
||||
<input class="form-control mod-data hide" type="password" id="mod-pass1" placeholder="Nuova password" /><br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-10">
|
||||
<input class="mod-data hide" type="password" id="mod-pass2" placeholder="Conferma password" /><br />
|
||||
<input class="form-control mod-data hide" type="password" id="mod-pass2" placeholder="Conferma password" /><br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-group" id="image-uploader" style="display:none">
|
||||
<div class="col-sm-10">
|
||||
<div id="image-uploader" style="display:none">
|
||||
<div>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<span>Cambia immagine profilo</span>
|
||||
<input type="file" name="files" id="files" />
|
||||
@@ -80,10 +82,9 @@
|
||||
</div>
|
||||
</section>
|
||||
<div class="box-footer">
|
||||
<p id="msg">Lasciare i campi vuoti per non modificare</p>
|
||||
<p id="msg"></p>
|
||||
<input class="btn btn-info pull-right mod-data hide" type="button" id="update-user" value="Aggiorna"/>
|
||||
|
||||
<input type="button" class="btn btn-default" value="Premere per modificare" id="btn-mod" />
|
||||
<input class="btn btn-info pull-right" type="button" id="update-user" value="Aggiorna" style="display: none" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -112,19 +113,20 @@
|
||||
|
||||
<div class="form-group">
|
||||
<div class="input-group-btn input-group-sm">
|
||||
<h5 class="box-comment">Orario visite: <strong>@doctor.Schedule</strong></h5>
|
||||
<h5 class="form-control box-comment">Orario visite: <strong>@doctor.Schedule</strong></h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Note da parte del dottore:</label>
|
||||
<p class="form-control" placeholder="Nessuna nuova nota" style="height:50px">@Model.Pat.Notes</p>
|
||||
<textarea class="form-control" placeholder="Nessuna nota" readonly rows="10" style="resize:none">@Model.Pat.Notes</textarea>
|
||||
<br />
|
||||
<div class="input-group-btn input-group-sm">
|
||||
<a href="/Message/@doctor.Username" class="btn btn-flat btn-info">Scrivi un messaggio</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -137,7 +139,9 @@
|
||||
if (docData != null) // is DOC
|
||||
{
|
||||
// see all the patient of the doc
|
||||
title = "Lista dei pazienti";
|
||||
<div class="box-header with-border">
|
||||
<h2 class="box-title">Lista dei pazienti</h2>
|
||||
</div>
|
||||
var patients = (from u in db.Users
|
||||
join p in db.Patients on u.Username equals p.Username
|
||||
where p.Doctor.Equals(docData.Username)
|
||||
@@ -255,7 +259,6 @@
|
||||
$(".old-data").toggleClass("hide");
|
||||
|
||||
$("#image-uploader").toggle();
|
||||
$("#update-user").toggle();
|
||||
});
|
||||
|
||||
$("#update-user").on("click", function () {
|
||||
@@ -279,7 +282,9 @@
|
||||
Name: name,
|
||||
Lastname: lastname,
|
||||
Password: password,
|
||||
Email: email,
|
||||
Email: email
|
||||
},
|
||||
Doctor: {
|
||||
Schedule: schedule,
|
||||
PhoneNumber: phone
|
||||
}
|
||||
@@ -287,7 +292,7 @@
|
||||
dataType: "json",
|
||||
type: "POST",
|
||||
success: function (data) {
|
||||
var msg = $("#msg-reg");
|
||||
var msg = $("#msg");
|
||||
if (data.success) {
|
||||
window.location.reload();
|
||||
} else {
|
||||
|
||||
@@ -51,9 +51,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">Code Doctor</label>
|
||||
<label class="col-sm-3 control-label">Sei un dottore?</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" id="regDoctor" placeholder="(54328)" />
|
||||
<input type="checkbox" id="check" />
|
||||
<input class="form-control hide" type="text" id="regDoctor" placeholder="(543210)" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -72,10 +73,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<input type="reset" class="btn btn-default" />
|
||||
<button class="btn btn-info pull-right" id="register-btn">Register</button>
|
||||
<a href="/Login" type="button" class="btn btn-info">Torna al login</a>
|
||||
<p id="msg-reg" class="login-box-msg text-red"></p>
|
||||
<button type="button" class="btn btn-info">@Html.ActionLink("Torna al login", "Login")</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -84,6 +84,11 @@
|
||||
|
||||
|
||||
<script>
|
||||
$("#check").on("click", function () {
|
||||
$("#regDoctor").addClass("hide");
|
||||
$("#check").removeClass("hide");
|
||||
});
|
||||
|
||||
$("#register-btn").on("click", function () {
|
||||
var username = $("#regUsername").val();
|
||||
var name = $("#regName").val();
|
||||
|
||||
@@ -19,61 +19,42 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<input id="hours-data" type="text" placeholder="hours" value="24" class="form-control timepicker" />
|
||||
|
||||
<div class="input-group-addon">
|
||||
<input type="button" value="Cambia ora" class="no-border" id="refresh-hours">
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.input group -->
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.form group -->
|
||||
</div>
|
||||
|
||||
<div class="col-md-1"></div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input id="date-from" type="date" value="@HttpContextAccessor.HttpContext.Request.Query["from"]" />
|
||||
<input id="date-to" type="date" value="@HttpContextAccessor.HttpContext.Request.Query["to"]" />
|
||||
<input type="button" id="refresh-date" class="fc-button no-border" value="Cambia data" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (isDoc)
|
||||
{
|
||||
<div class="form-group">
|
||||
<form action="" method="get" onsubmit="return confirm('Sicuro di voler rimuovere il paziente?');">
|
||||
<button type="submit" name="removePatient" class="btn btn-default" value="@Model.Username">Rimuovi paziente</button>
|
||||
</form>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="row"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-4">
|
||||
<table>
|
||||
<tr>
|
||||
<div class="form-group">
|
||||
<div class="input-group col-md-10">
|
||||
<input id="hours-data" type="text" placeholder="hours" value="24" class="form-control timepicker" />
|
||||
|
||||
<div class="input-group-addon">
|
||||
<input type="button" value="Cambia ora" class="no-border" id="refresh-hours">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</tr>
|
||||
<tr>
|
||||
<div class="form-group">
|
||||
<div class="input-group col-md-4">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input id="date-from" class="form-control" type="date" value="@HttpContextAccessor.HttpContext.Request.Query["from"]" />
|
||||
|
||||
<input id="date-to" class="form-control" type="date" value="@HttpContextAccessor.HttpContext.Request.Query["to"]" />
|
||||
<div class="input-group-addon">
|
||||
<input type="button" id="refresh-date" class="no-border btn" value="Cambia data" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
@if (isDoc)
|
||||
{
|
||||
<div class="form-group col-md-3">
|
||||
<label>Scrivi una nota per il paziente</label>
|
||||
<textarea id="note-area" placeholder="Scrivi una nota.." class="form-control" rows="2">@Model.Pat.Notes</textarea>
|
||||
<button id="send-note" class="btn">Salva</button>
|
||||
<p id="note-error"></p>
|
||||
</div>
|
||||
<div class="col-md-1"></div>
|
||||
|
||||
<div class="form-group col-md-5">
|
||||
<div class="form-group col-md-10">
|
||||
<label>Inserisci un minimo o massimo valore per il battito cardiaco</label>
|
||||
<p>Se il valore del battito del paziente supera i valori che hai inserito verrai notificato</p>
|
||||
<div class="form-group col-md-5">
|
||||
@@ -85,67 +66,84 @@ else
|
||||
<input id="minHeart" placeholder="min" value="@Model.Pat.MinHeart" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1"></div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="input-group-btn input-group-sm">
|
||||
<a href="/Message/@Model.Pat.Username" class="btn btn-flat btn-info">Scrivi a @Model.Name </a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$("#send-note").on("click", function () {
|
||||
var text = $("#note-area").val().trim();
|
||||
$.ajax({
|
||||
url: "/Account/_addNote",
|
||||
type: "PUT",
|
||||
data: {
|
||||
Patient: "@Model.Username", Text: text
|
||||
},
|
||||
success: function (data) {
|
||||
$("#note-error").html(data.success ? "Nota salvata" : data.message);
|
||||
}
|
||||
});
|
||||
});
|
||||
$("#maxHeart, #minHeart").on("change keyup paste click", function () {
|
||||
onlyNum($(this));
|
||||
});
|
||||
$("#maxHeart, #minHeart").on("blur", function () {
|
||||
var value = parseInt($(this).val());
|
||||
var id = $(this).attr("id");
|
||||
$.ajax({
|
||||
url: "/Account/_" + id + "ToPatient",
|
||||
type: "PUT",
|
||||
data: {
|
||||
Patient: "@Model.Username",
|
||||
Value: value
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
@if (isDoc)
|
||||
{
|
||||
<div class="form-group">
|
||||
<label>Scrivi una nota per il paziente</label>
|
||||
<textarea id="note-area" placeholder="Scrivi una nota.." class="form-control" rows="3" style="resize:none">@Model.Pat.Notes</textarea>
|
||||
<button id="send-note" class="btn">Salva</button>
|
||||
<p id="note-error"></p>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>
|
||||
<input type="checkbox" id="show-table">
|
||||
Mostra dati sottoforma tabella
|
||||
</label>
|
||||
|
||||
<div class="row">
|
||||
@if (isDoc)
|
||||
{
|
||||
<div class="form-group col-md-4">
|
||||
<form action="" method="get" onsubmit="return confirm('Sicuro di voler rimuovere il paziente?');">
|
||||
<button type="submit" name="removePatient" class="btn btn-danger" value="@Model.Username">Rimuovi paziente</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<div class="input-group-btn input-group-sm col-md-10">
|
||||
<a href="/Message/@Model.Pat.Username" class="btn btn-flat btn-info">Scrivi a @Model.Name </a>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="form-group col-md-4">
|
||||
<input type="checkbox" id="show-table">
|
||||
<label>
|
||||
Mostra dati sotto forma di tabella
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="chart-data"></div>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$('#reservation').daterangepicker();
|
||||
$('#datepicker').datepicker({
|
||||
autoclose: true
|
||||
$("#send-note").on("click", function () {
|
||||
var text = $("#note-area").val().trim();
|
||||
$.ajax({
|
||||
url: "/Account/_addNote",
|
||||
type: "PUT",
|
||||
data: {
|
||||
Patient: "@Model.Username", Text: text
|
||||
},
|
||||
success: function (data) {
|
||||
$("#note-error").html(data.success ? "Nota salvata" : data.message);
|
||||
}
|
||||
});
|
||||
});
|
||||
$("#maxHeart, #minHeart").on("change keyup paste click", function () {
|
||||
onlyNum($(this));
|
||||
});
|
||||
$("#maxHeart, #minHeart").on("blur", function () {
|
||||
var value = parseInt($(this).val());
|
||||
var id = $(this).attr("id");
|
||||
$.ajax({
|
||||
url: "/Account/_" + id + "ToPatient",
|
||||
type: "PUT",
|
||||
data: {
|
||||
Patient: "@Model.Username",
|
||||
Value: value
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function onlyNum(object, numChar = 3) {
|
||||
object.val(object.val().replace(/[^0-9]/g, '').substring(0, numChar));
|
||||
}
|
||||
|
||||
$("#show-table").on("click", function () {
|
||||
$("#refresh-hours").click();
|
||||
$(toRefresh).click();
|
||||
});
|
||||
|
||||
$("#hours-data").on("change keyup paste click", function () {
|
||||
@@ -154,12 +152,14 @@ else
|
||||
$("#refresh-hours").on("click", function () {
|
||||
var hours = $("#hours-data").val();
|
||||
var end_url = "/@Model.Username/last/" + hours;
|
||||
toRefresh = "#refresh-hours";
|
||||
kendoUpdate(end_url);
|
||||
});
|
||||
$("#refresh-date").on("click", function () {
|
||||
var from = $("#date-from").val();
|
||||
var to = $("#date-to").val();
|
||||
var end_url = "/@Model.Username/"+from+"/"+to;
|
||||
var end_url = "/@Model.Username/" + from + "/" + to;
|
||||
toRefresh = "#refresh-date";
|
||||
kendoUpdate(end_url);
|
||||
});
|
||||
|
||||
@@ -184,7 +184,7 @@ else
|
||||
if (Object.keys(heartbeat).length == 0
|
||||
&& Object.keys(steps).length == 0
|
||||
&& Object.keys(sleep).length == 0)
|
||||
$("#chart-data").html("Nessun dato");
|
||||
$("#chart-data").html("<h3 class='text-center text-red'>Nessun Dato</h3>");
|
||||
else {
|
||||
$("#chart-data").html("");
|
||||
if (sleepArr.length == 0)
|
||||
|
||||
@@ -69,10 +69,9 @@
|
||||
|
||||
<!-- Sidebar user panel (optional) -->
|
||||
<!-- search form (Optional) -->
|
||||
<div class=" sidebar-menu text-muted">Aggiungi un utente ai link rapidi</div>
|
||||
<form action="" method="get" class="sidebar-form">
|
||||
<div class="input-group">
|
||||
<input type="text" name="add" class="form-control" placeholder="Aggiungi..." , value="">
|
||||
<input type="text" name="add" class="form-control" placeholder="Aggiungi utente ai link" , value="">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-flat">
|
||||
<i class="fa fa-plus"></i>
|
||||
@@ -105,14 +104,14 @@
|
||||
</li>
|
||||
break;
|
||||
case SubMenu multi:
|
||||
<li class="treeview">
|
||||
<li class="treeview menu-open">
|
||||
<a href="#">
|
||||
<i class="fa fa-link"></i><span>@multi.Text</span>
|
||||
<span class="pull-right-container">
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<ul class="treeview-menu" style="display:block">
|
||||
@foreach (MenuItem item in multi.Items)
|
||||
{
|
||||
<li>
|
||||
@@ -120,7 +119,7 @@
|
||||
<span>@Html.Raw(item.Text)</span>
|
||||
<form class="pull-right-container" action="" method="get">
|
||||
<input type="text" name="remove" class="hide" value="@System.IO.Path.GetFileName(item.HRef)">
|
||||
<button class="no-border btn-flat" type="submit">
|
||||
<button class="no-border btn-flat" style="background-color:#2c3b41" type="submit" role="form">
|
||||
<i class="fa fa-minus pull-right"></i>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
BIN
SeniorAssistant/senior.db
Normal file
BIN
SeniorAssistant/senior.db
Normal file
Binary file not shown.
Reference in New Issue
Block a user