Add page pattern

This commit is contained in:
Peter Maquiran
2021-07-27 21:21:16 +01:00
parent 81c18a14ac
commit 34a16d6b17
4 changed files with 20 additions and 16 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
export class CallMeeting{
export class CallMeeting {
Message: string;
Attachment: {
Attachment: {
Source: number,
SourceId: string,
SourceName: string,
+10
View File
@@ -0,0 +1,10 @@
export class Excludetask{
serialNumber: any;
action: string;
ActionTypeId: any;
dataFields: {
ReviewUserComment?: string,
Note?: any
}
AttachmentList?: any
}
@@ -15,7 +15,7 @@ import { DelegarPage } from 'src/app/modals/delegar/delegar.page';
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
import { DespachosOptionsPage } from 'src/app/shared/popover/despachos-options/despachos-options.page';
import { ToastService } from 'src/app/services/toast.service';
import { DespachoMdService } from 'src/app/Rules/despacho-md.service'
@Component({
selector: 'app-despacho',
templateUrl: './despacho.page.html',
@@ -50,6 +50,7 @@ export class DespachoPage implements OnInit {
private router: Router,
private animationController: AnimationController,
private toastService: ToastService,
private despachoMdService: DespachoMdService
) {
this.activatedRoute.paramMap.subscribe(params => {
if(params["params"].SerialNumber) {
@@ -188,21 +189,12 @@ export class DespachoPage implements OnInit {
this.modalController.dismiss();
}
async executado(note:string, documents:any){
let body = {
"serialNumber": this.serialnumber,
"action": "Conhecimento",
"ActionTypeId": 104,
"dataFields": {
"ReviewUserComment": note,
},
"AttachmentList" :documents,
}
async executado(note:string, documents:any) {
const loader = this.toastService.loading()
try {
await this.processes.CompleteTask(body).toPromise()
await this.despachoMdService.executado(note, documents, this.serialnumber)
this.toastService.successMessage('Processo criado')
this.close();
} catch(error) {
@@ -213,7 +205,7 @@ export class DespachoPage implements OnInit {
}
}
async arquivar(note:string, documents:any){
async arquivar(note:string, documents:any) {
let body = {
"serialNumber": this.serialnumber,
"action": "Arquivo",
@@ -236,6 +228,7 @@ export class DespachoPage implements OnInit {
loader.remove()
}
}
async reencaminhar(note:string, documents:any) {
+2 -1
View File
@@ -6,6 +6,7 @@ import { User } from '../models/user.model';
import { environment } from 'src/environments/environment';
import { Observable } from 'rxjs';
import { CallMeeting } from '../models/CallMeeting';
import { Excludetask } from '../models/Excludetask';
@Injectable({
providedIn: 'root'
@@ -156,7 +157,7 @@ export class ProcessesService {
return this.http.post<any>(`${geturl}`, body, options)
}
CompleteTask(body:any){
CompleteTask(body:Excludetask) {
const geturl = environment.apiURL + 'Tasks/CompleteTask';
let options = {