mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Pull made changes from Tiago
This commit is contained in:
@@ -12,13 +12,14 @@ export class AuthGuard implements CanActivate {
|
||||
private router:Router,
|
||||
private localstoreService: LocalstoreService
|
||||
){}
|
||||
|
||||
|
||||
canActivate(
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
|
||||
|
||||
|
||||
if(!SessionStore.user.Inactivity) {
|
||||
this.router.navigate(['/']);
|
||||
return false
|
||||
}
|
||||
else if(!SessionStore.exist) {
|
||||
this.router.navigate(['/']);
|
||||
@@ -27,5 +28,5 @@ export class AuthGuard implements CanActivate {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ import { Component, OnInit } from '@angular/core';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { ExpedientTaskModalPageNavParamsTask } from 'src/app/models/ExpedientTaskModalPage';
|
||||
import { SearchDocumentDetails, SearchFolderDetails } from 'src/app/models/search-document';
|
||||
import { ExpedientTaskModalPage } from 'src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { EventDetailsDocumentsOptionsPage } from 'src/app/shared/popover/event-details-documents-options/event-details-documents-options.page';
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ export class CustomTaskPipe implements PipeTransform {
|
||||
transform(fullTask): customTask {
|
||||
|
||||
let date = new Date(fullTask.taskStartDate);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
let taskDate = date.getFullYear()+"-"+ date.getMonth()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
let month = date.getMonth() + 1;
|
||||
let taskDate = date.getFullYear() + "-" + month +"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+ ":"+date.getSeconds();
|
||||
|
||||
return {
|
||||
"SerialNumber": fullTask.serialNumber,
|
||||
|
||||
@@ -51,10 +51,11 @@ export class FileService {
|
||||
private platform: Platform,
|
||||
private loadingCtrl: LoadingController,
|
||||
private http: HttpClient,
|
||||
) { }
|
||||
) {
|
||||
this.headers = new HttpHeaders();
|
||||
}
|
||||
|
||||
uploadFile(formData:any){
|
||||
alert('OIEE')
|
||||
|
||||
//const geturl = environment.apiURL + 'Tasks/DelegateTask';
|
||||
const geturl = environment.apiURL + 'lakefs/UploadFiles';
|
||||
@@ -72,6 +73,9 @@ export class FileService {
|
||||
|
||||
params = params.set("path", guid);
|
||||
|
||||
this.headers = this.headers.set('responseType', 'blob');
|
||||
this.headers = this.headers.set('Content-Type', 'application/octet-stream');
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
@@ -315,24 +319,6 @@ export class FileService {
|
||||
//loader.remove();
|
||||
});
|
||||
*/ }
|
||||
async shareLocalFile(){
|
||||
this.http.get('./assets/any.svg', {responseType: 'blob'}).subscribe(res=>{
|
||||
const reader = new FileReader()
|
||||
reader.onloadend=()=>{
|
||||
const result = reader.result as string
|
||||
const base64Data = result.split(',')[1]
|
||||
|
||||
/* FileSharer.share({
|
||||
filename:'any.pdf',
|
||||
base64Data,
|
||||
contentType: "application/pdf",
|
||||
}) */
|
||||
reader.readAsDataURL(res)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
addPictureToChat(roomId) {
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ export class ProcessesService {
|
||||
}
|
||||
|
||||
uploadFile(formData:any){
|
||||
alert('OIEE')
|
||||
|
||||
//const geturl = environment.apiURL + 'Tasks/DelegateTask';
|
||||
const geturl = environment.apiURL + 'lakefs/UploadFiles';
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
<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>
|
||||
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -88,8 +88,9 @@ export class EventListPage implements OnInit {
|
||||
if(allEvents.length > 0){
|
||||
this.eventsPRList = this.sortService.sortArrayByDate(allEvents).reverse();
|
||||
}
|
||||
this.showLoader = false;
|
||||
}
|
||||
this.showLoader = false;
|
||||
|
||||
}
|
||||
|
||||
async openApproveModal(eventSerialNumber, data) {
|
||||
|
||||
@@ -93,8 +93,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2 d-flex">
|
||||
<div class="ion-item-class-2 d-flex" >
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
@@ -102,7 +103,7 @@
|
||||
<!--
|
||||
[className]="Form?.get('Subject')?.invalid ? 'input-error ion-input-class flex-grow-1' : 'ion-input-class ion-input-class flex-grow-1' "
|
||||
-->
|
||||
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs materia-top">
|
||||
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs materia-top" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
|
||||
<mat-form-field class="date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
@@ -133,7 +134,7 @@
|
||||
<!--
|
||||
[className]="Form?.get('Subject')?.invalid ? 'input-error ion-input-class flex-grow-1' : 'ion-input-class ion-input-class flex-grow-1' "
|
||||
-->
|
||||
<div (click)="openFim()" class="ion-input-class flex-grow-1 justify-center align-center materia-top" [class.input-error]="Form?.get('dateEnd')?.invalid && validateFrom ">
|
||||
<div (click)="openFim()" class="ion-input-class flex-grow-1 justify-center align-center materia-top" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
|
||||
<mat-form-field class="date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="fim"
|
||||
|
||||
@@ -201,13 +201,11 @@ export class NewEventPage implements OnInit {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.taskParticipants = removeDuplicate(this.taskParticipants);
|
||||
this.taskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
|
||||
|
||||
this.setIntervenient.emit(this.taskParticipants);
|
||||
this.setIntervenientCC.emit(this.taskParticipantsCc);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -218,7 +216,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")
|
||||
}
|
||||
}
|
||||
|
||||
injectValidation() {
|
||||
@@ -227,7 +228,7 @@ export class NewEventPage implements OnInit {
|
||||
const str: any = this.postEvent.EventRecurrence.Type.toString()
|
||||
this.postEvent.EventRecurrence.Type = str
|
||||
}
|
||||
|
||||
|
||||
this.Form = new FormGroup({
|
||||
Subject: new FormControl(this.postEvent.Subject, [
|
||||
Validators.required,
|
||||
@@ -255,8 +256,8 @@ export class NewEventPage implements OnInit {
|
||||
Date: new FormControl( new Date(this.postEvent.StartDate).getTime() < new Date(this.postEvent.EndDate).getTime() ? 'ok': null,[
|
||||
Validators.required
|
||||
]),
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -304,7 +305,6 @@ export class NewEventPage implements OnInit {
|
||||
close(){
|
||||
|
||||
this.deleteTemporaryData();
|
||||
|
||||
this.cloneAllmobileComponent.emit();
|
||||
this.clearContact.emit();
|
||||
this.setIntervenient.emit([]);
|
||||
@@ -331,7 +331,6 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
|
||||
|
||||
|
||||
async save() {
|
||||
|
||||
this.injectValidation()
|
||||
@@ -349,11 +348,6 @@ export class NewEventPage implements OnInit {
|
||||
this.postEvent.HasAttachments = true;
|
||||
}
|
||||
|
||||
if(this.selectedRecurringType != '-1') {
|
||||
this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
|
||||
}
|
||||
|
||||
//
|
||||
if(this.postEvent.EventRecurrence.Type == undefined) {
|
||||
this.postEvent.EventRecurrence.Type = '-1'
|
||||
}
|
||||
@@ -428,10 +422,8 @@ export class NewEventPage implements OnInit {
|
||||
(id) => {
|
||||
console.log(id);
|
||||
|
||||
|
||||
const eventId: any = id;
|
||||
|
||||
|
||||
const DocumentToSave: EventAttachment[] = this.documents.map((e) => {
|
||||
return {
|
||||
SourceTitle: e.Assunto,
|
||||
|
||||
@@ -54,7 +54,14 @@
|
||||
<p *ngIf="toDateString(loadedEvent.StartDate) == toDateString(loadedEvent.EndDate)">das {{loadedEvent.StartDate | date: 'HH:mm'}} às {{loadedEvent.EndDate | date: 'HH:mm'}}</p>
|
||||
<p *ngIf="toDateString(loadedEvent.StartDate) != toDateString(loadedEvent.EndDate)">{{loadedEvent.StartDate | date: 'd/M/yy' }} - {{ loadedEvent.StartDate | date: 'dd/M/yy'}} </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>
|
||||
|
||||
@@ -44,7 +44,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" (click)="openPreview(msg)">
|
||||
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of messages; let last = last">
|
||||
<div class="message-item incoming-{{msg.u.username!=loggedUser.me.username}} max-width-45" *ngIf="msg.t != 'r' && msg.t != 'ul' && msg.t != 'ru'" >
|
||||
<div class="message-item-options d-flex justify-content-end">
|
||||
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer"></fa-icon>
|
||||
@@ -60,7 +60,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">
|
||||
@@ -144,30 +146,31 @@
|
||||
<ion-fab-button (click)="bookMeeting()" color="light">
|
||||
<ion-icon name="calendar"></ion-icon>
|
||||
</ion-fab-button>
|
||||
<ion-fab-button (click)="addFile()" color="light">
|
||||
<!-- <ion-fab-button (click)="addFile()" color="light">
|
||||
<ion-icon name="document"></ion-icon>
|
||||
</ion-fab-button>
|
||||
<ion-fab-button (click)="addImage()" color="light">
|
||||
</ion-fab-button> -->
|
||||
<!-- <ion-fab-button (click)="addImage()" color="light">
|
||||
<ion-icon name="image"></ion-icon>
|
||||
</ion-fab-button>
|
||||
<ion-fab-button class="hide-desktop" (click)="takePicture()" color="light">
|
||||
</ion-fab-button> -->
|
||||
<!-- <ion-fab-button class="hide-desktop" (click)="takePicture()" color="light">
|
||||
<ion-icon name="camera"></ion-icon>
|
||||
</ion-fab-button>
|
||||
</ion-fab-button> -->
|
||||
<ion-fab-button (click)="addFileWebtrix()" color="light">
|
||||
<ion-icon src="assets/icon/webtrix.svg"></ion-icon>
|
||||
</ion-fab-button>
|
||||
</ion-fab-list>
|
||||
</ion-fab>
|
||||
</div>
|
||||
<div class="width-80">
|
||||
|
||||
<div class="width-100">
|
||||
<ion-item class="ion-no-padding type-message" lines="none">
|
||||
<ion-textarea clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
|
||||
<ion-textarea (keyup.enter)="sendMessage()" clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
|
||||
<button hidden class="btn-no-color">
|
||||
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
|
||||
</button>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div>
|
||||
<div class="btn-send">
|
||||
<button *ngIf="message" class="btn-no-color" (click)="sendMessage()">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
@import '~src/function.scss';
|
||||
div{
|
||||
overflow: auto;
|
||||
}
|
||||
.header-toolbar{
|
||||
--background:transparent;
|
||||
--opacity: 1;
|
||||
@@ -200,44 +197,49 @@
|
||||
}
|
||||
}
|
||||
|
||||
ion-footer{
|
||||
padding-top: 7.5px;
|
||||
padding-bottom: 7.5px;
|
||||
.container{
|
||||
justify-content: center;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
ion-footer{
|
||||
padding-top: 7.5px;
|
||||
padding-bottom: 7.5px;
|
||||
|
||||
}
|
||||
.container{
|
||||
justify-content: center;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.chat-icon-options{
|
||||
display:block !important;
|
||||
font-size: 35px;
|
||||
float: right !important;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.chat-icon-options{
|
||||
display:block !important;
|
||||
font-size: 35px;
|
||||
float: right !important;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.chat-icon-send{
|
||||
font-size: 45px;
|
||||
margin: 0 auto;
|
||||
margin-top: 4px;
|
||||
}
|
||||
.chat-icon-send{
|
||||
font-size: 45px;
|
||||
margin: 0 auto;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.type-message{
|
||||
display: flex;
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 25px;
|
||||
padding-left: 15px;
|
||||
align-items: center;
|
||||
overflow: auto;
|
||||
.type-message{
|
||||
display: flex;
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 25px;
|
||||
padding-left: 15px;
|
||||
margin: 0 15px 0 75px;
|
||||
align-items: center;
|
||||
overflow: auto;
|
||||
|
||||
ion-textarea{
|
||||
margin: 0 !important;
|
||||
align-self: center;
|
||||
}
|
||||
}
|
||||
|
||||
ion-textarea{
|
||||
min-height: 50px;
|
||||
margin: 0 !important;
|
||||
align-self: center;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
.btn-send{
|
||||
padding-right: 20px !important;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import { FileService } from 'src/app/services/functions/file.service';
|
||||
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';
|
||||
|
||||
/*
|
||||
import * as pdfjsLib from 'pdfjs-dist';
|
||||
@@ -769,7 +770,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
sliderOpts = {
|
||||
zoom: false,
|
||||
slidesPerView: 1.5,
|
||||
@@ -778,7 +779,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
};
|
||||
zoomActive = false;
|
||||
zoomScale = 1;
|
||||
|
||||
|
||||
sliderZoomOpts = {
|
||||
allowSlidePrev: false,
|
||||
allowSlideNext: false,
|
||||
@@ -786,44 +787,44 @@ 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) {
|
||||
const modal = await this.modalController.create({
|
||||
component: PreviewCameraPage,
|
||||
cssClass: 'transparent-modal',
|
||||
componentProps: {
|
||||
image: img.attachments[0].image_url,
|
||||
username: img.u.username,
|
||||
_updatedAt: img._updatedAt
|
||||
}
|
||||
});
|
||||
modal.present();
|
||||
}
|
||||
async openPreview(msg) {
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewMediaPage,
|
||||
cssClass: 'modal modal-desktop',
|
||||
componentProps: {
|
||||
image: msg.attachments[0].image_url,
|
||||
username: msg.u.name,
|
||||
_updatedAt: msg._updatedAt,
|
||||
}
|
||||
});
|
||||
modal.present();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ export class ContactsPage implements OnInit {
|
||||
}
|
||||
|
||||
openMessagesPage(username:string){
|
||||
if( window.innerWidth <= 1024){
|
||||
if( window.innerWidth < 701){
|
||||
this.createRoom(username);
|
||||
}
|
||||
else{
|
||||
@@ -117,29 +117,19 @@ export class ContactsPage implements OnInit {
|
||||
this.chatService.createRoom(body).subscribe(res => {
|
||||
console.log(res);
|
||||
this.room = res['room'];
|
||||
this.getDirectMessage(this.room._id);
|
||||
this.openMessagesModal(this.room._id);
|
||||
});
|
||||
}
|
||||
getDirectMessage(roomId:any){
|
||||
console.log(roomId);
|
||||
|
||||
this.chatService.getAllDirectMessages().subscribe(res=>{
|
||||
let result = res['ims'].filter(data => data._id == roomId);
|
||||
this.dm = result[0];
|
||||
console.log(this.dm);
|
||||
this.openModal(this.dm);
|
||||
});
|
||||
}
|
||||
async openModal(dm:any){
|
||||
this.close();
|
||||
console.log(dm);
|
||||
async openMessagesModal(roomId: any) {
|
||||
|
||||
console.log(roomId);
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: MessagesPage,
|
||||
cssClass: 'group-messages',
|
||||
backdropDismiss: false,
|
||||
cssClass: 'modal modal-desktop isMessagesChatOpened',
|
||||
componentProps: {
|
||||
dm: dm,
|
||||
roomId: roomId,
|
||||
},
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
@@ -120,25 +120,25 @@
|
||||
<ion-fab-button (click)="bookMeeting()" color="light">
|
||||
<ion-icon name="calendar"></ion-icon>
|
||||
</ion-fab-button>
|
||||
<ion-fab-button hidden (click)="addFile()" color="light">
|
||||
<!-- <ion-fab-button hidden (click)="addFile()" color="light">
|
||||
<ion-icon name="document"></ion-icon>
|
||||
</ion-fab-button>
|
||||
<ion-fab-button (click)="addImage()" color="light">
|
||||
</ion-fab-button> -->
|
||||
<!-- <ion-fab-button (click)="addImage()" color="light">
|
||||
<ion-icon name="image"></ion-icon>
|
||||
</ion-fab-button>
|
||||
<ion-fab-button (click)="takePicture()" color="light">
|
||||
</ion-fab-button> -->
|
||||
<!-- <ion-fab-button (click)="takePicture()" color="light">
|
||||
<ion-icon name="camera"></ion-icon>
|
||||
</ion-fab-button>
|
||||
</ion-fab-button> -->
|
||||
<ion-fab-button (click)="addFileWebtrix()" color="light">
|
||||
<ion-icon src="assets/icon/webtrix.svg"></ion-icon>
|
||||
</ion-fab-button>
|
||||
</ion-fab-list>
|
||||
</ion-fab>
|
||||
|
||||
</div>
|
||||
<div class="width-80">
|
||||
|
||||
<div class="width-100">
|
||||
<ion-item class="ion-no-padding type-message" lines="none">
|
||||
<ion-textarea clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
|
||||
<ion-textarea (keyup.enter)="sendMessage()" clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
|
||||
<button hidden class="btn-no-color" (click)="notImplemented()">
|
||||
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
|
||||
</button>
|
||||
|
||||
@@ -179,10 +179,11 @@
|
||||
ion-footer{
|
||||
padding-top: 7.5px;
|
||||
padding-bottom: 7.5px;
|
||||
|
||||
.container{
|
||||
justify-content: center;
|
||||
justify-content: space-evenly;
|
||||
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.chat-icon-options{
|
||||
@@ -203,14 +204,15 @@
|
||||
border: 1px solid #ebebeb;
|
||||
border-radius: 25px;
|
||||
padding-left: 15px;
|
||||
margin: 0 15px 0 60px;
|
||||
align-items: center;
|
||||
overflow: auto;
|
||||
|
||||
ion-textarea{
|
||||
margin: 0 !important;
|
||||
align-self: center;
|
||||
ion-textarea{
|
||||
margin: 0 !important;
|
||||
align-self: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -250,6 +250,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
if(msg.file.type == "application/img"){
|
||||
let response:any = await this.fileService.getFile(msg.file.guid).toPromise();
|
||||
console.log(response);
|
||||
alert(response);
|
||||
|
||||
//this.openPreview(msg);
|
||||
|
||||
@@ -613,7 +614,7 @@ touchStart(card) {
|
||||
cssClass: 'modal modal-desktop',
|
||||
componentProps: {
|
||||
image: msg.attachments[0].image_url,
|
||||
username: msg.u.username,
|
||||
username: msg.u.name,
|
||||
_updatedAt: msg._updatedAt
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { analyzeAndValidateNgModules } from '@angular/compiler';
|
||||
import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { ModalController, NavParams, PickerController, PopoverController } from '@ionic/angular';
|
||||
import { ChatService } from 'src/app/services/chat.service';
|
||||
import { DataService } from 'src/app/services/data.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { GroupDurationPage } from 'src/app/shared/popover/group-duration/group-duration.page';
|
||||
import { GroupContactsPage } from '../group-messages/group-contacts/group-contacts.page';
|
||||
|
||||
@@ -22,6 +24,7 @@ export class NewGroupPage implements OnInit{
|
||||
countDownTime:any;
|
||||
//groupName:string;
|
||||
task:any;
|
||||
documents: any;
|
||||
|
||||
@Input() groupName:string;
|
||||
@Output() addGroupMessage:EventEmitter<any> = new EventEmitter<any>();
|
||||
@@ -32,31 +35,42 @@ export class NewGroupPage implements OnInit{
|
||||
private modalController: ModalController,
|
||||
private chatService: ChatService,
|
||||
private dataService:DataService,
|
||||
private processesService: ProcessesService,
|
||||
private router: Router,
|
||||
)
|
||||
{
|
||||
this.isGroupCreated = false;
|
||||
//this.groupName = this.navParams.get('name');
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
if(this.dataService.get("newGroup")){
|
||||
this.task = this.dataService.get("task");
|
||||
this.groupName = this.task.Folio;
|
||||
}
|
||||
console.log(this.task);
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart && event.url.startsWith('/home/chat')) {
|
||||
if (this.dataService.get("newGroup")) {
|
||||
this.task = this.dataService.get("task");
|
||||
this.groupName = this.task.Folio;
|
||||
this.documents = this.dataService.get("documents");
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.dataService.set("newGroup", false);
|
||||
}
|
||||
});
|
||||
|
||||
console.log(this.task);
|
||||
}
|
||||
|
||||
/* ngOnDestroy(){
|
||||
alert('Destroy')
|
||||
this.dataService.set("newGroup", false);
|
||||
this.dataService.set("task", null);
|
||||
this.dataService.set("newGroupName", '');
|
||||
} */
|
||||
|
||||
_ionChange(event){
|
||||
console.log(event);
|
||||
console.log(event.detail.checked);
|
||||
this.showDuration = event.detail.checked;
|
||||
this.showDuration = event.detail.checked;
|
||||
|
||||
if(event.detail.checked){
|
||||
this.thedate = new Date();
|
||||
@@ -74,6 +88,8 @@ 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=>{
|
||||
console.log('group created');
|
||||
@@ -90,6 +106,43 @@ export class NewGroupPage implements OnInit{
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
|
||||
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();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ export class PedidosPage implements OnInit {
|
||||
|
||||
let task: customTask = this.customTaskPipe.transform(element);
|
||||
this.parecerList.push(task);
|
||||
|
||||
});
|
||||
|
||||
this.pedidosstore.resetparecer(this.sortService.sortDate(this.parecerList, 'CreateDate'));
|
||||
@@ -114,7 +115,7 @@ export class PedidosPage implements OnInit {
|
||||
this.deferimentoList.push(task);
|
||||
});
|
||||
|
||||
|
||||
|
||||
this.pedidosstore.resetdeferimento(this.sortService.sortDate(this.deferimentoList, 'CreateDate'));
|
||||
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.div-top-header{
|
||||
margin: 0 em(20px);
|
||||
// background-color: #0782c9;
|
||||
padding-top: em(15px);
|
||||
//padding-top: em(15px);
|
||||
border: 0!important;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button (click)="takePicture()" full class="btn-ok" shape="round" >Tirar Fotografia</button>
|
||||
<button hidden (click)="takePicture()" full class="btn-ok" shape="round" >Tirar Fotografia</button>
|
||||
<button hidden (click)="addFile()" class="btn-ok" shape="round" >Anexar Documento</button>
|
||||
<button (click)="anexarFoto()" full class="btn-ok" shape="round" >Anexar Fotografia</button>
|
||||
<button hidden (click)="anexarFoto()" full class="btn-ok" shape="round" >Anexar Fotografia</button>
|
||||
<button (click)="addDocGestaoDocumental()" class="btn-ok" shape="round" >Gestão Documental</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="bookMeeting()" class="btn-ok" shape="round" >Novo Evento</button>
|
||||
|
||||
@@ -28,13 +28,12 @@
|
||||
</div>
|
||||
<div *ngIf="task && p.userRole(['PR'])" class="d-flex width-100">
|
||||
<div class="flex-grow-1">
|
||||
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<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()" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes11</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<div hidden class="solid"></div>
|
||||
<button hidden class="btn-cancel" shape="round" >Delegar</button>
|
||||
<button (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Iniciar Conversa</button>
|
||||
|
||||
@@ -17,6 +17,7 @@ import { TaskService } from 'src/app/Rules/task.service'
|
||||
import { ExpedienteService } from 'src/app/Rules/expediente.service';
|
||||
import { PermissionService } from 'src/app/services/worker/permission.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -66,8 +67,20 @@ export class OptsExpedientePage implements OnInit {
|
||||
};
|
||||
}
|
||||
|
||||
openNewGroupPage(){
|
||||
async openNewGroupPage(){
|
||||
console.log(this.fulltask);
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: NewGroupPage,
|
||||
cssClass: 'modal modal-desktop',
|
||||
componentProps: {
|
||||
name: this.task.Folio,
|
||||
task: this.task,
|
||||
documents: this.fulltask.Documents,
|
||||
},
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
close() {
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</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()" class="btn-cancel" shape="round" *ngIf="task.WorkflowName == 'Pedido de Parecer do Presidente'">Iniciar Conversa</button>
|
||||
<button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</div>
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Parecer'">
|
||||
@@ -54,8 +55,8 @@
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<button (click)="cancel()" class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Iniciar Conversa</button>
|
||||
</div>
|
||||
<!-- <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>
|
||||
|
||||
@@ -112,18 +112,20 @@ export class RequestOptionsPage implements OnInit {
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
openNewGroupPage(){
|
||||
this.router.navigate(['/home/chat']);
|
||||
this.dataService.set("newGroup", true);
|
||||
|
||||
if( window.innerWidth < 801){
|
||||
this.newGroup();
|
||||
}
|
||||
else{
|
||||
this.dataService.set("newGroup", true);
|
||||
/* this.closeAllDesktopComponents();
|
||||
this.showNewGroup=true; */
|
||||
}
|
||||
async openNewGroupPage(){
|
||||
const modal = await this.modalController.create({
|
||||
component: NewGroupPage,
|
||||
cssClass: 'modal modal-desktop',
|
||||
componentProps: {
|
||||
name: this.task.Folio,
|
||||
task: this.task,
|
||||
documents: this.fulltask.Documents,
|
||||
},
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then( () => {
|
||||
this.popoverController.dismiss('close');
|
||||
});
|
||||
}
|
||||
|
||||
async newGroup(){
|
||||
|
||||
@@ -28,27 +28,27 @@ export class NewActionPage implements OnInit {
|
||||
public stepMinute = 5;
|
||||
public stepSecond = 5;
|
||||
public endMinDate = new Date(new Date().getTime() + 15 * 60000);
|
||||
|
||||
|
||||
Form: FormGroup;
|
||||
validateFrom = false
|
||||
|
||||
public dateControlStart = new FormControl(moment("DD MM YYYY hh"));
|
||||
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
|
||||
|
||||
|
||||
|
||||
@Output() closeDesktopComponent= new EventEmitter<any>();
|
||||
@Output() getActions= new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
private publication: PublicationsService,
|
||||
private toastService: ToastService
|
||||
) {
|
||||
) {
|
||||
this.folder = new PublicationFolder();
|
||||
|
||||
|
||||
this.folder = Object.assign(this.folder, {
|
||||
DateBegin: moment(new Date()),
|
||||
DateEnd: moment(new Date(new Date().getTime() + 15 * 60000)),
|
||||
DateBegin: new Date().toISOString(),
|
||||
DateEnd: (new Date(new Date().getTime() + 15 * 60000)).toISOString(),
|
||||
})
|
||||
|
||||
}
|
||||
@@ -76,9 +76,15 @@ export class NewActionPage implements OnInit {
|
||||
return ['ok']
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
runValidation() {
|
||||
this.validateFrom = true
|
||||
this.validateFrom = true;
|
||||
if((new Date(this.folder.DateBegin).getTime()) > (new Date(this.folder.DateEnd).getTime())){
|
||||
this.toastService._badRequest("A data de início não pode ser superior a data de fim");
|
||||
}
|
||||
else if(new Date(this.folder.DateBegin).getTime() > new Date().getTime()){
|
||||
this.toastService._badRequest("A data de início não pode ser superior a data actual");
|
||||
}
|
||||
}
|
||||
|
||||
injectValidation() {
|
||||
@@ -119,21 +125,21 @@ export class NewActionPage implements OnInit {
|
||||
ActionType: this.segment,
|
||||
}
|
||||
console.log(this.folder);
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.publication.CreatePublicationFolder(this.folder).toPromise()
|
||||
this.close();
|
||||
this.toastService.successMessage('Acção presidencial criada')
|
||||
this.toastService._successMessage('Acção presidencial criada')
|
||||
|
||||
this.getActions.emit()
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Não foi possivel criar a acção presidencial')
|
||||
this.toastService._badRequest('Não foi possivel criar a acção presidencial')
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
close(){
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<div class="ion-item-container-no-border hide-desktop">
|
||||
<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>
|
||||
|
||||
@@ -309,7 +309,7 @@ export class NewPublicationPage implements OnInit {
|
||||
clear(){
|
||||
this.capturedImage = '';
|
||||
}
|
||||
|
||||
|
||||
setTitle(){
|
||||
if(this.publicationType == '1') {
|
||||
this.publicationTitle = 'Nova Publicação Rápida';
|
||||
|
||||
@@ -1,24 +1,33 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<div class="main-header">
|
||||
<div class="title-content d-flex flex-end">
|
||||
<div class="title-content">
|
||||
<!-- <div class="back-icon" (click)="goBack()">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
</div> -->
|
||||
<div *ngIf="item" class="div-title flex-grow-1">
|
||||
<ion-label class="title">{{item.Description}}</ion-label>
|
||||
<div *ngIf="item" class="div-title width-100 flex-grow-1">
|
||||
<div class="title">
|
||||
<ion-label>{{item.Description}}</ion-label>
|
||||
</div>
|
||||
|
||||
<div class="actions-icon">
|
||||
<!-- <ion-icon (click)="AddPublication('1',item.ProcessId)" slot="end" src='assets/images/icons-add-photo.svg'></ion-icon> -->
|
||||
<button class="btn-no-color" (click)="openEditPublication(item.ProcessId)">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon>
|
||||
</button>
|
||||
<button class="btn-no-color" (click)="deletePublication(item.ProcessId)">
|
||||
<ion-icon class="delete" src='assets/images/theme/gov/icons-delete.svg'></ion-icon>
|
||||
</button>
|
||||
<button class="btn-no-color cursor-pointer" (click)="doRefresh($event)">
|
||||
<ion-icon class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
||||
</button >
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-body width-100">
|
||||
<p class="item-content-detail">{{item.Detail}}</p>
|
||||
<p class="item-content-date">{{ item.DateBegin | date: 'dd-MM-yy | HH:mm'}}</p>
|
||||
</div>
|
||||
<div class="actions-icon ">
|
||||
<!-- <ion-icon (click)="AddPublication('1',item.ProcessId)" slot="end" src='assets/images/icons-add-photo.svg'></ion-icon> -->
|
||||
<button class="btn-no-color cursor-pointer" (click)="AddPublication('2',item.ProcessId)">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/icons-add.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/icons-add.svg'></ion-icon>
|
||||
</button>
|
||||
<button class="btn-no-color cursor-pointer" (click)="doRefresh($event)">
|
||||
<ion-icon class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
||||
</button >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ion-header>
|
||||
@@ -52,10 +61,17 @@
|
||||
<p>{{publication.Message}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="center height-100" *ngIf="!publicationList">
|
||||
<p>{{error}}</p>
|
||||
</div>
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
<!-- fab placed to the bottom end -->
|
||||
<ion-fab vertical="bottom" horizontal="end">
|
||||
<ion-fab-button (click)="AddPublication('2',item.ProcessId)">
|
||||
<ion-icon name="add"></ion-icon>
|
||||
</ion-fab-button>
|
||||
</ion-fab>
|
||||
</ion-content>
|
||||
|
||||
@@ -61,7 +61,6 @@
|
||||
overflow:hidden;
|
||||
padding: 25px 20px 0px 20px;
|
||||
color:#000;
|
||||
|
||||
}
|
||||
.main-container{
|
||||
width: 100%;
|
||||
@@ -86,22 +85,30 @@
|
||||
.back-icon{
|
||||
float: left;
|
||||
font-size: 35px;
|
||||
|
||||
|
||||
}
|
||||
.div-title{
|
||||
/* padding: 0!important; */
|
||||
float: left;
|
||||
margin: 2.5px 0 0 5px;
|
||||
margin: 2.5px 0 0 0;
|
||||
overflow: auto;
|
||||
}
|
||||
.div-body{
|
||||
overflow: auto;
|
||||
}
|
||||
.title{
|
||||
width: fit-content;
|
||||
font-size: 25px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
.actions-icon{
|
||||
display: flex;
|
||||
width: fit-content;
|
||||
align-items: top;
|
||||
justify-content: flex-end;
|
||||
padding: 0 !important;
|
||||
float: right;
|
||||
}
|
||||
.actions-icon ion-icon{
|
||||
margin-left: 5px;
|
||||
@@ -157,10 +164,27 @@
|
||||
color: #797979;
|
||||
text-align: right;
|
||||
}
|
||||
.post-description{
|
||||
font-size: 13px;
|
||||
color: #000;
|
||||
}
|
||||
.post-description{
|
||||
font-size: 13px;
|
||||
color: #000;
|
||||
}
|
||||
ion-fab{
|
||||
overflow: auto !important;
|
||||
padding-right: 25px;
|
||||
padding-bottom: 15px;
|
||||
background: transparent !important;
|
||||
}
|
||||
ion-fab-button{
|
||||
--background: #FFB81C;
|
||||
--box-shadow: none;
|
||||
opacity: 0.7;
|
||||
}
|
||||
ion-fab-button:hover{
|
||||
--background: #FFB81C;
|
||||
opacity: 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@ import { PublicationEventFolderStorage } from 'src/app/store/publication-event-f
|
||||
import { PublicationTravelFolderStore } from 'src/app/store/publication-travel-folder.service';
|
||||
import { PublicationPipe } from 'src/app/pipes/publication.pipe';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { EditActionPage } from 'src/app/pages/publications/edit-action/edit-action.page';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-publications',
|
||||
@@ -28,6 +30,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
@Input() folderId: string;
|
||||
@Output() addNewPublication = new EventEmitter<any>();
|
||||
@Output() editPublication = new EventEmitter<any>();
|
||||
@Output() openPublicationDetails= new EventEmitter<any>();
|
||||
@Output() goBackToViewPublications = new EventEmitter();
|
||||
@Output() closeDesktopComponent = new EventEmitter<any>();
|
||||
@@ -45,7 +48,8 @@ export class ViewPublicationsPage implements OnInit {
|
||||
private loadingController: LoadingService,
|
||||
private modalController: ModalController,
|
||||
private publications: PublicationsService,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private toastService: ToastService,
|
||||
) {
|
||||
this.item = new PublicationFolder();
|
||||
}
|
||||
@@ -89,12 +93,10 @@ export class ViewPublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
getPublicationDetail() {
|
||||
|
||||
setTimeout(() => {
|
||||
let allActions = this.publicationEventFolderStorage.list.concat(this.publicationTravelFolderService.list)
|
||||
this.item = allActions.find((e)=> e.ProcessId == this.folderId);
|
||||
},100);
|
||||
|
||||
this.publications.GetPresidentialAction(this.folderId).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.item = res;
|
||||
});
|
||||
}
|
||||
|
||||
getPublications() {
|
||||
@@ -151,6 +153,39 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async openEditPublication(folderId?:any){
|
||||
if( window.innerWidth < 701) {
|
||||
const modal = await this.modalController.create({
|
||||
component: EditActionPage,
|
||||
componentProps: {
|
||||
folderId: folderId,
|
||||
},
|
||||
cssClass: 'new-action modal modal-desktop',
|
||||
backdropDismiss: true
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(() => {
|
||||
//Do nothing
|
||||
});
|
||||
}
|
||||
else{
|
||||
this.editPublication.emit(folderId);
|
||||
}
|
||||
}
|
||||
|
||||
async deletePublication(folderId?:any){
|
||||
const loader = this.toastService.loading();
|
||||
try {
|
||||
await this.publications.DeletePresidentialAction(folderId).toPromise();
|
||||
this.toastService._successMessage()
|
||||
} catch (e) {
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
}
|
||||
|
||||
async viewPublicationDetail(publicationId:string) {
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user