mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Merge branch 'feature/viewer-attachment' of https://bitbucket.org/equilibriumito/gabinete-digital-fo into feature/viewer-attachment
This commit is contained in:
@@ -260,7 +260,8 @@
|
||||
<div class="description">
|
||||
<p class="m-0">{{event.event.Subject}}</p>
|
||||
</div>
|
||||
<div class="location">{{event.event.Subject}}</div>
|
||||
|
||||
<div class="location">{{event.event.Location}}</div>
|
||||
<div class="font-13 calendar-owner"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
|
||||
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template>
|
||||
</div>
|
||||
|
||||
@@ -18,6 +18,7 @@ import { RouteService } from 'src/app/services/route.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle} from 'src/app/services/http-error-handle.service'
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { DateService } from 'src/app/services/date.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-event',
|
||||
@@ -70,6 +71,7 @@ export class ViewEventPage implements OnInit {
|
||||
private RouteService: RouteService,
|
||||
private httpErrorHandle: HttpErrorHandle,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private dateService: DateService
|
||||
) {
|
||||
|
||||
|
||||
@@ -191,6 +193,7 @@ export class ViewEventPage implements OnInit {
|
||||
if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
|
||||
this.eventsService.getEvent(this.eventId).subscribe(res => {
|
||||
|
||||
res = this.dateService.fixDate(res as any)
|
||||
this.loadedEvent = res;
|
||||
this.setTimeZone()
|
||||
// this.addEventToDb(res);
|
||||
@@ -218,6 +221,7 @@ export class ViewEventPage implements OnInit {
|
||||
/* const div = document.createElement("div")
|
||||
div.innerHTML = res.Body.Text
|
||||
res.Body.Text = div.innerText */
|
||||
res = this.dateService.fixDate(res as any)
|
||||
this.loadedEvent = res;
|
||||
console.log('pass,',res)
|
||||
this.setTimeZone()
|
||||
|
||||
@@ -8,8 +8,8 @@ import { DiplomaPageRoutingModule } from './diploma-routing.module';
|
||||
|
||||
import { DiplomaPage } from './diploma.page';
|
||||
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
|
||||
import { DiplomaOptionsPage } from 'src/app/shared/popover/desktop/deploma-options/deploma-options.page';
|
||||
import { TaskDetailsPageModule } from 'src/app/shared/gabinete-digital/generic/task-details/task-details.module';
|
||||
import { DiplomaOptionsPage } from 'src/app/shared/popover/deploma-options/deploma-options.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
||||
+5
-5
@@ -11,11 +11,11 @@
|
||||
<div class="ion-item-container width-100" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Assunto*" [(ngModel)]="postData.DispatchFolder.Subject"></ion-input>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('Subject').invalid " class="input-errror-message">
|
||||
<div *ngIf="Form.get('Subject').errors?.required">
|
||||
|
||||
|
||||
</div>
|
||||
<div *ngIf="Form.get('Subject').errors?.minlength">
|
||||
O campo deve ter pelo menos 4 caracteres.
|
||||
@@ -40,7 +40,7 @@
|
||||
<!-- <div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('Location').invalid " class="input-errror-message">
|
||||
<div *ngIf="Form.get('Location').errors?.required">
|
||||
|
||||
|
||||
</div>
|
||||
<div *ngIf="Form.get('Location').errors?.minlength">
|
||||
O campo deve ter pelo menos 4 caracteres.
|
||||
@@ -84,7 +84,7 @@
|
||||
<div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('Priority').invalid " class="input-errror-message">
|
||||
<div *ngIf="Form.get('Priority').errors?.required">
|
||||
|
||||
|
||||
</div>
|
||||
<div *ngIf="Form.get('Priority').errors?.minlength">
|
||||
O campo deve ter pelo menos 4 caracteres.
|
||||
@@ -123,7 +123,7 @@
|
||||
<div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('selectedTypes').invalid " class="input-errror-message">
|
||||
<div *ngIf="Form.get('selectedTypes').errors?.required">
|
||||
|
||||
|
||||
</div>
|
||||
<div *ngIf="Form.get('selectedTypes').errors?.minlength">
|
||||
O campo deve ter pelo menos 4 caracteres.
|
||||
|
||||
+9
-8
@@ -79,7 +79,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
documents:SearchList[] = [];
|
||||
|
||||
subjectTypes:any;
|
||||
selectedTypes: string[]=[];
|
||||
selectedTypes: string = ''
|
||||
SearchFolder: any = []
|
||||
|
||||
postData: Despacho;
|
||||
@@ -177,12 +177,10 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
// console.log('this.document', this.document)
|
||||
|
||||
|
||||
if(this.loggeduser.Profile == 'PR') {
|
||||
this.selectedTypes = ['99999850'];
|
||||
this.placeholderSubject = 'Indefinido'
|
||||
} else {
|
||||
this.placeholderSubject = 'Selecione o tipo de assunto*'
|
||||
}
|
||||
|
||||
|
||||
this.placeholderSubject = 'Indefinido'
|
||||
|
||||
|
||||
this.postData = new Despacho();
|
||||
this.participants = this.participants = new Array();
|
||||
@@ -230,7 +228,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.selectedTypes = ev.filter(data => data != '99999850');
|
||||
}
|
||||
if(ev.length == 0){
|
||||
this.selectedTypes = ["99999850"];
|
||||
this.selectedTypes = "99999850";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,6 +241,9 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.processes.GetSubjectType().subscribe(res=>{
|
||||
|
||||
this.subjectTypes = res;
|
||||
|
||||
this.placeholderSubject = 'Selecione o tipo de assunto*'
|
||||
this.selectedTypes = '99999844';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -3,76 +3,84 @@
|
||||
<div class="d-flex overflow-x-auto pa-10 width-100" style="background-color: #d9d9d9;" *ngIf="showAttachmentList">
|
||||
|
||||
<div *ngFor="let attachment of taskViewerAttachment; let i = index"
|
||||
class="ion-no-margin ion-no-padding cursor-pointer attachment-list" class="pa-10 mx-10 card-text"
|
||||
class="ion-no-margin ion-no-padding cursor-pointer attachment-list" class="pa-10 mx-10 card-text" [ngClass]="{'selected-attachment': i === selectedIndex}"
|
||||
>
|
||||
<div class="attachment" (touchstart)="startHold($event, attachment, i)" (touchend)="endHold()" (click)="clickDocument(attachment, i )">
|
||||
<div class="attachment" (click)="clickDocument(attachment, i )">
|
||||
|
||||
<div class="attach-title-item tex-left">
|
||||
{{ attachment.Assunto || "Sem assunto" }}
|
||||
<br>
|
||||
{{ attachment.Sender }}
|
||||
<br>
|
||||
<div>{{ attachment.Assunto || "Sem assunto" }}</div>
|
||||
<div class="user" >
|
||||
{{ attachment.Sender }}
|
||||
</div>
|
||||
<span class="document-type" *ngIf="isSelectedAttachmentIsDraft(attachment)">Rascunho</span>
|
||||
<br *ngIf="isSelectedAttachmentIsDraft(attachment)">
|
||||
{{ attachment.DocDate | date: 'dd/MM/yy' }}
|
||||
<div class="date d-flex justify-content-between">
|
||||
<div>
|
||||
{{ attachment.DocDate | date: 'dd/MM/yy' }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
<button (click)="doSomething($event);" mat-icon-button [matMenuTriggerFor]="menu" aria-label="Example icon-button with a menu">
|
||||
<mat-icon>more_vert</mat-icon>
|
||||
</button>
|
||||
<mat-menu #menu="matMenu">
|
||||
<button (click)="openExpedientActionsModal('0', attachment)" mat-menu-item>
|
||||
<span>Efetuar Despacho</span>
|
||||
</button>
|
||||
<button (click)="openExpedientActionsModal('1', attachment)" mat-menu-item >
|
||||
<span>Solicitar Parecer</span>
|
||||
</button>
|
||||
<button *ngIf="!p.userRole(['PR']) && !p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openExpedientActionsModal('1', attachment)" mat-menu-item >
|
||||
<span>Pedido de Deferimento</span>
|
||||
</button>
|
||||
<button (click)="openBookMeetingModal(attachment)" mat-menu-item>
|
||||
<span>Marcar Reunião</span>
|
||||
</button>
|
||||
<button *ngIf="p.userRole('PR')" mat-menu-item>
|
||||
<span>Assinar</span>
|
||||
</button>
|
||||
</mat-menu>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<button mat-icon-button [matMenuTriggerFor]="menu" aria-label="Example icon-button with a menu" style="
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
/* top: -40px; */
|
||||
position: absolute;
|
||||
"></button>
|
||||
<mat-menu #menu="matMenu">
|
||||
<button (click)="openExpedientActionsModal('0', attachment)" mat-menu-item>
|
||||
<span>Efetuar Despacho</span>
|
||||
</button>
|
||||
<button (click)="openExpedientActionsModal('1', attachment)" mat-menu-item >
|
||||
<span>Solicitar Parecer</span>
|
||||
</button>
|
||||
<button *ngIf="!p.userRole(['PR']) && !p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openExpedientActionsModal('1', attachment)" mat-menu-item >
|
||||
<span>Pedido de Deferimento</span>
|
||||
</button>
|
||||
<button (click)="openBookMeetingModal(attachment)" mat-menu-item>
|
||||
<span>Marcar Reunião</span>
|
||||
</button>
|
||||
<button *ngIf="p.userRole('PR')" mat-menu-item>
|
||||
<span>Assinar</span>
|
||||
</button>
|
||||
</mat-menu>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="flex-1" [ngClass]="{'container-img': loading}">
|
||||
<div [ngClass]="{'d-none': draft}" #iframeContainer class="height-100 flex-1 " [ngClass]="{'container-img': loading}" ></div>
|
||||
|
||||
<div [ngClass]="{'d-none': draft}" #iframeContainer class="height-100 flex-1" ></div>
|
||||
<editor
|
||||
*ngIf="taskViewerAttachment[selectedIndex].content"
|
||||
class="container-img height-100 flex-1"
|
||||
apiKey="wr5dk69kive0qr9ig6y5spqvlj3a0tsiwnzdsexnz241k69p"
|
||||
[(ngModel)]="editorContent"
|
||||
[init]="{
|
||||
save_onsavecallback: 'onSaveContent',
|
||||
language: 'pt_PT',
|
||||
height: '100%',
|
||||
menubar: false,
|
||||
autosave_interval:'3s',
|
||||
plugins: [
|
||||
'advlist autolink autosave lists link image charmap print preview anchor',
|
||||
'searchreplace visualblocks code fullscreen',
|
||||
'insertdatetime media table paste code help wordcount print'
|
||||
],
|
||||
toolbar:
|
||||
'undo redo | formatselect | bold italic backcolor | \
|
||||
alignleft aligncenter alignright alignjustify | \
|
||||
bullist numlist outdent indent | removeformat | print | save | help ' }"
|
||||
|
||||
initialValue='{{content}}'
|
||||
[(ngModel)]="content"
|
||||
></editor>
|
||||
</div>
|
||||
|
||||
<editor
|
||||
*ngIf="taskViewerAttachment[selectedIndex].content"
|
||||
class="container-img height-100 flex-1"
|
||||
apiKey="wr5dk69kive0qr9ig6y5spqvlj3a0tsiwnzdsexnz241k69p"
|
||||
[(ngModel)]="editorContent"
|
||||
[init]="{
|
||||
save_onsavecallback: 'onSaveContent',
|
||||
language: 'pt_PT',
|
||||
height: '100%',
|
||||
menubar: false,
|
||||
autosave_interval:'3s',
|
||||
plugins: [
|
||||
'advlist autolink autosave lists link image charmap print preview anchor',
|
||||
'searchreplace visualblocks code fullscreen',
|
||||
'insertdatetime media table paste code help wordcount print'
|
||||
],
|
||||
toolbar:
|
||||
'undo redo | formatselect | bold italic backcolor | \
|
||||
alignleft aligncenter alignright alignjustify | \
|
||||
bullist numlist outdent indent | removeformat | print | save | help ' }"
|
||||
|
||||
initialValue='{{content}}'
|
||||
[(ngModel)]="content"
|
||||
></editor>
|
||||
</div>
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
|
||||
}
|
||||
|
||||
.selected-card {
|
||||
border: 3px solid #ffb703;
|
||||
color: #3498db;
|
||||
}
|
||||
|
||||
iframe {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
@@ -29,7 +24,11 @@ iframe {
|
||||
|
||||
|
||||
.selected-attachment {
|
||||
border: 2px solid #3498db; /* You can customize the border style and color */
|
||||
border: 3px solid #ffb703 !important;
|
||||
color: #3498db !important;
|
||||
.user, .date {
|
||||
color: #3498db !important;
|
||||
}
|
||||
}
|
||||
|
||||
.document-type{
|
||||
@@ -39,3 +38,17 @@ iframe {
|
||||
padding: 5px 13.5px 5px 13.5px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.attach-title-item {
|
||||
.user, .date {
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.container-img {
|
||||
background-image: url(/assets/gif/theme/gov/Blocks-loader.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-position-x: center;
|
||||
background-position-y: center;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ export class ViewerAttachmentPage implements OnInit {
|
||||
content: ""
|
||||
private saveTimeout: any;
|
||||
draft = false
|
||||
loading = false
|
||||
|
||||
constructor(
|
||||
public middlewareRepositoryService: MiddlewareRepositoryService,
|
||||
@@ -56,8 +57,11 @@ export class ViewerAttachmentPage implements OnInit {
|
||||
this.draft = this.isSelectedAttachmentIsDraft(this.taskViewerAttachment[this.selectedIndex])
|
||||
let count = 0
|
||||
|
||||
this.loading = true
|
||||
|
||||
if(this.selectedIndex == i && !this.firstLoad) {
|
||||
this.firstLoad = false
|
||||
this.loading = false
|
||||
return
|
||||
}
|
||||
|
||||
@@ -82,24 +86,29 @@ export class ViewerAttachmentPage implements OnInit {
|
||||
newIframe.width = '100%'
|
||||
newIframe.height = '100%'
|
||||
this.iframeContainer.nativeElement.innerHTML = ""
|
||||
|
||||
setTimeout
|
||||
this.iframeContainer.nativeElement.appendChild(newIframe)
|
||||
|
||||
} else {
|
||||
this.iframeContainer.nativeElement.innerHTML = "Sem documento"
|
||||
}
|
||||
|
||||
this.loading = false
|
||||
this.iframeContainer.nativeElement.style.display = 'flex'
|
||||
} else {
|
||||
|
||||
this.loading = false
|
||||
this.iframeContainer.nativeElement.style.display = 'none'
|
||||
}
|
||||
|
||||
}, 1000)
|
||||
} catch (error) {
|
||||
this.clickDocument(viewerAttachment, i);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
validateParams() {
|
||||
@@ -163,4 +172,9 @@ export class ViewerAttachmentPage implements OnInit {
|
||||
openBookMeetingModal(Document) {
|
||||
window['TaskDetailsPage-openBookMeetingModal'](Document)
|
||||
}
|
||||
|
||||
doSomething(e) {
|
||||
e.stopPropagation();
|
||||
// do other stuff...
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user