mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
cover page filter add to task-details for expediente only
This commit is contained in:
@@ -8,6 +8,10 @@ import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expedient
|
|||||||
import { ModalController } from '@ionic/angular';
|
import { ModalController } from '@ionic/angular';
|
||||||
import { DocumentSetUpMeetingPage } from 'src/app/modals/document-set-up-meeting/document-set-up-meeting.page';
|
import { DocumentSetUpMeetingPage } from 'src/app/modals/document-set-up-meeting/document-set-up-meeting.page';
|
||||||
import { HeaderSettingsService } from "src/app/services/header-settings.service"
|
import { HeaderSettingsService } from "src/app/services/header-settings.service"
|
||||||
|
import { SessionStore } from 'src/app/store/session.service';
|
||||||
|
import { LoginUserRespose } from 'src/app/models/user.model';
|
||||||
|
import { object } from 'zod';
|
||||||
|
import { element } from 'protractor';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-task-details',
|
selector: 'app-task-details',
|
||||||
@@ -28,7 +32,8 @@ export class TaskDetailsPage implements OnInit {
|
|||||||
@Output() viewDocument = new EventEmitter<any>();
|
@Output() viewDocument = new EventEmitter<any>();
|
||||||
|
|
||||||
selectedIndex = 0
|
selectedIndex = 0
|
||||||
dropButton = true
|
dropButton = true
|
||||||
|
loggeduser: LoginUserRespose;
|
||||||
constructor(
|
constructor(
|
||||||
public ThemeService: ThemeService,
|
public ThemeService: ThemeService,
|
||||||
public DeviceService: DeviceService,
|
public DeviceService: DeviceService,
|
||||||
@@ -38,14 +43,19 @@ export class TaskDetailsPage implements OnInit {
|
|||||||
private HeaderSettingsService: HeaderSettingsService
|
private HeaderSettingsService: HeaderSettingsService
|
||||||
) {
|
) {
|
||||||
this.DeviceService.isDesktop();
|
this.DeviceService.isDesktop();
|
||||||
|
this.loggeduser = SessionStore.user
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
window['TaskDetailsPage-openExpedientActionsModal']= (taskAction, Document) => {
|
|
||||||
|
this.filterCoverPage();
|
||||||
|
|
||||||
|
window['TaskDetailsPage-openExpedientActionsModal'] = (taskAction, Document) => {
|
||||||
this.openExpedientActionsModal(taskAction, Document)
|
this.openExpedientActionsModal(taskAction, Document)
|
||||||
}
|
}
|
||||||
|
|
||||||
window['TaskDetailsPage-openBookMeetingModal']= (Document) => {
|
window['TaskDetailsPage-openBookMeetingModal'] = (Document) => {
|
||||||
this.openBookMeetingModal(Document)
|
this.openBookMeetingModal(Document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -67,12 +77,12 @@ export class TaskDetailsPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async openExpedientActionsModal( taskAction: any, Document) {
|
async openExpedientActionsModal(taskAction: any, Document) {
|
||||||
|
|
||||||
let classs;
|
let classs;
|
||||||
if( window.innerWidth < 701) {
|
if (window.innerWidth < 701) {
|
||||||
classs = 'modal modal-desktop'
|
classs = 'modal modal-desktop'
|
||||||
} else {
|
} else {
|
||||||
classs = 'modal modal-desktop showAsideOptions'
|
classs = 'modal modal-desktop showAsideOptions'
|
||||||
}
|
}
|
||||||
// check passing
|
// check passing
|
||||||
@@ -84,7 +94,7 @@ export class TaskDetailsPage implements OnInit {
|
|||||||
task: this.fulltask, // check
|
task: this.fulltask, // check
|
||||||
document: Document, // nope
|
document: Document, // nope
|
||||||
aplicationId: Document.ApplicationId || Document.ApplicationID, // check
|
aplicationId: Document.ApplicationId || Document.ApplicationID, // check
|
||||||
applicationId: Document.ApplicationId || Document.ApplicationID,
|
applicationId: Document.ApplicationId || Document.ApplicationID,
|
||||||
docId: Document.docId || Document.DocId,
|
docId: Document.docId || Document.DocId,
|
||||||
createProcessFromFile: true,
|
createProcessFromFile: true,
|
||||||
},
|
},
|
||||||
@@ -92,7 +102,7 @@ export class TaskDetailsPage implements OnInit {
|
|||||||
});
|
});
|
||||||
|
|
||||||
modal.onDidDismiss().then(
|
modal.onDidDismiss().then(
|
||||||
async(res) => {}
|
async (res) => { }
|
||||||
, (error) => {
|
, (error) => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}
|
}
|
||||||
@@ -105,9 +115,9 @@ export class TaskDetailsPage implements OnInit {
|
|||||||
async openBookMeetingModal(Document) {
|
async openBookMeetingModal(Document) {
|
||||||
//console.log('this.Document----------', this.Document)
|
//console.log('this.Document----------', this.Document)
|
||||||
let classs;
|
let classs;
|
||||||
if( window.innerWidth < 701) {
|
if (window.innerWidth < 701) {
|
||||||
classs = 'book-meeting-modal modal modal-desktop'
|
classs = 'book-meeting-modal modal modal-desktop'
|
||||||
} else {
|
} else {
|
||||||
classs = 'modal modal-desktop showAsideOptions'
|
classs = 'modal modal-desktop showAsideOptions'
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,4 +149,17 @@ export class TaskDetailsPage implements OnInit {
|
|||||||
onOndestroy() {
|
onOndestroy() {
|
||||||
this.HeaderSettingsService.hideHeader == false
|
this.HeaderSettingsService.hideHeader == false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
filterCoverPage() {
|
||||||
|
/* Method that filter the cover page of PR expediente */
|
||||||
|
if (this.loggeduser.Profile == 'PR' && this.task.WorkflowName == "Expediente") {
|
||||||
|
try {
|
||||||
|
console.log('Merge array 1', this.mergedArray)
|
||||||
|
this.mergedArray = this.mergedArray.filter(element => element!.DocTypeId != 99999992);
|
||||||
|
console.log('Merge array 2', this.mergedArray)
|
||||||
|
} catch (error) {
|
||||||
|
console.info('error filtering cover page', error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user