mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
pull made
This commit is contained in:
@@ -47,3 +47,6 @@ _platforms
|
|||||||
|
|
||||||
src/app/store/notification.service.spec.ts
|
src/app/store/notification.service.spec.ts
|
||||||
src/app/store/notification.service.ts
|
src/app/store/notification.service.ts
|
||||||
|
|
||||||
|
|
||||||
|
src/assets/www/pdfjs/web/compressed.tracemonkey-pldi-09.pdf.pdf
|
||||||
+3
-3
@@ -3,10 +3,10 @@
|
|||||||
<name>gabinete digital</name>
|
<name>gabinete digital</name>
|
||||||
<description>An awesome Ionic/Cordova app.</description>
|
<description>An awesome Ionic/Cordova app.</description>
|
||||||
<author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author>
|
<author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author>
|
||||||
<content src="index.html" />
|
<content original-src="index.html" src="http://localhost:8100" />
|
||||||
<access origin="*" />
|
<access origin="*" />
|
||||||
<allow-navigation href="http://*/*" />
|
<allow-navigation href="*" />
|
||||||
<allow-navigation href="https://*/*" />
|
<allow-navigation href="*" />
|
||||||
<allow-intent href="http://*/*" />
|
<allow-intent href="http://*/*" />
|
||||||
<allow-intent href="https://*/*" />
|
<allow-intent href="https://*/*" />
|
||||||
<allow-intent href="tel:*" />
|
<allow-intent href="tel:*" />
|
||||||
|
|||||||
Generated
+10
-3
@@ -21486,6 +21486,13 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"pdfjs-dist": "~2.7.570",
|
"pdfjs-dist": "~2.7.570",
|
||||||
"tslib": "^2.0.0"
|
"tslib": "^2.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"pdfjs-dist": {
|
||||||
|
"version": "2.7.570",
|
||||||
|
"resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-2.7.570.tgz",
|
||||||
|
"integrity": "sha512-/ZkA1FwkEOyDaq11JhMLazdwQAA0F9uwrP7h/1L9Akt9KWh1G5/tkzS+bPuUELq2s2GDFnaT+kooN/aSjT7DXQ=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ngx-socket-io": {
|
"ngx-socket-io": {
|
||||||
@@ -22398,9 +22405,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pdfjs-dist": {
|
"pdfjs-dist": {
|
||||||
"version": "2.7.570",
|
"version": "2.9.359",
|
||||||
"resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-2.7.570.tgz",
|
"resolved": "https://registry.npmjs.org/pdfjs-dist/-/pdfjs-dist-2.9.359.tgz",
|
||||||
"integrity": "sha512-/ZkA1FwkEOyDaq11JhMLazdwQAA0F9uwrP7h/1L9Akt9KWh1G5/tkzS+bPuUELq2s2GDFnaT+kooN/aSjT7DXQ=="
|
"integrity": "sha512-P2nYtkacdlZaNNwrBLw1ZyMm0oE2yY/5S/GDCAmMJ7U4+ciL/D0mrlEC/o4HZZc/LNE3w8lEVzBEyVgEQlPVKQ=="
|
||||||
},
|
},
|
||||||
"pend": {
|
"pend": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
|
|||||||
@@ -63,6 +63,7 @@
|
|||||||
"@logisticinfotech/ionic4-datepicker": "^1.4.4",
|
"@logisticinfotech/ionic4-datepicker": "^1.4.4",
|
||||||
"@ng-bootstrap/ng-bootstrap": "^9.1.2",
|
"@ng-bootstrap/ng-bootstrap": "^9.1.2",
|
||||||
"@ngx-translate/core": "^13.0.0",
|
"@ngx-translate/core": "^13.0.0",
|
||||||
|
"@pdftron/pdfjs-express": "^8.0.1",
|
||||||
"@types/jest-environment-puppeteer": "^4.4.1",
|
"@types/jest-environment-puppeteer": "^4.4.1",
|
||||||
"@types/puppeteer": "^5.4.4",
|
"@types/puppeteer": "^5.4.4",
|
||||||
"angular-calendar": "^0.28.22",
|
"angular-calendar": "^0.28.22",
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<domain-config cleartextTrafficPermitted="true">
|
<domain-config cleartextTrafficPermitted="true">
|
||||||
<domain includeSubdomains="true">localhost</domain>
|
<domain includeSubdomains="true">localhost</domain>
|
||||||
<domain includeSubdomains="true">192.168.0.244</domain>
|
<domain includeSubdomains="true">192.168.0.244</domain>
|
||||||
|
<domain includeSubdomains="true">laptop-46</domain>
|
||||||
<domain includeSubdomains="true">gpr-dev-10.gabinetedigital.local</domain>
|
<domain includeSubdomains="true">gpr-dev-10.gabinetedigital.local</domain>
|
||||||
</domain-config>
|
</domain-config>
|
||||||
</network-security-config>
|
</network-security-config>
|
||||||
|
|||||||
@@ -191,12 +191,16 @@ const routes = [
|
|||||||
{
|
{
|
||||||
path: 'chat-options-features',
|
path: 'chat-options-features',
|
||||||
loadChildren: () => import('./modals/chat-options-features/chat-options-features.module').then( m => m.ChatOptionsFeaturesPageModule)
|
loadChildren: () => import('./modals/chat-options-features/chat-options-features.module').then( m => m.ChatOptionsFeaturesPageModule)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'document-viewer',
|
||||||
loadChildren: () => import('./modals/document-viewer/document-viewer.module').then( m => m.DocumentViewerPageModule)
|
loadChildren: () => import('./modals/document-viewer/document-viewer.module').then( m => m.DocumentViewerPageModule)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
path: 'chat',
|
path: 'chat',
|
||||||
|
|||||||
@@ -187,6 +187,7 @@ export class HomePage implements OnInit {
|
|||||||
console.log('Offlineee')
|
console.log('Offlineee')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
synchro.conected
|
||||||
|
|
||||||
synchro.registerCallback('Notification', (DataArray)=> {
|
synchro.registerCallback('Notification', (DataArray)=> {
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
|
import { DocumentViewerPage } from './document-viewer.page';
|
||||||
|
|
||||||
|
const routes: Routes = [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: DocumentViewerPage
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [RouterModule.forChild(routes)],
|
||||||
|
exports: [RouterModule],
|
||||||
|
})
|
||||||
|
export class DocumentViewerPageRoutingModule {}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { FormsModule } from '@angular/forms';
|
||||||
|
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
|
import { DocumentViewerPageRoutingModule } from './document-viewer-routing.module';
|
||||||
|
|
||||||
|
import { DocumentViewerPage } from './document-viewer.page';
|
||||||
|
import { PdfViewerModule } from 'ng2-pdf-viewer';
|
||||||
|
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
FormsModule,
|
||||||
|
IonicModule,
|
||||||
|
DocumentViewerPageRoutingModule,
|
||||||
|
//
|
||||||
|
PdfViewerModule
|
||||||
|
],
|
||||||
|
declarations: [DocumentViewerPage]
|
||||||
|
})
|
||||||
|
export class DocumentViewerPageModule {}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<ion-header class="ion-no-border">
|
||||||
|
<ion-toolbar class="d-flex">
|
||||||
|
|
||||||
|
<div class="d-flex px-20 pt-20">
|
||||||
|
<div class="cursor-pointer" (click)="close()">
|
||||||
|
<ion-icon class="font-35" src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="font-25">{{ fileName }}</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</ion-toolbar>
|
||||||
|
</ion-header>
|
||||||
|
|
||||||
|
<ion-content class="pt-10 height-100">
|
||||||
|
|
||||||
|
<div *ngIf="pdfSrc" class="height-100">
|
||||||
|
<iframe id="iframe" src="https://equilibrium.dyndns.info/FileShare/pdfjs/web/viewer.html?file=https://equilibrium.dyndns.info/FileShare/merged_fastview.pdf" height="100%" width="100%" title="Iframe Example"></iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</ion-content>
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
ion-content {
|
||||||
|
background-color: #ececec;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ng2-pdf-viewer-container {
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pdf-container {
|
||||||
|
canvas {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
|
import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
|
import { DocumentViewerPage } from './document-viewer.page';
|
||||||
|
|
||||||
|
describe('DocumentViewerPage', () => {
|
||||||
|
let component: DocumentViewerPage;
|
||||||
|
let fixture: ComponentFixture<DocumentViewerPage>;
|
||||||
|
|
||||||
|
beforeEach(waitForAsync(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ DocumentViewerPage ],
|
||||||
|
imports: [IonicModule.forRoot()]
|
||||||
|
}).compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(DocumentViewerPage);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
}));
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,212 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { ModalController, NavParams } from '@ionic/angular';
|
||||||
|
import { ProcessesService } from 'src/app/services/processes.service';
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-document-viewer',
|
||||||
|
templateUrl: './document-viewer.page.html',
|
||||||
|
styleUrls: ['./document-viewer.page.scss'],
|
||||||
|
})
|
||||||
|
export class DocumentViewerPage implements OnInit {
|
||||||
|
|
||||||
|
pdfSrc = 'http://laptop-46/FileShare/Test_25MB.pdf';
|
||||||
|
task = null
|
||||||
|
DocId = null
|
||||||
|
fileName = ''
|
||||||
|
link = ''
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
private modalController: ModalController,
|
||||||
|
private navParams: NavParams,
|
||||||
|
private processes: ProcessesService) {
|
||||||
|
|
||||||
|
this.task = this.navParams.get('task') || null;
|
||||||
|
this.DocId = this.navParams.get('DocId');
|
||||||
|
|
||||||
|
if(this.navParams.get('pdfSrc')) {
|
||||||
|
this.pdfSrc = this.navParams.get('pdfSrc') || null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
|
||||||
|
this.processes.getFileBase64(this.DocId).subscribe((res: any) => {
|
||||||
|
|
||||||
|
console.log(res)
|
||||||
|
this.pdfSrc= 'data:application/pdf;base64,'+ res.file
|
||||||
|
this.fileName = res.name
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
// this.setPdfViewer()
|
||||||
|
|
||||||
|
|
||||||
|
// setTimeout(() => {
|
||||||
|
|
||||||
|
// document.getElementById('iframe')['contentWindow'].postMessage(
|
||||||
|
// {
|
||||||
|
// sender: "get_page_button1",
|
||||||
|
// message: 'url'
|
||||||
|
// }, "*")
|
||||||
|
|
||||||
|
// }, 3000)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setPdfViewer() {
|
||||||
|
setTimeout( async () => {
|
||||||
|
|
||||||
|
// If absolute URL from the remote server is provided, configure the CORS
|
||||||
|
// header on that server.
|
||||||
|
var url = 'http://192.168.0.87:3000/000634977.pdf';
|
||||||
|
|
||||||
|
const pdfjsWorker = await import('pdfjs-dist/build/pdf.worker.entry');
|
||||||
|
// Loaded via <script> tag, create shortcut to access PDF.js exports.
|
||||||
|
var pdfjsLib = await import('pdfjs-dist/build/pdf');
|
||||||
|
|
||||||
|
// The workerSrc property shall be specified.
|
||||||
|
// pdfjsLib.GlobalWorkerOptions.workerSrc = '//mozilla.github.io/pdf.js/build/pdf.worker.js';
|
||||||
|
pdfjsLib.GlobalWorkerOptions.workerSrc = pdfjsWorker;
|
||||||
|
|
||||||
|
var pdfDoc = null,
|
||||||
|
pageNum = 1,
|
||||||
|
pageRendering = false,
|
||||||
|
pageNumPending = null,
|
||||||
|
scale = 0.8,
|
||||||
|
canvas: any = document.getElementById('the-canvas'),
|
||||||
|
ctx = canvas.getContext('2d');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get page info from document, resize canvas accordingly, and render page.
|
||||||
|
* @param num Page number.
|
||||||
|
*/
|
||||||
|
function renderPage(num) {
|
||||||
|
pageRendering = true;
|
||||||
|
// Using promise to fetch the page
|
||||||
|
pdfDoc.getPage(num).then(function(page) {
|
||||||
|
var viewport = page.getViewport({scale: scale});
|
||||||
|
canvas.height = viewport.height;
|
||||||
|
canvas.width = viewport.width;
|
||||||
|
|
||||||
|
// Render PDF page into canvas context
|
||||||
|
var renderContext = {
|
||||||
|
canvasContext: ctx,
|
||||||
|
viewport: viewport
|
||||||
|
};
|
||||||
|
var renderTask = page.render(renderContext);
|
||||||
|
|
||||||
|
// Wait for rendering to finish
|
||||||
|
renderTask.promise.then(function() {
|
||||||
|
pageRendering = false;
|
||||||
|
if (pageNumPending !== null) {
|
||||||
|
// New page rendering is pending
|
||||||
|
renderPage(pageNumPending);
|
||||||
|
pageNumPending = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Update page counters
|
||||||
|
// document.getElementById('page_num').textContent = num;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If another page rendering in progress, waits until the rendering is
|
||||||
|
* finised. Otherwise, executes rendering immediately.
|
||||||
|
*/
|
||||||
|
function queueRenderPage(num) {
|
||||||
|
if (pageRendering) {
|
||||||
|
pageNumPending = num;
|
||||||
|
} else {
|
||||||
|
renderPage(num);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Displays previous page.
|
||||||
|
*/
|
||||||
|
function onPrevPage() {
|
||||||
|
if (pageNum <= 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
pageNum--;
|
||||||
|
queueRenderPage(pageNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementById('prev').addEventListener('click', onPrevPage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Displays next page.
|
||||||
|
*/
|
||||||
|
function onNextPage() {
|
||||||
|
if (pageNum >= pdfDoc.numPages) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
pageNum++;
|
||||||
|
queueRenderPage(pageNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementById('next').addEventListener('click', onNextPage);
|
||||||
|
|
||||||
|
var currPage = 1; //Pages are 1-based not 0-based
|
||||||
|
var numPages = 0;
|
||||||
|
var thePDF = null;
|
||||||
|
|
||||||
|
|
||||||
|
function handlePages(page)
|
||||||
|
{
|
||||||
|
//This gives us the page's dimensions at full scale
|
||||||
|
var viewport = page.getViewport( 1 );
|
||||||
|
|
||||||
|
//We'll create a canvas for each page to draw it on
|
||||||
|
var canvas = document.createElement( "canvas" );
|
||||||
|
canvas.style.display = "block";
|
||||||
|
var context = canvas.getContext('2d');
|
||||||
|
canvas.height = viewport.height;
|
||||||
|
canvas.width = viewport.width;
|
||||||
|
|
||||||
|
//Draw it on the canvas
|
||||||
|
page.render({canvasContext: context, viewport: viewport});
|
||||||
|
|
||||||
|
//Add it to the web page
|
||||||
|
document.querySelector('#pdf-container').appendChild( canvas );
|
||||||
|
|
||||||
|
//Move to next page
|
||||||
|
currPage++;
|
||||||
|
if ( thePDF !== null && currPage <= numPages )
|
||||||
|
{
|
||||||
|
thePDF.getPage( currPage ).then( handlePages );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Asynchronously downloads PDF.
|
||||||
|
*/
|
||||||
|
pdfjsLib.getDocument(url).promise.then(function(pdfDoc_) {
|
||||||
|
|
||||||
|
pdfDoc = pdfDoc_;
|
||||||
|
thePDF = pdfDoc_
|
||||||
|
|
||||||
|
pdfDoc.getPage(1).then(function(page) {
|
||||||
|
// you can now use *page* here
|
||||||
|
alert('first page')
|
||||||
|
});
|
||||||
|
|
||||||
|
// Initial/first page rendering
|
||||||
|
renderPage(pageNum);
|
||||||
|
|
||||||
|
numPages = pdfDoc.numPages;
|
||||||
|
pdfDoc.getPage( 1 ).then( handlePages );
|
||||||
|
});
|
||||||
|
|
||||||
|
}, 100)
|
||||||
|
}
|
||||||
|
|
||||||
|
close() {
|
||||||
|
this.modalController.dismiss();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<!-- Calendar is here -->
|
<!-- Calendar is here -->
|
||||||
|
|
||||||
<div class="calendar-segment-{{profile}}" [class.calendar-segment-pr-force]="loggeduser.Profile =='PR'">
|
<div class="calendar-segment-{{profile}}" [class.calendar-segment-pr-force]="loggeduser.Profile =='PR'">
|
||||||
<div class="calendar-container" [style.height]="calendarHeight">
|
<div class="calendar-container" [style.height]="calendarHeight">
|
||||||
|
|
||||||
@@ -44,7 +45,7 @@
|
|||||||
|
|
||||||
</h2>
|
</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">
|
<div class="flex-grow-1 height-100 overflow-y-auto">
|
||||||
<ul>
|
<ul>
|
||||||
<li (click)="changeMonth(0)" [class.active]="monthNum==0" ><span>Jan</span></li>
|
<li (click)="changeMonth(0)" [class.active]="monthNum==0" ><span>Jan</span></li>
|
||||||
@@ -137,7 +138,7 @@
|
|||||||
|
|
||||||
<calendar
|
<calendar
|
||||||
class="calendar-component"
|
class="calendar-component"
|
||||||
[eventSource]="calendarService.eventSource"
|
[eventSource]="CalendarStore.eventSource"
|
||||||
[calendarMode]="calendar.mode"
|
[calendarMode]="calendar.mode"
|
||||||
[currentDate]="calendar.currentDate"
|
[currentDate]="calendar.currentDate"
|
||||||
(onEventSelected)="onEventSelected($event)"
|
(onEventSelected)="onEventSelected($event)"
|
||||||
@@ -223,7 +224,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="timeline-wrapper flex-grow-1 height-100" >
|
<div class="timeline-wrapper flex-grow-1 height-100" >
|
||||||
|
|
||||||
<!-- Timeline -->
|
<!-- Timeline -->
|
||||||
|
|
||||||
<div class="height-100">
|
<div class="height-100">
|
||||||
@@ -412,6 +412,25 @@
|
|||||||
(setIntervenientCC)="setIntervenientCC($event)"
|
(setIntervenientCC)="setIntervenientCC($event)"
|
||||||
></app-edit-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 -->
|
<!-- View -->
|
||||||
<app-view-event *ngIf="mobileComponent.showEventDetails"
|
<app-view-event *ngIf="mobileComponent.showEventDetails"
|
||||||
[profile]="profile"
|
[profile]="profile"
|
||||||
@@ -446,24 +465,6 @@
|
|||||||
>
|
>
|
||||||
</app-approve-event>
|
</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
|
<app-attendee-modal
|
||||||
[footer]="true"
|
[footer]="true"
|
||||||
|
|||||||
@@ -25,8 +25,9 @@ import { LoginUserRespose } from 'src/app/models/user.model';
|
|||||||
import { DateAdapter } from '@angular/material/core';
|
import { DateAdapter } from '@angular/material/core';
|
||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
import { eventSource } from 'src/app/models/agenda/eventSource';
|
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 { ListBoxService } from 'src/app/services/agenda/list-box.service';
|
||||||
|
import { ChangeProfileService } from 'src/app/services/change-profile.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-agenda',
|
selector: 'app-agenda',
|
||||||
@@ -102,8 +103,8 @@ export class AgendaPage implements OnInit {
|
|||||||
postEvent: any;
|
postEvent: any;
|
||||||
|
|
||||||
// temporary data
|
// temporary data
|
||||||
taskParticipants: any = [];
|
taskParticipants: any[] = [];
|
||||||
taskParticipantsCc: any = [];
|
taskParticipantsCc: any[] = [];
|
||||||
adding: "intervenient" | "CC" = "intervenient";
|
adding: "intervenient" | "CC" = "intervenient";
|
||||||
|
|
||||||
@ViewChild(CalendarComponent) myCal: CalendarComponent;
|
@ViewChild(CalendarComponent) myCal: CalendarComponent;
|
||||||
@@ -153,6 +154,7 @@ export class AgendaPage implements OnInit {
|
|||||||
yearNum;
|
yearNum;
|
||||||
|
|
||||||
dropdownScrollWeal = false
|
dropdownScrollWeal = false
|
||||||
|
CalendarStore = CalendarStore
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private alertCtrl: AlertController,
|
private alertCtrl: AlertController,
|
||||||
@@ -165,15 +167,32 @@ export class AgendaPage implements OnInit {
|
|||||||
authService: AuthService,
|
authService: AuthService,
|
||||||
private dateAdapter: DateAdapter<any>,
|
private dateAdapter: DateAdapter<any>,
|
||||||
private toastService: ToastService,
|
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.locale = 'pt'
|
||||||
|
|
||||||
this.loggeduser = authService.ValidatedUser;
|
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.calendarHeight = "320px";
|
||||||
this.showCalendar = true;
|
this.showCalendar = true;
|
||||||
this.timelineDate = momentG(new Date(),'dd MMMM yyyy');
|
this.timelineDate = momentG(new Date(),'dd MMMM yyyy');
|
||||||
@@ -182,10 +201,14 @@ export class AgendaPage implements OnInit {
|
|||||||
this.showTimelineFilterState = false;
|
this.showTimelineFilterState = false;
|
||||||
this.showTimeline = false;
|
this.showTimeline = false;
|
||||||
|
|
||||||
if(this.loggeduser.Profile == 'MDGPR') {
|
|
||||||
this.mobileComponent.showEventList = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
this.tigerUpdate()
|
||||||
|
|
||||||
|
window['year'] = this.changeYear
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
tigerUpdate() {
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
try {
|
try {
|
||||||
this.myCal.update();
|
this.myCal.update();
|
||||||
@@ -195,15 +218,10 @@ export class AgendaPage implements OnInit {
|
|||||||
this.updateEventListBox()
|
this.updateEventListBox()
|
||||||
|
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
||||||
|
|
||||||
window['year'] = this.changeYear
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
this.profile = "mdgpr";
|
|
||||||
|
|
||||||
const pathname = window.location.pathname
|
const pathname = window.location.pathname
|
||||||
|
|
||||||
@@ -481,12 +499,12 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
// calendar
|
// calendar
|
||||||
this.calendarService.removeRange(startTime, endTime, 'md')
|
this.CalendarStore.removeRange(startTime, endTime, 'md')
|
||||||
|
|
||||||
// loop
|
// 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.update();
|
||||||
this.myCal.loadEvents();
|
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.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
|
// 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.update();
|
||||||
this.myCal.loadEvents();
|
this.myCal.loadEvents();
|
||||||
@@ -528,12 +546,12 @@ export class AgendaPage implements OnInit {
|
|||||||
// this.eventSource=[];
|
// this.eventSource=[];
|
||||||
|
|
||||||
// clear the current month only
|
// 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();
|
this.myCal.update();
|
||||||
@@ -554,14 +572,14 @@ export class AgendaPage implements OnInit {
|
|||||||
if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR') {
|
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.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");
|
const eventsList = response.filter(data => data.CalendarName == "Pessoal");
|
||||||
// loop
|
// 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.update();
|
||||||
this.myCal.loadEvents();
|
this.myCal.loadEvents();
|
||||||
@@ -576,12 +594,12 @@ export class AgendaPage implements OnInit {
|
|||||||
else{
|
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.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");
|
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.update();
|
||||||
this.myCal.loadEvents();
|
this.myCal.loadEvents();
|
||||||
@@ -603,14 +621,14 @@ export class AgendaPage implements OnInit {
|
|||||||
if(this.profile == "mdgpr" && this.loggeduser.Profile == 'MDGPR') {
|
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.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");
|
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.update();
|
||||||
this.myCal.loadEvents();
|
this.myCal.loadEvents();
|
||||||
@@ -626,13 +644,13 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
// this.eventSource=[];
|
// this.eventSource=[];
|
||||||
|
|
||||||
this.calendarService.removeRange(startTime, endTime, 'pr')
|
this.CalendarStore.removeRange(startTime, endTime, 'pr')
|
||||||
|
|
||||||
const eventsList = res.filter(data => data.CalendarName == "Oficial");
|
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.update();
|
||||||
this.myCal.loadEvents();
|
this.myCal.loadEvents();
|
||||||
@@ -658,12 +676,12 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
let eventsList = response;
|
let eventsList = response;
|
||||||
|
|
||||||
this.calendarService.removeRange(startTime, endTime, 'md')
|
this.CalendarStore.removeRange(startTime, endTime, 'md')
|
||||||
|
|
||||||
// loop
|
// 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.update();
|
||||||
this.myCal.loadEvents();
|
this.myCal.loadEvents();
|
||||||
@@ -688,11 +706,11 @@ export class AgendaPage implements OnInit {
|
|||||||
let eventsList = response;
|
let eventsList = response;
|
||||||
|
|
||||||
// clear the current month only
|
// 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.update();
|
||||||
this.myCal.loadEvents();
|
this.myCal.loadEvents();
|
||||||
@@ -726,11 +744,11 @@ export class AgendaPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// clear the current month only
|
// 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.update();
|
||||||
@@ -757,8 +775,8 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
updateEventListBox() {
|
updateEventListBox() {
|
||||||
|
|
||||||
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.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})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -841,13 +859,13 @@ export class AgendaPage implements OnInit {
|
|||||||
if(this.profile == "mdgpr") {
|
if(this.profile == "mdgpr") {
|
||||||
this.profile ="pr";
|
this.profile ="pr";
|
||||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
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 {
|
else {
|
||||||
this.profile ="mdgpr";
|
this.profile ="mdgpr";
|
||||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
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() {
|
EditApproveEventDismiss() {
|
||||||
this.cloneAllmobileComponent();
|
this.cloneAllmobileComponent();
|
||||||
this.mobileComponent.showEditEventToApprove = true;
|
this.mobileComponent.showEditEventToApprove = true;
|
||||||
|
|
||||||
|
this.taskParticipants = []
|
||||||
|
this.taskParticipantsCc = []
|
||||||
}
|
}
|
||||||
|
|
||||||
async cloneAllmobileComponent() {
|
async cloneAllmobileComponent() {
|
||||||
@@ -1105,12 +1126,18 @@ export class AgendaPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async setIntervenient(data) {
|
async setIntervenient(data) {
|
||||||
this.taskParticipants = removeDuplicate(data)
|
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.taskParticipants = removeDuplicate(data)
|
||||||
|
}, 10)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async setIntervenientCC(data) {
|
async setIntervenientCC(data) {
|
||||||
this.taskParticipantsCc = removeDuplicate(data)
|
setTimeout(()=>{
|
||||||
|
this.taskParticipantsCc = removeDuplicate(data)
|
||||||
|
}, 10)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Emitters
|
// 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 { HeaderPageModule } from 'src/app/shared/header/header.module';
|
||||||
import { NewEventPageModule } from 'src/app/shared/agenda/new-event/new-event.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 { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module';
|
||||||
|
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
IonicModule,
|
IonicModule,
|
||||||
|
FontAwesomeModule,
|
||||||
PipesModule,
|
PipesModule,
|
||||||
ChatPageRoutingModule,
|
ChatPageRoutingModule,
|
||||||
RouterModule,
|
RouterModule,
|
||||||
|
|||||||
@@ -67,6 +67,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="item-description" [class.item-description-active]="dm._id == idSelected">
|
<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">{{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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -88,8 +98,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="item-date" [class.item-date-active]="group._id ==idSelected" *ngIf="group.lastMessage">{{showDateDuration(group._updatedAt)}}</div>
|
<div class="item-date" [class.item-date-active]="group._id ==idSelected" *ngIf="group.lastMessage">{{showDateDuration(group._updatedAt)}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-description" [class.item-description-active]="group._id ==idSelected" *ngIf="group.lastMessage">
|
<div class="item-description d-flex align-items-center" [class.item-description-active]="group._id ==idSelected" *ngIf="group.lastMessage">
|
||||||
<ion-label>{{group.lastMessage.u.name}}: {{group.lastMessage.msg}}</ion-label>
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ ion-content{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.item-content{
|
.item-content{
|
||||||
width: 317px;
|
//width: 317px;
|
||||||
float:right;
|
float:right;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ ion-content{
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
.item-title{
|
.item-title{
|
||||||
width: 80%;
|
width: calc(100% - 75px);
|
||||||
float: left;
|
float: left;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
color: #0d89d1;
|
color: #0d89d1;
|
||||||
@@ -105,7 +105,7 @@ ion-content{
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
.item-date{
|
.item-date{
|
||||||
width: 20%;
|
width: 75px;
|
||||||
float: right;
|
float: right;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: #797979;
|
color: #797979;
|
||||||
@@ -114,9 +114,19 @@ ion-content{
|
|||||||
.item-date-active{
|
.item-date-active{
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-description{
|
.item-description{
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: #000;
|
color: #000;
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
|
.item-message{
|
||||||
|
float: left;
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
.item-files{
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.item-description-active{
|
.item-description-active{
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@@ -130,7 +140,6 @@ ion-content{
|
|||||||
@media only screen and (min-width: 701px) {
|
@media only screen and (min-width: 701px) {
|
||||||
.main-content{
|
.main-content{
|
||||||
|
|
||||||
|
|
||||||
.aside-wrapper{
|
.aside-wrapper{
|
||||||
width: 35%;
|
width: 35%;
|
||||||
border-right: 1px solid #d8d8d8;
|
border-right: 1px solid #d8d8d8;
|
||||||
|
|||||||
@@ -139,9 +139,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
let scroll = e.srcElement.scrollTop;
|
let scroll = e.srcElement.scrollTop;
|
||||||
let windowHeight = e.srcElement.scrollHeight;
|
let windowHeight = e.srcElement.scrollHeight;
|
||||||
let containerHeight = windowHeight - e.srcElement.clientHeight;
|
let containerHeight = windowHeight - e.srcElement.clientHeight;
|
||||||
console.log(this.startPosition);
|
|
||||||
console.log(windowHeight);
|
|
||||||
|
|
||||||
|
|
||||||
if (scroll > this.currentPosition) {
|
if (scroll > this.currentPosition) {
|
||||||
//alert('BOTTOM');
|
//alert('BOTTOM');
|
||||||
@@ -156,7 +153,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
this.scrollToBottomBtn = false;
|
this.scrollToBottomBtn = false;
|
||||||
}
|
}
|
||||||
this.currentPosition = scroll;
|
this.currentPosition = scroll;
|
||||||
console.log(this.currentPosition);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -108,10 +108,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <pdf-viewer [src]=pdfSrc
|
|
||||||
[render-text]="true"
|
|
||||||
style="display: block;"
|
|
||||||
></pdf-viewer> -->
|
|
||||||
|
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ export class EventsPage implements OnInit {
|
|||||||
this.getEventsFromLocalDb();
|
this.getEventsFromLocalDb();
|
||||||
|
|
||||||
//this.checkScreenOrientation();
|
//this.checkScreenOrientation();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hideSearch() {
|
hideSearch() {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import { ToastService } from 'src/app/services/toast.service';
|
|||||||
import { DespachoService } from 'src/app/Rules/despacho.service'
|
import { DespachoService } from 'src/app/Rules/despacho.service'
|
||||||
import { Location } from '@angular/common'
|
import { Location } from '@angular/common'
|
||||||
import { fullTask } from 'src/app/models/dailyworktask.model';
|
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';
|
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -51,10 +51,8 @@ export class DespachoPage implements OnInit {
|
|||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private despachoService: DespachoService,
|
private despachoService: DespachoService,
|
||||||
private location: Location,
|
private location: Location,
|
||||||
public p: PermissionService,
|
public p: PermissionService) {
|
||||||
|
|
||||||
|
|
||||||
) {
|
|
||||||
this.activatedRoute.paramMap.subscribe(params => {
|
this.activatedRoute.paramMap.subscribe(params => {
|
||||||
if(params["params"].SerialNumber) {
|
if(params["params"].SerialNumber) {
|
||||||
this.serialnumber = 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=>{
|
this.processes.GetDocumentUrl(docId, '361').subscribe(res=>{
|
||||||
const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
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();
|
browser.show();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,8 @@ export class ApproveEventPage implements OnInit {
|
|||||||
console.log(this.serialNumber);
|
console.log(this.serialNumber);
|
||||||
console.log(this.caller);
|
console.log(this.caller);
|
||||||
this.getProcessFromDB();
|
this.getProcessFromDB();
|
||||||
this.getTask();
|
console.log("Aprove enet")
|
||||||
|
//this.getTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
goBack() {
|
goBack() {
|
||||||
|
|||||||
@@ -43,8 +43,9 @@ export class ExpedientePage implements OnInit {
|
|||||||
const pathname = location.pathname + location.search
|
const pathname = location.pathname + location.search
|
||||||
|
|
||||||
this.getEventsFromLocalDb();
|
this.getEventsFromLocalDb();
|
||||||
|
console.log("segrsgre")
|
||||||
|
|
||||||
|
|
||||||
if (this.onlinecheck) {
|
|
||||||
this.LoadList()
|
this.LoadList()
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
@@ -56,7 +57,6 @@ export class ExpedientePage implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -89,6 +89,7 @@
|
|||||||
|
|
||||||
<!-- This is the box view -->
|
<!-- This is the box view -->
|
||||||
<div *ngSwitchCase="'boxview'" class="aside overflow-y-auto d-flex flex-wrap width-100 height-100">
|
<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 *ngIf="hideInMobile" (click)="openAllProcessesPage()" [class.active]="selectedElement == 'allProcessesTag'" class="box-hover exp-card d-flex flex-column" >
|
||||||
<div class="d-flex justify-center">
|
<div class="d-flex justify-center">
|
||||||
<!-- <ion-icon src="assets/images/icons-agenda.svg"></ion-icon> -->
|
<!-- <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 { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
|
||||||
import { NotificationsService } from 'src/app/services/notifications.service';
|
import { NotificationsService } from 'src/app/services/notifications.service';
|
||||||
import { DespachoService } from 'src/app/Rules/despacho.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 { SqliteService } from '../../services/sqlite.service';
|
||||||
import { synchro } from '../../services/socket/synchro.service';
|
import { synchro } from '../../services/socket/synchro.service';
|
||||||
@@ -126,7 +127,8 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
private notificationsService: NotificationsService,
|
private notificationsService: NotificationsService,
|
||||||
private despachoRule: DespachoService,
|
private despachoRule: DespachoService,
|
||||||
private sqliteservice: SqliteService,
|
private sqliteservice: SqliteService,
|
||||||
private platform: Platform
|
private platform: Platform,
|
||||||
|
private changeProfileService: ChangeProfileService
|
||||||
) {
|
) {
|
||||||
|
|
||||||
this.loggeduser = authService.ValidatedUser;
|
this.loggeduser = authService.ValidatedUser;
|
||||||
@@ -212,7 +214,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
|||||||
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Diploma Assinado')
|
allProcessesList = allProcessesList.filter(element => element.activityInstanceName != 'Diploma Assinado')
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(allProcessesList);
|
console.log('allProcessesList', allProcessesList);
|
||||||
|
|
||||||
this.addProcessToDB(allProcessesList)
|
this.addProcessToDB(allProcessesList)
|
||||||
this.skeletonLoader = true;
|
this.skeletonLoader = true;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
Parecer
|
Parecer
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
<ion-segment-button value="deferimento">
|
<ion-segment-button value="deferimento">
|
||||||
Defereimento
|
Deferimento
|
||||||
</ion-segment-button>
|
</ion-segment-button>
|
||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ import { environment } from 'src/environments/environment';
|
|||||||
import { AlertController } from '@ionic/angular';
|
import { AlertController } from '@ionic/angular';
|
||||||
import { NotificationsService } from 'src/app/services/notifications.service';
|
import { NotificationsService } from 'src/app/services/notifications.service';
|
||||||
import { SessionStore } from 'src/app/store/session.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({
|
@Component({
|
||||||
selector: 'app-login',
|
selector: 'app-login',
|
||||||
@@ -33,7 +34,8 @@ export class LoginPage implements OnInit {
|
|||||||
private authService: AuthService,
|
private authService: AuthService,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
public alertController: AlertController,
|
public alertController: AlertController,
|
||||||
private sqliteservice: SqliteService
|
private clearStoreService: ClearStoreService,
|
||||||
|
private changeProfileService: ChangeProfileService
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,8 +83,12 @@ export class LoginPage implements OnInit {
|
|||||||
BasicAuthKey: ""
|
BasicAuthKey: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const loader = this.toastService.loading()
|
||||||
|
|
||||||
let attempt = await this.authService.login(this.userattempt, {saveSession: false})
|
let attempt = await this.authService.login(this.userattempt, {saveSession: false})
|
||||||
|
|
||||||
|
loader.remove()
|
||||||
|
|
||||||
if (attempt) {
|
if (attempt) {
|
||||||
|
|
||||||
if (attempt.UserId == SessionStore.user.UserId) {
|
if (attempt.UserId == SessionStore.user.UserId) {
|
||||||
@@ -93,9 +99,14 @@ export class LoginPage implements OnInit {
|
|||||||
|
|
||||||
this.goback()
|
this.goback()
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
this.clearStoreService.clear()
|
||||||
SessionStore.delete()
|
SessionStore.delete()
|
||||||
window.localStorage.clear();
|
window.localStorage.clear();
|
||||||
|
|
||||||
await this.authService.SetSession(attempt, this.userattempt);
|
await this.authService.SetSession(attempt, this.userattempt);
|
||||||
|
|
||||||
|
this.changeProfileService.run()
|
||||||
await this.authService.loginChat(this.userattempt);
|
await this.authService.loginChat(this.userattempt);
|
||||||
this.router.navigate(['/pin']);
|
this.router.navigate(['/pin']);
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-1
@@ -95,6 +95,7 @@ export class PublicationDetailPage implements OnInit {
|
|||||||
if(this.isModal) {
|
if(this.isModal) {
|
||||||
this.close()
|
this.close()
|
||||||
} else {
|
} else {
|
||||||
|
// alert('go back')
|
||||||
this.location.back();
|
this.location.back();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,11 +109,15 @@ export class PublicationDetailPage implements OnInit {
|
|||||||
await this.publications.DeletePublication(this.folderId, this.publicationId).toPromise();
|
await this.publications.DeletePublication(this.folderId, this.publicationId).toPromise();
|
||||||
this.toastService.successMessage('Publicação eliminada')
|
this.toastService.successMessage('Publicação eliminada')
|
||||||
|
|
||||||
|
if(window['app-view-publications-page-doRefresh']) {
|
||||||
|
window['app-view-publications-page-doRefresh']()
|
||||||
|
}
|
||||||
|
|
||||||
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.toastService.badRequest('Publicaçao não eliminada')
|
this.toastService.badRequest('Publicaçao não eliminada')
|
||||||
} finally {
|
} finally {
|
||||||
loader.remove()
|
loader.remove()
|
||||||
this.goBack();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { AlertController, AnimationController } from '@ionic/angular';
|
import { AlertController, AnimationController } from '@ionic/angular';
|
||||||
|
import { ChatService } from './chat.service';
|
||||||
|
import { ToastService } from './toast.service';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
@@ -9,6 +11,8 @@ export class AlertService {
|
|||||||
constructor(
|
constructor(
|
||||||
public alertController: AlertController,
|
public alertController: AlertController,
|
||||||
private animationController: AnimationController,
|
private animationController: AnimationController,
|
||||||
|
private chatService: ChatService,
|
||||||
|
private toastService: ToastService,
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
async presentAlert(message:string) {
|
async presentAlert(message:string) {
|
||||||
@@ -36,4 +40,31 @@ export class AlertService {
|
|||||||
}, 2500);
|
}, 2500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async confirmDeleteMessage(body:any) {
|
||||||
|
const alert = await this.alertController.create({
|
||||||
|
cssClass: 'my-custom-class',
|
||||||
|
header: 'Apagar a mensagem?',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
text: 'Cancelar',
|
||||||
|
role: 'cancel',
|
||||||
|
cssClass: 'secondary',
|
||||||
|
handler: () => {
|
||||||
|
//console.log('Confirm Cancel');
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
text: 'Apagar',
|
||||||
|
handler: () => {
|
||||||
|
const loader = this.toastService.loading();
|
||||||
|
this.chatService.deleteMessage(body).subscribe(res=>{
|
||||||
|
loader.remove();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
await alert.present();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export class AuthService {
|
|||||||
async login(user: UserForm, {saveSession = true}): Promise<LoginUserRespose> {
|
async login(user: UserForm, {saveSession = true}): Promise<LoginUserRespose> {
|
||||||
user.BasicAuthKey = 'Basic ' + btoa(user.username + ':' + this.aesencrypt.encrypt(user.password,user.username ));
|
user.BasicAuthKey = 'Basic ' + btoa(user.username + ':' + this.aesencrypt.encrypt(user.password,user.username ));
|
||||||
|
|
||||||
this.headers = this.headers.set('Authorization',user.BasicAuthKey);
|
this.headers = this.headers.set('Authorization', user.BasicAuthKey);
|
||||||
this.opts = {
|
this.opts = {
|
||||||
headers: this.headers,
|
headers: this.headers,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { ChangeProfileService } from './change-profile.service';
|
||||||
|
|
||||||
|
describe('ChangeProfileService', () => {
|
||||||
|
let service: ChangeProfileService;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({});
|
||||||
|
service = TestBed.inject(ChangeProfileService);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be created', () => {
|
||||||
|
expect(service).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import { v4 as uuidv4 } from 'uuid'
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
export class ChangeProfileService {
|
||||||
|
|
||||||
|
|
||||||
|
callbacks: {
|
||||||
|
funx: Function
|
||||||
|
id: string
|
||||||
|
}[] = []
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
|
||||||
|
registerCallback(funx: Function, object: any = {} ) {
|
||||||
|
|
||||||
|
const id = uuidv4()
|
||||||
|
this.callbacks.push({funx, id})
|
||||||
|
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
deleteCallback(id) {
|
||||||
|
this.callbacks.forEach((e, index)=> {
|
||||||
|
if(e.id == id) {
|
||||||
|
if (index > -1) {
|
||||||
|
this.callbacks.splice(index, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
run() {
|
||||||
|
this.callbacks.forEach((e, index)=> {
|
||||||
|
e.funx()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -52,6 +52,7 @@ export class ChatService {
|
|||||||
getAllChannels(){
|
getAllChannels(){
|
||||||
return this.http.get(environment.apiChatUrl+'channels.list', this.options);
|
return this.http.get(environment.apiChatUrl+'channels.list', this.options);
|
||||||
}
|
}
|
||||||
|
|
||||||
getAllUserChannels(){
|
getAllUserChannels(){
|
||||||
return this.http.get(environment.apiChatUrl+'channels.list.joined', this.options);
|
return this.http.get(environment.apiChatUrl+'channels.list.joined', this.options);
|
||||||
}
|
}
|
||||||
@@ -59,6 +60,7 @@ export class ChatService {
|
|||||||
getAllRooms(){
|
getAllRooms(){
|
||||||
return this.http.get(environment.apiChatUrl+'rooms.get', this.options);
|
return this.http.get(environment.apiChatUrl+'rooms.get', this.options);
|
||||||
}
|
}
|
||||||
|
|
||||||
getRoomInfo(roomId:any){
|
getRoomInfo(roomId:any){
|
||||||
let params = new HttpParams();
|
let params = new HttpParams();
|
||||||
params = params.set("roomId", roomId);
|
params = params.set("roomId", roomId);
|
||||||
@@ -110,6 +112,14 @@ export class ChatService {
|
|||||||
}
|
}
|
||||||
return this.http.post(environment.apiChatUrl+'chat.sendMessage', body, opts);
|
return this.http.post(environment.apiChatUrl+'chat.sendMessage', body, opts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
deleteMessage(body:any){
|
||||||
|
let opts = {
|
||||||
|
headers: this.headers,
|
||||||
|
}
|
||||||
|
return this.http.post(environment.apiChatUrl+'chat.delete', body, opts);
|
||||||
|
}
|
||||||
|
|
||||||
leaveRoom(body:any){
|
leaveRoom(body:any){
|
||||||
let opts = {
|
let opts = {
|
||||||
headers: this.headers,
|
headers: this.headers,
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { ClearStoreService } from './clear-store.service';
|
||||||
|
|
||||||
|
describe('ClearStoreService', () => {
|
||||||
|
let service: ClearStoreService;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({});
|
||||||
|
service = TestBed.inject(ClearStoreService);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be created', () => {
|
||||||
|
expect(service).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
|
import { DespachoStore } from 'src/app/store/despacho-store.service';
|
||||||
|
import { EventoAprovacaoStore } from 'src/app/store/eventoaprovacao-store.service';
|
||||||
|
import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
|
||||||
|
import { PendentesStore } from 'src/app/store/pendestes-store.service';
|
||||||
|
import { PedidosStore } from 'src/app/store/pedidos-store.service';
|
||||||
|
import { DespachosprStore } from 'src/app/store/despachospr-store.service';
|
||||||
|
import { DeplomasStore } from '../store/deplomas.service';
|
||||||
|
import { CalendarStore } from 'src/app/store/calendar.service';
|
||||||
|
import { ToDayEventStorage } from '../store/to-day-event-storage.service';
|
||||||
|
import { TotalDocumentStore } from 'src/app/store/total-document.service';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
export class ClearStoreService {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
clear() {
|
||||||
|
|
||||||
|
DespachoStore.reset([])
|
||||||
|
EventoAprovacaoStore.resetmd([])
|
||||||
|
EventoAprovacaoStore.resetpr([])
|
||||||
|
ExpedienteGdStore.reset([])
|
||||||
|
PendentesStore.reset([])
|
||||||
|
PedidosStore.resetdeferimento([])
|
||||||
|
PedidosStore.resetparecer([])
|
||||||
|
DespachosprStore.reset([])
|
||||||
|
DeplomasStore.resetDiplomasAssinadoList([])
|
||||||
|
DeplomasStore.resetDiplomasList([])
|
||||||
|
DeplomasStore.resetDiplomasReview([])
|
||||||
|
CalendarStore.delete()
|
||||||
|
CalendarStore.ResetList([])
|
||||||
|
ToDayEventStorage.reset([])
|
||||||
|
TotalDocumentStore.resetCount(0)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,8 +4,9 @@ import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
|||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
import { AuthService } from '../services/auth.service';
|
import { AuthService } from '../services/auth.service';
|
||||||
import { LoginUserRespose, UserSession } from '../models/user.model';
|
import { UserSession } from '../models/user.model';
|
||||||
import { EventList } from '../models/agenda/AgendaEventList';
|
import { EventList } from '../models/agenda/AgendaEventList';
|
||||||
|
import { ChangeProfileService } from './change-profile.service';
|
||||||
|
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
@@ -25,10 +26,14 @@ export class EventsService {
|
|||||||
|
|
||||||
headersSharedOficial: HttpHeaders;
|
headersSharedOficial: HttpHeaders;
|
||||||
headersSharedPessoal: HttpHeaders;
|
headersSharedPessoal: HttpHeaders;
|
||||||
//lastloadedevent: Event;
|
|
||||||
|
|
||||||
constructor(private http: HttpClient, user: AuthService) {
|
constructor(
|
||||||
this.loggeduser = user.ValidatedUser;
|
private http: HttpClient,
|
||||||
|
public user: AuthService,
|
||||||
|
private changeProfileService: ChangeProfileService)
|
||||||
|
{
|
||||||
|
|
||||||
|
this.loggeduser = this.user.ValidatedUser;
|
||||||
|
|
||||||
this.headersMdOficial = new HttpHeaders();
|
this.headersMdOficial = new HttpHeaders();
|
||||||
this.headersMdPessoal = new HttpHeaders();
|
this.headersMdPessoal = new HttpHeaders();
|
||||||
@@ -39,6 +44,17 @@ export class EventsService {
|
|||||||
this.headersSharedOficial = new HttpHeaders();
|
this.headersSharedOficial = new HttpHeaders();
|
||||||
this.headersSharedPessoal = new HttpHeaders();
|
this.headersSharedPessoal = new HttpHeaders();
|
||||||
|
|
||||||
|
|
||||||
|
this.setHeader()
|
||||||
|
this.changeProfileService.registerCallback(()=>{
|
||||||
|
this.loggeduser = this.user.ValidatedUser;
|
||||||
|
this.setHeader()
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
setHeader() {
|
||||||
|
|
||||||
if(this.loggeduser){
|
if(this.loggeduser){
|
||||||
if(this.loggeduser.Profile == 'MDGPR') {
|
if(this.loggeduser.Profile == 'MDGPR') {
|
||||||
|
|
||||||
@@ -89,8 +105,6 @@ export class EventsService {
|
|||||||
this.headers = new HttpHeaders();
|
this.headers = new HttpHeaders();
|
||||||
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
|
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* getAllEvents(startdate:string, enddate:string): Observable<Event[]>{
|
/* getAllEvents(startdate:string, enddate:string): Observable<Event[]>{
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { Excludetask } from '../models/Excludetask';
|
|||||||
import { ExpedienteFullTask } from '../models/Expediente';
|
import { ExpedienteFullTask } from '../models/Expediente';
|
||||||
import { GetTasksListType } from '../models/GetTasksListType';
|
import { GetTasksListType } from '../models/GetTasksListType';
|
||||||
import { fullTaskList } from '../models/dailyworktask.model';
|
import { fullTaskList } from '../models/dailyworktask.model';
|
||||||
|
import { ChangeProfileService } from './change-profile.service';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
@@ -19,8 +20,25 @@ export class ProcessesService {
|
|||||||
loggeduser: LoginUserRespose;
|
loggeduser: LoginUserRespose;
|
||||||
headers: HttpHeaders;
|
headers: HttpHeaders;
|
||||||
|
|
||||||
constructor(private http: HttpClient, user: AuthService) {
|
constructor(
|
||||||
this.loggeduser = user.ValidatedUser;
|
private http: HttpClient,
|
||||||
|
public user: AuthService,
|
||||||
|
private changeProfileService: ChangeProfileService
|
||||||
|
) {
|
||||||
|
|
||||||
|
this.loggeduser = this.user.ValidatedUser;
|
||||||
|
|
||||||
|
this.setHeader()
|
||||||
|
this.changeProfileService.registerCallback(()=>{
|
||||||
|
this.loggeduser = this.user.ValidatedUser;
|
||||||
|
this.setHeader()
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setHeader() {
|
||||||
|
|
||||||
this.headers = new HttpHeaders();
|
this.headers = new HttpHeaders();
|
||||||
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
|
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||||
}
|
}
|
||||||
@@ -307,4 +325,19 @@ export class ProcessesService {
|
|||||||
return this.http.post<any>(`${url}`,body, options);
|
return this.http.post<any>(`${url}`,body, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getFileBase64(DocId: string | number) {
|
||||||
|
let url = environment.apiURL + 'ecm/document/file';
|
||||||
|
|
||||||
|
let params = new HttpParams();
|
||||||
|
|
||||||
|
params = params.set("docid", DocId);
|
||||||
|
|
||||||
|
let options: any = {
|
||||||
|
headers: this.headers,
|
||||||
|
params
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.http.get<any>(`${url}`, options);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,9 @@ class SynchroService {
|
|||||||
}[] = []
|
}[] = []
|
||||||
private msgQueue = []
|
private msgQueue = []
|
||||||
|
|
||||||
constructor(){}
|
constructor() {
|
||||||
|
// alert(SessionStore.user.FullName)
|
||||||
|
}
|
||||||
|
|
||||||
get connected() {
|
get connected() {
|
||||||
return this._connected
|
return this._connected
|
||||||
|
|||||||
@@ -153,6 +153,7 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
// description
|
// description
|
||||||
let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '')
|
let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '')
|
||||||
this.eventProcess.workflowInstanceDataFields.Body = body
|
this.eventProcess.workflowInstanceDataFields.Body = body
|
||||||
|
this.eventProcess.workflowInstanceDataFields.Category = this.eventProcess.workflowInstanceDataFields.EventType
|
||||||
|
|
||||||
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
|
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
|
||||||
this.getAttachments()
|
this.getAttachments()
|
||||||
@@ -171,7 +172,6 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onSelectedRecurringChanged(ev:any){
|
onSelectedRecurringChanged(ev:any){
|
||||||
console.log(ev);
|
|
||||||
if(ev.length > 1){
|
if(ev.length > 1){
|
||||||
console.log(ev.filter(data => data != '-1'));
|
console.log(ev.filter(data => data != '-1'));
|
||||||
this.eventProcess.workflowInstanceDataFields.OccurrenceType = ev.filter(data => data != '-1');
|
this.eventProcess.workflowInstanceDataFields.OccurrenceType = ev.filter(data => data != '-1');
|
||||||
@@ -215,9 +215,9 @@ export class EditEventToApprovePage implements OnInit {
|
|||||||
|
|
||||||
this.closeEventToApprove.emit();
|
this.closeEventToApprove.emit();
|
||||||
|
|
||||||
/* this.setIntervenient.emit([]);
|
this.setIntervenient.emit([]);
|
||||||
this.setIntervenientCC.emit([]);
|
this.setIntervenientCC.emit([]);
|
||||||
this.clearContact.emit(); */
|
this.clearContact.emit();
|
||||||
|
|
||||||
//this.deleteTemporaryData();
|
//this.deleteTemporaryData();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,9 +89,7 @@ export class EditEventPage implements OnInit {
|
|||||||
public alertController: AlertController,
|
public alertController: AlertController,
|
||||||
private attachmentsService: AttachmentsService,
|
private attachmentsService: AttachmentsService,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
) {
|
) {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import { ChatPopoverPageModule } from '../../popover/chat-popover/chat-popover.m
|
|||||||
import { NewEventPageModule } from '../../agenda/new-event/new-event.module';
|
import { NewEventPageModule } from '../../agenda/new-event/new-event.module';
|
||||||
import { PdfViewerModule } from 'ng2-pdf-viewer';
|
import { PdfViewerModule } from 'ng2-pdf-viewer';
|
||||||
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||||
|
import {MatMenuModule} from '@angular/material/menu';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -23,6 +24,7 @@ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|||||||
PdfViewerModule,
|
PdfViewerModule,
|
||||||
ChatPopoverPageModule,
|
ChatPopoverPageModule,
|
||||||
GroupMessagesPageRoutingModule,
|
GroupMessagesPageRoutingModule,
|
||||||
|
MatMenuModule
|
||||||
//
|
//
|
||||||
],
|
],
|
||||||
exports: [GroupMessagesPage],
|
exports: [GroupMessagesPage],
|
||||||
|
|||||||
@@ -32,14 +32,20 @@
|
|||||||
</ion-refresher-content>
|
</ion-refresher-content>
|
||||||
</ion-refresher>
|
</ion-refresher>
|
||||||
|
|
||||||
<div class="messages overflow-y-auto" #scrollMe>
|
<div class="messages" #scrollMe>
|
||||||
<div class="welcome-text">
|
<div class="welcome-text">
|
||||||
<ion-label> Esta conversa passou a grupo</ion-label><br />
|
<ion-label> Esta conversa passou a grupo</ion-label><br />
|
||||||
<ion-label>A conversa original mantêm-se como chat individual</ion-label>
|
<ion-label>A conversa original mantêm-se como chat individual</ion-label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container-width-100" *ngFor="let msg of messages; let last = last" #scrollMe>
|
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of messages; let last = last">
|
||||||
<div *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'ru'" class='incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45'>
|
<div class="message-item incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45" *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'ru'" >
|
||||||
|
<div class="message-item-options d-flex justify-content-end">
|
||||||
|
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer"></fa-icon>
|
||||||
|
<mat-menu #beforeMenu="matMenu" xPosition="before">
|
||||||
|
<button (click)="deleteMessage(msg._id)" class="menuButton">Apagar mensagem</button>
|
||||||
|
</mat-menu>
|
||||||
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<ion-label>{{msg.u.name}}</ion-label>
|
<ion-label>{{msg.u.name}}</ion-label>
|
||||||
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
|
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
|
||||||
|
|||||||
@@ -131,8 +131,18 @@
|
|||||||
.messages{
|
.messages{
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-family: Roboto;
|
font-family: Roboto;
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
|
//set scroll do bottom
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
word-wrap: break-word;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
|
||||||
.incoming-true, .incoming-false{
|
.incoming-true, .incoming-false{
|
||||||
padding: 15px 20px;
|
padding: 15px 20px;
|
||||||
|
|||||||
@@ -319,6 +319,16 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
|||||||
});
|
});
|
||||||
this.message = "";
|
this.message = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
deleteMessage(msgId:string){
|
||||||
|
let body = {
|
||||||
|
"roomId": this.roomId,
|
||||||
|
"msgId": msgId,
|
||||||
|
"asUser": false,
|
||||||
|
}
|
||||||
|
this.alertService.confirmDeleteMessage(body);
|
||||||
|
}
|
||||||
|
|
||||||
async openGroupMessagesOptions() {
|
async openGroupMessagesOptions() {
|
||||||
|
|
||||||
const enterAnimation = (baseEl: any) => {
|
const enterAnimation = (baseEl: any) => {
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import { MessagesPageRoutingModule } from './messages-routing.module';
|
|||||||
import { MessagesPage } from './messages.page';
|
import { MessagesPage } from './messages.page';
|
||||||
import { SharedModule } from 'src/app/shared/shared.module';
|
import { SharedModule } from 'src/app/shared/shared.module';
|
||||||
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||||
|
import { MatButtonModule } from '@angular/material/button';
|
||||||
|
import {MatMenuModule} from '@angular/material/menu';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -16,7 +18,10 @@ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|||||||
FormsModule,
|
FormsModule,
|
||||||
IonicModule,
|
IonicModule,
|
||||||
FontAwesomeModule,
|
FontAwesomeModule,
|
||||||
MessagesPageRoutingModule
|
MessagesPageRoutingModule,
|
||||||
|
MatButtonModule,
|
||||||
|
MatMenuModule
|
||||||
|
|
||||||
],
|
],
|
||||||
exports: [MessagesPage],
|
exports: [MessagesPage],
|
||||||
declarations: [MessagesPage]
|
declarations: [MessagesPage]
|
||||||
|
|||||||
@@ -34,14 +34,10 @@
|
|||||||
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of chatMessageStore.message[roomId]; let last = last">
|
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of chatMessageStore.message[roomId]; let last = last">
|
||||||
<div class='message-item incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45'>
|
<div class='message-item incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45'>
|
||||||
<div class="message-item-options d-flex justify-content-end">
|
<div class="message-item-options d-flex justify-content-end">
|
||||||
<fa-icon (click)="mesageItemDropdownOptions=true" icon="chevron-down" class="message-options-icon"></fa-icon>
|
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer"></fa-icon>
|
||||||
<!-- <div class="mesage-item-dropdown-options" *ngIf="mesageItemDropdownOptions">
|
<mat-menu #beforeMenu="matMenu" xPosition="before">
|
||||||
<ion-label>Apagar mensagem</ion-label>
|
<button (click)="deleteMessage(msg._id)" class="menuButton">Apagar mensagem</button>
|
||||||
</div> -->
|
</mat-menu>
|
||||||
<ion-select hidden class="message-options-icon" interface="popover">
|
|
||||||
<ion-select-option value="nes">Apagar mensagem</ion-select-option>
|
|
||||||
</ion-select>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<ion-label>{{msg.u.name}}</ion-label>
|
<ion-label>{{msg.u.name}}</ion-label>
|
||||||
|
|||||||
@@ -141,10 +141,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|||||||
let scroll = e.srcElement.scrollTop;
|
let scroll = e.srcElement.scrollTop;
|
||||||
let windowHeight = e.srcElement.scrollHeight;
|
let windowHeight = e.srcElement.scrollHeight;
|
||||||
let containerHeight = windowHeight - e.srcElement.clientHeight;
|
let containerHeight = windowHeight - e.srcElement.clientHeight;
|
||||||
console.log(containerHeight);
|
|
||||||
console.log(e.srcElement.clientHeight);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (scroll > this.currentPosition) {
|
if (scroll > this.currentPosition) {
|
||||||
//alert('BOTTOM');
|
//alert('BOTTOM');
|
||||||
@@ -196,6 +192,18 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|||||||
this.message = "";
|
this.message = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
deleteMessage(msgId:string){
|
||||||
|
let body = {
|
||||||
|
"roomId": this.roomId,
|
||||||
|
"msgId": msgId,
|
||||||
|
"asUser": false,
|
||||||
|
}
|
||||||
|
this.alertService.confirmDeleteMessage(body);
|
||||||
|
/* this.chatService.deleteMessage(body).subscribe(res=>{
|
||||||
|
console.log(res);
|
||||||
|
}); */
|
||||||
|
}
|
||||||
|
|
||||||
loadMessages(){
|
loadMessages(){
|
||||||
//this.showLoader = true;
|
//this.showLoader = true;
|
||||||
const roomId = this.roomId
|
const roomId = this.roomId
|
||||||
@@ -404,17 +412,17 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|||||||
const roomId = this.roomId;
|
const roomId = this.roomId;
|
||||||
|
|
||||||
this.chatService.getRoomMessages(this.roomId).subscribe(async res => {
|
this.chatService.getRoomMessages(this.roomId).subscribe(async res => {
|
||||||
console.log(res['success']);
|
//console.log(res['success']);
|
||||||
|
|
||||||
|
|
||||||
if (res['success'] == true) {
|
if (res['success'] == true) {
|
||||||
// Show Error
|
// Show Error
|
||||||
//showMessage(response.statusText);
|
//showMessage(response.statusText);
|
||||||
//this.loadMessages()
|
this.loadMessages()
|
||||||
this.messages = res['messages'].reverse();
|
this.messages = res['messages'].reverse();
|
||||||
this.chatMessageStore.add(roomId, this.messages)
|
this.chatMessageStore.add(roomId, this.messages)
|
||||||
|
|
||||||
console.log(this.messages);
|
//console.log(this.messages);
|
||||||
// Reconnect in one second
|
// Reconnect in one second
|
||||||
if(this.route.url != "/home/chat"){
|
if(this.route.url != "/home/chat"){
|
||||||
console.log("Timer message stop")
|
console.log("Timer message stop")
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<ion-header class="ion-no-border px-20">
|
<ion-header class="ion-no-border px-20">
|
||||||
<ion-toolbar class="px-10">
|
<ion-toolbar class="px-10">
|
||||||
<ion-title class="pa-0">Adicionar intervenientes</ion-title>
|
<ion-title class="pa-0">Adicionar intervenientes aganda</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
<ion-searchbar class="attendee-search-bar" (ionChange)="onChange($event)" placeholder="Insira email para adicionar destinatário"></ion-searchbar><!-- [(ngModel)]="searchCountryString" -->
|
<ion-searchbar class="attendee-search-bar" (ionChange)="onChange($event)" placeholder="Insira email para adicionar destinatário"></ion-searchbar><!-- [(ngModel)]="searchCountryString" -->
|
||||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { ModalController } from '@ionic/angular';
|
|||||||
import { ContactsService } from 'src/app/services/contacts.service';
|
import { ContactsService } from 'src/app/services/contacts.service';
|
||||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||||
import { slugify } from 'src/plugin/javascript-remove-accents.js';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-attendee-modal',
|
selector: 'app-attendee-modal',
|
||||||
@@ -64,10 +63,10 @@ export class AttendeePage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
save(){
|
save() {
|
||||||
|
|
||||||
this.setIntervenient.emit(this.LtaskParticipants);
|
this.setIntervenient.emit(removeDuplicate(this.LtaskParticipants));
|
||||||
this.setIntervenientCC.emit(this.LtaskParticipantsCc);
|
this.setIntervenientCC.emit(removeDuplicate(this.LtaskParticipantsCc));
|
||||||
|
|
||||||
this.closeComponent.emit();
|
this.closeComponent.emit();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
<div class="title-content">
|
<div class="title-content">
|
||||||
<div class="middle">
|
<div class="middle">
|
||||||
<ion-label class="title">Editar evento por aprovar</ion-label>
|
<ion-label class="title">Editar evento por aprovar::.</ion-label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|||||||
@@ -330,28 +330,26 @@ export class EditEventToApproveComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setIntervenient(data){
|
setIntervenient(data = []) {
|
||||||
this.taskParticipants = data;
|
this.taskParticipants = data;
|
||||||
this.postEvent.Attendees = data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setIntervenientCC(data) {
|
setIntervenientCC(data = []) {
|
||||||
this.taskParticipantsCc = data;
|
this.taskParticipantsCc = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
addParticipants(){
|
addParticipants() {
|
||||||
this.adding = 'intervenient'
|
this.adding = 'intervenient'
|
||||||
this.openAttendees();
|
this.openAttendees();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
addParticipantsCC(){
|
addParticipantsCC() {
|
||||||
|
|
||||||
this.adding = 'CC'
|
this.adding = 'CC'
|
||||||
this.openAttendees();
|
this.openAttendees();
|
||||||
}
|
}
|
||||||
|
|
||||||
dynamicSetIntervenient({taskParticipants, taskParticipantsCc}){
|
dynamicSetIntervenient({taskParticipants, taskParticipantsCc}) {
|
||||||
this.taskParticipants = taskParticipants;
|
this.taskParticipants = taskParticipants;
|
||||||
this.taskParticipantsCc = taskParticipantsCc;
|
this.taskParticipantsCc = taskParticipantsCc;
|
||||||
}
|
}
|
||||||
@@ -367,7 +365,7 @@ export class EditEventToApproveComponent implements OnInit {
|
|||||||
|
|
||||||
this.loadedAttachments = result
|
this.loadedAttachments = result
|
||||||
|
|
||||||
console.log('this.loadedAttachments', this.loadedAttachments, result)
|
// console.log('this.loadedAttachments', this.loadedAttachments, result)
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteAttachment(attachment: Attachment, index) {
|
deleteAttachment(attachment: Attachment, index) {
|
||||||
|
|||||||
+4
@@ -88,12 +88,16 @@ export class PublicationDetailPage implements OnInit {
|
|||||||
|
|
||||||
async deletePost(){
|
async deletePost(){
|
||||||
|
|
||||||
|
const laoder = this.toastService.loading()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.publications.DeletePublication(this.folderId, this.publicationId).toPromise();
|
await this.publications.DeletePublication(this.folderId, this.publicationId).toPromise();
|
||||||
this.toastService.successMessage("Publicação eliminado")
|
this.toastService.successMessage("Publicação eliminado")
|
||||||
this.goBackToViewPublications.emit();
|
this.goBackToViewPublications.emit();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.toastService.badRequest("Publicação não eliminado")
|
this.toastService.badRequest("Publicação não eliminado")
|
||||||
|
} finally {
|
||||||
|
laoder.remove()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { eventSource } from '../models/agenda/eventSource';
|
import { eventSource } from '../models/agenda/eventSource';
|
||||||
import { SHA1, SHA256, AES, enc } from 'crypto-js'
|
import { SHA1, SHA256, AES, enc } from 'crypto-js'
|
||||||
import { LocalstoreService } from './localstore.service'
|
import { localstoreService } from './localstore.service'
|
||||||
import { EventList, EventListStore } from '../models/agenda/AgendaEventList';
|
import { EventList, EventListStore } from '../models/agenda/AgendaEventList';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
@@ -13,11 +13,13 @@ export class CalendarService {
|
|||||||
private _eventSource : EventListStore[] = []
|
private _eventSource : EventListStore[] = []
|
||||||
private keyName: string;
|
private keyName: string;
|
||||||
|
|
||||||
constructor(private localstoreService: LocalstoreService) {
|
localstoreService = localstoreService
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
|
||||||
this.keyName = (SHA1(this.constructor.name+ 'eventSource')).toString()
|
this.keyName = (SHA1(this.constructor.name+ 'eventSource')).toString()
|
||||||
|
|
||||||
let restore = localstoreService.get(this.keyName, [])
|
let restore = this.localstoreService.get(this.keyName, [])
|
||||||
|
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
restore.forEach((element:EventListStore, eventIndex) => {
|
restore.forEach((element:EventListStore, eventIndex) => {
|
||||||
@@ -46,7 +48,7 @@ export class CalendarService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get eventSource() {
|
get eventSource() {
|
||||||
return this._eventSource
|
return this._eventSource || []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -93,4 +95,11 @@ export class CalendarService {
|
|||||||
}, 10)
|
}, 10)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
delete() {
|
||||||
|
this._eventSource = []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export const CalendarStore = new CalendarService()
|
||||||
File diff suppressed because it is too large
Load Diff
+56522
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user