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:
@@ -21,6 +21,7 @@ import { PedidoService } from 'src/app/Rules/pedido.service'
|
||||
import { fullTask } from 'src/app/models/dailyworktask.model';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
@@ -98,6 +99,7 @@ export class CreateProcessPage implements OnInit {
|
||||
private despachoService: DespachoService,
|
||||
private pedidoService: PedidoService,
|
||||
public ThemeService: ThemeService,
|
||||
private httpsErrorHanlde: HttpErrorHandle
|
||||
) {
|
||||
this.loggeduser = SessionStore.user;
|
||||
this.task = this.navParams.get('task');
|
||||
@@ -297,14 +299,9 @@ export class CreateProcessPage implements OnInit {
|
||||
await this.despachoService.EfectuarDespacho({note: this.dispatchFolder.Message, serialnumber: this.task.serialNumber, activityInstanceName: this.task.activityInstanceName}).toPromise();
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService._successMessage('Despacho criado');
|
||||
this.httpsErrorHanlde.httpsSucessMessagge('Efetuar Despacho')
|
||||
} 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 efectuado');
|
||||
}
|
||||
this.httpsErrorHanlde.httpStatusHandle(error)
|
||||
|
||||
} finally {
|
||||
loader.remove()
|
||||
@@ -333,15 +330,10 @@ export class CreateProcessPage implements OnInit {
|
||||
}
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService._successMessage('Pedido de Parecer enviado');
|
||||
this.httpsErrorHanlde.httpsSucessMessagge('Solicitar Parecer')
|
||||
}
|
||||
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 efectuado');
|
||||
}
|
||||
this.httpsErrorHanlde.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -363,15 +355,10 @@ export class CreateProcessPage implements OnInit {
|
||||
await this.pedidoService.taskCompleteDeferimento({note: this.postData.DispatchFolder.Message,serialNumber:this.task.serialNumber}).toPromise();
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService._successMessage('Pedido de Deferimento criado');
|
||||
this.httpsErrorHanlde.httpsSucessMessagge('Pedido de Deferimento')
|
||||
}
|
||||
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 efectuado');
|
||||
}
|
||||
this.httpsErrorHanlde.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -397,14 +384,9 @@ export class CreateProcessPage implements OnInit {
|
||||
await this.despachoService.CompleteTask({serialNumber: this.task.serialNumber, note: this.dispatchFolder.Message}).toPromise();
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService._successMessage('Despacho criado');
|
||||
this.httpsErrorHanlde.httpsSucessMessagge('Efetuar Despacho')
|
||||
} 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 efectuado');
|
||||
}
|
||||
this.httpsErrorHanlde.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove();
|
||||
}
|
||||
@@ -437,15 +419,10 @@ export class CreateProcessPage implements OnInit {
|
||||
}
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService._successMessage('Pedido de Parecer criado');
|
||||
this.httpsErrorHanlde.httpsSucessMessagge('Solicitar Parecer')
|
||||
}
|
||||
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 efectuado');
|
||||
}
|
||||
this.httpsErrorHanlde.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -467,15 +444,10 @@ export class CreateProcessPage implements OnInit {
|
||||
await this.pedidoService.taskCompleteDeferimento({note: this.postData.DispatchFolder.Message, serialNumber:this.task.serialNumber}).toPromise();
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService._successMessage('Pedido de Deferimento criado');
|
||||
this.httpsErrorHanlde.httpsSucessMessagge('Pedido de Deferimento')
|
||||
}
|
||||
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 efectuado');
|
||||
}
|
||||
this.httpsErrorHanlde.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -528,14 +500,9 @@ export class CreateProcessPage implements OnInit {
|
||||
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.toastService._successMessage(message);
|
||||
this.httpsErrorHanlde.httpsSucessMessagge('Efetuar Despacho')
|
||||
} 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 efectuado');
|
||||
}
|
||||
this.httpsErrorHanlde.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('Location')?.invalid && validateFrom ">
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Localização*" [(ngModel)]="postData.Location"></ion-input>
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Localização" [(ngModel)]="postData.Location"></ion-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,6 +16,7 @@ import { SearchList } from 'src/app/models/search-document';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -55,7 +56,8 @@ export class ForwardPage implements OnInit {
|
||||
private alertService: AlertService,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService
|
||||
public ThemeService: ThemeService,
|
||||
private httpErroHandle: HttpErrorHandle
|
||||
) {
|
||||
this.task = this.navParams.get('task');
|
||||
this.postData = new Event();
|
||||
@@ -147,16 +149,11 @@ export class ForwardPage implements OnInit {
|
||||
"AttachmentList" :docs,
|
||||
}
|
||||
this.processes.CompleteParecerPrTask(body).subscribe(res=>{
|
||||
this.toastService._successMessage('Processo Reencaminhado');
|
||||
this.httpErroHandle.httpsSucessMessagge('Reencaminhar')
|
||||
this.goBack();
|
||||
},
|
||||
(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.httpErroHandle.httpStatusHandle(error)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user