Skip to content

Commit

Permalink
#31: modify views for request management
Browse files Browse the repository at this point in the history
  • Loading branch information
sventhiel committed Jun 27, 2018
1 parent 7cb71b4 commit bc8bfb5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Console/BExIS.Web.Shell/Areas/SAM/Views/Requests/Index.cshtml
Expand Up @@ -49,7 +49,7 @@
var result = confirm('Are you sure you want to accept this request (Id:' + $(this).attr("value") + ')?');
if (result) {
$.post('@Url.Action("Accept", "Requests")', { RequestId: $(this).attr("value") }, function (e) {
$.post('@Url.Action("Accept", "Requests")', { DecisionId: $(this).attr("value") }, function (e) {
$("#grid_decisions .t-refresh").trigger('click');
});
}
Expand All @@ -59,7 +59,7 @@
var result = confirm('Are you sure you want to reject this request (Id:' + $(this).attr("value") + ')?');
if (result) {
$.post('@Url.Action("Reject", "Requests")', { RequestId: $(this).attr("value") }, function (e) {
$.post('@Url.Action("Reject", "Requests")', { DecisionId: $(this).attr("value") }, function (e) {
$("#grid_decisions .t-refresh").trigger('click');
});
}
Expand Down
Expand Up @@ -6,16 +6,17 @@
.Columns(columns =>
{
columns.Bound(g => g.Id);
columns.Bound(g => g.RequestId);
columns.Bound(g => g.Applicant);
columns.Bound(g => g.Rights);
columns.Bound(g => g.Status);
columns.Template(@<text>
<button type="button" class="bx bx-grid-function bx-check" @(item.Status==0?"disabled":"")></button>
<button type="button" class="bx bx-grid-function bx-delete" @(item.Status==0?"disabled":"")></button>
<button type="button" class="bx bx-grid-function bx-check" @(item.Status!=0?"disabled":"")></button>
<button type="button" class="bx bx-grid-function bx-delete" @(item.Status!=0?"disabled":"")></button>
</text>)
.ClientTemplate(
"<button type=\"button\" class=\"bx bx-grid-function bx-check\" value=\"<#= Id #>\" title=\"Grant\" <#= Status==0 ? 'disabled' : '' #> ></button>" +
"<button type=\"button\" class=\"bx bx-grid-function bx-delete\" value=\"<#= Id #>\" title=\"Deny\" <#= Status==0 ? 'disabled' : '' #> ></button>")
"<button type=\"button\" class=\"bx bx-grid-function bx-check\" value=\"<#= Id #>\" title=\"Grant\" <#= Status!=0 ? 'disabled' : '' #> ></button>" +
"<button type=\"button\" class=\"bx bx-grid-function bx-delete\" value=\"<#= Id #>\" title=\"Deny\" <#= Status!=0 ? 'disabled' : '' #> ></button>")
.Width(65);
})
.ClientEvents(events =>
Expand Down

0 comments on commit bc8bfb5

Please sign in to comment.