perbaikan device

This commit is contained in:
Fuzi_fauzia 2024-06-25 16:37:49 +07:00
parent 5cbd0f09dc
commit 19b43b8a2d
4 changed files with 49 additions and 14 deletions

View File

@ -356,13 +356,13 @@
</ng-template> </ng-template>
</ngx-datatable-column> </ngx-datatable-column>
<ngx-datatable-column <ngx-datatable-column
name="roomName" name="categoryName"
[flexGrow]="1" [flexGrow]="1"
[minWidth]="90" [minWidth]="90"
> >
<ng-template ngx-datatable-header-template> <ng-template ngx-datatable-header-template>
<span style="color: #ffffff !important" <span style="color: #ffffff !important"
>Room</span >Category</span
> >
</ng-template> </ng-template>
<ng-template <ng-template
@ -373,13 +373,13 @@
</ng-template> </ng-template>
</ngx-datatable-column> </ngx-datatable-column>
<ngx-datatable-column <ngx-datatable-column
name="categoryName" name="roomName"
[flexGrow]="1" [flexGrow]="1"
[minWidth]="90" [minWidth]="90"
> >
<ng-template ngx-datatable-header-template> <ng-template ngx-datatable-header-template>
<span style="color: #ffffff !important" <span style="color: #ffffff !important"
>Category</span >Room</span
> >
</ng-template> </ng-template>
<ng-template <ng-template

View File

@ -314,6 +314,11 @@
color: #ffffff !important; color: #ffffff !important;
background-color: #252525 !important; background-color: #252525 !important;
height: 40px !important; height: 40px !important;
border-radius: 12px;
}
:host ::ng-deep .ng-select .ng-select-container .ng-value-container .ng-input>input {
color: #ffffff !important;
} }
:host ::ng-deep .ngx-datatable.bootstrap .datatable-body-row { :host ::ng-deep .ngx-datatable.bootstrap .datatable-body-row {

View File

@ -176,7 +176,8 @@
(click)="doFilter()" (click)="doFilter()"
style=" style="
background-color: #252525 !important; background-color: #252525 !important;
border-color: #bef264 !important; border-color: #ffffff !important;
border-radius: 12px;
" "
[disabled]="spinnerFilterActive" [disabled]="spinnerFilterActive"
> >
@ -191,9 +192,23 @@
*ngIf="spinnerFilterActive" *ngIf="spinnerFilterActive"
></i> ></i>
</button> </button>
<button
type="button"
class="btn btn-outline-success ml-2"
(click)="doCancelFilter()"
style="
background-color: #252525 !important;
border-color: #ffffff !important;
color: #ffffff;
border-radius: 12px;
"
>
Cancel
</button>
</div> </div>
</div> </div>
</div> </div>
<div class="row mb-2"> <div class="row mb-2">
<div class="col-6 col-md-3 mb-2"> <div class="col-6 col-md-3 mb-2">
<button <button

View File

@ -121,15 +121,30 @@ export class DeviceComponent implements OnInit {
} }
doFilter() { doFilter() {
this.spinnerFilterActive = true; if (!this.buildingSelected) {
this.fetchData( this.toastr.error("Warning", "Filter Building tidak boleh kosong.", {
this.buildingSelected, timeOut: 5000,
this.categorySelected, closeButton: true,
this.statusSelected });
); } else {
setTimeout(() => { this.spinnerFilterActive = true;
this.spinnerFilterActive = false; this.fetchData(
}, 3000); this.buildingSelected,
this.categorySelected,
this.statusSelected
);
setTimeout(() => {
this.spinnerFilterActive = false;
}, 3000);
}
}
doCancelFilter() {
this.storedData = JSON.parse(localStorage.getItem("currentUser"));
this.buildingSelected = this.storedData.buildingId;
this.categorySelected = undefined;
this.statusSelected = undefined;
this.fetchData(this.buildingSelected, 0, 0);
} }
filterRows() { filterRows() {