This commit is contained in:
Peter Maquiran
2021-08-19 16:39:26 +01:00
parent 29add3f3d5
commit c7524089e5
9 changed files with 25 additions and 15 deletions
-2
View File
@@ -2,8 +2,6 @@ import { Component, OnInit } from '@angular/core';
import { AnimationController, ModalController, NavParams } from '@ionic/angular';
import { SearchDocument } from 'src/app/models/search-document';
import { SearchPage } from 'src/app/pages/search/search.page';
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
@Component({
selector: 'app-add-note',
-2
View File
@@ -9,8 +9,6 @@ import { EventsService } from 'src/app/services/events.service';
import { AttachmentsService } from 'src/app/services/attachments.service';
import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page';
import { AlertService } from 'src/app/services/alert.service';
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { ToastService } from 'src/app/services/toast.service';
import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
import { SearchDocument } from 'src/app/models/search-document';
+13 -4
View File
@@ -1,10 +1,19 @@
export class Excludetask{
serialNumber: any;
export interface Attachment {
SourceId: string;
ApplicationId: number;
}
export interface AttachmentList {
ProcessInstanceID?: string;
Attachments?: Attachment[];
}
export interface Excludetask {
serialNumber: string;
action: string;
ActionTypeId: any;
ActionTypeId?: number;
dataFields: {
ReviewUserComment?: string,
Note?: any
}
AttachmentList?: any
FolderId?: number;
AttachmentList?: AttachmentList | any;
}
+4 -3
View File
@@ -18,6 +18,8 @@ export class Attachments {
ApplicationId: number | string
}
// details
export class FromSearchDocument {
ApplicationId: number
ApplicationID: number
@@ -28,7 +30,7 @@ export class FromSearchDocument {
SenderId: number
}
// details
export class SearchFolder {
ApplicationID: number
ApplicationId: number
@@ -51,5 +53,4 @@ export class SearchFolder {
SenderId: null | string
Status: string
folderId: number
}
}
@@ -17,6 +17,7 @@ import { ToastService } from 'src/app/services/toast.service';
import { DespachoService } from 'src/app/Rules/despacho.service'
import { Location } from '@angular/common'
import { fullTask } from 'src/app/models/dailyworktask.model';
import { Attachment, AttachmentList } from 'src/app/models/Excludetask';
@Component({
selector: 'app-despacho',
@@ -190,7 +191,7 @@ export class DespachoPage implements OnInit {
}
}
async arquivar(note:string, documents:any) {
async arquivar(note:string, documents: AttachmentList) {
let body = {
"serialNumber": this.serialnumber,
"action": "Arquivo",
@@ -159,7 +159,7 @@ export class DiplomaAssinarPage implements OnInit {
"dataFields": {
"ReviewUserComment": '',
},
"AttachmentList": [],
"AttachmentList": {},
}
const loader = this.toastService.loading()
@@ -18,6 +18,7 @@ import { ToastService } from 'src/app/services/toast.service';
import { SearchPage } from 'src/app/pages/search/search.page';
import { SearchDocument } from 'src/app/models/search-document';
import { Location } from '@angular/common';
import { AttachmentList } from 'src/app/models/Excludetask';
@Component({
selector: 'app-expediente-pr',
@@ -340,14 +341,14 @@ export class ExpedientePrPage implements OnInit {
modal.onDidDismiss().then(res => {
console.log(res);
if(res.data){
const DocumentToSave = res.data.documents.map((e) => {
const DocumentToSave = res.data.documents.map((e:SearchDocument) => {
return {
ApplicationId: e.ApplicationType,
SourceId: e.Id,
}
});
let docs = {
let docs: AttachmentList = {
ProcessInstanceID: "",
Attachments: DocumentToSave,
}
@@ -90,6 +90,7 @@ export class OptsExpedientePrPage implements OnInit {
const modal = await this.modalController.create({
component: AddNotePage,
componentProps:{
showAttachmentBtn: false,
},
cssClass: classs,
backdropDismiss: true
@@ -196,6 +196,7 @@ export class RequestOptionsPage implements OnInit {
const modal = await this.modalController.create({
component: AddNotePage,
componentProps:{
showAttachmentBtn: true,
},
cssClass: classs,
backdropDismiss: true