mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
improve
This commit is contained in:
@@ -17,6 +17,7 @@ import { ThemeService } from 'src/app/services/theme.service';
|
|||||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||||
import { SessionStore } from 'src/app/store/session.service';
|
import { SessionStore } from 'src/app/store/session.service';
|
||||||
|
import { ChatMethodsService } from 'src/app/services/chat/chat-methods.service';
|
||||||
|
|
||||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||||
parse: {
|
parse: {
|
||||||
@@ -84,6 +85,7 @@ export class NewEventPage implements OnInit {
|
|||||||
autoStartTime;
|
autoStartTime;
|
||||||
autoEndTime;
|
autoEndTime;
|
||||||
CalendarNamesOptions = ['Oficial', 'Pessoal']
|
CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||||
|
roomId:string;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
@@ -93,6 +95,7 @@ export class NewEventPage implements OnInit {
|
|||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
public ThemeService: ThemeService,
|
public ThemeService: ThemeService,
|
||||||
private platform: Platform,
|
private platform: Platform,
|
||||||
|
private chatMethodService: ChatMethodsService,
|
||||||
) {
|
) {
|
||||||
this.loggeduser = SessionStore.user;
|
this.loggeduser = SessionStore.user;
|
||||||
this.postEvent = new Event();
|
this.postEvent = new Event();
|
||||||
@@ -100,6 +103,7 @@ export class NewEventPage implements OnInit {
|
|||||||
this.eventBody = { BodyType : "1", Text : ""};
|
this.eventBody = { BodyType : "1", Text : ""};
|
||||||
this.postEvent.Body = this.eventBody;
|
this.postEvent.Body = this.eventBody;
|
||||||
|
|
||||||
|
this.roomId = this.navParams.get('roomId');
|
||||||
this.selectedSegment = this.navParams.get('segment');
|
this.selectedSegment = this.navParams.get('segment');
|
||||||
this.selectedDate = this.navParams.get('eventSelectedDate');
|
this.selectedDate = this.navParams.get('eventSelectedDate');
|
||||||
this.taskParticipants = this.navParams.get('attendees');
|
this.taskParticipants = this.navParams.get('attendees');
|
||||||
@@ -107,21 +111,21 @@ export class NewEventPage implements OnInit {
|
|||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if (this.platform.is('desktop')) {
|
if (this.platform.is('desktop')) {
|
||||||
this.taskParticipants = [];
|
// this.taskParticipants = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
this.CalendarName = this.loggeduser.Profile;
|
|
||||||
this.selectedRecurringType = "-1";
|
|
||||||
|
|
||||||
if(!this.CalendarName) {
|
if(!this.CalendarName) {
|
||||||
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
|
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
|
||||||
this.CalendarName = 'Meu calendario';
|
this.CalendarName = 'Meu calendario';
|
||||||
|
console.log(this.eventService.calendarNamesAry)
|
||||||
} else {
|
} else {
|
||||||
this.CalendarName = this.eventService.calendarNamesAry[0]
|
this.CalendarName = this.eventService.calendarNamesAry[0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.selectedRecurringType = "-1";
|
||||||
|
|
||||||
this.getRecurrenceTypes();
|
this.getRecurrenceTypes();
|
||||||
|
|
||||||
if(this.selectedSegment != "Combinada"){
|
if(this.selectedSegment != "Combinada"){
|
||||||
@@ -413,8 +417,22 @@ export class NewEventPage implements OnInit {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let data1 = {
|
||||||
|
"subject": this.postEvent.Subject,
|
||||||
|
"start": this.postEvent.StartDate,
|
||||||
|
"end": this.postEvent.EndDate,
|
||||||
|
"venue": this.postEvent.Location,
|
||||||
|
"id": eventId,
|
||||||
|
"calendarId": CalendarId
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.roomId) {
|
||||||
|
this.chatMethodService.sendMessage(this.roomId, data1);
|
||||||
|
}
|
||||||
|
|
||||||
this.toastService._successMessage()
|
this.toastService._successMessage()
|
||||||
this.modalController.dismiss(this.postEvent);
|
let data = Object.assign(this.postEvent,{id:eventId})
|
||||||
|
this.modalController.dismiss(data);
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
|
|||||||
@@ -198,24 +198,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="msg.file && msg.delate == false">
|
|
||||||
<div *ngIf="msg.file.type == 'application/meeting'" class="info-meeting">
|
|
||||||
<ion-label class="info-meeting-small">{{msg.u.name}} criou esta reunião</ion-label><br />
|
|
||||||
<button (click)="goToEvent(msg.file)" class="btn-no-color info-meeting-normal">
|
|
||||||
<ion-label class="info-meeting-normal">{{msg.file.subject}}</ion-label>
|
|
||||||
</button><br />
|
|
||||||
<ion-label class="info-meeting-medium">
|
|
||||||
<ion-icon name="calendar-outline"></ion-icon> De {{showDateDuration(msg.file.start_date)}} a
|
|
||||||
{{showDateDuration(msg.file.end_date)}}
|
|
||||||
</ion-label><br />
|
|
||||||
<ion-label class="info-meeting-medium">
|
|
||||||
<ion-icon></ion-icon>
|
|
||||||
<ion-icon name="location-outline"></ion-icon> {{msg.file.venue}}
|
|
||||||
</ion-label><br />
|
|
||||||
</div>
|
|
||||||
{{last ? scrollToBottom() : ''}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div *ngIf="msg.file && msg.delate == true">
|
<div *ngIf="msg.file && msg.delate == true">
|
||||||
Apagou a mensagem
|
Apagou a mensagem
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -586,7 +586,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async bookMeeting() {
|
async bookMeeting() {
|
||||||
this.attendees = this.members.map((val) => {
|
let attendees = this.ChatSystemService.getDmRoom(this.roomId).members.map((val) => {
|
||||||
return {
|
return {
|
||||||
Name: val.name,
|
Name: val.name,
|
||||||
EmailAddress: val.username + "@" + environment.domain,
|
EmailAddress: val.username + "@" + environment.domain,
|
||||||
@@ -599,15 +599,30 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: NewEventPage,
|
component: NewEventPage,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
attendees: this.attendees,
|
attendees: attendees,
|
||||||
|
roomId: this.roomId
|
||||||
},
|
},
|
||||||
cssClass: 'modal modal-desktop',
|
cssClass: 'modal modal-desktop',
|
||||||
backdropDismiss: false
|
backdropDismiss: false
|
||||||
});
|
});
|
||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss().then((data) => {
|
modal.onDidDismiss().then((data) => {
|
||||||
if (data) {
|
if (data?.data && data.data.id) {
|
||||||
console.log(data)
|
|
||||||
|
// const roomId = this.roomId
|
||||||
|
|
||||||
|
// this.ChatSystemService.getDmRoom(roomId).send({
|
||||||
|
// file: {
|
||||||
|
// "type": "application/meeting",
|
||||||
|
// "subject": data.data.Subject,
|
||||||
|
// "start_date": data.data.StartDate,
|
||||||
|
// "end_date": data.data.EndDate,
|
||||||
|
// "venue": data.data.venue,
|
||||||
|
// "id": data.data.id,
|
||||||
|
// "calendarId": data.data.CalendarId
|
||||||
|
// },
|
||||||
|
// temporaryData: {}
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -643,7 +643,6 @@ export class NewEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
selectedCalendarId () {
|
selectedCalendarId () {
|
||||||
console.log('1:1',this.eventService.calendarNamesType,'2', this.CalendarName)
|
|
||||||
|
|
||||||
if (this.eventService.calendarNamesType[this.CalendarName]?.['Oficial'] && this.postEvent.CalendarName == 'Oficial') {
|
if (this.eventService.calendarNamesType[this.CalendarName]?.['Oficial'] && this.postEvent.CalendarName == 'Oficial') {
|
||||||
console.log('1')
|
console.log('1')
|
||||||
|
|||||||
@@ -120,22 +120,11 @@ export class ChatOptionsPopoverPage implements OnInit {
|
|||||||
|
|
||||||
async bookMeeting() {
|
async bookMeeting() {
|
||||||
|
|
||||||
this.popoverController.dismiss();
|
if( window.innerWidth < 701){
|
||||||
if( window.innerWidth <= 1024){
|
this.popoverController.dismiss('meeting');
|
||||||
const modal = await this.modalController.create({
|
}
|
||||||
component: NewEventPage,
|
else{
|
||||||
componentProps:{
|
this.modalController.dismiss('meeting');
|
||||||
attendees: this.attendees,
|
|
||||||
},
|
|
||||||
cssClass: 'modal modal-desktop',
|
|
||||||
backdropDismiss: false
|
|
||||||
});
|
|
||||||
await modal.present();
|
|
||||||
modal.onDidDismiss().then((data) => {
|
|
||||||
if(data){
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
export let versionData = {
|
export let versionData = {
|
||||||
"shortSHA": "c1816b863",
|
"shortSHA": "658720f47",
|
||||||
"SHA": "c1816b863e387315b1359975ecffa252775236a7",
|
"SHA": "658720f47ff463fe7e6ff672a2f562d74662480c",
|
||||||
"branch": "no_bug_movemente",
|
"branch": "no_bug_movemente",
|
||||||
"lastCommitAuthor": "'Peter Maquiran'",
|
"lastCommitAuthor": "'Peter Maquiran'",
|
||||||
"lastCommitTime": "'Fri Jan 20 16:09:27 2023 +0100'",
|
"lastCommitTime": "'Sun Jan 22 15:27:01 2023 +0100'",
|
||||||
"lastCommitMessage": "merg",
|
"lastCommitMessage": "save",
|
||||||
"lastCommitNumber": "4676",
|
"lastCommitNumber": "4677",
|
||||||
"change": "",
|
"change": "",
|
||||||
"changeStatus": "On branch no_bug_movemente\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/pages/agenda/agenda.page.ts\n\tmodified: src/app/pages/agenda/new-event/new-event.page.ts\n\tmodified: src/app/pages/chat/messages/messages.page.ts\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.html\n\tmodified: src/app/shared/agenda/new-event/new-event.page.ts\n\tmodified: src/app/shared/gabinete-digital/all-processes/all-processes.page.html\n\tmodified: src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts\n\tmodified: src/app/shared/header/header.page.html\n\tmodified: src/environments/environment.prod.ts",
|
"changeStatus": "On branch no_bug_movemente\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/agenda/new-event/new-event.page.ts\n\tmodified: src/app/pages/chat/messages/messages.page.html\n\tmodified: src/app/pages/chat/messages/messages.page.ts\n\tmodified: src/app/shared/agenda/new-event/new-event.page.ts\n\tmodified: src/app/shared/popover/chat-options-popover/chat-options-popover.page.ts",
|
||||||
"changeAuthor": "peter.maquiran"
|
"changeAuthor": "peter.maquiran"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user