diff --git a/src/app/_layout/footer/footer.component.html b/src/app/_layout/footer/footer.component.html index 4e220b0..095d4ee 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-11.02) + >Smart Building Management Systems (V@2024-07-11.03)

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 289be67..1fbb4df 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 @@ -91,7 +91,7 @@ let-value="value" >

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

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 289be67..1fbb4df 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 @@ -91,7 +91,7 @@ let-value="value" >

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

diff --git a/src/app/content/hemat-app/master/master-voltage/master-voltage.component.ts b/src/app/content/hemat-app/master/master-voltage/master-voltage.component.ts index 638183f..fe70cd3 100644 --- a/src/app/content/hemat-app/master/master-voltage/master-voltage.component.ts +++ b/src/app/content/hemat-app/master/master-voltage/master-voltage.component.ts @@ -5,6 +5,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { Router } from '@angular/router'; import { BuildingService } from '../../service/monitoring-api.service'; import { LoginService } from '../../service/login.service'; +import { ToastrService } from 'ngx-toastr'; @Component({ selector: 'app-master-voltage', @@ -24,7 +25,8 @@ export class MasterVoltageComponent { private modalService: NgbModal, private router: Router, private monitoringApiService: BuildingService, - private authService: LoginService + private authService: LoginService, + private toastr: ToastrService, ) {} ngOnInit() { @@ -88,14 +90,20 @@ export class MasterVoltageComponent { modalRef.componentInstance.mode = "add"; modalRef.result.then( (result) => { - console.log(result); if (result) { - this.monitoringApiService + if (this.filteredRows.some(value => value.name.toLowerCase() === result.name.toLowerCase())) { + this.toastr.error("Warning", "Data yang anda masukan double.", { + timeOut: 5000, + closeButton: true, + }); + } else { + this.monitoringApiService .postHeaderDetailParam(result) .subscribe((res) => { console.log(res); this.fetchData(); }); + } } }, (reason) => { @@ -117,14 +125,14 @@ export class MasterVoltageComponent { modalRef.result.then( (result) => { console.log(result); - if (result) { - this.monitoringApiService - .putHeaderDetailParam(result, row.id) - .subscribe((res) => { - console.log(res); - this.fetchData(); - }); - } + // if (result) { + // this.monitoringApiService + // .putHeaderDetailParam(result, row.id) + // .subscribe((res) => { + // console.log(res); + // this.fetchData(); + // }); + // } }, (reason) => { console.log(`Dismissed: ${reason}`); diff --git a/src/app/content/hemat-app/user-profile/profil-information/profil-information.component.html b/src/app/content/hemat-app/user-profile/profil-information/profil-information.component.html index 7d645af..84a63f5 100644 --- a/src/app/content/hemat-app/user-profile/profil-information/profil-information.component.html +++ b/src/app/content/hemat-app/user-profile/profil-information/profil-information.component.html @@ -16,7 +16,6 @@ class="form-control" formControlName="firstName" maxlength="20" - placeholder="John Vander" [ngClass]="{'is-invalid': profilInfo.get('firstName').invalid && profilInfo.get('firstName').touched}" />
@@ -31,7 +30,6 @@ class="form-control" formControlName="lastName" maxlength="20" - placeholder="John Vander" [ngClass]="{'is-invalid': profilInfo.get('lastName').invalid && profilInfo.get('lastName').touched}" />
@@ -45,7 +43,6 @@ id="email" class="form-control" formControlName="email" - placeholder="email@email.com" maxlength="50" [ngClass]="{'is-invalid': profilInfo.get('email').invalid && profilInfo.get('email').touched}" /> @@ -61,7 +58,6 @@ class="form-control" formControlName="phone" maxlength="13" - placeholder="08**************" pattern="^[0-9]*$" [ngClass]="{'is-invalid': profilInfo.get('phone').invalid && profilInfo.get('phone').touched}" /> diff --git a/src/app/content/hemat-app/user-profile/profil-information/profil-information.component.ts b/src/app/content/hemat-app/user-profile/profil-information/profil-information.component.ts index bf31e16..b640673 100644 --- a/src/app/content/hemat-app/user-profile/profil-information/profil-information.component.ts +++ b/src/app/content/hemat-app/user-profile/profil-information/profil-information.component.ts @@ -52,7 +52,7 @@ export class ProfilInformationComponent { lastName: ["", Validators.required], email: ["", [Validators.required, Validators.pattern(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/)]], phone: ["", [Validators.required, Validators.pattern(/^[0-9]{10,15}$/)]], - image: [null], + image: [null, Validators.required], }); this.dataProfil(this.storedData.sub); this.profilInfo.valueChanges.subscribe(() => { diff --git a/src/app/content/hemat-app/user-profile/update-password/update-password.component.html b/src/app/content/hemat-app/user-profile/update-password/update-password.component.html index d47125e..b032b51 100644 --- a/src/app/content/hemat-app/user-profile/update-password/update-password.component.html +++ b/src/app/content/hemat-app/user-profile/update-password/update-password.component.html @@ -49,7 +49,9 @@
-->
- +
- +
+ +
+ New Password is required +
+
+ New Password must be at least 8 characters long +
+
+ New Password must contain at least one uppercase + letter, one lowercase letter, and one number +
+
- -
New Password is required
-
- New Password must be at least 8 characters long -
-
- New Password must contain at least one uppercase letter, one lowercase letter, and one number -
-
- +
- +
- +
+ +
+ Confirm Password is required +
+
+ Confirm Password must match the New Password +
+
- -
Confirm Password is required
-
- Confirm Password must match the New Password -
-
diff --git a/src/app/content/hemat-app/user-profile/update-password/update-password.component.ts b/src/app/content/hemat-app/user-profile/update-password/update-password.component.ts index 3137230..31398bd 100644 --- a/src/app/content/hemat-app/user-profile/update-password/update-password.component.ts +++ b/src/app/content/hemat-app/user-profile/update-password/update-password.component.ts @@ -93,8 +93,6 @@ export class UpdatePasswordComponent { if (this.profilInfo.invalid) { return; } - - // Handle form submission } cancel() { @@ -114,6 +112,7 @@ export class UpdatePasswordComponent { } saveEdit() { + this.submitted = true; if (this.profilInfo.valid) { const dataPassword = { userid: this.profilInfo.value.userid, @@ -135,6 +134,8 @@ export class UpdatePasswordComponent { }); } ); + } else { + } } diff --git a/src/app/login/login.component.html b/src/app/login/login.component.html index e9dfa84..2e46b47 100644 --- a/src/app/login/login.component.html +++ b/src/app/login/login.component.html @@ -138,7 +138,7 @@

- (v@2024.07.11.02) + (v@2024.07.11.03)