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:
+2
-2
@@ -61,7 +61,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>
|
||||
@@ -314,7 +314,7 @@
|
||||
<ion-footer>
|
||||
<div class="buttons">
|
||||
<button class="btn-cancel" shape="round" (click)="close()">Cancelar</button>
|
||||
<button class="btn-ok" shape="round" (click)="saveTask()">Enviar</button>
|
||||
<button class="btn-ok" shape="round" (click)="saveTask()">Gravar</button>
|
||||
</div>
|
||||
</ion-footer>
|
||||
|
||||
|
||||
+7
-14
@@ -20,6 +20,7 @@ import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-pick
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { RoleIdService } from 'src/app/services/role-id.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
|
||||
const moment = _rollupMoment || _moment;
|
||||
@@ -120,7 +121,8 @@ export class BookMeetingModalPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService,
|
||||
public eventService: EventsService,
|
||||
public RoleIdService: RoleIdService
|
||||
public RoleIdService: RoleIdService,
|
||||
private httpErroHandle: HttpErrorHandle
|
||||
|
||||
|
||||
) {
|
||||
@@ -304,15 +306,10 @@ export class BookMeetingModalPage implements OnInit {
|
||||
await this.calendarService.genericPostExpedientEvent(this.task.DocId, this.postData, "",this.task.SerialNumber, this.task.FsId, CalendarId).toPromise();
|
||||
|
||||
this.modalController.dismiss();
|
||||
this.toastService._successMessage('Reunião criada');
|
||||
this.httpErroHandle.httpsSucessMessagge('Marcar Reunião')
|
||||
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest('Reunião não criada')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
@@ -329,14 +326,10 @@ export class BookMeetingModalPage implements OnInit {
|
||||
await this.calendarService.genericCreateTaskEvent(this.task.FolderID | this.task.FolderId, this.postData, "",this.task.SerialNumber, this.task.FsId, CalendarId).toPromise();
|
||||
|
||||
this.close();
|
||||
this.toastService._successMessage('Reunião criada');
|
||||
this.httpErroHandle.httpsSucessMessagge('Marcar Reunião')
|
||||
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
+13
-35
@@ -24,6 +24,7 @@ import { SearchDocumentPipe } from 'src/app/pipes/search-document.pipe';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
@@ -111,6 +112,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
private despachoService: DespachoService,
|
||||
public ThemeService: ThemeService,
|
||||
public p: PermissionService,
|
||||
private httpErroHandle: HttpErrorHandle,
|
||||
) {
|
||||
|
||||
this.loggeduser = SessionStore.user;
|
||||
@@ -325,16 +327,11 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
try {
|
||||
|
||||
this.taskResult = await this.processes.postDespatcho(this.postData).toPromise();
|
||||
await this.toastService._successMessage('Processo efetuado');
|
||||
await this.httpErroHandle.httpsSucessMessagge('Efetuar Despacho')
|
||||
this.modalController.dismiss(action_despacho);
|
||||
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
await this.toastService._badRequest('Processo não efetuado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -364,16 +361,12 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
try {
|
||||
this.taskResult = await this.processes.postParecer(this.postData).toPromise();
|
||||
await this.toastService._successMessage('Pedido enviado');
|
||||
await this.httpErroHandle.httpsSucessMessagge('Solicitar Parecer')
|
||||
|
||||
this.modalController.dismiss(action_parecer);
|
||||
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
await this.toastService._badRequest('Processo não efetuado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -401,15 +394,10 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
try {
|
||||
|
||||
this.taskResult = await this.processes.postDeferimento(this.postData).toPromise();
|
||||
this.toastService._successMessage('Processo efetuado');
|
||||
this.httpErroHandle.httpsSucessMessagge('Pedido de Deferimento')
|
||||
this.modalController.dismiss(action_deferimento);
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
await this.toastService._badRequest('Processo não efetuado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -444,15 +432,10 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
if(this.postData.DispatchFolder.Message){
|
||||
try {
|
||||
this.taskResult = await this.despachoService.createDespacho(this.postData).toPromise();
|
||||
await this.toastService._successMessage('Processo efetuado');
|
||||
await this.httpErroHandle.httpsSucessMessagge('Efetuar Despacho')
|
||||
this.modalController.dismiss(action_despacho_pr);
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
await this.toastService._badRequest('Processo não efetuado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
//loader.remove()
|
||||
}
|
||||
@@ -486,15 +469,10 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
try {
|
||||
this.taskResult = await this.processes.postParecerPr(this.postData).toPromise();
|
||||
await this.toastService._successMessage('Pedido enviado');
|
||||
await this.httpErroHandle.httpsSucessMessagge('Solicitar Parecer')
|
||||
this.modalController.dismiss(action_parecer_pr);
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
await this.toastService._badRequest('Processo não efetuado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
+9
-27
@@ -35,6 +35,7 @@ import { Storage } from '@ionic/storage';
|
||||
import { LoginUserRespose } from 'src/app/models/user.model';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expediente-detail',
|
||||
@@ -88,6 +89,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
private dataService: DataService,
|
||||
private storage: Storage,
|
||||
private userAuth: AuthService,
|
||||
private httpErroHandle: HttpErrorHandle
|
||||
) {
|
||||
this.loggeduser = SessionStore.user
|
||||
console.log('SessionStore', SessionStore)
|
||||
@@ -242,14 +244,9 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
this.close();
|
||||
this.toastService._successMessage('Processo aprovado')
|
||||
this.httpErroHandle.httpsSucessMessagge('Avaliação Superiror')
|
||||
} 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 aprovado')
|
||||
}
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -272,14 +269,9 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
try {
|
||||
await this.processes.CompleteTask(body).toPromise()
|
||||
this.close();
|
||||
this.toastService._successMessage()
|
||||
this.httpErroHandle.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.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
@@ -402,17 +394,12 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
this.getFromDB();
|
||||
} else {
|
||||
try {
|
||||
this.toastService._badRequest('Processo não encontrado')
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
this.goBack()
|
||||
} catch (e) {
|
||||
window.history.back();
|
||||
}
|
||||
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.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
});
|
||||
|
||||
@@ -545,12 +532,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
await this.processes.CompleteTask(body).toPromise();
|
||||
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.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user