mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Pull made changes from Tiago
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
<ion-content id="timeline-conteiner agenda-container" class="timeline ">
|
||||
<ion-content id="timeline-conteiner agenda-container pt-20" class="timeline ">
|
||||
<div class="d-flex container-wrapper">
|
||||
|
||||
<div class="calendar-timeline d-flex flex-column height-100 bg-blue">
|
||||
@@ -28,8 +28,8 @@
|
||||
<ion-row class="ion-align-items-center">
|
||||
<!-- Move back one screen of the slides -->
|
||||
|
||||
<div class="arrow cursor-pointer">
|
||||
<button (click)="back()" class="btn-no-color" >
|
||||
<div class="arrow cursor-pointer resize">
|
||||
<button (click)="back()" class="btn-no-color resize" >
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src="assets/images/icons-calendar-arrow-left.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-left.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-left.svg"></ion-icon>
|
||||
@@ -102,7 +102,7 @@
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- Move forward one screen of the slides -->
|
||||
<div (click)="next()" class="arrow cursor-pointer">
|
||||
<div (click)="next()" class="arrow cursor-pointer resize">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src="assets/images/icons-calendar-arrow-right.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-right.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-right.svg"></ion-icon>
|
||||
@@ -111,21 +111,21 @@
|
||||
</ion-row>
|
||||
<ion-row class="ion-align-items-center">
|
||||
|
||||
<button *ngIf="profile == 'mdgpr' && loggeduser.Profile =='MDGPR' " (click)="changeProfile()" class="d-md-none btn-no-color">
|
||||
<button *ngIf="profile == 'mdgpr' && loggeduser.Profile =='MDGPR' " (click)="changeProfile()" class="d-md-none btn-no-color resize">
|
||||
<ion-icon class="right-icons" src="assets/images/icons-profile-calendar-md.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
<button *ngIf="profile == 'pr' && loggeduser.Profile =='MDGPR' " (click)="changeProfile()" class="btn-no-color">
|
||||
<button *ngIf="profile == 'pr' && loggeduser.Profile =='MDGPR' " (click)="changeProfile()" class="btn-no-color resize">
|
||||
<ion-icon class="right-icons d-md-none" src="assets/images/icons-profile-calendar-pr.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
<button class="btn-no-color cursor-pointer" (click)="viewEventsToApprove()" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||
<button class="btn-no-color cursor-pointer resize" (click)="viewEventsToApprove()" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-received-event.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="right-icons" src="assets/images/theme/gov/icons-received-event.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="right-icons" src="assets/images/theme/tribunal/icons-received-event.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
<button class="btn-no-color cy-add-event cursor-pointer" (click)="clearContact();openAddEvent();">
|
||||
<button class="btn-no-color cy-add-event cursor-pointer resize" (click)="clearContact();openAddEvent();">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-add.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="right-icons" src="assets/images/theme/gov/icons-add.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="right-icons" src="assets/images/theme/tribunal/icons-add.svg" ></ion-icon>
|
||||
@@ -194,7 +194,7 @@
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps btn-no-color" src="assets/images/theme/gov/icons-collaps-up.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="collaps btn-no-color" src="assets/images/theme/tribunal/icons-collaps-up.svg" ></ion-icon>
|
||||
</button>
|
||||
<button class="btn-no-color" *ngIf="!showCalendar" (click)="calendarHeight='320px';showCalendar=true">
|
||||
<button class="btn-no-color" *ngIf="!showCalendar" (click)="calendarHeight='356px';showCalendar=true">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps btn-no-color" src="assets/images/icons-collaps-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps btn-no-color" src="assets/images/theme/gov/icons-collaps-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="collaps btn-no-color" src="assets/images/theme/tribunal/icons-collaps-down.svg" ></ion-icon>
|
||||
@@ -205,10 +205,10 @@
|
||||
<ion-row class="timeline-date align-center">
|
||||
<span *ngIf="timelineIsCurrentDate()">Hoje, </span> {{ timelineDate }}
|
||||
</ion-row>
|
||||
<ion-row class="filter ion-align-items-center">
|
||||
<div class="filter-name">{{timelineFilterState}}</div>
|
||||
<ion-row class="filter ion-align-items-center" >
|
||||
<div class="filter-name" (click)="showTimelineFilterState=!showTimelineFilterState">{{timelineFilterState}}</div>
|
||||
<!-- Icon -->
|
||||
<button (click)="showTimelineFilterState=!showTimelineFilterState" class="arrow-down btn-no-color">
|
||||
<button class="arrow-down btn-no-color" (click)="showTimelineFilterState=!showTimelineFilterState">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " style="font-size: 19pt;" src="assets/images/icons-arrow-arrow-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " style="font-size: 19pt;" src="assets/images/theme/gov/icons-arrow-arrow-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " style="font-size: 19pt;" src="assets/images/theme/gov/icons-arrow-arrow-down.svg" ></ion-icon>
|
||||
|
||||
@@ -801,6 +801,43 @@ app-approve-event{
|
||||
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 415px) {
|
||||
.capitaliseText {
|
||||
font-size: 18px;
|
||||
}
|
||||
.resize{
|
||||
font-size: 33px !important;
|
||||
ion-icon{
|
||||
font-size: 33px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 398px) {
|
||||
.capitaliseText {
|
||||
font-size: 15px;
|
||||
}
|
||||
.resize{
|
||||
font-size: 27px !important;
|
||||
ion-icon{
|
||||
font-size: 27px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (max-width: 364px) {
|
||||
.capitaliseText {
|
||||
font-size: 13px;
|
||||
}
|
||||
.resize{
|
||||
font-size: 23px !important;
|
||||
ion-icon{
|
||||
font-size: 23px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ export class AgendaPage implements OnInit {
|
||||
this.profile = "pr";
|
||||
}
|
||||
|
||||
this.calendarHeight = "320px";
|
||||
this.calendarHeight = "356px";
|
||||
this.showCalendar = true;
|
||||
this.timelineDate = momentG(new Date(), 'dd MMMM yyyy');
|
||||
|
||||
|
||||
@@ -269,7 +269,7 @@
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<div *ngFor="let document of documents; let i = index" >
|
||||
<div *ngFor="let document of documents; let i = index" >
|
||||
<ion-list class="list">
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
|
||||
@@ -180,7 +180,10 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
|
||||
runValidation() {
|
||||
this.validateFrom = true
|
||||
this.validateFrom = true;
|
||||
if(new Date(this.postEvent.StartDate).getTime() > new Date(this.postEvent.EndDate).getTime()){
|
||||
this.toastService._badRequest("A data de fim não pode ser inferior a data de início do evento")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -316,14 +319,14 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
const newAttendees: EventPerson[] = data['taskParticipants'];
|
||||
const newAttendeesCC: EventPerson[] = data['taskParticipantsCc'];
|
||||
|
||||
|
||||
if(newAttendees.length) {
|
||||
this.setIntervenient(newAttendees);
|
||||
}
|
||||
if(newAttendeesCC) {
|
||||
this.setIntervenientCC(newAttendeesCC);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
|
||||
<ion-content class="main-content-l height-100 white ">
|
||||
<ion-content class="container-wrapper main-content-l height-100 white ">
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<ion-refresher-content>
|
||||
@@ -59,7 +59,13 @@
|
||||
<p>{{customDate}}</p>
|
||||
<p>das {{loadedEvent.StartDate | date: 'HH:mm'}} às {{loadedEvent.EndDate | date: 'HH:mm'}}</p>
|
||||
<p *ngIf="!loadedEvent.IsRecurring">(Não se repete)</p>
|
||||
<p *ngIf="loadedEvent.IsRecurring">Repete</p>
|
||||
<p *ngIf="loadedEvent.IsRecurring">
|
||||
<span *ngIf="loadedEvent.EventRecurrence.Type == 0">Diário</span>
|
||||
<span *ngIf="loadedEvent.EventRecurrence.Type == 1">Semanal</span>
|
||||
<span *ngIf="loadedEvent.EventRecurrence.Type == 2">Mensal</span>
|
||||
<span *ngIf="loadedEvent.EventRecurrence.Type == 3">Anual</span>
|
||||
<span *ngIf="loadedEvent.EventRecurrence.Type == -1">Nunca</span>
|
||||
</p>
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
|
||||
<ion-content class="height-100">
|
||||
<ion-content class="height-100 container-wrapper">
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<ion-refresher-content>
|
||||
@@ -123,7 +123,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</ion-item-sliding>
|
||||
|
||||
|
||||
</ion-list>
|
||||
</div>
|
||||
<!-- <button (click)="sendMsg()" style="height: 41px;">Send message</button> -->
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
ComponentFactoryResolver,
|
||||
ComponentRef,
|
||||
ComponentFactory,
|
||||
Output
|
||||
Output,
|
||||
} from '@angular/core';
|
||||
import { ModalController, Platform } from '@ionic/angular';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
@@ -17,7 +17,6 @@ import { ContactsPage } from './messages/contacts/contacts.page';
|
||||
import { MessagesPage } from './messages/messages.page';
|
||||
import { NewGroupPage } from './new-group/new-group.page';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { EditGroupPage } from 'src/app/shared/chat/edit-group/edit-group.page';
|
||||
import * as Rx from "rxjs/Rx";
|
||||
import { Message } from 'src/app/models/message.model';
|
||||
@@ -136,6 +135,7 @@ export class ChatPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
console.log(this.loggedUserChat);
|
||||
|
||||
this.segment = "Contactos";
|
||||
@@ -166,19 +166,23 @@ export class ChatPage implements OnInit {
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart && event.url.startsWith('/home/chat')) {
|
||||
if (window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/chat')) {
|
||||
//alert('OIII')
|
||||
} else {
|
||||
if (this.dataService.get("newGroup")) {
|
||||
this.openNewGroupPage();
|
||||
}
|
||||
if (this.dataService.get("newGroup")) {
|
||||
this.openNewGroupPage();
|
||||
}
|
||||
else{
|
||||
this.closeAllDesktopComponents();
|
||||
this.showEmptyComponent = true;
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.dataService.set("newGroup", false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.setStatus('offline');
|
||||
this.dataService.set("newGroup", false);
|
||||
console.log('On Destroy')
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<ion-label>A conversa original mantêm-se como chat individual</ion-label>
|
||||
</div>
|
||||
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of messages; let last = last" [class.messages-list-item-wrapper-active]="msg._id == selectedMsgId">
|
||||
<div *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'ru'" (press)="handlePress(msg._id)" class='message-container incoming-{{msg.u.username!=loggedUser.me.username}}' (click)="openPreview(msg)">
|
||||
<div *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'ru'" (press)="handlePress(msg._id)" class='message-container incoming-{{msg.u.username!=loggedUser.me.username}}'>
|
||||
<div class="title">
|
||||
<ion-label>{{msg.u.name}}</ion-label>
|
||||
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
|
||||
@@ -66,7 +66,9 @@
|
||||
<ion-label>{{msg.msg}}</ion-label>
|
||||
<div *ngIf="msg.attachments" class="message-attachments">
|
||||
<div *ngFor="let file of msg.attachments">
|
||||
<img *ngIf="file.image_url" src="{{file.image_url}}" alt="image" >
|
||||
<div (click)="openPreview(msg)">
|
||||
<img *ngIf="file.image_url" src="{{file.image_url}}" alt="image" >
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<div class="file">
|
||||
|
||||
@@ -21,6 +21,7 @@ import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { PreviewCameraPage } from 'src/app/modals/preview-camera/preview-camera.page';
|
||||
import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-group-messages',
|
||||
@@ -29,7 +30,7 @@ import { PreviewCameraPage } from 'src/app/modals/preview-camera/preview-camera.
|
||||
})
|
||||
export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
|
||||
|
||||
|
||||
showLoader: boolean;
|
||||
isGroupCreated:boolean;
|
||||
@@ -593,7 +594,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
};
|
||||
zoomActive = false;
|
||||
zoomScale = 1;
|
||||
|
||||
|
||||
sliderZoomOpts = {
|
||||
allowSlidePrev: false,
|
||||
allowSlideNext: false,
|
||||
@@ -601,40 +602,40 @@ sliderZoomOpts = {
|
||||
maxRatio: 5
|
||||
},
|
||||
on: {
|
||||
zoomChange: (scale, imageEl, slideEl) => {
|
||||
zoomChange: (scale, imageEl, slideEl) => {
|
||||
this.zoomActive = true;
|
||||
this.zoomScale = scale/5;
|
||||
this.changeDetectorRef.detectChanges();
|
||||
this.changeDetectorRef.detectChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async touchEnd(zoomslides: IonSlides, card) {
|
||||
// Zoom back to normal
|
||||
const slider = await zoomslides.getSwiper();
|
||||
const zoom = slider.zoom;
|
||||
zoom.out();
|
||||
|
||||
|
||||
// Card back to normal
|
||||
card.el.style['z-index'] = 9;
|
||||
|
||||
|
||||
this.zoomActive = false;
|
||||
this.changeDetectorRef.detectChanges();
|
||||
}
|
||||
|
||||
|
||||
touchStart(card) {
|
||||
// Make card appear above backdrop
|
||||
card.el.style['z-index'] = 11;
|
||||
}
|
||||
|
||||
async openPreview(img) {
|
||||
async openPreview(msg) {
|
||||
const modal = await this.modalController.create({
|
||||
component: PreviewCameraPage,
|
||||
cssClass: 'transparent-modal',
|
||||
component: ViewMediaPage,
|
||||
cssClass: 'modal modal-desktop',
|
||||
componentProps: {
|
||||
image: img.attachments[0].image_url,
|
||||
username: img.u.name,
|
||||
_updatedAt: img._updatedAt
|
||||
image: msg.attachments[0].image_url,
|
||||
username: msg.u.name,
|
||||
_updatedAt: msg._updatedAt,
|
||||
}
|
||||
});
|
||||
modal.present();
|
||||
|
||||
@@ -110,7 +110,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.load();
|
||||
this.setStatus('online');
|
||||
|
||||
this.loadFiles();
|
||||
//this.loadFiles();
|
||||
VoiceRecorder.requestAudioRecordingPermission();
|
||||
Filesystem.mkdir({
|
||||
path: IMAGE_DIR,
|
||||
|
||||
@@ -5,6 +5,7 @@ import { GroupDurationPage } from 'src/app/shared/popover/group-duration/group-d
|
||||
import { GroupContactsPage } from '../group-messages/group-contacts/group-contacts.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-new-group',
|
||||
@@ -19,6 +20,7 @@ export class NewGroupPage implements OnInit {
|
||||
selectedDuration = ['','',''];
|
||||
thedate:any;
|
||||
groupName:string;
|
||||
documents:any;
|
||||
|
||||
constructor(
|
||||
private pickerController: PickerController,
|
||||
@@ -27,15 +29,18 @@ export class NewGroupPage implements OnInit {
|
||||
private navParams: NavParams,
|
||||
public ThemeService: ThemeService,
|
||||
private chatService: ChatService,
|
||||
private processesService: ProcessesService,
|
||||
)
|
||||
{
|
||||
this.isGroupCreated = false;
|
||||
this.groupName = this.navParams.get('name');
|
||||
this.documents = this.navParams.get('documents');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
console.log(this.documents);
|
||||
}
|
||||
|
||||
_ionChange(event){
|
||||
this.showDuration = event.detail.checked;
|
||||
|
||||
@@ -52,6 +57,7 @@ export class NewGroupPage implements OnInit {
|
||||
|
||||
createGroup(){
|
||||
let name = this.groupName.split(' ').join('-');
|
||||
//Take out all special characters in string
|
||||
name = name.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
||||
let body = { "name":name, }
|
||||
this.chatService.addGroup(body).subscribe(res=>{
|
||||
@@ -73,6 +79,39 @@ export class NewGroupPage implements OnInit {
|
||||
this.isGroupCreated = true;
|
||||
this.addContacts(res['group']);
|
||||
|
||||
if(this.documents.length > 0){
|
||||
//If there is documents add
|
||||
this.documents.forEach(async document => {
|
||||
|
||||
let url = await this.processesService.GetDocumentUrl(document.DocId, document.ApplicationId).toPromise();
|
||||
let url_no_options: string = url.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
|
||||
let body = {
|
||||
"message":
|
||||
{
|
||||
"rid": res['group']._id,
|
||||
"msg": "",
|
||||
"attachments": [{
|
||||
"title": document.Assunto,
|
||||
"description": document.DocTypeDesc,
|
||||
"title_link": url_no_options,
|
||||
"title_link_download": true,
|
||||
//"thumb_url": "assets/images/webtrix-logo.png",
|
||||
"message_link": url_no_options,
|
||||
"type": "webtrix"
|
||||
}],
|
||||
"file":{
|
||||
"name": document.Assunto,
|
||||
"type": "application/webtrix",
|
||||
"ApplicationId": document.ApplicationType,
|
||||
"DocId": document.Id,
|
||||
"Assunto": document.Assunto,
|
||||
}
|
||||
}
|
||||
}
|
||||
this.chatService.sendMessage(body).toPromise();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-content class="container-wrapper">
|
||||
<div class="main-content d-flex height-100 pl-20 overflow-hidden">
|
||||
<div class="content d-flex flex-column" *ngIf="task">
|
||||
<div class="main-header" >
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-content class="container-wrapper">
|
||||
<div class="main-content d-flex height-100 overflow-hidden">
|
||||
<div class="content d-flex flex-column" *ngIf="task">
|
||||
<div class="main-header">
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
<app-header > </app-header>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-content class="container-wrapper">
|
||||
<div class="main-content d-flex height-100 overflow-hidden">
|
||||
<div class="content d-flex flex-column" *ngIf="task">
|
||||
<div class="main-header">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-content class="container-wrapper">
|
||||
<div class="main-content d-flex height-100 overflow-hidden">
|
||||
<div class="content d-flex flex-column" *ngIf="task">
|
||||
<div class="main-header">
|
||||
|
||||
+9
-2
@@ -52,8 +52,15 @@
|
||||
<ion-label>
|
||||
<p>1 {{customDate}}</p>
|
||||
<p>2 das {{loadedEvent.workflowInstanceDataFields.StartDate | date: 'HH:mm'}} às {{loadedEvent.workflowInstanceDataFields.EndDate | date: 'HH:mm'}}</p>
|
||||
<p *ngIf="!loadedEvent.workflowInstanceDataFields.IsRecurring">3 (Não se repete)</p>
|
||||
<p *ngIf="loadedEvent.workflowInstanceDataFields.IsRecurring">4 Repete</p>
|
||||
<p *ngIf="!loadedEvent.workflowInstanceDataFields.IsRecurring">(Não se repete)</p>
|
||||
|
||||
<p *ngIf="loadedEvent.workflowInstanceDataFields.IsRecurring">
|
||||
<span *ngIf="loadedEvent.workflowInstanceDataFields.EventRecurrence.Type == 0">Diário</span>
|
||||
<span *ngIf="loadedEvent.workflowInstanceDataFields.EventRecurrence.Type == 1">Semanal</span>
|
||||
<span *ngIf="loadedEvent.workflowInstanceDataFields.EventRecurrence.Type == 2">Mensal</span>
|
||||
<span *ngIf="loadedEvent.workflowInstanceDataFields.EventRecurrence.Type == 3">Anual</span>
|
||||
<span *ngIf="loadedEvent.workflowInstanceDataFields.EventRecurrence.Type == -1">Nunca</span>
|
||||
</p>
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
|
||||
<ion-content id="main-content" >
|
||||
<ion-content id="main-content" class="container-wrapper">
|
||||
<div class="main-content d-flex height-100" *ngIf="loadedEvent" >
|
||||
<div class="content d-flex flex-column width-100" *ngIf="loadedEvent.workflowInstanceDataFields">
|
||||
<div class="header-content width-100 d-flex justify-space-between">
|
||||
@@ -51,8 +51,8 @@
|
||||
<p>{{customDate}}</p>
|
||||
<p *ngIf="toDateString(loadedEvent.workflowInstanceDataFields.StartDate) == toDateString(loadedEvent.workflowInstanceDataFields.EndDate)">das {{loadedEvent.workflowInstanceDataFields.StartDate | date: 'HH:mm'}} às {{loadedEvent.workflowInstanceDataFields.EndDate | date: 'HH:mm'}}</p>
|
||||
<p *ngIf="toDateString(loadedEvent.workflowInstanceDataFields.StartDate) != toDateString(loadedEvent.workflowInstanceDataFields.EndDate)">{{loadedEvent.workflowInstanceDataFields.StartDate | date: 'd/M/yy' }} - {{ loadedEvent.workflowInstanceDataFields.StartDate | date: 'dd/M/yy'}} </p>
|
||||
<p *ngIf="!loadedEvent.workflowInstanceDataFields.IsRecurring">(Não se repete)</p>
|
||||
<p *ngIf="loadedEvent.workflowInstanceDataFields.IsRecurring">Repete</p>
|
||||
<p *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType == '-1'">(Não se repete)</p>
|
||||
<p *ngIf="loadedEvent.workflowInstanceDataFields.OccurrenceType != '-1'">Repete</p>
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+4
-4
@@ -6,7 +6,7 @@
|
||||
<ion-menu-button></ion-menu-button>
|
||||
</div>
|
||||
|
||||
<ion-content>
|
||||
<ion-content class="container-wrapper">
|
||||
<div class="main-content d-flex height-100 overflow-hidden">
|
||||
<div class="content d-flex flex-column" *ngIf="task">
|
||||
<div class="main-header" style="overflow: unset !important;">
|
||||
@@ -111,17 +111,17 @@
|
||||
|
||||
<div *ngIf="task && p.userRole(['PR'])" class="aside-right flex-column height-100 overflow-y-auto">
|
||||
|
||||
<!-- <div class="buttons">
|
||||
<div class="buttons">
|
||||
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<button (click)="openNewGroupPage(task)" class="btn-cancel" shape="round" >Iniciar Conversa</button>
|
||||
<button (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Iniciar Conversa</button>
|
||||
<div hidden class="solid"></div>
|
||||
<button hidden class="btn-cancel" shape="round" >Delegar</button>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
+19
-16
@@ -432,9 +432,10 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
component: SearchPage,
|
||||
cssClass: 'modal-width-100-width-background modal',
|
||||
componentProps: {
|
||||
type: 'AccoesPresidenciais & ArquivoDespachoElect',
|
||||
type: 'Correspondencia',
|
||||
showSearchInput: true,
|
||||
select: true
|
||||
select: true,
|
||||
findOnly: [8]
|
||||
}
|
||||
});
|
||||
await modal.present();
|
||||
@@ -442,7 +443,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
if (res) {
|
||||
const data = res.data;
|
||||
this.documents.push(data.selected);
|
||||
this.documents.forEach((element: any) => {
|
||||
await this.documents.forEach( async (element: any) => {
|
||||
|
||||
let body = {
|
||||
"InstanceID": this.task.InstanceID,
|
||||
@@ -458,18 +459,20 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
this.attachmentsService.AddAttachment(body).subscribe((res) => {
|
||||
this.toastService._successMessage()
|
||||
}, () => {
|
||||
this.toastService._badRequest()
|
||||
}, () => {
|
||||
try {
|
||||
loader.remove()
|
||||
});
|
||||
|
||||
await this.attachmentsService.AddAttachment(body).toPromise()
|
||||
this.toastService._successMessage()
|
||||
} catch(e) {
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.LoadTaskDetail(this.serialNumber);
|
||||
}, 5000);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||
@@ -592,7 +595,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res => {
|
||||
this.goBack();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -634,16 +637,16 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
}
|
||||
|
||||
openNewGroupPage() {
|
||||
this.router.navigate(['/home/chat']);
|
||||
this.dataService.set("newGroup", true);
|
||||
|
||||
if (window.innerWidth < 801) {
|
||||
if (window.innerWidth < 701) {
|
||||
this.router.navigate(['/home/chat']);
|
||||
this.newGroup();
|
||||
}
|
||||
else {
|
||||
this.dataService.set("newGroup", true);
|
||||
this.dataService.set("task", this.task);
|
||||
this.dataService.set("newGroupName", this.task.Folio);
|
||||
this.dataService.set("documents", this.fulltask.Documents);
|
||||
this.router.navigate(['/home/chat']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<ion-menu-button></ion-menu-button>
|
||||
</div>
|
||||
|
||||
<ion-content>
|
||||
<ion-content class="container-wrapper">
|
||||
<div class="main-content d-flex height-100 overflow-hidden">
|
||||
<div class="content d-flex flex-column" *ngIf="task">
|
||||
<div class="main-header" style="overflow: unset !important;">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
|
||||
<ion-content class="height-100">
|
||||
<ion-content class="height-100 container-wrapper">
|
||||
<ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
|
||||
@@ -30,6 +30,7 @@ import { SqliteService } from '../../services/sqlite.service';
|
||||
import { Platform } from '@ionic/angular';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { SortService } from 'src/app/services/functions/sort.service';
|
||||
import { DataService } from 'src/app/services/data.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-gabinete-digital',
|
||||
@@ -133,6 +134,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService,
|
||||
private sortService: SortService,
|
||||
private dataService: DataService,
|
||||
) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
@@ -616,7 +618,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
|
||||
|
||||
doRefresh(event) {
|
||||
console.log(event);
|
||||
|
||||
|
||||
this.LoadCounts();
|
||||
|
||||
if (event) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-content class="container-wrapper">
|
||||
<div class="main-content d-flex height-100 overflow-hidden">
|
||||
<div class="content d-flex flex-column" *ngIf="task">
|
||||
<div class="main-header ">
|
||||
@@ -130,8 +130,8 @@
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button (click)="openNewGroupPage(task)" class="btn-cancel" shape="round" >Iniciar Conversa</button>
|
||||
<div *ngIf="task.WorkflowName == 'Pedido de Parecer do Presidente'" class="buttons">
|
||||
<button (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Iniciar Conversa</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -480,17 +480,17 @@ export class PedidoPage implements OnInit {
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
openNewGroupPage(task?:any){
|
||||
this.router.navigate(['/home/chat']);
|
||||
this.dataService.set("newGroup", true);
|
||||
|
||||
if( window.innerWidth < 801){
|
||||
openNewGroupPage() {
|
||||
if (window.innerWidth < 801) {
|
||||
this.router.navigate(['/home/chat']);
|
||||
this.newGroup();
|
||||
}
|
||||
else{
|
||||
else {
|
||||
this.dataService.set("newGroup", true);
|
||||
this.dataService.set("task", this.task);
|
||||
this.dataService.set("newGroupName", this.task.Folio);
|
||||
this.dataService.set("documents", this.fulltask.Documents);
|
||||
this.router.navigate(['/home/chat']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -126,6 +126,7 @@ export class PedidosPage implements OnInit {
|
||||
|
||||
async LoadList() {
|
||||
|
||||
//Retirar esta chamada posteriormente - Eudes
|
||||
this.processes.GetTasksList("Pedido de Parecer", false).subscribe(async res => {
|
||||
|
||||
this.skeletonLoader = true
|
||||
@@ -136,6 +137,8 @@ export class PedidosPage implements OnInit {
|
||||
let parecer = await this.processes.GetTasksList("Pedido de Parecer", false).toPromise();
|
||||
let parecerPr = await this.processes.GetTasksList("Pedido de Parecer do Presidente", false).toPromise();
|
||||
|
||||
console.log(parecerPr);
|
||||
|
||||
this.skeletonLoader = false
|
||||
|
||||
let allParecer = parecer.concat(parecerPr).reverse().filter(data => data.workflowInstanceDataFields.Status == "Active")
|
||||
@@ -145,8 +148,9 @@ export class PedidosPage implements OnInit {
|
||||
allParecer.filter(data => data.workflowInstanceDataFields.Status == "Active").forEach(element => {
|
||||
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||
const dateMonth = date.getMonth() + 1;
|
||||
let month = date.getMonth() + 1;
|
||||
let taskDate = date.getFullYear() + "-" + month + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
@@ -165,7 +169,7 @@ export class PedidosPage implements OnInit {
|
||||
this.addPedidoToDb(this.parecerList);
|
||||
|
||||
this.listToPresentparecerList = this.sortService.sortDate(this.parecerList, 'CreateDate')
|
||||
this.pedidosstorage.resetparecer(this.listToPresentparecerList);
|
||||
this.pedidosstorage.resetparecer(this.listToPresentparecerList);
|
||||
|
||||
}
|
||||
else if (this.segment == 'deferimento') {
|
||||
@@ -183,8 +187,9 @@ export class PedidosPage implements OnInit {
|
||||
|
||||
res.forEach(element => {
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||
//date.setMonth(date.getMonth() + 1);
|
||||
let month = date.getMonth() + 1;
|
||||
let taskDate = date.getFullYear() + "-" + month + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
@@ -233,8 +238,9 @@ export class PedidosPage implements OnInit {
|
||||
process.forEach((element) => {
|
||||
if (JSON.parse(element.workflowInstanceDataFields).Status == "Active") {
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||
//date.setMonth(date.getMonth() + 1);
|
||||
let month = date.getMonth() + 1;
|
||||
let taskDate = date.getFullYear() + "-" + month + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
@@ -259,8 +265,9 @@ export class PedidosPage implements OnInit {
|
||||
process.forEach((element) => {
|
||||
if (JSON.parse(element.workflowInstanceDataFields).Status == "Active") {
|
||||
let date = new Date(element.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||
//date.setMonth(date.getMonth() + 1);
|
||||
let month = date.getMonth() + 1;
|
||||
let taskDate = date.getFullYear() + "-" + month + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||
|
||||
let task = {
|
||||
"SerialNumber": element.serialNumber,
|
||||
|
||||
@@ -48,8 +48,6 @@
|
||||
.content-container{
|
||||
width: 100%;
|
||||
margin:0 auto;
|
||||
border-top-left-radius: 25px;
|
||||
border-top-right-radius: 25px;
|
||||
background: #ffffff;
|
||||
height: 100%;
|
||||
padding: 25px 20px 0 20px;
|
||||
|
||||
@@ -66,7 +66,7 @@ export class NewActionPage implements OnInit {
|
||||
private publication: PublicationsService,
|
||||
private toastService: ToastService
|
||||
|
||||
) {
|
||||
) {
|
||||
|
||||
|
||||
this.folder = new PublicationFolder();
|
||||
@@ -76,7 +76,7 @@ export class NewActionPage implements OnInit {
|
||||
|
||||
this.folder.DateBegin = new Date().toISOString()
|
||||
this.folder.DateEnd = (new Date(new Date().getTime() + 15 * 60000)).toISOString()
|
||||
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -102,7 +102,13 @@ export class NewActionPage implements OnInit {
|
||||
}
|
||||
|
||||
runValidation() {
|
||||
this.validateFrom = true
|
||||
this.validateFrom = true;
|
||||
if(new Date(this.folder.DateBegin).toISOString() > new Date(this.folder.DateEnd).toISOString()){
|
||||
this.toastService.badRequest("A data de início não pode ser superior a data de fim");
|
||||
}
|
||||
else if(this.folder.DateBegin > new Date().toISOString()){
|
||||
this.toastService.badRequest("A data de início não pode ser superior a data actual");
|
||||
}
|
||||
}
|
||||
|
||||
injectValidation() {
|
||||
@@ -134,8 +140,8 @@ export class NewActionPage implements OnInit {
|
||||
DateEnd: this.folder.DateEnd,
|
||||
ActionType: this.segment,
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
@@ -144,7 +150,7 @@ export class NewActionPage implements OnInit {
|
||||
this.toastService.successMessage("Ação presidencial criado");
|
||||
this.close();
|
||||
} catch (error) {
|
||||
|
||||
|
||||
this.toastService.badRequest("Ação presidencial não criado");
|
||||
} finally {
|
||||
loader.remove()
|
||||
@@ -156,5 +162,5 @@ export class NewActionPage implements OnInit {
|
||||
close(){
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="capturedImage != '' " class="ion-item-container-no-border">
|
||||
<ion-label class="attached-title">Fotografia Anexada </ion-label>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-thumbnail slot="start">
|
||||
|
||||
|
||||
<ion-img [(ngModel)]="capturedImage" name="image" ngDefaultControl [src]="capturedImage" (click)="imageSize(capturedImage)" ></ion-img>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
@@ -74,8 +74,8 @@
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<!-- <div class="ion-item-container-no-border">
|
||||
<ion-label (click)="selectImage()" class="cursor-pointer">
|
||||
<div class="ion-item-container-no-border">
|
||||
<ion-label (click)="laodPicture()" class="cursor-pointer">
|
||||
<div class="attach-icon">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-add-photos.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-add-photos.svg"></ion-icon>
|
||||
@@ -83,8 +83,8 @@
|
||||
<div class="attach-document cursor-pointer">
|
||||
<ion-label>Anexar Fotografia</ion-label>
|
||||
</div>
|
||||
</ion-label>
|
||||
</div> -->
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -107,24 +107,24 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
|
||||
async takePicture() {
|
||||
const image = await Camera.getPhoto({
|
||||
const capturedImage = await Camera.getPhoto({
|
||||
quality: 90,
|
||||
allowEditing: false,
|
||||
width:50,
|
||||
height: 50,
|
||||
// allowEditing: true,
|
||||
resultType: CameraResultType.Uri,
|
||||
source: CameraSource.Camera // Camera, Photos or Prompt!
|
||||
|
||||
source: CameraSource.Camera
|
||||
});
|
||||
const response = await fetch(capturedImage.webPath!);
|
||||
const blob = await response.blob();
|
||||
|
||||
if (image) {
|
||||
this.saveImage(image)
|
||||
this.photos.unshift({
|
||||
filepath: "soon...",
|
||||
webviewPath: capturedImage.webPath
|
||||
});
|
||||
this.capturedImage = await this.convertBlobToBase64(blob);
|
||||
this.capturedImageTitle = new Date().getTime() + '.jpeg';
|
||||
//console.log(this.capturedImage);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
imageSize(image) {
|
||||
var canvas = document.createElement('canvas');
|
||||
@@ -139,7 +139,7 @@ export class NewPublicationPage implements OnInit {
|
||||
const reader = new FileReader;
|
||||
reader.onerror = reject;
|
||||
reader.onload = () => {
|
||||
resolve(reader.result);
|
||||
resolve(reader.result);
|
||||
};
|
||||
reader.readAsDataURL(blob);
|
||||
});
|
||||
@@ -148,7 +148,7 @@ export class NewPublicationPage implements OnInit {
|
||||
async laodPicture() {
|
||||
const capturedImage = await Camera.getPhoto({
|
||||
resultType: CameraResultType.Uri,
|
||||
source: CameraSource.Camera,
|
||||
source: CameraSource.Photos,
|
||||
quality: 90,
|
||||
width: 1080,
|
||||
height: 720,
|
||||
@@ -506,10 +506,10 @@ export class NewPublicationPage implements OnInit {
|
||||
/* compressImage() {
|
||||
let image = this.capturedImage;
|
||||
this.imageCompress.compressFile(image, orientation, 50, 50,).then(() => {
|
||||
|
||||
|
||||
this.imgResultBeforeCompress = image;
|
||||
console.log('Size in bytes was:', this.imageCompress.byteCount(image));
|
||||
|
||||
|
||||
this.imageCompress.compressFile(image, orientation, 50, 50).then(
|
||||
result => {
|
||||
this.imgResultAfterCompress = result;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-content class="container-wrapper">
|
||||
<div class="d-md-none" *ngIf="hideRefreshBtn">
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-refresher-content>
|
||||
@@ -38,9 +38,9 @@
|
||||
</ion-toolbar>
|
||||
<!-- Content -->
|
||||
|
||||
<div class="aside overflow-y-auto d-flex flex-wrap width-100">
|
||||
<div *ngIf="!skeletonLoader" class="aside overflow-y-auto d-flex flex-wrap width-100">
|
||||
<!-- <ion-list class="width-100"> -->
|
||||
<ion-item-sliding disabled="{{showSlidingOptions}}" class="width-100 cursor-pointer"
|
||||
<ion-item-sliding disabled="{{showSlidingOptions}}" class="width-100"
|
||||
*ngFor="let viagem of publicationsTravelFolderList">
|
||||
<ion-item lines="none"
|
||||
class="item width-100 d-flex ion-no-border ion-no-margin ion-no-padding"
|
||||
@@ -57,10 +57,6 @@
|
||||
<p class="item-content-title my-10" [class.item-content-title-active]="viagem.ProcessId == idSelected">{{viagem.Description}}</p>
|
||||
<p class="item-content-detail my-5" [class.item-content-detail-active]="viagem.ProcessId == idSelected">{{viagem.Detail}}</p>
|
||||
</div>
|
||||
<div (click)="openOptions(viagem.ProcessId)" class="item-options d-none cursor-pointer" [class.item-options-active]="viagem.ProcessId == idSelected" autoHide="false">
|
||||
<!-- <ion-icon src="assets/images/icons-menu.svg"></ion-icon> -->
|
||||
<i class="fas fa-ellipsis-v"></i>
|
||||
</div>
|
||||
</ion-item>
|
||||
<ion-item-options class="members-options" side="end">
|
||||
<ion-item-option class="edit-option" (click)="editAction(viagem.ProcessId)">
|
||||
@@ -94,10 +90,6 @@
|
||||
<p class="item-content-title" [class.item-content-title-active]="evento.ProcessId == idSelected">{{evento.Description}}</p>
|
||||
</ion-label>
|
||||
</div>
|
||||
<div (click)="openOptions(evento.ProcessId)" class="item-options d-none cursor-pointer" [class.item-options-active]="evento.ProcessId == idSelected" autoHide="false">
|
||||
<!-- <ion-icon src="assets/images/icons-menu.svg"></ion-icon> -->
|
||||
<i class="fas fa-ellipsis-v"></i>
|
||||
</div>
|
||||
</ion-item>
|
||||
<ion-item-options class="members-options" side="end">
|
||||
<ion-item-option class="edit-option" (click)="editAction(evento.ProcessId)">
|
||||
@@ -115,6 +107,94 @@
|
||||
</ion-item-options>
|
||||
</ion-item-sliding>
|
||||
</div>
|
||||
<!-- Sart Skeleton -->
|
||||
<div *ngIf="showLoader">
|
||||
<ion-item-sliding disabled="{{showSlidingOptions}}" class="width-100">
|
||||
<ion-item lines="none"
|
||||
class="item width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
<div class="item-icon cursor-pointer">
|
||||
<ion-icon slot="end" src='assets/images/theme/gov/icons-plane-active-hover.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="item-content flex-grow-1 cursor-pointer">
|
||||
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
|
||||
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
|
||||
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
|
||||
</div>
|
||||
</ion-item>
|
||||
<ion-item lines="none"
|
||||
class="item width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
<div class="item-icon cursor-pointer">
|
||||
<ion-icon slot="end" src='assets/images/theme/gov/icons-plane-active-hover.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="item-content flex-grow-1 cursor-pointer">
|
||||
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
|
||||
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
|
||||
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
|
||||
</div>
|
||||
</ion-item>
|
||||
<ion-item lines="none"
|
||||
class="item width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
<div class="item-icon cursor-pointer">
|
||||
<ion-icon slot="end" src='assets/images/theme/gov/icons-plane-active-hover.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="item-content flex-grow-1 cursor-pointer">
|
||||
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
|
||||
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
|
||||
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
|
||||
</div>
|
||||
</ion-item>
|
||||
<ion-item lines="none"
|
||||
class="item width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
<div class="item-icon cursor-pointer">
|
||||
<ion-icon slot="end" src='assets/images/theme/gov/icons-plane-active-hover.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="item-content flex-grow-1 cursor-pointer">
|
||||
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
|
||||
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
|
||||
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-item-sliding>
|
||||
<ion-item-sliding disabled="{{showSlidingOptions}}" class="width-100">
|
||||
<ion-item lines="none"
|
||||
class="item cursor-pointer width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
<div class="item-icon2">
|
||||
<ion-icon slot="end" src='assets/icon/icons-actions-grey.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="item-content flex-grow-1">
|
||||
<ion-label>
|
||||
<p class="item-content-date"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
|
||||
<p class="item-content-title"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
|
||||
</ion-label>
|
||||
</div>
|
||||
</ion-item>
|
||||
<ion-item lines="none"
|
||||
class="item cursor-pointer width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
<div class="item-icon2">
|
||||
<ion-icon slot="end" src='assets/icon/icons-actions-grey.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="item-content flex-grow-1">
|
||||
<ion-label>
|
||||
<p class="item-content-date"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
|
||||
<p class="item-content-title"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
|
||||
</ion-label>
|
||||
</div>
|
||||
</ion-item>
|
||||
<ion-item lines="none"
|
||||
class="item cursor-pointer width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
<div class="item-icon2">
|
||||
<ion-icon slot="end" src='assets/icon/icons-actions-grey.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="item-content flex-grow-1">
|
||||
<ion-label>
|
||||
<p class="item-content-date"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
|
||||
<p class="item-content-title"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
|
||||
</ion-label>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-item-sliding>
|
||||
</div>
|
||||
<!-- End Skeleton -->
|
||||
</div>
|
||||
|
||||
<!-- Right -->
|
||||
@@ -135,6 +215,7 @@
|
||||
[folderId]="folderId"
|
||||
class="height-100 d-flex flex-column overflow-hidden flex-grow-1"
|
||||
(addNewPublication)="addNewPublication($event)"
|
||||
(editPublication)="editPublication($event)"
|
||||
(openPublicationDetails)="openPublicationDetails($event)"
|
||||
(goBacktoPublicationDetails)="goBacktoPublicationDetails()"
|
||||
(goBackToViewPublications)="goBackToViewPublications()"
|
||||
|
||||
@@ -165,10 +165,13 @@ ion-toolbar{
|
||||
width: 25px;
|
||||
font-size: 20px;
|
||||
}
|
||||
.item-content-date-active, .item-content-title-active, .item-content-detail-active, .item-options-active{
|
||||
.item-content-date-active, .item-content-title-active, .item-content-detail-active{
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.item-options-active{
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.item-active{
|
||||
@@ -240,5 +243,7 @@ ion-toolbar{
|
||||
}
|
||||
.item-options{
|
||||
display: block !important;
|
||||
padding: 10px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,7 @@ export class PublicationsPage implements OnInit {
|
||||
hideRefreshBtn = true;
|
||||
showSlidingOptions = true;
|
||||
idSelected: string;
|
||||
skeletonLoader:boolean;
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
@@ -70,10 +71,11 @@ export class PublicationsPage implements OnInit {
|
||||
private backgroundservice: BackgroundService,
|
||||
private platform: Platform,
|
||||
public ThemeService: ThemeService,
|
||||
|
||||
|
||||
) {
|
||||
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"];
|
||||
this.skeletonLoader = true;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -140,6 +142,7 @@ export class PublicationsPage implements OnInit {
|
||||
|
||||
getActions() {
|
||||
this.showLoader = true;
|
||||
this.skeletonLoader = true;
|
||||
this.publications.GetPublicationFolderList().subscribe(res => {
|
||||
|
||||
console.log('accoes', res)
|
||||
@@ -168,15 +171,13 @@ export class PublicationsPage implements OnInit {
|
||||
this.publicationsTravelFolderList.push(folder);
|
||||
}
|
||||
this.showLoader = false;
|
||||
|
||||
/* this.publicationEventFolderStorage.reset(this.publicationsEventFolderList)
|
||||
this.publicationTravelFolderService.reset(this.publicationsTravelFolderList) */
|
||||
});
|
||||
|
||||
|
||||
}, (error) => {
|
||||
this.getFromDB();
|
||||
});
|
||||
this.skeletonLoader = false;
|
||||
}
|
||||
|
||||
addActionToDB(folder) {
|
||||
@@ -187,7 +188,7 @@ export class PublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
getFromDB() {
|
||||
|
||||
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
} else {
|
||||
this.sqliteservice.getAllActions().then((actions: any[]) => {
|
||||
@@ -237,9 +238,7 @@ export class PublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
async deleteAction(id?: string) {
|
||||
|
||||
const loader = this.toastService.loading();
|
||||
|
||||
try {
|
||||
await this.publications.DeletePresidentialAction(id).toPromise();
|
||||
this.toastService._successMessage()
|
||||
@@ -249,7 +248,6 @@ export class PublicationsPage implements OnInit {
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
this.refreshing()
|
||||
}
|
||||
|
||||
@@ -277,13 +275,12 @@ export class PublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
goToPublicationsList(folderId: string) {
|
||||
this.folderId = folderId
|
||||
this.idSelected = folderId;
|
||||
|
||||
if (window.innerWidth <= 800) {
|
||||
this.router.navigate(['/home/publications', folderId]);
|
||||
this.idSelected = "";
|
||||
} else {
|
||||
this.closeDesktopComponent();
|
||||
this.idSelected = folderId;
|
||||
this.folderId = folderId
|
||||
this.desktopComponent.showViewPublication = true;
|
||||
}
|
||||
@@ -379,10 +376,14 @@ export class PublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
this.publication = publication;
|
||||
|
||||
this.desktopComponent.showAddNewPublication = true;
|
||||
}
|
||||
|
||||
async editPublication(foolderId:string){
|
||||
this.closeDesktopComponent();
|
||||
this.desktopComponent.showEditActions = true;
|
||||
}
|
||||
|
||||
async openPublicationDetails(publicationId: string) {
|
||||
|
||||
this.publicationId = publicationId;
|
||||
@@ -405,6 +406,7 @@ export class PublicationsPage implements OnInit {
|
||||
showAddActions: false,
|
||||
showEditActions: false,
|
||||
}
|
||||
this.idSelected = "";
|
||||
}
|
||||
|
||||
async openOptions(id?: string) {
|
||||
@@ -461,5 +463,5 @@ export class PublicationsPage implements OnInit {
|
||||
// newImage => console.log('new image path is: ' + newImage),
|
||||
// error => console.error('Error cropping image', error)
|
||||
// );
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
|
||||
|
||||
<div class="top-box d-flex ion-justify-content-between">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- search -->
|
||||
<div *ngIf="!showAdvanceSearch" class="icon-z icon-most-searched-word-open cursor-pointer" (click)="showHideAdvanceSearch(true)">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/theme/blue/icons-most-searched-words-open.svg" class="icon" slot="end"></ion-icon>
|
||||
@@ -24,18 +24,18 @@
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "src="assets/images/advance-search-show-modal.svg" class="icon" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/advance-search-show-modal.svg" class="icon" slot="end"></ion-icon>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="profile">
|
||||
<ion-icon class="icon" src="assets/images/icons-profile.svg"></ion-icon>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="btn-modal-dismiss" *ngIf="showSearchInput">
|
||||
<button class="btn-no-color" (click)="close()">
|
||||
<ion-icon c*ngIf="ThemeService.currentTheme == 'default' " lass="icon" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Search drop down -->
|
||||
<div class="advance-search pa-0 pt-10 flex-md-grow-1" >
|
||||
|
||||
@@ -50,13 +50,13 @@
|
||||
<ion-input (keyup.enter)="basicSearch()" [(ngModel)]='searchSubject' class="search-input" type="search" placeholder="Pesquisar"></ion-input>
|
||||
</div>
|
||||
<div (click)="clearSearchInput()" class="d-flex align-center icon">
|
||||
|
||||
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-25" name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-25" name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ion-form>
|
||||
</ion-form>
|
||||
|
||||
<!-- -->
|
||||
<li *ngIf="showAdvanceSearch" class="d-flex date-container ion-justify-content-between">
|
||||
@@ -98,7 +98,7 @@
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- search result categories-->
|
||||
<div class="options flex-md-grow-1 " *ngIf="showDocuments"
|
||||
style="border-bottom: 1px solid #f3f3f3;width: unset"
|
||||
@@ -107,14 +107,14 @@
|
||||
<div class="d-flex overflow-x-auto">
|
||||
<!-- SLIDE -->
|
||||
<div *ngFor="let category of searchCategories; index as i;" class="d-flex py-10" style="width:0px" [ngClass]="{'active-category': category.Active}" class="button cursor-pointer" (click)="filterDocList(category.Name)" (click)="activeCategoty(i)">
|
||||
|
||||
|
||||
<span>{{ category.Name }}</span>
|
||||
<ion-label class="label">{{ category.Qtd }}</ion-label>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pl-10">
|
||||
<button class="icon-z icon-most-searched-word-open cursor-pointer" ion-button icon-only >
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/theme/blue/icons-most-searched-words-open.svg" class="icon" slot="end"></ion-icon>
|
||||
@@ -125,7 +125,7 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -146,8 +146,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" height-100 overflow-y-auto flex-1" *ngIf="showDocuments">
|
||||
|
||||
<div class=" height-100 overflow-y-auto flex-1" *ngIf="showDocuments">
|
||||
<div>
|
||||
|
||||
<!-- search result document-->
|
||||
@@ -177,22 +177,22 @@
|
||||
<ul>
|
||||
<li *ngFor="let searchDocument of showSearchDocuments" (click)="viewDetail( searchDocument); selectItem(searchDocument)" class="d-flex cursor-pointer">
|
||||
<div class="icon">
|
||||
<ion-icon *ngIf="itemIcons() == 'AccoesPresidenciais & ArquivoDespachoElect' && ThemeService.currentTheme == 'default' "
|
||||
<ion-icon *ngIf="itemIcons() == 'AccoesPresidenciais & ArquivoDespachoElect' || itemIcons() == 'Correspondencia' && ThemeService.currentTheme == 'default' "
|
||||
src="assets/images/icons-search-document.svg"></ion-icon>
|
||||
|
||||
<ion-icon *ngIf="itemIcons() == 'AccoesPresidenciais & ArquivoDespachoElect' && ThemeService.currentTheme == 'gov'"
|
||||
<ion-icon *ngIf="itemIcons() == 'AccoesPresidenciais & ArquivoDespachoElect' || itemIcons() == 'Correspondencia' && ThemeService.currentTheme == 'gov'"
|
||||
src="assets/images/theme/gov/icons-search-document.svg"></ion-icon>
|
||||
|
||||
|
||||
<ion-icon *ngIf="itemIcons() == 'Agenda' "
|
||||
src="assets/images/icons-default-agenda.svg"></ion-icon>
|
||||
src="assets/images/icons-default-agenda.svg"></ion-icon>
|
||||
<ion-icon *ngIf="itemIcons() == 'AccoesPresidenciais' "
|
||||
src="assets/images/icons-viagem.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="content ion-align-items-center">
|
||||
|
||||
|
||||
<div class="d-flex ion-justify-content-between ">
|
||||
<span class="result-name">{{ searchDocument.Assunto}}</span>
|
||||
<span class="app-name" *ngIf="itemIcons() == 'AccoesPresidenciais & ArquivoDespachoElect' ">{{ searchDocument.appName}}</span>
|
||||
<span class="app-name" *ngIf="itemIcons() == 'AccoesPresidenciais & ArquivoDespachoElect' || itemIcons() == 'Correspondencia' ">{{ searchDocument.appName}}</span>
|
||||
</div>
|
||||
<div class="d-flex ion-justify-content-between ">
|
||||
<span class="organic-entity">{{ searchDocument.EntidadeOrganicaNome }}</span>
|
||||
@@ -205,10 +205,10 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
</ion-content>
|
||||
|
||||
@@ -60,7 +60,7 @@ export class SearchPage implements OnInit {
|
||||
private search: SearchService,
|
||||
private modalCtrl: ModalController,
|
||||
private navParams: NavParams,
|
||||
public ThemeService: ThemeService)
|
||||
public ThemeService: ThemeService)
|
||||
{
|
||||
this.ordinance = "recent";
|
||||
this.currentPath= window.location.pathname;
|
||||
@@ -243,7 +243,8 @@ export class SearchPage implements OnInit {
|
||||
this.loadWordCloud();
|
||||
|
||||
});
|
||||
} else if ( this.type == "AccoesPresidenciais & ArquivoDespachoElect"){
|
||||
}
|
||||
else if ( this.type == "AccoesPresidenciais & ArquivoDespachoElect"){
|
||||
|
||||
this.showLoader = true;
|
||||
|
||||
@@ -319,7 +320,7 @@ export class SearchPage implements OnInit {
|
||||
});
|
||||
|
||||
} else {
|
||||
let counter = 0;
|
||||
let counter = 0;
|
||||
|
||||
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res=>{
|
||||
@@ -385,11 +386,93 @@ export class SearchPage implements OnInit {
|
||||
}
|
||||
this.loadWordCloud();
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else if (this.type == "AccoesPresidenciais"){
|
||||
else if ( this.type == "Correspondencia"){
|
||||
|
||||
this.showLoader = true;
|
||||
|
||||
this.searchCategories = [];
|
||||
this.searchDocuments = [];
|
||||
this.showSearchDocuments = [];
|
||||
|
||||
if(this.select) {
|
||||
|
||||
let counter = 0;
|
||||
|
||||
this.search.searchForDoc(this.searchSubject, this.searchDocumentDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res=>{
|
||||
|
||||
res.Categories.forEach( e => {
|
||||
e['Active'] = false;
|
||||
this.searchCategories.push(e)
|
||||
});
|
||||
|
||||
// bind respose
|
||||
|
||||
this.sortArrayISODate(res.Documents).forEach(e => {
|
||||
e['appName'] = 'Correspondencia'
|
||||
this.searchDocuments.push(e)
|
||||
});
|
||||
|
||||
this.reorderList(this.ordinance);
|
||||
|
||||
// hide show document
|
||||
if(this.searchDocuments.length >= 1){
|
||||
this.showDocuments = true;
|
||||
} else {
|
||||
this.showDocuments = false
|
||||
}
|
||||
counter++;
|
||||
|
||||
if(counter ==2){
|
||||
this.showLoader = false;
|
||||
}
|
||||
this.showLoader = false;
|
||||
this.loadWordCloud();
|
||||
});
|
||||
|
||||
} else {
|
||||
let counter = 0;
|
||||
|
||||
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res=>{
|
||||
|
||||
res.Categories.forEach( e => {
|
||||
e['Active'] = false;
|
||||
this.searchCategories.push(e)
|
||||
});
|
||||
|
||||
// bind respose
|
||||
|
||||
this.sortArrayISODate(res.Documents).forEach(e => {
|
||||
e['appName'] = 'Correspondencia'
|
||||
this.searchDocuments.push(e)
|
||||
});
|
||||
|
||||
this.reorderList(this.ordinance);
|
||||
|
||||
// hide show document
|
||||
if(this.searchDocuments.length >= 1){
|
||||
this.showDocuments = true;
|
||||
} else {
|
||||
this.showDocuments = false
|
||||
}
|
||||
|
||||
counter++;
|
||||
|
||||
if(counter ==2){
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
this.loadWordCloud();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
else if (this.type == "AccoesPresidenciais"){
|
||||
|
||||
this.showLoader = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user