mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
|
||||
<div>
|
||||
<!-- Calendar is here -->
|
||||
|
||||
<div class="calendar-segment-{{profile}}" [class.calendar-segment-pr-force]="loggeduser.Profile =='PR'">
|
||||
<div class="calendar-container" [style.height]="calendarHeight">
|
||||
|
||||
@@ -44,7 +45,7 @@
|
||||
|
||||
</h2>
|
||||
|
||||
<div class="dropdown-scroll-weel" *ngIf="dropdownScrollWeal">
|
||||
<div class="dropdown-scroll-weel" *ngIf="dropdownScrollWeal" >
|
||||
<div class="flex-grow-1 height-100 overflow-y-auto">
|
||||
<ul>
|
||||
<li (click)="changeMonth(0)" [class.active]="monthNum==0" ><span>Jan</span></li>
|
||||
@@ -137,7 +138,7 @@
|
||||
|
||||
<calendar
|
||||
class="calendar-component"
|
||||
[eventSource]="calendarService.eventSource"
|
||||
[eventSource]="CalendarStore.eventSource"
|
||||
[calendarMode]="calendar.mode"
|
||||
[currentDate]="calendar.currentDate"
|
||||
(onEventSelected)="onEventSelected($event)"
|
||||
@@ -223,7 +224,6 @@
|
||||
|
||||
</div>
|
||||
<div class="timeline-wrapper flex-grow-1 height-100" >
|
||||
|
||||
<!-- Timeline -->
|
||||
|
||||
<div class="height-100">
|
||||
@@ -412,6 +412,25 @@
|
||||
(setIntervenientCC)="setIntervenientCC($event)"
|
||||
></app-edit-event>
|
||||
|
||||
<!-- Edit event to approve -->
|
||||
<app-edit-event-to-approve
|
||||
class="d-flex flex-column height-100"
|
||||
*ngIf="mobileComponent.showEditEventToApprove"
|
||||
[taskParticipants]="taskParticipants"
|
||||
[taskParticipantsCc]="taskParticipantsCc"
|
||||
[saveData] = "eventToaprove.saveData"
|
||||
[serialNumber] = "eventToaprove.serialNumber"
|
||||
(setContact)="setContact($event)"
|
||||
(clearContact)="clearContact()"
|
||||
(openAttendeesComponent)="openAttendeesComponent($event)"
|
||||
(closeComponent)="approveEventDismissGoBack()"
|
||||
(setIntervenient)="setIntervenient($event)"
|
||||
(setIntervenientCC)="setIntervenientCC($event)"
|
||||
|
||||
(closeEventToApprove)="closeEventToApproveGoBack()"
|
||||
></app-edit-event-to-approve>
|
||||
|
||||
|
||||
<!-- View -->
|
||||
<app-view-event *ngIf="mobileComponent.showEventDetails"
|
||||
[profile]="profile"
|
||||
@@ -446,24 +465,6 @@
|
||||
>
|
||||
</app-approve-event>
|
||||
|
||||
<!-- Edit event to approve -->
|
||||
<app-edit-event-to-approve
|
||||
class="d-flex flex-column height-100"
|
||||
*ngIf="mobileComponent.showEditEventToApprove"
|
||||
[taskParticipants]="taskParticipants"
|
||||
[taskParticipantsCc]="taskParticipantsCc"
|
||||
[saveData] = "eventToaprove.saveData"
|
||||
[serialNumber] = "eventToaprove.serialNumber"
|
||||
(setContact)="setContact($event)"
|
||||
(clearContact)="clearContact()"
|
||||
(openAttendeesComponent)="openAttendeesComponent($event)"
|
||||
(closeComponent)="approveEventDismissGoBack()"
|
||||
(setIntervenient)="setIntervenient($event)"
|
||||
(setIntervenientCC)="setIntervenientCC($event)"
|
||||
|
||||
|
||||
(closeEventToApprove)="closeEventToApproveGoBack()"
|
||||
></app-edit-event-to-approve>
|
||||
|
||||
<app-attendee-modal
|
||||
[footer]="true"
|
||||
|
||||
@@ -25,8 +25,9 @@ import { LoginUserRespose } from 'src/app/models/user.model';
|
||||
import { DateAdapter } from '@angular/material/core';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { eventSource } from 'src/app/models/agenda/eventSource';
|
||||
import { CalendarService } from 'src/app/store/calendar.service';
|
||||
import { CalendarStore } from 'src/app/store/calendar.service';
|
||||
import { ListBoxService } from 'src/app/services/agenda/list-box.service';
|
||||
import { ChangeProfileService } from 'src/app/services/change-profile.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-agenda',
|
||||
@@ -102,8 +103,8 @@ export class AgendaPage implements OnInit {
|
||||
postEvent: any;
|
||||
|
||||
// temporary data
|
||||
taskParticipants: any = [];
|
||||
taskParticipantsCc: any = [];
|
||||
taskParticipants: any[] = [];
|
||||
taskParticipantsCc: any[] = [];
|
||||
adding: "intervenient" | "CC" = "intervenient";
|
||||
|
||||
@ViewChild(CalendarComponent) myCal: CalendarComponent;
|
||||
@@ -153,6 +154,7 @@ export class AgendaPage implements OnInit {
|
||||
yearNum;
|
||||
|
||||
dropdownScrollWeal = false
|
||||
CalendarStore = CalendarStore
|
||||
|
||||
constructor(
|
||||
private alertCtrl: AlertController,
|
||||
@@ -165,14 +167,31 @@ export class AgendaPage implements OnInit {
|
||||
authService: AuthService,
|
||||
private dateAdapter: DateAdapter<any>,
|
||||
private toastService: ToastService,
|
||||
public calendarService: CalendarService,
|
||||
private listBoxService: ListBoxService
|
||||
private listBoxService: ListBoxService,
|
||||
private changeProfileService: ChangeProfileService
|
||||
) {
|
||||
this.dateAdapter.setLocale('es');
|
||||
|
||||
this.dateAdapter.setLocale('es');
|
||||
this.locale = 'pt'
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
this.changeProfileService.registerCallback(()=>{
|
||||
this.tigerUpdate()
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
this.mobileComponent.showEventList = true;
|
||||
this.profile = "mdgpr";
|
||||
} else {
|
||||
this.profile = "pr";
|
||||
}
|
||||
})
|
||||
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
this.mobileComponent.showEventList = true;
|
||||
this.profile = "mdgpr";
|
||||
} else {
|
||||
this.profile = "pr";
|
||||
}
|
||||
|
||||
this.calendarHeight = "320px";
|
||||
this.showCalendar = true;
|
||||
@@ -182,10 +201,14 @@ export class AgendaPage implements OnInit {
|
||||
this.showTimelineFilterState = false;
|
||||
this.showTimeline = false;
|
||||
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
this.mobileComponent.showEventList = true;
|
||||
}
|
||||
|
||||
this.tigerUpdate()
|
||||
|
||||
window['year'] = this.changeYear
|
||||
|
||||
}
|
||||
|
||||
tigerUpdate() {
|
||||
setTimeout(()=>{
|
||||
try {
|
||||
this.myCal.update();
|
||||
@@ -195,15 +218,10 @@ export class AgendaPage implements OnInit {
|
||||
this.updateEventListBox()
|
||||
|
||||
}, 1000)
|
||||
|
||||
|
||||
window['year'] = this.changeYear
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.profile = "mdgpr";
|
||||
|
||||
const pathname = window.location.pathname
|
||||
|
||||
@@ -481,12 +499,12 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
|
||||
// calendar
|
||||
this.calendarService.removeRange(startTime, endTime, 'md')
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'md')
|
||||
|
||||
// loop
|
||||
this.calendarService.pushEvent(response, 'md');
|
||||
this.CalendarStore.pushEvent(response, 'md');
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -503,11 +521,11 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
this.eventService.getAllSharedEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((response:any) => {
|
||||
|
||||
this.calendarService.removeRange(startTime, endTime, 'pr')
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'pr')
|
||||
// calendar
|
||||
this.calendarService.pushEvent(response, 'pr');
|
||||
this.CalendarStore.pushEvent(response, 'pr');
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -528,12 +546,12 @@ export class AgendaPage implements OnInit {
|
||||
// this.eventSource=[];
|
||||
|
||||
// clear the current month only
|
||||
this.calendarService.removeRange(startTime, endTime, 'pr')
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'pr')
|
||||
|
||||
this.calendarService.pushEvent(response, 'pr');
|
||||
this.CalendarStore.pushEvent(response, 'pr');
|
||||
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
|
||||
this.myCal.update();
|
||||
@@ -554,14 +572,14 @@ export class AgendaPage implements OnInit {
|
||||
if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR') {
|
||||
this.eventService.getAllMdPessoalEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((response:any) => {
|
||||
|
||||
this.calendarService.removeRange(startTime, endTime, 'md')
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'md')
|
||||
|
||||
const eventsList = response.filter(data => data.CalendarName == "Pessoal");
|
||||
// loop
|
||||
this.calendarService.pushEvent(eventsList, 'md');
|
||||
this.CalendarStore.pushEvent(eventsList, 'md');
|
||||
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -576,12 +594,12 @@ export class AgendaPage implements OnInit {
|
||||
else{
|
||||
this.eventService.getAllPrEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((response:any) => {
|
||||
|
||||
this.calendarService.removeRange(startTime, endTime, 'pr')
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'pr')
|
||||
|
||||
const eventsList = response.filter(data => data.CalendarName == "Pessoal");
|
||||
this.calendarService.pushEvent(eventsList, 'pr');
|
||||
this.CalendarStore.pushEvent(eventsList, 'pr');
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -603,14 +621,14 @@ export class AgendaPage implements OnInit {
|
||||
if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR') {
|
||||
this.eventService.getAllMdEvents(momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59')).then((res:any) => {
|
||||
|
||||
this.calendarService.removeRange(startTime, endTime, 'md')
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'md')
|
||||
|
||||
const eventsList = res.filter(data => data.CalendarName == "Oficial");
|
||||
|
||||
this.calendarService.pushEvent(eventsList, 'md');
|
||||
this.CalendarStore.pushEvent(eventsList, 'md');
|
||||
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {})
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {})
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -626,13 +644,13 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
// this.eventSource=[];
|
||||
|
||||
this.calendarService.removeRange(startTime, endTime, 'pr')
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'pr')
|
||||
|
||||
const eventsList = res.filter(data => data.CalendarName == "Oficial");
|
||||
this.calendarService.pushEvent(eventsList, 'pr');
|
||||
this.CalendarStore.pushEvent(eventsList, 'pr');
|
||||
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -658,12 +676,12 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
let eventsList = response;
|
||||
|
||||
this.calendarService.removeRange(startTime, endTime, 'md')
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'md')
|
||||
|
||||
// loop
|
||||
this.calendarService.pushEvent(eventsList, 'md');
|
||||
this.CalendarStore.pushEvent(eventsList, 'md');
|
||||
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -688,11 +706,11 @@ export class AgendaPage implements OnInit {
|
||||
let eventsList = response;
|
||||
|
||||
// clear the current month only
|
||||
this.calendarService.removeRange(startTime, endTime, 'pr')
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'pr')
|
||||
|
||||
this.calendarService.pushEvent(eventsList, 'pr');
|
||||
this.CalendarStore.pushEvent(eventsList, 'pr');
|
||||
|
||||
this.TimelinePRList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
this.TimelinePRList = this.listBoxService.list(this.CalendarStore.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
@@ -726,11 +744,11 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
|
||||
// clear the current month only
|
||||
this.calendarService.removeRange(startTime, endTime, 'pr')
|
||||
this.CalendarStore.removeRange(startTime, endTime, 'pr')
|
||||
|
||||
this.calendarService.pushEvent(eventsList, 'pr');
|
||||
this.CalendarStore.pushEvent(eventsList, 'pr');
|
||||
|
||||
this.TimelinePRList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
this.TimelinePRList = this.listBoxService.list(this.CalendarStore.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
|
||||
this.myCal.update();
|
||||
@@ -757,8 +775,8 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
updateEventListBox() {
|
||||
|
||||
this.TimelinePRList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
this.TimelinePRList = this.listBoxService.list(this.CalendarStore.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
}
|
||||
|
||||
@@ -841,13 +859,13 @@ export class AgendaPage implements OnInit {
|
||||
if(this.profile == "mdgpr") {
|
||||
this.profile ="pr";
|
||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
|
||||
}
|
||||
else {
|
||||
this.profile ="mdgpr";
|
||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
this.TimelineMDList = this.listBoxService.list(this.CalendarStore.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, {segment:this.segment, selectedDate: this.eventSelectedDate})
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1026,6 +1044,9 @@ export class AgendaPage implements OnInit {
|
||||
EditApproveEventDismiss() {
|
||||
this.cloneAllmobileComponent();
|
||||
this.mobileComponent.showEditEventToApprove = true;
|
||||
|
||||
this.taskParticipants = []
|
||||
this.taskParticipantsCc = []
|
||||
}
|
||||
|
||||
async cloneAllmobileComponent() {
|
||||
@@ -1105,12 +1126,18 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
|
||||
async setIntervenient(data) {
|
||||
this.taskParticipants = removeDuplicate(data)
|
||||
|
||||
setTimeout(()=>{
|
||||
this.taskParticipants = removeDuplicate(data)
|
||||
}, 10)
|
||||
|
||||
}
|
||||
|
||||
async setIntervenientCC(data) {
|
||||
this.taskParticipantsCc = removeDuplicate(data)
|
||||
setTimeout(()=>{
|
||||
this.taskParticipantsCc = removeDuplicate(data)
|
||||
}, 10)
|
||||
|
||||
}
|
||||
|
||||
// Emitters
|
||||
|
||||
@@ -108,10 +108,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <pdf-viewer [src]=pdfSrc
|
||||
[render-text]="true"
|
||||
style="display: block;"
|
||||
></pdf-viewer> -->
|
||||
|
||||
</ion-content>
|
||||
|
||||
@@ -122,6 +122,7 @@ export class EventsPage implements OnInit {
|
||||
this.hideSearch();
|
||||
|
||||
//this.checkScreenOrientation();
|
||||
|
||||
}
|
||||
|
||||
hideSearch(){
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
|
||||
<!-- This is the box view -->
|
||||
<div *ngSwitchCase="'boxview'" class="aside overflow-y-auto d-flex flex-wrap width-100 height-100">
|
||||
|
||||
<div *ngIf="hideInMobile" (click)="openAllProcessesPage()" [class.active]="selectedElement == 'allProcessesTag'" class="box-hover exp-card d-flex flex-column" >
|
||||
<div class="d-flex justify-center">
|
||||
<!-- <ion-icon src="assets/images/icons-agenda.svg"></ion-icon> -->
|
||||
|
||||
@@ -21,6 +21,7 @@ import { DeplomasStore } from 'src/app/store/deplomas.service';
|
||||
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
|
||||
import { NotificationsService } from 'src/app/services/notifications.service';
|
||||
import { DespachoService } from 'src/app/Rules/despacho.service';
|
||||
import { ChangeProfileService } from 'src/app/services/change-profile.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-gabinete-digital',
|
||||
@@ -118,10 +119,13 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
public p: PermissionService,
|
||||
public waitForDomService: WaitForDomService,
|
||||
private notificationsService: NotificationsService,
|
||||
private despachoRule: DespachoService
|
||||
private despachoRule: DespachoService,
|
||||
private changeProfileService: ChangeProfileService
|
||||
) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
|
||||
|
||||
window.onresize = (event) => {
|
||||
// if not mobile remove all component
|
||||
if( window.innerWidth < 701){
|
||||
@@ -202,7 +206,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
allProcessesList = allProcessesList.filter( element => element.activityInstanceName != 'Diploma Assinado')
|
||||
}
|
||||
|
||||
console.log(allProcessesList);
|
||||
console.log('allProcessesList', allProcessesList);
|
||||
|
||||
this.skeletonLoader = true;
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ import { environment } from 'src/environments/environment';
|
||||
import { AlertController } from '@ionic/angular';
|
||||
import { NotificationsService } from 'src/app/services/notifications.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { ClearStoreService } from 'src/app/services/clear-store.service';
|
||||
import { ChangeProfileService } from 'src/app/services/change-profile.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-login',
|
||||
@@ -31,7 +33,9 @@ export class LoginPage implements OnInit {
|
||||
private router: Router,
|
||||
private authService: AuthService,
|
||||
private toastService: ToastService,
|
||||
public alertController: AlertController
|
||||
public alertController: AlertController,
|
||||
private clearStoreService: ClearStoreService,
|
||||
private changeProfileService: ChangeProfileService
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -76,9 +80,13 @@ export class LoginPage implements OnInit {
|
||||
domainName: environment.domain,
|
||||
BasicAuthKey: ""
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
let attempt = await this.authService.login(this.userattempt, {saveSession: false})
|
||||
|
||||
loader.remove()
|
||||
|
||||
if (attempt) {
|
||||
|
||||
if (attempt.UserId == SessionStore.user.UserId) {
|
||||
@@ -89,9 +97,14 @@ export class LoginPage implements OnInit {
|
||||
|
||||
this.goback()
|
||||
} else {
|
||||
|
||||
this.clearStoreService.clear()
|
||||
SessionStore.delete()
|
||||
window.localStorage.clear();
|
||||
|
||||
await this.authService.SetSession(attempt, this.userattempt);
|
||||
|
||||
this.changeProfileService.run()
|
||||
await this.authService.loginChat(this.userattempt);
|
||||
this.router.navigate(['/pin']);
|
||||
}
|
||||
|
||||
+1
-2
@@ -107,12 +107,11 @@ export class PublicationDetailPage implements OnInit {
|
||||
try {
|
||||
await this.publications.DeletePublication(this.folderId, this.publicationId).toPromise();
|
||||
this.toastService.successMessage('Publicação eliminada')
|
||||
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Publicaçao não eliminada')
|
||||
} finally {
|
||||
loader.remove()
|
||||
this.goBack();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user