add attachments

This commit is contained in:
Peter Maquiran
2023-08-31 12:00:52 +01:00
parent 081fe8692c
commit 680f57313f
23 changed files with 117 additions and 48 deletions
@@ -288,7 +288,7 @@
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
</span>
</p>
<p><span class="span-left">{{document.EntidadeOrganicaNome}}</span><span class="span-right"> {{document.Data | date: 'dd-MM-yyyy HH:mm'}} </span></p>
<p><span class="span-left">{{(document.EntidadeOrganicaNome || document.Sender)}}</span><span class="span-right"> {{(document.Data || document.DocDate) | date: 'dd-MM-yyyy HH:mm'}} </span></p>
</ion-label>
</ion-item>
</ion-list>
@@ -20,6 +20,7 @@ import { SessionStore } from 'src/app/store/session.service';
import { ChatMethodsService } from 'src/app/services/chat/chat-methods.service';
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { environment } from 'src/environments/environment';
import { TaskService } from 'src/app/services/task.service'
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
@@ -101,7 +102,8 @@ export class NewEventPage implements OnInit {
public ThemeService: ThemeService,
private platform: Platform,
private chatMethodService: ChatMethodsService,
private hhtpErrorHandle: HttpErrorHandle
private hhtpErrorHandle: HttpErrorHandle,
public TaskService: TaskService
) {
this.loggeduser = SessionStore.user;
this.postEvent = new Event();
@@ -280,6 +280,7 @@
<ion-label>
<p class="d-flex ion-justify-content-between">
<span class="attach-title-item">{{document.Assunto}}</span>
<span class="app-name" *ngIf="!document.appName">{{ TaskService.attachmentAppName(document)}}</span>
<span class="app-name" *ngIf="document.appName">{{document.appName}}</span>
<span class="close-button text-black" (click)="removeAttachment(i)" >
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
@@ -22,7 +22,7 @@ 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';
import { environment } from 'src/environments/environment';
import { TaskService } from 'src/app/services/task.service'
const moment = _rollupMoment || _moment;
@@ -124,7 +124,8 @@ export class BookMeetingModalPage implements OnInit {
public ThemeService: ThemeService,
public eventService: EventsService,
public RoleIdService: RoleIdService,
private httpErroHandle: HttpErrorHandle
private httpErroHandle: HttpErrorHandle,
public TaskService: TaskService
) {
@@ -196,12 +196,13 @@
<ion-label>
<p class="d-flex ion-justify-content-between">
<span class="attach-title-item">{{document.Assunto}}</span>
<span class="app-name">{{document.appName}}</span>
<span class="app-name" *ngIf="!document.appName">{{ TaskService.attachmentAppName(document)}}</span>
<span class="app-name" *ngIf="document.appName">{{document.appName}}</span>
<span class="close-button text-black" (click)="removeAttachment(i)" >
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
</span>
</p>
<p><span class="span-left">{{document.EntidadeOrganicaNome}}</span><span class="span-right"> {{document.Data | date: 'dd-MM-yyyy HH:mm'}} </span></p>
<p><span class="span-left">{{(document.EntidadeOrganicaNome || document.Sender)}}</span><span class="span-right"> {{(document.Data || document.DocDate) | date: 'dd-MM-yyyy HH:mm'}} </span></p>
</ion-label>
</ion-item>
</ion-list>
@@ -26,7 +26,7 @@ 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';
import { RouteService } from 'src/app/services/route.service';
import { TaskService } from 'src/app/services/task.service'
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
@@ -95,6 +95,7 @@ export class ExpedientTaskModalPage implements OnInit {
Form: FormGroup;
validateFrom = false;
validateField = false;
document: any
get toppingsValues() {
return this.toppings.value;
@@ -113,6 +114,7 @@ export class ExpedientTaskModalPage implements OnInit {
public p: PermissionService,
private httpErroHandle: HttpErrorHandle,
private RouteService: RouteService,
public TaskService: TaskService
) {
this.loggeduser = SessionStore.user;
@@ -122,9 +124,39 @@ export class ExpedientTaskModalPage implements OnInit {
this.SearchFolder = this.navParams.get('SearchFolder');
this.aplicationId = this.navParams.get('aplicationId')
this.document = this.navParams.get('document')
this.taskType = this.navParams.get('taskAction');
if(this.document) {
const doc: any = this.document
this.documents.push({
ApplicationId: (doc.ApplicationType || doc.ApplicationId),
ApplicationType: (doc.ApplicationType || doc.ApplicationId),
SourceId: (doc.Id || doc.DocId || doc.SourceId),
Id: (doc.Id || doc.DocId || doc.SourceId),
EntidadeOrganicaNome: (doc.sender || doc.SourceName || doc. EntidadeOrganicaNome),
Sender: (doc.sender || doc.SourceName || doc. EntidadeOrganicaNome),
Data: (doc.DocDate || doc.Data),
DocDate: (doc.DocDate || doc.Data),
Assunto: doc.Assunto,
} as any)
}
const DocumentToSave = this.documents.map((e) => {
return {
ApplicationId: e.ApplicationType,
SourceId: e.Id
}
});
console.log('this.document', this.document)
this.selectedTypes = ['99999850'];
this.postData = new Despacho();