diff --git a/src/app/_layout/footer/footer.component.html b/src/app/_layout/footer/footer.component.html index 6c55f26..6757e92 100644 --- a/src/app/_layout/footer/footer.component.html +++ b/src/app/_layout/footer/footer.component.html @@ -13,7 +13,7 @@ href="https://allbestsistem.com/" target="_blank" style="background-color: #000000 !important;" - >Smart Building Management Systems (V@2024-07-10.02) + >Smart Building Management Systems (V@2024-07-10.03)

diff --git a/src/app/content/hemat-app/cost-management/cost-management.component.ts b/src/app/content/hemat-app/cost-management/cost-management.component.ts index a0ef414..349a5c1 100644 --- a/src/app/content/hemat-app/cost-management/cost-management.component.ts +++ b/src/app/content/hemat-app/cost-management/cost-management.component.ts @@ -125,7 +125,7 @@ export class CostManagementComponent implements OnInit { (item) => item.name === "master_category" ).headerDetailParam; this.dataMasterCategori = dataCategory.filter( - (item) => item.status === "2" + (item) => item.statusName.toLowerCase() === "aktif" ); }); } diff --git a/src/app/content/hemat-app/device/add-edit-device/add-edit-device.component.ts b/src/app/content/hemat-app/device/add-edit-device/add-edit-device.component.ts index 4e47f73..2908c9c 100644 --- a/src/app/content/hemat-app/device/add-edit-device/add-edit-device.component.ts +++ b/src/app/content/hemat-app/device/add-edit-device/add-edit-device.component.ts @@ -79,27 +79,27 @@ export class AddEditDeviceComponent implements OnInit{ const dataCategory = data.data.find( (item) => item.name === "master_category" ).headerDetailParam; - this.dataMasterCategori = dataCategory.filter(item => item.status === "2") + this.dataMasterCategori = dataCategory.filter(item => item.statusName.toLowerCase() === "aktif") const dataVoltage = data.data.find( (item) => item.name === "master_voltage" ).headerDetailParam; - this.dataMasterVoltage = dataVoltage.filter(item => item.status === "2") + this.dataMasterVoltage = dataVoltage.filter(item => item.statusName.toLowerCase() === "aktif") const dataType = data.data.find( (item) => item.name === "master_type" ).headerDetailParam; - this.dataMasterType = dataType.filter(item => item.status === "2") + this.dataMasterType = dataType.filter(item => item.statusName.toLowerCase() === "aktif") const dataDuration = data.data.find( (item) => item.name === "master_duration" ).headerDetailParam; - this.dataMasterDuration = dataDuration.filter(item => item.status === "2") + this.dataMasterDuration = dataDuration.filter(item => item.statusName.toLowerCase() === "aktif") const dataStatus = data.data.find( (item) => item.name === "master_status" ).headerDetailParam; - this.dataMasterStatus = dataStatus.filter(item => item.status === "2") + this.dataMasterStatus = dataStatus.filter(item => item.statusName.toLowerCase() === "aktif") }); } diff --git a/src/app/content/hemat-app/device/device-control/device-control.component.ts b/src/app/content/hemat-app/device/device-control/device-control.component.ts index 988eed4..e38805d 100644 --- a/src/app/content/hemat-app/device/device-control/device-control.component.ts +++ b/src/app/content/hemat-app/device/device-control/device-control.component.ts @@ -91,9 +91,9 @@ export class DeviceControlComponent { (item) => item.name === "master_status" ).headerDetailParam; this.dataMasterCategori = dataCategory.filter( - (item) => item.status === "2" + (item) => item.statusName.toLowerCase() === "aktif" ); - this.dataMasterStatus = dataStatus.filter((item) => item.status === "2"); + this.dataMasterStatus = dataStatus.filter((item) => item.statusName.toLowerCase() === "aktif"); }); } diff --git a/src/app/content/hemat-app/device/device.component.html b/src/app/content/hemat-app/device/device.component.html index 9568122..e3908f3 100644 --- a/src/app/content/hemat-app/device/device.component.html +++ b/src/app/content/hemat-app/device/device.component.html @@ -438,7 +438,7 @@

- - + --> item.name === "master_status" ).headerDetailParam; this.dataMasterCategori = dataCategory.filter( - (item) => item.status === "2" + (item) => item.statusName.toLowerCase() === "aktif" ); - this.dataMasterStatus = dataStatus.filter((item) => item.status === "2"); + this.dataMasterStatus = dataStatus.filter((item) => item.statusName.toLowerCase() === "aktif"); }); } diff --git a/src/app/content/hemat-app/list-monitoring/add-edit-list/add-edit-list.component.ts b/src/app/content/hemat-app/list-monitoring/add-edit-list/add-edit-list.component.ts index e47d324..e7cce4a 100644 --- a/src/app/content/hemat-app/list-monitoring/add-edit-list/add-edit-list.component.ts +++ b/src/app/content/hemat-app/list-monitoring/add-edit-list/add-edit-list.component.ts @@ -211,7 +211,7 @@ export class AddEditListComponent { const dataStatus = data.data.find( (item) => item.name === "master_status" ).headerDetailParam; - this.dataMasterStatus = dataStatus.filter(item => item.status === "2") + this.dataMasterStatus = dataStatus.filter(item => item.statusName.toLowerCase() === "aktif") }); } diff --git a/src/app/content/hemat-app/master/add-edit-master/add-edit-master.component.ts b/src/app/content/hemat-app/master/add-edit-master/add-edit-master.component.ts index a1ec93d..83e556e 100644 --- a/src/app/content/hemat-app/master/add-edit-master/add-edit-master.component.ts +++ b/src/app/content/hemat-app/master/add-edit-master/add-edit-master.component.ts @@ -76,7 +76,7 @@ export class AddEditMasterComponent implements OnInit { const dataCategory = data.data.find( (item) => item.name === "master_status" ).headerDetailParam; - this.dataMasterStatus = dataCategory.filter(item => item.status === "2"); + this.dataMasterStatus = dataCategory.filter(item => item.statusName.toLowerCase() === "aktif"); }); } diff --git a/src/app/content/hemat-app/master/master-building/add-edit-master-building/add-edit-master-building.component.html b/src/app/content/hemat-app/master/master-building/add-edit-master-building/add-edit-master-building.component.html index f42e9e6..ec03242 100644 --- a/src/app/content/hemat-app/master/master-building/add-edit-master-building/add-edit-master-building.component.html +++ b/src/app/content/hemat-app/master/master-building/add-edit-master-building/add-edit-master-building.component.html @@ -1,6 +1,6 @@ @@ -42,6 +42,7 @@ class="form-control" id="phone" formControlName="phone" + pattern="^[0-9]*$" maxlength="13" [ngClass]="{'is-invalid': myForm.get('phone').invalid && myForm.get('phone').touched}" /> @@ -55,6 +56,7 @@ type="text" class="form-control" id="owner" + maxlength="30" formControlName="owner" [ngClass]="{'is-invalid': myForm.get('owner').invalid && myForm.get('owner').touched}" /> diff --git a/src/app/content/hemat-app/master/master-building/add-edit-master-building/add-edit-master-building.component.ts b/src/app/content/hemat-app/master/master-building/add-edit-master-building/add-edit-master-building.component.ts index 36e11a5..ead1c6e 100644 --- a/src/app/content/hemat-app/master/master-building/add-edit-master-building/add-edit-master-building.component.ts +++ b/src/app/content/hemat-app/master/master-building/add-edit-master-building/add-edit-master-building.component.ts @@ -40,10 +40,10 @@ export class AddEditMasterBuildingComponent { this.myForm = this.fb.group({ name: ["", Validators.required], statusId: ["", Validators.required], - email: ["", [Validators.required, Validators.email]], + email: ["", [Validators.required, Validators.pattern(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/)]], owner: ["", Validators.required], address: ["", Validators.required], - phone: ["", [Validators.required, Validators.pattern("^[0-9]*$")]], + phone: ["", [Validators.required, Validators.pattern(/^[0-9]{10,15}$/)]], kwh: ["", Validators.required], }); } @@ -74,7 +74,7 @@ export class AddEditMasterBuildingComponent { console.log(this.dataStatus); this.filteredDataStatus = this.dataStatus.filter( - (item) => item.status === "2" + (item) => item.statusName.toLowerCase() === "aktif" ); }); } diff --git a/src/app/content/hemat-app/master/master-building/master-building.component.ts b/src/app/content/hemat-app/master/master-building/master-building.component.ts index 1c00431..d9d6d6c 100644 --- a/src/app/content/hemat-app/master/master-building/master-building.component.ts +++ b/src/app/content/hemat-app/master/master-building/master-building.component.ts @@ -96,6 +96,8 @@ export class MasterBuildingComponent { editRow(row) { const modalRef = this.modalService.open(AddEditMasterBuildingComponent, { size: "lg", + backdrop: 'static', + keyboard: false }); modalRef.componentInstance.dataRow = row; diff --git a/src/app/content/hemat-app/master/master-category/master-category.component.html b/src/app/content/hemat-app/master/master-category/master-category.component.html index f10d791..7d89f4e 100644 --- a/src/app/content/hemat-app/master/master-category/master-category.component.html +++ b/src/app/content/hemat-app/master/master-category/master-category.component.html @@ -94,7 +94,7 @@ @@ -105,7 +105,7 @@ ngx-datatable-cell-template let-value="value" > -

{{ value === "2" ? "Aktif" : "Nonaktif" }}

+

{{ value}}

@@ -90,7 +90,7 @@ ngx-datatable-cell-template let-value="value" > -

{{ value === "2" ? "Aktif" : "Nonaktif" }}

+

{{ value }}

@@ -86,7 +86,7 @@ let-value="value" >

- {{ value === "2" ? "Aktif" : "Nonaktif" }} + {{ value }}

diff --git a/src/app/content/hemat-app/master/master-role/master-role.component.html b/src/app/content/hemat-app/master/master-role/master-role.component.html index 4668aa8..d95e108 100644 --- a/src/app/content/hemat-app/master/master-role/master-role.component.html +++ b/src/app/content/hemat-app/master/master-role/master-role.component.html @@ -83,7 +83,7 @@ @@ -95,7 +95,7 @@ let-value="value" >

- {{ value === "2" ? "Aktif" : "Nonaktif" }} + {{ value }}

diff --git a/src/app/content/hemat-app/master/master-room/add-edit-master-room/add-edit-master-room.component.ts b/src/app/content/hemat-app/master/master-room/add-edit-master-room/add-edit-master-room.component.ts index 1cdb739..10584ce 100644 --- a/src/app/content/hemat-app/master/master-room/add-edit-master-room/add-edit-master-room.component.ts +++ b/src/app/content/hemat-app/master/master-room/add-edit-master-room/add-edit-master-room.component.ts @@ -72,7 +72,7 @@ export class AddEditMasterRoomComponent { ); this.dataStatus = this.dataMasterStatus.headerDetailParam; this.filteredDataStatus = this.dataStatus.filter( - (item) => item.status === "2" + (item) => item.statusName.toLowerCase() === "aktif" ); }); } diff --git a/src/app/content/hemat-app/master/master-status/master-status.component.html b/src/app/content/hemat-app/master/master-status/master-status.component.html index 29bf175..1fbb4df 100644 --- a/src/app/content/hemat-app/master/master-status/master-status.component.html +++ b/src/app/content/hemat-app/master/master-status/master-status.component.html @@ -79,7 +79,7 @@ @@ -91,7 +91,7 @@ let-value="value" >

- {{ value === "2" ? "Aktif" : "Nonaktif" }} + {{ value }}

diff --git a/src/app/content/hemat-app/master/master-type/master-type.component.html b/src/app/content/hemat-app/master/master-type/master-type.component.html index 29bf175..289be67 100644 --- a/src/app/content/hemat-app/master/master-type/master-type.component.html +++ b/src/app/content/hemat-app/master/master-type/master-type.component.html @@ -79,7 +79,7 @@ diff --git a/src/app/content/hemat-app/master/master-voltage/master-voltage.component.html b/src/app/content/hemat-app/master/master-voltage/master-voltage.component.html index 29bf175..289be67 100644 --- a/src/app/content/hemat-app/master/master-voltage/master-voltage.component.html +++ b/src/app/content/hemat-app/master/master-voltage/master-voltage.component.html @@ -79,7 +79,7 @@ diff --git a/src/app/content/hemat-app/monitoring/control-device-seemore/control-device-seemore.component.ts b/src/app/content/hemat-app/monitoring/control-device-seemore/control-device-seemore.component.ts index ae0e115..eccfaeb 100644 --- a/src/app/content/hemat-app/monitoring/control-device-seemore/control-device-seemore.component.ts +++ b/src/app/content/hemat-app/monitoring/control-device-seemore/control-device-seemore.component.ts @@ -103,9 +103,9 @@ export class ControlDeviceSeemoreComponent { (item) => item.name === "master_status" ).headerDetailParam; this.dataMasterCategori = dataCategory.filter( - (item) => item.status === "2" + (item) => item.statusName.toLowerCase() === "aktif" ); - this.dataMasterStatus = dataStatus.filter((item) => item.status === "2"); + this.dataMasterStatus = dataStatus.filter((item) => item.statusName.toLowerCase() === "aktif"); }); } diff --git a/src/app/content/hemat-app/monitoring/surveillance/surveillance.component.ts b/src/app/content/hemat-app/monitoring/surveillance/surveillance.component.ts index d8649d9..4d41697 100644 --- a/src/app/content/hemat-app/monitoring/surveillance/surveillance.component.ts +++ b/src/app/content/hemat-app/monitoring/surveillance/surveillance.component.ts @@ -208,9 +208,9 @@ export class SurveillanceComponent { (item) => item.name === "master_status" ).headerDetailParam; this.dataMasterCategori = dataCategory.filter( - (item) => item.status === "2" + (item) => item.statusName.toLowerCase() === "aktif" ); - this.dataMasterStatus = dataStatus.filter((item) => item.status === "2"); + this.dataMasterStatus = dataStatus.filter((item) => item.statusName.toLowerCase() === "aktif"); }); } diff --git a/src/app/login/login.component.html b/src/app/login/login.component.html index b030038..7e9cbe0 100644 --- a/src/app/login/login.component.html +++ b/src/app/login/login.component.html @@ -138,7 +138,7 @@

- (v@2024.07.10.02) + (v@2024.07.10.03)