mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
Improve
This commit is contained in:
@@ -37,15 +37,41 @@
|
||||
<p >{{LoadedDocument.Status}}</p>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="bottom-content width-100">
|
||||
<div class="bottom-content width-100" *ngIf="LoadedDocument">
|
||||
<ion-list>
|
||||
<h5>Documentos Anexados</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding">
|
||||
|
||||
<ion-label
|
||||
(click)="viewDocument()">
|
||||
<p class="attach-title-item">{{LoadedDocument.Assunto}}<span class="span-right color-red btn-size"><ion-icon hidden name="close"></ion-icon></span></p>
|
||||
<p hidden><span class="span-left">Remetente</span><span class="span-right"></span></p>
|
||||
(click)="viewDocument()"
|
||||
*ngIf="LoadedDocument.ApplicationId == 8 || LoadedDocument.ApplicationID == 8"
|
||||
>
|
||||
|
||||
<div class="attach-title-item">
|
||||
{{LoadedDocument.Assunto}}
|
||||
</div>
|
||||
<div class="d-flex justify-between" style="justify-content: space-between">
|
||||
<span class="span-left">{{ LoadedDocument.Sender }}</span>
|
||||
<span class="span-right">{{ LoadedDocument.DocDate | date: 'dd-MM-yyyy HH:mm' }}</span>
|
||||
</div>
|
||||
|
||||
</ion-label>
|
||||
|
||||
<ion-label
|
||||
(click)="viewDocument()"
|
||||
*ngIf="LoadedDocument.ApplicationId == 361 || LoadedDocument.ApplicationID == 361"
|
||||
>
|
||||
<div *ngFor="let Document of LoadedDocument.Documents">
|
||||
<div class="attach-title-item">
|
||||
{{Document.Assunto}}
|
||||
</div>
|
||||
<div *ngIf="Document.Sender" class="d-flex justify-between" style="justify-content: space-between">
|
||||
<span class="span-left">{{ Document.Sender }}</span>
|
||||
<span class="span-right">{{ Document.DocDate | date: 'dd-MM-yyyy HH:mm' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</ion-label>
|
||||
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
@@ -149,12 +149,14 @@ ion-button{
|
||||
/* SPAN */
|
||||
.span-left{
|
||||
float: left;
|
||||
font-size: 15x;
|
||||
font-size: 14px;
|
||||
color: rgb(102, 102, 102) !important;
|
||||
}
|
||||
.span-right{
|
||||
text-align: right;
|
||||
float: right;
|
||||
font-size: 13px;
|
||||
text-align: right;
|
||||
float: right;
|
||||
font-size: 14px;
|
||||
color: rgb(102, 102, 102) !important;
|
||||
}
|
||||
}
|
||||
.aside-right{
|
||||
|
||||
@@ -63,16 +63,16 @@ export class DocumentDetailPage implements OnInit {
|
||||
let task: ExpedientTaskModalPageNavParamsTask
|
||||
let document: FromSearchDocument = this.LoadedDocument
|
||||
let folder: SearchFolder = this.LoadedDocument
|
||||
|
||||
if(this.LoadedDocument.ApplicationID == 361) {
|
||||
|
||||
if(this.LoadedDocument.ApplicationID == 361 || this.LoadedDocument.ApplicationId == 361) {
|
||||
task = {
|
||||
serialNumber: folder.DispatchNumber,
|
||||
taskStartDate: folder.DateDispatch,
|
||||
isEvent: true,
|
||||
workflowInstanceDataFields: {
|
||||
FsId: folder.ApplicationID || folder.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: folder.DispatchNumber,
|
||||
FolderID: folder['FolderId'] || folder['FolderID'] || folder.folderId,
|
||||
DocId: folder.DispatchNumber, // not used
|
||||
Subject: folder.Assunto
|
||||
},
|
||||
}
|
||||
@@ -84,12 +84,12 @@ export class DocumentDetailPage implements OnInit {
|
||||
workflowInstanceDataFields: {
|
||||
FsId: document.ApplicationID || document.ApplicationId,
|
||||
FolderID: null,
|
||||
DocId: document.DocId || document.DocID,
|
||||
DocId: document.DocId || document['DocID'],
|
||||
Subject: document.Assunto
|
||||
}
|
||||
}
|
||||
} else {
|
||||
alert('alert')
|
||||
alert('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! alert')
|
||||
}
|
||||
|
||||
this.task = task
|
||||
@@ -121,7 +121,7 @@ export class DocumentDetailPage implements OnInit {
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
}
|
||||
|
||||
// efetuar despacho
|
||||
// efetuar despacho
|
||||
async openExpedientActionsModal( taskAction: any) {
|
||||
|
||||
let classs;
|
||||
@@ -135,7 +135,8 @@ export class DocumentDetailPage implements OnInit {
|
||||
componentProps: {
|
||||
taskAction: taskAction,
|
||||
task: this.task,
|
||||
seachDocuments: this.LoadedDocument
|
||||
seachDocuments: this.LoadedDocument,
|
||||
aplicationId: this.LoadedDocument.ApplicationId || this.LoadedDocument.ApplicationID
|
||||
},
|
||||
cssClass: classs,
|
||||
});
|
||||
@@ -156,7 +157,7 @@ export class DocumentDetailPage implements OnInit {
|
||||
component: DocumentSetUpMeetingPage,
|
||||
componentProps: {
|
||||
task: this.task,
|
||||
document: this.LoadedDocument
|
||||
document: this.LoadedDocument,
|
||||
},
|
||||
cssClass: classs,
|
||||
backdropDismiss: false
|
||||
|
||||
@@ -136,14 +136,14 @@
|
||||
placeholder="Início*"
|
||||
[(ngModel)]="postData.StartDate"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
minuteValues="0,15,30,45"
|
||||
minuteValues="0,30"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
value="2020-11-19T11:06Z">
|
||||
</ion-datetime>
|
||||
|
||||
<mat-form-field appearance="none" class="width-100 date-hour-picker d-md-block">
|
||||
<input matInput [ngxMatDatetimePicker]="picker1"
|
||||
placeholder="Choose a date*"
|
||||
placeholder="Início*"
|
||||
[formControl]="dateControlStart"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
@@ -169,17 +169,17 @@
|
||||
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('Date')?.invalid && validateFrom ">
|
||||
<ion-datetime
|
||||
class="d-block d-md-none"
|
||||
placeholder="Fim*"
|
||||
placeholder="Início*"
|
||||
[(ngModel)]="postData.EndDate"
|
||||
displayFormat="D MMM YYYY H:mm"
|
||||
minuteValues="0,15,30,45"
|
||||
minuteValues="0,30"
|
||||
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
|
||||
value="2020-11-19T11:06Z">
|
||||
</ion-datetime>
|
||||
|
||||
<mat-form-field appearance="none" class="date-hour-picker width-100 d-none d-md-block">
|
||||
<input matInput [ngxMatDatetimePicker]="fim"
|
||||
placeholder="Choose a date*S"
|
||||
placeholder="Fim*"
|
||||
[formControl]="dateControlEnd"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
@@ -242,7 +242,7 @@
|
||||
|
||||
<mat-form-field class="date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="occurrrence"
|
||||
placeholder="Choose a date"
|
||||
placeholder="Última ocurrência"
|
||||
[(ngModel)]="Occurrence"
|
||||
[disabled]="disabled"
|
||||
>
|
||||
@@ -266,7 +266,7 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class-no-height" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom ">
|
||||
<div class="ion-input-class-no-height cursor-pointer" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom " (click)="addParticipants()">
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
@@ -275,7 +275,7 @@
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="add-people" (click)="addParticipants()">
|
||||
<div class="add-people" >
|
||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
@@ -287,7 +287,7 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-people-cc.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class-no-height">
|
||||
<div class="ion-input-class-no-height cursor-pointer" (click)="addParticipantsCc()">
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
@@ -296,7 +296,7 @@
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="add-people" (click)="addParticipantsCc()">
|
||||
<div class="add-people" >
|
||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -136,7 +136,7 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
this.postData = new Event();
|
||||
this.postData.Body ={ BodyType : "1", Text : ""};
|
||||
|
||||
this.postData.Subject = this.task.Folio;
|
||||
this.postData.Subject = this.task.workflowInstanceDataFields.Subject;
|
||||
this.postData.CalendarName = "Oficial";
|
||||
|
||||
this.postData.Category = 'Reunião'
|
||||
|
||||
@@ -6,7 +6,7 @@ export class ExpedientTaskModalPageNavParamsTask {
|
||||
isEvent: boolean
|
||||
workflowInstanceDataFields: {
|
||||
FsId: any,
|
||||
FolderID: string,
|
||||
FolderID: any,
|
||||
DocId: any,
|
||||
DocID?: any
|
||||
Subject: string,
|
||||
|
||||
@@ -15,7 +15,6 @@ export class FromSearchDocument {
|
||||
Assunto: string
|
||||
DocDate: string
|
||||
DocId: number
|
||||
DocID?: number
|
||||
Sender: string
|
||||
SenderId: number
|
||||
}
|
||||
|
||||
+1
@@ -70,6 +70,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
cssClass: 'exp-options',
|
||||
componentProps: {
|
||||
serialNumber: this.task.SerialNumber,
|
||||
task: this.task,
|
||||
showEnviarPendentes: false
|
||||
},
|
||||
translucent: true
|
||||
|
||||
+1
-1
@@ -180,7 +180,7 @@
|
||||
|
||||
<mat-form-field appearance="none" class="date-hour-picker width-100 d-none d-md-block">
|
||||
<input matInput [ngxMatDatetimePicker]="fim"
|
||||
placeholder="Choose a date*S"
|
||||
placeholder="Fim*"
|
||||
[formControl]="dateControlEnd"
|
||||
[min]="endMinDate"
|
||||
[disabled]="disabled"
|
||||
|
||||
+25
-8
@@ -53,6 +53,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
];
|
||||
taskType:string;
|
||||
task: task;
|
||||
aplicationId = null
|
||||
|
||||
taskParticipants: any = [];
|
||||
taskParticipantsCc: any = [];
|
||||
@@ -65,7 +66,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
subjectTypes:any[] = [];
|
||||
selectedTypes: string[]=[];
|
||||
seachDocuments: any = []
|
||||
SearchFolder: any = []
|
||||
|
||||
postData: Despacho;
|
||||
dispatchFolder: Folder;
|
||||
@@ -111,7 +112,8 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
this.loggeduser = userAuth.ValidatedUser;
|
||||
this.task = this.navParams.get('task');
|
||||
this.seachDocuments = this.navParams.get('seachDocuments');
|
||||
this.SearchFolder = this.navParams.get('SearchFolder');
|
||||
this.aplicationId = this.navParams.get('aplicationId')
|
||||
|
||||
this.taskType = this.navParams.get('taskAction');
|
||||
|
||||
@@ -132,6 +134,18 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
};
|
||||
|
||||
|
||||
if(this.aplicationId == 361) {
|
||||
this.dispatchFolder.SourceType = 'FOLDER'
|
||||
this.dispatchFolder.SourceId = this.task.workflowInstanceDataFields.FolderID
|
||||
} else if(this.aplicationId == 8) {
|
||||
this.dispatchFolder.SourceType = 'DOC'
|
||||
this.dispatchFolder.SourceId = this.task.workflowInstanceDataFields.DocId
|
||||
|
||||
} else {
|
||||
alert('component !!!!')
|
||||
}
|
||||
|
||||
this.postData.DispatchFolder = this.dispatchFolder;
|
||||
this.postData.UsersSelected = this.participants;
|
||||
/* By Default TypeDeadline should be 'Normal' */
|
||||
@@ -262,9 +276,9 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
docs.Attachments = DocumentToSave;
|
||||
|
||||
|
||||
if(this.seachDocuments) {
|
||||
if(this.seachDocuments.Documents) {
|
||||
this.seachDocuments.Documents.forEach( (ele) => {
|
||||
if(this.SearchFolder) {
|
||||
if(this.SearchFolder.Documents) { // 361
|
||||
this.SearchFolder.Documents.forEach( (ele) => {
|
||||
docs.Attachments.push({
|
||||
ApplicationId: 361,
|
||||
Source: 1,
|
||||
@@ -272,13 +286,16 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
SourceName: ele.Assunto
|
||||
})
|
||||
});
|
||||
} else {
|
||||
|
||||
|
||||
} else { // 8
|
||||
docs.Attachments.push({
|
||||
ApplicationId: 8,
|
||||
Source: 1,
|
||||
SourceId: this.seachDocuments.docID || this.seachDocuments.docId || this.seachDocuments.DocId,
|
||||
SourceName: this.seachDocuments.Assunto
|
||||
SourceId: this.SearchFolder.docID || this.SearchFolder.docId || this.SearchFolder.DocId,
|
||||
SourceName: this.SearchFolder.Assunto
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,40 +31,38 @@
|
||||
<div class="main-content d-flex height-100" >
|
||||
<div class="content d-flex flex-column width-100 overflow-y-auto px-20">
|
||||
|
||||
<div class="width-100 flex-grow-1 " *ngIf="expedienteStorage.list">
|
||||
<ion-list>
|
||||
<div
|
||||
<ion-list>
|
||||
<div
|
||||
class="expediente ion-no-padding ion-no-margin cursor-pointer"
|
||||
*ngFor = "let task of expedienteStorage.list"
|
||||
(click)="goToExpediente(task.SerialNumber)"
|
||||
>
|
||||
<div class="item width-100">
|
||||
<div class="exp-top-detail">
|
||||
<div class="subject">
|
||||
<ion-label>{{ task.Folio }}</ion-label>
|
||||
</div>
|
||||
<div class="exp-icon">
|
||||
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<label *ngIf="task.DocumentsQty != 0">{{task.DocumentsQty}}</label>
|
||||
</div>
|
||||
*ngFor = "let task of expedienteStorage.list"
|
||||
(click)="goToExpediente(task.SerialNumber)"
|
||||
>
|
||||
<div class="item width-100">
|
||||
<div class="exp-top-detail">
|
||||
<div class="subject">
|
||||
<ion-label>{{ task.Folio }}</ion-label>
|
||||
</div>
|
||||
<div class="exp-bottom-detail">
|
||||
<div class="exp-remetente">
|
||||
<ion-label>{{task.Senders}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-middle-detail">
|
||||
<div class="exp-workflow">
|
||||
<span class="label">{{task.activityInstanceName}}</span>
|
||||
</div>
|
||||
<div class="exp-date">
|
||||
<ion-label>{{ task.CreateDate | date: 'dd-MM-yy' }}</ion-label>
|
||||
</div>
|
||||
<div class="exp-icon">
|
||||
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<label *ngIf="task.DocumentsQty != 0">{{task.DocumentsQty}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="exp-bottom-detail">
|
||||
<div class="exp-remetente">
|
||||
<ion-label>{{task.Senders}}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</ion-list>
|
||||
</div>
|
||||
<div class="exp-middle-detail">
|
||||
<div class="exp-workflow">
|
||||
<span class="label">{{task.activityInstanceName}}</span>
|
||||
</div>
|
||||
<div class="exp-date">
|
||||
<ion-label>{{ task.CreateDate | date: 'dd-MM-yy' }}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ion-list>
|
||||
|
||||
<div
|
||||
*ngIf="!skeletonLoader && expedienteStorage.list.length == 0 && expedienteStorage.list.length == 0"
|
||||
|
||||
@@ -52,7 +52,7 @@ export class ExpedientePage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async LoadList(){
|
||||
async LoadList() {
|
||||
this.skeletonLoader = true
|
||||
|
||||
try {
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
</p>
|
||||
|
||||
<div class="d-flex pr-10">
|
||||
<span class="span-right">{{ attach.CreateDate | date: 'dd-MM-yy' }}</span>
|
||||
<span class="span-right">{{ attach.CreateDate | date: 'dd-MM-yyyy HH:mm' }}</span>
|
||||
</div>
|
||||
|
||||
<div (click)="docIndex(i);openTaskOptions()" class="doc-options">
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Diploma Assinado'">
|
||||
<button (click)="openAddNoteModal('Concluir diploma')" class="btn-cancel" shape="round" >Concluir</button>
|
||||
</div>
|
||||
<div class="buttons" *ngIf="task.activityInstanceName == 'Assinar Diploma'">
|
||||
<button (click)="openAddNoteModal('Assinar Diploma')" class="btn-cancel" shape="round" >Assinado</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -40,36 +40,6 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
console.log(this.serialnumber);
|
||||
}
|
||||
|
||||
async Assinar() {
|
||||
this.popoverController.dismiss();
|
||||
|
||||
let body = {
|
||||
"action": "Assinado",
|
||||
"serialNumber": this.serialnumber,
|
||||
"ActionTypeId": 99999842,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": '',
|
||||
},
|
||||
"AttachmentList": [],
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
|
||||
this.toastService.successMessage(false, ()=>{
|
||||
this.goBack();
|
||||
})
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
async openAddNoteModal(actionName:string) {
|
||||
this.popoverController.dismiss();
|
||||
@@ -105,16 +75,15 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
Attachments: DocumentToSave,
|
||||
}
|
||||
|
||||
this.Assinar();
|
||||
|
||||
|
||||
if(actionName == 'Solicitar assinatura'){
|
||||
if(actionName == 'Solicitar assinatura') {
|
||||
await this.askSignature(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
else if(actionName == 'Solicitar alteração'){
|
||||
} else if(actionName == 'Solicitar alteração') {
|
||||
await this.askToChange(res.data.note, docs);
|
||||
this.goBack();
|
||||
} else if (actionName == 'Assinar Diploma') {
|
||||
await this.sign(res.data.note, docs);
|
||||
this.goBack();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -166,6 +135,7 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
|
||||
|
||||
async askSignature(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
@@ -192,6 +162,31 @@ export class DeplomaOptionsPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
async sign(note:string, documents:any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialnumber,
|
||||
"action": "Assinado",
|
||||
"ActionTypeId": 99999842,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
},
|
||||
"AttachmentList" :documents,
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
this.toastService.successMessage()
|
||||
} catch (error) {
|
||||
this.toastService.badRequest()
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
goBack() {
|
||||
this.router.navigate(['/home/gabinete-digital/diplomas-assinar']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user