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

{{ 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}} +
+ +
-
- - + + +
- - - - -
-
- +
@@ -195,7 +199,7 @@ - +
{ @@ -127,6 +137,18 @@ 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); + + this.showLoader = false; } ngOnInit() { @@ -163,6 +185,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); @@ -182,9 +232,18 @@ export class AgendaPage implements OnInit { this.timelineDate = formatDate(ev,'dd MMMM yyyy', 'pt'); this.viewDate = new Date(formatDate(ev,'yyyy-MM-dd', 'pt')); // calendar change date - this.eventSelectedDate = ev; + console.log('!!this!!') + this.eventSelectedDate = new Date(ev); }; + // changedate + dropDownChangeDate(id: string){ + + const currentCandarDayYear = formatDate(this.eventSelectedDate,'dd -- yyyy', 'pt'); + const newDate = new Date(currentCandarDayYear.replace('--',id)); + this.onCurrentChanged(newDate); + } + /* onTimeSelected = (ev: { selectedTime: Date, events: any[] }) => { console.log('Selected time: ' + ev.selectedTime + ', hasEvents: ' + (ev.events !== undefined && ev.events.length !== 0)); this.eventSelectedDate2 = ev.selectedTime; @@ -247,6 +306,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; @@ -271,7 +331,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'); @@ -297,9 +358,6 @@ export class AgendaPage implements OnInit { this.showTimeline = true; }); - - - } else{ 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.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 c5deed915..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; @@ -88,8 +90,62 @@ 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 { + ,this.searchOrganicEntiry, this.searchDocTypeId, '0').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.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=>{ console.log(res); res.Categories.forEach( e => { @@ -111,6 +167,64 @@ export class SearchPage implements OnInit { } }); + + 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 + } + + this.showLoader = false; + }); + } else if (APPType == '386'){ + + this.showLoader = true; + + console.log('aplication type 386'); + + this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender + ,this.searchOrganicEntiry, this.searchDocTypeId, '386').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.showLoader = false; + }); + } + + } /** 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..f32253053 100644 --- a/src/global.scss +++ b/src/global.scss @@ -29,6 +29,8 @@ // calendar +// ionic calendar2 + td.monthview-current{ color: white; /* border-radius: 89px; */ @@ -43,7 +45,6 @@ td.monthview-current{ justify-content: center; align-items: center; text-align: center; - padding-left: 9px; color: white; } } @@ -57,7 +58,15 @@ td.monthview-selected { color: black !important; } +.event-detail-container{ + display: none; +} +.cal-week-view { + border-top: none !important; +} + +.calendar-event-type /* Timeline */ .cal-hour-segment { @@ -133,16 +142,45 @@ td.monthview-selected { display: none; } -// ionic calendar2 -.event-detail-container{ - display: none; -} - -.cal-week-view { - border-top: none !important; -} - .timeline-box-{} + + +.calendar-event-type-Oficial{ + border-right: 3px solid #f05d5e !important; + border-radius: 21px !important; + color: black !important; + margin: 0px auto !important; + width: 35px !important; +} + +.calendar-event-type-Pessoal{ + border-left: 3px solid #ffb703 !important; + border-radius: 21px !important; + color: black !important; + margin: 0px auto !important; + width: 35px !important; +} + +.calendar-event-type-both{ + border-radius: 21px !important; + border-left: 3px solid #ffb703 !important; + border-bottom: none !important; + border-right: 3px solid #f05d5e !important; + color: black !important; + margin: 0px auto !important; + width: 35px !important; +} + +.cal-hour-segment { + border-bottom: none !important; +} + + + +td.monthview-current{ + border-bottom: 1px solid #3a87ad !important; +} + /* angular-cli file: src/styles.css */ @import "../node_modules/angular-calendar/css/angular-calendar.css"; - +@import "./style/main.scss";