mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
ChatStorage Done Done!
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<div class="px-20">
|
||||
|
||||
<div class="ion-item-container width-100" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input placeholder="Assunto*" [(ngModel)]="eventProcess.workflowInstanceDataFields.Subject"></ion-input>
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Assunto*" [(ngModel)]="eventProcess.workflowInstanceDataFields.Subject"></ion-input>
|
||||
</div>
|
||||
|
||||
<div *ngIf="Form && validateFrom" >
|
||||
@@ -37,7 +37,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Location')?.invalid && validateFrom ">
|
||||
<ion-input placeholder="Localização*" [(ngModel)]="eventProcess.workflowInstanceDataFields.Location"></ion-input>
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Localização*" [(ngModel)]="eventProcess.workflowInstanceDataFields.Location"></ion-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Categories')?.invalid && validateFrom ">
|
||||
|
||||
|
||||
<ion-select placeholder="Selecione tipo de evento*"
|
||||
class="d-block d-md-none"
|
||||
[(ngModel)]="eventProcess.workflowInstanceDataFields.Category"
|
||||
@@ -104,8 +104,8 @@
|
||||
<ion-select-option value="Conferência">Conferência</ion-select-option>
|
||||
<ion-select-option value="Encontro">Encontro</ion-select-option>
|
||||
</ion-select>
|
||||
|
||||
|
||||
|
||||
|
||||
<mat-form-field class="d-none d-md-block" appearance="none" class="width-100" placeholder="Sample Type" required>
|
||||
<!-- <input matInput type="text" > -->
|
||||
<mat-select [(ngModel)]="eventProcess.workflowInstanceDataFields.Category" >
|
||||
@@ -123,8 +123,8 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -132,7 +132,7 @@
|
||||
<div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('participantes').invalid " class="input-errror-message">
|
||||
<div *ngIf="Form.get('participantes').errors?.required">
|
||||
Adicionar participant.
|
||||
Adicionar participante
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -148,7 +148,7 @@
|
||||
placeholder="Início"
|
||||
[(ngModel)]="eventProcess.workflowInstanceDataFields.StartDate"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
minuteValues="0,15,30,45"
|
||||
minuteValues="0,5,10,15,20,25,30,35,40,45,50,55"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="{{minDate}}"
|
||||
max="2025"
|
||||
@@ -186,7 +186,7 @@
|
||||
placeholder="Fim"
|
||||
[(ngModel)]="eventProcess.workflowInstanceDataFields.EndDate"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
minuteValues="0,15,30,45"
|
||||
minuteValues="0,5,10,15,20,25,30,35,40,45,50,55"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="{{minDate}}"
|
||||
max="2025"
|
||||
@@ -325,7 +325,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class-no-height width-100 flex-grow-1">
|
||||
<ion-textarea [(ngModel)]="eventProcess.workflowInstanceDataFields.Body" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
|
||||
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="eventProcess.workflowInstanceDataFields.Body" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -364,7 +364,7 @@
|
||||
</div>
|
||||
</ion-item-sliding>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<ion-content>
|
||||
<div class="main-content">
|
||||
<div class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input placeholder="Assunto*" [(ngModel)]="postEvent.Subject"></ion-input>
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Assunto*" [(ngModel)]="postEvent.Subject"></ion-input>
|
||||
</div>
|
||||
<div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('Subject').invalid " class="input-errror-message">
|
||||
@@ -33,7 +33,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('Location')?.invalid && validateFrom ">
|
||||
<ion-input placeholder="Localização*" [(ngModel)]="postEvent.Location"></ion-input>
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Localização*" [(ngModel)]="postEvent.Location"></ion-input>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Error messages -->
|
||||
@@ -268,7 +268,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class-no-height width-100">
|
||||
<ion-textarea [(ngModel)]="postEvent.Body.Text" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
|
||||
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="postEvent.Body.Text" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<div class="main-content">
|
||||
|
||||
<div class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input type="text" placeholder="Assunto*" [(ngModel)]="postEvent.Subject"></ion-input>
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" type="text" placeholder="Assunto*" [(ngModel)]="postEvent.Subject"></ion-input>
|
||||
</div>
|
||||
|
||||
<div *ngIf="Form && validateFrom" >
|
||||
@@ -45,7 +45,7 @@
|
||||
<mat-option value="MDGPR">
|
||||
Meu calendário
|
||||
</mat-option>
|
||||
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
</div>
|
||||
|
||||
<div class="ion-input-class flex-grow-1 width-100" [class.input-error]="Form?.get('Location')?.invalid && validateFrom " >
|
||||
<ion-input type="text" placeholder="Localização*" [(ngModel)]="postEvent.Location"></ion-input>
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" type="text" placeholder="Localização*" [(ngModel)]="postEvent.Location"></ion-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -311,7 +311,7 @@
|
||||
</div>
|
||||
<div class="ion-input-class-no-height flex-grow-1">
|
||||
|
||||
<ion-textarea [(ngModel)]="postEvent.Body.Text" placeholder="Detalhes" ></ion-textarea>
|
||||
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="postEvent.Body.Text" placeholder="Detalhes" ></ion-textarea>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="main-header width-100">
|
||||
<div class="title-content width-100">
|
||||
<div class="back-icon cursor-pointer">
|
||||
<button class="btn-no-color" (click)="openGroupMessagesPage()">
|
||||
<button title="Retroceder" class="btn-no-color" (click)="openGroupMessagesPage()">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
</button>
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
<ion-label class="title">{{wsChatMethodsService.getGroupRoom(roomId).name}}</ion-label>
|
||||
</div>
|
||||
<div class="right">
|
||||
<button class="btn-no-color" (click)="openGroupMessagesOptions()">
|
||||
<button title="Menu" class="btn-no-color" (click)="openGroupMessagesOptions()">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div (click)="openGroupContactsPage()" class="header-bottom">
|
||||
<div title="Ver Contactos" (click)="openGroupContactsPage()" class="header-bottom">
|
||||
<div class="header-bottom-icon">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/icon/icons-user.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/icon/theme/gov/icons-user.svg"></ion-icon>
|
||||
@@ -240,7 +240,7 @@
|
||||
<ion-icon name="add"></ion-icon>
|
||||
</ion-fab-button>
|
||||
<ion-fab-list side="top">
|
||||
<ion-fab-button (click)="bookMeeting()" color="light">
|
||||
<ion-fab-button title="Nova Reunião" (click)="bookMeeting()" color="light">
|
||||
<ion-icon name="calendar"></ion-icon>
|
||||
</ion-fab-button>
|
||||
<ion-fab-button (click)="addFile()" color="light">
|
||||
@@ -261,7 +261,7 @@
|
||||
|
||||
<div class="width-100">
|
||||
<ion-item class="ion-no-padding type-message" lines="none">
|
||||
<ion-textarea (keyup.enter)="sendMessage()" clearOnEdit="true" placeholder="Escrever uma mensagem" class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
|
||||
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" (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>
|
||||
@@ -272,7 +272,7 @@
|
||||
<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>
|
||||
</button>
|
||||
<button *ngIf="!message" class="btn-no-color">
|
||||
<button title="Enviar Mensagem" *ngIf="!message" class="btn-no-color">
|
||||
<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>
|
||||
</button>
|
||||
|
||||
@@ -25,6 +25,7 @@ import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
|
||||
import { HttpEventType } from '@angular/common/http';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { WsChatMethodsService } from 'src/app/services/chat/ws-chat-methods.service';
|
||||
import { MessageService } from 'src/app/services/chat/message.service';
|
||||
|
||||
/*
|
||||
import * as pdfjsLib from 'pdfjs-dist';
|
||||
@@ -108,6 +109,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
this.getRoomInfo();
|
||||
//this.scrollToBottom();
|
||||
this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory();
|
||||
this.wsChatMethodsService.getGroupRoom(this.roomId).getMsgFromDB();
|
||||
console.log('MESSAGES'+this.wsChatMethodsService.getGroupRoom(this.roomId).massages);
|
||||
this.wsChatMethodsService.getGroupRoom(this.roomId).scrollDown = this.scrollToBottomClicked
|
||||
|
||||
@@ -285,88 +287,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
}
|
||||
}
|
||||
|
||||
getMessageDB() {
|
||||
this.storage.get('chatmsg').then((msg) => {
|
||||
console.log('GROUP FROM DB WEB', msg)
|
||||
let msgArray = [];
|
||||
msgArray = msg;
|
||||
msgArray.filter(data => data._id != this.roomId);
|
||||
this.messages = msgArray.reverse();
|
||||
console.log("GROUP MSG CHAT WEB", this.messages)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
async transformData(res) {
|
||||
let mgsArray = [];
|
||||
res.map(async element => {
|
||||
|
||||
if (element.file) {
|
||||
if (element.file.guid) {
|
||||
await this.storage.get(element.file.guid).then((image) => {
|
||||
let chatmsg = {
|
||||
_id: element._id,
|
||||
attachments: element.attachments,
|
||||
channels: element.channels,
|
||||
file: {
|
||||
guid: element.file.guid,
|
||||
image_url: image,
|
||||
type: element.file.type
|
||||
},
|
||||
mentions: element.mentions,
|
||||
msg: element.msg,
|
||||
rid: element.rid,
|
||||
ts: element.ts,
|
||||
u: element.u,
|
||||
_updatedAt: element._updatedAt,
|
||||
|
||||
}
|
||||
|
||||
mgsArray.push(chatmsg)
|
||||
|
||||
})
|
||||
} else {
|
||||
let chatmsg = {
|
||||
_id: element._id,
|
||||
attachments: element.attachments,
|
||||
channels: element.channels,
|
||||
file: element.file,
|
||||
mentions: element.mentions,
|
||||
msg: element.msg,
|
||||
rid: element.rid,
|
||||
ts: element.ts,
|
||||
u: element.u,
|
||||
_updatedAt: element._updatedAt,
|
||||
}
|
||||
|
||||
mgsArray.push(chatmsg)
|
||||
}
|
||||
} else {
|
||||
let chatmsg = {
|
||||
_id: element._id,
|
||||
attachments: element.attachments,
|
||||
channels: element.channels,
|
||||
mentions: element.mentions,
|
||||
msg: element.msg,
|
||||
rid: element.rid,
|
||||
ts: element.ts,
|
||||
u: element.u,
|
||||
_updatedAt: element._updatedAt,
|
||||
}
|
||||
|
||||
mgsArray.push(chatmsg)
|
||||
}
|
||||
|
||||
});
|
||||
await this.storage.remove('chatmsg').then(() => {
|
||||
console.log('GROUP MSG REMOVE FROM STORAGE')
|
||||
});
|
||||
await this.storage.set('chatmsg', mgsArray).then((value) => {
|
||||
console.log('GROUP MSG SAVED ON STORAGE', value)
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
loadGroupMessages(roomId) {
|
||||
//console.log('here'+room.t);
|
||||
|
||||
@@ -380,8 +300,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
let msgOnly = res['messages'].filter(data => data.t != 'au');
|
||||
//this.messages = msgOnly.reverse();
|
||||
//console.log(res);
|
||||
this.transformData(msgOnly.reverse())
|
||||
this.getMessageDB();
|
||||
|
||||
this.showLoader = false;
|
||||
});
|
||||
@@ -876,7 +794,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
card.el.style['z-index'] = 11;
|
||||
}
|
||||
|
||||
downloadFileMsg(msg) {
|
||||
downloadFileMsg(msg: MessageService) {
|
||||
console.log('FILE TYPE', msg.file.type)
|
||||
this.downloadFile = "";
|
||||
if (msg.file.type == "application/img") {
|
||||
@@ -889,8 +807,16 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
console.log('FILE TYPE 33', msg.file.type)
|
||||
} else if (event.type === HttpEventType.Response) {
|
||||
this.downloadFile = 'data:image/jpeg;base64,' + btoa(new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), ''));
|
||||
|
||||
msg.file = {
|
||||
guid: msg.file.guid,
|
||||
image_url: this.downloadFile,
|
||||
type: msg.file.type
|
||||
}
|
||||
|
||||
this.storage.set(msg.file.guid, this.downloadFile);
|
||||
await this.storage.set(msg.file.guid, this.downloadFile).then(() => {
|
||||
console.log('IMAGE SAVED')
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
@@ -900,21 +826,23 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
||||
}
|
||||
|
||||
async openPreview(msg) {
|
||||
if (msg.file.image_url != null) {
|
||||
|
||||
if (msg.file.image_url === null || msg.file.image_url === '' ) {
|
||||
this.downloadFileMsg(msg)
|
||||
|
||||
} else {
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewMediaPage,
|
||||
cssClass: 'modal modal-desktop',
|
||||
componentProps: {
|
||||
image: msg.attachments[0].image_url,
|
||||
image: msg.file.image_url,
|
||||
username: msg.u.name,
|
||||
_updatedAt: msg._updatedAt,
|
||||
_updatedAt: msg._updatedAt
|
||||
}
|
||||
});
|
||||
modal.present();
|
||||
|
||||
} else {
|
||||
this.downloadFileMsg(msg)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<!-- <span><ion-icon class="{{users.status}}" name="ellipse"></ion-icon></span> -->
|
||||
</div>
|
||||
<div hidden class="right">
|
||||
<button class="btn-no-color" (click)="_openMessagesOptions()">
|
||||
<button title="Menu" class="btn-no-color" (click)="_openMessagesOptions()">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg">
|
||||
</ion-icon>
|
||||
@@ -184,7 +184,7 @@
|
||||
<ion-icon name="add"></ion-icon>
|
||||
</ion-fab-button>
|
||||
<ion-fab-list side="top">
|
||||
<ion-fab-button (click)="bookMeeting()" color="light">
|
||||
<ion-fab-button title="Nova Reunião" (click)="bookMeeting()" color="light">
|
||||
<ion-icon name="calendar"></ion-icon>
|
||||
</ion-fab-button>
|
||||
<ion-fab-button hidden (click)="addFile()" color="light">
|
||||
|
||||
@@ -266,195 +266,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
}); */
|
||||
}
|
||||
|
||||
async getMessageDB() {
|
||||
await this.storage.get('chatmsg').then((message) => {
|
||||
this.transformData(message)
|
||||
/* message.forEach(message => {
|
||||
console.log('FROM DB WEB', message)
|
||||
message = this.fix_updatedAt(message)
|
||||
const wewMessage = new MessageService()
|
||||
wewMessage.setData(message)
|
||||
this.massages.push(wewMessage)
|
||||
console.log('loadHistory 222', this.massages)
|
||||
}); */
|
||||
})
|
||||
/* await this.storage.get('chatmsg').then((msg) => {
|
||||
console.log('FROM DB WEB', msg)
|
||||
let msgArray = [];
|
||||
if (msg) {
|
||||
msgArray = msg;
|
||||
msgArray.filter(data => data._id != this.roomId);
|
||||
this.messages = msgArray;
|
||||
console.log("MSG CHAT WEB", this.messages)
|
||||
} else {
|
||||
this.getMessageDB()
|
||||
}
|
||||
|
||||
}) */
|
||||
|
||||
}
|
||||
|
||||
private fix_updatedAt(message) {
|
||||
if (message.result) {
|
||||
console.log('FIX UPDATE ', message.result)
|
||||
message.result._updatedAt = message.result._updatedAt['$date']
|
||||
} else {
|
||||
console.log('FIX UPDATE 11', message)
|
||||
message._updatedAt = message._updatedAt['$date']
|
||||
}
|
||||
return message
|
||||
}
|
||||
|
||||
async transformData(res) {
|
||||
|
||||
let mgsArray = [];
|
||||
res.forEach(async element => {
|
||||
|
||||
if (element.file) {
|
||||
if (element.file.guid) {
|
||||
await this.storage.get(element.file.guid).then((image) => {
|
||||
let chatmsg = {
|
||||
_id: element._id,
|
||||
attachments: element.attachments,
|
||||
channels: element.channels,
|
||||
file: {
|
||||
guid: element.file.guid,
|
||||
image_url: image,
|
||||
type: element.file.type
|
||||
},
|
||||
mentions: element.mentions,
|
||||
msg: element.msg,
|
||||
rid: element.rid,
|
||||
ts: element.ts,
|
||||
u: element.u,
|
||||
_updatedAt: element._updatedAt ,
|
||||
|
||||
}
|
||||
|
||||
mgsArray.push(chatmsg);
|
||||
|
||||
})
|
||||
} else {
|
||||
let chatmsg = {
|
||||
_id: element._id,
|
||||
attachments: element.attachments,
|
||||
channels: element.channels,
|
||||
file: element.file,
|
||||
mentions: element.mentions,
|
||||
msg: element.msg,
|
||||
rid: element.rid,
|
||||
ts: element.ts,
|
||||
u: element.u,
|
||||
_updatedAt: element._updatedAt,
|
||||
}
|
||||
|
||||
mgsArray.push(chatmsg)
|
||||
}
|
||||
} else {
|
||||
let chatmsg = {
|
||||
_id: element._id,
|
||||
attachments: element.attachments,
|
||||
channels: element.channels,
|
||||
mentions: element.mentions,
|
||||
msg: element.msg,
|
||||
rid: element.rid,
|
||||
ts: element.ts,
|
||||
u: element.u,
|
||||
_updatedAt: element._updatedAt,
|
||||
}
|
||||
|
||||
mgsArray.push(chatmsg)
|
||||
}
|
||||
|
||||
});
|
||||
await this.storage.remove('chatmsg').then(() => {
|
||||
console.log('MSG REMOVE FROM STORAGE')
|
||||
});
|
||||
await this.storage.set('chatmsg', mgsArray).then((message) => {
|
||||
message.forEach(message => {
|
||||
console.log('FROM DB WEB', message)
|
||||
message = this.fix_updatedAt(message)
|
||||
const wewMessage = new MessageService()
|
||||
wewMessage.setData(message)
|
||||
this.massages.push(wewMessage)
|
||||
console.log('loadHistory 222', this.massages)
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/* async transformData(res) {
|
||||
console.log('TRANSFORM DATA', res)
|
||||
let mgsArray = [];
|
||||
res.map(async element => {
|
||||
console.log('TRANSFORM DATA ELEMENT', element)
|
||||
|
||||
if (element.file) {
|
||||
if (element.file.guid) {
|
||||
await this.storage.get(element.file.guid).then((image) => {
|
||||
let chatmsg = {
|
||||
_id: element._id,
|
||||
attachments: element.attachments,
|
||||
channels: element.channels,
|
||||
file: {
|
||||
guid: element.file.guid,
|
||||
image_url: image,
|
||||
type: element.file.type
|
||||
},
|
||||
mentions: element.mentions,
|
||||
msg: element.msg,
|
||||
rid: element.rid,
|
||||
ts: element.ts,
|
||||
u: element.u,
|
||||
_updatedAt: element._updatedAt,
|
||||
|
||||
}
|
||||
|
||||
mgsArray.push(chatmsg)
|
||||
|
||||
})
|
||||
} else {
|
||||
let chatmsg = {
|
||||
_id: element._id,
|
||||
attachments: element.attachments,
|
||||
channels: element.channels,
|
||||
file: element.file,
|
||||
mentions: element.mentions,
|
||||
msg: element.msg,
|
||||
rid: element.rid,
|
||||
ts: element.ts,
|
||||
u: element.u,
|
||||
_updatedAt: element._updatedAt,
|
||||
}
|
||||
|
||||
mgsArray.push(chatmsg)
|
||||
}
|
||||
} else {
|
||||
let chatmsg = {
|
||||
_id: element._id,
|
||||
attachments: element.attachments,
|
||||
channels: element.channels,
|
||||
mentions: element.mentions,
|
||||
msg: element.msg,
|
||||
rid: element.rid,
|
||||
ts: element.ts,
|
||||
u: element.u,
|
||||
_updatedAt: element._updatedAt,
|
||||
}
|
||||
|
||||
mgsArray.push(chatmsg)
|
||||
}
|
||||
|
||||
});
|
||||
await this.storage.remove('chatmsg').then(() => {
|
||||
console.log('MSG REMOVE FROM STORAGE')
|
||||
});
|
||||
await this.storage.set('chatmsg', mgsArray).then((value) => {
|
||||
console.log('MSG SAVED ON STORAGE', value)
|
||||
});
|
||||
|
||||
} */
|
||||
|
||||
async viewDocument(msg: any, url?: string) {
|
||||
if (msg.file.type == "application/img") {
|
||||
let response: any = await this.fileService.getFile(msg.file.guid).toPromise();
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Todas as tarefas</ion-label></div>
|
||||
<div class="theicon">
|
||||
<button class="btn-no-color" (click)="doRefresh()">
|
||||
<button class="btn-no-color" (click)="refreshing()">
|
||||
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
@@ -21,7 +22,6 @@
|
||||
</ion-refresher>
|
||||
|
||||
<div class="overflow-y-auto height-100 width-100">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
|
||||
<div *ngIf="allProcessesList.length >= 0">
|
||||
<ion-item-sliding class="overflow-y-auto height-100">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="main-header">
|
||||
<div class="thetitle">
|
||||
<ion-label *ngIf="loggeduser.Profile =='MDGPR'" >Despachos Presidenciais</ion-label>
|
||||
@@ -21,12 +22,12 @@
|
||||
refreshingText="A actualizar...">
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
|
||||
<app-task-list
|
||||
[taskList] = despachosprstore.list
|
||||
[skeletonLoader] = skeletonLoader
|
||||
(viewTaskDetail)="goToDespacho($event)"
|
||||
> </app-task-list>
|
||||
|
||||
|
||||
</ion-content>
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Despachos</ion-label></div>
|
||||
<div class="theicon">
|
||||
<button class="btn-no-color" (click)="doRefresh()">
|
||||
<button class="btn-no-color" (click)="refreshing()">
|
||||
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
@import '~src/function.scss';
|
||||
/* CONTENT */
|
||||
ion-header {
|
||||
padding: 30px 20px 0 20px !important;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.title{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
font-family: Roboto;
|
||||
font-size: 25px;
|
||||
color:#000;
|
||||
@@ -26,7 +23,7 @@ ion-header {
|
||||
}
|
||||
.ion-item-class{
|
||||
padding: 0;
|
||||
|
||||
|
||||
}
|
||||
.label-text{
|
||||
width: 100%;
|
||||
@@ -76,7 +73,7 @@ ion-item{
|
||||
.div-icon ion-icon{
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
|
||||
|
||||
}
|
||||
.div-content-expediente p, .div-content-pendentes p{
|
||||
font-size: 14pt;
|
||||
@@ -157,7 +154,7 @@ ion-item{
|
||||
.exp-workflow{
|
||||
float: left;
|
||||
margin: 0 !important;
|
||||
|
||||
|
||||
.label{
|
||||
border-radius: 15px;
|
||||
background: #ffb703;
|
||||
@@ -220,4 +217,4 @@ ion-item{
|
||||
font-size: 45px;
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import { DespachoService } from 'src/app/Rules/despacho.service';
|
||||
export class DespachosPage implements OnInit {
|
||||
|
||||
despachoStore = DespachoStore;
|
||||
skeletonLoader = true;
|
||||
|
||||
constructor (
|
||||
private router: Router,
|
||||
@@ -39,12 +40,15 @@ export class DespachosPage implements OnInit {
|
||||
|
||||
async LoadList() {
|
||||
|
||||
this.skeletonLoader = true;
|
||||
|
||||
await this.despachoRule.getList({updateStore: true})
|
||||
//this.skeletonLoader = false;
|
||||
}
|
||||
|
||||
get skeletonLoader(): boolean {
|
||||
/* get skeletonLoader(): boolean {
|
||||
return this.despachoRule.LoaderService.loading
|
||||
}
|
||||
} */
|
||||
|
||||
doRefresh() {
|
||||
setTimeout(() => {
|
||||
@@ -52,4 +56,10 @@ export class DespachosPage implements OnInit {
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
refreshing() {
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Diplomas</ion-label></div>
|
||||
<div class="theicon">
|
||||
@@ -19,8 +20,8 @@
|
||||
</ion-refresher>
|
||||
|
||||
|
||||
<div class="width-100 overflow-y-auto height-100">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="main-container width-100 overflow-y-auto height-100">
|
||||
|
||||
<div *ngIf="diplomasList.length >= 1">
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
@import '~src/function.scss';
|
||||
/* CONTENT */
|
||||
:host{
|
||||
/* :host{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
margin: 0;
|
||||
}
|
||||
border: 1px solid red;
|
||||
} */
|
||||
|
||||
.title{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
font-family: Roboto;
|
||||
font-size: 25px;
|
||||
color:#000;
|
||||
@@ -34,6 +37,11 @@
|
||||
color: #0d89d1 !important;
|
||||
}
|
||||
}
|
||||
.main-container{
|
||||
padding: 0px 20px 0 20px !important;
|
||||
margin: 0;
|
||||
color:#000;
|
||||
}
|
||||
.item-list-small{
|
||||
font-size: 11px;
|
||||
overflow: hidden;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Diplomas</ion-label></div>
|
||||
<div class="theicon">
|
||||
@@ -20,8 +21,7 @@
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
|
||||
<div class="width-100 overflow-y-auto height-100" [ngSwitch]="segment">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="main-container width-100 overflow-y-auto height-100" [ngSwitch]="segment">
|
||||
|
||||
<div *ngIf="deplomasStore.diplomasList.length >= 1">
|
||||
<ion-list *ngSwitchCase="'validar'">
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
@import '~src/function.scss';
|
||||
/* CONTENT */
|
||||
:host{
|
||||
/* :host{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
margin: 0;
|
||||
}
|
||||
} */
|
||||
.title{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
font-family: Roboto;
|
||||
font-size: 25px;
|
||||
color:#000;
|
||||
@@ -19,6 +20,11 @@
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
.main-container{
|
||||
padding: 0px 20px 0 20px !important;
|
||||
margin: 0;
|
||||
color:#000;
|
||||
}
|
||||
.item-list-small{
|
||||
font-size: 11px;
|
||||
overflow: hidden;
|
||||
|
||||
@@ -42,7 +42,7 @@ constructor(
|
||||
ngOnInit() {
|
||||
// update list
|
||||
this.LoadList()
|
||||
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationStart && '/home/gabinete-digital?diplomas=true'.startsWith(event.url)) {
|
||||
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
|
||||
@@ -53,7 +53,7 @@ constructor(
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
@@ -69,7 +69,8 @@ constructor(
|
||||
}
|
||||
|
||||
async LoadList() {
|
||||
|
||||
this.skeletonLoader = true;
|
||||
|
||||
let diplomas = await this.processes.GetTasksList("Despacho do Presidente da República", false).toPromise();
|
||||
|
||||
this.diplomasList = [];
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class">
|
||||
|
||||
|
||||
<ion-select placeholder="Selecione tipo de evento*"
|
||||
class="d-block d-md-none"
|
||||
[(ngModel)]="eventProcess.workflowInstanceDataFields.Category"
|
||||
@@ -85,8 +85,8 @@
|
||||
<ion-select-option value="Conferência">Conferência</ion-select-option>
|
||||
<ion-select-option value="Encontro">Encontro</ion-select-option>
|
||||
</ion-select>
|
||||
|
||||
|
||||
|
||||
|
||||
<mat-form-field class="d-none d-md-block" appearance="none" class="width-100" placeholder="Sample Type" required>
|
||||
<!-- <input matInput type="text" > -->
|
||||
<mat-select [(ngModel)]="eventProcess.workflowInstanceDataFields.Category" >
|
||||
@@ -104,8 +104,8 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -121,7 +121,7 @@
|
||||
placeholder="Início"
|
||||
[(ngModel)]="startDate"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
minuteValues="0,15,30,45"
|
||||
minuteValues="0,5,10,15,20,25,30,35,40,45,50,55"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="{{minDate}}"
|
||||
max="2022"
|
||||
@@ -160,7 +160,7 @@
|
||||
placeholder="Fim"
|
||||
[(ngModel)]="endDate"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
minuteValues="0,15,30,45"
|
||||
minuteValues="0,5,10,15,20,25,30,35,40,45,50,55"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="{{minDate}}"
|
||||
max="2025"
|
||||
@@ -241,7 +241,7 @@
|
||||
placeholder="Última ocorrência"
|
||||
[(ngModel)]="eventProcess.workflowInstanceDataFields.LastOccurrence"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
minuteValues="0,15,30,45"
|
||||
minuteValues="0,5,10,15,20,25,30,35,40,45,50,55"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="2021"
|
||||
max="2025"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<ion-header>
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<div class="title width-100">
|
||||
<div class="title-container d-flex justify-space-between">
|
||||
<span class="text-center mt-0 aside-title px-20"><label>Eventos para Aprovação</label></span>
|
||||
@@ -25,7 +26,6 @@
|
||||
</ion-refresher>
|
||||
<div class="main-content overflow-y-auto height-100" [ngSwitch]="segment">
|
||||
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<div *ngSwitchCase="'MDGPR'" class="height-100">
|
||||
|
||||
<div *ngIf="eventaprovacaostore.listmd.length != 0">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Expediente</ion-label></div>
|
||||
<div class="theicon">
|
||||
@@ -12,7 +13,6 @@
|
||||
|
||||
<div class="content width-100 overflow-y-auto height-100">
|
||||
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<ion-list *ngIf="expedienteGdStore.list.length >= 1">
|
||||
<div
|
||||
class="expediente item-hover ion-no-padding ion-no-margin cursor-pointer"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Expediente</ion-label></div>
|
||||
<div class="theicon">
|
||||
@@ -20,7 +21,7 @@
|
||||
|
||||
<div class="content width-100 overflow-y-auto height-100" >
|
||||
<div >
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
|
||||
<ion-list *ngIf="expedientegbstore.list.length >=0">
|
||||
<div
|
||||
class="expediente item-hover ion-no-padding ion-no-margin cursor-pointer"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<ion-content>
|
||||
<div class="overflow-y-auto height-100 width-100 px-20">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
|
||||
<div *ngIf="taskList.length >= 0">
|
||||
<ion-list part="divo">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<ion-header class="ion-no-border px-20">
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Pedidos</ion-label></div>
|
||||
<div class="theicon">
|
||||
@@ -28,8 +29,8 @@
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
<div class="width-100 overflow-y-auto height-100 px-20" [ngSwitch]="segment">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="main-container width-100 overflow-y-auto height-100 px-20" [ngSwitch]="segment">
|
||||
|
||||
<div *ngIf="pedidosstore.listparecer.length >= 1">
|
||||
<ion-list *ngSwitchCase="'parecer'">
|
||||
<!-- *ngFor = "let task of pedidosstore.listparecer; let i = index"
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
@import '~src/function.scss';
|
||||
/* CONTENT */
|
||||
:host{
|
||||
/* :host{
|
||||
padding: 30px 00px 0 00px !important;
|
||||
margin: 0;
|
||||
}
|
||||
} */
|
||||
.title{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
font-family: Roboto;
|
||||
font-size: 25px;
|
||||
color:#000;
|
||||
@@ -19,6 +20,12 @@
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
.main-container{
|
||||
padding: 0px 20px 0 20px !important;
|
||||
margin: 0;
|
||||
color:#000;
|
||||
}
|
||||
.item-list-small{
|
||||
font-size: 11px;
|
||||
overflow: hidden;
|
||||
|
||||
@@ -120,6 +120,7 @@ export class PedidosPage implements OnInit {
|
||||
|
||||
});
|
||||
}
|
||||
this.skeletonLoader = false
|
||||
}
|
||||
|
||||
doRefresh() {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<ion-header class="ion-no-border px-20">
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div class="title">
|
||||
<div class="thetitle"><ion-label >Pendentes</ion-label></div>
|
||||
<div class="theicon">
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
@import '~src/function.scss';
|
||||
/* CONTENT */
|
||||
:host{
|
||||
/* :host{
|
||||
padding: 30px 00px 0 00px !important;
|
||||
margin: 0;
|
||||
}
|
||||
} */
|
||||
.title{
|
||||
padding: 30px 20px 0 20px !important;
|
||||
font-family: Roboto;
|
||||
font-size: 25px;
|
||||
color:#000;
|
||||
|
||||
@@ -91,6 +91,9 @@
|
||||
}
|
||||
.active{
|
||||
border-top: 7px solid var(--header-tab-text-white);
|
||||
span{
|
||||
font-weight: 650;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</div> -->
|
||||
|
||||
|
||||
</div>
|
||||
</ion-header>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="content-container">
|
||||
|
||||
<div class="ion-item-container">
|
||||
<ion-input [(ngModel)]="folder.Description" placeholder="Assunto" ></ion-input>
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="folder.Description" placeholder="Assunto" ></ion-input>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
@@ -35,26 +35,26 @@
|
||||
[(ngModel)]="folder.DateBegin"
|
||||
placeholder="Início"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
minuteValues="0,15,30,45"
|
||||
minuteValues="0,5,10,15,20,25,30,35,40,45,50,55"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="{{minDate}}"
|
||||
min="{{minDate}}"
|
||||
max="2025"
|
||||
class="d-block d-md-none">
|
||||
</ion-datetime>
|
||||
|
||||
|
||||
<mat-form-field appearance="none" class="width-100 date-hour-picker d-none d-md-block">
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
placeholder="Choose a date*"
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
placeholder="Choose a date*"
|
||||
[formControl]="dateControlEnd"
|
||||
[min]="minDate"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
<ngx-mat-datetime-picker #picker1
|
||||
[showSpinners]="showSpinners"
|
||||
<ngx-mat-datetime-picker #picker1
|
||||
[showSpinners]="showSpinners"
|
||||
[showSeconds]="showSeconds"
|
||||
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||
[stepSecond]="stepSecond"
|
||||
[touchUi]="touchUi">
|
||||
</ngx-mat-datetime-picker>
|
||||
@@ -70,29 +70,29 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class d-flex flex-grow-1">
|
||||
<ion-datetime
|
||||
<ion-datetime
|
||||
class="flex-grow-1 d-block d-md-none"
|
||||
[(ngModel)]="folder.DateEnd"
|
||||
placeholder="Fim"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
minuteValues="0,15,30,45"
|
||||
minuteValues="0,5,10,15,20,25,30,35,40,45,50,55"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
min="{{minDate}}"
|
||||
min="{{minDate}}"
|
||||
max="2022">
|
||||
</ion-datetime>
|
||||
|
||||
<mat-form-field appearance="none" class="width-100 date-hour-picker d-none d-md-block">
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
placeholder="Choose a date*"
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
placeholder="Choose a date*"
|
||||
[formControl]="dateControlEnd"
|
||||
[min]="minDate"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1"></mat-datepicker-toggle>
|
||||
<ngx-mat-datetime-picker #picker1
|
||||
[showSpinners]="showSpinners"
|
||||
<ngx-mat-datetime-picker #picker1
|
||||
[showSpinners]="showSpinners"
|
||||
[showSeconds]="showSeconds"
|
||||
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||
[stepSecond]="stepSecond"
|
||||
[touchUi]="touchUi">
|
||||
</ngx-mat-datetime-picker>
|
||||
@@ -107,13 +107,13 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-textarea-class flex-grow-1">
|
||||
<ion-textarea [(ngModel)]="folder.Detail" rows="12" cols="20" placeholder="Descrição da acção..."></ion-textarea>
|
||||
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="folder.Detail" rows="12" cols="20" placeholder="Descrição da acção..."></ion-textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</ion-content>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="div-title">
|
||||
<ion-label class="title"> Nova Acção</ion-label>
|
||||
</div>
|
||||
<div class="actionType">
|
||||
<!-- <div class="actionType">
|
||||
<ion-segment [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
|
||||
<ion-segment-button value="Viagem">
|
||||
<ion-label>Viagem</ion-label>
|
||||
@@ -12,7 +12,7 @@
|
||||
<ion-label>Evento</ion-label>
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
</ion-header>
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="content-container">
|
||||
|
||||
<div class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input [(ngModel)]="folder.Description" placeholder="Assunto" ></ion-input>
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="folder.Description" placeholder="Assunto" ></ion-input>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
@@ -35,7 +35,7 @@
|
||||
[(ngModel)]="folder.DateBegin"
|
||||
placeholder="Início"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
minuteValues="0,15,30,45"
|
||||
minuteValues="0,5,10,15,20,25,30,35,40,45,50,55"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
max="2025">
|
||||
</ion-datetime>
|
||||
@@ -72,7 +72,7 @@
|
||||
[(ngModel)]="folder.DateEnd"
|
||||
placeholder="Fim"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
minuteValues="0,15,30,45"
|
||||
minuteValues="0,5,10,15,20,25,30,35,40,45,50,55"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
max="2025">
|
||||
</ion-datetime>
|
||||
@@ -101,7 +101,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-textarea-class flex-grow-1">
|
||||
<ion-textarea [(ngModel)]="folder.Detail" rows="12" cols="20" placeholder="Descrição da acção..."></ion-textarea>
|
||||
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="folder.Detail" rows="12" cols="20" placeholder="Descrição da acção..."></ion-textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -62,7 +62,7 @@ export class NewActionPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.segment = "Viagem";
|
||||
this.segment = "Evento";
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="content-container">
|
||||
|
||||
<div *ngIf="publicationType!='1'" class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input [(ngModel)]="pub.Title" name="title" placeholder="Título" ></ion-input>
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="pub.Title" name="title" placeholder="Título" ></ion-input>
|
||||
</div>
|
||||
|
||||
<div *ngIf="publicationType!='1' " class="container-div pb-20">
|
||||
@@ -22,7 +22,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-textarea-class flex-grow-1" [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>
|
||||
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="pub.Message" name="description" ngDefaultControl rows="12" cols="20" placeholder="Corpo de texto..."></ion-textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
</ion-refresher>
|
||||
<div class="main-container px-20">
|
||||
<ion-list>
|
||||
<!-- [routerLink]="['/home/publications/view-publications/publication-detail', publication.publicationId]" -->
|
||||
<div class="post-item d-md-block mb-10 cursor-pointer"
|
||||
*ngFor="let publication of publicationListStorage.documents[folderId]"
|
||||
(click)="viewPublicationDetail(publication.DocumentId)">
|
||||
@@ -70,7 +69,7 @@
|
||||
</div>
|
||||
<!-- fab placed to the bottom end -->
|
||||
<ion-fab vertical="bottom" horizontal="end">
|
||||
<ion-fab-button (click)="AddPublication('2',item.ProcessId)">
|
||||
<ion-fab-button title="Nova Publicação" (click)="AddPublication('2',item.ProcessId)">
|
||||
<ion-icon name="add"></ion-icon>
|
||||
</ion-fab-button>
|
||||
</ion-fab>
|
||||
|
||||
@@ -102,10 +102,9 @@ export class ViewPublicationsPage implements OnInit {
|
||||
getPublications() {
|
||||
this.showLoader = true;
|
||||
const folderId = this.folderId
|
||||
this.publicationList = new Array();
|
||||
this.publications.GetPublications(folderId).subscribe(res=> {
|
||||
|
||||
this.publicationList = new Array();
|
||||
|
||||
res.forEach(element => {
|
||||
let item: Publication = this.publicationPipe.itemList(element)
|
||||
this.publicationList.push(item);
|
||||
|
||||
Reference in New Issue
Block a user