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