viewer rotation

This commit is contained in:
Peter Maquiran
2024-02-22 11:40:06 +01:00
parent d0806455c9
commit 7583bf5306
39 changed files with 711 additions and 1312 deletions
+3 -3
View File
@@ -45,7 +45,7 @@ export class AppComponent {
this.initializeApp();
this.storage.set('version', environment.version).then(() => {})
ChatController.ChatSystemService = this.ChatSystemService
}
/* requestPermission() {
@@ -70,11 +70,11 @@ export class AppComponent {
initializeApp() {
this.platform.ready().then(() => {
this.statusBar.styleDefault();
if (this.platform.is("tablet")) {
window.screen.orientation.unlock();
} else if( this.platform.is("mobile")) {
window.screen.orientation.lock('portrait');
// window.screen.orientation.lock('portrait');
}
});
+1 -3
View File
@@ -92,8 +92,6 @@ import { tokenInterceptor } from './interceptors/token.interceptors';
import { InputFilterDirective } from './services/directives/input-filter.directive';
import { VisibilityDirective } from './services/directives/visibility.directive';
import { ClickAndHoldDirectiveService } from './services/click-and-hold-directive.service';
// import { ServiceWorkerModule } from '@angular/service-worker';
// import { AngularFireModule } from '@angular/fire';
// import { AngularFireMessagingModule } from '@angular/fire/messaging';
@@ -122,7 +120,7 @@ import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
SentrySibling.init
);
@NgModule({
declarations: [AppComponent, PopupQuestionPipe, InputFilterDirective, ClickAndHoldDirectiveService],
declarations: [AppComponent, PopupQuestionPipe, InputFilterDirective],
imports: [BrowserModule,
CommonModule,
FormsModule,
+1
View File
@@ -172,6 +172,7 @@ export interface expedienteTask {
AttachmentsProcessLastInstanceID: any
InstanceID: any,
DraftIds: string
activityInstanceName: any
}
export interface ExpedienteTask {
@@ -8,14 +8,20 @@ import { DespachoPrPageRoutingModule } from './despacho-pr-routing.module';
import { DespachoPrPage } from './despacho-pr.page';
import { SharedModule } from 'src/app/shared/shared.module';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { ViewerAttachmentPageModule } from "../../viewer-attachment/viewer-attachment.module";
import { TaskDetailsPageModule } from 'src/app/shared/gabinete-digital/generic/task-details/task-details.module';
DespachoPrPageRoutingModule,
],
declarations: [DespachoPrPage]
@NgModule({
declarations: [DespachoPrPage],
imports: [
CommonModule,
FormsModule,
IonicModule,
DespachoPrPageRoutingModule,
FontAwesomeModule,
ViewerAttachmentPageModule,
TaskDetailsPageModule,
]
})
export class DespachoPrPageModule {}
@@ -1,85 +1,24 @@
<ion-content class="container-wrapper">
<div class="main-content d-flex height-100 pl-20 overflow-hidden">
<div class="content d-flex flex-column" *ngIf="task">
<div class="main-header" >
<div class="title-content width-100 d-flex justify-space-between align-center">
<div class="font-30-rem cursor-pointer align-center d-flex" (click)="goBack()" defaultHref="#">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div>
<div class="middle d-flex align-center flex-grow-1">
<div class="title">{{ task.Folio}}</div>
</div>
<div class="div-icon" (click)="openOptions()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-25 cursor-pointer" src="assets/images/theme/blue/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-25 cursor-pointer" src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="font-25 cursor-pointer" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-menu.svg"></ion-icon>
</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"></div>
<div class="overflow-y-auto">
<div class="middle-content" >
<div *ngIf="intervenientes.length > 0">
<h5 >Intervenientes</h5>
<ion-item class="ion-no-margin ion-no-padding">
<ion-label *ngIf="intervenientes">
<div *ngFor="let interveniente of intervenientes">
<p>{{interveniente.Name}}</p>
</div>
</ion-label>
</ion-item>
</div>
<div *ngIf="cc!='' && cc!=' ' ">
<div class="main-content d-flex height-100 overflow-hidden">
<h5 *ngIf="cc.length > 0">Com conhecimento</h5>
<ion-item *ngIf="cc.length > 0" 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="fulltask.workflowInstanceDataFields.TaskMessage">
<h5 class="font-17-rem">Detalhes</h5>
<ion-item class="ion-no-margin ion-no-padding">
<pre class="width-100 text">{{ fulltask.workflowInstanceDataFields.TaskMessage }} </pre>
</ion-item>
</div>
</div>
<div class="bottom-content width-100">
<ion-list *ngIf="fulltask.Documents">
<h5 class="font-17-rem">Documentos Anexados</h5>
<ion-item *ngFor="let attachment of mergedArray" class="ion-no-margin ion-no-padding cursor-pointer">
<ion-label (click)="viewDocument(attachment.DocId, attachment, attachment.content)">
<p *ngIf="attachment.Assunto" class="attach-title-item">{{ attachment.Assunto }}<span class="document-type" *ngIf="attachment.content != ''">Rascunho</span></p>
<p *ngIf="!attachment.Assunto" class="attach-title-item">{{ attachment.DocNumber }}<span class="span-right color-red btn-size"></span></p>
<p><span class="span-left">{{attachment.Sender}}</span><span class="span-right">{{ attachment.DocDate | date: 'dd/MM/yy' }}</span></p>
</ion-label>
</ion-item>
</ion-list>
</div>
</div>
<app-task-details
*ngIf="task"
[task]=task
[intervenientes]=intervenientes
[cc]=cc
[customDate]=customDate
[mergedArray]="mergedArray"
(openOptions)= openOptions()
(goBack)= goBack()
(viewDocument)=viewDocument($event)
class="d-flex height-100 flex-column content"
[fulltask]="fulltask"
></app-task-details>
<div *ngIf="task" class="aside-right flex-column height-100 overflow-y-auto">
</div>
<div *ngIf="task" class="aside-right flex-column height-100 overflow-y-auto">
<div class="buttons px-20" *ngIf="task.activityInstanceName == 'Tarefa de Despacho'">
<div *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="option-desc"> <div>Responder ao PR</div> </div>
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openAddNoteModal('Executado')" class="btn-cancel mb-0" style="margin-bottom: 0px !important;" shape="round" >Executado</button>
@@ -101,9 +40,11 @@
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks]) && task.Status != 'Pending'" (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div>
</div>
<div *ngIf="!task" class="px-20">
<div *ngIf="!task">
<ion-list>
<ion-list-header>
<ion-label>
@@ -138,10 +79,10 @@
</p>
</ion-label>
</ion-item>
<button color="medium" shape="round" expand="block">
<ion-button color="medium" shape="round" expand="block">
<!-- <ion-icon color="medium" name="attach" slot="start"></ion-icon> -->
<ion-skeleton-text animated style="width: 50%"></ion-skeleton-text>
</button>
</ion-button>
</ion-list>
</div>
</div>
@@ -5,169 +5,16 @@
border-top-right-radius: 25px;
}
.content{
padding: 30px 00px 0 00px !important;
margin: 0;
float: left;
}
.color-red{
font-weight: 500;
color:#d30a0a !important;
}
.document-type{
border-radius: 20px;
background: var(--label-bg-color);
float: right;
padding: 5px 13.5px 5px 13.5px;
color: #fff;
}
.btn-size{
font-size: rem(18) !important;
}
.main-header{
overflow: inherit !important;
font-family: Roboto;
border-top-left-radius: 25px;
border-top-right-radius: 25px;
background-color: #fff;
color:#000;
transform: translate3d(0, 1px, 0);
.header-top{
width: 360px;
margin: 0px auto;
padding: 0 !important;
background: #fff;
.middle{
padding: 0!important;
float: left;
width: 280px;
margin: 2.5px 0 0 5px;
display: flex;
align-items: center;
}
.right{
padding: 0!important;
float: right;
font-size: rem(25);
color: #0782c9;
margin: 5px 0 0 0;
}
}
.header-bottom{
width: 310px;
overflow: auto;
margin: 0 auto;
.header-bottom-icon{
width: rem(30);
font-size: rem(25);
float: left;
padding: 2px;
}
.header-bottom-contacts{
width: 275px;
font-size: rem(15);
color: #797979;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
float: left;
padding: 5px;
margin: 1px;
}
}
.title{
font-size: rem(25);
overflow: auto;
float: left;
padding-top: 4px;
padding-left: 5px;
}
.div-icon{
width: rem(40);
float: right;
font-size: rem(35);
overflow: auto;
padding: 1px;
}
}
ion-item-group{
margin: 15px;
}
ion-button{
display: block;
width: 80%;
margin: 20px auto;
}
.upper-content{
font-family: Roboto;
margin-left: 36px;
font-size: rem(18);
.label{
border-radius: 20px;
background: var(--label-bg-color);
float: right;
padding: 5px 13.5px 5px 13.5px;
color: black;
font-size: rem(14);
}
.button-calendar-type ion-button{
height: rem(25);
}
.content-details{
font-size: rem(17);
.date{
color: #797979;
}
}
}
.middle-conten{
.middle-content p{
font-size: rem(16);
}
}
.bottom-content{
//width: 360px;
margin: 0 auto;
.bottom-content h3{
font-size: rem(16);
margin: 0 0 0 10px;
}
.attach-document{
font-size: rem(15);
color: var(--title-text-color);
margin: 5px 5px 5px 10px;
padding: 5px;
float: left;
}
.attach-icon{
width: 37px;
font-size: rem(35);
float: left;
}
.attach-title-item{
font-size: rem(18);
width: 100%;
color:#0d89d1;
padding-bottom: 5px;
}
/* SPAN */
.span-left{
float: left;
font-size: rem(15);
}
.span-right{
text-align: right;
float: right;
font-size: rem(13);
}
}
.aside-right{
padding: 30px 20px 0 20px !important;
@@ -244,19 +91,3 @@ ion-button{
width: 25%;
}
}
.option-desc {
display: flex;
color: #828282;
width: 100%;
justify-content: space-between;
align-items: center;
font-size: rem(15);
.option-desc-line {
height: 1px;
flex-grow: 1;
background-color: #e0e0e0;
padding-left: 4px;
}
}
@@ -22,6 +22,8 @@ import { PermissionService } from 'src/app/services/permission.service';
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { TaskService } from 'src/app/services/task.service'
import { TinyMCEPage } from 'src/app/tiny-mce/tiny-mce.page';
import { DocumentViewerOptionService } from "src/app/services/document-viewer-option.service";
import { DeviceService } from "src/app/services/device.service"
@Component({
selector: 'app-despacho-pr',
@@ -44,6 +46,9 @@ export class DespachoPrPage implements OnInit {
cc: any = [];
mergedArray: any = [];
dropButton = false
selectedIndex = 0
constructor(
private activateRoute: ActivatedRoute,
private processes: ProcessesService,
@@ -58,7 +63,9 @@ export class DespachoPrPage implements OnInit {
private RouteService: RouteService,
public p: PermissionService,
private httpErroHandle: HttpErrorHandle,
public TaskService: TaskService
public TaskService: TaskService,
public DeviceService: DeviceService,
private DocumentViewerOptionService: DocumentViewerOptionService,
) {
this.activatedRoute.paramMap.subscribe(params => {
if (params["params"].SerialNumber) {
@@ -93,6 +100,21 @@ export class DespachoPrPage implements OnInit {
}
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();
}
async LoadTaskDetail(serial: string) {
this.processes.GetTask(serial).subscribe((res: fullTask) => {
this.TaskService.loadDiplomas();
@@ -182,43 +204,40 @@ export class DespachoPrPage implements OnInit {
}
async viewDocument(docId: string, Document, content) {
async viewDocument({Document, content}) {
if (Document.content == "") {
const modal = await this.modalController.create({
component: ViewDocumentPage,
componentProps: {
trustedUrl: '',
file: {
title: Document.Assunto,
url: '',
title_link: '',
},
Document,
applicationId: Document.ApplicationId,
docId: Document.DocId || Document.SourceId,
folderId: this.task.FolderId,
task: this.fulltask
const modal = await this.modalController.create({
component: ViewDocumentPage,
componentProps: {
trustedUrl: '',
file: {
title: Document.Assunto,
url: '',
title_link: '',
},
cssClass: 'modal modal-desktop'
});
await modal.present();
} else {
const modal = await this.modalController.create({
component: TinyMCEPage,
componentProps: {
Document,
content
},
cssClass: 'modal modal-desktop'
});
await modal.present();
}
Document,
applicationId: Document.ApplicationId,
docId: Document.DocId || Document.SourceId,
folderId: this.task.FolderId,
task: this.fulltask
},
cssClass: 'modal modal-desktop'
});
await modal.present();
} else {
const modal = await this.modalController.create({
component: TinyMCEPage,
componentProps: {
Document,
content
},
cssClass: 'modal modal-desktop'
});
await modal.present();
}
}
openMenu() {
this.menu.open();
this.modalController.dismiss();
@@ -11,7 +11,6 @@ import { SharedModule } from 'src/app/shared/shared.module';
import { TaskDetailsPageModule } from 'src/app/shared/gabinete-digital/generic/task-details/task-details.module'
import { ViewerAttachmentPageModule } from '../../viewer-attachment/viewer-attachment.module';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { ClickAndHoldDirectiveService } from 'src/app/services/click-and-hold-directive.service';
import { DirectivesModule } from 'src/app/services/directives/directives.module';
@NgModule({
@@ -27,7 +26,7 @@ import { DirectivesModule } from 'src/app/services/directives/directives.module'
DirectivesModule
],
declarations: [
DespachoPage, ClickAndHoldDirectiveService
DespachoPage
]
})
export class DespachoPageModule {}
@@ -1,208 +1,102 @@
<ion-content class="container-wrapper">
<div class="main-content d-flex height-100 overflow-hidden">
<div class="content d-flex flex-column" *ngIf="task">
<div class="main-header">
<div class="title-content width-100 d-flex justify-space-between align-center">
<div class=" btn-dismiss font-30-rem cursor-pointer" (click)="goBack()" defaultHref="#">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div>
<div class="middle d-flex align-center flex-grow-1">
<ion-label class="title">{{ task.Folio }}</ion-label>
</div>
<div class="div-icon" (click)="openOptions()" *ngIf="p.userPermission([p.permissionList.Agenda.access])">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/theme/blue/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-menu.svg"></ion-icon>
</div>
</div>
</div>
<div class="d-flex height-100 width-100">
<div class="overflow-y-auto height-100 width-60" style="overflow: hidden; margin-left: -20px; margin-right:20px;" *ngIf="DeviceService.isDesktop()">
<!-- <ion-row class="timeline-date align-center pr-10">
<button class="no-color" style="
position: absolute;
background: transparent;
margin: 53px;
">
<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>
</ion-row> -->
<app-viewer-attachment [selectedIndex]="selectedIndex" [taskViewerAttachment]="mergedArray" class="height-100" ></app-viewer-attachment>
</div>
<div class=" flex-1 d-flex flex-column height-100" [ngClass]="{'overflow-y-auto ': DeviceService.isDesktop()}" >
<div class="upper-content" [ngClass]="{'upper-content-no-margin': DeviceService.isDesktop(), 'upper-content-margin': !DeviceService.isDesktop()}">
<div class="content-details" [ngClass]="{'d-flex': !DeviceService.isDesktop()}">
<div [ngClass]="{'flex-1': !DeviceService.isDesktop()}">
<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"><span class="label">{{ task.activityInstanceName }}</span></p>
</ion-label>
</div>
</div>
<div class="line"></div>
<div class="middle-content" *ngIf="dropButton">
<h5 *ngIf="intervenientes">Intervenientes</h5>
<ion-item class="ion-no-margin ion-no-padding">
<ion-label>
<div *ngFor="let task of intervenientes">
<p>{{task.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="fulltask.workflowInstanceDataFields.TaskMessage">
<h5 class="font-17-rem">Detalhes</h5>
<ion-item class="ion-no-margin ion-no-padding">
<pre class="width-100 text">{{ fulltask.workflowInstanceDataFields.TaskMessage }} </pre>
</ion-item>
</div>
</div>
<div class="bottom-content width-100 flex-1" [ngClass]="{'expand': !DeviceService.isDesktop()}">
<ion-list *ngIf="DeviceService.isDesktop()">
<h5 class="font-17-rem">Documentos Anexados</h5>
<ion-item appClickAndHold (clickAndHold)="onButtonHold()" 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.content != ''">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" *ngIf="!DeviceService.isDesktop()">
<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="!DeviceService.isDesktop()" [selectedIndex]="selectedIndex" [taskViewerAttachment]="mergedArray" class="height-100" ></app-viewer-attachment>
</div>
</div>
</div>
</div>
<div class="content d-flex flex-column" *ngIf="!task">
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
</div>
</ion-item>
<ion-item lines="none"
class="item-skeleton width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
<div class="item-content flex-grow-1 cursor-pointer">
<p class="item-content-date my-5"><ion-skeleton-text animated style="width: 90%"></ion-skeleton-text></p>
<p class="item-content-title my-10"><ion-skeleton-text animated style="width: 50%"></ion-skeleton-text></p>
<p class="item-content-detail my-5"><ion-skeleton-text animated style="width: 100%"></ion-skeleton-text></p>
</div>
</ion-item>
</div>
<app-task-details
*ngIf="task"
[task]=task
[intervenientes]=intervenientes
[cc]=cc
[customDate]=customDate
[mergedArray]="mergedArray"
(openOptions)= openOptions()
(goBack)= goBack()
(viewDocument)=viewDocument($event)
class="d-flex height-100 flex-column content"
[fulltask]="fulltask"
></app-task-details>
<div *ngIf="task" class="aside-right flex-column height-100 overflow-y-auto">
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Despacho'">
<div class="option-desc" *ngIf="task.WorkflowName == 'Despacho do Presidente da República' "> <div>Responder ao PR</div> </div>
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
<div class="option-desc" *ngIf="task.WorkflowName == 'Despacho do Presidente da República' ">Reencaminhar para Área Jurídica</div>
<button (click)="openAddNoteModal('Gerar Diploma')" *ngIf="task.WorkflowName == 'Despacho do Presidente da República'" class="btn-cancel" style="margin-bottom: 0px !important;" shape="round" >Gerar Diploma </button>
<div class="option-desc" *ngIf="task.WorkflowName == 'Despacho do Presidente da República' " >Outras opções</div>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<div class="solid"></div>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<div class="solid"></div>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div>
<div class="buttons" *ngIf="task.activityInstanceName == 'Reexecutar Despacho'">
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<div class="solid"></div>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<div class="solid"></div>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div>
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Despacho'">
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
<div class="solid"></div>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<div class="solid"></div>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
<button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
</div>
<div class="buttons" *ngIf="task.activityInstanceName == 'Tarefa de Despacho'">
<div class="option-desc" *ngIf="task.WorkflowName == 'Despacho do Presidente da República' "> <div>Responder ao PR</div> </div>
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
<div class="option-desc" *ngIf="task.WorkflowName == 'Despacho do Presidente da República' ">Reencaminhar para Área Jurídica</div>
<button (click)="openAddNoteModal('Gerar Diploma')" *ngIf="task.WorkflowName == 'Despacho do Presidente da República'" class="btn-cancel" style="margin-bottom: 0px !important;" shape="round" >Gerar Diploma </button>
<div class="option-desc" *ngIf="task.WorkflowName == 'Despacho do Presidente da República' " >Outras opções</div>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<div class="solid"></div>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<div class="solid"></div>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div>
<div class="buttons" *ngIf="task.activityInstanceName == 'Reexecutar Despacho'">
<button (click)="openAddNoteModal('Executado')" class="btn-cancel" shape="round" >Executado</button>
<button (click)="openDelegarModal(task)" class="btn-cancel" shape="round" >Delegar</button>
<div class="solid"></div>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<div class="solid"></div>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div>
<div class="buttons" *ngIf="task.activityInstanceName == 'Concluir Despacho'">
<button (click)="openAddNoteModal('Arquivar')" class="btn-cancel" shape="round" >Arquivar</button>
<div class="solid"></div>
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<div class="solid"></div>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
<button (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
</div>
</div>
<div *ngIf="!task">
<ion-list>
<ion-list-header>
<ion-label>
<ion-skeleton-text animated style="width: 50%"></ion-skeleton-text>
</ion-label>
</ion-list-header>
<ion-item>
<ion-label>
<h3>
<ion-skeleton-text animated style="width: 50%"></ion-skeleton-text>
</h3>
<p>
<ion-skeleton-text animated style="width: 80%"></ion-skeleton-text>
</p>
</ion-label>
</ion-item>
<ion-item>
<ion-label>
<h3>
<ion-skeleton-text animated style="width: 50%"></ion-skeleton-text>
</h3>
<p><ion-skeleton-text animated style="width: 80%"></ion-skeleton-text></p>
</ion-label>
</ion-item>
<ion-item>
<ion-label>
<h3>
<ion-skeleton-text animated style="width: 50%"></ion-skeleton-text>
</h3>
<p>
<ion-skeleton-text animated style="width: 80%"></ion-skeleton-text>
</p>
</ion-label>
</ion-item>
<ion-button color="medium" shape="round" expand="block">
<!-- <ion-icon color="medium" name="attach" slot="start"></ion-icon> -->
<ion-skeleton-text animated style="width: 50%"></ion-skeleton-text>
</ion-button>
</ion-list>
</div>
</div>
</ion-content>
@@ -5,131 +5,16 @@
border-top-right-radius: 25px;
}
.content{
padding: 30px 20px 0 20px !important;
margin: 0;
float: left;
}
.color-red{
font-weight: 500;
color:#d30a0a !important;
}
.document-type{
border-radius: 20px;
background: var(--label-bg-color);
float: right;
padding: 5px 13.5px 5px 13.5px;
color: #fff;
}
.btn-size{
font-size: rem(18) !important;
}
.main-header{
overflow: inherit !important;
display: flex;
font-family: Roboto;
background-color: #fff;
color:#000;
transform: translate3d(0, 1px, 0);
.title-content{
display: flex;
justify-content: start !important;
align-items: flex-start !important;
border-radius: 0 !important;
}
.title{
width: fit-content;
height: auto;
font-size: rem(25);
overflow: auto;
float: left;
padding-left: 5px;
}
.div-icon{
width: rem(40) !important;
font-size: rem(35) !important;
text-align: start !important;
padding: 1px;
}
}
ion-item-group{
margin: 15px;
}
ion-button{
display: block;
width: 80%;
margin: 20px auto;
}
.upper-content-margin {
margin-left: 36px;
}
.upper-content{
font-family: Roboto;
margin-top: 15px;
font-size: rem(18);
.label{
border-radius: 20px;
background: var(--label-bg-color);
float: right;
padding: 5px 13.5px 5px 13.5px;
color: black;
font-size: rem(14);
}
.button-calendar-type ion-button{
height: rem(25);
}
.content-details{
font-size: rem(17);
.date{
color: #797979;
}
}
}
.middle-conten{
.middle-content p{
font-size: rem(16);
}
}
.bottom-content{
//width: 360px;
margin: 0 auto;
.bottom-content h3{
font-size: rem(16);
margin: 0 0 0 10px;
}
.attach-document{
font-size: rem(15);
color: var(--title-text-color);
margin: 5px 5px 5px 10px;
padding: 5px;
float: left;
}
.attach-icon{
width: 37px;
font-size: rem(35);
float: left;
}
.attach-title-item{
font-size: rem(18);
width: 100%;
color:#0d89d1;
padding-bottom: 5px;
}
/* SPAN */
.span-left{
float: left;
font-size: rem(15);
}
.span-right{
text-align: right;
float: right;
font-size: rem(13);
}
}
.aside-right{
padding: 30px 20px 0 20px !important;
@@ -198,7 +83,7 @@ ion-button{
}
}
@media only screen and (min-width: 1140px) {
@media only screen and (min-width: 1140px){
.content{
width: 75%;
}
@@ -206,34 +91,3 @@ ion-button{
width: 25%;
}
}
.option-desc {
display: flex;
color: #828282;
width: 100%;
justify-content: space-between;
align-items: center;
font-size: rem(15);
.option-desc-line {
height: 1px;
flex-grow: 1;
background-color: #e0e0e0;
padding-left: 4px;
}
}
.expand {
margin-left: -20px;
margin-right: -20px;
width: calc(100% + 40px);
}
.selected-card {
border: 3px solid #ffb703;
color: #3498db;
}
@@ -56,7 +56,7 @@ export class DespachoPage implements OnInit {
draftDocumentIds;
selectedIndex = 0
dropButton = false
dropButton = true
constructor(private activateRoute: ActivatedRoute,
@@ -106,7 +106,6 @@ export class DespachoPage implements OnInit {
});
// this.ThemeService
}
close() {
@@ -271,43 +270,40 @@ export class DespachoPage implements OnInit {
this.DocumentViewerOptionService.openOptions();
}
async viewDocument(docId: string, Document, content) {
async viewDocument({Document, content}) {
if (Document.content == "") {
const modal = await this.modalController.create({
component: ViewDocumentPage,
componentProps: {
trustedUrl: '',
file: {
title: Document.Assunto,
url: '',
title_link: '',
},
Document,
applicationId: Document.ApplicationId,
docId: Document.DocId || Document.SourceId,
folderId: this.task.FolderId,
task: this.fulltask
const modal = await this.modalController.create({
component: ViewDocumentPage,
componentProps: {
trustedUrl: '',
file: {
title: Document.Assunto,
url: '',
title_link: '',
},
cssClass: 'modal modal-desktop'
});
await modal.present();
} else {
const modal = await this.modalController.create({
component: TinyMCEPage,
componentProps: {
Document,
content
},
cssClass: 'modal modal-desktop'
});
await modal.present();
}
Document,
applicationId: Document.ApplicationId,
docId: Document.DocId || Document.SourceId,
folderId: this.task.FolderId,
task: this.fulltask
},
cssClass: 'modal modal-desktop'
});
await modal.present();
} else {
const modal = await this.modalController.create({
component: TinyMCEPage,
componentProps: {
Document,
content
},
cssClass: 'modal modal-desktop'
});
await modal.present();
}
}
clickAttachment() {
@@ -641,7 +637,4 @@ export class DespachoPage implements OnInit {
}
function mergeArraysAndTag(array1, array2) {
console.log('second', array2)
}
@@ -7,13 +7,15 @@ import { IonicModule } from '@ionic/angular';
import { DiplomasGerarPageRoutingModule } from './diplomas-gerar-routing.module';
import { DiplomasGerarPage } from './diplomas-gerar.page';
import { TaskDetailsPageModule } from "../../../../shared/gabinete-digital/generic/task-details/task-details.module";
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
DiplomasGerarPageRoutingModule,
],
declarations: [DiplomasGerarPage]
declarations: [DiplomasGerarPage],
imports: [
CommonModule,
FormsModule,
IonicModule,
DiplomasGerarPageRoutingModule,
TaskDetailsPageModule
]
})
export class DiplomasGerarPageModule {}
@@ -6,78 +6,19 @@
<div class="main-content d-flex height-100 width-100 overflow-hidden">
<div class="content d-flex flex-column" *ngIf="task">
<div class="main-header">
<div class="title-content width-100 d-flex justify-space-between">
<div class="font-30-rem cursor-pointer" (click)="goBack()" >
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div>
<div class="middle d-flex align-center flex-grow-1 ">
<ion-label class="title">{{ task.Folio}}</ion-label>
</div>
<div class="div-icon" (click)="openOptions()">
<ion-icon class="font-25 cursor-pointer" name="ellipsis-vertical-outline"></ion-icon>
</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"></div>
<div class="middle-content">
<h5 *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="fulltask.workflowInstanceDataFields.TaskMessage">
<h5 class="font-17-rem">Detalhes</h5>
<ion-item class="ion-no-margin ion-no-padding">
<pre class="width-100 text">{{ fulltask.workflowInstanceDataFields.TaskMessage }} </pre>
</ion-item>
</div>
</div>
<div class="bottom-content width-100">
<ion-list>
<h5 class="font-17-rem">Documentos Anexados</h5>
<ion-item *ngFor="let attachment of attachments"
class="ion-no-margin ion-no-padding cursor-pointer"
>
<ion-label
(click)="viewDocument(attachment.DocId, attachment)"
>
<p *ngIf="attachment.Assunto" class="attach-title-item">{{ attachment.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
<p *ngIf="!attachment.Assunto" class="attach-title-item">{{ attachment.DocNumber }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
<p><span class="span-left">{{attachment.Sender}}</span><span class="span-right">{{ attachment.DocDate | date: 'dd/MM/yy' }}</span></p>
</ion-label>
</ion-item>
</ion-list>
</div>
<div class="d-flex flex-column" *ngIf="task">
<app-task-details
*ngIf="task"
[task]=task
[intervenientes]=intervenientes
[cc]=cc
[customDate]=customDate
[mergedArray]="attachments"
(openOptions)= openOptions()
(goBack)= goBack()
class="d-flex height-100 flex-column"
[fulltask]="fulltask"
></app-task-details>
</div>
<div *ngIf="task" class="aside-right flex-column height-100 overflow-y-auto">
@@ -1,8 +1,8 @@
<ion-content class="container-wrapper">
<div class="main-content d-flex height-100 overflow-hidden">
<app-task-details
<app-task-details
*ngIf="task"
[task]=task
[intervenientes]=intervenientes
@@ -13,6 +13,7 @@
(goBack)= goBack()
(viewDocument)=viewDocument($event)
class="d-flex height-100 flex-column content"
[fulltask]="fulltask"
></app-task-details>
<div *ngIf="task" class="aside-right flex-column height-100 overflow-y-auto">
@@ -9,16 +9,17 @@ import { ExpedienteDetailPageRoutingModule } from './expediente-detail-routing.m
import { ExpedienteDetailPage } from './expediente-detail.page';
import { SharedModule } from 'src/app/shared/shared.module';
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
import { TaskDetailsPageModule } from "../../../../shared/gabinete-digital/generic/task-details/task-details.module";
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
ExpedienteDetailPageRoutingModule,
BtnModalDismissPageModule,
],
declarations: [ExpedienteDetailPage]
declarations: [ExpedienteDetailPage],
imports: [
CommonModule,
FormsModule,
IonicModule,
ExpedienteDetailPageRoutingModule,
BtnModalDismissPageModule,
TaskDetailsPageModule
]
})
export class ExpedienteDetailPageModule {}
@@ -1,93 +1,18 @@
<div class="ion-page d-none" id="main-content">
<ion-menu-button></ion-menu-button>
</div>
<ion-content class="container-wrapper" >
<div *ngIf="task" class="main-content d-flex height-100 overflow-hidden">
<div class="content d-flex flex-column" *ngIf="task">
<div class="main-header" style="overflow: unset !important;">
<div class="title-content width-100 d-flex justify-between">
<div class="font-30-rem cursor-pointer d-flex align-base" (click)="goBack()" defaultHref="#">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div>
<div class="middle flex-grow-1">
<ion-label class="title">{{ task.Folio}}</ion-label>
</div>
<div class="menu-ptions">
<button class="btn-no-color d-flex" (click)="openOptions()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/theme/blue/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
</button>
</div>
</div>
</div>
<div class="upper-content" style="overflow: unset !important;">
<div class="content-details">
<ion-label>
<p><span class="date">{{customDate}}</span></p>
</ion-label>
<ion-label>
<p class="d-flex mt-10"><span class="label">{{ task.WorkflowName }}</span></p>
</ion-label>
</div>
</div>
<div class="line"></div>
<div class="overflow-y-auto">
<div class="middle-content">
<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>
<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>
<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 fulltask.Documents">
<ion-label class="d-block" (click)="viewDocument(Document.DocId, Document)">
<p class="attach-title-item">{{ Document.Assunto || "Sem assunto" }}<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-yyyy HH:mm' }}</span></p>
</ion-label>
</ion-item>
</ion-list>
</div>
<div *ngIf="eventsList">
<h5 class="h3-event-title">Eventos Associados</h5>
<ion-list>
<div class="content-items width-100" *ngIf="eventsList">
<ion-list>
<ion-item class=" ion-no-padding width-100 cursor-pointer" lines="none" *ngFor="let event of eventsList" (click)="goToEvent(event.EventId)">
<div class="d-flex content-{{profile}}-{{event.CalendarName}}">
<div class="schedule-time">
<div class="time-start">{{event.StartDate | date: 'HH:mm'}}</div>
<div class="time-end">{{event.EndDate | date: 'HH:mm'}}</div>
</div>
<div class="schedule-details">
<div class="location">{{event.Location}}</div>
<div class="description">{{event.Subject}}</div>
</div>
</div>
</ion-item>
</ion-list>
</div>
</ion-list>
</div>
</div>
<div *ngIf="task" class="main-content d-flex height-100 overflow-hidden">
<div class="width-100 d-flex flex-column content" *ngIf="task">
<app-task-details
*ngIf="task"
[task]=task
[intervenientes]=intervenientes
[cc]=cc
[customDate]=customDate
[mergedArray]="fulltask.Documents"
[fulltask] = "fulltask"
(openOptions)= openOptions()
(goBack)= goBack()
class="d-flex height-100 flex-column"
></app-task-details>
</div>
<div class="aside-right flex-column height-100 overflow-y-auto">
@@ -5,7 +5,7 @@
border-top-right-radius: 25px;
}
.content{
padding: 30px 20px 0 20px !important;
padding: 0px 0px 0 0px !important;
margin: 0;
float: left;
}
@@ -111,113 +111,6 @@ export class ExpedienteDetailPage implements OnInit {
this.toastService.presentToast('Não foi possível fazer login');
}
// updateProcessDB(res) {
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
// this.storage.set('expediente_details',res).then(() =>{
// })
// } else {
// //this.sqliteservice.updateProcess(res)
// }
// }
// getFromDB() {
// if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
// this.storage.get('expediente_details').then((process) => {
// this.task = {
// "SerialNumber": process.serialNumber,
// "Folio": process.workflowInstanceDataFields.Subject,
// "Senders": process.originator || process.originator,
// "CreateDate": momentG(new Date(process.taskStartDate), 'yyyy-MM-dd HH:mm:ss'),
// "DocumentURL": process.workflowInstanceDataFields.ViewerRequest,
// "Remetente": process.workflowInstanceDataFields.Sender,
// "Note": process.workflowInstanceDataFields.TaskMessage || process.workflowInstanceDataFields.Note,
// "FolderId": process.workflowInstanceDataFields.FolderID,
// "FsId": process.workflowInstanceDataFields.FsId,
// "DocId": process.workflowInstanceDataFields.DocID,
// "WorkflowName": process.workflowDisplayName,
// "Status": process.workflowInstanceDataFields.Status,
// "DispatchNumber": process.workflowInstanceDataFields.DispatchNumber,
// "AttachmentsProcessLastInstanceID": process.workflowInstanceDataFields.AttachmentsProcessLastInstanceID,
// "InstanceID": process.workflowInstanceDataFields.InstanceID
// }
// this.fulltask = {
// Documents: process.Documents,
// actions: process.actions,
// activityInstanceName: process.activityInstanceName,
// formURL: process.formURL,
// interveners: process.interveners,
// originator: process.originator,
// serialNumber: process.serialNumber,
// taskStartDate: process.taskStartDate,
// TaskStartDate: process.taskStartDate,
// totalDocuments: process.totalDocuments,
// workflowDisplayName: process.workflowDisplayName,
// workflowID: process.workflowID,
// workflowInstanceDataFields: process.workflowInstanceDataFields,
// workflowInstanceFolio: process.workflowInstanceFolio,
// workflowInstanceID: process.workflowInstanceID,
// workflowName: process.workflowName,
// }
// })
// } else {
// this.platform.ready().then(() => {
// this.onlinecheck = false;
// this.sqliteservice.getProcessById(this.serialNumber).then((process) => {
// var workflow = JSON.parse(process[0].workflowInstanceDataFields);
// var origina
// if (process[0].originator === "undefined") {
// origina = ""
// } else {
// origina = JSON.parse(process[0].originator)
// }
// this.task = {
// "SerialNumber": process[0].serialNumber,
// "Folio": workflow.Subject,
// "Senders": origina.email || process[0].originator,
// "CreateDate": momentG(new Date(process[0].taskStartDate), 'yyyy-MM-dd HH:mm:ss'),
// "DocumentURL": workflow.ViewerRequest,
// "Remetente": workflow.Sender,
// "Note": workflow.TaskMessage || workflow.Note,
// "FolderId": workflow.FolderID,
// "FsId": workflow.FsId,
// "DocId": workflow.DocID,
// "WorkflowName": process[0].workflowDisplayName,
// "Status": workflow.Status,
// "DispatchNumber": workflow.DispatchNumber,
// "AttachmentsProcessLastInstanceID": workflow.AttachmentsProcessLastInstanceID,
// "InstanceID": workflow.InstanceID
// }
// this.fulltask = {
// Documents: JSON.parse(process[0].Documents),
// actions: JSON.parse(process[0].actions),
// activityInstanceName: process[0].activityInstanceName,
// formURL: process[0].formURL,
// interveners: process[0].interveners,
// originator: JSON.parse(process[0].originator),
// serialNumber: process[0].serialNumber,
// taskStartDate: process[0].taskStartDate,
// totalDocuments: process[0].totalDocuments,
// workflowDisplayName: process[0].workflowDisplayName,
// workflowID: process[0].workflowID,
// workflowInstanceDataFields: JSON.parse(process[0].workflowInstanceDataFields),
// workflowInstanceFolio: process[0].workflowInstanceFolio,
// workflowInstanceID: process[0].workflowInstanceID,
// workflowName: process[0].workflowName,
// }
// })
// })
// }
// }
async approve(note: string, documents: any) {
let body = {
"serialNumber": this.serialNumber,
@@ -371,7 +264,8 @@ export class ExpedienteDetailPage implements OnInit {
"DispatchNumber": res.workflowInstanceDataFields.DispatchNumber,
"AttachmentsProcessLastInstanceID": res.workflowInstanceDataFields.AttachmentsProcessLastInstanceID,
"InstanceID": res.workflowInstanceDataFields.InstanceID,
"DraftIds": res.workflowInstanceDataFields?.DraftIds
"DraftIds": res.workflowInstanceDataFields?.DraftIds,
"activityInstanceName": res.activityInstanceName,
}
this.fulltask = res;
@@ -8,16 +8,17 @@ import { ExpedientePrPageRoutingModule } from './expediente-pr-routing.module';
import { ExpedientePrPage } from './expediente-pr.page';
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
import { TaskDetailsPageModule } from "../../../../shared/gabinete-digital/generic/task-details/task-details.module";
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
ExpedientePrPageRoutingModule,
BtnModalDismissPageModule,
],
declarations: [ExpedientePrPage]
declarations: [ExpedientePrPage],
imports: [
CommonModule,
FormsModule,
IonicModule,
ExpedientePrPageRoutingModule,
BtnModalDismissPageModule,
TaskDetailsPageModule
]
})
export class ExpedientePrPageModule {}
@@ -1,116 +1,19 @@
<ion-header class="ion-no-border">
<!-- <app-header > </app-header> -->
</ion-header>
<div class="ion-page d-none" id="main-content">
<ion-menu-button></ion-menu-button>
</div>
<ion-content class="container-wrapper">
<div class="main-content d-flex height-100 overflow-hidden">
<div class="content d-flex flex-column" *ngIf="task">
<div class="main-header" style="overflow: unset !important;">
<div class="title-content width-100 d-flex justify-between">
<div class="font-30-rem cursor-pointer align-center" (click)="goBack()" defaultHref="#">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div>
<div class="middle flex-grow-1">
<ion-label class="title">{{ task.Folio}}</ion-label>
</div>
<div class="menu-ptions">
<button class="btn-no-color" (click)="openOptions()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/theme/blue/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
</button>
</div>
</div>
</div>
<div class="upper-content" style="overflow: unset !important;">
<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"></div>
<div class="d-flex flex-column" *ngIf="task">
<app-task-details
*ngIf="task"
[task]=task
[intervenientes]=intervenientes
[cc]=cc
[customDate]=customDate
[mergedArray]="fulltask.Documents"
(openOptions)= openOptions()
(goBack)= goBack()
class="d-flex height-100 flex-column content"
[fulltask]="fulltask"
></app-task-details>
<div class="overflow-y-auto">
<div class="middle-content">
<!-- <h5 *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="fulltask.workflowInstanceDataFields.TaskMessage">
<h5 class="font-17-rem">Detalhes</h5>
<ion-item class="ion-no-margin ion-no-padding">
<pre class="width-100 text">{{ fulltask.workflowInstanceDataFields.TaskMessage }} </pre>
</ion-item>
</div>
</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 fulltask.Documents">
<ion-label class="d-block" (click)="viewDocument(Document.DocId, Document)">
<p class="attach-title-item">{{ Document.Assunto || "Sem assunto" }}<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-yyyy HH:mm' }}</span></p>
</ion-label>
</ion-item>
</ion-list>
</div>
<div *ngIf="eventsList">
<h3 class="h3-event-title">Eventos Associados</h3>
<ion-list>
<div *ngIf="eventsList">
<ion-item-sliding>
<ion-item
class="Rectangle" lines="none"
*ngFor="let event of eventsList"
(click)="viewEventDetail(event.EventId)"
>
<div class="content-{{profile}}-{{event.CalendarName}} width-100 ">
<div class="approve-event-time">
<p>{{event.StartDate | date: 'HH:mm'}}</p>
<p>{{event.EndDate | date: 'HH:mm'}}</p>
</div>
<div class="approve-event-detail">
<p *ngIf="event.StartDate != event.EndDate">{{event.StartDate | date: 'd/M/yy' }} - {{ event.EndDate | date: 'dd/mm/yy'}} | {{event.Location}}</p>
<p *ngIf="event.StartDate == event.EndDate">{{event.StartDate | date: 'd/M/yy' }} | {{event.Location}}</p>
<h3>{{event.Subject}}</h3>
</div>
</div>
</ion-item>
</ion-item-sliding>
</div>
</ion-list>
</div>
</div>
</div>
<div *ngIf="task" class="aside-right flex-column height-100 overflow-y-auto">
@@ -8,16 +8,17 @@ import { PedidoPageRoutingModule } from './pedido-routing.module';
import { PedidoPage } from './pedido.page';
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
import { TaskDetailsPageModule } from "../../../../shared/gabinete-digital/generic/task-details/task-details.module";
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
PedidoPageRoutingModule,
BtnModalDismissPageModule,
],
declarations: [PedidoPage]
declarations: [PedidoPage],
imports: [
CommonModule,
FormsModule,
IonicModule,
PedidoPageRoutingModule,
BtnModalDismissPageModule,
TaskDetailsPageModule
]
})
export class PedidoPageModule {}
@@ -1,84 +1,18 @@
<ion-content class="container-wrapper">
<div class="main-content d-flex height-100 overflow-hidden">
<div class="content d-flex flex-column" *ngIf="task">
<div class="main-header ">
<div class="title-content width-100 d-flex justify-space-between ">
<div class="font-30-rem cursor-pointer d-flex height-100 align-center" (click)="goBack()" defaultHref="#">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/doneIt/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div>
<!-- <app-btn-modal-dismiss></app-btn-modal-dismiss> -->
<div class="middle flex-grow-1">
<ion-label class="title">{{ task.Folio}}</ion-label>
</div>
<div class="div-icon d-flex">
<div autoHide="false" class="d-flex" (click)="openOptions()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-30-rem cursor-pointer" src="assets/images/theme/blue/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-30-rem cursor-pointer" src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
</div>
</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"></div>
<div class="overflow-y-auto">
<div class="middle-content">
<h5 *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>
</div>
<div class="bottom-content width-100">
<ion-list>
<h5 class="font-17-rem">Documentos Anexados</h5>
<ion-item *ngFor="let attachment of attachments"
class="ion-no-margin ion-no-padding cursor-pointer"
>
<ion-label
(click)="viewDocument(attachment.DocId, attachment)"
>
<p *ngIf="attachment.Assunto" class="attach-title-item">{{ attachment.Assunto }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
<p *ngIf="!attachment.Assunto" class="attach-title-item">{{ attachment.DocNumber }}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
<p><span class="span-left">{{attachment.Sender}}</span><span class="span-right">{{ attachment.DocDate | date: 'dd/MM/yy' }}</span></p>
</ion-label>
</ion-item>
</ion-list>
</div>
</div>
<app-task-details
*ngIf="task"
[task]=task
[intervenientes]=intervenientes
[cc]=cc
[customDate]=customDate
[mergedArray]="fulltask.Documents"
[fulltask] = "fulltask"
(openOptions)= openOptions()
(goBack)= goBack()
class="d-flex height-100 flex-column"
></app-task-details>
</div>
@@ -173,4 +107,4 @@
</div>
</div>
</div>
</ion-content>
</ion-content>
@@ -5,7 +5,7 @@
border-top-right-radius: 25px;
}
.content{
padding: 30px 20px 0 20px !important;
padding: 0px 0px 0 0px !important;
margin: 0;
float: left;
}
@@ -1,11 +1,11 @@
<div class="height-100 d-flex flex-column overflow-hidden">
<div class="height-100 d-flex flex-column overflow-hidden width-100">
<div class="overflow-x-auto d-flex pa-10" style="background-color: #d9d9d9;" *ngIf="!DeviceService.isDesktop()">
<div class="overflow-x-auto d-flex pa-10 attachment-list" style="background-color: #d9d9d9;" *ngIf="!DeviceService.isDesktop()">
<div *ngFor="let attachment of taskViewerAttachment; let i = index"
class="ion-no-margin ion-no-padding cursor-pointer" class="pa-10 mx-10 card-text"
[ngClass]="{'selected-card': i === selectedIndex}" (click)="clickDocumentUPdateIndex(i)">
<div (click)="clickDocument(attachment)">
class="ion-no-margin ion-no-padding cursor-pointer attachment-list" class="pa-10 mx-10 card-text"
[ngClass]="{'selected-card': i === selectedIndex}">
<div (click)="clickDocument(attachment, i )">
<div *ngIf="attachment.Assunto" class="attach-title-item tex-left">
{{ attachment.Assunto }}<span class="document-type" *ngIf="attachment.content != ''">Rascunho</span>
@@ -20,9 +20,8 @@
</div>
<div #iframeContainer class="height-100" >
<div #iframeContainer class="height-100 flex-1" >
<iframe _ngcontent-lxc-c492="" height="100%" width="100%" title="Iframe Example" class="iframe" src="https://gdviewer-dev.dyndns.info/pdfjs/web/viewpdf.aspx?file=/arq/638429873997432492.pdf&amp;i=MjYxIzgjMTA2IzE3IzEyODA5MSNEb2N1bWVudENlbnRlcg==&amp;e=MA==&amp;p=MA==&amp;m=cGF1bG8ucGludG9AZ2FiaW5ldGVkaWdpdGFsLmxvY2Fs&amp;d=MA==&amp;n=UGF1bG8gUGludG8=&amp;mId=MA==&amp;al=MA==&amp;cn=T0E=&amp;wm=RmFsc2U=&amp;L=MA==&amp;attInstance=MA==&amp;OpenFromMail=MA=="></iframe>
</div>
</div>
@@ -31,3 +31,17 @@ iframe {
.selected-attachment {
border: 2px solid #3498db; /* You can customize the border style and color */
}
@media screen and (orientation:portrait) {
.attachment-list {
}
}
@media screen and (orientation:landscape) {
.attachment-list {
display: none !important;
}
}
@@ -22,40 +22,50 @@ export class ViewerAttachmentPage implements OnInit {
) { }
ngOnInit() {
this.validateParams()
const selectFirst = this.taskViewerAttachment[0]
}
clickDocumentUPdateIndex(index: number) {
// Update the selected index
this.selectedIndex = index;
}
async clickDocument(viewerAttachment: ViewerAttachment, i) {
async clickDocument(viewerAttachment: ViewerAttachment) {
const hasIframe = this.iframeContainer.nativeElement.querySelector("iframe")
if(hasIframe) {}
let count = 0
try {
setTimeout(async ()=> {
this.selectedIndex = i;
this.iframeContainer.nativeElement.innerHTML = ""
this.iframeContainer
this.iframeContainer.nativeElement.innerHTML = ""
this.iframeContainer
const linkRequest = await this.middlewareRepositoryService.getViewerLink({
ApplicationId: viewerAttachment.ApplicationId,
DocId: viewerAttachment.DocId
})
const linkRequest = await this.middlewareRepositoryService.getViewerLink({
ApplicationId: viewerAttachment.ApplicationId,
DocId: viewerAttachment.DocId
})
if(linkRequest.isOk()) {
// alert(`ApplicationId:${viewerAttachment.ApplicationId}, DocId: ${viewerAttachment.DocId}`)
// Optionally, you can add new content or recreate the iframe
var newIframe = document.createElement('iframe');
newIframe.src = linkRequest.value;
if(linkRequest.isOk()) {
newIframe.width = '100%'
newIframe.height = '100%'
// Optionally, you can add new content or recreate the iframe
var newIframe = document.createElement('iframe');
newIframe.src = linkRequest.value;
newIframe.width = '100%'
newIframe.height = '100%'
this.iframeContainer.nativeElement.appendChild(newIframe)
}
}, 1000)
} catch (error) {
this.clickDocument(viewerAttachment, i);
this.iframeContainer.nativeElement.appendChild(newIframe)
}
}
validateParams() {
@@ -73,9 +83,8 @@ export class ViewerAttachmentPage implements OnInit {
ngOnChanges() {
this.clickDocumentUPdateIndex(this.selectedIndex)
const task = this.taskViewerAttachment[this.selectedIndex]
this.clickDocument(task)
this.clickDocument(task, this.selectedIndex)
}
}
+3 -2
View File
@@ -21,7 +21,7 @@ import { FirstEnterService } from '../../services/first-enter.service';
import { Storage } from '@ionic/storage';
import { CPSession } from 'src/app/store/documentManagement';
import { StorageService } from 'src/app/services/storage.service';
import { DeviceService } from 'src/app/services/device.service'
@Component({
selector: 'app-login',
templateUrl: './login.page.html',
@@ -59,7 +59,8 @@ export class LoginPage implements OnInit {
private FirstEnterService: FirstEnterService,
private storage: Storage,
private storageService: StorageService,
private NotificationHolderService: NotificationHolderService
private NotificationHolderService: NotificationHolderService,
private DeviceService: DeviceService
) { }
ngOnInit() { }
+25 -21
View File
@@ -121,31 +121,35 @@ export class ChatSystemService {
}
});
if (!this.platform.is('desktop')) {
App.addListener('appStateChange', ({ isActive }) => {
if (isActive) {
// The app is in the foreground.
console.log('App is in the foreground');
try {
if (!this.platform.is('desktop')) {
App.addListener('appStateChange', ({ isActive }) => {
if (isActive) {
// The app is in the foreground.
console.log('App is in the foreground');
if (SessionStore.user?.ChatData?.data) {
this.currentRoom?.loadHistory({ forceUpdate: true })
}
setTimeout(() => {
if (SessionStore.user?.ChatData?.data) {
this.subscribeToRoom()
this.RochetChatConnectorService.setStatus('online')
this.currentRoom?.loadHistory({ forceUpdate: true })
}
}, 1000);
/* this.reloadComponent(true) */
} else {
// The app is in the background.
console.log('App is in the background');
// You can perform actions specific to the background state here.
}
});
}
setTimeout(() => {
if (SessionStore.user?.ChatData?.data) {
this.subscribeToRoom()
this.RochetChatConnectorService.setStatus('online')
}
}, 1000);
/* this.reloadComponent(true) */
} else {
// The app is in the background.
console.log('App is in the background');
// You can perform actions specific to the background state here.
}
});
}
} catch(error) {}
}
+27 -3
View File
@@ -1,20 +1,44 @@
import { Injectable } from '@angular/core';
import { Platform } from '@ionic/angular';
// import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
import { ScreenOrientation, OrientationType } from '@capawesome/capacitor-screen-orientation';
@Injectable({
providedIn: 'root'
})
export class DeviceService {
constructor( private platform: Platform,) { }
currentOrientation: 'portrait' | 'landscape';
constructor( private platform: Platform) {
}
ngOnInit() {
this.detectOrientation();
}
isTableDivice() {
return false;
return this.platform.is("tablet");
}
isDesktop() {
return true;
return this.platform.is('desktop');
}
private detectOrientation() {
this.currentOrientation = this.platform.isPortrait() ? 'portrait' : 'landscape';
}
isTableLandscape() {
this.detectOrientation()
return this.isTableDivice() && this.currentOrientation == 'landscape' ;
}
get visionDesktop () {
return this.isDesktop() || this.isTableLandscape();
}
}
@@ -11,7 +11,7 @@ import { ChatUserStorage } from 'src/app/store/chat/chat-user.service';
import { TimeService } from 'src/app/services/functions/time.service';
import { FileService } from 'src/app/services/functions/file.service';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { ThemeService } from 'src/app/services/theme.service'
import { ThemeService } from 'src/app/services/theme.service';
import { ViewEventPage } from 'src/app/modals/view-event/view-event.page';
import { Storage } from '@ionic/storage';
import { ChatSystemService } from 'src/app/services/chat/chat-system.service'
@@ -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();
}
}
+1 -1
View File
@@ -4,4 +4,4 @@ import { doneITProd } from './suport/doneIt'
import { DevDev } from './suport/dev'
export const environment: Environment = oaprProd;
export const environment: Environment = DevDev;