mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Improve
This commit is contained in:
@@ -217,7 +217,7 @@
|
||||
</div>
|
||||
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'MDGPR' ">Diplomas por Validar</p>
|
||||
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'PR'">Diplomas por Assinar</p>
|
||||
<p class="text-center exp-card-content">{{ deplomasStore.deplomasReviewCount }} <span class="title1">Documentos</span> </p>
|
||||
<p class="text-center exp-card-content">{{ deplomasStore.deplomasReviewCount }} bug <span class="title1">Documentos</span> </p>
|
||||
</div>
|
||||
|
||||
<div *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openDiplomasPage('assinados'); selectedElement='DiplomasAssinados'" [class.active]="selectedElement == 'DiplomasAssinados'" class="box-hover exp-card d-flex flex-column justify-center">
|
||||
|
||||
@@ -618,6 +618,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
|
||||
let diplomasAssinar = despachospr.filter(data => data.activityInstanceName == "Assinar Diploma");
|
||||
this.count_dip_as = Object.keys(diplomasAssinar).length;
|
||||
|
||||
this.deplomasStore.resetDiplomasList(diplomasAssinar)
|
||||
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ import { DateService } from '../date.service';
|
||||
export class ListBoxService {
|
||||
|
||||
constructor(
|
||||
private dateService: DateService
|
||||
){}
|
||||
private dateService: DateService
|
||||
){}
|
||||
|
||||
|
||||
filterProfile(eventSource: EventListStore[], profile: 'md' | 'pr' | 'all') {
|
||||
@@ -26,32 +26,34 @@ export class ListBoxService {
|
||||
})
|
||||
}
|
||||
|
||||
filterSegment(eventSource: EventListStore[], segment): EventListStore[] {
|
||||
return eventSource.filter( data => data.calendarName == segment)
|
||||
}
|
||||
|
||||
filterSegment(eventSource: EventListStore[], segment): EventListStore[] {
|
||||
return eventSource.filter( data => data.calendarName == segment)
|
||||
}
|
||||
|
||||
daysBetween(){ }
|
||||
|
||||
list(eventSource: EventListStore[], profile: 'md' | 'pr' | 'all', rangeStartDate, randEndDate, {segment = 'Combinado', selectedDate= null}) {
|
||||
|
||||
// filter range
|
||||
if(selectedDate) {
|
||||
eventSource = eventSource.filter(data =>
|
||||
data.startTime.toLocaleDateString('pt')>= selectedDate.toLocaleDateString('pt') &&
|
||||
data.endTime.toLocaleDateString('pt')>= selectedDate.toLocaleDateString('pt')
|
||||
)
|
||||
}
|
||||
// console.log('eventSource', eventSource ,'rangeStartDate', new Date(rangeStartDate).toLocaleDateString('pt') , 'randEndDate', new Date(randEndDate).toLocaleDateString('pt'))
|
||||
|
||||
if(segment!='Combinado') {
|
||||
eventSource = this.filterSegment(eventSource, segment)
|
||||
}
|
||||
// // filter range
|
||||
// if(selectedDate) {
|
||||
// eventSource = eventSource.filter(data =>
|
||||
// data.startTime.toLocaleDateString('pt') >= new Date(rangeStartDate).toLocaleDateString('pt') &&
|
||||
// data.startTime.toLocaleDateString('pt') <= new Date(rangeStartDate).toLocaleDateString('pt')
|
||||
// )
|
||||
// }
|
||||
|
||||
|
||||
if(segment!='Combinado') {
|
||||
eventSource = this.filterSegment(eventSource, segment)
|
||||
}
|
||||
|
||||
if(profile != 'all') {
|
||||
eventSource = this.filterProfile(eventSource, profile)
|
||||
}
|
||||
|
||||
let newStracture:CustomCalendarEvent[];
|
||||
let newStracture:CustomCalendarEvent[];
|
||||
|
||||
if(profile == 'md') {
|
||||
newStracture = this.encapsulation(eventSource, 'mdgpr');
|
||||
|
||||
@@ -31,7 +31,7 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
private router: Router,
|
||||
private sortService: SortService,
|
||||
public ThemeService: ThemeService
|
||||
) { }
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -56,30 +56,27 @@ export class DiplomasAssinarPage implements OnInit {
|
||||
doRefresh() {
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
//event.target.complete();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
async LoadList() {
|
||||
|
||||
|
||||
|
||||
this.skeletonLoader = true
|
||||
|
||||
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
this.diplomasList = new Array();
|
||||
this.skeletonLoader = false
|
||||
|
||||
console.log(diplomas);
|
||||
let diplomasAssinar = diplomas.reverse().filter(data => data.activityInstanceName == "Assinar Diploma");
|
||||
console.log(diplomasAssinar);
|
||||
|
||||
diplomasAssinar.forEach(element => {
|
||||
|
||||
let task: customTask = this.customTaskPipe.transform(element)
|
||||
this.diplomasList.push(task);
|
||||
this.deplomasStore.resetDiplomasList(this.sortService.sortArrayByDate(this.diplomasList));
|
||||
|
||||
});
|
||||
|
||||
this.deplomasStore.resetDiplomasList(this.diplomasList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user