mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
Generated
+21
@@ -3722,6 +3722,11 @@
|
|||||||
"integrity": "sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==",
|
"integrity": "sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"@types/uuid": {
|
||||||
|
"version": "8.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.1.tgz",
|
||||||
|
"integrity": "sha512-Y2mHTRAbqfFkpjldbkHGY8JIzRN6XqYRliG8/24FcHm2D2PwW24fl5xMRTVGdrb7iMrwCaIEbLWerGIkXuFWVg=="
|
||||||
|
},
|
||||||
"@types/webpack-sources": {
|
"@types/webpack-sources": {
|
||||||
"version": "0.1.8",
|
"version": "0.1.8",
|
||||||
"resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-0.1.8.tgz",
|
"resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-0.1.8.tgz",
|
||||||
@@ -19762,6 +19767,22 @@
|
|||||||
"integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==",
|
"integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"uuidv4": {
|
||||||
|
"version": "6.2.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/uuidv4/-/uuidv4-6.2.11.tgz",
|
||||||
|
"integrity": "sha512-OTS4waH9KplrXNADKo+Q1kT9AHWr8DaC0S5F54RQzEwcUaEzBEWQQlJyDUw/u1bkRhJyqkqhLD4M4lbFbV+89g==",
|
||||||
|
"requires": {
|
||||||
|
"@types/uuid": "8.3.1",
|
||||||
|
"uuid": "8.3.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"uuid": {
|
||||||
|
"version": "8.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
|
||||||
|
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"valid-identifier": {
|
"valid-identifier": {
|
||||||
"version": "0.0.2",
|
"version": "0.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/valid-identifier/-/valid-identifier-0.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/valid-identifier/-/valid-identifier-0.0.2.tgz",
|
||||||
|
|||||||
@@ -79,6 +79,7 @@
|
|||||||
"sharp": "^0.25.4",
|
"sharp": "^0.25.4",
|
||||||
"socket.io-client": "^2.3.0",
|
"socket.io-client": "^2.3.0",
|
||||||
"tslib": "^2.0.0",
|
"tslib": "^2.0.0",
|
||||||
|
"uuidv4": "^6.2.11",
|
||||||
"wordcloud": "^1.1.2",
|
"wordcloud": "^1.1.2",
|
||||||
"ws": "^7.4.6",
|
"ws": "^7.4.6",
|
||||||
"zone.js": "~0.10.2"
|
"zone.js": "~0.10.2"
|
||||||
|
|||||||
@@ -183,7 +183,10 @@ export class AgendaPage implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.profile = "mdgpr";
|
this.profile = "mdgpr";
|
||||||
|
|
||||||
|
const pathname = window.location.pathname
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
|
|
||||||
if(event instanceof NavigationEnd && event.url == "/home/agenda") {
|
if(event instanceof NavigationEnd && event.url == "/home/agenda") {
|
||||||
if (this.segment == null){
|
if (this.segment == null){
|
||||||
this.segment = "Combinado";
|
this.segment = "Combinado";
|
||||||
|
|||||||
@@ -256,23 +256,24 @@
|
|||||||
</ion-label>
|
</ion-label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="d-flex container-div width-100" *ngFor="let document of loadedEventAttachments" >
|
<div class="d-flex container-div width-100" *ngFor="let document of loadedEventAttachments; let i = index" >
|
||||||
<ion-list class="width-100 list">
|
<ion-list class="width-100 list" *ngIf="!document.remove">
|
||||||
<ion-item class="width-100 ion-no-border ion-no-padding">
|
<ion-item class="width-100 ion-no-border ion-no-padding">
|
||||||
<ion-label class="width-100">
|
<ion-label class="width-100">
|
||||||
<p class="p-item-title d-flex ion-justify-content-between">
|
<p class="p-item-title d-flex ion-justify-content-between">
|
||||||
<span class="attach-title-item">{{document.SourceName}}</span>
|
<span class="attach-title-item">{{document.SourceName}}</span>
|
||||||
<span class="close-button text-black" (click)="deleteAttachment(document.Id)" >
|
<span class="close-button text-black" (click)="deleteAttachment(document.Id, i)" >
|
||||||
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
|
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p><span class="span-left">{{document.Stakeholders}}</span></p>
|
<!-- <p *ngIf="document.Stakeholders" ><span class="span-left" >{{document.Stakeholders}}</span></p> -->
|
||||||
<p>
|
<p>
|
||||||
<span class="app-name span-left" *ngIf="document.ApplicationId == 8"> Correspondência </span>
|
<span class="app-name span-left" *ngIf="document.ApplicationId == 8"> Correspondência </span>
|
||||||
<span class="app-name span-left" *ngIf="document.ApplicationId == 386"> Acções Presidenciais </span>
|
<span class="app-name span-left" *ngIf="document.ApplicationId == 386"> Acções Presidenciais </span>
|
||||||
<span class="app-name span-left" *ngIf="document.ApplicationId == 361 "> Arquivo Despacho Electrónico </span>
|
<span class="app-name span-left" *ngIf="document.ApplicationId == 361 "> Arquivo Despacho Electrónico </span>
|
||||||
|
|
||||||
<span class="span-right"> {{document.CreateDate | date: 'dd-MM-yy'}} </span></p>
|
<!-- <span class="span-right" *ngIf="document.CreateDate"> {{document.CreateDate | date: 'dd-MM-yy'}} </span> -->
|
||||||
|
</p>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export class EditEventPage implements OnInit {
|
|||||||
selectedRecurringType: any;
|
selectedRecurringType: any;
|
||||||
|
|
||||||
|
|
||||||
loadedEventAttachments: Attachment[];
|
loadedEventAttachments: Attachment[] = [];
|
||||||
taskParticipants: any = [];
|
taskParticipants: any = [];
|
||||||
taskParticipantsCc: any = [];
|
taskParticipantsCc: any = [];
|
||||||
adding: "intervenient" | "CC" = "intervenient";
|
adding: "intervenient" | "CC" = "intervenient";
|
||||||
@@ -212,6 +212,40 @@ export class EditEventPage implements OnInit {
|
|||||||
this.toastService.badRequest()
|
this.toastService.badRequest()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.saveDocument()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
saveDocument() {
|
||||||
|
|
||||||
|
this.loadedEventAttachments.forEach((e)=>{
|
||||||
|
|
||||||
|
const id: any = e.Id
|
||||||
|
const remove = e['remove']
|
||||||
|
|
||||||
|
if ( id == 'add') {
|
||||||
|
//data.selected
|
||||||
|
const DocumentToSave = {
|
||||||
|
SourceTitle: e.SourceName,
|
||||||
|
ParentId: this.postEvent.EventId,
|
||||||
|
Source: '1',
|
||||||
|
SourceId: e.SourceId,
|
||||||
|
ApplicationId: e.ApplicationId.toString(),
|
||||||
|
Id: '0',
|
||||||
|
Link: '',
|
||||||
|
SerialNumber: '',
|
||||||
|
};
|
||||||
|
|
||||||
|
this.attachmentsService.setEventAttachmentById(DocumentToSave).subscribe(()=>{
|
||||||
|
this.getAttachments(this.postEvent.EventId);
|
||||||
|
});
|
||||||
|
|
||||||
|
} else if(remove) {
|
||||||
|
this.attachmentsService.deleteEventAttachmentById(e.Id).subscribe( res=> {})
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async openAttendees() {
|
async openAttendees() {
|
||||||
@@ -281,12 +315,17 @@ export class EditEventPage implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteAttachment(attachmentID: string) {
|
deleteAttachment(attachmentID: string, index) {
|
||||||
|
|
||||||
|
const id: any = this.loadedEventAttachments[index].Id
|
||||||
|
|
||||||
|
if(id == 'add') {
|
||||||
|
this.loadedEventAttachments = this.loadedEventAttachments.filter((e,i)=> i!=index)
|
||||||
|
} else {
|
||||||
|
this.loadedEventAttachments[index]['remove'] = true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.attachmentsService.deleteEventAttachmentById(attachmentID).subscribe(
|
|
||||||
res=>{
|
|
||||||
this.loadedEventAttachments = this.loadedEventAttachments.filter(e=> e.Id.toString() != attachmentID);
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getDoc() {
|
async getDoc() {
|
||||||
@@ -300,27 +339,30 @@ export class EditEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss().then( async (res)=>{
|
modal.onDidDismiss().then( async (res)=> {
|
||||||
if(res){
|
if(res) {
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
//data.selected
|
|
||||||
const DocumentToSave = {
|
const ApplicationIdDocumentToSave: any = {
|
||||||
SourceTitle: data.selected.Assunto,
|
SourceName: data.selected.Assunto,
|
||||||
ParentId: this.postEvent.EventId,
|
ParentId: this.postEvent.EventId,
|
||||||
Source: '1',
|
|
||||||
SourceId: data.selected.Id,
|
SourceId: data.selected.Id,
|
||||||
|
Stakeholders: false,
|
||||||
ApplicationId: data.selected.ApplicationType.toString(),
|
ApplicationId: data.selected.ApplicationType.toString(),
|
||||||
Id: '0',
|
CreateDate: false,
|
||||||
|
// needed to attach this document
|
||||||
|
Id: 'add',
|
||||||
|
SourceTitle: data.selected.Assunto,
|
||||||
|
Source: '1',
|
||||||
Link: '',
|
Link: '',
|
||||||
SerialNumber: '',
|
SerialNumber: '',
|
||||||
};
|
}
|
||||||
|
|
||||||
await this.attachmentsService.setEventAttachmentById(DocumentToSave).subscribe(()=>{
|
console.log( this.loadedEventAttachments)
|
||||||
this.getAttachments(this.postEvent.EventId);
|
this.loadedEventAttachments.push(ApplicationIdDocumentToSave)
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -14,14 +14,13 @@ import { FormGroup, FormBuilder, Validators } from "@angular/forms";
|
|||||||
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||||
import { AttachmentsPage } from '../attachments/attachments.page';
|
import { AttachmentsPage } from '../attachments/attachments.page';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-edit-event',
|
selector: 'app-edit-event',
|
||||||
templateUrl: './edit-event.page.html',
|
templateUrl: './edit-event.page.html',
|
||||||
styleUrls: ['./edit-event.page.scss'],
|
styleUrls: ['./edit-event.page.scss'],
|
||||||
})
|
})
|
||||||
export class EditEventPage implements OnInit {
|
|
||||||
|
|
||||||
|
export class EditEventPage implements OnInit {
|
||||||
|
|
||||||
loadedEvent: Event;
|
loadedEvent: Event;
|
||||||
loadedEventAttachments: Attachment[];
|
loadedEventAttachments: Attachment[];
|
||||||
|
|||||||
@@ -97,8 +97,10 @@ export class EventsPage implements OnInit {
|
|||||||
|
|
||||||
this.showGreeting();
|
this.showGreeting();
|
||||||
|
|
||||||
|
const pathname = window.location.pathname
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||||
this.RefreshEvents();
|
this.RefreshEvents();
|
||||||
this.LoadList();
|
this.LoadList();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,8 +64,11 @@ export class DespachosPrPage implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
//Inicializar segment
|
//Inicializar segment
|
||||||
this.segment = "despachos";
|
this.segment = "despachos";
|
||||||
|
|
||||||
|
const pathname = window.location.pathname
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||||
this.LoadList();
|
this.LoadList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -39,8 +39,11 @@ constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
|
const pathname = window.location.pathname
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||||
this.refreshing();
|
this.refreshing();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -36,8 +36,10 @@ export class EventListPage implements OnInit {
|
|||||||
|
|
||||||
this.LoadToApproveEvents();
|
this.LoadToApproveEvents();
|
||||||
|
|
||||||
|
const pathname = window.location.pathname
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||||
this.LoadToApproveEvents();
|
this.LoadToApproveEvents();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -40,8 +40,11 @@ export class ExpedientePage implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.LoadList();
|
this.LoadList();
|
||||||
|
|
||||||
|
const pathname = window.location.pathname
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||||
this.LoadList();
|
this.LoadList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -40,8 +40,11 @@ export class ExpedientesPrPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
|
const pathname = window.location.pathname
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||||
this.refreshing();
|
this.refreshing();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ export class GabineteDigitalPage implements OnInit {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.checkRoutes();
|
this.checkRoutes();
|
||||||
this.checkUser();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,9 +111,15 @@ export class GabineteDigitalPage implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
const pathname = window.location.pathname
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||||
|
this.checkRoutes();
|
||||||
this.LoadCounts();
|
this.LoadCounts();
|
||||||
|
console.log('yes', pathname)
|
||||||
|
} else {
|
||||||
|
console.log('not')
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -189,7 +194,7 @@ export class GabineteDigitalPage implements OnInit {
|
|||||||
this.selectedElement='DiplomasAssinar';
|
this.selectedElement='DiplomasAssinar';
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.checkRoutes();
|
this.checkUser();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,8 +38,10 @@ export class PendentesPage implements OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
//Inicializar segment
|
//Inicializar segment
|
||||||
this.segment = "despachos";
|
this.segment = "despachos";
|
||||||
|
|
||||||
|
const pathname = window.location.pathname
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||||
this.refreshing();
|
this.refreshing();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -67,8 +67,11 @@ export class PublicationsPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
|
const pathname = window.location.pathname
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||||
this.getActions();
|
this.getActions();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -463,15 +463,15 @@ export class SearchPage implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
clearInputRemetente() {
|
clearInputRemetente(){
|
||||||
this.searchSender = "";
|
this.searchSender = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
clearInputDocumentDate() {
|
clearInputDocumentDate(){
|
||||||
this.searchDocumentDate = "";
|
this.searchDocumentDate = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
clearInputOrganicEntity() {
|
clearInputOrganicEntity(){
|
||||||
this.searchOrganicEntiry = "";
|
this.searchOrganicEntiry = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -531,10 +531,10 @@ export class SearchPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async filterDocList(categoryName:string) {
|
async filterDocList(categoryName:string){
|
||||||
|
|
||||||
// show all category
|
// show all category
|
||||||
if(this. showCategory == categoryName ) {
|
if(this. showCategory == categoryName ){
|
||||||
|
|
||||||
this.showSearchDocuments = this.searchDocuments;
|
this.showSearchDocuments = this.searchDocuments;
|
||||||
|
|
||||||
@@ -562,12 +562,12 @@ export class SearchPage implements OnInit {
|
|||||||
const ApplicationType = searchDocument.ApplicationType.toString()
|
const ApplicationType = searchDocument.ApplicationType.toString()
|
||||||
const Id = searchDocument.Id
|
const Id = searchDocument.Id
|
||||||
|
|
||||||
if(this.select == false) {
|
if(this.select == false){
|
||||||
if(this.type == "Agenda") {
|
if(this.type == "Agenda") {
|
||||||
|
|
||||||
const modal = await this.modalCtrl.create({
|
const modal = await this.modalCtrl.create({
|
||||||
component: ViewEventPage,
|
component: ViewEventPage,
|
||||||
componentProps: {
|
componentProps:{
|
||||||
eventId: Id
|
eventId: Id
|
||||||
},
|
},
|
||||||
cssClass: 'modal modal-desktop',
|
cssClass: 'modal modal-desktop',
|
||||||
@@ -575,7 +575,7 @@ export class SearchPage implements OnInit {
|
|||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss().then((res)=>{});
|
modal.onDidDismiss().then((res)=>{});
|
||||||
|
|
||||||
} else if(this.type == "AccoesPresidenciais") {
|
} else if(this.type == "AccoesPresidenciais"){
|
||||||
|
|
||||||
this.viewPublicationDetail(Id);
|
this.viewPublicationDetail(Id);
|
||||||
}
|
}
|
||||||
@@ -585,8 +585,6 @@ export class SearchPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
|
||||||
console.log('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!', this.select)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -261,8 +261,8 @@
|
|||||||
</ion-label>
|
</ion-label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="d-flex container-div width-100" *ngFor="let document of loadedEventAttachments" >
|
<div class="d-flex container-div width-100" *ngFor="let document of loadedEventAttachments; let i = index" >
|
||||||
<ion-list class="width-100 list">
|
<ion-list class="width-100 list" *ngIf="!document.remove">
|
||||||
<ion-item class="width-100">
|
<ion-item class="width-100">
|
||||||
<ion-label class="width-100">
|
<ion-label class="width-100">
|
||||||
<p class="d-flex ion-justify-content-between">
|
<p class="d-flex ion-justify-content-between">
|
||||||
@@ -270,7 +270,7 @@
|
|||||||
<span class="app-name" *ngIf="document.ApplicationId == '8'"> Correspondencia </span>
|
<span class="app-name" *ngIf="document.ApplicationId == '8'"> Correspondencia </span>
|
||||||
<span class="app-name" *ngIf="document.ApplicationId == '386'"> AccoesPresidenciais </span>
|
<span class="app-name" *ngIf="document.ApplicationId == '386'"> AccoesPresidenciais </span>
|
||||||
<span class="app-name" *ngIf="document.ApplicationId == '361' "> ArquivoDespachoElect </span>
|
<span class="app-name" *ngIf="document.ApplicationId == '361' "> ArquivoDespachoElect </span>
|
||||||
<span class="close-button text-black cursor-pointer" (click)="deleteAttachment(document.Id)" >
|
<span class="close-button text-black cursor-pointer" (click)="deleteAttachment(document.Id, i)" >
|
||||||
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
|
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export class EditEventPage implements OnInit {
|
|||||||
segment:string = "true";
|
segment:string = "true";
|
||||||
eventAttendees: EventPerson[];
|
eventAttendees: EventPerson[];
|
||||||
// minDate: string;
|
// minDate: string;
|
||||||
loadedEventAttachments: Attachment[];
|
loadedEventAttachments: Attachment[]=[];
|
||||||
|
|
||||||
public date: any;
|
public date: any;
|
||||||
public disabled = false;
|
public disabled = false;
|
||||||
@@ -221,6 +221,41 @@ export class EditEventPage implements OnInit {
|
|||||||
this.clearPostEvent.emit();
|
this.clearPostEvent.emit();
|
||||||
this.deleteTemporaryData();
|
this.deleteTemporaryData();
|
||||||
this.close();
|
this.close();
|
||||||
|
|
||||||
|
this.saveDocument()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
saveDocument() {
|
||||||
|
|
||||||
|
this.loadedEventAttachments.forEach((e)=>{
|
||||||
|
|
||||||
|
const id: any = e.Id
|
||||||
|
const remove = e['remove']
|
||||||
|
|
||||||
|
if ( id == 'add') {
|
||||||
|
//data.selected
|
||||||
|
const DocumentToSave = {
|
||||||
|
SourceTitle: e.SourceName,
|
||||||
|
ParentId: this.postEvent.EventId,
|
||||||
|
Source: '1',
|
||||||
|
SourceId: e.SourceId,
|
||||||
|
ApplicationId: e.ApplicationId.toString(),
|
||||||
|
Id: '0',
|
||||||
|
Link: '',
|
||||||
|
SerialNumber: '',
|
||||||
|
};
|
||||||
|
|
||||||
|
this.attachmentsService.setEventAttachmentById(DocumentToSave).subscribe(()=>{
|
||||||
|
this.getAttachments(this.postEvent.EventId);
|
||||||
|
});
|
||||||
|
|
||||||
|
} else if(remove) {
|
||||||
|
this.attachmentsService.deleteEventAttachmentById(e.Id).subscribe( res=> {})
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async addParticipants() {
|
async addParticipants() {
|
||||||
@@ -300,12 +335,17 @@ export class EditEventPage implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteAttachment(attachmentID: string) {
|
deleteAttachment(attachmentID: string, index) {
|
||||||
|
|
||||||
|
const id: any = this.loadedEventAttachments[index].Id
|
||||||
|
|
||||||
|
if(id == 'add') {
|
||||||
|
this.loadedEventAttachments = this.loadedEventAttachments.filter((e,i)=> i!=index)
|
||||||
|
} else {
|
||||||
|
this.loadedEventAttachments[index]['remove'] = true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.attachmentsService.deleteEventAttachmentById(attachmentID).subscribe(
|
|
||||||
res=>{
|
|
||||||
this.loadedEventAttachments = this.loadedEventAttachments.filter(e=> e.Id.toString() != attachmentID);
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -323,21 +363,25 @@ export class EditEventPage implements OnInit {
|
|||||||
modal.onDidDismiss().then( async (res)=>{
|
modal.onDidDismiss().then( async (res)=>{
|
||||||
if(res){
|
if(res){
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
//data.selected
|
|
||||||
const DocumentToSave = {
|
const ApplicationIdDocumentToSave: any = {
|
||||||
SourceTitle: data.selected.Assunto,
|
SourceName: data.selected.Assunto,
|
||||||
ParentId: this.postEvent.EventId,
|
ParentId: this.postEvent.EventId,
|
||||||
Source: '1',
|
|
||||||
SourceId: data.selected.Id,
|
SourceId: data.selected.Id,
|
||||||
|
Stakeholders: false,
|
||||||
ApplicationId: data.selected.ApplicationType.toString(),
|
ApplicationId: data.selected.ApplicationType.toString(),
|
||||||
Id: '0',
|
CreateDate: false,
|
||||||
|
// needed to attach this document
|
||||||
|
Id: 'add',
|
||||||
|
SourceTitle: data.selected.Assunto,
|
||||||
|
Source: '1',
|
||||||
Link: '',
|
Link: '',
|
||||||
SerialNumber: '',
|
SerialNumber: '',
|
||||||
};
|
}
|
||||||
|
|
||||||
|
console.log( this.loadedEventAttachments)
|
||||||
|
this.loadedEventAttachments.push(ApplicationIdDocumentToSave)
|
||||||
|
|
||||||
await this.attachmentsService.setEventAttachmentById(DocumentToSave).subscribe(()=>{
|
|
||||||
this.getAttachments(this.postEvent.EventId);
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ export class EventListPage implements OnInit {
|
|||||||
@Output() approveEventDismiss = new EventEmitter<any>();
|
@Output() approveEventDismiss = new EventEmitter<any>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private processes:ProcessesService,
|
private processes:ProcessesService,
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
@@ -46,8 +45,10 @@ export class EventListPage implements OnInit {
|
|||||||
|
|
||||||
this.LoadToApproveEvents();
|
this.LoadToApproveEvents();
|
||||||
|
|
||||||
|
const pathname = window.location.pathname
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||||
this.LoadToApproveEvents();
|
this.LoadToApproveEvents();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -65,8 +65,11 @@ ngOnInit() {
|
|||||||
//Inicializar segment
|
//Inicializar segment
|
||||||
this.segment = "despachos";
|
this.segment = "despachos";
|
||||||
this.LoadList();
|
this.LoadList();
|
||||||
|
|
||||||
|
const pathname = window.location.pathname
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||||
this.doRefresh();
|
this.doRefresh();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -65,8 +65,10 @@ export class DespachosPage implements OnInit {
|
|||||||
//Inicializar segment
|
//Inicializar segment
|
||||||
this.segment = "despachos";
|
this.segment = "despachos";
|
||||||
this.LoadList();
|
this.LoadList();
|
||||||
|
|
||||||
|
const pathname = window.location.pathname
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||||
this.doRefresh();
|
this.doRefresh();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -32,8 +32,10 @@ serialNumber:string;
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.LoadList();
|
this.LoadList();
|
||||||
|
|
||||||
|
const pathname = window.location.pathname
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||||
this.doRefresh();
|
this.doRefresh();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -30,8 +30,11 @@ constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
|
const pathname = window.location.pathname
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||||
this.refreshing();
|
this.refreshing();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -40,8 +40,10 @@ export class EventsToApprovePage implements OnInit {
|
|||||||
|
|
||||||
this.LoadToApproveEvents();
|
this.LoadToApproveEvents();
|
||||||
|
|
||||||
|
const pathname = window.location.pathname
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||||
this.LoadToApproveEvents();
|
this.LoadToApproveEvents();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -39,8 +39,11 @@ export class ExpedientesPrPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
|
const pathname = window.location.pathname
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||||
this.refreshing();
|
this.refreshing();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -42,8 +42,10 @@ export class ExpedientsPage implements OnInit {
|
|||||||
//Inicializar segment
|
//Inicializar segment
|
||||||
this.segment = "expedientes";
|
this.segment = "expedientes";
|
||||||
this.LoadList();
|
this.LoadList();
|
||||||
|
|
||||||
|
const pathname = window.location.pathname
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||||
this.LoadList();
|
this.LoadList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -49,8 +49,10 @@ export class PedidosPage implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.LoadList();
|
this.LoadList();
|
||||||
|
|
||||||
|
const pathname = window.location.pathname
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||||
this.doRefresh();
|
this.doRefresh();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -46,8 +46,10 @@ export class PendentesPage implements OnInit {
|
|||||||
this.segment = "despachos";
|
this.segment = "despachos";
|
||||||
this.LoadList();
|
this.LoadList();
|
||||||
|
|
||||||
|
const pathname = window.location.pathname
|
||||||
|
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
if(event instanceof NavigationEnd && event.url == pathname) {
|
||||||
this.LoadList();
|
this.LoadList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user