mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Add page pattern
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user