mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<div class="messages" #scrollMe>
|
||||
<div *ngFor="let msg of messages; let last = last" class='incoming-{{msg.u.username!=loggedUser.me.username}}'>
|
||||
<div *ngFor="let msg of chatMessageStore.message[roomId] ; let last = last" class='incoming-{{msg.u.username!=loggedUser.me.username}}'>
|
||||
<div class="title">
|
||||
<ion-label>{{msg.u.name}}</ion-label>
|
||||
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
|
||||
|
||||
@@ -9,6 +9,8 @@ import { connection } from 'src/app/services/socket/synchro.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ChatOptionsPopoverPage } from 'src/app/shared/popover/chat-options-popover/chat-options-popover.page';
|
||||
import { MessagesOptionsPage } from 'src/app/shared/popover/messages-options/messages-options.page';
|
||||
import { ChatMessageStore } from 'src/app/store/chat/chat-message.service';
|
||||
import { ChatUserStorage } from 'src/app/store/chat/chat-user.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-messages',
|
||||
@@ -32,6 +34,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
scrollingOnce:boolean = true;
|
||||
|
||||
connection = connection;
|
||||
chatMessageStore = ChatMessageStore
|
||||
chatUserStorage = ChatUserStorage
|
||||
|
||||
private scrollChangeCallback: () => void;
|
||||
currentPosition: any;
|
||||
@@ -146,9 +150,12 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
loadMessages() {
|
||||
this.showLoader = true;
|
||||
const roomId = this.roomId
|
||||
|
||||
this.chatService.getRoomMessages(this.roomId).subscribe(res => {
|
||||
/* console.log(res); */
|
||||
this.messages = res['messages'].reverse();
|
||||
this.chatMessageStore.add(roomId, this.messages)
|
||||
console.log(this.messages);
|
||||
this.showLoader = false;
|
||||
})
|
||||
@@ -245,7 +252,9 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
async serverLongPull() {
|
||||
this.chatService.getRoomMessages(this.roomId).subscribe(async res => {
|
||||
|
||||
const roomId = this.roomId
|
||||
this.chatService.getRoomMessages(roomId).subscribe(async res => {
|
||||
|
||||
if (res == 502) {
|
||||
// Connection timeout
|
||||
@@ -257,6 +266,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
//showMessage(response.statusText);
|
||||
//this.loadMessages()
|
||||
this.messages = res['messages'].reverse();
|
||||
this.chatMessageStore.add(roomId, this.messages)
|
||||
|
||||
console.log(this.messages);
|
||||
// Reconnect in one second
|
||||
if(this.route.url != "/home/chat"){
|
||||
|
||||
@@ -98,7 +98,6 @@
|
||||
<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>
|
||||
|
||||
<div *ngIf="!task" class="px-20">
|
||||
|
||||
@@ -85,7 +85,11 @@
|
||||
|
||||
<div *ngIf="task" class="aside-right flex-column height-100">
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Despacho'">
|
||||
<div class="option-desc" *ngIf="task.WorkflowName == 'Despacho do Presidente da República' "> <div>Responder ao PR</div> </div>
|
||||
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
|
||||
<div class="option-desc" *ngIf="task.WorkflowName == 'Despacho do Presidente da República' ">Reencaminhar para Área jurídica</div>
|
||||
<button (click)="openAddNoteModal('Gerar Diploma')" *ngIf="task.WorkflowName == 'Despacho do Presidente da República'" class="btn-cancel" style="margin-bottom: 0px !important;" shape="round" >Gerar Diploma </button>
|
||||
<div class="option-desc" *ngIf="task.WorkflowName == 'Despacho do Presidente da República' " >Outras opções</div>
|
||||
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
|
||||
@@ -195,3 +195,19 @@ ion-button{
|
||||
width: 25%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.option-desc {
|
||||
display: flex;
|
||||
color: #828282;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 11pt;
|
||||
.option-desc-line {
|
||||
height: 1px;
|
||||
flex-grow: 1;
|
||||
background-color: #e0e0e0;
|
||||
padding-left: 4px;
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,7 @@ import { DespachoService } from 'src/app/Rules/despacho.service'
|
||||
import { Location } from '@angular/common'
|
||||
import { fullTask } from 'src/app/models/dailyworktask.model';
|
||||
import { Attachment, AttachmentList } from 'src/app/models/Excludetask';
|
||||
import { PermissionService } from 'src/app/OtherService/permission.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-despacho',
|
||||
@@ -50,6 +51,7 @@ export class DespachoPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
private despachoService: DespachoService,
|
||||
private location: Location,
|
||||
public p: PermissionService,
|
||||
|
||||
|
||||
) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { AlertService } from 'src/app/services/alert.service';
|
||||
import { PedidosStore } from 'src/app/store/pedidos-store.service';
|
||||
import { ModalService } from 'src/app/services/modal.service';
|
||||
@Component({
|
||||
selector: 'app-pedidos',
|
||||
templateUrl: './pedidos.page.html',
|
||||
@@ -37,6 +38,7 @@ export class PedidosPage implements OnInit {
|
||||
private modalController: ModalController,
|
||||
private alertService: AlertService,
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private modalService: ModalService
|
||||
) {
|
||||
//Inicializar segment
|
||||
this.segment = 'parecer';
|
||||
@@ -49,6 +51,9 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
const modal = this.modalService.BookMeetingModalPage({task: ''},{})
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -1,14 +1,21 @@
|
||||
<ion-content fullscreen>
|
||||
<ion-item class="close" lines="none" text-center>
|
||||
<button (click)="close()" fill="clear" >
|
||||
<ion-icon name="close" slot="start">Fechar</ion-icon>
|
||||
</button>
|
||||
</ion-item>
|
||||
<ion-slides>
|
||||
<ion-slide>
|
||||
<div class="swipper-zoom-container">
|
||||
<img src="{{imageUrl}}">
|
||||
</div>
|
||||
</ion-slide>
|
||||
</ion-slides>
|
||||
<ion-content fullscreen class="d-flex flex-column">
|
||||
<div class="main-content">
|
||||
|
||||
<div class="d-flex justify-end">
|
||||
<button (click)="close()" fill="clear" >
|
||||
<ion-icon name="close" slot="start">Fechar</ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<ion-slides>
|
||||
<ion-slide>
|
||||
<div class="swipper-zoom-container">
|
||||
<img src="{{imageUrl}}">
|
||||
</div>
|
||||
</ion-slide>
|
||||
</ion-slides>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
|
||||
@@ -1,82 +1,82 @@
|
||||
|
||||
|
||||
<ion-content>
|
||||
<div class="content-container">
|
||||
<div class="content-container d-flex flex-column">
|
||||
<div class="title-content width-100">
|
||||
<div class="div-title">
|
||||
<ion-label class="title">{{publicationTitle}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="publicationType!='1'" class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input [(ngModel)]="pub.Title" name="title" ngDefaultControl placeholder="Título" ></ion-input>
|
||||
</div>
|
||||
|
||||
<div *ngIf="publicationType!='1'" class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
<div class="overflow-y-auto">
|
||||
<div *ngIf="publicationType!='1'" class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input [(ngModel)]="pub.Title" name="title" ngDefaultControl placeholder="Título" ></ion-input>
|
||||
</div>
|
||||
<div class="ion-textarea-class" [class.input-error]="Form?.get('Message')?.invalid && validateFrom ">
|
||||
<ion-textarea [(ngModel)]="pub.Message" name="description" ngDefaultControl rows="12" cols="20" placeholder="Corpo de texto..."></ion-textarea>
|
||||
|
||||
<div *ngIf="publicationType!='1'" class="container-div">
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-textarea-class" [class.input-error]="Form?.get('Message')?.invalid && validateFrom ">
|
||||
<ion-textarea [(ngModel)]="pub.Message" name="description" ngDefaultControl rows="12" cols="20" placeholder="Corpo de texto..."></ion-textarea>
|
||||
</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"></ion-img>
|
||||
</ion-thumbnail>
|
||||
<ion-label>
|
||||
<p>{{capturedImageTitle}}</p>
|
||||
<p hidden>size</p>
|
||||
</ion-label>
|
||||
<ion-icon (click)="clear()" name="close"></ion-icon>
|
||||
</ion-item>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="picture d-flex pb-5 hide-desktop" *ngIf="publication && capturedImage ==''">
|
||||
<div class="post-img" *ngIf="publication.FileBase64">
|
||||
<img src="{{publication.FileBase64}}" alt="image" >
|
||||
</div>
|
||||
<div class="d-flex flex-column pl-10" *ngIf="publication.FileBase64">
|
||||
<div class="picture-file-name">{{publication.OriginalFileName}}.{{publication.FileExtension}}</div>
|
||||
<div class="size">75 Kb</div>
|
||||
</div>
|
||||
<div class="flex-grow-1 d-flex align-center justify-end" *ngIf="publication.FileBase64">
|
||||
<div style="color: red;">X</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ion-item-container-no-border">
|
||||
<ion-label (click)="takePicture()">
|
||||
<div class="attach-icon">
|
||||
<ion-icon src="assets/images/icons-add-photo.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="attach-document">
|
||||
<ion-label>Tirar Fotografia</ion-label>
|
||||
</div>
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<div class="ion-item-container-no-border">
|
||||
<ion-label (click)="laodPicture()">
|
||||
<div class="attach-icon">
|
||||
<ion-icon src="assets/images/icons-add-photos.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="attach-document">
|
||||
<ion-label>Anexar Fotografia</ion-label>
|
||||
</div>
|
||||
</ion-label>
|
||||
</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]="'data:image/png;base64,'+capturedImage"></ion-img>
|
||||
</ion-thumbnail>
|
||||
<!-- <ion-thumbnail *ngIf="!publication" slot="start">
|
||||
<ion-img [(ngModel)]="publication.imageUrl" [src]="guestPicture"></ion-img>
|
||||
</ion-thumbnail> -->
|
||||
<ion-label>
|
||||
<p>{{capturedImageTitle}}</p>
|
||||
<p hidden>size</p>
|
||||
</ion-label>
|
||||
<ion-icon (click)="clear()" name="close"></ion-icon>
|
||||
</ion-item>
|
||||
|
||||
<!-- <ion-thumbnail>
|
||||
<ion-img src="{{imgUrl}}"></ion-img>
|
||||
</ion-thumbnail> -->
|
||||
</div>
|
||||
|
||||
<div class="picture d-flex pb-5 hide-desktop" *ngIf="publication.FileBase64 && capturedImage ==''">
|
||||
<div class="post-img">
|
||||
<img src="{{publication.FileBase64}}" alt="image" >
|
||||
</div>
|
||||
<div class="d-flex flex-column pl-10">
|
||||
<div class="picture-file-name">{{publication.OriginalFileName}}.{{publication.FileExtension}}</div>
|
||||
<div class="size">75 Kb</div>
|
||||
</div>
|
||||
<div class="flex-grow-1 d-flex align-center justify-end">
|
||||
<div style="color: red;">X</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ion-item-container-no-border">
|
||||
<ion-label (click)="takePicture()">
|
||||
<div class="attach-icon">
|
||||
<ion-icon src="assets/images/icons-add-photo.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="attach-document">
|
||||
<ion-label>Tirar Fotografia</ion-label>
|
||||
</div>
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<!-- <div class="ion-item-container-no-border">
|
||||
<ion-label (click)="laodPicture()">
|
||||
<div class="attach-icon">
|
||||
<ion-icon src="assets/images/icons-add-photos.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="attach-document">
|
||||
<ion-label>Anexar Fotografia</ion-label>
|
||||
</div>
|
||||
</ion-label>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
|
||||
@@ -58,7 +58,6 @@ ion-toolbar{
|
||||
}
|
||||
.title-content{
|
||||
margin: 0px auto;
|
||||
overflow: auto;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.div-title{
|
||||
|
||||
@@ -95,9 +95,10 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
this.camera.getPicture(options).then((imageData) => {
|
||||
// imageData is either a base64 encoded string or a file URI
|
||||
// If it's base64 (DATA_URL):
|
||||
let base64Image = 'data:image/jpeg;base64,' + imageData;
|
||||
this.capturedImage = imageData;
|
||||
// If it's base64 (DATA_URL): m
|
||||
//let base64Image = 'data:image/jpeg;base64,' + imageData;
|
||||
|
||||
this.capturedImage = 'data:image/png;base64,'+imageData;
|
||||
this.capturedImageTitle = new Date().getTime() + '.jpeg';
|
||||
}, (err) => {
|
||||
/* console.log(err); */
|
||||
@@ -116,6 +117,8 @@ export class NewPublicationPage implements OnInit {
|
||||
const imageData = await this.fileToBase64Service.convert(file)
|
||||
this.capturedImage = imageData;
|
||||
this.capturedImageTitle = file.name
|
||||
|
||||
console.log(this.capturedImage)
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -3,8 +3,6 @@ import { AnimationController, ModalController, NavParams } from '@ionic/angular'
|
||||
import { Publication } from 'src/app/models/publication';
|
||||
import { PublicationsService } from 'src/app/services/publications.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
|
||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
||||
import { ImageModalPage } from '../gallery/image-modal/image-modal.page';
|
||||
import { NewPublicationPage } from '../new-publication/new-publication.page';
|
||||
|
||||
@@ -27,6 +25,9 @@ export class PublicationDetailPage implements OnInit {
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService
|
||||
) {
|
||||
|
||||
alert('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
|
||||
|
||||
this.publicationId = this.navParams.get('publicationId');
|
||||
/* this.folderId = this.navParams.get('folderIdId'); */
|
||||
this.publication = {
|
||||
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
<ion-header class="ion-no-border d-md-none">
|
||||
<ion-header class="ion-no-border">
|
||||
<app-header></app-header>
|
||||
</ion-header>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</ion-refresher>
|
||||
|
||||
<div class="content-container">
|
||||
<div *ngIf="publication.Title != ''" class="d-flex flex-column">
|
||||
<div *ngIf="publication.Title != ''" class="d-flex flex-column height-100">
|
||||
<div class="title-content px-20 width-100 ">
|
||||
<div class="back-icon cursor-pointer" (click)="goBack()">
|
||||
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
@@ -33,6 +33,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="publication.Title == ''" class="d-flex flex-column">
|
||||
<div class="title-content width-100">
|
||||
<div class="back-icon cursor-pointer">
|
||||
|
||||
+1
-2
@@ -57,9 +57,8 @@
|
||||
padding: 25px 0px 0 0px;
|
||||
overflow: auto;
|
||||
}
|
||||
.title-content{
|
||||
.title-content {
|
||||
margin: 0px auto;
|
||||
overflow: auto;
|
||||
}
|
||||
.back-icon{
|
||||
width: auto;
|
||||
|
||||
+1
@@ -27,6 +27,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private router: Router,
|
||||
) {
|
||||
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
console.log(params);
|
||||
if(params["params"]) {
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<div class="main-container background-white">
|
||||
<div class="main-container background-white height-100 overflow-y-auto">
|
||||
<ion-list>
|
||||
<!-- [routerLink]="['/home/publications/view-publications/publication-detail', publication.publicationId]" -->
|
||||
<div class="post-item"
|
||||
|
||||
Reference in New Issue
Block a user