diff --git a/src/app/home/home.page.html b/src/app/home/home.page.html index 86e8b92b3..50aec61e2 100644 --- a/src/app/home/home.page.html +++ b/src/app/home/home.page.html @@ -20,7 +20,7 @@ - Acções + Ações diff --git a/src/app/models/attachment.model.ts b/src/app/models/attachment.model.ts index c7d8a04ad..0ce74ed89 100644 --- a/src/app/models/attachment.model.ts +++ b/src/app/models/attachment.model.ts @@ -2,6 +2,7 @@ export class Attachment { Id: number; ParentId: string; Sources: Sources; + Source?: Sources; SourceId: string; Description: string; SourceName: string; @@ -18,4 +19,18 @@ export enum Sources K2 = 2, Exchange = 3, File = 4 +} + + +export class EventAttachment { + + Id?: string; // id do evento + ParentId: string; + Source: string; + SourceId: string; + Link?: string; + SerialNumber?: string; + ApplicationId: string; + SourceTitle: string; + } \ No newline at end of file diff --git a/src/app/models/event.model.ts b/src/app/models/event.model.ts index b6be60e83..46961931d 100644 --- a/src/app/models/event.model.ts +++ b/src/app/models/event.model.ts @@ -1,5 +1,6 @@ import { EventBody } from './eventbody.model'; import { EventPerson } from './eventperson.model'; +import { SearchDocument } from './search-document'; export class Event{ EventId: string; @@ -19,4 +20,5 @@ export class Event{ Organizer: string; Categories: string[]; HasAttachments: boolean; + // documents?: SearchDocument[] } \ No newline at end of file diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html index a08be14a4..80ebd92f0 100644 --- a/src/app/pages/agenda/agenda.page.html +++ b/src/app/pages/agenda/agenda.page.html @@ -466,6 +466,7 @@ > + - - + + Cancelar diff --git a/src/app/pages/agenda/new-event/new-event.page.scss b/src/app/pages/agenda/new-event/new-event.page.scss index 2d1ca8abb..c0cf6f573 100644 --- a/src/app/pages/agenda/new-event/new-event.page.scss +++ b/src/app/pages/agenda/new-event/new-event.page.scss @@ -18,7 +18,6 @@ ion-content{ transform: translate3d(0, 1px, 0); .title-content{ - padding: 0px 20px; margin: 0px auto; overflow: auto; background: #fff; @@ -45,7 +44,8 @@ ion-content{ padding: 15px 20px 0 20px; .ion-item-container{ - width: 360px; + flex: 1; + width: 100%; margin: 15px auto; border: 1px solid #ebebeb; border-radius: 5px; @@ -62,7 +62,7 @@ ion-content{ overflow: auto; } .ion-item-class-2{ - width: 360px; + display: flex; margin: 0px auto; } .ion-icon-class{ @@ -77,18 +77,18 @@ ion-content{ margin-left: 0; } .ion-input-class{ - width: 315px; height: 45px; border: 1px solid #ebebeb; border-radius: 5px; padding-left: 5px; padding-right: 10px; float: left; + flex: 1; } .ion-input-class-no-height{ border: 1px solid #ebebeb; border-radius: 5px; - overflow: auto; + flex: 1; } .list-people{ width: 256px; diff --git a/src/app/pages/agenda/new-event/new-event.page.ts b/src/app/pages/agenda/new-event/new-event.page.ts index 996aa1e9b..769e3b367 100644 --- a/src/app/pages/agenda/new-event/new-event.page.ts +++ b/src/app/pages/agenda/new-event/new-event.page.ts @@ -5,6 +5,7 @@ import { EventPerson } from 'src/app/models/eventperson.model'; import { EventsService } from 'src/app/services/events.service'; import { Event } from '../../../models/event.model'; import { AttendeesPage } from '../../events/attendees/attendees.page'; +import { SearchPage } from '../../search/search.page'; @Component({ selector: 'app-new-event', @@ -43,7 +44,7 @@ export class NewEventPage implements OnInit { ngOnInit() { - console.log(this.profile); +/* console.log(this.profile); */ let selectedStartdDate = this.selectedDate; let selectedEndDate = new Date(this.selectedDate); @@ -118,6 +119,8 @@ export class NewEventPage implements OnInit { this.modalController.dismiss(this.postEvent); } + + async openAttendees() { const modal = await this.modalController.create({ component: AttendeesPage, @@ -126,7 +129,7 @@ export class NewEventPage implements OnInit { adding: this.adding, taskParticipants: this.taskParticipants }, - cssClass: 'attendee', + cssClass: 'attendee modal modal-desktop', backdropDismiss: false }); diff --git a/src/app/pages/agenda/view-event/view-event.page.ts b/src/app/pages/agenda/view-event/view-event.page.ts index f70564f5a..ab2ce6107 100644 --- a/src/app/pages/agenda/view-event/view-event.page.ts +++ b/src/app/pages/agenda/view-event/view-event.page.ts @@ -70,7 +70,7 @@ export class ViewEventPage implements OnInit { } close(){ - console.log(this.isEventEdited); + /* console.log(this.isEventEdited); */ this.modalController.dismiss(this.isEventEdited); } @@ -78,10 +78,10 @@ export class ViewEventPage implements OnInit { this.eventsService.getEvent(this.eventId).subscribe(res => { this.loadedEvent = res; - console.log(res); + /* console.log(res); */ this.today = new Date(res.StartDate); - console.log(new Date(this.today)); + /* console.log(new Date(this.today)); */ this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); }); } @@ -154,7 +154,7 @@ export class ViewEventPage implements OnInit { viewDocument(sourceId){ this.processes.GetDocumentUrl(sourceId, '8').subscribe(res=>{ - console.log(res); + /* console.log(res); */ const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1"); const browser = this.iab.create(url,"_blank"); browser.show(); diff --git a/src/app/pages/events/attendee-modal/attendee-modal.page.html b/src/app/pages/events/attendee-modal/attendee-modal.page.html index 84045ca5d..20e71cf0b 100644 --- a/src/app/pages/events/attendee-modal/attendee-modal.page.html +++ b/src/app/pages/events/attendee-modal/attendee-modal.page.html @@ -10,7 +10,7 @@ - +

{{ attendee.Name }}

diff --git a/src/app/pages/events/attendees/attendees.page.html b/src/app/pages/events/attendees/attendees.page.html index 3b5d2c8b1..dc05fb3dc 100644 --- a/src/app/pages/events/attendees/attendees.page.html +++ b/src/app/pages/events/attendees/attendees.page.html @@ -12,7 +12,7 @@
- +
@@ -20,6 +20,9 @@

{{ attendee.Name }}

{{ attendee.EmailAddress }}

+
+ +
@@ -38,8 +41,8 @@

{{ attendee.Name }}

{{ attendee.EmailAddress }}

-
- X +
+
@@ -56,8 +59,8 @@

{{ attendee.Name }}

{{ attendee.EmailAddress }}

-
- X +
+
diff --git a/src/app/pages/events/attendees/attendees.page.scss b/src/app/pages/events/attendees/attendees.page.scss index 30cc9ce83..7cb035cfa 100644 --- a/src/app/pages/events/attendees/attendees.page.scss +++ b/src/app/pages/events/attendees/attendees.page.scss @@ -1,6 +1,3 @@ -ion-item-group{ - margin: 15px; -} ion-item{ border-bottom:1px solid #ccc; } diff --git a/src/app/pages/gabinete-digital/event-list/event-list.page.ts b/src/app/pages/gabinete-digital/event-list/event-list.page.ts index a24365d5f..6ed678863 100644 --- a/src/app/pages/gabinete-digital/event-list/event-list.page.ts +++ b/src/app/pages/gabinete-digital/event-list/event-list.page.ts @@ -41,12 +41,12 @@ export class EventListPage implements OnInit { } - this.LoadToApproveEvents(); + // this.LoadToApproveEvents(); this.router.events.forEach((event) => { if(event instanceof NavigationEnd && event.url == this.router.url) { - this.LoadToApproveEvents(); + // this.LoadToApproveEvents(); } }); diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.html b/src/app/pages/gabinete-digital/gabinete-digital.page.html index e0357154b..bb96dc2e5 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.html +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.html @@ -123,10 +123,15 @@
+ +
diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.ts b/src/app/pages/gabinete-digital/gabinete-digital.page.ts index 34ad0b2c6..12d23f4de 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.ts +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.ts @@ -56,15 +56,14 @@ export class GabineteDigitalPage implements OnInit { if( window.innerWidth <= 1024){ this.modalController.dismiss(); } - }; this.activatedRoute.queryParams.subscribe(params => { if(params["show"]){ - this.openExpedientListPage(); + // this.openExpedientListPage(); } else if(params["events"]){ - this.openEventsToApprovePage("MDGPR"); + // this.openEventsToApprovePage("MDGPR"); } }); @@ -84,23 +83,21 @@ export class GabineteDigitalPage implements OnInit { this.router.events.forEach((event) => { if(event instanceof NavigationEnd && event.url == this.router.url) { - this.LoadCounts(); + //this.LoadCounts(); } }); - - - this.LoadCounts(); + // this.LoadCounts(); /* this.eventService.getAllMdEvents.subscribe(res=>{ console.log(res); }); - console.log(this.eventService.getAllPrEvents.length); - */ -this.processesbackend.GetActionsList().subscribe(res=>{ - console.log(res); - -}); + console.log(this.eventService.getAllPrEvents.length); + */ + // this.processesbackend.GetActionsList().subscribe(res=>{ + // console.log(res); + + //}); } @@ -190,7 +187,7 @@ this.processesbackend.GetActionsList().subscribe(res=>{ } openExpedientPage(data){ - console.log(data); + /* console.log(data); */ this.closeAllDesktopComponents(); if( window.innerWidth <= 1024){ diff --git a/src/app/pages/search/search.page.html b/src/app/pages/search/search.page.html index 17727fe78..9de3907e3 100644 --- a/src/app/pages/search/search.page.html +++ b/src/app/pages/search/search.page.html @@ -4,7 +4,7 @@
- +
-
+
+
@@ -76,19 +77,18 @@
-
+
- - -
-

{{ category.Name }}

- {{ category.Qtd }} -
-
-
+
+ + {{ category.Name }} + {{ category.Qtd }} + +
+
- - +
+ +
+ +
+ +
    -
  • +
  • - - -
    {{ searchDocument.Assunto}} - {{ searchDocument.appName}} + {{ searchDocument.appName}}
    {{ searchDocument.EntidadeOrganicaNome }} @@ -167,5 +172,4 @@
    - \ No newline at end of file diff --git a/src/app/pages/search/search.page.scss b/src/app/pages/search/search.page.scss index c045b9293..28043fbc3 100644 --- a/src/app/pages/search/search.page.scss +++ b/src/app/pages/search/search.page.scss @@ -55,19 +55,18 @@ ion-slide{ margin: 0px 5px; margin-bottom: 10px; padding: 5px 20px; - height: 100%; - box-sizing: 100%; + box-sizing: border-box; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; - p{ + span{ padding: 0px; margin: 0px; font-family: Roboto; color: #0d89d1; font-size: 15px; - width: 100%; + text-align: center; } .label{ width: 100%; @@ -75,6 +74,7 @@ ion-slide{ font-size: 13px; font-weight: 300; color: #797979; + text-align: center; } border-radius: 15px; } @@ -82,7 +82,7 @@ ion-slide{ .active-category{ background-color: #42b9fe; color: white; - p{ + span{ color: white; } .label{ diff --git a/src/app/pages/search/search.page.ts b/src/app/pages/search/search.page.ts index d165c7b1f..cdcadca51 100644 --- a/src/app/pages/search/search.page.ts +++ b/src/app/pages/search/search.page.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { ModalController } from '@ionic/angular'; +import { ModalController, NavParams } from '@ionic/angular'; import { SearchService } from "../../services/search.service"; import { SearchCategory } from "src/app/models/search-category"; import { SearchDocument } from "src/app/models/search-document"; @@ -9,8 +9,9 @@ import { OrganicEntityPage } from 'src/app/pages/search/organic-entity/organic-e import WordCloud from 'src/plugin/wordcloud2.js'; import { ViewEventPage } from 'src/app/pages/agenda/view-event/view-event.page'; import { PublicationDetailPage } from '../publications/view-publications/publication-detail/publication-detail.page'; -import { ExpedienteDetailPage } from '../gabinete-digital/expediente/expediente-detail/expediente-detail.page'; import { DocumentDetailPage } from 'src/app/modals/document-detail/document-detail.page'; + + @Component({ selector: 'app-search', templateUrl: './search.page.html', @@ -51,13 +52,47 @@ export class SearchPage implements OnInit { windowWidth: number; + type : "Agenda" | "Correspondencia" | "AccoesPresidenciais" | "ArquivoDespachoElect" | "AccoesPresidenciais & ArquivoDespachoElect" = "Agenda"; + select: boolean = false; + constructor(private modalController: ModalController, private search: SearchService, - private modalCtrl: ModalController,) { + private modalCtrl: ModalController, + private navParams: NavParams) { this.ordinance = "recent"; - this.currentPath= window.location.pathname; + + this.type = this.navParams.get('type'); + + + if(this.type == null || this.type == undefined) { + + this.select = false; + + if(this.currentPath == '/home/agenda') { + this.type = "Agenda" + } else if (this.currentPath =='/home/gabinete-digital') { + this.type = "AccoesPresidenciais & ArquivoDespachoElect" + + } else if (this.currentPath == '/home/publications') { + this.type = "AccoesPresidenciais" + } else { + this.select = false + } + } else { + this.select = true; + } + + + } + + selectItem(item: SearchDocument) { + if(this.select){ + this.modalController.dismiss({ + selected: item + }); } + } ngOnInit() { @@ -172,9 +207,9 @@ export class SearchPage implements OnInit { /** * @description Basic search */ - basicSearch(){ + basicSearch(){ - if(window.location.pathname == '/home/agenda'){ + if(this.type == "Agenda" ){ this.showLoader = true; @@ -205,7 +240,7 @@ export class SearchPage implements OnInit { this.loadWordCloud(); }); - } else if (window.location.pathname =='/home/gabinete-digital'){ + } else if ( this.type == "AccoesPresidenciais & ArquivoDespachoElect"){ this.showLoader = true; @@ -267,7 +302,7 @@ export class SearchPage implements OnInit { this.loadWordCloud(); }); - } else if (window.location.pathname == '/home/publications'){ + } else if (this.type == "AccoesPresidenciais"){ this.showLoader = true; @@ -297,7 +332,7 @@ export class SearchPage implements OnInit { this.loadWordCloud(); }); } - + } /** @@ -424,7 +459,7 @@ export class SearchPage implements OnInit { itemIcons(): string{ - return window.location.pathname + return this.type } viewDocument(){ @@ -437,27 +472,28 @@ export class SearchPage implements OnInit { async viewDetail(id:any) { console.log(id); - - if(window.location.pathname == '/home/agenda'){ + if(!this.selectItem){ + if(window.location.pathname == '/home/agenda'){ - const modal = await this.modalCtrl.create({ - component: ViewEventPage, - componentProps:{ - eventId: id - }, - cssClass: 'modal modal-desktop', - }); - await modal.present(); - modal.onDidDismiss().then((res)=>{}); - - } else if(window.location.pathname == '/home/publications'){ + const modal = await this.modalCtrl.create({ + component: ViewEventPage, + componentProps:{ + eventId: id + }, + cssClass: 'modal modal-desktop', + }); + await modal.present(); + modal.onDidDismiss().then((res)=>{}); - this.viewPublicationDetail(id); - } - else if(window.location.pathname == '/home/gabinete-digital'){ - console.log('OPEN DOC'); - this.viewDocumentDetail(id,''); - + } else if(window.location.pathname == '/home/publications'){ + + this.viewPublicationDetail(id); + } + else if(window.location.pathname == '/home/gabinete-digital'){ + console.log('OPEN DOC'); + this.viewDocumentDetail(id,''); + + } } } @@ -480,7 +516,7 @@ export class SearchPage implements OnInit { async viewDocumentDetail(docId:string, applicationId:string) { let classs; if( window.innerWidth <= 800){ - classs = 'modal' + classs = 'modal modal-desktop' } else { classs = 'modal modal-desktop showAsideOptions' } diff --git a/src/app/services/attachments.service.ts b/src/app/services/attachments.service.ts index 09d99702a..2f281bbf3 100644 --- a/src/app/services/attachments.service.ts +++ b/src/app/services/attachments.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { Attachment } from '../models/attachment.model'; +import { Attachment, EventAttachment } from '../models/attachment.model'; import { Observable } from 'rxjs'; import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; import { environment } from 'src/environments/environment'; @@ -33,7 +33,7 @@ export class AttachmentsService { return this.http.get(`${geturl}`, options); } - getAttachments(source: number, sourceid: string): Observable{ + getAttachments(source: number, sourceid: string): Observable { let geturl = environment.apiURL + 'attachments/GetSourceName'; let params = new HttpParams(); @@ -47,18 +47,47 @@ export class AttachmentsService { return this.http.get(`${geturl}`, options); } - getAttachmentsById(eventId: string): Observable{ + + getAttachmentsById(eventId: string): Observable { let geturl = environment.apiURL + 'attachments/GetAttachmentsByEventId'; let params = new HttpParams(); params = params.set("ParentId", eventId); /* params = params.set("SourceId", sourceid); */ - let options = { + let options = { headers: this.headers, params: params }; return this.http.get(`${geturl}`, options); } + + setEventAttachmentById(body: EventAttachment) { + + let geturl = environment.apiURL + 'Attachments/Create'; + + let options = { + headers: this.headers, + } + + return this.http.post(`${geturl}`, body, options); + } + + deleteEventAttachmentById(attachmentId) { + + let geturl = environment.apiURL + `Attachments/Delete?attachmentId=${attachmentId}`; + + let params = new HttpParams(); + + params = params.set("attachmentId", attachmentId); + + let options = { + headers: this.headers, + params: params + } + + return this.http.delete(`${geturl}`, options); + } + } diff --git a/src/app/services/events.service.ts b/src/app/services/events.service.ts index 2f4b88c16..61639e7a8 100644 --- a/src/app/services/events.service.ts +++ b/src/app/services/events.service.ts @@ -158,7 +158,7 @@ export class EventsService { params: params }; - return this.http.post(`${puturl}`, event, options) + return this.http.post(`${puturl}`, event, options) } postEventPr(event:Event, calendarName:string) @@ -173,7 +173,7 @@ export class EventsService { params: params }; - return this.http.post(`${puturl}`, event, options) + return this.http.post(`${puturl}`, event, options) } deleteEvent(eventid:string, deletemode:number) diff --git a/src/app/shared/agenda/edit-event/edit-event.component.html b/src/app/shared/agenda/edit-event/edit-event.component.html index f07ec3236..4e317be59 100644 --- a/src/app/shared/agenda/edit-event/edit-event.component.html +++ b/src/app/shared/agenda/edit-event/edit-event.component.html @@ -187,30 +187,37 @@
-
-