This commit is contained in:
2020-06-18 17:40:41 +00:00
parent d218c6cd3c
commit 04d5fd47b7
3 changed files with 27 additions and 27 deletions

View File

@@ -156,11 +156,6 @@ throw new System.Exception("UNCOMMENT THIS FOR PRODUCTION");
} }
} }
[HttpGet]
public ActionResult GetTest()
{
return Ok("hi");
}
[HttpGet("list/{siteId}")] [HttpGet("list/{siteId}")]
public async Task<IActionResult> GetList([FromRoute] long siteId) public async Task<IActionResult> GetList([FromRoute] long siteId)

View File

@@ -6,6 +6,9 @@ namespace rockfishCore.Models
{ {
public partial class License public partial class License
{ {
public License(){
DtCreated=Util.DateUtil.NowAsEpoch();
}
public long Id { get; set; } public long Id { get; set; }
public long CustomerId { get; set; } public long CustomerId { get; set; }
public long SiteId { get; set; } public long SiteId { get; set; }

View File

@@ -7,7 +7,7 @@
/*global $, app */ /*global $, app */
app.ravLicenses = (function() { app.ravLicenses = (function () {
"use strict"; "use strict";
//---------------- BEGIN MODULE SCOPE VARIABLES -------------- //---------------- BEGIN MODULE SCOPE VARIABLES --------------
var stateMap = {}, var stateMap = {},
@@ -26,16 +26,16 @@ app.ravLicenses = (function() {
//------------------- BEGIN PUBLIC METHODS ------------------- //------------------- BEGIN PUBLIC METHODS -------------------
//CONFIGMODULE //CONFIGMODULE
// //
configModule = function(context) { configModule = function (context) {
stateMap.context = context.context; stateMap.context = context.context;
if (stateMap.context.params.id) { if (stateMap.context.params.id) {
stateMap.id = stateMap.context.params.id;//siteid stateMap.id = stateMap.context.params.id; //siteid
} }
}; };
//INITMODULE //INITMODULE
// //
initModule = function($container) { initModule = function ($container) {
if (typeof $container === "undefined") { if (typeof $container === "undefined") {
$container = $("#app-shell-main-content"); $container = $("#app-shell-main-content");
} }
@@ -46,28 +46,29 @@ app.ravLicenses = (function() {
//=================== //===================
//Get licenses //Get licenses
app.api.get("rvl/list/"+ stateMap.id, function(res) { app.api.get("rvl/list/" + stateMap.id, function (res) {
if (res.error) { if (res.error) {
$.gevent.publish("app-show-error", res.msg); $.gevent.publish("app-show-error", res.msg);
} else { } else {
var $appList = $("#rf-list"); var $appList = $("#rf-list");
$appList.append('<ul class="list-group">'); $appList.append("<ul >");
let first = true;
$.each(res, function(i, obj) { $.each(res, function (i, obj) {
let itemClass = "alert alert-success";
$appList.append( if (!first) {
"<li class='list-group-item'><a href=\"#!/ravLicense/" + itemClass = "alert alert-secondary";
obj.id + }
'">' + $appList.append(
app.utilB.genListColumn(obj.regto) + "<li class='my-5'>" +
"&nbsp;&nbsp;" + "<div class='" +
app.utilB.genListColumn( itemClass +
app.utilB.epochToShortDate(obj.dtCreated) "' role='alert'><pre>" +
) + obj.key +
"</a></li>" "</pre></div>" +
); "</li>"
);
first = false;
}); });
$appList.append("</ul>"); $appList.append("</ul>");
@@ -75,7 +76,8 @@ app.ravLicenses = (function() {
}); });
//=========/licenses============== //=========/licenses==============
app.nav.contextClear(); app.nav.contextClear(); ///ravLicense/122
app.nav.contextAddLink("ravLicense/" + stateMap.id, "New", "plus");
}; };
//PUBLIC METHODS //PUBLIC METHODS