mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Improve
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { Attachment } from './attachment.model';
|
||||
import { EventBody } from './eventbody.model';
|
||||
import { EventPerson } from './eventperson.model';
|
||||
|
||||
@@ -31,6 +32,7 @@ export class Event{
|
||||
HasAttachments: boolean;
|
||||
EventRecurrence: EventRecurrence;
|
||||
Name?: string
|
||||
Attachments?: Attachment[];
|
||||
|
||||
/* public Event(){
|
||||
this.EventRecurrence = new EventRecurrence();
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<div *ngIf="loadedAttachments" class="bottom-content width-100">
|
||||
<h5>Documentos Anexados</h5>
|
||||
<ion-list class="width-100">
|
||||
<ion-item *ngFor="let attach of loadedAttachments; let i = index" class="width-100" class="ion-no-margin ion-no-padding">
|
||||
<ion-item *ngFor="let attach of loadedEvent.Attachments; let i = index" class="width-100" class="ion-no-margin ion-no-padding">
|
||||
<ion-label class="width-100 d-flex " >
|
||||
<p class="flex-grow-1" (click)="viewDocument(attach.SourceId)">
|
||||
<span class="attach-title-item d-block">{{attach.SourceName}}</span>
|
||||
|
||||
@@ -26,7 +26,6 @@ export class ViewEventPage implements OnInit {
|
||||
isEventEdited: boolean;
|
||||
eventBody: EventBody;
|
||||
loadedAttachments:any;
|
||||
loadedEventAttachments: Attachment[];
|
||||
pageId: string;
|
||||
showLoader: boolean;
|
||||
|
||||
@@ -91,7 +90,6 @@ export class ViewEventPage implements OnInit {
|
||||
ngOnInit() {
|
||||
|
||||
this.loadEvent();
|
||||
this.getAttachments();
|
||||
|
||||
|
||||
window.onresize = (event) => {
|
||||
@@ -183,7 +181,6 @@ export class ViewEventPage implements OnInit {
|
||||
setTimeout(() => {
|
||||
/* this.loadEvent(); */
|
||||
this.loadEvent()
|
||||
this.getAttachments();
|
||||
}, 250);
|
||||
this.isEventEdited = true;
|
||||
}
|
||||
@@ -191,22 +188,6 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
getAttachments() {
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
this.attachmentsService.getAttachmentsById(this.eventId).subscribe(res=>{
|
||||
this.loadedAttachments = res;
|
||||
console.log(res);
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async editEventDetail() {
|
||||
|
||||
@@ -227,7 +208,6 @@ export class ViewEventPage implements OnInit {
|
||||
setTimeout(() => {
|
||||
/* this.loadEvent(); */
|
||||
this.loadEvent()
|
||||
this.getAttachments();
|
||||
}, 250);
|
||||
this.isEventEdited = true;
|
||||
}
|
||||
@@ -261,7 +241,6 @@ export class ViewEventPage implements OnInit {
|
||||
setTimeout(() => {
|
||||
/* this.loadEvent(); */
|
||||
this.loadEvent()
|
||||
this.getAttachments();
|
||||
}, 250);
|
||||
this.isEventEdited = true;
|
||||
}
|
||||
|
||||
@@ -77,10 +77,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="loadedAttachments" class="bottom-content width-100">
|
||||
<div *ngIf="loadedEvent.Attachments" class="bottom-content width-100">
|
||||
<h5>Documentos Anexados</h5>
|
||||
<ion-list class="width-100">
|
||||
<li *ngFor="let attach of loadedAttachments; let i = index" class="width-100" lines="none" class="ion-no-margin ion-no-padding pa-0">
|
||||
<li *ngFor="let attach of loadedEvent.Attachments; let i = index" class="width-100" lines="none" class="ion-no-margin ion-no-padding pa-0">
|
||||
<ion-label class="width-100 d-flex align-center" >
|
||||
<p class="flex-grow-1" (click)="viewDocument(attach.SourceId)">
|
||||
<span class="attach-title-item d-block">{{attach.SourceName}}</span>
|
||||
|
||||
@@ -22,7 +22,6 @@ export class ViewEventPage implements OnInit {
|
||||
isEventEdited: boolean;
|
||||
eventBody: EventBody;
|
||||
loadedAttachments:any;
|
||||
loadedEventAttachments: Attachment[];
|
||||
pageId: string;
|
||||
showLoader: boolean;
|
||||
|
||||
@@ -44,7 +43,6 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
constructor(
|
||||
private eventsService: EventsService,
|
||||
private attachmentsService: AttachmentsService,
|
||||
public alertController: AlertController,
|
||||
private iab: InAppBrowser,
|
||||
private processes: ProcessesService,
|
||||
@@ -96,7 +94,6 @@ export class ViewEventPage implements OnInit {
|
||||
this.loadedEvent = res;
|
||||
this.today = new Date(res.StartDate);
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
|
||||
this.getAttachments(this.loadedEvent.EventId);
|
||||
}, (error)=> {
|
||||
|
||||
console.log('errer', )
|
||||
@@ -142,12 +139,6 @@ export class ViewEventPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
getAttachments(eventId){
|
||||
this.attachmentsService.getAttachmentsById(eventId).subscribe(res=>{
|
||||
this.loadedAttachments = res;
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
|
||||
async editEvent() {
|
||||
this.viewEventDetailDismiss.emit({
|
||||
|
||||
@@ -13,7 +13,7 @@ export class ChatMessageService {
|
||||
|
||||
constructor() {
|
||||
|
||||
this.keyName = ('chat'+SHA1(this.constructor.name)).toString()
|
||||
this.keyName = (SHA1('chat'+this.constructor.name)).toString()
|
||||
|
||||
setTimeout(()=> {
|
||||
let restore = localstoreService.get(this.keyName, {})
|
||||
|
||||
@@ -14,7 +14,7 @@ export class ChatUserService {
|
||||
|
||||
constructor() {
|
||||
|
||||
this.keyName = ('chat'+SHA1(this.constructor.name)).toString()
|
||||
this.keyName = (SHA1('chat'+this.constructor.name)).toString()
|
||||
|
||||
setTimeout(()=> {
|
||||
let restore = localstoreService.get(this.keyName, {})
|
||||
|
||||
@@ -6,7 +6,7 @@ import { AES, enc, SHA1 } from 'crypto-js'
|
||||
})
|
||||
export class LocalstoreService {
|
||||
|
||||
private prefix = 'v14-'
|
||||
private prefix = 'v15-'
|
||||
|
||||
constructor() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user