import { SysDataService } from "../../../service/sys-data.service";
import { HelperService } from "../../../service/helper.service";
import { Router } from "@angular/router";
import { Component, OnInit } from "@angular/core";
import { ActivatedRoute } from "@angular/router";

@Component({
  selector: "app-sys006-view-group",
  templateUrl: "./sys006-view-group.component.html"
})
export class Sys006ViewGroupComponent implements OnInit {
  errorMessage: String;
  data: any;
  selectRole: any;
  selectedUser: any;
  roleId: number;
  groupId: number;

  constructor(
    private sysDataService: SysDataService,
    private helperService: HelperService,
    private router: Router,
    private route: ActivatedRoute
  ) {}

  ngOnInit() {
    this.selectRole = this.helperService.RoleCode;
    this.route.data.subscribe((data: { selectedUser: any }) => {
      this.selectedUser = data;
    });
  }

  backPreviousPage() {
    this.router.navigateByUrl("/sys/sys006");
  }

}
