penyesuaian UI sesuai Figma

This commit is contained in:
2024-06-12 15:17:08 +07:00
parent ef118ad33e
commit 468045384e
25 changed files with 1419 additions and 867 deletions

View File

@@ -0,0 +1 @@
<p>device-control works!</p>

View File

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { DeviceControlComponent } from './device-control.component';
describe('DeviceControlComponent', () => {
let component: DeviceControlComponent;
let fixture: ComponentFixture<DeviceControlComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ DeviceControlComponent ]
})
.compileComponents();
fixture = TestBed.createComponent(DeviceControlComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,10 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-device-control',
templateUrl: './device-control.component.html',
styleUrls: ['./device-control.component.css']
})
export class DeviceControlComponent {
}

View File

@@ -1,190 +1,324 @@
:host ::ng-deep .ngx-datatable.bootstrap .datatable-header .datatable-header-cell .datatable-header-cell-label {
font-family: inherit;
font-size: medium;
font-weight: bold;
color: #6B6F82;
:host
::ng-deep
.ngx-datatable.bootstrap
.datatable-header
.datatable-header-cell
.datatable-header-cell-label {
font-family: inherit;
font-size: medium;
font-weight: bold;
color: #6b6f82;
}
:host ::ng-deep .ngx-datatable .datatable-row-center, .ngx-datatable .datatable-row-group, .ngx-datatable .datatable-row-right {
position: relative;
height: 50px !important;
:host ::ng-deep .ngx-datatable .datatable-row-center,
.ngx-datatable .datatable-row-group,
.ngx-datatable .datatable-row-right {
position: relative;
height: 50px !important;
}
:host ::ng-deep .datatable-icon-right:before {
font-family: 'icofont';
font-style: normal;
font-family: "icofont";
font-style: normal;
}
:host ::ng-deep .datatable-icon-skip:before {
font-family: 'icofont';
font-style: normal;
font-family: "icofont";
font-style: normal;
}
:host ::ng-deep .datatable-icon-left:before {
font-family: 'icofont';
font-style: normal;
font-family: "icofont";
font-style: normal;
}
:host ::ng-deep .datatable-icon-left:before {
content: "\2039";
font-size: x-large;
content: "\2039";
font-size: x-large;
}
:host ::ng-deep .datatable-icon-prev:before {
content: "\00AB";
font-size: x-large;
content: "\00AB";
font-size: x-large;
}
:host ::ng-deep .datatable-icon-right:before {
content: "\203A";
font-size: x-large;
content: "\203A";
font-size: x-large;
}
:host ::ng-deep .datatable-icon-skip:before {
content: "\00BB";
font-size: x-large;
content: "\00BB";
font-size: x-large;
}
:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-left,
.ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-right,
.ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-prev {
font-size: 16px;
line-height: 22px;
padding: 0px 09px;
background-color: #d4d2e7;
:host
::ng-deep
.ngx-datatable.bootstrap
.datatable-footer
.datatable-pager
.datatable-icon-left,
.ngx-datatable.bootstrap
.datatable-footer
.datatable-pager
.datatable-icon-right,
.ngx-datatable.bootstrap
.datatable-footer
.datatable-pager
.datatable-icon-prev {
font-size: 16px;
line-height: 22px;
padding: 0px 09px;
background-color: #d4d2e7;
}
:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-right,
.ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-right {
font-size: 16px;
line-height: 22px;
padding: 0px 09px;
background-color: #d4d2e7;
:host
::ng-deep
.ngx-datatable.bootstrap
.datatable-footer
.datatable-pager
.datatable-icon-right,
.ngx-datatable.bootstrap
.datatable-footer
.datatable-pager
.datatable-icon-right {
font-size: 16px;
line-height: 22px;
padding: 0px 09px;
background-color: #d4d2e7;
}
:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-skip {
font-size: 16px;
line-height: 22px;
padding: 0px 09px;
background-color: #d4d2e7;
:host
::ng-deep
.ngx-datatable.bootstrap
.datatable-footer
.datatable-pager
.datatable-icon-skip {
font-size: 16px;
line-height: 22px;
padding: 0px 09px;
background-color: #d4d2e7;
}
:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-prev {
font-size: 16px;
line-height: 22px;
padding: 0px 09px;
background-color: #d4d2e7;
:host
::ng-deep
.ngx-datatable.bootstrap
.datatable-footer
.datatable-pager
.datatable-icon-prev {
font-size: 16px;
line-height: 22px;
padding: 0px 09px;
background-color: #d4d2e7;
}
:host ::ng-deep .datatable-footer .datatable-pager ul li:not(.disabled).active a,
.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] ul[_ngcontent-c11] li[_ngcontent-c11]:not(.disabled):hover a[_ngcontent-c11] {
background-color: #d4d2e7;
font-weight: bold;
font-size: larger;
:host
::ng-deep
.datatable-footer
.datatable-pager
ul
li:not(.disabled).active
a,
.ngx-datatable.bootstrap[_ngcontent-c11]
.datatable-footer[_ngcontent-c11]
.datatable-pager[_ngcontent-c11]
ul[_ngcontent-c11]
li[_ngcontent-c11]:not(.disabled):hover
a[_ngcontent-c11] {
background-color: #d4d2e7;
font-weight: bold;
font-size: larger;
}
:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager a {
height: 32px;
min-width: 34px;
line-height: 22px;
padding: 0;
border-radius: 3px;
margin: 0 3px;
text-align: center;
vertical-align: top;
padding-top: 3px;
text-decoration: none;
vertical-align: bottom;
color: #7c8091;
height: 32px;
min-width: 34px;
line-height: 22px;
padding: 0;
border-radius: 3px;
margin: 0 3px;
text-align: center;
vertical-align: top;
padding-top: 3px;
text-decoration: none;
vertical-align: bottom;
color: #7c8091;
}
:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-left,
.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] .datatable-icon-right[_ngcontent-c11],
.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] .datatable-icon-prev[_ngcontent-c11] {
font-size: 14px;
line-height: 9px;
padding: 0px 08px;
background-color: #ffffff;
:host
::ng-deep
.ngx-datatable.bootstrap
.datatable-footer
.datatable-pager
.datatable-icon-left,
.ngx-datatable.bootstrap[_ngcontent-c11]
.datatable-footer[_ngcontent-c11]
.datatable-pager[_ngcontent-c11]
.datatable-icon-right[_ngcontent-c11],
.ngx-datatable.bootstrap[_ngcontent-c11]
.datatable-footer[_ngcontent-c11]
.datatable-pager[_ngcontent-c11]
.datatable-icon-prev[_ngcontent-c11] {
font-size: 14px;
line-height: 9px;
padding: 0px 08px;
background-color: #ffffff;
}
:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-left,
.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] .datatable-icon-right[_ngcontent-c11],
.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] .datatable-icon-prev[_ngcontent-c11] {
font-size: 0px;
line-height: 22px;
padding: 0px 09px;
background-color: #ffffff;
:host
::ng-deep
.ngx-datatable.bootstrap
.datatable-footer
.datatable-pager
.datatable-icon-left,
.ngx-datatable.bootstrap[_ngcontent-c11]
.datatable-footer[_ngcontent-c11]
.datatable-pager[_ngcontent-c11]
.datatable-icon-right[_ngcontent-c11],
.ngx-datatable.bootstrap[_ngcontent-c11]
.datatable-footer[_ngcontent-c11]
.datatable-pager[_ngcontent-c11]
.datatable-icon-prev[_ngcontent-c11] {
font-size: 0px;
line-height: 22px;
padding: 0px 09px;
background-color: #ffffff;
}
:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-right,
.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] .datatable-icon-right[_ngcontent-c11],
.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] .datatable-icon-prev[_ngcontent-c11] {
font-size: 0px;
line-height: 22px;
padding: 0px 09px;
background-color: #ffffff;
:host
::ng-deep
.ngx-datatable.bootstrap
.datatable-footer
.datatable-pager
.datatable-icon-right,
.ngx-datatable.bootstrap[_ngcontent-c11]
.datatable-footer[_ngcontent-c11]
.datatable-pager[_ngcontent-c11]
.datatable-icon-right[_ngcontent-c11],
.ngx-datatable.bootstrap[_ngcontent-c11]
.datatable-footer[_ngcontent-c11]
.datatable-pager[_ngcontent-c11]
.datatable-icon-prev[_ngcontent-c11] {
font-size: 0px;
line-height: 22px;
padding: 0px 09px;
background-color: #ffffff;
}
:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-skip,
.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] .datatable-icon-right[_ngcontent-c11],
.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] .datatable-icon-prev[_ngcontent-c11] {
font-size: 0px;
line-height: 22px;
padding: 0px 09px;
background-color: #ffffff;
:host
::ng-deep
.ngx-datatable.bootstrap
.datatable-footer
.datatable-pager
.datatable-icon-skip,
.ngx-datatable.bootstrap[_ngcontent-c11]
.datatable-footer[_ngcontent-c11]
.datatable-pager[_ngcontent-c11]
.datatable-icon-right[_ngcontent-c11],
.ngx-datatable.bootstrap[_ngcontent-c11]
.datatable-footer[_ngcontent-c11]
.datatable-pager[_ngcontent-c11]
.datatable-icon-prev[_ngcontent-c11] {
font-size: 0px;
line-height: 22px;
padding: 0px 09px;
background-color: #ffffff;
}
:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-prev,
.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] .datatable-icon-right[_ngcontent-c11],
.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] .datatable-icon-prev[_ngcontent-c11] {
font-size: 0px;
line-height: 22px;
padding: 0px 09px;
background-color: #ffffff;
:host
::ng-deep
.ngx-datatable.bootstrap
.datatable-footer
.datatable-pager
.datatable-icon-prev,
.ngx-datatable.bootstrap[_ngcontent-c11]
.datatable-footer[_ngcontent-c11]
.datatable-pager[_ngcontent-c11]
.datatable-icon-right[_ngcontent-c11],
.ngx-datatable.bootstrap[_ngcontent-c11]
.datatable-footer[_ngcontent-c11]
.datatable-pager[_ngcontent-c11]
.datatable-icon-prev[_ngcontent-c11] {
font-size: 0px;
line-height: 22px;
padding: 0px 09px;
background-color: #ffffff;
}
:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager ul li:not(.disabled):hover a {
background-color: #545454;
font-weight: bold;
color: white;
:host
::ng-deep
.ngx-datatable.bootstrap
.datatable-footer
.datatable-pager
ul
li:not(.disabled):hover
a {
background-color: #545454;
font-weight: bold;
color: white;
}
:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager ul li:not(.disabled).active a,
.ngx-datatable.bootstrap .datatable-footer .datatable-pager ul li:not(.disabled):hover a {
background-color: #545454;
font-weight: bold;
color: white;
:host
::ng-deep
.ngx-datatable.bootstrap
.datatable-footer
.datatable-pager
ul
li:not(.disabled).active
a,
.ngx-datatable.bootstrap
.datatable-footer
.datatable-pager
ul
li:not(.disabled):hover
a {
background-color: #252525;
font-weight: bold;
color: white;
}
:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer {
background: #727e8e;
color: #ededed;
margin-top: -1px;
overflow: inherit;
background: #252525;
color: #ededed;
margin-top: -1px;
overflow: inherit;
}
:host ::ng-deep .ngx-datatable.bootstrap .datatable-header {
font-weight: bold;
height: unset !important;
overflow: inherit
font-weight: bold;
height: unset !important;
overflow: inherit;
}
:host ::ng-deep .ngx-datatable .datatable-footer .datatable-pager {
flex: 0 0 0%;
flex: 0 0 0%;
}
:host ::ng-deep .ngx-datatable .datatable-footer .datatable-pager .pager {
display: flex;
display: flex;
}
:host ::ng-deep .block-ui-wrapper {
background: rgba(255, 249, 249, 0.5) !important;
}
:host ::ng-deep .ngx-datatable .datatable-footer .selected-count .datatable-pager {
flex: 0 0 0%;
:host
::ng-deep
.ngx-datatable
.datatable-footer
.selected-count
.datatable-pager {
flex: 0 0 0%;
}
:host ::ng-deep .ngx-datatable {
display: -webkit-box;
}
:host ::ng-deep .ng-select .ng-select-container {
color: #ffffff !important;
background-color: #252525 !important;
}
:host ::ng-deep .ngx-datatable.bootstrap .datatable-body-row {
background-color: rgba(190, 242, 100, 0.11); /* Black color for table rows */
}
:host ::ng-deep .ngx-datatable.bootstrap .datatable-body-row:hover {
background-color: #1a1a1a; /* Darker black for hover effect */
}

View File

@@ -1,4 +1,4 @@
<div class="app-content content">
<div class="app-content content" style="background-color: #000000 !important">
<div class="content-wrapper">
<div class="content-header row mb-1">
<app-breadcrumb class="col-12" [breadcrumb]="breadcrumb"></app-breadcrumb>
@@ -7,13 +7,20 @@
<section id="configuration">
<div class="row">
<div class="col-lg-4 col-12">
<div class="card pull-up">
<div
class="card pull-up"
style="background-color: #252525 !important"
>
<div class="card-content">
<div class="card-body">
<div class="media d-flex">
<div class="media-body text-left">
<h6 class="text-muted">Total Device</h6>
<h3>{{filteredRows.length}}</h3>
<h6 class="text-muted" style="color: #ffffff !important">
Total Device
</h6>
<h3 style="color: #ffffff !important">
{{ filteredRows.length }}
</h3>
</div>
<div class="align-self-center">
<i
@@ -26,13 +33,18 @@
</div>
</div>
<div class="col-lg-4 col-12">
<div class="card pull-up">
<div
class="card pull-up"
style="background-color: #252525 !important"
>
<div class="card-content">
<div class="card-body">
<div class="media d-flex">
<div class="media-body text-left">
<h6 class="text-muted">Total Device Aktive</h6>
<h3>{{totalOn}}</h3>
<h6 class="text-light" style="color: #ffffff !important">
Total Device Aktive
</h6>
<h3 style="color: #ffffff !important">{{ totalOn }}</h3>
</div>
<div class="align-self-center">
<i
@@ -45,13 +57,18 @@
</div>
</div>
<div class="col-lg-4 col-12">
<div class="card pull-up">
<div
class="card pull-up"
style="background-color: #252525 !important"
>
<div class="card-content">
<div class="card-body">
<div class="media d-flex">
<div class="media-body text-left">
<h6 class="text-muted">Total Device Non-Active</h6>
<h3>{{totalOff}}</h3>
<h6 class="text-muted" style="color: #ffffff !important">
Total Device Non-Active
</h6>
<h3 style="color: #ffffff !important">{{ totalOff }}</h3>
</div>
<div class="align-self-center">
<i
@@ -70,246 +87,260 @@
<div class="row">
<div
class="col-12"
*blockUI="'zeroConfiguration'; message: 'Loading'"
>
<m-card>
<!-- <ng-container mCardHeaderTitle> Device Table </ng-container> -->
<ng-container mCardBody>
<div class="row mb-2">
<div class="col-2">
<div class="form-group">
<ng-select
[items]="singleSelectArray"
[searchable]="true"
bindLabel="item_text"
placeholder="Select Building"
[(ngModel)]="singlebasicSelected"
>
</ng-select>
</div>
</div>
<div class="col-2">
<div class="form-group">
<ng-select
[items]="singleSelectArray"
[searchable]="true"
bindLabel="item_text"
placeholder="Select Type"
[(ngModel)]="singlebasicSelected"
>
</ng-select>
</div>
</div>
<div class="col-2">
<div class="form-group">
<ng-select
[items]="singleSelectArray"
[searchable]="true"
bindLabel="item_text"
placeholder="Select Category"
[(ngModel)]="singlebasicSelected"
>
</ng-select>
</div>
</div>
<div class="col-2">
<div class="form-group">
<input
type="text"
class="form-control"
placeholder="Search..."
[(ngModel)]="searchTerm"
(input)="filterRows()"
/>
</div>
</div>
<div class="col-2 text-left">
<button type="button" class="btn btn-outline-success mr-1">
<i class="la la-search"></i>
</button>
</div>
<div class="col-2 text-right">
<button
class="btn btn-secondary"
[disabled]="spinnerActive"
(click)="addDevice()"
>
<i
class="la la-spinner spinner"
*ngIf="spinnerActive"
></i>
<i class="feather ft-plus" *ngIf="!spinnerActive"></i
>&nbsp;
<span>Syncing Data</span>
</button>
</div>
</div>
<div class="card-dashboard">
<ngx-datatable
class="bootstrap table-bordered"
[limit]="15"
[rows]="filteredRows"
[columnMode]="'force'"
[headerHeight]="50"
[footerHeight]="50"
[rowHeight]="50"
fxFlex="auto"
[scrollbarH]="true"
>
<ngx-datatable-column
name="#"
[flexGrow]="1"
[minWidth]="10"
>
<ng-template
ngx-datatable-cell-template
let-rowIndex="rowIndex"
>
{{ rowIndex + 1 }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column
name="icon"
[flexGrow]="1"
[minWidth]="140"
>
<ng-template ngx-datatable-header-template>
<span>Image</span>
</ng-template>
<ng-template ngx-datatable-cell-template let-row="row">
<span class="avatar avatar-sm rounded-circle">
<img [src]="row.icon" /><i></i
></span>
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column
name="Name"
[flexGrow]="1"
[minWidth]="90"
>
<ng-template ngx-datatable-header-template>
<span>Device Name</span>
</ng-template>
<ng-template
let-value="value"
ngx-datatable-cell-template
>
{{ value }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column
name="categoryEntity"
[flexGrow]="1"
[minWidth]="90"
>
<ng-template ngx-datatable-header-template>
<span>Category</span>
</ng-template>
<ng-template
ngx-datatable-cell-template
let-value="value"
>
{{ value.name }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column
name="watt"
[flexGrow]="1"
[minWidth]="90"
>
<ng-template ngx-datatable-header-template>
<span>Watt</span>
</ng-template>
<ng-template
ngx-datatable-cell-template
let-value="value"
>
{{ value }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column
name="typeEntity"
[flexGrow]="1"
[minWidth]="90"
>
<ng-template ngx-datatable-header-template>
<span>Type</span>
</ng-template>
<ng-template
ngx-datatable-cell-template
let-value="value"
>
{{ value.name }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column
name="voltageEntity"
[flexGrow]="1"
[minWidth]="90"
>
<ng-template ngx-datatable-header-template>
<span>Voltage</span>
</ng-template>
<ng-template
ngx-datatable-cell-template
let-value="value"
>
{{ value.name }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column
name="statusEntity"
[flexGrow]="1"
[minWidth]="90"
>
<ng-template ngx-datatable-header-template>
<span>Status</span>
</ng-template>
<ng-template
ngx-datatable-cell-template
let-value="value"
>
{{ value.name }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column
name="Actions"
[flexGrow]="1"
[minWidth]="150"
>
<ng-template
ngx-datatable-cell-template
let-rowIndex="rowIndex"
let-row="row"
>
<button
class="btn btn-sm btn-info mr-1"
(click)="viewRow(row)"
<div class="card" style="background-color: #252525 !important">
<div class="card-content">
<div class="card-body">
<div class="row mb-2">
<div class="col-2">
<div class="form-group">
<ng-select
[items]="singleSelectArray"
[searchable]="true"
bindLabel="item_text"
placeholder="Select Building"
[(ngModel)]="singlebasicSelected"
>
<i class="ficon feather ft-eye"></i>
</button>
<button
class="btn btn-sm btn-warning mr-1"
(click)="editRow(row)"
</ng-select>
</div>
</div>
<div class="col-2">
<div class="form-group">
<ng-select
[items]="singleSelectArray"
[searchable]="true"
bindLabel="item_text"
placeholder="Select Type"
[(ngModel)]="singlebasicSelected"
>
<i class="ficon feather ft-edit"></i>
</button>
<!-- <button
</ng-select>
</div>
</div>
<div class="col-2">
<div class="form-group">
<ng-select
[items]="singleSelectArray"
[searchable]="true"
bindLabel="item_text"
placeholder="Select Category"
[(ngModel)]="singlebasicSelected"
>
</ng-select>
</div>
</div>
<div class="col-2">
<div class="form-group">
<input
type="text"
class="form-control"
placeholder="Search..."
[(ngModel)]="searchTerm"
(input)="filterRows()"
/>
</div>
</div>
<div class="col-2 text-left">
<button
type="button"
class="btn btn-success mr-1"
style="background-color: #252525 !important; border-color: #BEF264 !important;"
>
<i class="la la-search" style="color: #ffffff !important;"></i>
</button>
</div>
<div class="col-2 text-right">
<button
class="btn btn-secondary"
[disabled]="spinnerActive"
(click)="addDevice()"
style="background-color: #BEF264 !important; border-color: #BEF264 !important; color: #000000 !important;"
>
<i
class="la la-spinner spinner"
*ngIf="spinnerActive"
></i>
<i class="feather ft-plus" *ngIf="!spinnerActive"></i
>&nbsp;
<span style="font-weight: 600;">Synchronization</span>
</button>
</div>
</div>
<div class="card-dashboard">
<ngx-datatable
class="bootstrap table-bordered"
[limit]="5"
[rows]="filteredRows"
[columnMode]="'force'"
[headerHeight]="50"
[footerHeight]="50"
[rowHeight]="50"
fxFlex="auto"
[scrollbarH]="true"
>
<ngx-datatable-column
name="#"
[flexGrow]="1"
[minWidth]="10"
>
<ng-template
ngx-datatable-cell-template
let-rowIndex="rowIndex"
>
{{ rowIndex + 1 }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column
name="icon"
[flexGrow]="1"
[minWidth]="140"
>
<ng-template ngx-datatable-header-template>
<span style="color: #ffffff !important">Image</span>
</ng-template>
<ng-template ngx-datatable-cell-template let-row="row">
<span class="avatar avatar-sm rounded-circle">
<img [src]="row.icon" /><i></i
></span>
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column
name="Name"
[flexGrow]="1"
[minWidth]="90"
>
<ng-template ngx-datatable-header-template>
<span style="color: #ffffff !important"
>Device Name</span
>
</ng-template>
<ng-template
let-value="value"
ngx-datatable-cell-template
>
<p style="color: #ffffff !important">{{ value }}</p>
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column
name="categoryEntity"
[flexGrow]="1"
[minWidth]="90"
>
<ng-template ngx-datatable-header-template>
<span style="color: #ffffff !important"
>Category</span
>
</ng-template>
<ng-template
ngx-datatable-cell-template
let-value="value"
>
<p style="color: #ffffff !important">{{ value.name }}</p>
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column
name="watt"
[flexGrow]="1"
[minWidth]="90"
>
<ng-template ngx-datatable-header-template>
<span style="color: #ffffff !important">Watt</span>
</ng-template>
<ng-template
ngx-datatable-cell-template
let-value="value"
>
<p style="color: #ffffff !important">{{ value }}</p>
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column
name="typeEntity"
[flexGrow]="1"
[minWidth]="90"
>
<ng-template ngx-datatable-header-template>
<span style="color: #ffffff !important">Type</span>
</ng-template>
<ng-template
ngx-datatable-cell-template
let-value="value"
>
<p style="color: #ffffff !important">{{ value.name }}</p>
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column
name="voltageEntity"
[flexGrow]="1"
[minWidth]="90"
>
<ng-template ngx-datatable-header-template>
<span style="color: #ffffff !important">Voltage</span>
</ng-template>
<ng-template
ngx-datatable-cell-template
let-value="value"
>
<p style="color: #ffffff !important">{{ value.name }}</p>
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column
name="statusEntity"
[flexGrow]="1"
[minWidth]="90"
>
<ng-template ngx-datatable-header-template>
<span style="color: #ffffff !important">Status</span>
</ng-template>
<ng-template
ngx-datatable-cell-template
let-value="value"
>
<p style="color: #ffffff !important">{{ value.name }}</p>
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column
name="Actions"
[flexGrow]="1"
[minWidth]="150"
>
<ng-template ngx-datatable-header-template>
<span style="color: #ffffff !important">Actions</span>
</ng-template>
<ng-template
ngx-datatable-cell-template
let-rowIndex="rowIndex"
let-row="row"
>
<button
class="btn btn-sm btn-info mr-1"
style="background-color: #000000 !important; border-color: #BEF264 !important;"
(click)="viewRow(row)"
>
<i class="ficon feather ft-eye" style="color: #BEF264 !important;"></i>
</button>
<button
class="btn btn-sm btn-warning mr-1"
style="background-color: #000000 !important; border-color: #BEF264 !important;"
(click)="editRow(row)"
>
<i class="ficon feather ft-edit" style="color: #BEF264 !important;"></i>
</button>
<!-- <button
class="btn btn-sm btn-danger"
(click)="deleteRow(row)"
>
<i class="ficon feather ft-trash-2"></i>
</button> -->
</ng-template>
</ngx-datatable-column>
</ngx-datatable>
</ng-template>
</ngx-datatable-column>
</ngx-datatable>
</div>
</div>
</ng-container>
</m-card>
</div>
</div>
</div>
</div>
</section>

View File

@@ -14,6 +14,7 @@ import { BlockTemplateComponent } from '../../../_layout/blockui/block-template.
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
import { AddEditDeviceComponent } from './add-edit-device/add-edit-device.component';
import { ModalAddEditComponent } from './modal-add-edit/modal-add-edit.component';
import { DeviceControlComponent } from './device-control/device-control.component';
@@ -21,7 +22,8 @@ import { ModalAddEditComponent } from './modal-add-edit/modal-add-edit.component
declarations: [
DeviceComponent,
AddEditDeviceComponent,
ModalAddEditComponent
ModalAddEditComponent,
DeviceControlComponent
],
imports: [
CommonModule,