ChatStorage Done Done!

This commit is contained in:
Eudes Inácio
2022-01-21 16:55:05 +01:00
86 changed files with 458 additions and 622 deletions
+2 -2
View File
@@ -11,7 +11,7 @@
<ion-tab-button tab="agenda" [class.active]="pathname === '/home/agenda' ">
<!-- <ion-icon name="calendar"></ion-icon> -->
<ion-icon *ngIf="pathname != '/home/agenda'" class="nav-icon" src="assets/images/icons-nav-calendar.svg"></ion-icon>
<ion-icon *ngIf="pathname == '/home/agenda'" class="nav-icon" src="assets/images/nav-hover/icons-nav-calendar-active.svg"></ion-icon>
<ion-icon *ngIf="pathname == '/home/agenda'" class="nav-icon" src="assets/images/nav-hover/icons-nav-agenda-active.svg"></ion-icon>
<ion-label style="margin-bottom: 2px;" class="overflow-visible">Agenda</ion-label>
</ion-tab-button>
<ion-tab-button (click)="goto('/home/gabinete-digital')" [class.active]="pathname === '/home/gabinete-digital' ">
@@ -25,7 +25,7 @@
<ion-tab-button tab="publications" [class.active]="pathname === '/home/publications' ">
<ion-icon *ngIf="pathname != '/home/publications'" class="nav-icon" src="assets/images/icons-nav-actions.svg"></ion-icon>
<ion-icon *ngIf="pathname == '/home/publications'" class="nav-icon" src="assets/images/nav-hover/icons-nav-actions.svg"></ion-icon>
<ion-icon *ngIf="pathname == '/home/publications'" class="nav-icon" src="assets/images/nav-hover/icons-nav-actions-active.svg"></ion-icon>
<ion-label style="margin-bottom: 2px;" class="overflow-visible">Ações</ion-label>
</ion-tab-button>
<ion-tab-button tab="chat" [class.active]="pathname === '/home/chat' ">
+1
View File
@@ -50,4 +50,5 @@ ion-badge {/* */
ion-tab-button.active{
color: #061b52;
font-weight: 650;
}
+1 -1
View File
@@ -5,7 +5,7 @@
</div>
</div>
<div class="ion-input-class-no-height">
<ion-textarea [(ngModel)]="note" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="note" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
</div>
<div *ngIf="hideThisFeature" class="ion-item-container-no-border">
@@ -5,7 +5,7 @@
{{modalTitle[taskType]}}
</div>
<div class="ion-item-container width-100" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
<ion-input placeholder="Assunto*" [(ngModel)]="postData.DispatchFolder.Subject"></ion-input>
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Assunto*" [(ngModel)]="postData.DispatchFolder.Subject"></ion-input>
</div>
<div class="container-div width-100">
@@ -14,7 +14,7 @@
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
</div>
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('Message')?.invalid && validateFrom || validateField ">
<ion-textarea class="add-border" placeholder="Descrição" [(ngModel)]="postData.DispatchFolder.Message"></ion-textarea>
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" class="add-border" placeholder="Descrição" [(ngModel)]="postData.DispatchFolder.Message"></ion-textarea>
</div>
</div>
</div>
@@ -10,7 +10,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)]="note" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="note" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
</div>
</div>
</div>
+4 -4
View File
@@ -36,7 +36,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)]="note" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="note" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
</div>
</div>
</div>
@@ -49,7 +49,7 @@
</div>
<div class="attach-document">
<ion-label>Anexar Documentos</ion-label>
</div>
</div>
</ion-label>
</div>
@@ -72,11 +72,11 @@
</div>
</div>
</div>
</div>
<div class="aside-righ flex-grow-1">
<app-attendee-modal class=" d-flex flex-column height-100"
<app-attendee-modal class=" d-flex flex-column height-100"
[footer]="false"
*ngIf="showAttendees"
[taskParticipants]="taskParticipants"
@@ -7,14 +7,14 @@
<!-- *ngIf="p.userRole('PR')" -->
<!-- *ngIf="p.role(['PR','MD']).permissionAnyOf(['view','edit'])" -->
<label >Convocar Reunião</label>
</div>
</div>
<div class="overflow-y-auto content-default-padding">
<div class="ion-item-container width-100" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
<ion-input placeholder="Assunto*" [(ngModel)]="postData.Subject"></ion-input>
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Assunto*" [(ngModel)]="postData.Subject"></ion-input>
</div>
<div *ngIf="Form && validateFrom" >
@@ -34,7 +34,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)]="postData.Location"></ion-input>
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Localização*" [(ngModel)]="postData.Location"></ion-input>
</div>
</div>
</div>
@@ -202,7 +202,7 @@
<ion-icon slot="start" src="assets/images/icons-refresh.svg"></ion-icon>
</div>
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('dateOccurrence')?.invalid && validateFrom ">
<!-- (ngModelChange)="onSelectedRecurringChanged($event)" -->
<mat-form-field appearance="none" floatLabel="never" class="width-100" value="false" interface="action-sheet" required>
<mat-select placeholder="Selecione repetição*"
@@ -215,7 +215,7 @@
</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
</div>
@@ -237,9 +237,9 @@
>
</ion-datetime> -->
<!-- <ion-input placeholder="Data fim" [(ngModel)]="postData.EndDate"></ion-input> -->
<!-- [formControl]="dateControlOccurrence" -->
<mat-form-field class="date-hour-picker">
<input matInput [ngxMatDatetimePicker]="occurrrence"
placeholder="Última ocurrência"
@@ -256,7 +256,7 @@
>
</ngx-mat-datetime-picker>
</mat-form-field>
</div>
</div>
</div>
@@ -311,7 +311,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)]="postData.Body.Text" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="postData.Body.Text" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
</div>
</div>
</div>
+3 -3
View File
@@ -37,7 +37,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)]="note" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="note" placeholder="Detalhes" rows="6" cols="20"></ion-textarea>
</div>
</div>
</div>
@@ -58,11 +58,11 @@
</ion-list>
</div>
</div>
</div>
<div class="aside-righ flex-grow-1">
<app-attendee-modal class=" d-flex flex-column height-100"
<app-attendee-modal class=" d-flex flex-column height-100"
[footer]="false"
*ngIf="showAttendees"
[taskParticipants]="taskParticipants"
+9 -9
View File
@@ -115,17 +115,17 @@
<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 resize">
<button title="Mudar de Agenda" *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 resize" (click)="viewEventsToApprove()" *ngIf="loggeduser.Profile == 'MDGPR'">
<button title="Visualizar a lista de Eventos para aprovação" 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 resize" (click)="clearContact();openAddEvent();">
<button title="Novo Evento" 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>
@@ -203,7 +203,7 @@
</ion-row>
<ion-row class="timeline-date align-center">
<span *ngIf="timelineIsCurrentDate()">Hoje, &nbsp;</span> {{ timelineDate }}
<span *ngIf="timelineIsCurrentDate()">Hoje,&nbsp;</span> {{ timelineDate }}
</ion-row>
<ion-row class="filter ion-align-items-center" >
<div class="filter-name" (click)="showTimelineFilterState=!showTimelineFilterState">{{timelineFilterState}}</div>
@@ -224,13 +224,13 @@
</ion-row>
</ion-row>
<div class="d-none d-md-flex" *ngIf="loggeduser.Profile == 'MDGPR'">
<div class="flex-grow-1 text-grey d-flex justify-center align-center">
<div>Própria</div>
<div class="calendar-title-container px-20 d-none d-md-flex" *ngIf="loggeduser.Profile == 'MDGPR'">
<div class="calendar-title-description flex-grow-1 text-grey d-flex justify-center align-center">
<div>Meu Calendário</div>
</div>
<div class="flex-grow-1 text-black">
<div class="calendar-title-description text-black align-center">
<div class="flex-grow-1 text-grey d-flex justify-center align-center">
<div>Presidente da República</div>
<div>Calendário do Presidente da República</div>
</div>
</div>
</div>
+12 -5
View File
@@ -748,7 +748,7 @@ app-approve-event{
padding: 0px 5px;
}
}
li.active {
background-color: var(--mat-selected) !important;
color: white;
@@ -839,14 +839,21 @@ app-approve-event{
}
$font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
$font-size: 11pt;
.changeText{
font-family: $font-family;
font-size: $font-size;
}
.calendar-title-container{
width: 100% !important;
.calendar-title-description {
width: 50% !important;
}
}
@@ -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)]="postEvent.Subject"></ion-input>
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Assunto*" [(ngModel)]="postEvent.Subject"></ion-input>
</div>
@@ -38,7 +38,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)]="postEvent.Location"></ion-input>
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Localização*" [(ngModel)]="postEvent.Location"></ion-input>
</div>
</div>
</div>
@@ -120,7 +120,7 @@
placeholder="Início"
[(ngModel)]="postEvent.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"
@@ -141,7 +141,7 @@
placeholder="Fim"
[(ngModel)]="postEvent.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"
@@ -179,7 +179,7 @@
placeholder="Última ocorrência"
[(ngModel)]="postEvent.EventRecurrence.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"
@@ -242,7 +242,7 @@
</div>
<div class="ion-input-class-no-height width-100 flex-grow-1">
<!-- rows="6" cols="20" -->
<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>
</div>
@@ -15,7 +15,7 @@
<ion-content>
<div class="ion-input-class-no-height">
<ion-textarea [(ngModel)]="emendMessage" rows="6" cols="20" placeholder="Indique o que necessita ser revisto!"></ion-textarea>
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="emendMessage" rows="6" cols="20" placeholder="Indique o que necessita ser revisto!"></ion-textarea>
</div>
</ion-content>
@@ -15,11 +15,11 @@
<!-- <input type="text" ngbDatepicker #d="ngbDatepicker"/> -->
<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 class="container-div" *ngIf="loggeduser.Profile == 'MDGPR'">
<div class="ion-item-class-2">
<div class="ion-icon-class">
@@ -57,7 +57,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)]="postEvent.Location"></ion-input>
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Localização*" [(ngModel)]="postEvent.Location"></ion-input>
</div>
</div>
<!-- Error messages -->
@@ -142,7 +142,7 @@
placeholder="Início*"
[(ngModel)]="postEvent.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"
max="2025"
>
@@ -162,7 +162,7 @@
placeholder="Fim*"
[(ngModel)]="postEvent.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"
max="2025"
@@ -272,7 +272,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>
+2 -2
View File
@@ -17,11 +17,11 @@
<ion-label class="title">Chat</ion-label>
</div>
<div class="div-icon">
<button class="btn-no-color" (click)="openContactsPage()">
<button title="Nova Conversa Individual" class="btn-no-color" (click)="openContactsPage()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src="assets/images/icons-chat-new-conversation.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src="assets/images/theme/gov/icons-chat-new-conversation.svg"></ion-icon>
</button>
<button class="btn-no-color" (click)="openNewGroupPage()">
<button title="Novo Grupo" class="btn-no-color" (click)="openNewGroupPage()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src="assets/images/icons-chat-new-group.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src="assets/images/theme/gov/icons-chat-new-group.svg" ></ion-icon>
</button>
-3
View File
@@ -151,9 +151,6 @@ export class ChatPage implements OnInit {
this.authService.userData$.subscribe((res: any) => {
this.loggedUser = res;
console.log(this.loggedUser);
this.getDirectMessagesDB();
this.getGroupsDB()
});
this.hideRefreshButton();
@@ -112,8 +112,8 @@
<div>
<div (click)="openPreview(msg)">
<!-- <img *ngIf="file.image_url" src="{{file.image_url}}" alt="image" (click)="imageSize(file.image_url)"> -->
TTTT
<img *ngIf="msg.image_url" src="{{msg.image_url}}" alt="image">
File
<img *ngIf="msg.file.image_url" src="{{msg.file.image_url}}" alt="image">
</div>
</div>
</div>
@@ -220,7 +220,7 @@
</div>
<div class="message-box width-80">
<ion-item class="ion-no-padding type-message" lines="none">
<ion-textarea clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow 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>
@@ -748,6 +748,11 @@ downloadFileMsg(msg) {
this.downloadFile = 'data:image/jpeg;base64,' + btoa(new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), ''));
console.log('FILE TYPE 44', this.downloadFile)
msg.file = {
guid: msg.file.guid,
image_url: this.downloadFile,
type: msg.file.type
}
this.sqlservice.updateChatMsg(msg._id, this.downloadFile);
}
});
@@ -755,22 +760,24 @@ downloadFileMsg(msg) {
}
}
async openPreview(msg) {
if(msg.image_url != null) {
const modal = await this.modalController.create({
component: ViewMediaPage,
cssClass: 'modal modal-desktop',
componentProps: {
image: msg.image_url,
username: msg.u.name,
_updatedAt: msg._updatedAt,
}
});
modal.present();
} else {
this.downloadFileMsg(msg);
}
async openPreview(msg) {
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.file.image_url,
username: msg.u.name,
_updatedAt: msg._updatedAt
}
});
modal.present();
}
}
}
+10 -7
View File
@@ -61,7 +61,8 @@
<div *ngIf="msg.attachments" class="message-attachments">
<div *ngFor="let file of msg.attachments let i = index">
<div (click)="openPreview(msg)">
<img *ngIf="msg.image_url" src={{msg.image_url}} alt="image">
<!-- <img *ngIf="file.image_url" src="{{file.image_url}}" alt="image" (click)="imageSize(file.image_url)"> -->
<img *ngIf="msg.file.image_url" src="{{msg.file.image_url}}" alt="image">
</div>
<div>
<div>
@@ -92,7 +93,7 @@
</div>
</div>
<div (press)="handlePress(msg._id)" class='message-container incoming-{{msg.u.username!=loggedUser.me.username}}' (click)="openPreview(msg)" *ngIf="msg.msg !=''">
<!-- <div (press)="handlePress(msg._id)" class='message-container incoming-{{msg.u.username!=loggedUser.me.username}}' (click)="openPreview(msg)" *ngIf="msg.msg !=''">
<div class="title">
<ion-label>{{msg.u.name}}</ion-label>
<span class="time">{{showDateDuration(msg._updatedAt)}}</span>
@@ -101,7 +102,7 @@
<ion-label>{{msg.msg}}</ion-label>
{{last ? scrollToBottom() : ''}}
</div>
</div>
</div> -->
<div (press)="handlePress(msg._id)" class='message-container incoming-{{msg.u.username!=loggedUser.me.username}}' *ngIf="msg.alias =='documento'">
<div class="title">
@@ -111,8 +112,10 @@
<div>
<div *ngIf="msg.attachments" class="message-attachments">
<div *ngFor="let file of msg.attachments let i = index">
<div *ngIf="file.image_url" (click)="openPreview(msg)">
<img src="{{file.image_url}}" alt="image">
<div (click)="openPreview(msg)">
<!-- <img *ngIf="file.image_url" src="{{file.image_url}}" alt="image" (click)="imageSize(file.image_url)"> -->
File
<img *ngIf="msg.file.image_url" src="{{msg.file.image_url}}" alt="image">
</div>
<div>
<div>
@@ -209,8 +212,8 @@
</div>
<div class="width-70">
<ion-item class="ion-no-padding ion-no-margin type-message" lines="none">
<ion-textarea *ngIf="!recording" clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
<ion-textarea *ngIf="recording" clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="durationDisplay"></ion-textarea>
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" *ngIf="!recording" clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
<ion-textarea autocomplete="on" spellcheck="true" *ngIf="recording" clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="durationDisplay"></ion-textarea>
<button hidden #recordbtn class="btn-no-color" (click)="notImplemented()">
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
</button>
+18 -9
View File
@@ -30,6 +30,7 @@ import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
import { HttpEventType } from '@angular/common/http';
import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
import { WsChatMethodsService } from 'src/app/services/chat/ws-chat-methods.service'
import { MessageService } from 'src/app/services/chat/message.service';
const IMAGE_DIR = 'stored-images';
@@ -131,7 +132,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
directory: Directory.Data,
recursive: true
});
this.getRoomMessageDB(this.roomId);
}
ngAfterViewInit() {
@@ -782,7 +782,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
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") {
@@ -795,30 +795,39 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
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), ''));
console.log('FILE TYPE 44', this.downloadFile)
msg.file = {
guid: msg.file.guid,
image_url: this.downloadFile,
type: msg.file.type
}
this.sqlservice.updateChatMsg(msg._id, this.downloadFile);
}
});
console.log('FILE TYPE 44', this.downloadFile)
}
}
async openPreview(msg) {
if(msg.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.image_url,
image: msg.file.image_url,
username: msg.u.name,
_updatedAt: msg._updatedAt,
_updatedAt: msg._updatedAt
}
});
modal.present();
} else {
this.downloadFileMsg(msg);
}
}
@@ -51,13 +51,13 @@
<ion-item>
<ion-label position="stacked">Data Início</ion-label>
<ion-datetime value="{{loadedEvent.StartDate}}" [(ngModel)]="loadedEvent.StartDate" min="2020" max="2100"
displayFormat="D MMM YYYY H:mm" minuteValues="0,15,30,45"
displayFormat="D MMM YYYY H:mm" 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"></ion-datetime>
</ion-item>
<ion-item>
<ion-label position="stacked">Data Fim</ion-label>
<ion-datetime value="{{loadedEvent.EndDate}}" [(ngModel)]="loadedEvent.EndDate" min="2020" max="2100"
displayFormat="D MMM YYYY HH:mm" minuteValues="0,15,30,45"
displayFormat="D MMM YYYY HH:mm" 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"></ion-datetime>
</ion-item>
@@ -53,13 +53,13 @@
<ion-item>
<ion-label position="stacked">Data Início</ion-label>
<ion-datetime value="{{loadedEvent.StartDate}}" [(ngModel)]="loadedEvent.StartDate" min="2020" max="2100"
displayFormat="D MMM YYYY H:mm" minuteValues="0,15,30,45"
displayFormat="D MMM YYYY H:mm" 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"></ion-datetime>
</ion-item>
<ion-item>
<ion-label position="stacked">Data Fim</ion-label>
<ion-datetime value="{{loadedEvent.EndDate}}" [(ngModel)]="loadedEvent.EndDate" min="2020" max="2100"
displayFormat="D MMM YYYY HH:mm" minuteValues="0,15,30,45"
displayFormat="D MMM YYYY HH:mm" 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"></ion-datetime>
</ion-item>
@@ -53,13 +53,13 @@
<ion-item>
<ion-label position="stacked">Data Início</ion-label>
<ion-datetime value="{{loadedEvent.StartDate}}" [(ngModel)]="loadedEvent.StartDate" min="2020" max="2100"
displayFormat="D MMM YYYY H:mm" minuteValues="0,15,30,45"
displayFormat="D MMM YYYY H:mm" 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"></ion-datetime>
</ion-item>
<ion-item>
<ion-label position="stacked">Data Fim</ion-label>
<ion-datetime value="{{loadedEvent.EndDate}}" [(ngModel)]="loadedEvent.EndDate" min="2020" max="2100"
displayFormat="D MMM YYYY HH:mm" minuteValues="0,15,30,45"
displayFormat="D MMM YYYY HH:mm" 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"></ion-datetime>
</ion-item>
@@ -450,7 +450,7 @@ export class DespachoPrPage implements OnInit {
else if (actionName == 'Reexecução') {
await this.reexecutar(res.data.note, docs);
}
this.goBack();
}
});
@@ -459,7 +459,7 @@ export class DespachoPrPage implements OnInit {
async openExpedientActionsModal(taskAction: any, task: any) {
//this.modalController.dismiss();
let classs;
if (window.innerWidth <= 800) {
if (window.innerWidth <= 700) {
classs = 'modal modal-desktop'
} else {
classs = 'modal modal-desktop showAsideOptions'
@@ -10,7 +10,7 @@
<div class="overflow-y-auto content-default-padding">
<div class="ion-item-container width-100" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
<ion-input placeholder="Assunto*" [(ngModel)]="postData.Subject"></ion-input>
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Assunto*" [(ngModel)]="postData.Subject"></ion-input>
</div>
<div *ngIf="Form && validateFrom" >
@@ -30,7 +30,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)]="postData.Location"></ion-input>
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Localização*" [(ngModel)]="postData.Location"></ion-input>
</div>
</div>
</div>
@@ -132,7 +132,7 @@
placeholder="Início*"
[(ngModel)]="postData.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="{{ionicMinDate}}"
max="2025"
@@ -171,7 +171,7 @@
placeholder="Fim*"
[(ngModel)]="postData.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="{{ionicMinDate}}"
max="2025"
@@ -6,7 +6,7 @@
</ion-item>
<div class="ion-item-container width-100" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
<ion-input placeholder="Assunto*" [(ngModel)]="postData.DispatchFolder.Subject"></ion-input>
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Assunto*" [(ngModel)]="postData.DispatchFolder.Subject"></ion-input>
</div>
<div *ngIf="Form && validateFrom" >
@@ -29,7 +29,7 @@
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
</div>
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('Location')?.invalid && validateFrom || validateField ">
<ion-textarea class="add-border" placeholder="Descrição" [(ngModel)]="postData.DispatchFolder.Message"></ion-textarea>
<ion-textarea autocomplete="on" autocorrect="on" spellcheck="true" class="add-border" placeholder="Descrição" [(ngModel)]="postData.DispatchFolder.Message"></ion-textarea>
</div>
</div>
</div>
@@ -13,7 +13,7 @@
</ion-segment-button>
</ion-segment>
</div> -->
</div>
</ion-header>
@@ -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 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>
@@ -113,7 +113,7 @@
</div>
</div>
</ion-content>
@@ -5,7 +5,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>
@@ -14,12 +14,12 @@
<ion-label>Evento</ion-label>
</ion-segment-button>
</ion-segment>
</div>
</div> -->
</div>
<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">
@@ -33,7 +33,7 @@
class="d-block d-md-none"
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}}"
max="2025">
@@ -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"
min="{{minDate}}"
max="2025">
@@ -106,7 +106,7 @@
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
</div>
<div class="ion-textarea-class">
<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>
@@ -80,7 +80,7 @@ export class NewActionPage implements OnInit {
}
ngOnInit() {
this.segment = "Viagem";
this.segment = "Evento";
this.setDefaultTime()
}
@@ -9,7 +9,7 @@
<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>
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="pub.Title" name="title" ngDefaultControl placeholder="Título" ></ion-input>
</div>
<div *ngIf="publicationType!='1'" class="container-div">
@@ -18,7 +18,7 @@
<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>
<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>
@@ -151,7 +151,7 @@ export class NewPublicationPage implements OnInit {
});
async laodPicture() {
/* async laodPicture() {
const capturedImage = await Camera.getPhoto({
resultType: CameraResultType.Uri,
source: CameraSource.Photos,
@@ -170,9 +170,9 @@ export class NewPublicationPage implements OnInit {
this.capturedImage = await this.convertBlobToBase64(blob);
this.capturedImageTitle = new Date().getTime() + '.jpeg';
}
} */
/* laodPicture() {
laodPicture() {
const input = this.fileLoaderService.createInput({
accept: ['image/apng', 'image/jpeg', 'image/png']
})
@@ -187,7 +187,7 @@ export class NewPublicationPage implements OnInit {
console.log(this.capturedImage)
};
} */
}
@@ -40,7 +40,7 @@
<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"
<!-- <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"
@@ -72,7 +72,7 @@
</button>
</ion-item-option>
</ion-item-options>
</ion-item-sliding>
</ion-item-sliding> -->
<ion-item-sliding disabled="{{showSlidingOptions}}" class="width-100"
*ngFor="let evento of publicationsEventFolderList">
<ion-item lines="none"
@@ -113,7 +113,7 @@
<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>
<ion-icon slot="end" src='assets/icon/icons-actions-grey.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>
@@ -124,7 +124,7 @@
<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>
<ion-icon slot="end" src='assets/icon/icons-actions-grey.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>
@@ -135,7 +135,7 @@
<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>
<ion-icon slot="end" src='assets/icon/icons-actions-grey.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>
@@ -146,7 +146,7 @@
<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>
<ion-icon slot="end" src='assets/icon/icons-actions-grey.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>
+79 -22
View File
@@ -6,6 +6,8 @@ import { showDateDuration } from 'src/plugin/showDateDuration'
import { ToastsService } from '../toast.service';
import { chatHistory, ChatMessage } from 'src/app/models/chatMethod'
import { Storage } from '@ionic/storage';
import { Platform } from '@ionic/angular';
import { SqliteService } from 'src/app/services/sqlite.service';
@Injectable({
providedIn: 'root'
})
@@ -33,6 +35,8 @@ export class RoomService {
public WsChatService: WsChatService,
private MessageService: MessageService,
private storage: Storage,
private platform: Platform,
private sqlservice: SqliteService,
) { }
setData({ customFields, id, name, t, lastMessage, _updatedAt }) {
@@ -85,10 +89,55 @@ export class RoomService {
this.WsChatService.send(this.id, msg)
}
getMsgFromDBMobile() {
console.log('ALL MSG DBBB', this.id)
this.sqlservice.getAllChatMSG(this.id).then((msg: any = []) => {
let ad = [];
ad = msg
console.log('ALL MSG DBBB', ad.length)
msg.map(element => {
console.log('CHANNEL ELEMENT', element)
let msgChat = {
_id: element.Id,
attachments: this.isJson(element.Attachments),
channels: this.isJson(element.Channels),
file: {
guid: this.isJson(element.File).guid,
image_url: this.isJson(element.image_url),
type: this.isJson(element.File).type
},
mentions: this.isJson(element.Mentions),
msg: element.Msg,
rid: element.Rid,
ts: element.Ts,
u: this.isJson(element.U),
_updatedAt: this.isJson(element.UpdatedAt),
}
let mmessage = this.fix_updatedAt(msgChat)
console.log('FROM DB WEB', mmessage)
const wewMessage = new MessageService()
wewMessage.setData(mmessage)
this.massages.push(wewMessage)
console.log('loadHistory 222', this.massages)
});
});
}
isJson(str) {
try {
JSON.parse(str);
} catch (e) {
return "";
}
return JSON.parse(str);
}
getMsgFromDB() {
this.storage.get('chatmsg' + this.id).then((message) => {
message.forEach(message => {
if (message.file) {
@@ -110,37 +159,45 @@ export class RoomService {
})
}
// runs onces only
loadHistory(limit = 100) {
if (this.hasLoadHistory) { return false }
// ionic store
/* this.WsChatService.loadHistory(this.id, limit).then((chatHistory:chatHistory) => {
console.log('loadHistory', chatHistory)
// websocket
this.WsChatService.loadHistory(this.id, limit).then(async (chatHistory: chatHistory) => {
//await this.transformData(chatHistory.result.messages.reverse());
//console.log('loadHistory 111', chatHistory.result.messages.reverse())
const mgsArray = chatHistory.result.messages.reverse();
await this.storage.remove('chatmsg' + this.id).then(() => {
console.log('MSG REMOVE ON STORAGE')
})
await this.storage.set('chatmsg' + this.id, mgsArray).then((value) => {
console.log('MSG SAVED ON STORAGE', value)
this.getMsgFromDB()
});
/* chatHistory.result.messages.reverse().forEach(message => {
chatHistory.result.messages.reverse().forEach(message => {
message = this.fix_updatedAt(message)
console.log('loadHistory', message)
this.storageMessage.push(message)
const wewMessage = new MessageService()
wewMessage.setData(message)
this.massages.push(wewMessage)
}); */
});
}) */
this.WsChatService.loadHistory(this.id, limit).then(async (chatHistory: chatHistory) => {
const mgsArray = chatHistory.result.messages.reverse();
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
await this.storage.remove('chatmsg' + this.id).then(() => {
console.log('MSG REMOVE ON STORAGE')
})
await this.storage.set('chatmsg' + this.id, mgsArray).then((value) => {
console.log('MSG SAVED ON STORAGE', value)
this.getMsgFromDB()
});
} else {
mgsArray.forEach((element) => {
console.log('SQLITE WEBSOCKET', element)
this.sqlservice.addChatMSG(element)
})
this.getMsgFromDBMobile()
}
})
@@ -6,6 +6,8 @@ import { SessionStore } from 'src/app/store/session.service';
import { capitalizeTxt } from 'src/plugin/text'
import { Rooms, Update as room } from 'src/app/models/chatMethod';
import { Storage } from '@ionic/storage';
import { Platform } from '@ionic/angular';
import { SqliteService } from 'src/app/services/sqlite.service';
@Injectable({
providedIn: 'root'
@@ -24,7 +26,9 @@ export class WsChatMethodsService {
constructor(
private WsChatService: WsChatService,
private storage: Storage
private storage: Storage,
private platform: Platform,
private sqlservice: SqliteService,
) {
(async()=>{
await this.getAllRooms();
@@ -47,7 +51,7 @@ export class WsChatMethodsService {
//console.log(roomData);
room = new RoomService(this.WsChatService, new MessageService(), this.storage)
room = new RoomService(this.WsChatService, new MessageService(), this.storage, this.platform, this.sqlservice)
room.setData({
customFields: roomData.customFields,
id: this.getRoomId(roomData),
@@ -51,13 +51,13 @@
<ion-item>
<ion-label position="stacked">Data Início</ion-label>
<ion-datetime value="{{loadedEvent.StartDate}}" [(ngModel)]="loadedEvent.StartDate" min="2020" max="2100"
displayFormat="D MMM YYYY H:mm" minuteValues="0,15,30,45"
displayFormat="D MMM YYYY H:mm" 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"></ion-datetime>
</ion-item>
<ion-item>
<ion-label position="stacked">Data Fim</ion-label>
<ion-datetime value="{{loadedEvent.EndDate}}" [(ngModel)]="loadedEvent.EndDate" min="2020" max="2100"
displayFormat="D MMM YYYY HH:mm" minuteValues="0,15,30,45"
displayFormat="D MMM YYYY HH:mm" 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"></ion-datetime>
</ion-item>
@@ -53,13 +53,13 @@
<ion-item>
<ion-label position="stacked">Data Início</ion-label>
<ion-datetime value="{{loadedEvent.StartDate}}" [(ngModel)]="loadedEvent.StartDate" min="2020" max="2100"
displayFormat="D MMM YYYY H:mm" minuteValues="0,15,30,45"
displayFormat="D MMM YYYY H:mm" 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"></ion-datetime>
</ion-item>
<ion-item>
<ion-label position="stacked">Data Fim</ion-label>
<ion-datetime value="{{loadedEvent.EndDate}}" [(ngModel)]="loadedEvent.EndDate" min="2020" max="2100"
displayFormat="D MMM YYYY HH:mm" minuteValues="0,15,30,45"
displayFormat="D MMM YYYY HH:mm" 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"></ion-datetime>
</ion-item>
@@ -53,13 +53,13 @@
<ion-item>
<ion-label position="stacked">Data Início</ion-label>
<ion-datetime value="{{loadedEvent.StartDate}}" [(ngModel)]="loadedEvent.StartDate" min="2020" max="2100"
displayFormat="D MMM YYYY H:mm" minuteValues="0,15,30,45"
displayFormat="D MMM YYYY H:mm" 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"></ion-datetime>
</ion-item>
<ion-item>
<ion-label position="stacked">Data Fim</ion-label>
<ion-datetime value="{{loadedEvent.EndDate}}" [(ngModel)]="loadedEvent.EndDate" min="2020" max="2100"
displayFormat="D MMM YYYY HH:mm" minuteValues="0,15,30,45"
displayFormat="D MMM YYYY HH:mm" 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"></ion-datetime>
</ion-item>
+1 -1
View File
@@ -280,7 +280,7 @@ export class SqliteService {
console.log('INSIDE DB CHAT MSG',data,)
this.dbInstance.executeSql(`
INSERT OR IGNORE INTO ${this.chatmsg} (Id,Attachments,Channels,File,Mentions,Msg,Rid, Ts ,U, UpdatedAt)
VALUES ('${data._id}','${JSON.stringify(data.attachments)}','${JSON.stringify(data.channels)}','${JSON.stringify(data.file)}','${JSON.stringify(data.mentions)}','${data.msg}','${data.rid}','${data.ts}','${JSON.stringify(data.u)}','${data._updatedAt}')`, [])
VALUES ('${data._id}','${JSON.stringify(data.attachments)}','${JSON.stringify(data.channels)}','${JSON.stringify(data.file)}','${JSON.stringify(data.mentions)}','${data.msg}','${data.rid}','${data.ts}','${JSON.stringify(data.u)}','${JSON.stringify(data._updatedAt)}')`, [])
.then(() => {
console.log("chat msg add with Success");
@@ -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;
+3
View File
@@ -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);