This commit is contained in:
@@ -156,11 +156,6 @@ throw new System.Exception("UNCOMMENT THIS FOR PRODUCTION");
|
||||
}
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public ActionResult GetTest()
|
||||
{
|
||||
return Ok("hi");
|
||||
}
|
||||
|
||||
[HttpGet("list/{siteId}")]
|
||||
public async Task<IActionResult> GetList([FromRoute] long siteId)
|
||||
|
||||
@@ -6,6 +6,9 @@ namespace rockfishCore.Models
|
||||
{
|
||||
public partial class License
|
||||
{
|
||||
public License(){
|
||||
DtCreated=Util.DateUtil.NowAsEpoch();
|
||||
}
|
||||
public long Id { get; set; }
|
||||
public long CustomerId { get; set; }
|
||||
public long SiteId { get; set; }
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
/*global $, app */
|
||||
|
||||
app.ravLicenses = (function() {
|
||||
app.ravLicenses = (function () {
|
||||
"use strict";
|
||||
//---------------- BEGIN MODULE SCOPE VARIABLES --------------
|
||||
var stateMap = {},
|
||||
@@ -26,16 +26,16 @@ app.ravLicenses = (function() {
|
||||
//------------------- BEGIN PUBLIC METHODS -------------------
|
||||
//CONFIGMODULE
|
||||
//
|
||||
configModule = function(context) {
|
||||
configModule = function (context) {
|
||||
stateMap.context = context.context;
|
||||
if (stateMap.context.params.id) {
|
||||
stateMap.id = stateMap.context.params.id;//siteid
|
||||
stateMap.id = stateMap.context.params.id; //siteid
|
||||
}
|
||||
};
|
||||
|
||||
//INITMODULE
|
||||
//
|
||||
initModule = function($container) {
|
||||
initModule = function ($container) {
|
||||
if (typeof $container === "undefined") {
|
||||
$container = $("#app-shell-main-content");
|
||||
}
|
||||
@@ -46,28 +46,29 @@ app.ravLicenses = (function() {
|
||||
|
||||
//===================
|
||||
//Get licenses
|
||||
app.api.get("rvl/list/"+ stateMap.id, function(res) {
|
||||
app.api.get("rvl/list/" + stateMap.id, function (res) {
|
||||
if (res.error) {
|
||||
$.gevent.publish("app-show-error", res.msg);
|
||||
} else {
|
||||
var $appList = $("#rf-list");
|
||||
|
||||
$appList.append('<ul class="list-group">');
|
||||
|
||||
$.each(res, function(i, obj) {
|
||||
|
||||
$appList.append(
|
||||
"<li class='list-group-item'><a href=\"#!/ravLicense/" +
|
||||
obj.id +
|
||||
'">' +
|
||||
app.utilB.genListColumn(obj.regto) +
|
||||
" " +
|
||||
app.utilB.genListColumn(
|
||||
app.utilB.epochToShortDate(obj.dtCreated)
|
||||
) +
|
||||
"</a></li>"
|
||||
);
|
||||
|
||||
$appList.append("<ul >");
|
||||
let first = true;
|
||||
$.each(res, function (i, obj) {
|
||||
let itemClass = "alert alert-success";
|
||||
if (!first) {
|
||||
itemClass = "alert alert-secondary";
|
||||
}
|
||||
$appList.append(
|
||||
"<li class='my-5'>" +
|
||||
"<div class='" +
|
||||
itemClass +
|
||||
"' role='alert'><pre>" +
|
||||
obj.key +
|
||||
"</pre></div>" +
|
||||
"</li>"
|
||||
);
|
||||
first = false;
|
||||
});
|
||||
|
||||
$appList.append("</ul>");
|
||||
@@ -75,7 +76,8 @@ app.ravLicenses = (function() {
|
||||
});
|
||||
//=========/licenses==============
|
||||
|
||||
app.nav.contextClear();
|
||||
app.nav.contextClear(); ///ravLicense/122
|
||||
app.nav.contextAddLink("ravLicense/" + stateMap.id, "New", "plus");
|
||||
};
|
||||
|
||||
//PUBLIC METHODS
|
||||
|
||||
Reference in New Issue
Block a user