-
-
+
+
diff --git a/src/app/pages/gabinete-digital/pedidos/pedidos.page.ts b/src/app/pages/gabinete-digital/pedidos/pedidos.page.ts
index d8053e699..ae7ac0da9 100644
--- a/src/app/pages/gabinete-digital/pedidos/pedidos.page.ts
+++ b/src/app/pages/gabinete-digital/pedidos/pedidos.page.ts
@@ -1,5 +1,5 @@
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
-import { ActivatedRoute, NavigationEnd, NavigationExtras, NavigationStart, Router } from '@angular/router';
+import { ActivatedRoute, NavigationStart, Router } from '@angular/router';
import { CalendarComponent } from 'ionic2-calendar';
import { customTask, DailyWorkTask } from '../../../models/dailyworktask.model';
import { ProcessesService } from 'src/app/services/processes.service';
@@ -88,15 +88,15 @@ export class PedidosPage implements OnInit {
// this.LoadList();
} */
- goToPedido(serialNumber:any){
+ goToPedido(serialNumber:any) {
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
}
- notImplemented(){
+ notImplemented() {
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
}
- openExpedientDetailPage(data){
+ openExpedientDetailPage(data) {
console.log(data);
this.openExpedientDetail.emit(data);
}
diff --git a/src/app/pages/publications/new-publication/new-publication.page.html b/src/app/pages/publications/new-publication/new-publication.page.html
index 74e54add6..a361030ee 100644
--- a/src/app/pages/publications/new-publication/new-publication.page.html
+++ b/src/app/pages/publications/new-publication/new-publication.page.html
@@ -42,6 +42,20 @@
-->
+
+
+

+
+
+
{{publication.OriginalFileName}}.{{publication.FileExtension}}
+
75 Kb
+
+
+
+
+
@@ -53,8 +67,8 @@
-
-
+
-
diff --git a/src/app/pages/publications/new-publication/new-publication.page.scss b/src/app/pages/publications/new-publication/new-publication.page.scss
index c4a9f8a30..f4dbabc70 100644
--- a/src/app/pages/publications/new-publication/new-publication.page.scss
+++ b/src/app/pages/publications/new-publication/new-publication.page.scss
@@ -134,4 +134,32 @@ font-size: 25px;
line-height: normal;
letter-spacing: normal;
color: #000;
- }
\ No newline at end of file
+ }
+
+
+
+
+
+
+.picture{
+ .post-img{
+ width: 60px;
+ }
+ .picture-file-name{
+ font-size: 15px;
+ color: #0d89d1;
+ }
+ .size{
+ color: #cecece;
+ font-size: 13px;
+ }
+}
+
+.container-title{
+ font-size: 15px;
+ font-weight: bold;
+}
+.hide-desktop{
+ display: block;
+}
+
diff --git a/src/app/pages/publications/new-publication/new-publication.page.ts b/src/app/pages/publications/new-publication/new-publication.page.ts
index e80885009..aec77b737 100644
--- a/src/app/pages/publications/new-publication/new-publication.page.ts
+++ b/src/app/pages/publications/new-publication/new-publication.page.ts
@@ -15,6 +15,8 @@ import { ToastService } from 'src/app/services/toast.service';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { ThemePalette } from '@angular/material/core';
import { formatDate } from 'src/plugin/momentG.js'
+import { FileLoaderService } from 'src/app/services/file/file-loader.service';
+import { FileToBase64Service } from 'src/app/services/file/file-to-base64.service';
@Component({
selector: 'app-new-publication',
@@ -66,6 +68,8 @@ export class NewPublicationPage implements OnInit {
private publications: PublicationsService,
private camera: Camera,
private toastService: ToastService,
+ private fileLoaderService: FileLoaderService,
+ private fileToBase64Service: FileToBase64Service
) {
this.publicationType = this.navParams.get('publicationType');
@@ -100,6 +104,22 @@ export class NewPublicationPage implements OnInit {
});
}
+
+ laodPicture() {
+ const input = this.fileLoaderService.createInput({
+ accept: ['image/apng', 'image/jpeg', 'image/png']
+ })
+
+ input.onchange = async () => {
+ const file = this.fileLoaderService.getFirstFile(input)
+
+ const imageData = await this.fileToBase64Service.convert(file)
+ this.capturedImage = imageData;
+ this.capturedImageTitle = file.name
+ };
+
+ }
+
getPicture() {
const options: CameraOptions = {
quality: 90,
diff --git a/src/app/pages/publications/view-publications/view-publications.page.ts b/src/app/pages/publications/view-publications/view-publications.page.ts
index 7465e4a73..1888cb060 100644
--- a/src/app/pages/publications/view-publications/view-publications.page.ts
+++ b/src/app/pages/publications/view-publications/view-publications.page.ts
@@ -30,13 +30,13 @@ export class ViewPublicationsPage implements OnInit {
publicationEventFolderStorage = PublicationEventFolderStorage
publicationTravelFolderService = PublicationTravelFolderStore
+ publicationPipe = new PublicationPipe()
+
constructor(
private modalController: ModalController,
private publications: PublicationsService,
private activatedRoute: ActivatedRoute,
- private router: Router,
- private publicationPipe: PublicationPipe )
- {
+ private router: Router) {
this.item = new PublicationFolder();
this.activatedRoute.paramMap.subscribe(params => {
diff --git a/src/app/services/chat.service.ts b/src/app/services/chat.service.ts
index 0107c2930..8d21e8119 100644
--- a/src/app/services/chat.service.ts
+++ b/src/app/services/chat.service.ts
@@ -140,12 +140,20 @@ export class ChatService {
return this.http.get(environment.apiChatUrl+'users.info', opts);
}
+ setUserStatus(body:any){
+ let opts = {
+ headers: this.headers,
+ }
+ return this.http.post(environment.apiChatUrl+'users.setStatus', body, this.options);
+ }
+
removeChatRoom(body:any){
let opts = {
headers: this.headers,
}
return this.http.post(environment.apiChatUrl+'im.close', body, this.options);
}
+
createRoom(body:any){
return this.http.post(environment.apiChatUrl+'im.create', body, this.options);
}
@@ -164,6 +172,7 @@ export class ChatService {
addGroup(body:any){
return this.http.post(environment.apiChatUrl+'groups.create', body, this.options);
}
+
getGroupMembers(roomId:string){
let params = new HttpParams();
let url=environment.apiChatUrl+'groups.members';
diff --git a/src/app/services/file/file-loader.service.spec.ts b/src/app/services/file/file-loader.service.spec.ts
new file mode 100644
index 000000000..b3d2db03e
--- /dev/null
+++ b/src/app/services/file/file-loader.service.spec.ts
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { FileLoaderService } from './file-loader.service';
+
+describe('FileLoaderService', () => {
+ let service: FileLoaderService;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({});
+ service = TestBed.inject(FileLoaderService);
+ });
+
+ it('should be created', () => {
+ expect(service).toBeTruthy();
+ });
+});
diff --git a/src/app/services/file/file-loader.service.ts b/src/app/services/file/file-loader.service.ts
new file mode 100644
index 000000000..ca3a0f897
--- /dev/null
+++ b/src/app/services/file/file-loader.service.ts
@@ -0,0 +1,43 @@
+import { Injectable } from '@angular/core';
+import { FileType } from 'src/app/models/fileType';
+
+
+interface createInput {
+ type?: string
+ accept: typeof FileType[]
+}
+
+@Injectable({
+ providedIn: 'root'
+})
+export class FileLoaderService {
+
+ nice : typeof FileType
+ constructor() { }
+
+
+ createInput(param:createInput): HTMLInputElement {
+
+ let input = document.createElement('input');
+ input.type = param.type || 'file';
+ input.accept = param.accept.join(', ')
+
+
+ // input.onchange = () => {
+ // // you can use this method to get file and perform respective operations
+ // let files = Array.from(input.files);
+ // console.log(files);
+ // };
+
+ input.click();
+
+ return input
+
+ }
+
+ getFirstFile(input: HTMLInputElement) {
+ let files = Array.from(input.files);
+ return files[0]
+ }
+
+}
diff --git a/src/app/services/file/file-to-base64.service.spec.ts b/src/app/services/file/file-to-base64.service.spec.ts
new file mode 100644
index 000000000..727e8e7c8
--- /dev/null
+++ b/src/app/services/file/file-to-base64.service.spec.ts
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { FileToBase64Service } from './file-to-base64.service';
+
+describe('FileToBase64Service', () => {
+ let service: FileToBase64Service;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({});
+ service = TestBed.inject(FileToBase64Service);
+ });
+
+ it('should be created', () => {
+ expect(service).toBeTruthy();
+ });
+});
diff --git a/src/app/services/file/file-to-base64.service.ts b/src/app/services/file/file-to-base64.service.ts
new file mode 100644
index 000000000..53d7675b6
--- /dev/null
+++ b/src/app/services/file/file-to-base64.service.ts
@@ -0,0 +1,19 @@
+import { Injectable } from '@angular/core';
+
+@Injectable({
+ providedIn: 'root'
+})
+export class FileToBase64Service {
+
+ constructor() { }
+
+ convert(file) {
+ return new Promise((resolve, reject) => {
+ const reader = new FileReader();
+ reader.readAsDataURL(file);
+ reader.onload = () => resolve(reader.result);
+ reader.onerror = error => reject(error);
+ });
+
+ }
+}
diff --git a/src/app/services/rules/publication.service.spec.ts b/src/app/services/rules/publication.service.spec.ts
new file mode 100644
index 000000000..3d3effb95
--- /dev/null
+++ b/src/app/services/rules/publication.service.spec.ts
@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { PublicationService } from './publication.service';
+
+describe('PublicationService', () => {
+ let service: PublicationService;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({});
+ service = TestBed.inject(PublicationService);
+ });
+
+ it('should be created', () => {
+ expect(service).toBeTruthy();
+ });
+});
diff --git a/src/app/services/rules/publication.service.ts b/src/app/services/rules/publication.service.ts
new file mode 100644
index 000000000..0470a7dfa
--- /dev/null
+++ b/src/app/services/rules/publication.service.ts
@@ -0,0 +1,9 @@
+import { Injectable } from '@angular/core';
+
+@Injectable({
+ providedIn: 'root'
+})
+export class PublicationService {
+
+ constructor() { }
+}
diff --git a/src/app/services/socket/synchro.service.ts b/src/app/services/socket/synchro.service.ts
index efc75daf3..3d9d261eb 100644
--- a/src/app/services/socket/synchro.service.ts
+++ b/src/app/services/socket/synchro.service.ts
@@ -24,9 +24,14 @@ export class SynchroService {
public conected = false
private url: string = ''
callback = function(){}
+ private _connected = false;
constructor(){}
+ get connected() {
+ return this._connected
+ }
+
setUrl() {
let header ={
@@ -61,6 +66,7 @@ export class SynchroService {
document.body.style.setProperty(`--color4`, "#0782c9f0");
document.body.style.setProperty(`--color5`, "#45BAFF");
console.log('open ======================= welcome to socket server')
+ this._connected = true
}
@@ -95,7 +101,9 @@ export class SynchroService {
document.body.style.setProperty(`--color3`, "#ffb703");
document.body.style.setProperty(`--color4`, "#ffb703");
document.body.style.setProperty(`--color5`, "#ffb703");
+ this._connected = false
this.connect()
+
}
}, 100);
}
diff --git a/src/app/shared/chat/group-messages/group-messages.page.html b/src/app/shared/chat/group-messages/group-messages.page.html
index 7aa32ec80..3db44986d 100644
--- a/src/app/shared/chat/group-messages/group-messages.page.html
+++ b/src/app/shared/chat/group-messages/group-messages.page.html
@@ -38,7 +38,7 @@
Esta conversa passou a grupo
A conversa original mantêm-se como chat individual
-