pull amde

This commit is contained in:
Equilibrium ITO
2024-03-11 11:24:01 +01:00
40 changed files with 449 additions and 324 deletions
+11 -3
View File
@@ -242,7 +242,6 @@
>
<div class="schedule-time" *ngIf="!event.event.IsAllDayEvent">
<div *ngIf="event.startMany && !event.middle" class="time-start labelb">Início</div>
<div *ngIf="event.endMany && !event.middle " class="time-end labelb">Fim</div>
@@ -254,8 +253,17 @@
</div>
<div class="schedule-time" *ngIf="event.event.IsAllDayEvent">
<div class="time-start">Todo </div>
<div class="time-end text-center">o dia</div>
<div *ngIf="event.middle" class="time-start">Todo </div>
<div *ngIf="event.middle" class="time-end text-center">o dia</div>
<div *ngIf="!event.middle && !(event.endMany && !event.middle)" class="time-start">Todo </div>
<div *ngIf="!event.middle && !(event.endMany && !event.middle)" class="time-end text-center">o dia </div>
<div *ngIf="event.endMany && !event.middle" class="time-start">{{event.event.StartDate | date: 'HH:mm'}}</div>
<div *ngIf="event.endMany && !event.middle" class="time-end"> {{event.event.EndDate | date: 'HH:mm'}} </div>
</div>
<div class="schedule-details">
<div class="description">
+13
View File
@@ -32,6 +32,8 @@ import { EventTrigger } from 'src/app/services/eventTrigger.service';
import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service';
import { RouteService } from 'src/app/services/route.service';
import { Plugins } from '@capacitor/core';
import { ChangeDetectorRef } from '@angular/core';
const { App } = Plugins;
@@ -128,6 +130,7 @@ export class ChatPage implements OnInit {
private RochetChatConnectorService: RochetChatConnectorService,
private zone: NgZone,
public RouteService: RouteService,
private ChangeDetectorRef: ChangeDetectorRef
) {
this.headers = new HttpHeaders();;
@@ -175,8 +178,18 @@ export class ChatPage implements OnInit {
}
});
this.ChatSystemService.setMainChangeDetector(()=> {
this.changeDetector()
})
}
changeDetector = () => {
console.log('run detection')
this.ChangeDetectorRef.detectChanges()
}
ngOnDestroy() {
// this.setStatus('offline');
this.routerSubscription?.unsubscribe();
@@ -1,6 +1,6 @@
<ion-header class="ion-no-border">
<ion-toolbar class="header-toolbar">
<div class="main-header">
<div class="main-header" *ngIf="ChatSystemService.getGroupRoom(roomId)">
<div class="header-top">
<!-- <app-btn-modal-dismiss></app-btn-modal-dismiss> -->
<div class="left">
@@ -45,7 +45,7 @@
</ion-header>
<ion-content>
<ion-content *ngIf="ChatSystemService.getGroupRoom(roomId)">
<div (click)="handleClick()" class="messages overflow-y-auto" #scrollMe>
<div class="welcome-text">
@@ -277,7 +277,7 @@
</ion-content>
<ion-footer>
<ion-footer *ngIf="ChatSystemService.getGroupRoom(roomId)">
<div class="typing" *ngIf="ChatSystemService.getGroupRoom(roomId).otherUserType == true">
<ngx-letters-avatar *ngIf="showAvatar" [avatarName]="ChatSystemService.getGroupRoom(roomId).name" [width]="30"
@@ -36,7 +36,6 @@ import { FileValidatorService } from "src/app/services/file/file-validator.servi
import { sanitize } from "sanitize-filename-ts";
import { FilePicker } from '@capawesome/capacitor-file-picker';
@Component({
selector: 'app-group-messages',
templateUrl: './group-messages.page.html',
@@ -109,7 +108,8 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
private file: File,
private fileOpener: FileOpener,
public RouteService: RouteService,
private FileValidatorService: FileValidatorService
private FileValidatorService: FileValidatorService,
private ChangeDetectorRef: ChangeDetectorRef
) {
this.ChatSystemService.getUser()
@@ -138,6 +138,8 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
open() {
try {
this.ChatSystemService.getGroupRoom(this.roomId).loadHistory({});
@@ -145,6 +147,9 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.ChatSystemService.openRoom(this.roomId)
this.groupNameFormart = this.ChatSystemService.getGroupRoom(this.roomId).name.split('-').join(' ')
this.ChatSystemService.getGroupRoom(this.roomId).setChangeDetector(()=> {
this.changeDetector()
})
} catch (error) {
setTimeout(() => {
this.open()
@@ -152,6 +157,12 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
}
changeDetector = () => {
console.log('run detection page')
this.ChangeDetectorRef.detectChanges()
}
ngOnInit() {
this.loggedUser = this.loggedUserChat;
+11 -2
View File
@@ -36,6 +36,7 @@ import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-co
import { FileValidatorService } from "src/app/services/file/file-validator.service"
import { sanitize } from "sanitize-filename-ts";
import { FilePicker } from '@capawesome/capacitor-file-picker';
import { ChangeDetectorRef } from '@angular/core';
@@ -122,7 +123,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
private fileOpener: FileOpener,
private router: Router,
public RochetChatConnectorService: RochetChatConnectorService,
private FileValidatorService: FileValidatorService
private FileValidatorService: FileValidatorService,
private ChangeDetectorRef: ChangeDetectorRef
) {
try {
@@ -141,6 +143,10 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.ChatSystemService.getDmRoom(this.roomId).loadHistory({})
this.ChatSystemService.getDmRoom(this.roomId).scrollDown = this.scrollToBottomClicked
this.ChatSystemService.openRoom(this.roomId)
this.ChatSystemService.getDmRoom(this.roomId).setChangeDetector(()=> {
this.changeDetector()
})
setTimeout(() => {
this.scrollToBottomClicked()
@@ -148,8 +154,11 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
} catch (error) {
//alert(error)
}
}
changeDetector = () => {
console.log('run detection page')
this.ChangeDetectorRef.detectChanges()
}
ngOnInit() {
@@ -95,7 +95,7 @@
</div>
<div class="exp-middle-detail">
<div class="exp-workflow">
<span class="label">{{task.activityInstanceName}}</span>
<span class="label">{{task.WorkflowName}}</span>
</div>
<div class="exp-date">
<ion-label>{{ task.taskStartDate || task.TaskStartDate | date: 'dd-MM-yyyy HH:mm' }}</ion-label>
@@ -99,7 +99,7 @@
</div>
<div class="exp-middle-detail">
<div class="exp-workflow">
<span class="label">{{task.activityInstanceName}}</span>
<span class="label">{{task.WorkflowName}}</span>
</div>
<div class="exp-date">
<ion-label>{{ task.taskStartDate || task.TaskStartDate | date: 'dd-MM-yyyy HH:mm' }}</ion-label>
@@ -87,7 +87,7 @@
</div>
<div class="exp-middle-detail">
<div class="exp-workflow">
<span class="label">{{task.activityInstanceName}}</span>
<span class="label">{{task.WorkflowName}}</span>
</div>
<div class="exp-date">
<ion-label>{{ task.taskStartDate || task.TaskStartDate | date: 'dd-MM-yyyy HH:mm' }}</ion-label>
@@ -165,7 +165,7 @@
</div>
<div class="exp-middle-detail">
<div class="exp-workflow">
<span class="label">{{task.activityInstanceName}}</span>
<span class="label">{{task.WorkflowName}}</span>
</div>
<div class="exp-date">
<ion-label>{{ task.taskStartDate || task.TaskStartDate | date: 'dd-MM-yyyy HH:mm' }}</ion-label>
@@ -55,7 +55,7 @@
</div>
<div class="exp-middle-detail">
<div class="exp-workflow">
<span class="label">{{task.activityInstanceName}}</span>
<span class="label">{{task.WorkflowName}}</span>
</div>
<div class="exp-date">
<ion-label>{{ task.taskStartDate || task.TaskStartDate | date: 'dd-MM-yyyy HH:mm' }}</ion-label>
@@ -125,7 +125,7 @@
</div>
<div class="exp-middle-detail">
<div class="exp-workflow">
<span class="label">{{task.activityInstanceName}}</span>
<span class="label">{{task.WorkflowName}}</span>
</div>
<div class="exp-date">
<ion-label>{{ task.taskStartDate || task.TaskStartDate | date: 'dd-MM-yyyy HH:mm' }}</ion-label>
@@ -102,7 +102,7 @@
</div>
<div class="exp-middle-detail">
<div class="exp-workflow">
<span class="label">{{task.activityInstanceName}}</span>
<span class="label">{{task.WorkflowName}}</span>
</div>
<div class="exp-date">
<ion-label>{{ task.taskStartDate || task.TaskStartDate | date: 'dd-MM-yyyy HH:mm' }}</ion-label>
@@ -209,7 +209,7 @@
</div>
<div class="item-bottom-detail d-flex align-items-center">
<div class="item-workflow">
<span class="label">{{task.activityInstanceName}}</span>
<span class="label">{{task.WorkflowName}}</span>
</div>
<div class="item-date">
<ion-label>{{ task.taskStartDate || task.TaskStartDate | date: 'dd-MM-yyyy HH:mm'
@@ -647,7 +647,7 @@
TaskService.pedidosstore.listParecerCount.length}} correspondência nova</span>
</p>
<p *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" class="text-center exp-card-title ">
Pedidos de Parecer solicitados por mim <br>
Parecer solicitados por mim <br>
<span class="new-task-count" *ngIf="TaskService.pedidosstore.listParecerCount.length >=2">{{
TaskService.pedidosstore.listParecerCount.length}} correspondências novas</span>
<span class="new-task-count" *ngIf="TaskService.pedidosstore.listParecerCount.length ==1">{{
@@ -121,7 +121,7 @@
</div>
<div class="exp-middle-detail">
<div class="exp-workflow">
<span class="label">{{task.activityInstanceName}}</span>
<span class="label">{{task.WorkflowName}}</span>
</div>
<div class="exp-date">
<ion-label>{{ task.taskStartDate || task.TaskStartDate | date: 'dd-MM-yyyy HH:mm' }}</ion-label>
@@ -160,7 +160,7 @@
</div>
<div class="exp-middle-detail">
<div class="exp-workflow">
<span class="label">{{task.activityInstanceName}}</span>
<span class="label">{{task.WorkflowName}}</span>
</div>
<div class="exp-date">
<ion-label>{{ task.taskStartDate || task.TaskStartDate | date: 'dd-MM-yyyy HH:mm' }}</ion-label>
+12 -4
View File
@@ -144,9 +144,18 @@ export class LoginPage implements OnInit {
if (attempt.ChatData) {
await this.authService.loginToChatWs();
this.ChatService.setheader()
this.ChatSystemService.loadChat();
try {
await MessageModel.deleteAll();
await DeleteMessageModel.deleteAll();
this.ChatSystemService.clearChat();
this.NotificationHolderService.clear()
await this.authService.loginToChatWs();
this.ChatService.setheader()
} catch(error) {
console.log("faild to clear chat")
}
}
@@ -181,7 +190,6 @@ export class LoginPage implements OnInit {
if (attempt.ChatData) {
await this.authService.loginToChatWs();
this.ChatService.setheader();
this.ChatSystemService.loadChat();
}
this.storageService.remove("Notifications")
this.getToken();
@@ -40,7 +40,7 @@
<ion-img *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'image'" [(ngModel)]="capturedImage"
name="image" ngDefaultControl [src]="'data:image/jpg;base64,' + seleted.FileBase64"
name="image" ngDefaultControl [src]="seleted.FileBase64"
(click)="imageSize(capturedImage)" style="height: 69px;"></ion-img>
<video *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'video'" width="70" height="70"
@@ -758,7 +758,7 @@ console.log(stringGerada);
this.shareContentAndroid(resultUrl,FileExtension)
}
/*
/*
Filesystem.readFile({ path: resultUrl }).then(async (content) => {
let fileObject;
try {
@@ -809,7 +809,7 @@ console.log(stringGerada);
} else {
window["sharedContent"] = null
}
}
async recordevideoIos(fullPath) {
@@ -854,7 +854,7 @@ console.log(stringGerada);
.catch((erro) => console.error('read converted video erro ', erro));
});
} catch (error) {
console.log('record video ios erro, ', error)
}
@@ -906,7 +906,7 @@ console.log(stringGerada);
}
} else {
fileObject = {
FileBase64: content.data,
FileBase64: 'data:image/jpeg;base64,' + content.data,
FileExtension: this.removeTextBeforeSlash(element.mimeType, '/'),
OriginalFileName: 'image'
}
@@ -915,18 +915,18 @@ console.log(stringGerada);
this.seletedContent.push(fileObject)
})
.catch((err) => console.error(err));
}
gerarStringAleatoria() {
const caracteres = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
let stringAleatoria = '';
for (let i = 0; i < 4; i++) {
const indiceAleatorio = Math.floor(Math.random() * caracteres.length);
stringAleatoria += caracteres.charAt(indiceAleatorio);
}
return stringAleatoria;
}
@@ -944,23 +944,23 @@ console.log(stringGerada);
OriginalFileName: 'shared',
}
console.log('shared base', content.data)
this.seletedContent.push(fileObject)
} catch (error) {
console.log('error shared filesystem', error)
}
})
} else if (this.checkFileType.checkFileType(FileExtension) == 'video') {
const directory = await Filesystem.getUri({
directory: Directory.Cache,
path: '',
});
let fileObject ={};
this.videoconvertService.convertVideo(fullPath,directory.uri,filename,'mp4').then(() => {
Filesystem.readFile({ path: `${directory.uri}output.mp4`})
.then(async (content) => {
console.log(content.data)
this.filecontent = true;
@@ -991,8 +991,8 @@ console.log(stringGerada);
});
}
} catch (error) {
console.log('record video ios erro, ', error)
}
@@ -1005,7 +1005,7 @@ console.log(stringGerada);
try {
if (this.checkFileType.checkFileType(FileExtension) == 'image') {
fileObject = {
FileBase64: this.removeTextBeforeSlash(content.data, ','),
FileBase64: 'data:image/jpeg;base64,' +this.removeTextBeforeSlash(content.data, ','),
FileExtension: FileExtension,
OriginalFileName: 'shared',
}
@@ -20,6 +20,7 @@ import { PublicationVideoManagerService } from "src/app/services/publication/pub
import { StopvideoService } from "src/app/services/stopvideo.service"
import { Result } from 'neverthrow';
import { App } from '@capacitor/app';
import { ActiveTabService } from 'src/app/services/active-tab.service';
@Component({
selector: 'app-view-publications',
templateUrl: './view-publications.page.html',
@@ -69,7 +70,8 @@ export class ViewPublicationsPage implements OnInit {
public checkFileType: checkFileTypeService,
private publicationVideoManagerService: PublicationVideoManagerService,
public stopvideoService: StopvideoService,
private platform: Platform,) {
private platform: Platform,
public activeTabService: ActiveTabService) {
/* this.publicationVideoManagerService.setContainer(this.VideoManager.nativeElement) */
@@ -118,6 +120,13 @@ export class ViewPublicationsPage implements OnInit {
})
// console.log(this.publicationFolderService.publicationList[this.folderId])
setTimeout(()=> {
this.doRefresh({})
}, 1500)
}