diff --git a/src/app/models/CallMeeting.ts b/src/app/models/CallMeeting.ts new file mode 100644 index 000000000..d568b9e6f --- /dev/null +++ b/src/app/models/CallMeeting.ts @@ -0,0 +1,9 @@ +export class CallMeeting{ + Message: string; + Attachment: { + Source: number, + SourceId: string, + SourceName: string, + ApplicationId: number + } +} \ No newline at end of file diff --git a/src/app/services/processes.service.ts b/src/app/services/processes.service.ts index 0cbf7177d..0c8c1b51b 100644 --- a/src/app/services/processes.service.ts +++ b/src/app/services/processes.service.ts @@ -5,6 +5,7 @@ import { AuthService } from '../services/auth.service'; import { User } from '../models/user.model'; import { environment } from 'src/environments/environment'; import { Observable } from 'rxjs'; +import { CallMeeting } from '../models/CallMeeting'; @Injectable({ providedIn: 'root' @@ -49,6 +50,7 @@ export class ProcessesService { }; return this.http.get(`${geturl}`, options); } + SetTaskToPending(serialNumber:string): Observable{ const geturl = environment.apiURL + 'Tasks/SetTaskPending'; let params = new HttpParams(); @@ -239,7 +241,6 @@ export class ProcessesService { return this.http.post(`${geturl}`, body, options) } - GetActionsList(){ const geturl = environment.apiURL + 'presidentialActions'; let options = { @@ -249,6 +250,7 @@ export class ProcessesService { return this.http.get(`${geturl}`, options); } + GetSubjectType(){ const geturl = environment.apiURL + 'ecm/SubjectType'; let options = { @@ -272,4 +274,14 @@ export class ProcessesService { return this.http.get(`${geturl}`, options); } + CallMeeting(body: CallMeeting) { + const geturl = environment.apiURL + 'Processes/CallMeeting'; + + let options: any = { + headers: this.headers, + } + + return this.http.post(`${geturl}`,body, options); + } + } diff --git a/src/app/shared/agenda/view-event/view-event.page.ts b/src/app/shared/agenda/view-event/view-event.page.ts index 9e07f74d4..0ccdc960c 100644 --- a/src/app/shared/agenda/view-event/view-event.page.ts +++ b/src/app/shared/agenda/view-event/view-event.page.ts @@ -168,100 +168,41 @@ export class ViewEventPage implements OnInit { }); } - async openExpedientActionsModal(taskAction: any, task: any) { - let classs; - if( window.innerWidth <= 800){ - classs = 'modal modal-desktop' - } else { - classs = 'modal modal-desktop showAsideOptions' - } - - const doc = this.loadedAttachments[ this.dicIndex]; - - task = { - serialNumber: doc.SourceId, - taskStartDate: doc.CreateDate, - isEvent: true, - workflowInstanceDataFields: { - FsId: doc.ApplicationId, - FolderID: null, - DocId: doc.SourceId, - Subject: doc.SourceName - }, - } - - const modal = await this.modalController.create({ - component: ExpedientTaskModalPage, - componentProps: { - taskAction: taskAction, - task: task, - profile: this.profile, - }, - cssClass: classs, - }); - await modal.present(); - modal.onDidDismiss().then(res=>{ - console.log(res['data']); - if(res['data']=='openDiscart'){ - console.log('open discart'); - - // this.distartExpedientModal(); - - } - - }); - } - - async openBookMeetingModal(task: any) { - - const doc = this.loadedAttachments[ this.dicIndex]; - - const Customtask = { - serialNumber: doc.SourceId, - taskStartDate: doc.CreateDate, - isEvent: true, - workflowInstanceDataFields: { - FsId: doc.ApplicationId, - FolderID: null, - DocId: doc.SourceId, - Subject: doc.SourceName - }, - } - - let classs; - if( window.innerWidth <= 800){ - classs = 'book-meeting-modal modal modal-desktop' - } else { - classs = 'modal modal-desktop showAsideOptions' - } - const modal = await this.modalController.create({ - component: BookMeetingModalPage, - componentProps: { - task: task, - }, - cssClass: classs, - backdropDismiss: false - }); - await modal.present(); - modal.onDidDismiss(); - } - async openTaskOptions() { const doc = this.loadedAttachments[ this.dicIndex]; - let customTask = { - serialNumber: doc.SourceId, - taskStartDate: doc.CreateDate, - isEvent: true, - workflowInstanceDataFields: { - FsId: doc.ApplicationId, - FolderID: null, - DocId: doc.SourceId, - Subject: doc.SourceName - }, + let customTask; + + if(doc.ApplicationID == 361 || doc.ApplicationId == 361) { + customTask = { + serialNumber: doc.DispatchNumber, + taskStartDate: doc.DateDispatch, + isEvent: true, + workflowInstanceDataFields: { + FsId: doc.ApplicationID, + FolderID: null, + DocId: doc.DispatchNumber, + Subject: doc.Assunto + }, + } + } else if (doc.ApplicationID == 8 || doc.ApplicationId == 8) { + customTask = { + serialNumber: doc.DocId, + taskStartDate: doc.DocDate, + isEvent: true, + workflowInstanceDataFields: { + FsId: doc.ApplicationID || doc.ApplicationId, + FolderID: null, + DocId: doc.DocId, + Subject: doc.Assunto + } + } } + console.log(doc) + customTask.Status = '' + const popover = await this.modalController.create({ component: OptsExpedientePage, cssClass: 'model aside-modal search-submodal', diff --git a/src/app/shared/popover/opts-expediente/opts-expediente.page.ts b/src/app/shared/popover/opts-expediente/opts-expediente.page.ts index 47bd03dd9..a7abed3f6 100644 --- a/src/app/shared/popover/opts-expediente/opts-expediente.page.ts +++ b/src/app/shared/popover/opts-expediente/opts-expediente.page.ts @@ -104,7 +104,6 @@ export class OptsExpedientePage implements OnInit { } } - sendExpedienteToPending() { this.close(); this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{ @@ -136,6 +135,10 @@ export class OptsExpedientePage implements OnInit { } async openExpedientActionsModal(taskAction: any, task: any) { + + alert('save') + console.log(taskAction, task) + this.close(); let classs; if( window.innerWidth <= 800){ diff --git a/src/app/store/to-day-event-storage.service.ts b/src/app/store/to-day-event-storage.service.ts index 299865b2d..c28c671a5 100644 --- a/src/app/store/to-day-event-storage.service.ts +++ b/src/app/store/to-day-event-storage.service.ts @@ -20,7 +20,7 @@ export class ToDayEventStorageService { this.keyName = (SHA1(this.constructor.name+ 'home/eventSource')).toString() - setTimeout(()=>{ + setTimeout(() => { let restore = localstoreService.get(this.keyName, {}) this._eventsList = restore.eventsList || [] this._count = this._eventsList.length || 0