mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
merge with developer
This commit is contained in:
@@ -189,7 +189,7 @@ export class EditEventPage implements OnInit {
|
||||
}
|
||||
|
||||
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc)
|
||||
|
||||
|
||||
this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
|
||||
|
||||
this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
|
||||
@@ -204,7 +204,7 @@ export class EditEventPage implements OnInit {
|
||||
finally {
|
||||
this.goBack();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
this.toastService.successMessage();
|
||||
|
||||
@@ -213,7 +213,7 @@ export class EditEventPage implements OnInit {
|
||||
});
|
||||
|
||||
this.isEventEdited = true;
|
||||
|
||||
|
||||
this.modalController.dismiss(this.isEventEdited);
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@ export class EditEventPage implements OnInit {
|
||||
if(newAttendeesCC) {
|
||||
this.setIntervenientCC(newAttendeesCC);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3,7 +3,12 @@
|
||||
</ion-header>
|
||||
|
||||
<ion-content class="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>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
<div class="main-content d-flex height-100" [className]="isModal ? '_main-content d-flex height-100 ma-0 px-20 pt-30 pb-20 background-white' : 'main-content d-flex height-100'">
|
||||
<div class="content d-flex flex-column width-100">
|
||||
<div class="main-header d-flex">
|
||||
@@ -22,29 +27,29 @@
|
||||
</button>
|
||||
<button class="btn-no-color" (click)="deleteEvent()">
|
||||
<ion-icon class="delete" name="trash-sharp"></ion-icon>
|
||||
</button>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="overflow-y-auto">
|
||||
<div class="upper-content ml-45">
|
||||
|
||||
|
||||
<div class="content-location">
|
||||
<span class="date">{{loadedEvent.Location}}</span>
|
||||
|
||||
|
||||
<div *ngIf="loadedEvent.Organizer">
|
||||
<div *ngIf="loadedEvent.Organizer.Name == 'Agenda do Presidente da República' ">
|
||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' " style="background-color: #99e47b;">{{loadedEvent.CalendarName}}</span>
|
||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' " style="background-color: #958bfc;">{{loadedEvent.CalendarName}}</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="loadedEvent.Organizer.Name == 'Agenda do Ministro e Director do Gabinete do PR' ">
|
||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Oficial' " style="background-color: #ffb703;">{{loadedEvent.CalendarName}}</span>
|
||||
<span class="label" *ngIf="loadedEvent.CalendarName == 'Pessoal' " style="background-color: #f05d5e;">{{loadedEvent.CalendarName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="content-details">
|
||||
@@ -76,8 +81,8 @@
|
||||
<div class="line"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="loadedAttachments" class="bottom-content width-100">
|
||||
|
||||
<div *ngIf="loadedEvent.Attachments" class="bottom-content width-100">
|
||||
<h5>Documentos Anexados</h5>
|
||||
<ion-list class="width-100">
|
||||
<ion-item *ngFor="let attach of loadedEvent.Attachments; let i = index" class="width-100" class="ion-no-margin ion-no-padding">
|
||||
@@ -86,20 +91,20 @@
|
||||
<span class="attach-title-item d-block">{{attach.SourceName}}</span>
|
||||
<span class="span-left d-block">{{attach.Stakeholders}}</span>
|
||||
</p>
|
||||
|
||||
|
||||
<div class="d-flex pr-10">
|
||||
<span class="span-right">{{ attach.CreateDate | date: 'dd-MM-yyyy HH:mm' }}</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div (click)="docIndex(i);openTaskOptions()" class="cursor-pointer" style="width: 35px; height: 41px;" autoHide="false">
|
||||
<ion-icon src="assets/images/icons-menu.svg" ></ion-icon>
|
||||
</div>
|
||||
|
||||
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -110,6 +115,6 @@
|
||||
<button (click)="deleteEvent()" full class="btn-delete" shape="round" >Eliminar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -150,6 +150,11 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
doRefresh(ev){
|
||||
this.loadEvent();
|
||||
ev.target.complete();
|
||||
}
|
||||
|
||||
loadEvent() {
|
||||
const loader = this.toastService.loading();
|
||||
this.eventsService.getEvent(this.eventId).subscribe(res => {
|
||||
@@ -159,12 +164,12 @@ export class ViewEventPage implements OnInit {
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); */
|
||||
loader.remove()
|
||||
}, (error)=>{
|
||||
|
||||
|
||||
if(error.status == 0) {
|
||||
this.toastService.badRequest('Não é possível vizualizar este evento no modo offline')
|
||||
} else {
|
||||
this.toastService.badRequest('Este evento já não existe na sua agenda')
|
||||
}
|
||||
}
|
||||
|
||||
loader.remove()
|
||||
this.modalController.dismiss('Eevent not Foud');
|
||||
@@ -173,7 +178,7 @@ export class ViewEventPage implements OnInit {
|
||||
}
|
||||
|
||||
deleteEvent(){
|
||||
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0).subscribe(async () =>
|
||||
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName).subscribe(async () =>
|
||||
{
|
||||
const alert = await this.alertController.create({
|
||||
cssClass: 'my-custom-class',
|
||||
@@ -191,7 +196,7 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
|
||||
async OpenDeleteEventModal() {
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: EliminateEventPage,
|
||||
componentProps: {
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<ion-item-sliding>
|
||||
<div class="item item-hover width-100 d-flex ion-no-padding ion-no-margin"
|
||||
*ngFor="let dm of userDirectMessages"
|
||||
[class.item-active]="dm._id ==idSelected">
|
||||
[class.item-active]="dm._id == idSelected">
|
||||
<div class="item-icon">
|
||||
<ion-icon class="icon" slot="start" src="assets/images/icons-chat-chat-40.svg"></ion-icon>
|
||||
</div>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<ion-list class="members-list" *ngFor="let user of members">
|
||||
<ion-item-sliding>
|
||||
<ion-item lines="none" class="members-checkbox ion-no-border ion-no-padding">
|
||||
<ion-checkbox checked color="primary"></ion-checkbox>
|
||||
<ion-checkbox checked disabled color="primary"></ion-checkbox>
|
||||
<p>{{user.name}}</p>
|
||||
<ion-icon class="{{user.status}}" name="ellipse"></ion-icon>
|
||||
</ion-item>
|
||||
|
||||
@@ -40,24 +40,54 @@
|
||||
<ion-label>A conversa original mantêm-se como chat individual</ion-label>
|
||||
</div>
|
||||
<div *ngFor="let msg of messages; let last = last" >
|
||||
<div *ngIf="msg.t != 'r'" class='incoming-{{msg.u.username!=loggedUser.me.username}}'>
|
||||
<div *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'ru'" class='incoming-{{msg.u.username!=loggedUser.me.username}}'>
|
||||
<div class="title">
|
||||
<ion-label>{{msg.u.name}}</ion-label>
|
||||
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<div class="message">
|
||||
<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 *ngIf="file.thumb_url">
|
||||
<div class="file d-flex">
|
||||
<ion-thumbnail slot="start">
|
||||
<img src="{{file.thumb_url}}" alt="image">
|
||||
</ion-thumbnail>
|
||||
<ion-label class="file-details">
|
||||
<h3 (click)="viewDocument(file.title_link)" class="file-title cursor-pointer">{{file.title}}</h3>
|
||||
<p *ngIf="file.text">{{file.text}}</p>
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{last ? scrollToBottom() : ''}}
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="msg.t == 'r'" class="info-text">
|
||||
<ion-label>Alterou o assunto para "{{msg.msg.split('-').join(' ')}}"</ion-label><br />
|
||||
<ion-label>Alterou o nome do grupo para "{{msg.msg.split('-').join(' ')}}"</ion-label><br />
|
||||
{{last ? scrollToBottom() : ''}}
|
||||
</div>
|
||||
<div *ngIf="msg.t == 'ul'" class="info-text-leave">
|
||||
<div *ngFor="let user of allUsers">
|
||||
<div *ngIf="msg.msg == user.username">
|
||||
<ion-label>{{user.name}} saiu do grupo</ion-label><br />
|
||||
</div>
|
||||
</div>
|
||||
{{last ? scrollToBottom() : ''}}
|
||||
</div>
|
||||
<div *ngIf="msg.t == 'ru'" class="info-text-leave">
|
||||
<div *ngFor="let user of allUsers">
|
||||
<div *ngIf="msg.msg == user.username">
|
||||
<ion-label>{{user.name}} foi removido do grupo</ion-label><br />
|
||||
</div>
|
||||
</div>
|
||||
{{last ? scrollToBottom() : ''}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="leaveStatus" class="info-text-leave">
|
||||
<ion-label>{{leaveStatus}}</ion-label>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
<!--
|
||||
|
||||
@@ -93,17 +93,17 @@
|
||||
border-radius: 8px;
|
||||
}
|
||||
.info-text{
|
||||
/* width: 322px; */
|
||||
width: em(422px);
|
||||
background: #fef4c5;
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
color: #262420;
|
||||
padding: 10px;
|
||||
margin: 10px auto;
|
||||
line-height: 1.2rem;
|
||||
/* margin: 15px 0px 15px 0px; */
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
width: fit-content;
|
||||
height: auto;
|
||||
background: #fef4c5;
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
color: #262420;
|
||||
padding: 10px;
|
||||
margin: 10px auto;
|
||||
line-height: 1.2rem;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.info-text-leave{
|
||||
display: flex;
|
||||
@@ -168,6 +168,28 @@
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
.message{
|
||||
.message-attachments{
|
||||
.file{
|
||||
align-items: center;
|
||||
|
||||
.file-details{
|
||||
width: 100%;
|
||||
|
||||
.file-title{
|
||||
color: #000;
|
||||
text-decoration: underline;
|
||||
white-space: nowrap;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
}
|
||||
.file-title:hover{
|
||||
color: #0782c9;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.online{
|
||||
color:#99e47b !important;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,10 @@ import { GroupContactsPage } from './group-contacts/group-contacts.page';
|
||||
import {Router} from '@angular/router'
|
||||
import { EditGroupPage } from '../edit-group/edit-group.page';
|
||||
import { TimeService } from 'src/app/services/functions/time.service';
|
||||
import { FileLoaderService } from 'src/app/services/file/file-loader.service';
|
||||
import { FileToBase64Service } from 'src/app/services/file/file-to-base64.service';
|
||||
import { FileService } from 'src/app/services/functions/file.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-group-messages',
|
||||
@@ -22,13 +26,13 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
isGroupCreated:boolean;
|
||||
loggedUser: any;
|
||||
message:any;
|
||||
leaveStatus:any;
|
||||
messages:any;
|
||||
|
||||
room:any;
|
||||
roomName:any;
|
||||
members:any;
|
||||
contacts: string[] = [" Ana M.", "Andre F.", "Bruno G.", "Catarina T", "Tiago"];
|
||||
allUsers:any[] = [];
|
||||
|
||||
roomId: string;
|
||||
loggedUserChat:any;
|
||||
@@ -39,6 +43,9 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
currentPosition: any;
|
||||
startPosition: number;
|
||||
|
||||
capturedImage:any;
|
||||
capturedImageTitle:any;
|
||||
|
||||
@ViewChild('scrollMe') private myScrollContainer: ElementRef;
|
||||
|
||||
constructor(
|
||||
@@ -52,6 +59,10 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
private alertService: AlertService,
|
||||
private route: Router,
|
||||
private timeService: TimeService,
|
||||
private fileLoaderService: FileLoaderService,
|
||||
private fileToBase64Service: FileToBase64Service,
|
||||
private fileService: FileService,
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
this.loggedUserChat = authService.ValidatedUserChat['data'];
|
||||
this.isGroupCreated = true;
|
||||
@@ -70,6 +81,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
this.scrollToBottom();
|
||||
this.serverLongPull();
|
||||
this.setStatus('online');
|
||||
this.getChatMembers();
|
||||
}
|
||||
|
||||
setStatus(status:string){
|
||||
@@ -125,6 +137,16 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
});
|
||||
}
|
||||
|
||||
async getChatMembers(){
|
||||
//return await this.chatService.getMembers(roomId).toPromise();
|
||||
this.chatService.getAllUsers().subscribe(res=> {
|
||||
console.log(res);
|
||||
|
||||
this.allUsers = res['users'].filter(data => data.username != this.loggedUserChat.me.username);
|
||||
console.log(this.allUsers);
|
||||
});
|
||||
}
|
||||
|
||||
/* load(){
|
||||
this.getGroupContacts();
|
||||
this.loadGroupMessages();
|
||||
@@ -246,7 +268,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
if(res.data == 'leave'){
|
||||
this.leaveStatus = this.loggedUser.me.name + ' saiu do grupo';
|
||||
console.log('saiu do grupo');
|
||||
}
|
||||
else if(res.data == 'cancel'){
|
||||
console.log('cancel');
|
||||
@@ -257,6 +279,47 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
});
|
||||
}
|
||||
|
||||
loadPicture() {
|
||||
const input = this.fileLoaderService.createInput({
|
||||
accept: ['image/apng', 'image/jpeg', 'image/png']
|
||||
})
|
||||
|
||||
input.onchange = async () => {
|
||||
const file = this.fileLoaderService.getFirstFile(input)
|
||||
|
||||
console.log(file);
|
||||
|
||||
const imageData = await this.fileToBase64Service.convert(file)
|
||||
this.capturedImage = imageData;
|
||||
this.capturedImageTitle = file.name;
|
||||
|
||||
let body = {
|
||||
"message":
|
||||
{
|
||||
"rid": this.roomId,
|
||||
"msg": "",
|
||||
"attachments": [{
|
||||
//"title": this.capturedImageTitle ,
|
||||
//"text": "description",
|
||||
"title_link_download": false,
|
||||
"image_url": this.capturedImage,
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
this.chatService.sendMessage(body).subscribe(res=> {
|
||||
console.log(res);
|
||||
},(error) => {
|
||||
|
||||
});
|
||||
//console.log(this.capturedImage)
|
||||
};
|
||||
}
|
||||
|
||||
viewDocument(url:string){
|
||||
this.fileService.viewDocumentByUrl(url);
|
||||
}
|
||||
|
||||
async openChatOptions(ev?: any) {
|
||||
console.log(this.members);
|
||||
|
||||
@@ -271,7 +334,37 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
},
|
||||
translucent: true
|
||||
});
|
||||
return await popover.present();
|
||||
await popover.present();
|
||||
await popover.onDidDismiss().then((res)=>{
|
||||
if(res['data'] == "loadPicture"){
|
||||
this.loadPicture();
|
||||
}
|
||||
else if(res['data'] == "takePicture"){
|
||||
let data = this.fileService.takePicture();
|
||||
if(data.name != null){
|
||||
let body = {
|
||||
"message":
|
||||
{
|
||||
"rid": this.roomId,
|
||||
"msg": "",
|
||||
"attachments": [{
|
||||
"title": data.name,
|
||||
"title_link_download": false,
|
||||
"image_url": data.image,
|
||||
}]
|
||||
}
|
||||
}
|
||||
this.chatService.sendMessage(body).subscribe(res=> {
|
||||
console.log(res);
|
||||
},(error) => {
|
||||
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.toastService.badRequest("Não foi possível adicionar a fotografia!");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async addContacts(){
|
||||
|
||||
@@ -35,19 +35,19 @@ export class EditEventPage implements OnInit {
|
||||
profile:string;
|
||||
|
||||
constructor(
|
||||
public formBuilder: FormBuilder,
|
||||
public alertController: AlertController,
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private eventsService: EventsService,
|
||||
public formBuilder: FormBuilder,
|
||||
public alertController: AlertController,
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private eventsService: EventsService,
|
||||
private modalCtrl: ModalController,
|
||||
private alertService: AlertService,
|
||||
private attachamentsService: AttachmentsService,
|
||||
private route: Router,
|
||||
private iab: InAppBrowser) {
|
||||
private iab: InAppBrowser) {
|
||||
this.loadedEvent = new Event();
|
||||
this.loadedEvent.Body = new EventBody();
|
||||
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -73,7 +73,7 @@ export class EditEventPage implements OnInit {
|
||||
this.pageId = paramMap.get('eventId');
|
||||
eventid = paramMap.get('eventId');
|
||||
console.log(eventid);
|
||||
|
||||
|
||||
}
|
||||
if (paramMap.has("caller")){
|
||||
this.backURL = "/home/" + paramMap.get('caller');
|
||||
@@ -99,7 +99,7 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
if (data['data'] != null)
|
||||
{
|
||||
{
|
||||
let newattendees: EventPerson[] = data['data'];
|
||||
this.loadedEvent.Attendees = newattendees;
|
||||
}
|
||||
@@ -142,20 +142,20 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
Delete()
|
||||
{
|
||||
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0).subscribe(async () =>
|
||||
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName).subscribe(async () =>
|
||||
{
|
||||
const alert = await this.alertController.create({
|
||||
cssClass: 'my-custom-class',
|
||||
header: 'Evento removido',
|
||||
buttons: ['OK']
|
||||
});
|
||||
|
||||
|
||||
setTimeout(()=>{
|
||||
alert.dismiss();
|
||||
}, 1500);
|
||||
|
||||
this.router.navigate(['/home/events']);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Save()
|
||||
@@ -165,18 +165,18 @@ export class EditEventPage implements OnInit {
|
||||
this.activatedRoute.paramMap.subscribe(paramMap =>{
|
||||
if (paramMap.has("profile")){
|
||||
console.log(paramMap.get('profile'));
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
this.eventsService.editEvent(this.loadedEvent, 2, 3).subscribe(async () =>
|
||||
this.eventsService.editEvent(this.loadedEvent, 2, 3).subscribe(async () =>
|
||||
{
|
||||
const alert = await this.alertController.create({
|
||||
cssClass: 'my-custom-class',
|
||||
header: 'Evento actualizado',
|
||||
buttons: ['OK']
|
||||
});
|
||||
|
||||
|
||||
setTimeout(()=>{
|
||||
alert.dismiss();
|
||||
}, 1500);
|
||||
@@ -189,13 +189,13 @@ export class EditEventPage implements OnInit {
|
||||
}
|
||||
|
||||
loadAttachments()
|
||||
{
|
||||
{
|
||||
/* console.log(this.pageId); */
|
||||
|
||||
|
||||
this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => {
|
||||
this.loadedEventAttachments = res;
|
||||
console.log(res);
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
async viewDocument(documenturl:string)
|
||||
@@ -230,12 +230,12 @@ export class EditEventPage implements OnInit {
|
||||
cssClass: 'attachments',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
await modal.present();
|
||||
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
if (data['data'] != null)
|
||||
{
|
||||
{
|
||||
let newattendees: EventPerson[] = data['data'];
|
||||
this.loadedEvent.Attendees = newattendees;
|
||||
}
|
||||
|
||||
@@ -32,15 +32,15 @@ export class EventDetailModalPage implements OnInit {
|
||||
profile:string;
|
||||
|
||||
constructor(
|
||||
public formBuilder: FormBuilder,
|
||||
public alertController: AlertController,
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private eventsService: EventsService,
|
||||
public formBuilder: FormBuilder,
|
||||
public alertController: AlertController,
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private eventsService: EventsService,
|
||||
private modalCtrl: ModalController,
|
||||
private alertService: AlertService,
|
||||
private attachamentsService: AttachmentsService,
|
||||
private route: Router,) {
|
||||
private route: Router,) {
|
||||
this.loadedEvent = new Event();
|
||||
this.loadedEvent.Body = new EventBody();
|
||||
}
|
||||
@@ -75,7 +75,7 @@ export class EventDetailModalPage implements OnInit {
|
||||
this.pageId = paramMap.get('eventId');
|
||||
eventid = paramMap.get('eventId');
|
||||
console.log(eventid);
|
||||
|
||||
|
||||
}
|
||||
if (paramMap.has("caller")){
|
||||
this.backURL = "/home/" + paramMap.get('caller');
|
||||
@@ -101,7 +101,7 @@ export class EventDetailModalPage implements OnInit {
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
if (data['data'] != null)
|
||||
{
|
||||
{
|
||||
let newattendees: EventPerson[] = data['data'];
|
||||
this.loadedEvent.Attendees = newattendees;
|
||||
}
|
||||
@@ -144,35 +144,35 @@ export class EventDetailModalPage implements OnInit {
|
||||
|
||||
Delete()
|
||||
{
|
||||
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0).subscribe(async () =>
|
||||
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName).subscribe(async () =>
|
||||
{
|
||||
const alert = await this.alertController.create({
|
||||
cssClass: 'my-custom-class',
|
||||
header: 'Evento removido',
|
||||
buttons: ['OK']
|
||||
});
|
||||
|
||||
|
||||
setTimeout(()=>{
|
||||
alert.dismiss();
|
||||
}, 1500);
|
||||
|
||||
this.router.navigate(['/home/events']);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Save()
|
||||
{
|
||||
if (this.ionicForm.valid)
|
||||
if (this.ionicForm.valid)
|
||||
{
|
||||
|
||||
this.eventsService.putEvent(this.loadedEvent, 2, 3, "md").subscribe(async () =>
|
||||
this.eventsService.putEvent(this.loadedEvent, 2, 3, "md").subscribe(async () =>
|
||||
{
|
||||
const alert = await this.alertController.create({
|
||||
cssClass: 'my-custom-class',
|
||||
header: 'Evento actualizado',
|
||||
buttons: ['OK']
|
||||
});
|
||||
|
||||
|
||||
setTimeout(()=>{
|
||||
alert.dismiss();
|
||||
}, 1500);
|
||||
@@ -185,16 +185,16 @@ export class EventDetailModalPage implements OnInit {
|
||||
}
|
||||
|
||||
loadAttachments()
|
||||
{
|
||||
{
|
||||
/* this.attachamentsService.getEventAttachments(this.pageId).subscribe(attachments => {
|
||||
this.loadedEventAttachments = attachments;
|
||||
}); */
|
||||
this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => {
|
||||
console.log(res);
|
||||
|
||||
|
||||
},(error) => {
|
||||
console.log(error);
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
async viewDocument(documenturl:string)
|
||||
@@ -234,7 +234,7 @@ export class EventDetailModalPage implements OnInit {
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
if (data['data'] != null)
|
||||
{
|
||||
{
|
||||
let newattendees: EventPerson[] = data['data'];
|
||||
this.loadedEvent.Attendees = newattendees;
|
||||
}
|
||||
|
||||
@@ -36,16 +36,16 @@ export class EventDetailPage implements OnInit {
|
||||
|
||||
|
||||
constructor(
|
||||
public formBuilder: FormBuilder,
|
||||
public alertController: AlertController,
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private eventsService: EventsService,
|
||||
public formBuilder: FormBuilder,
|
||||
public alertController: AlertController,
|
||||
private router: Router,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private eventsService: EventsService,
|
||||
private modalCtrl: ModalController,
|
||||
private alertService: AlertService,
|
||||
private attachamentsService: AttachmentsService,
|
||||
private route: Router,
|
||||
private iab: InAppBrowser) {
|
||||
private iab: InAppBrowser) {
|
||||
this.loadedEvent = new Event();
|
||||
this.loadedEvent.Body = new EventBody();
|
||||
}
|
||||
@@ -73,7 +73,7 @@ export class EventDetailPage implements OnInit {
|
||||
this.pageId = paramMap.get('eventId');
|
||||
eventid = paramMap.get('eventId');
|
||||
console.log(eventid);
|
||||
|
||||
|
||||
}
|
||||
if (paramMap.has("caller")){
|
||||
this.backURL = "/home/" + paramMap.get('caller');
|
||||
@@ -99,7 +99,7 @@ export class EventDetailPage implements OnInit {
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
if (data['data'] != null)
|
||||
{
|
||||
{
|
||||
let newattendees: EventPerson[] = data['data'];
|
||||
this.loadedEvent.Attendees = newattendees;
|
||||
}
|
||||
@@ -142,18 +142,18 @@ export class EventDetailPage implements OnInit {
|
||||
|
||||
Delete()
|
||||
{
|
||||
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0).subscribe(async () =>
|
||||
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0, this.loadedEvent.CalendarName).subscribe(async () =>
|
||||
{
|
||||
/* const alert = await this.alertController.create({
|
||||
cssClass: 'my-custom-class',
|
||||
header: 'Evento removido',
|
||||
buttons: ['OK']
|
||||
});
|
||||
|
||||
|
||||
await alert.present(); */
|
||||
|
||||
this.router.navigate(['/home/events']);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Save()
|
||||
@@ -163,18 +163,18 @@ export class EventDetailPage implements OnInit {
|
||||
this.activatedRoute.paramMap.subscribe(paramMap =>{
|
||||
if (paramMap.has("profile")){
|
||||
console.log(paramMap.get('profile'));
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
this.eventsService.editEvent(this.loadedEvent, 2, 3).subscribe(async () =>
|
||||
this.eventsService.editEvent(this.loadedEvent, 2, 3).subscribe(async () =>
|
||||
{
|
||||
const alert = await this.alertController.create({
|
||||
cssClass: 'my-custom-class',
|
||||
header: 'Evento actualizado',
|
||||
buttons: ['OK']
|
||||
});
|
||||
|
||||
|
||||
setTimeout(()=>{
|
||||
alert.dismiss();
|
||||
}, 1500);
|
||||
@@ -187,13 +187,13 @@ export class EventDetailPage implements OnInit {
|
||||
}
|
||||
|
||||
loadAttachments()
|
||||
{
|
||||
{
|
||||
/* console.log(this.pageId); */
|
||||
|
||||
|
||||
this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => {
|
||||
this.loadedEventAttachments = res;
|
||||
console.log(res);
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
async viewDocument(documenturl:string)
|
||||
@@ -228,17 +228,17 @@ export class EventDetailPage implements OnInit {
|
||||
cssClass: 'attachments',
|
||||
backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
await modal.present();
|
||||
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
if (data['data'] != null)
|
||||
{
|
||||
{
|
||||
let newattendees: EventPerson[] = data['data'];
|
||||
this.loadedEvent.Attendees = newattendees;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -123,7 +123,9 @@ export class EventsPage implements OnInit {
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationEnd && event.url == '/home/events') {
|
||||
this.RefreshEvents();
|
||||
this.LoadList();
|
||||
setTimeout(()=>{
|
||||
this.LoadList();
|
||||
}, 1500)
|
||||
}
|
||||
});
|
||||
this.hideSearch();
|
||||
@@ -442,9 +444,9 @@ export class EventsPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
viewExpedientListPage() {
|
||||
if (this.loggeduser.Profile == 'MDGPR') {
|
||||
if (window.innerWidth < 801) {
|
||||
viewExpedientListPage(){
|
||||
if(this.loggeduser.Profile == 'MDGPR'){
|
||||
if( window.innerWidth < 701){
|
||||
this.router.navigate(['/home/gabinete-digital/expediente']);
|
||||
}
|
||||
else {
|
||||
@@ -452,8 +454,8 @@ export class EventsPage implements OnInit {
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
}
|
||||
else if (this.loggeduser.Profile == 'PR') {
|
||||
if (window.innerWidth < 801) {
|
||||
else if(this.loggeduser.Profile == 'PR'){
|
||||
if( window.innerWidth < 701){
|
||||
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
|
||||
}
|
||||
else {
|
||||
|
||||
+2
-3
@@ -143,7 +143,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
async openAddNoteModal(actionName:string) {
|
||||
let classs;
|
||||
if( window.innerWidth < 801) {
|
||||
if( window.innerWidth < 701) {
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'add-note-modal'
|
||||
@@ -382,7 +382,6 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then( async(res)=>{
|
||||
alert('AQUI')
|
||||
let body = res['data'];
|
||||
if(res['data']) {
|
||||
const loader = this.toastService.loading()
|
||||
@@ -470,7 +469,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
console.log(task);
|
||||
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
if( window.innerWidth < 701){
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
|
||||
@@ -64,8 +64,8 @@
|
||||
</div>
|
||||
</ion-list>
|
||||
|
||||
<div
|
||||
*ngIf="!skeletonLoader && expedienteGdStore.list.length == 0 && expedienteGdStore.list.length == 0"
|
||||
<div
|
||||
*ngIf="!skeletonLoader && expedienteGdStore.list.length == 0 && expedienteGdStore.list.length == 0"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
>
|
||||
<span>Lista vazia</span>
|
||||
@@ -95,9 +95,9 @@
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ion-content>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
</ion-header>
|
||||
|
||||
<ion-header class="ion-no-border header-2">
|
||||
|
||||
|
||||
<app-btn-modal-dismiss (click)="goBack()" ></app-btn-modal-dismiss>
|
||||
|
||||
<div class="title">
|
||||
@@ -18,25 +18,25 @@
|
||||
<ion-content>
|
||||
|
||||
<div class="main-content width-100 overflow-y-auto height-100">
|
||||
|
||||
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
|
||||
<div class="width-100" >
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<ion-list>
|
||||
<div
|
||||
class="expediente ion-no-padding ion-no-margin cursor-pointer"
|
||||
class="expediente ion-no-padding ion-no-margin cursor-pointer"
|
||||
*ngFor = "let task of expedienteGdStore.list"
|
||||
(click)="goToExpediente(task.SerialNumber)"
|
||||
>
|
||||
<div class="item width-100">
|
||||
<div class="exp-top-detail">
|
||||
<div class="subject">
|
||||
<ion-label>{{ task.Folio }}</ion-label>
|
||||
<ion-label>{{ task.Subject }}</ion-label>
|
||||
</div>
|
||||
<div class="exp-icon">
|
||||
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
@@ -61,16 +61,16 @@
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
<div
|
||||
*ngIf="!skeletonLoader && expedienteGdStore.list.length == 0 && expedienteGdStore.list.length == 0"
|
||||
<div
|
||||
*ngIf="!skeletonLoader && expedienteGdStore.list.length == 0 && expedienteGdStore.list.length == 0"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
>
|
||||
<span>Lista vazia</span>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Skeleton loader -->
|
||||
<div *ngIf="skeletonLoader && expedienteGdStore.list.length == 0">
|
||||
|
||||
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
<ion-thumbnail slot="end">
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
<p class="text-center exp-card-content">{{eventoaprovacaostore.countMd + eventoaprovacaostore.countPr}} <span class="title1">Documentos</span></p>
|
||||
</div>
|
||||
|
||||
<div [class.active]="selectedElement == 'Correspondence'" (click)="openExpedientListPage(); selectedElement='Correspondence'" class="box-hover exp-card d-flex flex-column justify-center" *ngIf="loggeduser.Profile == 'MDGPR'">
|
||||
<div (click)="openExpedientListPage(); selectedElement='Correspondence'" [class.active]="selectedElement == 'Correspondence'" class="box-hover exp-card d-flex flex-column justify-center">
|
||||
<div class="d-flex justify-center">
|
||||
<ion-icon src="assets/images/icons-correspondencia.svg"></ion-icon>
|
||||
</div>
|
||||
|
||||
@@ -26,8 +26,6 @@ export class PublicationDetailPage implements OnInit {
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
private location: Location ) {
|
||||
|
||||
alert('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
|
||||
|
||||
this.publicationId = this.navParams.get('publicationId');
|
||||
/* this.folderId = this.navParams.get('folderIdId'); */
|
||||
|
||||
@@ -68,9 +68,9 @@ export class SearchPage implements OnInit {
|
||||
this.select = this.navParams.get('select');
|
||||
|
||||
this.showSearchInput = this.navParams.get('showSearchInput');
|
||||
|
||||
|
||||
if(this.type == null || this.type == undefined) {
|
||||
|
||||
|
||||
if(this.currentPath == '/home/agenda') {
|
||||
this.type = "Agenda"
|
||||
} else if (this.currentPath =='/home/gabinete-digital') {
|
||||
@@ -138,7 +138,7 @@ export class SearchPage implements OnInit {
|
||||
|
||||
res.forEach(e => {
|
||||
const array: any = Object.values(e);
|
||||
|
||||
|
||||
array[1] = (((array[1] - lowest) / perPercent) * (maximum - minimumSize)/ 100 ) + minimumSize;
|
||||
list.push(array)
|
||||
});
|
||||
@@ -152,7 +152,7 @@ export class SearchPage implements OnInit {
|
||||
setTimeout(()=>{
|
||||
WordCloud(
|
||||
elem,
|
||||
{
|
||||
{
|
||||
list: this.list,
|
||||
Family: 'Times, serif',
|
||||
gridSize: 15
|
||||
@@ -171,7 +171,7 @@ export class SearchPage implements OnInit {
|
||||
|
||||
WordCloud(
|
||||
elem,
|
||||
{
|
||||
{
|
||||
list: this.list,
|
||||
Family: 'Times, serif',
|
||||
gridSize: 15
|
||||
@@ -188,7 +188,7 @@ export class SearchPage implements OnInit {
|
||||
|
||||
|
||||
reorderList(orderBy: string) {
|
||||
|
||||
|
||||
this.ordinance = orderBy;
|
||||
|
||||
if(this.ordinance == 'recent'){
|
||||
@@ -210,18 +210,18 @@ export class SearchPage implements OnInit {
|
||||
basicSearch() {
|
||||
|
||||
if(this.type == "Agenda" ){
|
||||
|
||||
|
||||
|
||||
this.showLoader = true;
|
||||
|
||||
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId, '0').subscribe(res=>{
|
||||
console.log(res);
|
||||
|
||||
|
||||
res.Categories.forEach( e => {
|
||||
e['Active'] = false;
|
||||
});
|
||||
|
||||
|
||||
// bind respose
|
||||
this.searchCategories = res.Categories;
|
||||
|
||||
@@ -231,11 +231,11 @@ export class SearchPage implements OnInit {
|
||||
|
||||
// hide show document
|
||||
if(this.searchDocuments.length >= 1){
|
||||
this.showDocuments = true;
|
||||
this.showDocuments = true;
|
||||
} else {
|
||||
this.showDocuments = false
|
||||
}
|
||||
|
||||
|
||||
this.showLoader = false;
|
||||
this.loadWordCloud();
|
||||
|
||||
@@ -254,24 +254,24 @@ export class SearchPage implements OnInit {
|
||||
|
||||
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;
|
||||
this.showDocuments = true;
|
||||
} else {
|
||||
this.showDocuments = false
|
||||
}
|
||||
@@ -280,33 +280,33 @@ export class SearchPage implements OnInit {
|
||||
if(counter ==2){
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
|
||||
this.loadWordCloud();
|
||||
});
|
||||
|
||||
|
||||
this.search.searchForDoc(this.searchSubject, this.searchDocumentDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId, '361').subscribe(res=>{
|
||||
|
||||
|
||||
res.Categories.forEach( e => {
|
||||
e['Active'] = false;
|
||||
this.searchCategories.push(e)
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
this.sortArrayISODate(res.Documents).forEach(e => {
|
||||
e['appName'] = 'ArquivoDespachoElect'
|
||||
this.searchDocuments.push(e)
|
||||
});
|
||||
|
||||
|
||||
this.reorderList(this.ordinance);
|
||||
|
||||
|
||||
// hide show document
|
||||
if(this.searchDocuments.length >= 1){
|
||||
this.showDocuments = true;
|
||||
this.showDocuments = true;
|
||||
} else {
|
||||
this.showDocuments = false
|
||||
}
|
||||
|
||||
|
||||
this.loadWordCloud();
|
||||
counter++;
|
||||
|
||||
@@ -314,34 +314,34 @@ export class SearchPage implements OnInit {
|
||||
this.showLoader = false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
} 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;
|
||||
this.showDocuments = true;
|
||||
} else {
|
||||
this.showDocuments = false
|
||||
}
|
||||
|
||||
|
||||
counter++;
|
||||
|
||||
if(counter ==2){
|
||||
@@ -350,31 +350,31 @@ export class SearchPage implements OnInit {
|
||||
|
||||
this.loadWordCloud();
|
||||
});
|
||||
|
||||
|
||||
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
|
||||
,this.searchOrganicEntiry, this.searchDocTypeId, '361').subscribe(res=>{
|
||||
|
||||
|
||||
res.Categories.forEach( e => {
|
||||
e['Active'] = false;
|
||||
this.searchCategories.push(e)
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
this.sortArrayISODate(res.Documents).forEach(e => {
|
||||
e['appName'] = 'ArquivoDespachoElect'
|
||||
this.searchDocuments.push(e)
|
||||
});
|
||||
|
||||
|
||||
this.reorderList(this.ordinance);
|
||||
|
||||
|
||||
// hide show document
|
||||
if(this.searchDocuments.length >= 1){
|
||||
this.showDocuments = true;
|
||||
this.showDocuments = true;
|
||||
} else {
|
||||
this.showDocuments = false
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
counter++;
|
||||
|
||||
if(counter ==2){
|
||||
@@ -382,22 +382,22 @@ export class SearchPage implements OnInit {
|
||||
}
|
||||
this.loadWordCloud();
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
} else if (this.type == "AccoesPresidenciais"){
|
||||
|
||||
|
||||
this.showLoader = true;
|
||||
|
||||
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;
|
||||
|
||||
@@ -407,11 +407,11 @@ export class SearchPage implements OnInit {
|
||||
|
||||
// hide show document
|
||||
if(this.searchDocuments.length >= 1){
|
||||
this.showDocuments = true;
|
||||
this.showDocuments = true;
|
||||
} else {
|
||||
this.showDocuments = false
|
||||
}
|
||||
|
||||
|
||||
this.showLoader = false;
|
||||
this.loadWordCloud();
|
||||
});
|
||||
@@ -447,7 +447,7 @@ export class SearchPage implements OnInit {
|
||||
this.searchCategories.forEach((e, j) => {
|
||||
if(i != j){
|
||||
e['Active'] = false;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
if (this.searchCategories[i]['Active']){
|
||||
@@ -526,10 +526,10 @@ export class SearchPage implements OnInit {
|
||||
}
|
||||
|
||||
async filterDocList(categoryName:string){
|
||||
|
||||
|
||||
// show all category
|
||||
if(this. showCategory == categoryName ){
|
||||
|
||||
|
||||
this.showSearchDocuments = this.searchDocuments;
|
||||
|
||||
} else { // filter category
|
||||
@@ -569,13 +569,13 @@ export class SearchPage implements OnInit {
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{});
|
||||
|
||||
|
||||
} else if(this.type == "AccoesPresidenciais"){
|
||||
|
||||
|
||||
this.viewPublicationDetail(Id);
|
||||
}
|
||||
else if(this.type == "AccoesPresidenciais & ArquivoDespachoElect"){
|
||||
|
||||
|
||||
if(ApplicationType == '8' || ApplicationType == '361') {
|
||||
this.viewDocumentDetail(Id, ApplicationType);
|
||||
// this.openExpedientActionsModal(searchDocument)
|
||||
@@ -594,7 +594,7 @@ export class SearchPage implements OnInit {
|
||||
cssClass: 'publication-detail modal modal-desktop ',
|
||||
//backdropDismiss: false
|
||||
});
|
||||
|
||||
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(()=>{});
|
||||
|
||||
@@ -603,12 +603,12 @@ export class SearchPage implements OnInit {
|
||||
async viewDocumentDetail(docId:string, applicationId:string) {
|
||||
let classs;
|
||||
|
||||
if( window.innerWidth <= 800) {
|
||||
if( window.innerWidth < 701) {
|
||||
classs = 'modal modal-desktop'
|
||||
} else {
|
||||
classs = 'modal modal-desktop showAsideOptions'
|
||||
}
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: DocumentDetailPage,
|
||||
componentProps:{
|
||||
@@ -622,5 +622,5 @@ export class SearchPage implements OnInit {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user