perbaikan label

This commit is contained in:
Fuzi_fauzia 2024-08-26 11:54:17 +07:00
parent ecef25f30d
commit 5c5ca65f53
4 changed files with 6 additions and 3 deletions

View File

@ -177,7 +177,7 @@ export class DeviceControlComponent {
schedulerItem(row) { schedulerItem(row) {
console.log(row); console.log(row);
this.router.navigate(["/device/scheduler", row.id]); this.router.navigate(["/device/scheduler", row.id, row.name]);
} }
// schedulerItem(item) { // schedulerItem(item) {

View File

@ -69,7 +69,7 @@ import { SchedulerListComponent } from './scheduler-list/scheduler-list.componen
data: { mode: 'view' } data: { mode: 'view' }
}, },
{ {
path: 'scheduler/:id', path: 'scheduler/:id/:name',
component: SchedulerListComponent, component: SchedulerListComponent,
data: { mode: 'scheduler' } data: { mode: 'scheduler' }
} }

View File

@ -15,7 +15,7 @@
> >
<h4 class="form-section m-0" style="color: #242222"> <h4 class="form-section m-0" style="color: #242222">
<i class="feather ft-calendar" style="color: #242222"></i> <i class="feather ft-calendar" style="color: #242222"></i>
Smart Plug Single Connector {{deviceName}}
</h4> </h4>
<button <button

View File

@ -13,6 +13,7 @@ export class SchedulerListComponent {
public breadcrumb: any; public breadcrumb: any;
listScheduler: any; listScheduler: any;
deviceId: any; deviceId: any;
deviceName: any;
schedules = [ schedules = [
{ {
id: 1, id: 1,
@ -35,6 +36,8 @@ export class SchedulerListComponent {
ngOnInit(): void { ngOnInit(): void {
this.route.params.subscribe((params) => { this.route.params.subscribe((params) => {
const id = params["id"]; const id = params["id"];
const name = params["name"];
this.deviceName = name;
this.deviceId = id; this.deviceId = id;
if (id) { if (id) {
this.dataListScheduler(id); this.dataListScheduler(id);