- +
+ +
+
- -
-
+ + + + +
+ +
- - - - - - - -

{{ viewTitle }}

- - - - - -
- - - - + +

{{ viewTitle }}

+ + +
+ +
+ +
+ + + + +
-
- - - - - - -
- {{view.dates[row*7+col].label}} -
- + + + + + + +
+ {{view.dates[row*7+col].label}} +
+ +
-
- -
-
- - - - - - - - - -

{{ viewTitle }}

-
- - - - - - - -
- - - - - - - -
- {{view.dates[row*7+col].label}} -
- + +
+
+ + + + + + + + + +

{{ viewTitle }}

+
+ + + + + + + +
+ + + + + + + +
+ {{view.dates[row*7+col].label}} +
+ +
-
- - -
-
- - - - - - - - - -

{{ viewTitle }}

-
- - - - - - - -
- - - - - - -
- {{view.dates[row*7+col].label}} -
- + + +
+
+ + + + + + + + + +

{{ viewTitle }}

+
+ + + + + + + +
+ + + + + + +
+ {{view.dates[row*7+col].label}} +
+ +
-
- - + + +
-
- +
@@ -202,7 +211,7 @@ - +
{ console.log('Selected time: ' + ev.selectedTime + ', hasEvents: ' + (ev.events !== undefined && ev.events.length !== 0)); this.eventSelectedDate2 = ev.selectedTime; @@ -243,6 +264,7 @@ export class AgendaPage implements OnInit { loadRangeEvents(startTime: Date, endTime: Date){ console.log('Update date'); + console.log('start ',startTime,' end', endTime) this.showTimeline = false; this.showLoader = true; @@ -293,9 +315,6 @@ export class AgendaPage implements OnInit { this.showTimeline = true; }); - - - } else{ @@ -423,6 +442,4 @@ export class AgendaPage implements OnInit { this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate); } } - - } diff --git a/src/assets/images/icons-add-new-event.svg b/src/assets/images/icons-add-new-event.svg new file mode 100644 index 000000000..bd41db7c7 --- /dev/null +++ b/src/assets/images/icons-add-new-event.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/icons-received-event.svg b/src/assets/images/icons-received-event.svg new file mode 100644 index 000000000..28399319e --- /dev/null +++ b/src/assets/images/icons-received-event.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/global.scss b/src/global.scss index 94c1bdbbf..a77083c47 100644 --- a/src/global.scss +++ b/src/global.scss @@ -29,6 +29,8 @@ // calendar +// ionic calendar2 + td.monthview-current{ color: white; /* border-radius: 89px; */ @@ -57,6 +59,14 @@ td.monthview-selected { color: black !important; } +.event-detail-container{ + display: none; +} + +.cal-week-view { + border-top: none !important; +} + /* Timeline */ @@ -133,16 +143,7 @@ td.monthview-selected { display: none; } -// ionic calendar2 -.event-detail-container{ - display: none; -} - -.cal-week-view { - border-top: none !important; -} - .timeline-box-{} /* angular-cli file: src/styles.css */ @import "../node_modules/angular-calendar/css/angular-calendar.css"; - +@import "./style/main.scss"; From c696e912a9c66d1a45532335557fbec1f3cac580 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Fri, 29 Jan 2021 13:50:38 +0100 Subject: [PATCH 2/5] Add calendar day borders --- src/app/pages/agenda/agenda.page.html | 4 ++-- src/app/pages/agenda/agenda.page.ts | 31 +++++++++++++++++++++++- src/global.scss | 34 ++++++++++++++++++++++++++- 3 files changed, 65 insertions(+), 4 deletions(-) diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html index 073c9e002..9765b510c 100644 --- a/src/app/pages/agenda/agenda.page.html +++ b/src/app/pages/agenda/agenda.page.html @@ -74,8 +74,8 @@ -
- {{view.dates[row*7+col].label}} +
+ {{ view.dates[row*7+col].label }}
diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index e58cba4db..984045390 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -172,6 +172,34 @@ export class AgendaPage implements OnInit { this.viewTitle = title; } + currentDayEventDisplayBorder(day: any, id: any){ + + const events = day[id].events; + if (events.length == 0) { + return ""; + } else if (events.length >= 1) { + + /** @description store all event type */ + let eventType = {}; + let eventTypeNum: number; + + events.forEach(element => { + eventType[element.calendarName] = 1; + }); + + eventTypeNum = (Object.keys(eventType)).length + + if (eventTypeNum == 2) { + return 'calendar-event-type-both'; + } else { + return 'calendar-event-type-'+(Object.keys(eventType))[0]; + } + + } + + return ""; + } + // Show information of the event for timeline eventClicked({ event }: { event: CalendarEvent }): void { console.log('Event clicked', event); @@ -289,7 +317,8 @@ export class AgendaPage implements OnInit { startTime: new Date(element.StartDate), endTime: new Date(element.EndDate), allDay: false, - event: element + event: element, + calendarName: element.CalendarName }); const startHours = formatDate(new Date(element.StartDate), 'HH', 'pt'); diff --git a/src/global.scss b/src/global.scss index a77083c47..9cd1636ae 100644 --- a/src/global.scss +++ b/src/global.scss @@ -67,7 +67,7 @@ td.monthview-selected { border-top: none !important; } - +.calendar-event-type /* Timeline */ .cal-hour-segment { @@ -144,6 +144,38 @@ td.monthview-selected { } .timeline-box-{} + + +.calendar-event-type-Oficial{ + border-right: 3px solid #f05d5e !important; + border-radius: 21px; + color: black; + margin: 0px auto; + width: 35px; +} + +.calendar-event-type-Pessoal{ + border-left: 3px solid #ffb703 !important; + border-radius: 21px; + color: black; + margin: 0px auto; + width: 35px; +} + +.calendar-event-type-both{ + border-radius: 21px; + border-left: 3px solid #ffb703; + border-bottom: none; + border-right: 3px solid #f05d5e; + color: black; + margin: 0px auto; + width: 35px; +} + +.cal-hour-segment { + border-bottom: none !important; +} + /* angular-cli file: src/styles.css */ @import "../node_modules/angular-calendar/css/angular-calendar.css"; @import "./style/main.scss"; From 0b86c30f828800790e9d01a383e92a51e6f7986f Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Fri, 29 Jan 2021 16:25:03 +0100 Subject: [PATCH 3/5] Improve modal search --- src/app/pages/agenda/agenda.page.ts | 11 ++ .../gabinete-digital/gabinete-digital.page.ts | 12 +- .../pages/publications/publications.page.ts | 12 +- src/app/pages/search/search.page.ts | 103 ++++++++++++++++++ 4 files changed, 136 insertions(+), 2 deletions(-) diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index df841023f..a768b9296 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -138,6 +138,17 @@ export class AgendaPage implements OnInit { },5000) // console.log(setHours(setMinutes(new Date(), 0), 12)) + + function setCookie(cname, cvalue, exdays) { + var d = new Date(); + d.setTime(d.getTime() + (exdays*24*60*60*1000)); + var expires = "expires="+ d.toUTCString(); + document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; + } + + // AccoesPresidenciais = Correspondencia = 0 + setCookie('searchModalAPPType','0', 99999999); + } ngOnInit() { diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.ts b/src/app/pages/gabinete-digital/gabinete-digital.page.ts index 1356aa8c8..c2d17e3e9 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.ts +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.ts @@ -19,7 +19,17 @@ export class GabineteDigitalPage implements OnInit { private processesbackend:ProcessesService, private modalController: ModalController, private eventService: EventsService, - private alertService: AlertService) { } + private alertService: AlertService) { + function setCookie(cname, cvalue, exdays) { + var d = new Date(); + d.setTime(d.getTime() + (exdays*24*60*60*1000)); + var expires = "expires="+ d.toUTCString(); + document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; + } + + // AccoesPresidenciais = Correspondencia = 8 + setCookie('searchModalAPPType','8,361', 99999999); + } count_exp_dailywork=0; count_exp_pp : string; diff --git a/src/app/pages/publications/publications.page.ts b/src/app/pages/publications/publications.page.ts index dbde526c8..827961e65 100644 --- a/src/app/pages/publications/publications.page.ts +++ b/src/app/pages/publications/publications.page.ts @@ -39,9 +39,19 @@ export class PublicationsPage implements OnInit { private animationController: AnimationController, private loading: LoadingService, private publications: PublicationsService, - ) { + ) { this.months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"]; this.days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"]; + + function setCookie(cname, cvalue, exdays) { + var d = new Date(); + d.setTime(d.getTime() + (exdays*24*60*60*1000)); + var expires = "expires="+ d.toUTCString(); + document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; + } + + // AccoesPresidenciais = AccoesPresidenciais = 386,, + setCookie('searchModalAPPType','386', 99999999); } ngOnInit() { diff --git a/src/app/pages/search/search.page.ts b/src/app/pages/search/search.page.ts index c5deed915..23cf8da80 100644 --- a/src/app/pages/search/search.page.ts +++ b/src/app/pages/search/search.page.ts @@ -88,6 +88,106 @@ export class SearchPage implements OnInit { */ basicSearch(){ + function getCookie(cname) { + var name = cname + "="; + var decodedCookie = decodeURIComponent(document.cookie); + var ca = decodedCookie.split(';'); + for(var i = 0; i { + console.log(res); + + res.Categories.forEach( e => { + e['Active'] = false; + }); + + // bind respose + this.searchCategories = res.Categories; + + this.searchDocuments = this.sortArrayISODate(res.Documents); + + this.reorderList(this.ordinance); + + // hide show document + if(this.searchDocuments.length >= 1){ + this.showDocuments = true; + } else { + this.showDocuments = false + } + + }); + } else if (APPType == '8,361'){ + + console.log('aplication type 8,361'); + + this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender + ,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res=>{ + console.log(res); + + res.Categories.forEach( e => { + e['Active'] = false; + }); + + // bind respose + this.searchCategories = res.Categories; + + this.searchDocuments = this.sortArrayISODate(res.Documents); + + this.reorderList(this.ordinance); + + // hide show document + if(this.searchDocuments.length >= 1){ + this.showDocuments = true; + } else { + this.showDocuments = false + } + + }); + + this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender + ,this.searchOrganicEntiry, this.searchDocTypeId, '361').subscribe(res=>{ + console.log(res); + + res.Categories.forEach( e => { + e['Active'] = false; + }); + + // bind respose + this.searchCategories = res.Categories; + + this.searchDocuments = this.sortArrayISODate(res.Documents); + + this.reorderList(this.ordinance); + + // hide show document + if(this.searchDocuments.length >= 1){ + this.showDocuments = true; + } else { + this.showDocuments = false + } + + }); + } else if (APPType == '386'){ + + console.log('aplication type 386'); + this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender ,this.searchOrganicEntiry, this.searchDocTypeId, '386').subscribe(res=>{ console.log(res); @@ -111,6 +211,9 @@ export class SearchPage implements OnInit { } }); + } + + } /** From 9fd01796a979391b726a2d5695b6317fe28ea7f5 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Fri, 29 Jan 2021 17:13:15 +0100 Subject: [PATCH 4/5] Improve search --- src/app/pages/search/search.page.html | 1 + src/app/pages/search/search.page.scss | 12 ++++++++++++ src/app/pages/search/search.page.ts | 17 ++++++++++++++--- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/app/pages/search/search.page.html b/src/app/pages/search/search.page.html index 0b1a8ae82..79f9f4b75 100644 --- a/src/app/pages/search/search.page.html +++ b/src/app/pages/search/search.page.html @@ -1,6 +1,7 @@ +
diff --git a/src/app/pages/search/search.page.scss b/src/app/pages/search/search.page.scss index 3262d2a75..2825609a1 100644 --- a/src/app/pages/search/search.page.scss +++ b/src/app/pages/search/search.page.scss @@ -281,3 +281,15 @@ ion-slide{ } } + + +.loader{ + position: absolute; + margin-top: -14px; + width: calc(100% - 39px); +} + + +.swiper-container{ + width: 100%; +} \ No newline at end of file diff --git a/src/app/pages/search/search.page.ts b/src/app/pages/search/search.page.ts index 23cf8da80..a5ee79198 100644 --- a/src/app/pages/search/search.page.ts +++ b/src/app/pages/search/search.page.ts @@ -33,6 +33,8 @@ export class SearchPage implements OnInit { showDocuments = false; showAdvanceSearch = false; + showLoader: boolean; + height: number = 411; width: number = 411; @@ -110,6 +112,8 @@ export class SearchPage implements OnInit { console.log('aplication type 0'); + this.showLoader = true; + this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender ,this.searchOrganicEntiry, this.searchDocTypeId, '0').subscribe(res=>{ console.log(res); @@ -131,11 +135,14 @@ export class SearchPage implements OnInit { } else { this.showDocuments = false } - + + this.showLoader = false; }); } else if (APPType == '8,361'){ console.log('aplication type 8,361'); + + this.showLoader = true; this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender ,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res=>{ @@ -182,10 +189,13 @@ export class SearchPage implements OnInit { } else { this.showDocuments = false } - + + this.showLoader = false; }); } else if (APPType == '386'){ + this.showLoader = true; + console.log('aplication type 386'); this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender @@ -209,7 +219,8 @@ export class SearchPage implements OnInit { } else { this.showDocuments = false } - + + this.showLoader = false; }); } From 6f1b9a87c982c61b5655438f67aa3c8629f128b1 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Mon, 1 Feb 2021 09:56:48 +0100 Subject: [PATCH 5/5] Add icon --- src/app/home/home.page.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/home/home.page.html b/src/app/home/home.page.html index 22c7f37b6..a5ef56b40 100644 --- a/src/app/home/home.page.html +++ b/src/app/home/home.page.html @@ -11,7 +11,7 @@ - + Agenda