mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
to many changes
This commit is contained in:
@@ -14,6 +14,7 @@ import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-opts-expediente-pr',
|
||||
@@ -50,6 +51,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
private RouteService: RouteService,
|
||||
public ThemeService: ThemeService,
|
||||
public p: PermissionService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
|
||||
) {
|
||||
|
||||
@@ -141,14 +143,9 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
this.toastService._successMessage()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Aprovar exp')
|
||||
} catch(error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -183,15 +180,10 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(otherbody).toPromise()
|
||||
this.toastService._successMessage('Processo descartado');
|
||||
this.httpErrorHandle.httpsSucessMessagge('Arquivar')
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não descartado')
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -207,15 +199,10 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
// this.toastService.successMessage('Processo descartado');
|
||||
this.httpErrorHandle.httpsSucessMessagge('Arquivar')
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não descartado');
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -227,15 +214,10 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.UpdateTaskStatus(this.task.FolderId).toPromise();
|
||||
this.toastService._successMessage();
|
||||
this.httpErrorHandle.httpsSucessMessagge('Arquivar')
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest();
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -261,14 +243,9 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.close();
|
||||
this.toastService._successMessage()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Rever')
|
||||
} catch(error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErrorHandle.httpsSucessMessagge(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -280,14 +257,10 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
loader.remove()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Enviar para Pendentes')
|
||||
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 encontrado')
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
loader.remove()
|
||||
});
|
||||
}
|
||||
@@ -325,11 +298,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
// this.toastService.successMessage('Processo descartado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
this.toastService._badRequest('Processo não descartado');
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page';
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-opts-expediente',
|
||||
@@ -48,7 +49,8 @@ export class OptsExpedientePage implements OnInit {
|
||||
private attachmentsService: AttachmentsService,
|
||||
private RouteService: RouteService,
|
||||
private expedienteService: ExpedienteService,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private httpErrorHanlde: HttpErrorHandle
|
||||
) {
|
||||
|
||||
}
|
||||
@@ -171,12 +173,7 @@ export class OptsExpedientePage implements OnInit {
|
||||
this.attachmentsService.AddAttachment(body).subscribe((res)=> {
|
||||
this.toastService._successMessage()
|
||||
}, (error) => {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErrorHanlde.httpStatusHandle(error)
|
||||
},()=> {
|
||||
loader.remove()
|
||||
});
|
||||
|
||||
@@ -12,6 +12,7 @@ import { PedidoService } from 'src/app/Rules/pedido.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page';
|
||||
import { ForwardPage } from 'src/app/modals/forward/forward.page';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -37,6 +38,7 @@ export class RequestOptionsPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
public p: PermissionService,
|
||||
private pedidoService: PedidoService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
) {
|
||||
this.task = this.navParams.get('task');
|
||||
this.fulltask = this.navParams.get('fulltask');
|
||||
@@ -88,13 +90,13 @@ export class RequestOptionsPage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
|
||||
|
||||
this.toastService._successMessage()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Enviar para Pendentes')
|
||||
this.close();
|
||||
loader.remove()
|
||||
}, ()=> {
|
||||
}, (error)=> {
|
||||
loader.remove()
|
||||
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
});
|
||||
|
||||
}
|
||||
@@ -195,14 +197,9 @@ export class RequestOptionsPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
this.toastService._successMessage()
|
||||
this.httpErrorHandle.httpsSucessMessagge('Solicitar Reapreciação')
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error);
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -270,14 +267,9 @@ export class RequestOptionsPage implements OnInit {
|
||||
note
|
||||
}).toPromise()
|
||||
|
||||
this.toastService._successMessage('Processo arquivado')
|
||||
this.httpErrorHandle.httpsSucessMessagge('Arquivar')
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Processo não arquivado')
|
||||
}
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user