mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
pull made
This commit is contained in:
@@ -93,20 +93,21 @@
|
||||
<ion-list class="width-100 height-100" >
|
||||
<div class="overflow-y-auto height-100">
|
||||
<ion-item-sliding>
|
||||
<ion-item class="Rectangle cursor-pointer " lines="none"
|
||||
*ngFor="let event of eventoaprovacaostore.get(segment)" (click)="goToEventToApproveDetail(event.serialNumber)">
|
||||
|
||||
<div class="content-{{color}}-{{event.workflowInstanceDataFields.Agenda}} width-100 d-flex overflow-hidden">
|
||||
<div class="approve-event-time">
|
||||
<p>{{event.workflowInstanceDataFields.StartDate | date: 'HH:mm'}}</p>
|
||||
<p>{{event.workflowInstanceDataFields.EndDate | date: 'HH:mm'}}</p>
|
||||
</div>
|
||||
<div class="approve-event-detail">
|
||||
<p *ngIf="event.workflowInstanceDataFields.StartDate != event.workflowInstanceDataFields.EndDate">{{event.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} - {{ event.workflowInstanceDataFields.EndDate | date: 'dd/M/yy'}} | {{event.workflowInstanceDataFields.Location}}</p>
|
||||
<p *ngIf="event.workflowInstanceDataFields.StartDate == event.workflowInstanceDataFields.EndDate">{{event.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} | {{event.workflowInstanceDataFields.Location}}</p>
|
||||
<h3>{{event.workflowInstanceDataFields.Subject}}</h3>
|
||||
<div *ngIf="event.activityInstanceName">
|
||||
<div class="label-event-type font-13-rem"> {{ event.activityInstanceName }} </div>
|
||||
<ion-item class="cursor-pointer " lines="none"
|
||||
*ngFor="let event of list" (click)="goToEventToApproveDetail(event.serialNumber)">
|
||||
<div *ngIf="TaskService.filter(event, filterName)" class="Rectangle ">
|
||||
<div class="fix-temp content-{{color}}-{{event.workflowInstanceDataFields.Agenda}} width-100 d-flex overflow-hidden">
|
||||
<div class="approve-event-time">
|
||||
<p>{{event.workflowInstanceDataFields.StartDate | date: 'HH:mm'}}</p>
|
||||
<p>{{event.workflowInstanceDataFields.EndDate | date: 'HH:mm'}}</p>
|
||||
</div>
|
||||
<div class="approve-event-detail">
|
||||
<p *ngIf="event.workflowInstanceDataFields.StartDate != event.workflowInstanceDataFields.EndDate">{{event.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} - {{ event.workflowInstanceDataFields.EndDate | date: 'dd/M/yy'}} | {{event.workflowInstanceDataFields.Location}}</p>
|
||||
<p *ngIf="event.workflowInstanceDataFields.StartDate == event.workflowInstanceDataFields.EndDate">{{event.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} | {{event.workflowInstanceDataFields.Location}}</p>
|
||||
<h3>{{event.workflowInstanceDataFields.Subject}}</h3>
|
||||
<div *ngIf="event.activityInstanceName">
|
||||
<div class="label-event-type font-13-rem"> {{ event.activityInstanceName }} </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -120,7 +121,7 @@
|
||||
<div class="height-100" >
|
||||
<div class="d-flex height-100 align-center justify-content-center" >
|
||||
<div
|
||||
*ngIf="!skeletonLoader && (eventoaprovacaostore.get(segment).length == 0)"
|
||||
*ngIf="!skeletonLoader && (list.length == 0)"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
>
|
||||
<span>Lista vazia</span>
|
||||
|
||||
@@ -49,7 +49,9 @@ ion-item-sliding{
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.content-pr-Oficial{
|
||||
background-color: var(--white);
|
||||
border-radius: 5px;
|
||||
|
||||
@@ -6,7 +6,7 @@ import { ModalController } from '@ionic/angular';
|
||||
import { ApproveEventModalPage } from './approve-event-modal/approve-event-modal.page';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { EventoAprovacaoStore } from 'src/app/store/eventoaprovacao-store.service';
|
||||
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
import { BackgroundService } from '../../../services/background.service';
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
@@ -26,8 +26,6 @@ export class EventListPage implements OnInit {
|
||||
profile: string;
|
||||
segment: any;
|
||||
showLoader: boolean;
|
||||
eventsPRList: any = [];
|
||||
eventsMDGPRList: any = [];
|
||||
eventPerson: EventPerson;
|
||||
eventBody: EventBody;
|
||||
categories: string[];
|
||||
@@ -35,7 +33,6 @@ export class EventListPage implements OnInit {
|
||||
|
||||
skeletonLoader = true
|
||||
eventoaprovacaostore = EventoAprovacaoStore;
|
||||
eventsList: any = []
|
||||
color: 'pr' | 'mdgpr'
|
||||
environment = environment
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
@@ -46,6 +43,10 @@ export class EventListPage implements OnInit {
|
||||
list = []
|
||||
ordinance: string = 'old'
|
||||
|
||||
listSubscription : {
|
||||
delete(): void;
|
||||
}
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
private modalController: ModalController,
|
||||
@@ -55,6 +56,7 @@ export class EventListPage implements OnInit {
|
||||
public ThemeService: ThemeService,
|
||||
private RouteService: RouteService,
|
||||
public eventService: EventsService,
|
||||
public TaskService: TaskService,
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
@@ -80,6 +82,15 @@ export class EventListPage implements OnInit {
|
||||
}
|
||||
})
|
||||
|
||||
this.listSubscription = this.eventoaprovacaostore.registerCallback({
|
||||
id: import.meta.url,
|
||||
funx:() => {
|
||||
|
||||
this.dynamicSearch()
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
const location = window.location
|
||||
@@ -110,6 +121,12 @@ export class EventListPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
ngOnDestroy() {
|
||||
this.listSubscription.delete()
|
||||
}
|
||||
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
|
||||
|
||||
@@ -119,7 +136,27 @@ export class EventListPage implements OnInit {
|
||||
|
||||
this.ordinance = orderBy;
|
||||
|
||||
// this.dynamicSearch();
|
||||
this.dynamicSearch();
|
||||
}
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
const list = this.eventoaprovacaostore.get(this.segment).filter((task) => {
|
||||
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
|
||||
subject = subject.toLowerCase();
|
||||
return subject.includes(this.searchSubject.toLowerCase())
|
||||
})
|
||||
|
||||
this.list = this.TaskService.reorderList(this.ordinance, list)
|
||||
} else {
|
||||
const list = this.eventoaprovacaostore.get(this.segment)
|
||||
|
||||
this.list = this.TaskService.reorderList(this.ordinance, list)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -141,30 +178,33 @@ export class EventListPage implements OnInit {
|
||||
this.color = 'mdgpr'
|
||||
}
|
||||
|
||||
let eventsList
|
||||
let genericEvents = await this.processes.eventsToApprove(SessionStore.user.UserId,'mobile agenda').toPromise()
|
||||
try {
|
||||
this.eventsList = this.sortService.sortArrayByDate(genericEvents).reverse();
|
||||
eventsList = this.sortService.sortArrayByDate(genericEvents).reverse();
|
||||
} catch (error) {
|
||||
this.skeletonLoader = false
|
||||
this.eventsList = [];
|
||||
eventsList = [];
|
||||
}
|
||||
|
||||
this.eventoaprovacaostore.save(segment, this.eventsList)
|
||||
this.eventoaprovacaostore.save(segment, eventsList as any)
|
||||
this.dynamicSearch()
|
||||
|
||||
} else if(segment) {
|
||||
|
||||
this.color = 'pr'
|
||||
let eventsList = []
|
||||
let allEvents = await this.processes.eventsToApprove(segment,'mobile agenda').toPromise()
|
||||
try {
|
||||
this.eventsList = this.sortService.sortArrayByDate(allEvents).reverse();
|
||||
eventsList = this.sortService.sortArrayByDate(allEvents).reverse();
|
||||
} catch(error) {
|
||||
this.skeletonLoader = false
|
||||
this.eventsList = []
|
||||
eventsList = []
|
||||
}
|
||||
|
||||
this.eventsList = this.eventsList
|
||||
this.showLoader = false;
|
||||
this.eventoaprovacaostore.save(segment, this.eventsList)
|
||||
this.eventoaprovacaostore.save(segment, eventsList)
|
||||
this.dynamicSearch()
|
||||
}
|
||||
|
||||
this.showLoader = false;
|
||||
|
||||
+3
-1
@@ -161,6 +161,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
}]
|
||||
}
|
||||
|
||||
this.changeAgenda();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -319,11 +320,12 @@ export class BookMeetingModalPage implements OnInit {
|
||||
|
||||
}
|
||||
else if(this.task.FsId == '361') {
|
||||
|
||||
console.log('361')
|
||||
const loader = this.toastService.loading()
|
||||
try {
|
||||
|
||||
const CalendarId = this.selectedCalendarId()
|
||||
console.log({CalendarId})
|
||||
await this.calendarService.genericCreateTaskEvent(this.task.FolderID | this.task.FolderId, this.postData, "",this.task.SerialNumber, this.task.FsId, CalendarId).toPromise();
|
||||
|
||||
this.close();
|
||||
|
||||
@@ -112,6 +112,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
window.onresize = (event) => {
|
||||
if (window.innerWidth < 701) {
|
||||
this.modalController.dismiss();
|
||||
this.hideRefreshBtn = false;
|
||||
this.hideInMobile = false;
|
||||
this.segmentVista = "listview";
|
||||
@@ -197,6 +198,14 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
this.hideRefreshButton();
|
||||
|
||||
}
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
// We can access the TestComponent now that this portion of the view tree has been initiated.
|
||||
const element = this.scroll.nativeElement
|
||||
this.scroll.nativeElement.addEventListener("scroll", (e)=> {
|
||||
this.changeTab()
|
||||
});
|
||||
|
||||
|
||||
(async () => {
|
||||
@@ -236,15 +245,6 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
// We can access the TestComponent now that this portion of the view tree has been initiated.
|
||||
this.scroll.nativeElement.addEventListener("scroll", (e)=> {
|
||||
this.changeTab()
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user