2020-08-21 00:22:51 +01:00
|
|
|
import { Injectable } from '@angular/core';
|
2020-08-27 13:02:06 +01:00
|
|
|
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
2024-11-06 10:38:58 +01:00
|
|
|
import { UserSession } from '../models/user.model';
|
2020-08-27 13:02:06 +01:00
|
|
|
import { environment } from 'src/environments/environment';
|
|
|
|
|
import { Observable } from 'rxjs';
|
2021-07-29 10:13:39 +01:00
|
|
|
import { DocumentSetUpMeeting } from '../models/CallMeeting';
|
2021-07-27 21:21:16 +01:00
|
|
|
import { Excludetask } from '../models/Excludetask';
|
2021-08-26 13:48:29 +01:00
|
|
|
import { ExpedienteFullTask } from '../models/Expediente';
|
2021-08-27 09:48:51 +01:00
|
|
|
import { GetTasksListType } from '../models/GetTasksListType';
|
2021-08-30 10:24:46 +01:00
|
|
|
import { fullTaskList } from '../models/dailyworktask.model';
|
2021-09-28 11:31:10 +01:00
|
|
|
import { ChangeProfileService } from './change-profile.service';
|
2022-02-07 17:55:00 +01:00
|
|
|
import { SessionStore } from '../store/session.service';
|
2020-08-21 00:22:51 +01:00
|
|
|
@Injectable({
|
|
|
|
|
providedIn: 'root'
|
|
|
|
|
})
|
|
|
|
|
export class ProcessesService {
|
|
|
|
|
|
2020-08-27 13:02:06 +01:00
|
|
|
authheader = {};
|
2024-11-06 10:38:58 +01:00
|
|
|
loggeduser: UserSession;
|
2023-09-06 21:23:21 +01:00
|
|
|
|
|
|
|
|
|
2020-08-21 00:22:51 +01:00
|
|
|
|
2021-09-28 11:31:10 +01:00
|
|
|
constructor(
|
|
|
|
|
private http: HttpClient,
|
2023-07-11 10:25:16 +01:00
|
|
|
private changeProfileService: ChangeProfileService
|
2021-09-28 11:31:10 +01:00
|
|
|
) {
|
|
|
|
|
|
2022-02-07 17:55:00 +01:00
|
|
|
this.loggeduser = SessionStore.user;
|
2021-10-09 20:24:34 +01:00
|
|
|
|
2021-09-28 11:31:10 +01:00
|
|
|
this.setHeader()
|
2023-09-06 21:23:21 +01:00
|
|
|
this.changeProfileService.registerCallback(() => {
|
2022-02-07 17:55:00 +01:00
|
|
|
this.loggeduser = SessionStore.user;
|
2021-09-28 11:31:10 +01:00
|
|
|
this.setHeader()
|
|
|
|
|
})
|
|
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
|
2023-07-06 12:20:57 +01:00
|
|
|
|
2021-09-28 11:31:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2024-12-05 19:14:11 +01:00
|
|
|
setHeader() {}
|
2020-08-21 00:22:51 +01:00
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
uploadFile(formData: any) {
|
2021-12-06 16:00:57 +01:00
|
|
|
|
|
|
|
|
//const geturl = environment.apiURL + 'Tasks/DelegateTask';
|
|
|
|
|
const geturl = environment.apiURL + 'lakefs/UploadFiles';
|
|
|
|
|
|
|
|
|
|
let options = {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return this.http.post(`${geturl}`, formData, options);
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
GetTasksList(processname: typeof GetTasksListType, onlycount: boolean): Observable<fullTaskList[]> {
|
2020-11-05 16:43:01 +01:00
|
|
|
const geturl = environment.apiURL + 'tasks/List';
|
2020-08-27 13:02:06 +01:00
|
|
|
let params = new HttpParams();
|
|
|
|
|
|
|
|
|
|
params = params.set("ProcessName", processname);
|
|
|
|
|
params = params.set("OnlyCount", onlycount.toString());
|
2023-06-10 14:17:41 +01:00
|
|
|
params = params.set("OnlyCount", onlycount.toString());
|
|
|
|
|
params = params.set("pageNum", "1");
|
|
|
|
|
params = params.set("pageSize", "500");
|
2021-07-13 11:15:19 +01:00
|
|
|
|
|
|
|
|
let options = {
|
|
|
|
|
params: params
|
2020-08-27 13:02:06 +01:00
|
|
|
};
|
|
|
|
|
|
2021-08-30 10:24:46 +01:00
|
|
|
return this.http.get<fullTaskList[]>(`${geturl}`, options);
|
2020-08-21 00:22:51 +01:00
|
|
|
}
|
|
|
|
|
|
2024-06-02 13:48:01 +01:00
|
|
|
// eventsToApprove(userid, caller) {
|
|
|
|
|
// const geturl = environment.apiURL + 'tasks/events-to-approve';
|
|
|
|
|
// let params = new HttpParams();
|
2023-02-22 13:06:31 +01:00
|
|
|
|
2024-06-02 13:48:01 +01:00
|
|
|
// params = params.set("pageNum", 1);
|
|
|
|
|
// params = params.set("pageSize", 500);
|
|
|
|
|
// params = params.set("userid", userid);
|
2023-02-22 13:06:31 +01:00
|
|
|
|
2024-06-02 13:48:01 +01:00
|
|
|
// let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
//
|
2024-06-02 13:48:01 +01:00
|
|
|
// params: params
|
|
|
|
|
// };
|
2023-02-22 13:06:31 +01:00
|
|
|
|
2024-06-02 13:48:01 +01:00
|
|
|
// return this.http.get<fullTaskList[]>(`${geturl}`, options);
|
|
|
|
|
// }
|
2023-02-22 13:06:31 +01:00
|
|
|
|
2021-08-26 13:48:29 +01:00
|
|
|
GetTaskListExpediente(onlycount1): Observable<ExpedienteFullTask[]> {
|
|
|
|
|
const processname = "Expediente"
|
|
|
|
|
const onlycount = false
|
|
|
|
|
|
|
|
|
|
const geturl = environment.apiURL + 'tasks/List';
|
|
|
|
|
let params = new HttpParams();
|
|
|
|
|
|
|
|
|
|
params = params.set("ProcessName", processname);
|
|
|
|
|
params = params.set("OnlyCount", onlycount.toString());
|
|
|
|
|
|
|
|
|
|
let options = {
|
|
|
|
|
params: params
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return this.http.get<ExpedienteFullTask[]>(`${geturl}`, options);
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
GetTask(serialnumber: string): Observable<any> {
|
2023-07-06 12:20:57 +01:00
|
|
|
|
2020-11-05 16:43:01 +01:00
|
|
|
const geturl = environment.apiURL + 'Tasks/FindTask';
|
2020-08-27 13:02:06 +01:00
|
|
|
let params = new HttpParams();
|
|
|
|
|
|
2020-11-05 16:43:01 +01:00
|
|
|
params = params.set("serialNumber", serialnumber);
|
2021-07-13 11:15:19 +01:00
|
|
|
|
|
|
|
|
let options = {
|
|
|
|
|
params: params
|
2020-08-27 13:02:06 +01:00
|
|
|
};
|
2020-11-05 16:43:01 +01:00
|
|
|
return this.http.get<any>(`${geturl}`, options);
|
|
|
|
|
}
|
2021-10-09 20:24:34 +01:00
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
GetDraftByID(id: string): Observable<any> {
|
2023-07-10 12:38:41 +01:00
|
|
|
|
2023-07-06 12:20:57 +01:00
|
|
|
const geturl = environment.apiPCURL + `Documents/${id}`;
|
|
|
|
|
let params = new HttpParams();
|
|
|
|
|
|
|
|
|
|
/* params = params.set("serialNumber", serialnumber); */
|
|
|
|
|
|
|
|
|
|
let options = {
|
|
|
|
|
/* params: params */
|
|
|
|
|
};
|
|
|
|
|
return this.http.get<any>(`${geturl}`, options);
|
|
|
|
|
}
|
2021-07-27 16:53:37 +01:00
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
SaveDraftByID(id: string, object): Observable<any> {
|
2023-07-10 12:38:41 +01:00
|
|
|
const geturl = environment.apiPCURL + `Documents/${id}`;
|
|
|
|
|
let params = new HttpParams();
|
|
|
|
|
|
|
|
|
|
/* params = params.set("serialNumber", serialnumber); */
|
|
|
|
|
|
|
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2023-07-10 12:38:41 +01:00
|
|
|
/* params: params */
|
|
|
|
|
};
|
|
|
|
|
return this.http.put<any>(`${geturl}`, object, options);
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
SetTaskToPending(serialNumber: string): Observable<any> {
|
2021-04-26 16:44:49 +01:00
|
|
|
const geturl = environment.apiURL + 'Tasks/SetTaskPending';
|
|
|
|
|
let params = new HttpParams();
|
|
|
|
|
|
|
|
|
|
params = params.set("serialNumber", serialNumber);
|
2021-07-13 11:15:19 +01:00
|
|
|
|
|
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2021-07-13 11:15:19 +01:00
|
|
|
params: params
|
2021-04-26 16:44:49 +01:00
|
|
|
};
|
2023-09-06 21:23:21 +01:00
|
|
|
return this.http.post<any>(`${geturl}`, '', options);
|
2021-04-26 16:44:49 +01:00
|
|
|
}
|
2021-03-24 17:43:55 +01:00
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
GetPendingTasks(onlyCount: boolean) {
|
2021-07-13 11:15:19 +01:00
|
|
|
const geturl = environment.apiURL + 'Tasks/ListPending';
|
|
|
|
|
let params = new HttpParams();
|
|
|
|
|
|
|
|
|
|
params = params.set("onlyCount", onlyCount.toString());
|
|
|
|
|
|
|
|
|
|
let options = {
|
|
|
|
|
params: params
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return this.http.get<any>(`${geturl}`, options);
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
DelegateTask(body: any) {
|
2021-05-03 12:57:26 +01:00
|
|
|
const geturl = environment.apiURL + 'Tasks/DelegateTask';
|
2021-07-13 11:15:19 +01:00
|
|
|
|
|
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2021-05-03 12:57:26 +01:00
|
|
|
};
|
|
|
|
|
return this.http.post<any>(`${geturl}`, body, options);
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
GetTaskParticipants(folderId): Observable<any> {
|
2021-03-24 17:43:55 +01:00
|
|
|
const geturl = environment.apiURL + 'Processes/GetUsersInDispash';
|
|
|
|
|
let params = new HttpParams();
|
|
|
|
|
|
|
|
|
|
params = params.set("folderId", folderId);
|
2021-07-13 11:15:19 +01:00
|
|
|
|
|
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2021-07-13 11:15:19 +01:00
|
|
|
params: params
|
2021-03-24 17:43:55 +01:00
|
|
|
};
|
|
|
|
|
return this.http.get<any>(`${geturl}`, options);
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
FindTaskDocId(serialnumber: string): Observable<any> {
|
2020-11-20 10:55:51 +01:00
|
|
|
const geturl = environment.apiURL + 'Tasks/FindExpedienteDocId';
|
2020-11-18 21:55:58 +01:00
|
|
|
let params = new HttpParams();
|
|
|
|
|
|
|
|
|
|
params = params.set("serialNumber", serialnumber);
|
2021-07-13 11:15:19 +01:00
|
|
|
|
|
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2021-07-13 11:15:19 +01:00
|
|
|
params: params
|
2020-11-18 21:55:58 +01:00
|
|
|
};
|
|
|
|
|
return this.http.get<any>(`${geturl}`, options);
|
|
|
|
|
}
|
2020-11-05 16:43:01 +01:00
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
GetMDOficialTasks(): Observable<any> {
|
2020-11-05 16:43:01 +01:00
|
|
|
const geturl = environment.apiURL + 'tasks/GetMDOficialTasks';
|
|
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2020-11-05 16:43:01 +01:00
|
|
|
};
|
|
|
|
|
return this.http.get<any>(`${geturl}`, options);
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
GetMDPersonalTasks(): Observable<any> {
|
2020-11-05 16:43:01 +01:00
|
|
|
const geturl = environment.apiURL + 'tasks/GetMDPersonalTasks';
|
|
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2020-11-05 16:43:01 +01:00
|
|
|
};
|
|
|
|
|
return this.http.get<any>(`${geturl}`, options);
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
GetToApprovedEvents(categoryname: string, count: string): Observable<any> {
|
2020-11-05 16:43:01 +01:00
|
|
|
const geturl = environment.apiURL + 'Tasks/ListByCategory';
|
|
|
|
|
let params = new HttpParams();
|
2020-08-27 13:02:06 +01:00
|
|
|
|
2020-11-05 16:43:01 +01:00
|
|
|
params = params.set("categoryname", categoryname);
|
|
|
|
|
params = params.set("onlyCount", count);
|
2021-07-13 11:15:19 +01:00
|
|
|
|
|
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2021-07-13 11:15:19 +01:00
|
|
|
params: params,
|
2020-11-05 16:43:01 +01:00
|
|
|
};
|
2020-08-27 13:02:06 +01:00
|
|
|
return this.http.get<any>(`${geturl}`, options);
|
2020-08-21 00:22:51 +01:00
|
|
|
}
|
|
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
PostTaskAction(body: any) {
|
2020-11-06 14:39:09 +01:00
|
|
|
const geturl = environment.apiURL + 'Tasks/Complete';
|
2021-07-13 11:15:19 +01:00
|
|
|
|
|
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2020-11-16 00:41:11 +01:00
|
|
|
};
|
2021-05-28 15:13:50 +01:00
|
|
|
return this.http.post<any>(`${geturl}`, body, options)
|
2020-11-16 00:41:11 +01:00
|
|
|
}
|
2021-06-17 16:12:56 +01:00
|
|
|
|
2023-07-20 16:54:58 +01:00
|
|
|
presidentialActionsSignature(body) {
|
|
|
|
|
const geturl = environment.apiURL + 'presidentialActions/signature';
|
|
|
|
|
|
|
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2023-07-20 16:54:58 +01:00
|
|
|
};
|
|
|
|
|
return this.http.post<any>(`${geturl}`, body, options)
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
CompleteTask(body: Excludetask) {
|
2023-07-25 13:47:48 +01:00
|
|
|
|
|
|
|
|
// double check
|
2021-05-06 13:37:22 +01:00
|
|
|
const geturl = environment.apiURL + 'Tasks/CompleteTask';
|
2021-07-13 11:15:19 +01:00
|
|
|
|
|
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2021-05-06 13:37:22 +01:00
|
|
|
};
|
2021-05-28 15:45:41 +01:00
|
|
|
return this.http.post<any>(`${geturl}`, body, options)
|
2021-05-06 13:37:22 +01:00
|
|
|
}
|
2021-03-31 13:52:40 +01:00
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
CompleteParecerPrTask(body: any) {
|
2021-06-17 16:12:56 +01:00
|
|
|
const geturl = environment.apiURL + 'Tasks/CompleteTaskParecerPr';
|
2021-07-13 11:15:19 +01:00
|
|
|
|
|
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2021-06-17 16:12:56 +01:00
|
|
|
};
|
|
|
|
|
return this.http.post<any>(`${geturl}`, body, options)
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
UpdateTaskStatus(FolderId: any): Observable<any> {
|
2021-03-31 13:52:40 +01:00
|
|
|
const geturl = environment.apiURL + 'Tasks/UpdateTaskStatus';
|
|
|
|
|
let params = new HttpParams();
|
2021-03-31 14:25:41 +01:00
|
|
|
|
|
|
|
|
params = params.set("FolderId", FolderId);
|
2021-07-13 11:15:19 +01:00
|
|
|
|
|
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2021-07-13 11:15:19 +01:00
|
|
|
params: params
|
2021-03-31 13:52:40 +01:00
|
|
|
};
|
2023-09-06 21:23:21 +01:00
|
|
|
return this.http.post<any>(`${geturl}`, '', options);
|
2021-03-31 13:52:40 +01:00
|
|
|
}
|
2021-04-01 17:06:54 +01:00
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
GetDocumentUrl(DocId: string, FsId: string): Observable<any> {
|
2021-04-01 17:06:54 +01:00
|
|
|
const geturl = environment.apiURL + 'ecm/document/viewrequestshort';
|
|
|
|
|
let params = new HttpParams();
|
|
|
|
|
|
|
|
|
|
params = params.set("DocId", DocId);
|
|
|
|
|
params = params.set("applicationid", FsId);
|
2021-07-13 11:15:19 +01:00
|
|
|
|
|
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2021-07-13 11:15:19 +01:00
|
|
|
params: params
|
2021-04-01 17:06:54 +01:00
|
|
|
};
|
|
|
|
|
return this.http.get<any>(`${geturl}`, options);
|
|
|
|
|
}
|
2021-07-13 11:15:19 +01:00
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
postDespatcho(body: any) {
|
2020-11-16 00:41:11 +01:00
|
|
|
const geturl = environment.apiURL + 'Processes/CreateDispatch';
|
2021-07-13 11:15:19 +01:00
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2020-11-06 14:39:09 +01:00
|
|
|
};
|
2021-05-25 13:38:46 +01:00
|
|
|
return this.http.post<any>(`${geturl}`, body, options)
|
2020-11-06 14:39:09 +01:00
|
|
|
}
|
2020-11-17 14:59:33 +01:00
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
postDespatchoPr(body: any) {
|
2021-05-26 11:31:54 +01:00
|
|
|
const geturl = environment.apiURL + 'Processes/CreateDispatchPR';
|
2021-07-13 11:15:19 +01:00
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2021-05-25 16:07:26 +01:00
|
|
|
};
|
|
|
|
|
return this.http.post<any>(`${geturl}`, body, options)
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
postParecer(body: any) {
|
2023-07-25 13:47:48 +01:00
|
|
|
|
|
|
|
|
try {
|
2023-09-06 21:23:21 +01:00
|
|
|
if (!body.AttachmentList) {
|
2023-07-25 13:47:48 +01:00
|
|
|
body.AttachmentList = {}
|
|
|
|
|
}
|
2023-09-06 21:23:21 +01:00
|
|
|
if (!body?.dataFields) {
|
2023-07-25 13:47:48 +01:00
|
|
|
body.dataFields = {}
|
|
|
|
|
}
|
2023-09-06 21:23:21 +01:00
|
|
|
if (!body.dataFields?.DraftIds) {
|
2023-07-25 13:47:48 +01:00
|
|
|
body.dataFields.DraftIds = ""
|
|
|
|
|
}
|
2023-09-06 21:23:21 +01:00
|
|
|
if (!body.AttachmentList?.DraftIds) {
|
2023-07-25 13:47:48 +01:00
|
|
|
body.AttachmentList.DraftIds = ""
|
|
|
|
|
}
|
2023-09-06 21:23:21 +01:00
|
|
|
} catch (error) { }
|
|
|
|
|
|
2023-07-25 13:47:48 +01:00
|
|
|
|
2020-11-17 14:59:33 +01:00
|
|
|
const geturl = environment.apiURL + 'Processes/CreateParecer';
|
2021-07-13 11:15:19 +01:00
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2020-11-17 14:59:33 +01:00
|
|
|
};
|
2021-05-25 13:38:46 +01:00
|
|
|
return this.http.post<any>(`${geturl}`, body, options)
|
2020-11-17 14:59:33 +01:00
|
|
|
}
|
|
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
postParecerPr(body: any) {
|
|
|
|
|
try {
|
|
|
|
|
if (!body.AttachmentList) {
|
2023-07-25 13:47:48 +01:00
|
|
|
body.AttachmentList = {}
|
|
|
|
|
}
|
2023-09-06 21:23:21 +01:00
|
|
|
if (!body?.dataFields) {
|
2023-07-25 13:47:48 +01:00
|
|
|
body.dataFields = {}
|
|
|
|
|
}
|
2023-09-06 21:23:21 +01:00
|
|
|
if (!body.dataFields?.DraftIds) {
|
2023-07-25 13:47:48 +01:00
|
|
|
body.dataFields.DraftIds = ""
|
|
|
|
|
}
|
2023-09-06 21:23:21 +01:00
|
|
|
if (!body.AttachmentList?.DraftIds) {
|
2023-07-25 13:47:48 +01:00
|
|
|
body.AttachmentList.DraftIds = ""
|
|
|
|
|
}
|
2023-09-06 21:23:21 +01:00
|
|
|
} catch (error) { }
|
|
|
|
|
|
2023-07-25 13:47:48 +01:00
|
|
|
|
2021-05-25 16:07:26 +01:00
|
|
|
const geturl = environment.apiURL + 'Processes/CreateParecerPR';
|
2021-07-13 11:15:19 +01:00
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2021-05-25 16:07:26 +01:00
|
|
|
};
|
|
|
|
|
return this.http.post<any>(`${geturl}`, body, options)
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
postDeferimento(body: any) {
|
2020-11-17 14:59:33 +01:00
|
|
|
const geturl = environment.apiURL + 'Processes/CreateDeferimento';
|
2021-07-13 11:15:19 +01:00
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2020-11-17 14:59:33 +01:00
|
|
|
};
|
2021-05-25 13:38:46 +01:00
|
|
|
return this.http.post<any>(`${geturl}`, body, options)
|
2020-11-17 14:59:33 +01:00
|
|
|
}
|
|
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
GetActionsList() {
|
2020-12-09 12:10:19 +01:00
|
|
|
const geturl = environment.apiURL + 'presidentialActions';
|
2021-07-13 11:15:19 +01:00
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2020-12-09 12:10:19 +01:00
|
|
|
};
|
2023-09-06 21:23:21 +01:00
|
|
|
|
2021-07-13 11:15:19 +01:00
|
|
|
|
2020-12-09 12:10:19 +01:00
|
|
|
return this.http.get<any>(`${geturl}`, options);
|
|
|
|
|
}
|
2021-07-27 16:53:37 +01:00
|
|
|
|
2021-07-28 14:18:02 +01:00
|
|
|
GetSubjectType() {
|
2021-02-11 15:20:47 +01:00
|
|
|
const geturl = environment.apiURL + 'ecm/SubjectType';
|
2021-07-13 11:15:19 +01:00
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2021-02-11 15:20:47 +01:00
|
|
|
};
|
|
|
|
|
return this.http.get<any>(`${geturl}`, options);
|
|
|
|
|
}
|
2020-12-09 12:10:19 +01:00
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
GetDocumentDetails(DocId: string, FsId: string) {
|
2021-07-13 11:15:19 +01:00
|
|
|
|
2021-04-09 04:34:21 +01:00
|
|
|
const geturl = environment.apiURL + 'search/documents';
|
2021-04-08 01:56:11 +01:00
|
|
|
let params = new HttpParams();
|
|
|
|
|
|
|
|
|
|
params = params.set("docId", DocId);
|
2021-06-23 15:42:55 +01:00
|
|
|
params = params.set("applicationId", FsId);
|
2021-07-13 11:15:19 +01:00
|
|
|
|
|
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2021-07-13 11:15:19 +01:00
|
|
|
params: params
|
2021-04-08 01:56:11 +01:00
|
|
|
};
|
|
|
|
|
return this.http.get<any>(`${geturl}`, options);
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-29 10:13:39 +01:00
|
|
|
documentSetUpMeeting(body: DocumentSetUpMeeting) {
|
|
|
|
|
|
|
|
|
|
let url = environment.apiURL + 'Processes/CallMeeting';
|
2023-09-06 21:23:21 +01:00
|
|
|
url = url.replace('/V4/', '/V5/')
|
2021-07-27 16:53:37 +01:00
|
|
|
|
|
|
|
|
let options: any = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2021-07-27 16:53:37 +01:00
|
|
|
}
|
2023-09-06 21:23:21 +01:00
|
|
|
return this.http.post<any>(`${url}`, body, options);
|
2021-07-27 16:53:37 +01:00
|
|
|
}
|
|
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
DocumentDetail(DocId: string, FsId: string) {
|
2021-10-09 20:24:34 +01:00
|
|
|
|
|
|
|
|
const geturl = environment.apiURL + 'ecm/GetDocument';
|
|
|
|
|
let params = new HttpParams();
|
|
|
|
|
|
|
|
|
|
params = params.set("docId", DocId);
|
|
|
|
|
params = params.set("applicationId", FsId);
|
|
|
|
|
params = params.set("externalAppId ", 101);
|
|
|
|
|
params = params.set("SourceLocation ", 17);
|
|
|
|
|
|
|
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2021-10-09 20:24:34 +01:00
|
|
|
params: params
|
|
|
|
|
};
|
|
|
|
|
return this.http.get<any>(`${geturl}`, options);
|
|
|
|
|
}
|
|
|
|
|
|
2021-09-27 16:23:41 +01:00
|
|
|
getFileBase64(DocId: string | number) {
|
|
|
|
|
let url = environment.apiURL + 'ecm/document/file';
|
|
|
|
|
|
|
|
|
|
let params = new HttpParams();
|
|
|
|
|
|
|
|
|
|
params = params.set("docid", DocId);
|
|
|
|
|
|
|
|
|
|
let options: any = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2021-09-27 16:23:41 +01:00
|
|
|
params
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return this.http.get<any>(`${url}`, options);
|
|
|
|
|
}
|
|
|
|
|
|
2021-10-08 19:29:21 +01:00
|
|
|
|
|
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
GetViewer(DocId: string, FsId: string) {
|
2021-10-08 19:29:21 +01:00
|
|
|
|
|
|
|
|
const geturl = environment.apiURL + 'ecm/document/viewfile';
|
|
|
|
|
let params = new HttpParams();
|
|
|
|
|
|
|
|
|
|
params = params.set("docId", DocId);
|
|
|
|
|
params = params.set("applicationId", FsId);
|
|
|
|
|
|
|
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2021-10-08 19:29:21 +01:00
|
|
|
params: params
|
|
|
|
|
};
|
|
|
|
|
return this.http.get<any>(`${geturl}`, options);
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-30 14:02:14 +01:00
|
|
|
uploadFiles(file) {
|
|
|
|
|
const geturl = environment.apiURL + 'Tasks/AttachDocImage';
|
|
|
|
|
|
|
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2023-08-30 14:02:14 +01:00
|
|
|
};
|
2023-09-06 21:23:21 +01:00
|
|
|
return this.http.post<any>(`${geturl}`, file, options);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
createEventToAprove(calendarType, agenda, body) {
|
|
|
|
|
|
|
|
|
|
const geturl = environment.apiURL + 'Processes/CreateEvent/' + agenda;
|
|
|
|
|
let params = new HttpParams();
|
|
|
|
|
params = params.set('calendarName', calendarType);
|
|
|
|
|
let options = {
|
2024-12-05 19:14:11 +01:00
|
|
|
|
2023-09-06 21:23:21 +01:00
|
|
|
params: params
|
|
|
|
|
};
|
|
|
|
|
return this.http.post<any>(`${geturl}`, body, options);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
generateInstaceFormatDate(): string {
|
|
|
|
|
const data = new Date();
|
|
|
|
|
|
|
|
|
|
const ano = data.getFullYear().toString().padStart(4, '0');
|
|
|
|
|
const mes = (data.getMonth() + 1).toString().padStart(2, '0');
|
|
|
|
|
const dia = data.getDate().toString().padStart(2, '0');
|
|
|
|
|
|
|
|
|
|
const horas = data.getHours().toString().padStart(2, '0');
|
|
|
|
|
const minutos = data.getMinutes().toString().padStart(2, '0');
|
|
|
|
|
const segundos = data.getSeconds().toString().padStart(2, '0');
|
|
|
|
|
const milissegundos = data.getMilliseconds().toString().padStart(3, '0');
|
|
|
|
|
|
|
|
|
|
const dataFormatada = `${ano}-${mes}-${dia}_${horas}:${minutos}:${segundos}.${milissegundos}`;
|
|
|
|
|
|
|
|
|
|
return dataFormatada;
|
2023-08-30 14:02:14 +01:00
|
|
|
}
|
|
|
|
|
|
2020-08-21 00:22:51 +01:00
|
|
|
}
|