Files
doneit-web/version/git-version.ts
T
2023-12-07 10:51:22 +01:00

13 lines
15 KiB
TypeScript

export let versionData = {
"shortSHA": "680f57313",
"SHA": "680f57313f4d97d944e96c6e3457b7f1a9f379f0",
"branch": "notification-header/feature",
"lastCommitAuthor": "'Peter Maquiran'",
"lastCommitTime": "'Thu Aug 31 12:00:52 2023 +0100'",
"lastCommitMessage": "add attachments",
"lastCommitNumber": "1572",
"change": "diff --git a/src/app/modals/create-process/create-process.page.ts b/src/app/modals/create-process/create-process.page.ts\nindex 6b58016d7..a27c5e424 100644\n--- a/src/app/modals/create-process/create-process.page.ts\n+++ b/src/app/modals/create-process/create-process.page.ts\n@@ -282,7 +282,8 @@ export class CreateProcessPage implements OnInit {\n const DocumentToSave = this.documents.map((e: any) => {\n return {\n ApplicationId: e.ApplicationType || e.ApplicationId,\n- SourceId: e.Id || e.DocId || e.SourceId\n+ SourceId: e.Id || e.DocId || e.SourceId,\n+ SourceName: e.Assunto || e.SourceName || e.Description,\n }\n });\n \ndiff --git a/src/app/modals/document-detail/document-detail.page.ts b/src/app/modals/document-detail/document-detail.page.ts\nindex 629d48c91..1bfcca6e3 100644\n--- a/src/app/modals/document-detail/document-detail.page.ts\n+++ b/src/app/modals/document-detail/document-detail.page.ts\n@@ -129,7 +129,7 @@ export class DocumentDetailPage implements OnInit {\n \n async viewDocumentModal() {\n \n- const selectedDoc = this.LoadedDocument.Documents[ this.dicIndex]\n+ const selectedDoc = this.LoadedDocument\n \n let task = {\n serialNumber: '',\n@@ -154,7 +154,7 @@ export class DocumentDetailPage implements OnInit {\n url: '',\n title_link: '',\n },\n- Document: this.LoadedDocument.Documents[ this.dicIndex],\n+ Document: this.LoadedDocument,\n applicationId: task.workflowInstanceDataFields.SourceSecFsID,\n docId: task.workflowInstanceDataFields.SourceID ,\n folderId: '',\n@@ -192,7 +192,8 @@ export class DocumentDetailPage implements OnInit {\n componentProps: {\n taskAction: taskAction,\n task: this.DocumentTask,\n- aplicationId: this.LoadedDocument.ApplicationId || this.LoadedDocument.ApplicationID\n+ aplicationId: this.LoadedDocument.ApplicationId || this.LoadedDocument.ApplicationID,\n+ document: this.LoadedDocument\n },\n cssClass: classs,\n });\n@@ -213,6 +214,7 @@ export class DocumentDetailPage implements OnInit {\n } else {\n classs = 'modal modal-desktop showAsideOptions'\n }\n+\n const modal = await this.modalController.create({\n component: DocumentSetUpMeetingPage,\n componentProps: {\n@@ -238,7 +240,8 @@ export class DocumentDetailPage implements OnInit {\n cssClass: 'exp-options',\n componentProps: {\n task: this.task,\n- LoadedDocument: this.LoadedDocument\n+ LoadedDocument: this.LoadedDocument,\n+ document: this.LoadedDocument,\n },\n translucent: true\n });\ndiff --git a/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts\nindex 8c68182d4..f7bb03bb0 100644\n--- a/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts\n+++ b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts\n@@ -22,7 +22,7 @@ import { SessionStore } from 'src/app/store/session.service';\n import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';\n import { environment } from 'src/environments/environment';\n import { TaskService } from 'src/app/services/task.service'\n-\n+import { AttachmentsService } from 'src/app/services/attachments.service';\n \n const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {\n parse: {\n@@ -111,15 +111,47 @@ export class DocumentSetUpMeetingPage implements OnInit {\n public ThemeService: ThemeService,\n public _eventService: EventsService,\n private httpErroHandle: HttpErrorHandle,\n- public TaskService: TaskService\n+ public TaskService: TaskService,\n+ private attachmentsService: AttachmentsService,\n ) {\n this.loggeduser = SessionStore.user;\n this.document = this.navParams.get('document')\n \n- if(Array.isArray(this.document)) {\n- this.attachments = this.document\n- } else {\n- this.attachments = [this.document]\n+\n+ if(this.document) {\n+ console.log('this.document', this.document)\n+ if(Array.isArray(this.document)) {\n+ const docs: any = this.document\n+ for(let doc of docs ) {\n+ this.attachments.push({\n+ ApplicationId: (doc.ApplicationType || doc.ApplicationId), \n+ ApplicationType: (doc.ApplicationType || doc.ApplicationId),\n+ SourceId: (doc.Id || doc.DocId || doc.SourceId), \n+ Id: (doc.Id || doc.DocId || doc.SourceId), \n+ EntidadeOrganicaNome: (doc.Stakeholders || doc.sender || doc.EntidadeOrganicaNome ),\n+ Sender: (doc.Stakeholders || doc.sender || doc. EntidadeOrganicaNome ),\n+ Data: (doc.DocDate || doc.Data),\n+ DocDate: (doc.DocDate || doc.Data),\n+ Assunto: doc.Assunto || doc.SourceName || doc.Description,\n+ SourceName: doc.Assunto || doc.SourceName || doc.Description,\n+ } as any)\n+ }\n+ } else {\n+ const doc: any = this.document\n+ this.attachments.push({\n+ ApplicationId: (doc.ApplicationType || doc.ApplicationId), \n+ ApplicationType: (doc.ApplicationType || doc.ApplicationId),\n+ SourceId: (doc.Id || doc.DocId || doc.SourceId), \n+ Id: (doc.Id || doc.DocId || doc.SourceId), \n+ EntidadeOrganicaNome: (doc.Stakeholders || doc.sender || doc.EntidadeOrganicaNome ),\n+ Sender: (doc.Stakeholders || doc.sender || doc. EntidadeOrganicaNome ),\n+ Data: (doc.DocDate || doc.Data),\n+ DocDate: (doc.DocDate || doc.Data),\n+ Assunto: doc.Assunto || doc.SourceName || doc.Description,\n+ SourceName: doc.Assunto || doc.SourceName || doc.Description,\n+ } as any)\n+ }\n+\n }\n \n \n@@ -278,7 +310,7 @@ export class DocumentSetUpMeetingPage implements OnInit {\n let Attendees = this.taskParticipants.concat(this.taskParticipantsCc);\n \n if(this.document.Documents) {\n- this.document.Documents.forEach((e)=> {\n+ this.attachments.forEach((e: any)=> {\n this.docs.push({\n ApplicationId: e.ApplicationId || e.ApplicationType,\n Source: 1,\n@@ -287,14 +319,6 @@ export class DocumentSetUpMeetingPage implements OnInit {\n })\n })\n }\n- else{\n- this.docs.push({\n- ApplicationId: this.document.ApplicationId || this.document.ApplicationType,\n- Source: 1,\n- SourceId: this.document.DocId || this.document.docID || this.document.docId || this.document.SourceId || this.document.Id,\n- SourceName: this.document.Assunto\n- })\n- }\n \n let postEvent = {\n EventId: '',\n@@ -318,13 +342,14 @@ export class DocumentSetUpMeetingPage implements OnInit {\n Type: this.EventRecurrenceType,\n LastOccurrence: this.Occurrence,\n },\n- // Attachments: this.docs,\n+ Attachments: this.attachments,\n }\n \n const laoder = this.toastService.loading()\n \n this.eventService.create({ body: postEvent, calendar: this.postData.CalendarName }).subscribe(async (respose) => {\n laoder.remove();\n+ // this.saveAttachment()\n this.httpErroHandle.httpsSucessMessagge('new event');\n this.modalController.dismiss()\n }, (error) => {\n@@ -336,6 +361,17 @@ export class DocumentSetUpMeetingPage implements OnInit {\n \n }\n \n+ async saveAttachment() {\n+ this.attachments.forEach( async (attachments, i) => {\n+ try {\n+ await this.attachmentsService.setEventAttachmentById(attachments).toPromise();\n+ } catch(error) {\n+ \n+ }\n+\n+ });\n+ }\n+\n async addParticipants() {\n \n this.adding = \"intervenient\";\ndiff --git a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts\nindex 66826fc22..b9f20c744 100644\n--- a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts\n+++ b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts\n@@ -130,19 +130,37 @@ export class ExpedientTaskModalPage implements OnInit {\n \n \n if(this.document) {\n- const doc: any = this.document\n-\n- this.documents.push({\n- ApplicationId: (doc.ApplicationType || doc.ApplicationId), \n- ApplicationType: (doc.ApplicationType || doc.ApplicationId),\n- SourceId: (doc.Id || doc.DocId || doc.SourceId), \n- Id: (doc.Id || doc.DocId || doc.SourceId), \n- EntidadeOrganicaNome: (doc.sender || doc.SourceName || doc. EntidadeOrganicaNome),\n- Sender: (doc.sender || doc.SourceName || doc. EntidadeOrganicaNome),\n- Data: (doc.DocDate || doc.Data),\n- DocDate: (doc.DocDate || doc.Data),\n- Assunto: doc.Assunto,\n- } as any)\n+ \n+ if(Array.isArray(this.document)) {\n+ const docs: any = this.document\n+ for(let doc of docs ) {\n+ this.documents.push({\n+ ApplicationId: (doc.ApplicationType || doc.ApplicationId), \n+ ApplicationType: (doc.ApplicationType || doc.ApplicationId),\n+ SourceId: (doc.Id || doc.DocId || doc.SourceId), \n+ Id: (doc.Id || doc.DocId || doc.SourceId), \n+ EntidadeOrganicaNome: (doc.Stakeholders || doc.sender || doc.EntidadeOrganicaNome ),\n+ Sender: (doc.Stakeholders || doc.sender || doc. EntidadeOrganicaNome ),\n+ Data: (doc.DocDate || doc.Data),\n+ DocDate: (doc.DocDate || doc.Data),\n+ Assunto: doc.Assunto || doc.SourceName || doc.Description,\n+ } as any)\n+ }\n+ } else {\n+ const doc: any = this.document\n+ this.documents.push({\n+ ApplicationId: (doc.ApplicationType || doc.ApplicationId), \n+ ApplicationType: (doc.ApplicationType || doc.ApplicationId),\n+ SourceId: (doc.Id || doc.DocId || doc.SourceId), \n+ Id: (doc.Id || doc.DocId || doc.SourceId), \n+ EntidadeOrganicaNome: (doc.Stakeholders || doc.sender || doc.EntidadeOrganicaNome ),\n+ Sender: (doc.Stakeholders || doc.sender || doc. EntidadeOrganicaNome ),\n+ Data: (doc.DocDate || doc.Data),\n+ DocDate: (doc.DocDate || doc.Data),\n+ Assunto: doc.Assunto || doc.SourceName || doc.Description,\n+ } as any)\n+ }\n+\n }\n \n \ndiff --git a/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html b/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html\nindex 38fc8af46..b5a0f5b4e 100644\n--- a/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html\n+++ b/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html\n@@ -283,7 +283,7 @@\n <ion-item lines=\"none\">\n <ion-list>\n <ion-label *ngIf=\"taskParticipants?.length < 1\" class=\"list-people-title\">Adicionar Intervenientes*</ion-label>\n- <ion-label *ngFor=\"let participant of taskParticipants\">{{participant.Name}}</ion-label>\n+ <ion-label *ngFor=\"let participant of taskParticipants\">{{participant.EmailAddress }}</ion-label>\n </ion-list>\n </ion-item>\n </div>\n@@ -306,7 +306,7 @@\n <ion-item lines=\"none\">\n <ion-list>\n <ion-label *ngIf=\"taskParticipantsCc?.length < 1\" class=\"list-people-title\">Adicionar Intervenientes</ion-label>\n- <ion-label *ngFor=\"let participant of taskParticipantsCc\">{{participant.Name}}</ion-label>\n+ <ion-label *ngFor=\"let participant of taskParticipantsCc\">{{participant.EmailAddress }}</ion-label>\n </ion-list>\n </ion-item>\n </div>\ndiff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html\nindex c306e743e..fe896ef2a 100644\n--- a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html\n+++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html\n@@ -225,7 +225,7 @@\n <ion-item lines=\"none\">\n <ion-list>\n <ion-label *ngIf=\"taskParticipants?.length < 1\" class=\"list-people-title\">Adicionar Intervenientes*</ion-label>\n- <ion-label *ngFor=\"let participant of taskParticipants\">{{participant.Name}}</ion-label>\n+ <ion-label *ngFor=\"let participant of taskParticipants\">{{participant.EmailAddress}}</ion-label>\n </ion-list>\n </ion-item>\n </div>\n@@ -248,7 +248,7 @@\n <ion-item lines=\"none\">\n <ion-list>\n <ion-label *ngIf=\"taskParticipantsCc?.length < 1\" class=\"list-people-title\">Adicionar Intervenientes</ion-label>\n- <ion-label *ngFor=\"let participant of taskParticipantsCc\">{{participant.Name}}</ion-label>\n+ <ion-label *ngFor=\"let participant of taskParticipantsCc\">{{participant.EmailAddress }}</ion-label>\n </ion-list>\n </ion-item>\n </div>",
"changeStatus": "On branch notification-header/feature\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/modals/profile/profile.page.html\n\tmodified: src/app/modals/profile/profile.page.ts\n\tmodified: src/app/services/notifications.service.ts\n\tmodified: src/app/shared/header/header.page.html\n\tmodified: src/app/shared/header/header.page.ts\n\tnew file: src/app/store/notification-holder.service.spec.ts\n\tnew file: src/app/store/notification-holder.service.ts\n\nChanges not staged for commit:\n (use \"git add <file>...\" to update what will be committed)\n (use \"git restore <file>...\" to discard changes in working directory)\n\tmodified: src/app/modals/create-process/create-process.page.ts\n\tmodified: src/app/modals/document-detail/document-detail.page.ts\n\tmodified: src/app/modals/document-set-up-meeting/document-set-up-meeting.page.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts\n\tmodified: src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html\n\tmodified: src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html",
"changeAuthor": "peter.maquiran"
}