This commit is contained in:
Peter Maquiran
2023-08-14 16:25:57 +01:00
parent 4ae2e7cfa8
commit 0c64632986
10 changed files with 107 additions and 19 deletions
@@ -128,11 +128,11 @@
<span class="span-right">{{ attach.CreateDate | date: 'dd-MM-yyyy HH:mm' }}</span>
</div>
<div (click)="docIndex(i);LoadDocumentDetails()" class="doc-options">
<!-- <div (click)="docIndex(i);LoadDocumentDetails()" class="doc-options">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' "
src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
</div>
</div> -->
</ion-label>
</li>
@@ -68,7 +68,7 @@ export class ContactsPage implements OnInit {
username: username,
}
this.chatService.createRoom(body).subscribe(res => {
this.ChatSystemService.getAllRooms();
this.room = res['room'];
this.openMessage.emit(this.room._id);
});
@@ -13,6 +13,7 @@ import { ThemeService } from 'src/app/services/theme.service'
import { RouteService } from 'src/app/services/route.service';
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { environment } from 'src/environments/environment';
import { TaskService } from 'src/app/services/task.service'
@Component({
selector: 'app-despachos-options',
@@ -36,6 +37,7 @@ export class DespachosOptionsPage implements OnInit {
public ThemeService: ThemeService,
private RouteService: RouteService,
private httpErrorHandle: HttpErrorHandle,
public TaskService: TaskService
) {
this.task = this.navParams.get('task')
this.fulltask = this.navParams.get('fulltask')
@@ -249,7 +251,7 @@ export class DespachosOptionsPage implements OnInit {
await this.generateDiploma(res.data.note, docs);
}
else if(actionName == 'Concluido') {
//this.concluir(res.data.note, docs);
this.concluir(res.data.note, docs);
}
else if(actionName == 'Reexecução') {
await this.reexecutar(res.data.note, docs);
@@ -261,6 +263,34 @@ export class DespachosOptionsPage implements OnInit {
});
}
async concluir(note: string, documents: any) {
let body = {
"serialNumber": this.serialNumber,
"action": "Arquivo",
"ActionTypeId": 95,
"dataFields": {
"ReviewUserComment": note,
},
"AttachmentList": documents,
}
const loader = this.toastService.loading()
try {
await this.processes.CompleteTask(body).toPromise()
this.httpErrorHandle.httpsSucessMessagge('Concluir Despacho')
this.TaskService.loadDiplomas()
} catch (error) {
this.httpErrorHandle.httpStatusHandle(error)
}
finally {
loader.remove()
}
}
async arquivar(note:string, documents:any) {
let body = {
"serialNumber": this.serialNumber,
@@ -311,8 +311,8 @@ export class DespachosPrOptionsPage implements OnInit {
async concluir(note:string, documents:any){
let body = {
"serialNumber": this.serialNumber,
"action": "Executado",
"ActionTypeId": 104,
"action": "Arquivo",
"ActionTypeId": 95,
"dataFields": {
"ReviewUserComment": note,
},