penambahan detail room dan penyesuaian device list
This commit is contained in:
parent
c6a51e91b1
commit
ded0ca21a1
|
@ -93,12 +93,12 @@
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ngx-datatable-column>
|
</ngx-datatable-column>
|
||||||
<ngx-datatable-column
|
<ngx-datatable-column
|
||||||
name="Position"
|
name="watt"
|
||||||
[flexGrow]="1"
|
[flexGrow]="1"
|
||||||
[minWidth]="90"
|
[minWidth]="90"
|
||||||
>
|
>
|
||||||
<ng-template ngx-datatable-header-template>
|
<ng-template ngx-datatable-header-template>
|
||||||
<span>Category</span>
|
<span>watt</span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template
|
<ng-template
|
||||||
ngx-datatable-cell-template
|
ngx-datatable-cell-template
|
||||||
|
@ -108,12 +108,12 @@
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ngx-datatable-column>
|
</ngx-datatable-column>
|
||||||
<ngx-datatable-column
|
<ngx-datatable-column
|
||||||
name="Office"
|
name="typeId"
|
||||||
[flexGrow]="1"
|
[flexGrow]="1"
|
||||||
[minWidth]="90"
|
[minWidth]="90"
|
||||||
>
|
>
|
||||||
<ng-template ngx-datatable-header-template>
|
<ng-template ngx-datatable-header-template>
|
||||||
<span>Location</span>
|
<span>typeId</span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template
|
<ng-template
|
||||||
ngx-datatable-cell-template
|
ngx-datatable-cell-template
|
||||||
|
@ -123,12 +123,12 @@
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ngx-datatable-column>
|
</ngx-datatable-column>
|
||||||
<ngx-datatable-column
|
<ngx-datatable-column
|
||||||
name="Age"
|
name="roomBuildingId"
|
||||||
[flexGrow]="1"
|
[flexGrow]="1"
|
||||||
[minWidth]="40"
|
[minWidth]="40"
|
||||||
>
|
>
|
||||||
<ng-template ngx-datatable-header-template>
|
<ng-template ngx-datatable-header-template>
|
||||||
<span>Location Room</span>
|
<span>roomBuildingId</span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template
|
<ng-template
|
||||||
ngx-datatable-cell-template
|
ngx-datatable-cell-template
|
||||||
|
@ -138,12 +138,12 @@
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ngx-datatable-column>
|
</ngx-datatable-column>
|
||||||
<ngx-datatable-column
|
<ngx-datatable-column
|
||||||
name="Startdate"
|
name="voltageId"
|
||||||
[flexGrow]="1"
|
[flexGrow]="1"
|
||||||
[minWidth]="90"
|
[minWidth]="90"
|
||||||
>
|
>
|
||||||
<ng-template ngx-datatable-header-template>
|
<ng-template ngx-datatable-header-template>
|
||||||
<span>Duration Use</span>
|
<span>voltageId</span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template
|
<ng-template
|
||||||
ngx-datatable-cell-template
|
ngx-datatable-cell-template
|
||||||
|
@ -153,7 +153,7 @@
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ngx-datatable-column>
|
</ngx-datatable-column>
|
||||||
<ngx-datatable-column
|
<ngx-datatable-column
|
||||||
name="Salary"
|
name="statusId"
|
||||||
[flexGrow]="1"
|
[flexGrow]="1"
|
||||||
[minWidth]="90"
|
[minWidth]="90"
|
||||||
>
|
>
|
||||||
|
@ -164,7 +164,7 @@
|
||||||
ngx-datatable-cell-template
|
ngx-datatable-cell-template
|
||||||
let-value="value"
|
let-value="value"
|
||||||
>
|
>
|
||||||
{{ value }}
|
{{ value === 2 ? "Aktif" : "Tidak Aktif" }}
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ngx-datatable-column>
|
</ngx-datatable-column>
|
||||||
<ngx-datatable-column
|
<ngx-datatable-column
|
||||||
|
|
|
@ -50,6 +50,8 @@ export class DeviceComponent implements OnInit {
|
||||||
this.monitoringApiService.getDeviceData().subscribe((res) => {
|
this.monitoringApiService.getDeviceData().subscribe((res) => {
|
||||||
this.data = res;
|
this.data = res;
|
||||||
this.filteredRows = this.data.results.data;
|
this.filteredRows = this.data.results.data;
|
||||||
|
console.log(this.filteredRows);
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,94 +3,120 @@
|
||||||
<div class="content-header row mb-1">
|
<div class="content-header row mb-1">
|
||||||
<app-breadcrumb class="col-12" [breadcrumb]="breadcrumb"></app-breadcrumb>
|
<app-breadcrumb class="col-12" [breadcrumb]="breadcrumb"></app-breadcrumb>
|
||||||
</div>
|
</div>
|
||||||
<div class="number-tabs">
|
<div class="content-body">
|
||||||
<section id="basic-form-layouts">
|
<section id="basic-form-layouts">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12" *blockUI="'numberTabs'; message: 'Loading'">
|
<div class="col-6" *blockUI="'numberTabs'; message: 'Loading'">
|
||||||
<m-card>
|
<m-card>
|
||||||
<ng-container mCardHeaderTitle>
|
<ng-container mCardHeaderTitle>
|
||||||
<!-- <h2>Add New</h2> -->
|
<!-- <h2>Add New</h2> -->
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container mCardBody>
|
<ng-container mCardBody>
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
<aw-wizard #wizard navBarLayout="large-filled-symbols">
|
<div class="card-content collapse show">
|
||||||
<aw-wizard-step
|
<div class="card-body">
|
||||||
[stepTitle]="'General Information'"
|
<form [formGroup]="userProfileForm" class="row">
|
||||||
[navigationSymbol]="{
|
<div class="form-group col-md-6 mb-2">
|
||||||
symbol: '',
|
<label for="name">Building Name *</label>
|
||||||
fontFamily: 'FontAwesome'
|
<select
|
||||||
}"
|
id="buildingId"
|
||||||
>
|
class="form-control"
|
||||||
<form [formGroup]="numberTab">
|
formControlName="buildingId"
|
||||||
<div class="row">
|
[ngClass]="{
|
||||||
<div class="col-md-6">
|
'is-invalid': submitted && f.interestedIn.errors
|
||||||
<div class="form-group">
|
}"
|
||||||
<label class="form-control-label" for="buildName"
|
>
|
||||||
>Building Name :</label
|
<option
|
||||||
>
|
*ngFor="let interest of interestedIn"
|
||||||
<input
|
[value]="interest"
|
||||||
class="form-control"
|
>
|
||||||
type="text"
|
{{ interest }}
|
||||||
formControlName="buildName"
|
</option>
|
||||||
/>
|
</select>
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="form-control-label" for="email"
|
|
||||||
>Email Address :</label
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
class="form-control"
|
|
||||||
type="text"
|
|
||||||
formControlName="email"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label
|
|
||||||
class="form-control-label"
|
|
||||||
for="phoneNumber"
|
|
||||||
>Phone Number :</label
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
class="form-control"
|
|
||||||
type="text"
|
|
||||||
formControlName="phoneNumber"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="form-control-label" for="address"
|
|
||||||
>Address :</label
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
class="form-control"
|
|
||||||
type="text"
|
|
||||||
formControlName="address"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="form-control-label" for="owned"
|
|
||||||
>Owned :</label
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
class="form-control"
|
|
||||||
type="text"
|
|
||||||
formControlName="owned"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="form-control-label" for="phone"
|
|
||||||
>Phone :</label
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
class="form-control"
|
|
||||||
type="text"
|
|
||||||
formControlName="phone"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group col-md-6 mb-2">
|
||||||
|
<label for="name">Floor*</label>
|
||||||
|
<select
|
||||||
|
id="floorId"
|
||||||
|
class="form-control"
|
||||||
|
formControlName="floorId"
|
||||||
|
[ngClass]="{
|
||||||
|
'is-invalid': submitted && f.interestedIn.errors
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<option
|
||||||
|
*ngFor="let interest of interestedIn"
|
||||||
|
[value]="interest"
|
||||||
|
>
|
||||||
|
{{ interest }}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-12 mb-2">
|
||||||
|
<label for="name">Status*</label>
|
||||||
|
<select
|
||||||
|
id="statusId"
|
||||||
|
class="form-control"
|
||||||
|
formControlName="statusId"
|
||||||
|
[ngClass]="{
|
||||||
|
'is-invalid': submitted && f.interestedIn.errors
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<option
|
||||||
|
*ngFor="let interest of interestedIn"
|
||||||
|
[value]="interest"
|
||||||
|
>
|
||||||
|
{{ interest }}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-12 mb-2 contact-repeater">
|
||||||
|
<div class="" formArrayName="userArray">
|
||||||
|
<div
|
||||||
|
class=""
|
||||||
|
*ngFor="
|
||||||
|
let userForm of userFormGroup.controls;
|
||||||
|
let i = index
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<div [formGroupName]="i" class="">
|
||||||
|
<div class="input-group mb-1">
|
||||||
|
<select
|
||||||
|
id="roomId"
|
||||||
|
class="form-control"
|
||||||
|
formControlName="roomId"
|
||||||
|
[ngClass]="{
|
||||||
|
'is-invalid':
|
||||||
|
submitted && f.interestedIn.errors
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<option
|
||||||
|
*ngFor="let interest of interestedIn"
|
||||||
|
[value]="interest"
|
||||||
|
>
|
||||||
|
{{ interest }}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
<button
|
||||||
|
class="btn btn-danger"
|
||||||
|
type="button"
|
||||||
|
(click)="removePhone(i)"
|
||||||
|
>
|
||||||
|
<i class="feather ft-x"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="btn btn-primary"
|
||||||
|
(click)="addPhone()"
|
||||||
|
>
|
||||||
|
<i class="feather ft-plus"></i> Add Room
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group text-center">
|
<div class="form-group text-center">
|
||||||
<button
|
<button
|
||||||
uiSref="personal"
|
uiSref="personal"
|
||||||
|
@ -107,608 +133,37 @@
|
||||||
type="button"
|
type="button"
|
||||||
uiSref="work"
|
uiSref="work"
|
||||||
class="btn btn-info btn-raised"
|
class="btn btn-info btn-raised"
|
||||||
[disabled]="numberTab.valid"
|
|
||||||
awNextStep
|
|
||||||
>
|
>
|
||||||
Next
|
Save
|
||||||
<span style="margin-left: 10px">
|
<span style="margin-left: 10px">
|
||||||
<i class="feather ft-chevron-right"></i>
|
<i class="feather ft-chevron-right"></i>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</aw-wizard-step>
|
</div>
|
||||||
|
</div>
|
||||||
<aw-wizard-step
|
</div>
|
||||||
[stepTitle]="'Room'"
|
</ng-container>
|
||||||
[navigationSymbol]="{
|
</m-card>
|
||||||
symbol: '',
|
</div>
|
||||||
fontFamily: 'FontAwesome'
|
<div class="col-6">
|
||||||
}"
|
<m-card style="background: transparent !important">
|
||||||
>
|
<ng-container mCardHeaderTitle>
|
||||||
<div class="form-group overflow-hidden">
|
<!-- <h2>Profile Image</h2> -->
|
||||||
<div class="col-12">
|
</ng-container>
|
||||||
<button
|
<ng-container mCardBody>
|
||||||
data-repeater-create
|
<div class="card-block">
|
||||||
class="btn btn-primary"
|
<div class="card-content collapse show">
|
||||||
(click)="addRepeat()"
|
<div class="card-body text-center">
|
||||||
>
|
<img
|
||||||
<i class="feather ft-plus"></i> Add
|
src="../../../assets/images/backgrounds/smart3.jpg"
|
||||||
</button>
|
alt="Profile Image"
|
||||||
</div>
|
class="img-fluid rounded-circle"
|
||||||
</div>
|
style="max-width: 50%"
|
||||||
<form [formGroup]="repeatForm">
|
/>
|
||||||
<div class="card-body" formArrayName="repeatArray">
|
</div>
|
||||||
<div class="row">
|
</div>
|
||||||
<div
|
|
||||||
class="col-12"
|
|
||||||
*ngFor="
|
|
||||||
let repeatForm of repeatFormGroup.controls;
|
|
||||||
let i = index
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<div class="repeater-default">
|
|
||||||
<div [formGroupName]="i" class="row">
|
|
||||||
<div
|
|
||||||
class="form-group mb-1 col-sm-12 col-md-3"
|
|
||||||
>
|
|
||||||
<label for="roomName">Room</label>
|
|
||||||
<br />
|
|
||||||
<div class="input-group">
|
|
||||||
<select
|
|
||||||
class="form-control"
|
|
||||||
formControlName="roomName"
|
|
||||||
>
|
|
||||||
<option
|
|
||||||
*ngFor="let interest of countries"
|
|
||||||
[value]="interest"
|
|
||||||
>
|
|
||||||
{{ interest }}
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
<div class="input-group-append">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn btn-primary"
|
|
||||||
>
|
|
||||||
<i class="feather ft-plus"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="form-group mb-1 col-sm-12 col-md-3"
|
|
||||||
>
|
|
||||||
<label for="room">Room Name</label>
|
|
||||||
<br />
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
formControlName="room"
|
|
||||||
class="form-control"
|
|
||||||
placeholder="room"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="form-group mb-1 col-sm-12 col-md-2"
|
|
||||||
>
|
|
||||||
<label for="floor">Floor</label>
|
|
||||||
<br />
|
|
||||||
<select
|
|
||||||
class="form-control"
|
|
||||||
formControlName="floor"
|
|
||||||
>
|
|
||||||
<option
|
|
||||||
*ngFor="let interest of countries"
|
|
||||||
[value]="interest"
|
|
||||||
>
|
|
||||||
{{ interest }}
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="form-group mb-1 col-sm-12 col-md-2"
|
|
||||||
>
|
|
||||||
<label for="status">Status</label>
|
|
||||||
<br />
|
|
||||||
<select
|
|
||||||
class="form-control"
|
|
||||||
formControlName="status"
|
|
||||||
>
|
|
||||||
<option
|
|
||||||
*ngFor="let interest of countries"
|
|
||||||
[value]="interest"
|
|
||||||
>
|
|
||||||
{{ interest }}
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="form-group col-sm-12 col-md-2 text-center mt-2"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn btn-danger"
|
|
||||||
(click)="removeRepeat(i)"
|
|
||||||
>
|
|
||||||
<i class="feather ft-x"></i> Delete
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
</div>
|
|
||||||
<div class="form-group text-center space-20">
|
|
||||||
<button
|
|
||||||
uiSref="personal"
|
|
||||||
type="button"
|
|
||||||
class="btn btn-raised btn-secondary mr-1"
|
|
||||||
awPreviousStep
|
|
||||||
>
|
|
||||||
<span style="margin-right: 10px">
|
|
||||||
<i class="feather ft-chevron-left"></i>
|
|
||||||
</span>
|
|
||||||
Previous
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
uiSref="address"
|
|
||||||
type="button"
|
|
||||||
class="btn btn-raised btn-info"
|
|
||||||
[disabled]="numberTab.valid"
|
|
||||||
awNextStep
|
|
||||||
>
|
|
||||||
Next
|
|
||||||
<span style="margin-left: 10px">
|
|
||||||
<i class="feather ft-chevron-right"></i>
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</aw-wizard-step>
|
|
||||||
|
|
||||||
<aw-wizard-step
|
|
||||||
[stepTitle]="'Device'"
|
|
||||||
[navigationSymbol]="{
|
|
||||||
symbol: '',
|
|
||||||
fontFamily: 'FontAwesome'
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<div class="form-group overflow-hidden">
|
|
||||||
<div class="col-12">
|
|
||||||
<button
|
|
||||||
data-repeater-create
|
|
||||||
class="btn btn-primary"
|
|
||||||
(click)="addRepeat()"
|
|
||||||
>
|
|
||||||
<i class="feather ft-plus"></i> Add
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<form [formGroup]="repeatForm">
|
|
||||||
<div class="card-body" formArrayName="repeatArray">
|
|
||||||
<div class="row">
|
|
||||||
<div
|
|
||||||
class="col-12"
|
|
||||||
*ngFor="
|
|
||||||
let repeatForm of repeatFormGroup.controls;
|
|
||||||
let i = index
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<div class="repeater-default">
|
|
||||||
<div [formGroupName]="i" class="row">
|
|
||||||
<div
|
|
||||||
class="form-group mb-1 col-sm-12 col-md-3"
|
|
||||||
>
|
|
||||||
<label for="roomName">Room</label>
|
|
||||||
<br />
|
|
||||||
<div class="input-group">
|
|
||||||
<select
|
|
||||||
class="form-control"
|
|
||||||
formControlName="roomName"
|
|
||||||
>
|
|
||||||
<option
|
|
||||||
*ngFor="let interest of countries"
|
|
||||||
[value]="interest"
|
|
||||||
>
|
|
||||||
{{ interest }}
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
<div class="input-group-append">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn btn-primary"
|
|
||||||
>
|
|
||||||
<i class="feather ft-plus"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="form-group mb-1 col-sm-12 col-md-3"
|
|
||||||
>
|
|
||||||
<label for="room">Room Name</label>
|
|
||||||
<br />
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
formControlName="room"
|
|
||||||
class="form-control"
|
|
||||||
placeholder="room"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="form-group mb-1 col-sm-12 col-md-2"
|
|
||||||
>
|
|
||||||
<label for="floor">Floor</label>
|
|
||||||
<br />
|
|
||||||
<select
|
|
||||||
class="form-control"
|
|
||||||
formControlName="floor"
|
|
||||||
>
|
|
||||||
<option
|
|
||||||
*ngFor="let interest of countries"
|
|
||||||
[value]="interest"
|
|
||||||
>
|
|
||||||
{{ interest }}
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="form-group mb-1 col-sm-12 col-md-2"
|
|
||||||
>
|
|
||||||
<label for="status">Status</label>
|
|
||||||
<br />
|
|
||||||
<select
|
|
||||||
class="form-control"
|
|
||||||
formControlName="status"
|
|
||||||
>
|
|
||||||
<option
|
|
||||||
*ngFor="let interest of countries"
|
|
||||||
[value]="interest"
|
|
||||||
>
|
|
||||||
{{ interest }}
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="form-group col-sm-12 col-md-2 text-center mt-2"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn btn-danger"
|
|
||||||
(click)="removeRepeat(i)"
|
|
||||||
>
|
|
||||||
<i class="feather ft-x"></i> Delete
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
</div>
|
|
||||||
<div class="form-group text-center space-20">
|
|
||||||
<button
|
|
||||||
uiSref="personal"
|
|
||||||
type="button"
|
|
||||||
class="btn btn-raised btn-secondary mr-1"
|
|
||||||
awPreviousStep
|
|
||||||
>
|
|
||||||
<span style="margin-right: 10px">
|
|
||||||
<i class="feather ft-chevron-left"></i>
|
|
||||||
</span>
|
|
||||||
Previous
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
uiSref="address"
|
|
||||||
type="button"
|
|
||||||
class="btn btn-raised btn-info"
|
|
||||||
[disabled]="numberTab.valid"
|
|
||||||
awNextStep
|
|
||||||
>
|
|
||||||
Next
|
|
||||||
<span style="margin-left: 10px">
|
|
||||||
<i class="feather ft-chevron-right"></i>
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</aw-wizard-step>
|
|
||||||
|
|
||||||
<aw-wizard-step
|
|
||||||
[stepTitle]="'Estimasi Energy'"
|
|
||||||
[navigationSymbol]="{
|
|
||||||
symbol: '',
|
|
||||||
fontFamily: 'FontAwesome'
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<div class="form-group overflow-hidden">
|
|
||||||
<div class="col-12">
|
|
||||||
<button
|
|
||||||
data-repeater-create
|
|
||||||
class="btn btn-primary"
|
|
||||||
(click)="addRepeat()"
|
|
||||||
>
|
|
||||||
<i class="feather ft-plus"></i> Add
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<form [formGroup]="repeatForm">
|
|
||||||
<div class="card-body" formArrayName="repeatArray">
|
|
||||||
<div class="row">
|
|
||||||
<div
|
|
||||||
class="col-12"
|
|
||||||
*ngFor="
|
|
||||||
let repeatForm of repeatFormGroup.controls;
|
|
||||||
let i = index
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<div class="repeater-default">
|
|
||||||
<div [formGroupName]="i" class="row">
|
|
||||||
<div
|
|
||||||
class="form-group mb-1 col-sm-12 col-md-3"
|
|
||||||
>
|
|
||||||
<label for="roomName">Room</label>
|
|
||||||
<br />
|
|
||||||
<div class="input-group">
|
|
||||||
<select
|
|
||||||
class="form-control"
|
|
||||||
formControlName="roomName"
|
|
||||||
>
|
|
||||||
<option
|
|
||||||
*ngFor="let interest of countries"
|
|
||||||
[value]="interest"
|
|
||||||
>
|
|
||||||
{{ interest }}
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
<div class="input-group-append">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn btn-primary"
|
|
||||||
>
|
|
||||||
<i class="feather ft-plus"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="form-group mb-1 col-sm-12 col-md-3"
|
|
||||||
>
|
|
||||||
<label for="room">Room Name</label>
|
|
||||||
<br />
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
formControlName="room"
|
|
||||||
class="form-control"
|
|
||||||
placeholder="room"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="form-group mb-1 col-sm-12 col-md-2"
|
|
||||||
>
|
|
||||||
<label for="floor">Floor</label>
|
|
||||||
<br />
|
|
||||||
<select
|
|
||||||
class="form-control"
|
|
||||||
formControlName="floor"
|
|
||||||
>
|
|
||||||
<option
|
|
||||||
*ngFor="let interest of countries"
|
|
||||||
[value]="interest"
|
|
||||||
>
|
|
||||||
{{ interest }}
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="form-group mb-1 col-sm-12 col-md-2"
|
|
||||||
>
|
|
||||||
<label for="status">Status</label>
|
|
||||||
<br />
|
|
||||||
<select
|
|
||||||
class="form-control"
|
|
||||||
formControlName="status"
|
|
||||||
>
|
|
||||||
<option
|
|
||||||
*ngFor="let interest of countries"
|
|
||||||
[value]="interest"
|
|
||||||
>
|
|
||||||
{{ interest }}
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="form-group col-sm-12 col-md-2 text-center mt-2"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn btn-danger"
|
|
||||||
(click)="removeRepeat(i)"
|
|
||||||
>
|
|
||||||
<i class="feather ft-x"></i> Delete
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
</div>
|
|
||||||
<div class="form-group text-center space-20">
|
|
||||||
<button
|
|
||||||
uiSref="personal"
|
|
||||||
type="button"
|
|
||||||
class="btn btn-raised btn-secondary mr-1"
|
|
||||||
awPreviousStep
|
|
||||||
>
|
|
||||||
<span style="margin-right: 10px">
|
|
||||||
<i class="feather ft-chevron-left"></i>
|
|
||||||
</span>
|
|
||||||
Previous
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
uiSref="address"
|
|
||||||
type="button"
|
|
||||||
class="btn btn-raised btn-info"
|
|
||||||
[disabled]="numberTab.valid"
|
|
||||||
awNextStep
|
|
||||||
>
|
|
||||||
Next
|
|
||||||
<span style="margin-left: 10px">
|
|
||||||
<i class="feather ft-chevron-right"></i>
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</aw-wizard-step>
|
|
||||||
|
|
||||||
<aw-wizard-step
|
|
||||||
[stepTitle]="'User Access'"
|
|
||||||
[navigationSymbol]="{
|
|
||||||
symbol: '',
|
|
||||||
fontFamily: 'FontAwesome'
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<div class="form-group overflow-hidden">
|
|
||||||
<div class="col-12">
|
|
||||||
<button
|
|
||||||
data-repeater-create
|
|
||||||
class="btn btn-primary"
|
|
||||||
(click)="addRepeat()"
|
|
||||||
>
|
|
||||||
<i class="feather ft-plus"></i> Add
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<form [formGroup]="repeatForm">
|
|
||||||
<div class="card-body" formArrayName="repeatArray">
|
|
||||||
<div class="row">
|
|
||||||
<div
|
|
||||||
class="col-12"
|
|
||||||
*ngFor="
|
|
||||||
let repeatForm of repeatFormGroup.controls;
|
|
||||||
let i = index
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<div class="repeater-default">
|
|
||||||
<div [formGroupName]="i" class="row">
|
|
||||||
<div
|
|
||||||
class="form-group mb-1 col-sm-12 col-md-3"
|
|
||||||
>
|
|
||||||
<label for="roomName">Room</label>
|
|
||||||
<br />
|
|
||||||
<div class="input-group">
|
|
||||||
<select
|
|
||||||
class="form-control"
|
|
||||||
formControlName="roomName"
|
|
||||||
>
|
|
||||||
<option
|
|
||||||
*ngFor="let interest of countries"
|
|
||||||
[value]="interest"
|
|
||||||
>
|
|
||||||
{{ interest }}
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
<div class="input-group-append">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn btn-primary"
|
|
||||||
>
|
|
||||||
<i class="feather ft-plus"></i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="form-group mb-1 col-sm-12 col-md-3"
|
|
||||||
>
|
|
||||||
<label for="room">Room Name</label>
|
|
||||||
<br />
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
formControlName="room"
|
|
||||||
class="form-control"
|
|
||||||
placeholder="room"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="form-group mb-1 col-sm-12 col-md-2"
|
|
||||||
>
|
|
||||||
<label for="floor">Floor</label>
|
|
||||||
<br />
|
|
||||||
<select
|
|
||||||
class="form-control"
|
|
||||||
formControlName="floor"
|
|
||||||
>
|
|
||||||
<option
|
|
||||||
*ngFor="let interest of countries"
|
|
||||||
[value]="interest"
|
|
||||||
>
|
|
||||||
{{ interest }}
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="form-group mb-1 col-sm-12 col-md-2"
|
|
||||||
>
|
|
||||||
<label for="status">Status</label>
|
|
||||||
<br />
|
|
||||||
<select
|
|
||||||
class="form-control"
|
|
||||||
formControlName="status"
|
|
||||||
>
|
|
||||||
<option
|
|
||||||
*ngFor="let interest of countries"
|
|
||||||
[value]="interest"
|
|
||||||
>
|
|
||||||
{{ interest }}
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="form-group col-sm-12 col-md-2 text-center mt-2"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn btn-danger"
|
|
||||||
(click)="removeRepeat(i)"
|
|
||||||
>
|
|
||||||
<i class="feather ft-x"></i> Delete
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
</div>
|
|
||||||
<div class="form-group text-center space-20">
|
|
||||||
<button
|
|
||||||
uiSref="personal"
|
|
||||||
type="button"
|
|
||||||
class="btn btn-raised btn-secondary mr-1"
|
|
||||||
awPreviousStep
|
|
||||||
(click)="previousFourthStep()"
|
|
||||||
>
|
|
||||||
<span style="margin-right: 10px">
|
|
||||||
<i class="feather ft-chevron-left"></i>
|
|
||||||
</span>
|
|
||||||
Previous
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
uiSref="address"
|
|
||||||
type="button"
|
|
||||||
class="btn btn-raised btn-info"
|
|
||||||
[disabled]="!numberTab.valid"
|
|
||||||
(click)="submit()"
|
|
||||||
>
|
|
||||||
Submit
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</aw-wizard-step>
|
|
||||||
</aw-wizard>
|
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</m-card>
|
</m-card>
|
||||||
|
|
|
@ -11,39 +11,13 @@ import { BlockUI, NgBlockUI } from "ng-block-ui";
|
||||||
export class AddNewBuildingRoomComponent implements OnInit {
|
export class AddNewBuildingRoomComponent implements OnInit {
|
||||||
public breadcrumb: any;
|
public breadcrumb: any;
|
||||||
mode: string;
|
mode: string;
|
||||||
numberTab: FormGroup;
|
userProfileForm: FormGroup;
|
||||||
stepOneForm: FormGroup;
|
public userList: FormArray;
|
||||||
stepTwoForm: FormGroup;
|
submitted = false;
|
||||||
stepThreeForm: FormGroup;
|
get userFormGroup() {
|
||||||
stepFourForm: FormGroup;
|
return this.userProfileForm.get('userArray') as FormArray;
|
||||||
isStepFourReached = false;
|
|
||||||
|
|
||||||
repeatForm: FormGroup;
|
|
||||||
public repeatList: FormArray;
|
|
||||||
|
|
||||||
get repeatFormGroup() {
|
|
||||||
return this.repeatForm.get("repeatArray") as FormArray;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@BlockUI("numberTabs") blockUINumberTabs: NgBlockUI;
|
|
||||||
@BlockUI("iconTabs") blockUIIconTabs: NgBlockUI;
|
|
||||||
|
|
||||||
countries = ["Amsterdam", "Berlin", "Frankfurt"];
|
|
||||||
eventType = ["Banquet", "Fund Raiser", "Dinner Party", "Wedding"];
|
|
||||||
eventLocation = ["Amsterdam", "Berlin", "Frankfurt"];
|
|
||||||
eventStatus = ["Planning", "In Progress", "Finished"];
|
|
||||||
requirements1 = [
|
|
||||||
{ id: 1, name: "Staffing" },
|
|
||||||
{ id: 2, name: "Catering" },
|
|
||||||
];
|
|
||||||
agendaItems1 = [
|
|
||||||
{ id: 1, name: "1st item", idName: "item1" },
|
|
||||||
{ id: 2, name: "2st item", idName: "item2" },
|
|
||||||
{ id: 3, name: "3st item", idName: "item3" },
|
|
||||||
{ id: 4, name: "4st item", idName: "item4" },
|
|
||||||
{ id: 5, name: "5st item", idName: "item5" },
|
|
||||||
];
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private formBuilder: FormBuilder,
|
private formBuilder: FormBuilder,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
|
@ -51,90 +25,40 @@ export class AddNewBuildingRoomComponent implements OnInit {
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.numberTab = this.formBuilder.group({
|
this.breadcrumb = {
|
||||||
buildName: ["", Validators.required],
|
mainlabel: "Add building",
|
||||||
phone: ["", Validators.required],
|
links: [
|
||||||
phoneNumber: ["", [Validators.required]],
|
{
|
||||||
email: ["", [Validators.required, Validators.email]],
|
name: "Add Building",
|
||||||
address: ["", [Validators.required]],
|
isLink: false,
|
||||||
owned: ["", [Validators.required]],
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
this.userProfileForm = this.formBuilder.group({
|
||||||
|
buildingId: ['', Validators.required],
|
||||||
|
roomId: ['', Validators.required],
|
||||||
|
floorId: ['', Validators.required],
|
||||||
|
userArray: this.formBuilder.array([this.createPhone()]),
|
||||||
});
|
});
|
||||||
|
|
||||||
this.repeatForm = this.formBuilder.group({
|
this.userList = this.userProfileForm.get('userArray') as FormArray;
|
||||||
repeatArray: this.formBuilder.array([this.createRepeat()]),
|
|
||||||
});
|
|
||||||
|
|
||||||
this.repeatList = this.repeatForm.get("repeatArray") as FormArray;
|
|
||||||
|
|
||||||
this.route.data.subscribe((data) => {
|
|
||||||
this.mode = data.mode;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
createRepeat(): FormGroup {
|
createPhone(): FormGroup {
|
||||||
return this.formBuilder.group({
|
return this.formBuilder.group({
|
||||||
roomName: ["", Validators.required],
|
roomId: ['', Validators.required]
|
||||||
room: ["", Validators.required],
|
|
||||||
floor: ["", Validators.required],
|
|
||||||
status: ["", Validators.required],
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
addRepeat() {
|
addPhone() {
|
||||||
this.repeatList.push(this.createRepeat());
|
this.userList.push(this.createPhone());
|
||||||
}
|
}
|
||||||
|
|
||||||
removeRepeat(index) {
|
removePhone(index) {
|
||||||
this.repeatList.removeAt(index);
|
this.userList.removeAt(index);
|
||||||
}
|
|
||||||
|
|
||||||
getRepeatFormGroup(index): FormGroup {
|
|
||||||
const formGroup = this.repeatList.controls[index] as FormGroup;
|
|
||||||
return formGroup;
|
|
||||||
}
|
|
||||||
|
|
||||||
public previousFourthStep() {
|
|
||||||
this.isStepFourReached = true;
|
|
||||||
}
|
|
||||||
get f() {
|
|
||||||
return this.stepOneForm.controls;
|
|
||||||
}
|
|
||||||
get i() {
|
|
||||||
return this.stepTwoForm.controls;
|
|
||||||
}
|
|
||||||
get j() {
|
|
||||||
return this.stepThreeForm.controls;
|
|
||||||
}
|
|
||||||
get k() {
|
|
||||||
return this.stepFourForm.controls;
|
|
||||||
}
|
|
||||||
|
|
||||||
submit() {
|
|
||||||
window.alert("Form submitted.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cancel() {
|
cancel() {
|
||||||
if (this.mode === "room") {
|
this.router.navigate(["/monitoring"]);
|
||||||
this.router.navigate(["/monitoring/monitoring-room"]);
|
|
||||||
} else {
|
|
||||||
this.router.navigate(["/monitoring"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
reloadNumberTabs() {
|
|
||||||
this.blockUINumberTabs.start("Loading..");
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
this.blockUINumberTabs.stop();
|
|
||||||
}, 2500);
|
|
||||||
}
|
|
||||||
|
|
||||||
reloadIconTabs() {
|
|
||||||
this.blockUIIconTabs.start("Loading..");
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
this.blockUIIconTabs.stop();
|
|
||||||
}, 2500);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,17 +88,17 @@
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div
|
<div
|
||||||
class="col-xl-6 col-md-6 col-12"
|
class="col-xl-6 col-md-6 col-12"
|
||||||
*ngFor="let top of dataTop; let i = index"
|
*ngFor="let top of data.topUse; let i = index"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<span class="mb-1 text-muted cardtext d-block"
|
<span class="mb-1 text-muted cardtext d-block"
|
||||||
>{{ top.value[i] }}% - {{ top.label[i] }}</span
|
>{{ top.value }}% - {{ top.label }}</span
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<ngb-progressbar
|
<ngb-progressbar
|
||||||
height="7px"
|
height="7px"
|
||||||
type="danger"
|
type="danger"
|
||||||
[value]="top.value[i]"
|
[value]="top.value"
|
||||||
></ngb-progressbar>
|
></ngb-progressbar>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -14,7 +14,7 @@ export class BuildingComponent {
|
||||||
feedbacksdonutChart: any;
|
feedbacksdonutChart: any;
|
||||||
donutChart1: any;
|
donutChart1: any;
|
||||||
filteredRows: any[];
|
filteredRows: any[];
|
||||||
dataTop: any[];
|
dataTop: any;
|
||||||
searchTerm: string = "";
|
searchTerm: string = "";
|
||||||
colorChart: string = "";
|
colorChart: string = "";
|
||||||
|
|
||||||
|
@ -55,20 +55,6 @@ export class BuildingComponent {
|
||||||
console.log(res.data);
|
console.log(res.data);
|
||||||
this.data = res.data;
|
this.data = res.data;
|
||||||
this.filteredRows = res.data;
|
this.filteredRows = res.data;
|
||||||
|
|
||||||
this.dataTop = [];
|
|
||||||
const maxItems = 4;
|
|
||||||
|
|
||||||
res.data.forEach((item) => {
|
|
||||||
for (let i = 0; i < maxItems; i++) {
|
|
||||||
if (item.topUse.label[i] !== undefined) {
|
|
||||||
this.dataTop.push({
|
|
||||||
label: item.topUse.label,
|
|
||||||
value: item.topUse.value,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +90,7 @@ export class BuildingComponent {
|
||||||
this.router.navigate(["/monitoring/edit-new-building", row.id]);
|
this.router.navigate(["/monitoring/edit-new-building", row.id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
viewRoom(row){
|
viewRoom(row) {
|
||||||
console.log(row);
|
console.log(row);
|
||||||
this.router.navigate(["/monitoring/monitoring-room", row.id]);
|
this.router.navigate(["/monitoring/monitoring-room", row.id]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<p>detail-room works!</p>
|
|
@ -0,0 +1,23 @@
|
||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { DetailRoomComponent } from './detail-room.component';
|
||||||
|
|
||||||
|
describe('DetailRoomComponent', () => {
|
||||||
|
let component: DetailRoomComponent;
|
||||||
|
let fixture: ComponentFixture<DetailRoomComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
declarations: [ DetailRoomComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(DetailRoomComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,10 @@
|
||||||
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-detail-room',
|
||||||
|
templateUrl: './detail-room.component.html',
|
||||||
|
styleUrls: ['./detail-room.component.css']
|
||||||
|
})
|
||||||
|
export class DetailRoomComponent {
|
||||||
|
|
||||||
|
}
|
|
@ -22,13 +22,15 @@ import { NgxEchartsModule } from 'ngx-echarts';
|
||||||
import { NgxPhotoswipeModule } from '@fnxone/ngx-photoswipe';
|
import { NgxPhotoswipeModule } from '@fnxone/ngx-photoswipe';
|
||||||
import { NgxMasonryModule } from 'ngx-masonry';
|
import { NgxMasonryModule } from 'ngx-masonry';
|
||||||
import { UiSwitchModule } from 'ngx-ui-switch';
|
import { UiSwitchModule } from 'ngx-ui-switch';
|
||||||
|
import { DetailRoomComponent } from './detail-room/detail-room.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
BuildingComponent,
|
BuildingComponent,
|
||||||
RoomComponent,
|
RoomComponent,
|
||||||
AddNewBuildingRoomComponent,
|
AddNewBuildingRoomComponent,
|
||||||
DetailComponent
|
DetailComponent,
|
||||||
|
DetailRoomComponent
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
@ -88,6 +90,11 @@ import { UiSwitchModule } from 'ngx-ui-switch';
|
||||||
component: DetailComponent,
|
component: DetailComponent,
|
||||||
data: { mode: 'room' }
|
data: { mode: 'room' }
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'view-detail-room/:id',
|
||||||
|
component: DetailRoomComponent,
|
||||||
|
data: { mode: 'room' }
|
||||||
|
},
|
||||||
])
|
])
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
type="button"
|
type="button"
|
||||||
class="btn btn-icon btn-outline-primary mr-1"
|
class="btn btn-icon btn-outline-primary mr-1"
|
||||||
triggers="hover:click:hover"
|
triggers="hover:click:hover"
|
||||||
ngbTooltip="Edit"
|
ngbTooltip="Control"
|
||||||
(click)="editRow(data)"
|
(click)="editRow(data)"
|
||||||
>
|
>
|
||||||
<i class="feather ft-edit"></i>
|
<i class="feather ft-edit"></i>
|
||||||
|
|
|
@ -87,7 +87,7 @@ export class RoomComponent implements OnInit {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
viewRow(row) {
|
viewRow(row) {
|
||||||
this.router.navigate(["/monitoring/view-new-room", row.id]);
|
this.router.navigate(["/monitoring/view-detail-room", row.id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
editRow(row) {
|
editRow(row) {
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 684 KiB |
Loading…
Reference in New Issue