Skip to content
Snippets Groups Projects
Commit 7f498f61 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire: Committed by Reiter, Christoph
Browse files

Implement noAuth parameter

parent 37081db9
No related branches found
No related tags found
No related merge requests found
...@@ -10,11 +10,13 @@ class DataTableViewDemo extends LitElement { ...@@ -10,11 +10,13 @@ class DataTableViewDemo extends LitElement {
constructor() { constructor() {
super(); super();
this.lang = 'de'; this.lang = 'de';
this.noAuth = false;
} }
static get properties() { static get properties() {
return { return {
lang: { type: String }, lang: { type: String },
noAuth: { type: Boolean, attribute: 'no-auth' },
}; };
} }
...@@ -94,6 +96,14 @@ class DataTableViewDemo extends LitElement { ...@@ -94,6 +96,14 @@ class DataTableViewDemo extends LitElement {
} }
} }
getAuthComponentHtml() {
return this.noAuth ? html`` : html`
<div class="content">
<vpu-auth lang="${this.lang}" client-id="${setting('keyCloakClientId')}" load-person force-login></vpu-auth>
</div>
`;
}
render() { render() {
commonUtils.initAssetBaseURL('vpu-data-table-view-src'); commonUtils.initAssetBaseURL('vpu-data-table-view-src');
const bulmaCSS = commonUtils.getAssetURL(bulmaCSSPath); const bulmaCSS = commonUtils.getAssetURL(bulmaCSSPath);
...@@ -111,9 +121,7 @@ class DataTableViewDemo extends LitElement { ...@@ -111,9 +121,7 @@ class DataTableViewDemo extends LitElement {
<div class="content"> <div class="content">
<h1 class="title">DataTableView-Demo</h1> <h1 class="title">DataTableView-Demo</h1>
</div> </div>
<div class="content"> ${this.getAuthComponentHtml()}
<vpu-auth lang="${this.lang}" client-id="${setting('keyCloakClientId')}" load-person force-login></vpu-auth>
</div>
<div class="content"> <div class="content">
<h4>DataTable: with data, paging and searching</h4> <h4>DataTable: with data, paging and searching</h4>
<div class="box"> <div class="box">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment