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