mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
All changes i made
This commit is contained in:
@@ -4,7 +4,8 @@ import { SearchList } from 'src/app/models/search-document';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-dar-parecer',
|
||||
@@ -23,7 +24,8 @@ export class DarParecerPage implements OnInit {
|
||||
private navParams: NavParams,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private httpErroHanlde: HttpErrorHandle
|
||||
) {
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
this.instanceId = this.navParams.get('ProcessInstanceID');
|
||||
@@ -66,13 +68,9 @@ export class DarParecerPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.modalController.dismiss('sucess');
|
||||
this.toastService._successMessage('Parecer enviado');
|
||||
this.httpErroHanlde.httpsSucessMessagge('Dar o meu Parecer')
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
this.toastService._badRequest("Parecer não solicitado");
|
||||
}
|
||||
this.httpErroHanlde.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user