mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
fix actions and draft data object
This commit is contained in:
@@ -155,4 +155,28 @@ export class MiddlewareServiceService {
|
||||
|
||||
return this.http.post<IuploadFileLK>(`${geturl}`, formData, options)
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
CMAPIFileContent({length, path, index, blobFile}) {
|
||||
const headers = new HttpHeaders();
|
||||
headers.set('Authorization', 'Bearer ' + SessionStore.user.Authorization);
|
||||
|
||||
//const geturl = environment.apiURL + 'Tasks/DelegateTask';
|
||||
const geturl = environment.apiURL + 'ObjectServer/UploadFiles';
|
||||
|
||||
let options = {
|
||||
headers: headers
|
||||
};
|
||||
|
||||
|
||||
const formData = new FormData();
|
||||
|
||||
formData.append("blobFile", blobFile);
|
||||
formData.append("length", length);
|
||||
formData.append("index", index.toString());
|
||||
formData.append("path", path);
|
||||
|
||||
return this.http.post<IuploadFileLK>(`${geturl}`, formData, options)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Component, OnInit, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
|
||||
import { NavigationEnd, Router } from '@angular/router';
|
||||
import { LoginUserRespose } from 'src/app/models/user.model';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
import { TaskService } from 'src/app/services/task.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-all-processes',
|
||||
@@ -17,7 +17,7 @@ export class AllProcessesPage implements OnInit {
|
||||
hideSearchBtn: boolean = false;
|
||||
showSearch = false;
|
||||
searchSubject: string = '';
|
||||
|
||||
|
||||
filterName: 'Para hoje' | 'Novos'| 'Lidos'| 'Não lidos'| 'OverdueTasks' | 'Todos' = 'Todos'
|
||||
|
||||
/* miniSearch = new MiniSearch({
|
||||
@@ -28,7 +28,7 @@ export class AllProcessesPage implements OnInit {
|
||||
AllProcess = []
|
||||
ordinance: string = 'old'
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @description Update List subcription
|
||||
*/
|
||||
@@ -55,7 +55,7 @@ export class AllProcessesPage implements OnInit {
|
||||
funx:() => {
|
||||
|
||||
this.dynamicSearch()
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
@@ -103,13 +103,13 @@ export class AllProcessesPage implements OnInit {
|
||||
this.ordinance = orderBy;
|
||||
this.cdr.markForCheck()
|
||||
|
||||
this.dynamicSearch();
|
||||
this.dynamicSearch();
|
||||
}
|
||||
|
||||
|
||||
async dynamicSearch() {
|
||||
|
||||
if(this.showSearch && this.searchSubject) {
|
||||
|
||||
|
||||
const AllProcess = this.TaskService.AllProcess.filter((task) => {
|
||||
let subject = task.Folio || task.Subject || task.workflowInstanceDataFields.Subject
|
||||
subject = subject.toLowerCase();
|
||||
@@ -137,7 +137,7 @@ export class AllProcessesPage implements OnInit {
|
||||
}
|
||||
|
||||
this.cdr.markForCheck()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
goToProcess(serialNumber: string, workflowName: string, activityName: string) {
|
||||
|
||||
@@ -15,11 +15,11 @@ export class TaskDetailsPage implements OnInit {
|
||||
@Input() customDate = ''
|
||||
@Input() mergedArray = []
|
||||
@Input() fulltask = new fullTask()
|
||||
|
||||
|
||||
@Output() openOptions = new EventEmitter<any>();
|
||||
@Output() goBack = new EventEmitter<any>();
|
||||
@Output() viewDocument = new EventEmitter<any>();
|
||||
|
||||
|
||||
constructor(
|
||||
public ThemeService: ThemeService
|
||||
) { }
|
||||
|
||||
@@ -40,40 +40,45 @@
|
||||
|
||||
|
||||
<!-- Captured -->
|
||||
<div class="ion-item-container-no-border" *ngIf="seletedContent.length > 0">
|
||||
<ion-label class="attached-title pb-10">Fotografia Anexada</ion-label>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div *ngIf="seletedContent.length > 0">
|
||||
<ion-label class="attached-title pb-10">Anexos</ion-label>
|
||||
<div>
|
||||
<div class="d-flex">
|
||||
|
||||
<ion-thumbnail *ngFor="let seleted of seletedContent.slice(0, displayLimit), let i = index" (click)="deleteFromSeletedContent(i)" lot="start">
|
||||
<div *ngFor="let seleted of seletedContent.slice(0, displayLimit), let i = index" lot="start" class="mr-10">
|
||||
|
||||
<div>
|
||||
<ion-img *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'image'"
|
||||
name="image" ngDefaultControl [src]="seleted.FileBase64" style="width: 50px;"></ion-img>
|
||||
|
||||
<ion-img *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'image'"
|
||||
name="image" ngDefaultControl [src]="seleted.FileBase64"></ion-img>
|
||||
<video *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'video'" width="70" height="70"
|
||||
preload="metadata" webkit-playsinline="webkit-playsinline">
|
||||
<source type="video/mp4" [src]="seleted.FileBase64">
|
||||
</video>
|
||||
|
||||
<video *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'video'" width="70" height="70"
|
||||
preload="metadata" webkit-playsinline="webkit-playsinline">
|
||||
<source type="video/mp4" [src]="seleted.FileBase64">
|
||||
</video>
|
||||
<div class="text-center cursor-pointer" (click)="deleteFromSeletedContent(i)">
|
||||
<ion-icon src="assets/images/theme/gov/icons-delete.svg" class="delete md hydrated"></ion-icon>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</ion-thumbnail>
|
||||
</div>
|
||||
<!-- Display the blurred image and count if there are more images -->
|
||||
<ion-thumbnail *ngIf="seletedContent.length > displayLimit" lot="start">
|
||||
<div *ngIf="seletedContent.length > displayLimit" lot="start">
|
||||
<ion-img [src]="'data:image/jpg;base64,' + seletedContent[displayLimit - 1].FileBase64"
|
||||
style="filter: blur(5px);"></ion-img>
|
||||
|
||||
<p>mais {{ seletedContent.length - displayLimit }}</p>
|
||||
</ion-thumbnail>
|
||||
</div>
|
||||
|
||||
<ion-label class="pl-10">
|
||||
<p>{{capturedImageTitle}}</p>
|
||||
<p hidden>size</p>
|
||||
</ion-label>
|
||||
</div>
|
||||
<button class="btn-no-color" (click)="clear()">
|
||||
<!-- <button class="btn-no-color" (click)="clear()">
|
||||
<ion-icon name="close"></ion-icon>
|
||||
</button>
|
||||
</button> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -102,7 +107,7 @@
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="ion-item-container-no-border hide-desktop">
|
||||
<div class="hide-desktop">
|
||||
<ion-label (click)="loadVideo()">
|
||||
<div class="attach-icon">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-add-photo.svg"></ion-icon>
|
||||
@@ -115,7 +120,7 @@
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<div class="ion-item-container-no-border">
|
||||
<div >
|
||||
<ion-label (click)="loadVideo()" class="cursor-pointer">
|
||||
<div class="attach-icon">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-add-photos.svg"></ion-icon>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -58,6 +58,10 @@
|
||||
</div>
|
||||
</swiper-slide>
|
||||
|
||||
<!-- <div *ngIf="publication?.Files?.length == 0">
|
||||
12
|
||||
</div>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<div class="swiper-button-next"
|
||||
|
||||
@@ -195,16 +195,17 @@
|
||||
.post-content{
|
||||
margin: 0 auto;
|
||||
margin-bottom: 35px;
|
||||
min-width: 468px;
|
||||
}
|
||||
.post-title-time{
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
.post-title{
|
||||
width: 60%;
|
||||
float: left;
|
||||
font-size: rem(15);
|
||||
color: var(--title-text-color);
|
||||
width: 60%;
|
||||
float: left;
|
||||
font-size: rem(15);
|
||||
color: #0d89d1;
|
||||
}
|
||||
.post-data{
|
||||
width: 40%;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { CMAPIService } from './cmapi.service';
|
||||
|
||||
describe('CMAPIService', () => {
|
||||
let service: CMAPIService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(CMAPIService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { MiddlewareServiceService } from "src/app/shared/API/middleware/middleware-service.service";
|
||||
import { ok, err } from 'neverthrow';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class CMAPIService {
|
||||
|
||||
constructor(public MiddlewareServiceService: MiddlewareServiceService) {
|
||||
window["CMAPIService"] = this
|
||||
}
|
||||
|
||||
async FileContent({length, path, index, blobFile}) {
|
||||
|
||||
try {
|
||||
const result = await this.MiddlewareServiceService.CMAPIFileContent({length, path, index, blobFile}).toPromise();
|
||||
return ok(result)
|
||||
|
||||
} catch (error) {
|
||||
return err(error)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user