mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
changes Peter
This commit is contained in:
@@ -12,6 +12,9 @@ import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-despachos-pr-options',
|
||||
@@ -37,7 +40,8 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
private RouteService: RouteService,
|
||||
public p: PermissionService,
|
||||
public ThemeService: ThemeService,
|
||||
|
||||
public TaskService: TaskService,
|
||||
private httpErroHandle: HttpErrorHandle,
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
@@ -103,7 +107,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.serialNumber).subscribe(res=>{
|
||||
|
||||
this.toastService._successMessage()
|
||||
this.httpErroHandle.httpsSucessMessagge('Enviar para Pendentes')
|
||||
this.popoverController.dismiss('close')
|
||||
loader.remove()
|
||||
},(error)=>{
|
||||
@@ -299,7 +303,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.toastService._successMessage('')
|
||||
this.httpErroHandle.httpsSucessMessagge('Concluir')
|
||||
this.close();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
@@ -356,6 +360,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.httpErroHandle.httpsSucessMessagge('Executado')
|
||||
this.close();
|
||||
this.toastService.successMessage()
|
||||
} catch(error) {
|
||||
@@ -382,6 +387,7 @@ export class DespachosPrOptionsPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.httpErroHandle.httpsSucessMessagge('Reexecução')
|
||||
this.toastService.successMessage()
|
||||
this.close();
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user