import { Injectable } from '@angular/core';
import { ProcessesService } from '../services/processes.service';
import { ProcessDocumentService } from './process-document.service';
@Injectable({
  providedIn: 'root'
})
export class ExpedienteService {

  constructor(
    private processes: ProcessesService,
    private processDocumentService: ProcessDocumentService,
  ) { }


  discard({SerialNumber, Note =''}) {
    let otherbody = {
      "serialNumber": SerialNumber,
      "action": "Passivo",
      "ActionTypeId": 99999877,
      "dataFields": {
        "Note": Note,
      }
    }

    return this.processes.CompleteTask(otherbody)
  }

  viewDocument({DocId, ApplicationId}) {
    this.processDocumentService.viewDocument({DocId, ApplicationId})
  }

  CompleteTask({body}) {
    return this.processes.CompleteTask(body)
  }


  UpdateTaskStatus({FolderId}){
    return this.processes.UpdateTaskStatus(FolderId)
  }
}
