mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
some changes
This commit is contained in:
Generated
+6
-7
@@ -13029,10 +13029,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/core-js": {
|
||||
"version": "3.18.1",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.18.1.tgz",
|
||||
"integrity": "sha512-vJlUi/7YdlCZeL6fXvWNaLUPh/id12WXj3MbkMw5uOyF0PfWPBNOCNbs53YqgrvtujLNlt9JQpruyIKkUZ+PKA==",
|
||||
"deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.",
|
||||
"version": "3.33.2",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.33.2.tgz",
|
||||
"integrity": "sha512-XeBzWI6QL3nJQiHmdzbAOiMYqjrb7hwU7A39Qhvd/POSa/t9E1AeZyEZx3fNvp/vtM8zXwhoL0FsiS0hD0pruQ==",
|
||||
"hasInstallScript": true,
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
@@ -53635,9 +53634,9 @@
|
||||
"integrity": "sha512-dTBxYaX/RGzH6+pp49o4sb3FuHCvhrssaKn1XMJ4LL3f9dnvz3rhFK2LdcWrdFkhOLOndnW/azUkbzZd+WWhRA=="
|
||||
},
|
||||
"core-js": {
|
||||
"version": "3.18.1",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.18.1.tgz",
|
||||
"integrity": "sha512-vJlUi/7YdlCZeL6fXvWNaLUPh/id12WXj3MbkMw5uOyF0PfWPBNOCNbs53YqgrvtujLNlt9JQpruyIKkUZ+PKA=="
|
||||
"version": "3.33.2",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.33.2.tgz",
|
||||
"integrity": "sha512-XeBzWI6QL3nJQiHmdzbAOiMYqjrb7hwU7A39Qhvd/POSa/t9E1AeZyEZx3fNvp/vtM8zXwhoL0FsiS0hD0pruQ=="
|
||||
},
|
||||
"core-js-compat": {
|
||||
"version": "3.26.1",
|
||||
|
||||
@@ -420,7 +420,7 @@ export class CreateProcessPage implements OnInit {
|
||||
AttachmentList: docs
|
||||
}
|
||||
|
||||
if (this.postData.DispatchFolder.Message) {
|
||||
/* if (this.postData.DispatchFolder.Message) { */
|
||||
try {
|
||||
await this.despachoService.createDespacho(this.postData).toPromise();
|
||||
await this.despachoService.CompleteTask({ serialNumber: this.task.serialNumber, note: this.dispatchFolder.Message }).toPromise();
|
||||
@@ -432,11 +432,11 @@ export class CreateProcessPage implements OnInit {
|
||||
} finally {
|
||||
loader.remove();
|
||||
}
|
||||
}
|
||||
/* }
|
||||
else {
|
||||
this.validateField = true;
|
||||
this.toastService._badRequest('Por favor adicione uma descrição');
|
||||
}
|
||||
} */
|
||||
loader.remove();
|
||||
break;
|
||||
case '1': // Pedido de Parecer
|
||||
|
||||
+3
-3
@@ -461,7 +461,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
if(this.postData.DispatchFolder.Message){
|
||||
/* if(this.postData.DispatchFolder.Message){ */
|
||||
try {
|
||||
this.taskResult = await this.despachoService.createDespacho(this.postData).toPromise();
|
||||
await this.httpErroHandle.httpsSucessMessagge('Efetuar Despacho')
|
||||
@@ -471,11 +471,11 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
} finally {
|
||||
//loader.remove()
|
||||
}
|
||||
}
|
||||
/* }
|
||||
else{
|
||||
this.validateField = true;
|
||||
this.toastService._badRequest('Por favor adicione uma descrição');
|
||||
}
|
||||
} */
|
||||
loader.remove();
|
||||
break;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="capturedImage != '' " class="ion-item-container-no-border mb-20">
|
||||
<div *ngIf="filecontent" class="ion-item-container-no-border mb-20">
|
||||
<ion-label class="attached-title pb-10">Fotografia Anexada</ion-label>
|
||||
|
||||
<div class="d-flex justify-content-between">
|
||||
@@ -36,8 +36,8 @@
|
||||
|
||||
<ion-img *ngIf="fileType == 'image/jpeg'" [(ngModel)]="capturedImage" name="image" ngDefaultControl [src]="capturedImage" (click)="imageSize(capturedImage)" ></ion-img>
|
||||
|
||||
<video *ngIf="fileType == 'video/mp4'" controls>
|
||||
<source type="video/mp4" src="{{capturedVideo}}">
|
||||
<video *ngIf="fileType == 'video/mp4'" height="80px" width="80px" playsinline controls preload="auto">
|
||||
<source src="{{capturedVideo}}" type="video/mp4" >
|
||||
</video>
|
||||
|
||||
</ion-thumbnail>
|
||||
|
||||
@@ -16,7 +16,7 @@ import { formatDate } from 'src/plugin/momentG.js'
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
import { Camera, CameraResultType, CameraSource, Photo } from '@capacitor/camera';
|
||||
|
||||
import { Filesystem, Directory } from '@capacitor/filesystem';
|
||||
import { Filesystem, Directory, Encoding } from '@capacitor/filesystem';
|
||||
import { NgxImageCompressService } from "ngx-image-compress";
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { PublicationFolderService } from 'src/app/store/publication-folder.service';
|
||||
@@ -27,6 +27,7 @@ import { FilePicker } from '@capawesome/capacitor-file-picker';
|
||||
import { CapacitorVideoPlayer } from 'capacitor-video-player';
|
||||
import { VideoRecorder, VideoRecorderCamera, VideoRecorderPreviewFrame } from '@teamhive/capacitor-video-recorder';
|
||||
import { CaptureImageOptions, MediaCapture } from '@awesome-cordova-plugins/media-capture/ngx';
|
||||
import { Capacitor } from '@capacitor/core';
|
||||
|
||||
const config = {
|
||||
quality: 0.5,
|
||||
@@ -108,6 +109,7 @@ export class NewPublicationPage implements OnInit {
|
||||
video: any;
|
||||
photoOrVideo: boolean = false;
|
||||
fileType = "";
|
||||
filecontent: boolean;
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -172,6 +174,7 @@ export class NewPublicationPage implements OnInit {
|
||||
0.9 // quality
|
||||
).then((picture) => {
|
||||
console.log('taked: ', picture)
|
||||
this.filecontent = true;
|
||||
this.capturedImage = picture
|
||||
this.photoOrVideo = false;
|
||||
|
||||
@@ -207,15 +210,27 @@ export class NewPublicationPage implements OnInit {
|
||||
this.video = data[0];
|
||||
console.log(this.video)
|
||||
this.fileType = "video/mp4"
|
||||
let resultUrl = decodeURIComponent(data[0].localURL);
|
||||
Filesystem.readFile({ path: resultUrl })
|
||||
await Filesystem.writeFile({
|
||||
path: data[0].name,
|
||||
data: data[0].fullPath,
|
||||
directory: Directory.Data,
|
||||
}).then((dir) => {
|
||||
console.log('DIR ', dir)
|
||||
let resultUrl = decodeURIComponent(dir.uri);
|
||||
Filesystem.readFile({ path: resultUrl, encoding: Encoding.UTF8, })
|
||||
|
||||
.then(async (content) => {
|
||||
console.log(JSON.stringify(content))
|
||||
const base64Data = btoa(content.data);
|
||||
|
||||
console.log(base64Data);
|
||||
/* this.filecontent = true;
|
||||
this.capturedVideo = "data:video/mp4;base64," + content.data;
|
||||
this.photoOrVideo = false; */
|
||||
})
|
||||
.catch((err) => console.error(err));
|
||||
});
|
||||
|
||||
.then(async (content) => {
|
||||
console.log(content)
|
||||
this.capturedVideo = "data:video/mp4;base64," + content.data;
|
||||
this.photoOrVideo = false;
|
||||
})
|
||||
.catch((err) => console.error(err));
|
||||
} catch (error) {
|
||||
console.log('record video error: ', error)
|
||||
}
|
||||
@@ -226,9 +241,9 @@ export class NewPublicationPage implements OnInit {
|
||||
async loadVideo() {
|
||||
|
||||
const result = await FilePicker.pickMedia
|
||||
({
|
||||
multiple: true,
|
||||
});
|
||||
({
|
||||
multiple: true,
|
||||
});
|
||||
let resultUrl = decodeURIComponent(result.files[0].path);
|
||||
this.fileType = result.files[0].mimeType
|
||||
Filesystem.readFile({ path: resultUrl })
|
||||
@@ -236,10 +251,11 @@ export class NewPublicationPage implements OnInit {
|
||||
.then(async (content) => {
|
||||
console.log(result)
|
||||
console.log(content)
|
||||
this.filecontent = true;
|
||||
if (this.fileType == "video/mp4") {
|
||||
this.capturedVideo = "data:video/mp4;base64," +content.data;
|
||||
this.capturedVideo = "data:video/mp4;base64," + content.data;
|
||||
} else if (this.fileType == "image/jpg") {
|
||||
this.capturedVideo = "data:image/jpg;base64," +content.data;
|
||||
this.capturedVideo = "data:image/jpg;base64," + content.data;
|
||||
}
|
||||
})
|
||||
.catch((err) => console.error(err));
|
||||
|
||||
@@ -3,18 +3,27 @@
|
||||
<div class="main-header viewport-font-size">
|
||||
<div class="title-content d-flex width-100">
|
||||
<div class="cursor-pointer viewport-font-size" (click)="goBack()">
|
||||
<ion-icon class="font-35-em" *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon class="font-35-em" *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
|
||||
<ion-icon class="font-35-em" *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
<ion-icon class="font-35-em" *ngIf="ThemeService.currentTheme == 'default' " slot="end"
|
||||
src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||
<ion-icon class="font-35-em" *ngIf="ThemeService.currentTheme == 'doneIt' "
|
||||
src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
|
||||
<ion-icon class="font-35-em" *ngIf="ThemeService.currentTheme == 'gov' " slot="end"
|
||||
src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
</div>
|
||||
<div *ngIf="publicationFolderService.FolderDetails[folderId]?.DateBegin != null" class="div-title flex-grow-1">
|
||||
<p class="title font-25-em mb-10-em">{{publicationFolderService.FolderDetails[folderId].Description}}</p>
|
||||
<p class="item-content-date font-13-em" >{{publicationFolderService.FolderDetails[folderId].DateBegin | date: 'dd-MM-yyyy HH:mm'}}</p>
|
||||
<p class="item-content-date font-13-em">{{publicationFolderService.FolderDetails[folderId].DateBegin | date:
|
||||
'dd-MM-yyyy HH:mm'}}</p>
|
||||
</div>
|
||||
<div *ngIf="p.userPermission([p.permissionList.Actions.createPost]) && publicationFolderService.FolderDetails[folderId]" class="cursor-pointer font-35-em" (click)="AddPublication('2',publicationFolderService.FolderDetails[folderId].ProcessId)">
|
||||
<!-- <ion-icon (click)="AddPublication('1',item.ProcessId)" slot="end" src='assets/images/icons-add-photo.svg'></ion-icon> -->
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-add.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-add.svg'></ion-icon>
|
||||
<div
|
||||
*ngIf="p.userPermission([p.permissionList.Actions.createPost]) && publicationFolderService.FolderDetails[folderId]"
|
||||
class="cursor-pointer font-35-em"
|
||||
(click)="AddPublication('2',publicationFolderService.FolderDetails[folderId].ProcessId)">
|
||||
<!-- <ion-icon (click)="AddPublication('1',item.ProcessId)" slot="end" src='assets/images/icons-add-photo.svg'></ion-icon> -->
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end"
|
||||
src='assets/images/icons-add.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end"
|
||||
src='assets/images/theme/gov/icons-add.svg'></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -22,38 +31,42 @@
|
||||
</ion-header>
|
||||
|
||||
<ion-content class="background-white">
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<div class="main-container background-white height-100 overflow-y-auto viewport-font-size">
|
||||
<ion-content *ngIf="publicationFolderService.FolderDetails[folderId]">
|
||||
<div class="main-container background-white height-100 overflow-y-auto viewport-font-size">
|
||||
<ion-content *ngIf="publicationFolderService.FolderDetails[folderId]">
|
||||
|
||||
<p class="px-20 item-content-detail font-14-em">{{publicationFolderService.FolderDetails[folderId].Detail}}</p>
|
||||
<p class="px-20 item-content-detail font-14-em">{{publicationFolderService.FolderDetails[folderId].Detail}}</p>
|
||||
|
||||
<ion-card *ngFor="let publication of publicationFolderService.publicationList[folderId] let i = index">
|
||||
<ion-card-content>
|
||||
<div class="post-img" (click)="goToPublicationDetail(publication.DocumentId, publication.ProcessId)">
|
||||
<img [lazyLoad]="publication.FileBase64">
|
||||
</div>
|
||||
<div class="post-content">
|
||||
<div class="post-title-time">
|
||||
<div class="post-title font-15-em">
|
||||
<ion-label>{{publication.Title}}</ion-label>
|
||||
<ion-card-content>
|
||||
<div class="post-img" >
|
||||
<img *ngIf="publication.FileExtension == 'jpeg'" (click)="goToPublicationDetail(publication.DocumentId, publication.ProcessId)" [lazyLoad]="publication.FileBase64">
|
||||
|
||||
<video *ngIf="publication.FileExtension == 'mp4'" playsinline controls
|
||||
preload="auto">
|
||||
<source [src]="'data:video/mp4;base64,'+publication.FileBase6" type="video/mp4">
|
||||
</video>
|
||||
|
||||
</div>
|
||||
<div class="post-content">
|
||||
<div class="post-title-time">
|
||||
<div class="post-title font-15-em">
|
||||
<ion-label>{{publication.Title}}</ion-label>
|
||||
</div>
|
||||
<div class="post-data font-13-em">{{publication.DatePublication | date: 'dd-MM-yyyy HH:mm'}}</div>
|
||||
</div>
|
||||
<div class="post-description ">
|
||||
<!-- <pre class="text font-14-em">{{publication.Message}}</pre> -->
|
||||
<app-show-more [text]=publication.Message></app-show-more>
|
||||
</div>
|
||||
<div class="post-data font-13-em">{{publication.DatePublication | date: 'dd-MM-yyyy HH:mm'}}</div>
|
||||
</div>
|
||||
<div class="post-description ">
|
||||
<!-- <pre class="text font-14-em">{{publication.Message}}</pre> -->
|
||||
<app-show-more
|
||||
[text]=publication.Message
|
||||
></app-show-more>
|
||||
</div>
|
||||
</div>
|
||||
</ion-card-content>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
</ion-content>
|
||||
|
||||
</div>
|
||||
</ion-content>
|
||||
</ion-content>
|
||||
@@ -89,6 +89,8 @@ export class ViewPublicationsPage implements OnInit {
|
||||
//this.testForkJoin()
|
||||
|
||||
})
|
||||
|
||||
console.log(this.publicationFolderService.publicationList[this.folderId])
|
||||
}
|
||||
|
||||
ngOnChanges() {
|
||||
|
||||
@@ -4,4 +4,4 @@ import { doneITProd } from './suport/doneIt'
|
||||
import { DevDev } from './suport/dev'
|
||||
|
||||
|
||||
export const environment: Environment = DevDev;
|
||||
export const environment: Environment = oaprProd;
|
||||
|
||||
@@ -4,4 +4,4 @@ import { doneITDev } from './suport/doneIt'
|
||||
import { DevDev } from './suport/dev'
|
||||
|
||||
|
||||
export const environment: Environment = DevDev
|
||||
export const environment: Environment = oaprDev
|
||||
Reference in New Issue
Block a user