mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
pull made
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
|
||||
|
||||
@@ -28,13 +28,14 @@ import { EmptyChatPageModule } from 'src/app/shared/chat/empty-chat/empty-chat.m
|
||||
import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
||||
import { NewEventPageModule } from 'src/app/shared/agenda/new-event/new-event.module';
|
||||
import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module';
|
||||
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
|
||||
FontAwesomeModule,
|
||||
PipesModule,
|
||||
ChatPageRoutingModule,
|
||||
RouterModule,
|
||||
|
||||
@@ -67,6 +67,16 @@
|
||||
</div>
|
||||
<div class="item-description" [class.item-description-active]="dm._id == idSelected">
|
||||
<ion-label *ngIf="dm.lastMessage">{{dm.lastMessage.msg}}</ion-label>
|
||||
<ion-label *ngIf="dm.lastMessage.file">
|
||||
<fa-icon icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="dm._id == idSelected"></fa-icon>
|
||||
<span> {{dm.lastMessage.file.name}}</span>
|
||||
</ion-label>
|
||||
<ion-label *ngIf="dm.lastMessage.attachments">
|
||||
<div *ngIf="dm.lastMessage.attachments[0].image_url">
|
||||
<fa-icon icon="image" class="file-icon" [class.set-active-item-font-to-white]="dm._id == idSelected"></fa-icon>
|
||||
<span> Fotografia</span>
|
||||
</div>
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -88,8 +98,18 @@
|
||||
</div>
|
||||
<div class="item-date" [class.item-date-active]="group._id ==idSelected" *ngIf="group.lastMessage">{{showDateDuration(group._updatedAt)}}</div>
|
||||
</div>
|
||||
<div class="item-description" [class.item-description-active]="group._id ==idSelected" *ngIf="group.lastMessage">
|
||||
<ion-label>{{group.lastMessage.u.name}}: {{group.lastMessage.msg}}</ion-label>
|
||||
<div class="item-description d-flex align-items-center" [class.item-description-active]="group._id ==idSelected" *ngIf="group.lastMessage">
|
||||
<div class="item-message">{{group.lastMessage.u.name}}: {{group.lastMessage.msg}} </div>
|
||||
<div class="item-files" *ngIf="group.lastMessage.file">
|
||||
<fa-icon icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="group._id == idSelected"></fa-icon>
|
||||
<span> {{group.lastMessage.file.name}}</span>
|
||||
</div>
|
||||
<div class="item-files" *ngIf="group.lastMessage.attachments">
|
||||
<div *ngIf="group.lastMessage.attachments[0].image_url">
|
||||
<fa-icon icon="image" class="file-icon" [class.set-active-item-font-to-white]="group._id == idSelected"></fa-icon>
|
||||
<span> Fotografia</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -86,7 +86,7 @@ ion-content{
|
||||
}
|
||||
}
|
||||
.item-content{
|
||||
width: 317px;
|
||||
//width: 317px;
|
||||
float:right;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ ion-content{
|
||||
margin-top: 10px;
|
||||
}
|
||||
.item-title{
|
||||
width: 80%;
|
||||
width: calc(100% - 75px);
|
||||
float: left;
|
||||
font-size: 15px;
|
||||
color: #0d89d1;
|
||||
@@ -105,7 +105,7 @@ ion-content{
|
||||
color: #fff;
|
||||
}
|
||||
.item-date{
|
||||
width: 20%;
|
||||
width: 75px;
|
||||
float: right;
|
||||
font-size: 13px;
|
||||
color: #797979;
|
||||
@@ -114,9 +114,19 @@ ion-content{
|
||||
.item-date-active{
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.item-description{
|
||||
font-size: 13px;
|
||||
color: #000;
|
||||
overflow: auto;
|
||||
|
||||
.item-message{
|
||||
float: left;
|
||||
padding-right: 5px;
|
||||
}
|
||||
.item-files{
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
.item-description-active{
|
||||
color: #fff;
|
||||
@@ -130,7 +140,6 @@ ion-content{
|
||||
@media only screen and (min-width: 701px) {
|
||||
.main-content{
|
||||
|
||||
|
||||
.aside-wrapper{
|
||||
width: 35%;
|
||||
border-right: 1px solid #d8d8d8;
|
||||
|
||||
@@ -139,9 +139,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
let scroll = e.srcElement.scrollTop;
|
||||
let windowHeight = e.srcElement.scrollHeight;
|
||||
let containerHeight = windowHeight - e.srcElement.clientHeight;
|
||||
console.log(this.startPosition);
|
||||
console.log(windowHeight);
|
||||
|
||||
|
||||
if (scroll > this.currentPosition) {
|
||||
//alert('BOTTOM');
|
||||
@@ -156,7 +153,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.scrollToBottomBtn = false;
|
||||
}
|
||||
this.currentPosition = scroll;
|
||||
console.log(this.currentPosition);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -108,10 +108,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <pdf-viewer [src]=pdfSrc
|
||||
[render-text]="true"
|
||||
style="display: block;"
|
||||
></pdf-viewer> -->
|
||||
|
||||
</ion-content>
|
||||
|
||||
@@ -135,6 +135,7 @@ export class EventsPage implements OnInit {
|
||||
this.getEventsFromLocalDb();
|
||||
|
||||
//this.checkScreenOrientation();
|
||||
|
||||
}
|
||||
|
||||
hideSearch() {
|
||||
|
||||
@@ -15,7 +15,7 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
import { DespachoService } from 'src/app/Rules/despacho.service'
|
||||
import { Location } from '@angular/common'
|
||||
import { fullTask } from 'src/app/models/dailyworktask.model';
|
||||
import { Attachment, AttachmentList } from 'src/app/models/Excludetask';
|
||||
import { AttachmentList } from 'src/app/models/Excludetask';
|
||||
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||
|
||||
@Component({
|
||||
@@ -51,10 +51,8 @@ export class DespachoPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
private despachoService: DespachoService,
|
||||
private location: Location,
|
||||
public p: PermissionService,
|
||||
|
||||
|
||||
) {
|
||||
public p: PermissionService) {
|
||||
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
if(params["params"].SerialNumber) {
|
||||
this.serialnumber = params["params"].SerialNumber;
|
||||
@@ -160,10 +158,10 @@ export class DespachoPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
viewDocument(docId:string){
|
||||
viewDocument(docId:string) {
|
||||
this.processes.GetDocumentUrl(docId, '361').subscribe(res=>{
|
||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
const browser = this.iab.create(url,"_blank");
|
||||
const browser = this.iab.create('https://equilibrium.dyndns.info/FileShare/pdfjs/web/viewer.html?file=https://equilibrium.dyndns.info/FileShare/merged_fastview.pdf', "_blank", 'location=yes,x=0,y=200,width=437,height=650,fullscreen=no');
|
||||
browser.show();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -79,7 +79,8 @@ export class ApproveEventPage implements OnInit {
|
||||
console.log(this.serialNumber);
|
||||
console.log(this.caller);
|
||||
this.getProcessFromDB();
|
||||
this.getTask();
|
||||
console.log("Aprove enet")
|
||||
//this.getTask();
|
||||
}
|
||||
|
||||
goBack() {
|
||||
|
||||
@@ -43,8 +43,9 @@ export class ExpedientePage implements OnInit {
|
||||
const pathname = location.pathname + location.search
|
||||
|
||||
this.getEventsFromLocalDb();
|
||||
console.log("segrsgre")
|
||||
|
||||
if (this.onlinecheck) {
|
||||
|
||||
this.LoadList()
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
@@ -56,7 +57,6 @@ export class ExpedientePage implements OnInit {
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
import { SqliteService } from '../../services/sqlite.service';
|
||||
import { synchro } from '../../services/socket/synchro.service';
|
||||
@@ -126,7 +127,8 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
private notificationsService: NotificationsService,
|
||||
private despachoRule: DespachoService,
|
||||
private sqliteservice: SqliteService,
|
||||
private platform: Platform
|
||||
private platform: Platform,
|
||||
private changeProfileService: ChangeProfileService
|
||||
) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
@@ -212,7 +214,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Diploma Assinado')
|
||||
}
|
||||
|
||||
console.log(allProcessesList);
|
||||
console.log('allProcessesList', allProcessesList);
|
||||
|
||||
this.addProcessToDB(allProcessesList)
|
||||
this.skeletonLoader = true;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
Parecer
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="deferimento">
|
||||
Defereimento
|
||||
Deferimento
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
|
||||
@@ -7,7 +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 { SqliteService } from '../../services/sqlite.service';
|
||||
import { ClearStoreService } from 'src/app/services/clear-store.service';
|
||||
import { ChangeProfileService } from 'src/app/services/change-profile.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-login',
|
||||
@@ -33,7 +34,8 @@ export class LoginPage implements OnInit {
|
||||
private authService: AuthService,
|
||||
private toastService: ToastService,
|
||||
public alertController: AlertController,
|
||||
private sqliteservice: SqliteService
|
||||
private clearStoreService: ClearStoreService,
|
||||
private changeProfileService: ChangeProfileService
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -80,9 +82,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) {
|
||||
@@ -93,9 +99,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']);
|
||||
}
|
||||
|
||||
+6
-1
@@ -95,6 +95,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
if(this.isModal) {
|
||||
this.close()
|
||||
} else {
|
||||
// alert('go back')
|
||||
this.location.back();
|
||||
}
|
||||
|
||||
@@ -108,11 +109,15 @@ export class PublicationDetailPage implements OnInit {
|
||||
await this.publications.DeletePublication(this.folderId, this.publicationId).toPromise();
|
||||
this.toastService.successMessage('Publicação eliminada')
|
||||
|
||||
if(window['app-view-publications-page-doRefresh']) {
|
||||
window['app-view-publications-page-doRefresh']()
|
||||
}
|
||||
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Publicaçao não eliminada')
|
||||
} finally {
|
||||
loader.remove()
|
||||
this.goBack();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user