date format solve

This commit is contained in:
Eudes Inácio
2023-08-14 10:34:15 +01:00
26 changed files with 274 additions and 139 deletions
@@ -30,6 +30,7 @@ import {
MAT_MOMENT_DATE_ADAPTER_OPTIONS
} from '@angular/material-moment-adapter';
import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core';
import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module';
@NgModule({
@@ -55,7 +56,8 @@ import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/
//MatRadioModule,
//MatCheckboxModule,
MatButtonModule,
ReactiveFormsModule
ReactiveFormsModule,
AttendeeModalPageModule
],
declarations: [NewEventPage],
providers: [
@@ -327,9 +327,18 @@
</ion-label>
</ion-item>
</ion-list>
</div>
</div>
<div *ngIf="mostrarModal">
<app-attendee-modal [loggedAttendSon]="loggedAttendDad"></app-attendee-modal>
</div>
</ion-content>
<ion-footer class="ion-no-border">
<ion-toolbar class="footer-toolbar">
@@ -344,5 +353,10 @@
<ion-label>Gravar</ion-label>
</button>
</ion-buttons>
<!-- <app-new-event
[loggedAttend]="loggedAttend"
></app-new-event> -->
</ion-toolbar>
</ion-footer>
@@ -70,6 +70,8 @@ export class NewEventPage implements OnInit {
public color: ThemePalette = 'primary';
recurringTypes = []
selectedRecurringType: any;
loggedAttendDad: boolean = true;
mostrarModal = false;
@Input() attendees: []
@Input() profile:string;
@@ -701,6 +703,7 @@ export class NewEventPage implements OnInit {
}
async addParticipants() {
this.saveTemporaryData();
@@ -709,6 +712,7 @@ export class NewEventPage implements OnInit {
});
this.clearContact.emit();
this.mostrarModal = true;
}
async addParticipantsCc() {
@@ -6,6 +6,8 @@ import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
import { ThemeService } from 'src/app/services/theme.service'
import { ViewChild } from '@angular/core';
import { Searchbar } from 'ionic-angular';
import { LoginUserRespose } from 'src/app/models/user.model';
import { SessionStore } from 'src/app/store/session.service';
@Component({
selector: 'app-attendee-modal',
@@ -16,6 +18,7 @@ export class AttendeePage implements OnInit {
// Defined by the API
contacts: EventPerson[];
filterEmptyEmail: EventPerson[];
showLoader: boolean = false;
eventPersons: EventPerson[];
inputFilter = ''
@@ -30,6 +33,7 @@ export class AttendeePage implements OnInit {
@Input() taskParticipants:EventPerson[] = [];
@Input() taskParticipantsCc:EventPerson[] = [];
@Input() loggedAttendSon: boolean;
@Input() footer: boolean;
@@ -39,26 +43,34 @@ export class AttendeePage implements OnInit {
LtaskParticipants: EventPerson[] = [];
LtaskParticipantsCc: EventPerson[] = [];
loggeduser: LoginUserRespose;
constructor(
private modalCtrl: ModalController,
private contactsService: ContactsService,
public ThemeService: ThemeService ) {
this.LtaskParticipants = removeDuplicate(this.taskParticipants);
this.LtaskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
this.LtaskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
this.loggeduser = SessionStore.user;
}
ngOnChanges() {
this.LtaskParticipants = removeDuplicate(this.taskParticipants);
this.LtaskParticipantsCc = removeDuplicate(this.taskParticipantsCc);
console.log('PARTE PARTE',this.loggedAttendSon)
}
currentPath = window.location.pathname;
@Input() adding: "intervenient" | "CC";
ngOnInit() {
setTimeout(() => {
console.log('PARTE PARTE',this.loggedAttendSon)
});
this.fetchContacts("");
if(this.LtaskParticipants == null || this.LtaskParticipants == undefined) {
@@ -213,8 +225,20 @@ export class AttendeePage implements OnInit {
});
}
this.contacts = this.sort(result as any);
if(this.loggedAttendSon) {
this.contacts = this.sort(result as any);
this.showLoader = false;
} else {
this.contacts = this.sort(result as any);
console.log('Attendes Email',this.loggeduser.Email)
let filterLoggedUserEmail = this.contacts.filter(item => item.EmailAddress.toLocaleLowerCase() != this.loggeduser.Email.toLocaleLowerCase())
console.log('Attendes Email', filterLoggedUserEmail)
let filterEmptyEmail = filterLoggedUserEmail.filter(item => item.EmailAddress.toLocaleLowerCase() != "")
this.contacts = filterEmptyEmail;
console.log('Attendes Email', this.contacts)
this.showLoader = false;
}
}
);
}
@@ -7,7 +7,7 @@
</div>
<div class="div-title">
<ion-label class="title"> {{publication.Title}}</ion-label>
<p class="post-data">{{publication.DatePublication | date: 'dd-MM-yy | h:mm'}}</p>
<p class="post-data">{{publication.DatePublication | date: 'dd-MM-yyyy | h:mm'}}</p>
</div>
</div>
<div *ngIf="publication.Title == ''" class="title-contentd-flex pl-20 pt-25">
@@ -22,7 +22,7 @@
</div>
<div class="div-body width-100" *ngIf="publicationItem[folderId]?.DateBegin != null">
<p class="item-content-detail">{{publicationItem[folderId].Detail}}</p>
<p class="item-content-date">{{ publicationItem[folderId].DateBegin | date: 'dd-MM-yy HH:mm'}}</p>
<p class="item-content-date">{{ publicationItem[folderId].DateBegin | date: 'dd-MM-yyyy HH:mm'}}</p>
</div>
</div>
@@ -47,7 +47,7 @@
<div class="post-title">
<ion-label>{{publication.Title}}</ion-label>
</div>
<div class="post-data">{{publication.DatePublication | date: 'dd-MM-yy HH:mm'}}</div>
<div class="post-data">{{publication.DatePublication | date: 'dd-MM-yyyy HH:mm'}}</div>
</div>
<div class="post-description">
<pre class="text">{{publication.Message}}</pre>
@@ -70,7 +70,7 @@
<div class="post-title">
<ion-label>{{publication.Title}}</ion-label>
</div>
<div class="post-data">{{publication.DatePublication | date: 'dd-MM-yy HH:mm'}}</div>
<div class="post-data">{{publication.DatePublication | date: 'dd-MM-yyyy HH:mm'}}</div>
</div>
<div class="post-description">
<p>{{publication.Message}}</p>