import { Component, OnInit, ViewChild, Input } from '@angular/core';
import { Router } from '@angular/router';
import { CompTableListComponent } from '../../../../app/comp-table/comp-table-list/comp-table-list.component';
import * as Parse from 'parse';
import { CommonModule } from '@angular/common';
import { EduProcess } from '../../../../schemas/eduProcess';
@Component({
  selector: 'app-process',
  templateUrl: './process.component.html',
  styleUrls: ['./process.component.scss'],
  imports: [CommonModule, CompTableListComponent],
  standalone: true,
})
export class ProcessComponent  implements OnInit {
  @Input('eduCollectionId')eduCollectionId:string|any

  @ViewChild(CompTableListComponent) list: CompTableListComponent | undefined;

  EduProcess = EduProcess;
  user: Parse.User | undefined;
  className: string | undefined;
  queryParams: any | undefined;
  fieldsArray: Array<any> | undefined;

  constructor() { 
    this.user = Parse.User.current();
    this.className = this.EduProcess.className;
    this.fieldsArray = this.EduProcess.fieldsArray;
    this.queryParams = {
      where: {
        isDeleted: { $ne: true },
        eduCollection:this.eduCollectionId,
      },
    };
  }

  ngOnInit() {}

}
