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:
@@ -13,6 +13,7 @@ import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.pag
|
||||
import { SearchList } from 'src/app/models/search-document';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -52,7 +53,8 @@ export class DelegarPage implements OnInit {
|
||||
public alertController: AlertController,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
) {
|
||||
this.task = this.navParams.get('task');
|
||||
this.postData = new Event();
|
||||
@@ -103,15 +105,11 @@ export class DelegarPage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
this.processes.DelegateTask(body).subscribe(res=>{
|
||||
this.toastService._successMessage('Processo delegado')
|
||||
this.httpErrorHandle.httpsSucessMessagge('Delegar')
|
||||
this.close();
|
||||
},
|
||||
(error)=>{
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
this.toastService._badRequest("Processo não delegado")
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
},
|
||||
()=>{
|
||||
loader.remove()
|
||||
|
||||
Reference in New Issue
Block a user