-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Support to workspaces * Support to HaraFeature (easy log appointment)
- Loading branch information
Showing
18 changed files
with
2,833 additions
and
19 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
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,46 @@ | ||
using System; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Authorization; | ||
using Arda.Common.Utils; | ||
using System.Net.Http; | ||
using Arda.Main.Utils; | ||
using Microsoft.AspNetCore.Authentication.OpenIdConnect; | ||
using System.Net.Http.Headers; | ||
using Arda.Main.ViewModels; | ||
using Newtonsoft.Json; | ||
|
||
// For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 | ||
|
||
namespace Arda.Main.Controllers | ||
{ | ||
[Authorize] | ||
public class WorkController : Controller | ||
{ | ||
public IActionResult Index() | ||
{ | ||
var user = User.Claims.First(claim => claim.Type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name").Value; | ||
|
||
ViewBag.User = user; | ||
|
||
UsageTelemetry.Track(user, ArdaUsage.Work_Index); | ||
|
||
return View(); | ||
} | ||
|
||
[HttpGet("[controller]/{workspace}")] | ||
public IActionResult Workspace(string workspace) | ||
{ | ||
var user = User.Claims.First(claim => claim.Type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name").Value; | ||
|
||
ViewBag.User = user; | ||
ViewBag.Title = workspace.ToUpper(); | ||
ViewBag.Work = workspace.ToLower(); | ||
|
||
UsageTelemetry.Track(user, ArdaUsage.Work_Index); | ||
|
||
return View(); | ||
} | ||
} | ||
} |
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
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
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
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
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,123 @@ | ||
@{ | ||
Layout = "~/Views/Shared/_LayoutEmpty.cshtml"; | ||
} | ||
<section class="concontainer-fluid"> | ||
<div id="message"> | ||
<!-- Message dynamically inputed here --> | ||
</div> | ||
<div class="col-xs-12"> | ||
<div class="row"> | ||
|
||
@*<header class="ctn-header-dashboard"> | ||
<!-- Title --> | ||
<div class="col-xs-12 col-lg-3 col-md-4"> | ||
<h2> | ||
Work Appointment | ||
</h2> | ||
<p>Adding a new work appointment to specific workload</p> | ||
</div> | ||
<!-- Some information --> | ||
<div class="col-xs-12 col-lg-3 col-md-4"> | ||
</div> | ||
<!-- Clear some garbage --> | ||
<div class="clearfix"></div> | ||
</header>*@ | ||
|
||
<div style="margin-top:20px;"> | ||
|
||
<div class="col-xs-12" style="border-right:1px solid #efefef;"> | ||
|
||
<form id="form-simpleadd-appointment" role="form" data-toggle="validation"> | ||
|
||
<!-- Simple: Hidden from user because it is too internal --> | ||
<div class="form-group" hidden> | ||
<label for="_AppointmentID">Code:</label> | ||
<input type="text" class="form-control" id="_AppointmentID" name="_AppointmentID" value="@ViewBag.Guid" readonly> | ||
</div> | ||
|
||
<!-- Simple: Hidden from user because it is too obvious --> | ||
<div class="form-group" hidden> | ||
<label for="_AppointmentUserName">Appointment to:</label> | ||
<input type="text" class="form-control" id="_AppointmentUserName" name="_AppointmentUserName" value="@User.Claims.First(claim => claim.Type == "name").Value" readonly /> | ||
<input type="hidden" id="_AppointmentUserUniqueName" name="_AppointmentUserUniqueName" value="@User.Claims.First(claim => claim.Type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name").Value" /> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="_WorkloadTitle">Workload:</label> | ||
<input type="hidden" name="_AppointmentWorkloadWBID" id="_AppointmentWorkloadWBID" value="@ViewBag.WBID" /> | ||
<input id="_WorkloadTitle" name="_WorkloadTitle" type="text" class="form-control" readonly value="@ViewBag.WBID"> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="col-md-4" id="sandbox-container"> | ||
<div class="form-group"> | ||
<label for="_AppointmentDate">Appointment date:</label> | ||
<div class="input-group date"> | ||
<!-- Add Simple --> | ||
<input type="text" id="_AppointmentDate" name="_AppointmentDate" class="form-control" value="@DateTime.Now.ToString("MM/dd/yyyy")"> | ||
<span class="input-group-addon"><i class="fa fa-calendar-check-o" aria-hidden="true"></i></span> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="col-md-4"> | ||
<div class="form-group"> | ||
<label for="_AppointmentHoursDispensed">Hours dispensed (on refered date):</label> | ||
<select id="_AppointmentHoursDispensed" name="_AppointmentHoursDispensed" class="form-control"> | ||
<option value="0" selected>- SELECT -</option> | ||
@for (int i = 1; i <= 24; i++) | ||
{ | ||
<option value="@i">@i</option> | ||
} | ||
</select> | ||
</div> | ||
</div> | ||
|
||
<div class="col-md-4"> | ||
<!-- Hide from the user --> | ||
@*<div class="form-group" hidden> | ||
<label for="_AppointmentTE">T&E (if applyable):</label> | ||
<input type="text" id="_AppointmentTE" name="_AppointmentTE" class="form-control" placeholder="R$ 0,00" /> | ||
</div>*@ | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="_AppointmentComment">Any comment about this activity?</label> | ||
<textarea class="form-control" rows="5" id="_AppointmentComment" name="_AppointmentComment"></textarea> | ||
</div> | ||
|
||
<button type="submit" class="btn btn-info" id="btnAddAppointment"> | ||
<i class='fa fa-floppy-o' aria-hidden='true'></i> Create | ||
</button> | ||
|
||
</form> | ||
|
||
|
||
|
||
</div> | ||
<!-- No need to create a new --> | ||
@*<div class="col-xs-6 col-md-4"> | ||
<h3> | ||
New work appointment | ||
</h3> | ||
<p> | ||
To add a new work appointment, please click on button bellow. <br /> | ||
<div class="data-sorting-buttons"> | ||
<a asp-controller="Appointment" asp-action="Add" class="ds-button-update"><i class="fa fa-plus" aria-hidden="true"></i> Add</a> | ||
</div> | ||
</p> | ||
</div>*@ | ||
</div> | ||
|
||
</div> | ||
</div> | ||
</section> | ||
|
||
|
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
Oops, something went wrong.