This commit is contained in:
Peter Maquiran
2023-09-19 10:21:23 +01:00
parent 527cc0f2a6
commit f51bd246fc
29 changed files with 754 additions and 261 deletions
@@ -41,7 +41,7 @@ export class OptsExpedientePage implements OnInit {
SessionStore = SessionStore;
environment = environment
constructor(
private popoverController: PopoverController,
private modalController: ModalController,
@@ -58,7 +58,7 @@ export class OptsExpedientePage implements OnInit {
public TaskService: TaskService,
private dataService: DataService,
) {
}
ngOnInit() {
@@ -66,12 +66,12 @@ export class OptsExpedientePage implements OnInit {
}
async openNewGroupPage() {
this.dataService.set("newGroup", true);
this.dataService.set("task", this.task);
this.dataService.set("newGroupName", this.task.Folio);
this.dataService.set("documents", this.fulltask.Documents);
this.dataService.set("link", window.location.pathname);
// this.dataService.set("newGroup", true);
// this.dataService.set("task", this.task);
// this.dataService.set("newGroupName", this.task.Folio);
// this.dataService.set("documents", this.fulltask.Documents);
// this.dataService.set("link", window.location.pathname);
const modal = await this.modalController.create({
component: NewGroupPage,
@@ -180,7 +180,7 @@ export class OptsExpedientePage implements OnInit {
});
modal.onDidDismiss().then( async (res) => {
if(res.data){
const DocumentToSave = res.data.documents.map((e) => {
return {
@@ -232,7 +232,7 @@ export class OptsExpedientePage implements OnInit {
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest()
}
} finally {
@@ -249,7 +249,7 @@ export class OptsExpedientePage implements OnInit {
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Processo não encontrado')
}
});
@@ -266,7 +266,7 @@ export class OptsExpedientePage implements OnInit {
"AttachmentList" :documents,
}
const loader = this.toastService.loading()
@@ -313,7 +313,7 @@ export class OptsExpedientePage implements OnInit {
async openExpedientActionsModal(taskAction: any, task: any) {
this.close();
let classs;
@@ -330,9 +330,9 @@ export class OptsExpedientePage implements OnInit {
},
cssClass: classs,
});
modal.onDidDismiss().then(async res=>{
let body = res['data'];
if(res['data']){
const loader = this.toastService.loading()
@@ -344,7 +344,7 @@ export class OptsExpedientePage implements OnInit {
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Processo não descartado')
}
} finally {
@@ -352,7 +352,7 @@ export class OptsExpedientePage implements OnInit {
}
}
else{
}
}, (error) => {
console.log(error)
@@ -373,7 +373,7 @@ export class OptsExpedientePage implements OnInit {
modal.onDidDismiss().then( async (res) => {
if(body == 'descartar') {
if(res['data']== 'Yes') {
@@ -389,7 +389,7 @@ export class OptsExpedientePage implements OnInit {
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Processo não descartado')
}
} finally {
@@ -415,7 +415,7 @@ export class OptsExpedientePage implements OnInit {
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Processo não descartado')
}
} finally {
@@ -424,7 +424,7 @@ export class OptsExpedientePage implements OnInit {
this.goBack();
}
else if(res['data'] == 'No'){
const loader = this.toastService.loading()
try {
@@ -432,7 +432,7 @@ export class OptsExpedientePage implements OnInit {
this.TaskService.loadExpedientes()
this.toastService._successMessage();
this.goBack();
} catch (error) {
} catch (error) {
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {