mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
All changes i made
This commit is contained in:
@@ -11,6 +11,7 @@ import { customTask, fullTask } from 'src/app/models/dailyworktask.model';
|
||||
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 { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-despachos-options',
|
||||
@@ -32,6 +33,7 @@ export class DespachosOptionsPage implements OnInit {
|
||||
public p: PermissionService,
|
||||
public ThemeService: ThemeService,
|
||||
private RouteService: RouteService,
|
||||
private httpErrorHandle: HttpErrorHandle,
|
||||
) {
|
||||
this.task = this.navParams.get('task')
|
||||
this.fulltask = this.navParams.get('fulltask')
|
||||
@@ -74,18 +76,13 @@ export class DespachosOptionsPage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
this.popoverController.dismiss();
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
this.toastService._successMessage()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Enviar para Pendentes')
|
||||
loader.remove()
|
||||
|
||||
this.close();
|
||||
},(error)=>{
|
||||
loader.remove()
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user