mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
viewer rotation
This commit is contained in:
@@ -9,18 +9,22 @@ import { TaskDetailsPageRoutingModule } from './task-details-routing.module';
|
||||
import { TaskDetailsPage } from './task-details.page';
|
||||
import { TaskDetailHeaderPageModule } from '../task-detail-header/task-detail-header.module';
|
||||
import { TaskDetailContentPageModule } from '../task-detail-content/task-detail-content.module';
|
||||
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||
import { ViewerAttachmentPageModule } from "../../../../pages/gabinete-digital/viewer-attachment/viewer-attachment.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
TaskDetailsPageRoutingModule,
|
||||
//
|
||||
TaskDetailHeaderPageModule,
|
||||
TaskDetailContentPageModule
|
||||
],
|
||||
declarations: [TaskDetailsPage],
|
||||
exports: [TaskDetailsPage]
|
||||
declarations: [TaskDetailsPage],
|
||||
exports: [TaskDetailsPage],
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
TaskDetailsPageRoutingModule,
|
||||
//
|
||||
TaskDetailHeaderPageModule,
|
||||
TaskDetailContentPageModule,
|
||||
FontAwesomeModule,
|
||||
ViewerAttachmentPageModule
|
||||
]
|
||||
})
|
||||
export class TaskDetailsPageModule {}
|
||||
|
||||
@@ -14,61 +14,111 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="upper-content" >
|
||||
<div class="content-details">
|
||||
<ion-label>
|
||||
<p><span class="date">{{customDate}}</span></p>
|
||||
</ion-label>
|
||||
<ion-label>
|
||||
<p><span class="color-red">{{ task.DeadlineType }}</span></p>
|
||||
</ion-label>
|
||||
<ion-label>
|
||||
<p class="d-flex mt-10"><span class="label">{{ task.activityInstanceName }}</span></p>
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line mx-20"></div>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<div *ngIf="task" class="overflow-y-auto height-100 px-20">
|
||||
<div class="middle-content">
|
||||
<h5 class="font-17-rem" *ngIf="intervenientes">Intervenientes</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding">
|
||||
<ion-label>
|
||||
<div *ngFor="let interveniente of intervenientes">
|
||||
<p>{{interveniente.Name}}</p>
|
||||
</div>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<div *ngIf="cc.length > 0">
|
||||
<h5 class="font-17-rem">Com conhecimento</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding">
|
||||
<ion-label>
|
||||
<div *ngFor="let c of cc">
|
||||
<p>{{c.Name}}</p>
|
||||
</div>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div *ngIf="task.Note">
|
||||
<h5 class="font-17-rem">Detalhes</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding">
|
||||
<pre class="width-100 text">{{ task.Note }} </pre>
|
||||
</ion-item>
|
||||
</div>
|
||||
<ion-content class="d-flex width-100 height-100">
|
||||
|
||||
<div class="d-flex height-100 width-100">
|
||||
|
||||
<div class="overflow-y-auto height-100 width-60 visionDesktop-block" style="overflow: hidden; margin-right:20px;">
|
||||
<app-viewer-attachment *ngIf="mergedArray.length >= 1" [selectedIndex]="selectedIndex" [taskViewerAttachment]="mergedArray" class="height-100" ></app-viewer-attachment>
|
||||
</div>
|
||||
<div class="bottom-content width-100">
|
||||
<ion-list>
|
||||
<h5 class="font-17-rem">Documentos Anexados</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding cursor-pointer" *ngFor="let Document of mergedArray">
|
||||
<ion-label (click)="viewDocument.emit({DocId:Document.DocId, Document:Document, content:Document.content})">
|
||||
<p *ngIf="Document.Assunto" class="attach-title-item">{{ Document.Assunto }} <span class="document-type" *ngIf="Document.content" >Rascunho</span> </p>
|
||||
<p *ngIf="!Document.Assunto" class="attach-title-item">{{ Document.DocNumber }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p><span class="span-left">{{Document.Sender}}</span><span class="span-right">{{ Document.DocDate | date: 'dd/MM/yy' }}</span></p>
|
||||
|
||||
<div class=" flex-1 d-flex flex-column height-100 d-flex" >
|
||||
<div class="upper-content" >
|
||||
<div class="content-details">
|
||||
<div class="mobile-header">
|
||||
<ion-label>
|
||||
<p><span class="date">{{customDate}}</span></p>
|
||||
</ion-label>
|
||||
<ion-label>
|
||||
<p><span class="color-red">{{ task.DeadlineType }}</span></p>
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<ion-label>
|
||||
<p class="d-flex mt-10 activity-instanceName" ><span class="label">{{ task.activityInstanceName }}</span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line mx-20"></div>
|
||||
|
||||
<div style="
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
flex-grow: 1;
|
||||
">
|
||||
<div class="middle-content" *ngIf="dropButton">
|
||||
<h5 class="font-17-rem" *ngIf="intervenientes">Intervenientes</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding">
|
||||
<ion-label>
|
||||
<div *ngFor="let interveniente of intervenientes">
|
||||
<p>{{interveniente.Name}}</p>
|
||||
</div>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<div *ngIf="cc.length > 0">
|
||||
<h5 class="font-17-rem">Com conhecimento</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding">
|
||||
<ion-label>
|
||||
<div *ngFor="let c of cc">
|
||||
<p>{{c.Name}}</p>
|
||||
</div>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div *ngIf="task.Note">
|
||||
<h5 class="font-17-rem">Detalhes</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding">
|
||||
<pre class="width-100 text">{{ task.Note || fulltask?.workflowInstanceDataFields?.TaskMessage}} </pre>
|
||||
</ion-item>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom-content width-100 d-flex flex-column flex-1">
|
||||
<ion-list class="visionDesktop-block" >
|
||||
<h5 class="font-17-rem">Documentos Anexados</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding cursor-pointer" *ngFor="let Document of mergedArray; let i = index" (click)=" selectedIndex = i" [ngClass]="{'selected-card': i === selectedIndex}">
|
||||
<ion-label class="d-block" >
|
||||
<div class="d-flex" >
|
||||
|
||||
<div class="flex-1">
|
||||
<p class="attach-title-item overflow-hidden">{{ Document.Assunto || "Sem assunto" }} <span class="document-type" *ngIf="Document.Assunto =='teste xss3'">Rascunho</span></p>
|
||||
<p class="overflow-hidden"><span class="span-left">{{ Document.Sender}}</span><span class="span-right">{{ Document.DocDate | date: 'dd-MM-yyyy HH:mm' }}</span></p>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-center align-center font-25" (click)="clickDocumentUPdateIndex(Document.DocId, Document, Document.content);">
|
||||
<fa-icon icon="ellipsis-v" class="menu-icon font-awesome-1"></fa-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
<div style="border-radius: 50px;position: relative;top: 3px;left: 50px;">
|
||||
|
||||
<ion-row class="timeline-date align-center pr-10 visionMobile-block" >
|
||||
<button class="no-color" *ngIf="dropButton" (click)="dropButton=!dropButton" >
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps font-25" src="assets/images/icons-collaps-up.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps font-25" src="assets/images/theme/gov/icons-collaps-up.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="collaps font-25" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-collaps-up.svg"></ion-icon>
|
||||
</button>
|
||||
<button class="no-color" *ngIf="!dropButton" (click)="dropButton=!dropButton">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps font-25" src="assets/images/icons-collaps-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps font-25" src="assets/images/theme/gov/icons-collaps-down.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="collaps font-25" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-collaps-down.svg" ></ion-icon>
|
||||
</button >
|
||||
</ion-row>
|
||||
|
||||
</div>
|
||||
<app-viewer-attachment *ngIf="mergedArray.length >= 1" [selectedIndex]="selectedIndex" [taskViewerAttachment]="mergedArray" class="visionMobile-flex height-100" ></app-viewer-attachment>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ion-content>
|
||||
|
||||
@@ -67,9 +67,13 @@ ion-button{
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.upper-content-margin {
|
||||
margin-left: 41px;
|
||||
}
|
||||
|
||||
|
||||
.upper-content{
|
||||
font-family: Roboto;
|
||||
margin-left: 41px;
|
||||
font-size: rem(18);
|
||||
|
||||
.label{
|
||||
@@ -209,3 +213,96 @@ ion-button{
|
||||
width: 25%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.expand {
|
||||
margin-left: -20px;
|
||||
margin-right: -20px;
|
||||
width: calc(100% + 40px);
|
||||
}
|
||||
|
||||
|
||||
|
||||
.selected-card {
|
||||
border: 3px solid #ffb703;
|
||||
color: #3498db;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.visionDesktop-flex {
|
||||
display: none;
|
||||
}
|
||||
.visionDesktop-block {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.visionMobile-flex {
|
||||
display: none;
|
||||
}
|
||||
.visionMobile-block {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media screen and (orientation:portrait) {
|
||||
.visionDesktop-flex {
|
||||
display: none !important;
|
||||
}
|
||||
.visionDesktop-block {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.visionMobile-flex {
|
||||
display: flex !important;
|
||||
}
|
||||
.visionMobile-block {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.mobile-header {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.content-details {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.upper-content {}
|
||||
|
||||
|
||||
.middle-content {
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.upper-content {
|
||||
margin-left: 41px;
|
||||
}
|
||||
|
||||
.activity-instanceName {
|
||||
padding-right: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (orientation:landscape) {
|
||||
.visionDesktop-flex {
|
||||
display: flex !important;
|
||||
}
|
||||
.visionDesktop-block {
|
||||
display: block !important;
|
||||
}
|
||||
// CSS applied when the device is in landscape mode
|
||||
|
||||
.visionMobile-flex {
|
||||
display: none !important;
|
||||
}
|
||||
.visionMobile-block {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { customTask, fullTask } from 'src/app/models/dailyworktask.model';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { DeviceService } from "src/app/services/device.service"
|
||||
import { DocumentViewerOptionService } from "src/app/services/document-viewer-option.service";
|
||||
|
||||
@Component({
|
||||
selector: 'app-task-details',
|
||||
@@ -14,17 +16,40 @@ export class TaskDetailsPage implements OnInit {
|
||||
@Input() cc = []
|
||||
@Input() customDate = ''
|
||||
@Input() mergedArray = []
|
||||
@Input() fulltask = new fullTask()
|
||||
@Input() fulltask = null
|
||||
|
||||
@Output() openOptions = new EventEmitter<any>();
|
||||
@Output() goBack = new EventEmitter<any>();
|
||||
@Output() viewDocument = new EventEmitter<any>();
|
||||
|
||||
selectedIndex = 0
|
||||
dropButton = true
|
||||
|
||||
constructor(
|
||||
public ThemeService: ThemeService
|
||||
) { }
|
||||
public ThemeService: ThemeService,
|
||||
public DeviceService: DeviceService,
|
||||
private DocumentViewerOptionService: DocumentViewerOptionService,
|
||||
) {
|
||||
this.DeviceService.isDesktop();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
|
||||
clickDocumentUPdateIndex(docId: string, Document, content) {
|
||||
this.DocumentViewerOptionService.setData({
|
||||
file: {
|
||||
title: Document.Assunto,
|
||||
url: '',
|
||||
title_link: '',
|
||||
},
|
||||
Document,
|
||||
applicationId: Document.ApplicationId,
|
||||
docId: Document.DocId || Document.SourceId,
|
||||
task: this.fulltask
|
||||
});
|
||||
this.DocumentViewerOptionService.openOptions();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user