perbaikan kontrol device
This commit is contained in:
parent
ccf656dfce
commit
3172ba70b2
|
@ -13,7 +13,7 @@
|
|||
href="https://allbestsistem.com/"
|
||||
target="_blank"
|
||||
style="background-color: #000000 !important;"
|
||||
>Smart Building Management Systems (V@2024-07-3.01)
|
||||
>Smart Building Management Systems (V@2024-07-4.01)
|
||||
</a></span
|
||||
>
|
||||
</p>
|
||||
|
|
|
@ -146,18 +146,15 @@ export class DeviceControlComponent {
|
|||
}
|
||||
|
||||
switchChanged(ev, data) {
|
||||
console.log(ev);
|
||||
console.log(data);
|
||||
|
||||
// const requestData = {
|
||||
// device_id: data.device_id,
|
||||
// switch: data.mapping[0].switch,
|
||||
// value: ev,
|
||||
// command_type: "on_off",
|
||||
// };
|
||||
// this.deviceService.deviceSwitch(requestData).subscribe((res) => {
|
||||
// console.log(res);
|
||||
// });
|
||||
const requestData = {
|
||||
device_id: data.device_id,
|
||||
switch: data.mapping[0].switch,
|
||||
value: ev,
|
||||
command_type: "on_off",
|
||||
};
|
||||
this.deviceService.deviceSwitch(requestData).subscribe((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
|
||||
addFieldValue() {}
|
||||
|
|
|
@ -9,24 +9,46 @@
|
|||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label for="name" style="color: #ffffff">Full Name</label>
|
||||
<label for="firstName" style="color: #ffffff">First Name</label>
|
||||
<input
|
||||
type="text"
|
||||
id="name"
|
||||
id="firstName"
|
||||
class="form-control"
|
||||
formControlName="name"
|
||||
formControlName="firstName"
|
||||
placeholder="John Vander"
|
||||
[ngClass]="{
|
||||
'is-invalid': submitted && f.name.errors
|
||||
'is-invalid': submitted && f.firstName.errors
|
||||
}"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted danger"
|
||||
*ngIf="submitted && f.name.errors"
|
||||
*ngIf="submitted && f.firstName.errors"
|
||||
class="invalid-feedback"
|
||||
>
|
||||
<div *ngIf="f.name.errors.required">
|
||||
Full Name is required
|
||||
<div *ngIf="f.firstName.errors.required">
|
||||
Full First Name is required
|
||||
</div>
|
||||
</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="lastName" style="color: #ffffff">Last Name</label>
|
||||
<input
|
||||
type="text"
|
||||
id="lastName"
|
||||
class="form-control"
|
||||
formControlName="lastName"
|
||||
placeholder="John Vander"
|
||||
[ngClass]="{
|
||||
'is-invalid': submitted && f.lastName.errors
|
||||
}"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted danger"
|
||||
*ngIf="submitted && f.lastName.errors"
|
||||
class="invalid-feedback"
|
||||
>
|
||||
<div *ngIf="f.lastName.errors.required">
|
||||
Full lastName is required
|
||||
</div>
|
||||
</small>
|
||||
</div>
|
||||
|
|
|
@ -23,7 +23,8 @@ export class ProfilInformationComponent {
|
|||
|
||||
ngOnInit(): void {
|
||||
this.profilInfo = this.formBuilder.group({
|
||||
name: ["", Validators.required],
|
||||
firstName: ["", Validators.required],
|
||||
lastName: ["", Validators.required],
|
||||
email: ["", Validators.required],
|
||||
phone: ["", Validators.required],
|
||||
profilePicture: [null]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<section id="update-password">
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="col-6">
|
||||
<div class="card" style="background-color: #252525 !important">
|
||||
<div class="card-content">
|
||||
<div class="card-header" style="background-color: #252525 !important">
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
<p
|
||||
class="card-subtitle line-on-side text-muted text-center font-small-3 mx-2 my-1"
|
||||
>
|
||||
<span>(v@2024.07.3.01)</span>
|
||||
<span>(v@2024.07.4.01)</span>
|
||||
</p>
|
||||
<!-- <div class="card-body">
|
||||
<a
|
||||
|
|
Loading…
Reference in New Issue