Notification done

This commit is contained in:
Eudes Inácio
2023-01-24 14:43:02 +01:00
29 changed files with 241 additions and 157 deletions
+10 -10
View File
@@ -278,13 +278,12 @@
<div class="time-end text-center">o dia</div>
</div>
<div class="schedule-details">
{{ event.event.CalendarName }}
<div class="location">{{event.event.Location}}</div>
<div class="description">
<p class="m-0">{{event.event.Subject}}</p>
</div>
<div class="font-13"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template>
<div class="location">{{event.event.Location}}</div>
<div class="font-13 calendar-owner"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template>
</div>
</div>
@@ -321,11 +320,11 @@
<div class="time-end">o dia</div>
</div>
<div class="schedule-details">
<div class="location">{{event.event.Location}}</div>
<div class="description">
<p class="m-0">{{event.event.Subject}}</p>
</div>
<div class="font-13"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
<div class="location">{{event.event.Location}}</div>
<div class="font-13 calendar-owner"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'">{{SessionStore.user.FullName}} </div>
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template>
</div>
</div>
@@ -365,11 +364,12 @@
<div class="time-end">o dia</div>
</div>
<div class="schedule-details">
<div class="location">{{event.event.Location}}</div>
<div class="description">
<p class="m-0">{{event.event.Subject}}</p>
<p class="m-0">{{event.event.Subject}} ....</p>
</div>
<div class="font-13"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'"> {{SessionStore.user.FullName}} </div>
<div class="location">{{event.event.Location}}</div>
<div class="font-13 calendar-owner"*ngIf="eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId) == 'Meu calendario'"> {{SessionStore.user.FullName}} </div>
<ng-template #other_content>{{eventService.getCalendarOwnNameByCalendarId(event.event.CalendarId)}}</ng-template>
</div>
</div>
@@ -416,7 +416,7 @@
[eventAttendees]="contacts"
(clearContact)="clearContact()"
(setContact)="setContact($event)"
[CalendarDate]="viewDate"
(setIntervenient)="setIntervenient($event)"
(setIntervenientCC)="setIntervenientCC($event)"
></app-new-event>
+8 -3
View File
@@ -509,17 +509,21 @@ td.monthview-primary-with-event {
width: 100%;
overflow: auto;
.location{
.location {
width: 100%;
font-family: Roboto;
font-size: 13px;
color: black;
font-size: 14px;
}
.calendar-owner {
font-size: 14px;
}
.description{
width: 100%;
font-family: Roboto;
font-size: 15px;
font-weight: bold;
color: var(--title-text-color);
}
@@ -528,6 +532,7 @@ td.monthview-primary-with-event {
white-space: nowrap;
overflow: hidden !important;
text-overflow: ellipsis !important;
font-size: 17px;
}
}
+15 -3
View File
@@ -108,8 +108,8 @@ export class AgendaPage implements OnInit {
postEvent: any;
// temporary data
taskParticipants: any[] = [];
taskParticipantsCc: any[] = [];
taskParticipants: EventPerson[] = [];
taskParticipantsCc: EventPerson[] = [];
adding: "intervenient" | "CC" = "intervenient";
@ViewChild(CalendarComponent) myCal: CalendarComponent;
@@ -1225,12 +1225,19 @@ export class AgendaPage implements OnInit {
this.IsEvent = 'add';
if (window.innerWidth <= 1024) {
let taskParticipants = [{
EmailAddress: SessionStore.user.Email,
IsRequired: true,
Name: SessionStore.user.UserName
}]
const modal = await this.modalCtrl.create({
component: NewEventPage,
componentProps: {
segment: this.segment,
profile: this.profile,
eventSelectedDate: this.eventSelectedDate
eventSelectedDate: this.eventSelectedDate,
attendees: taskParticipants,
CalendarDate: this.viewDate
},
cssClass: 'modal modal-desktop',
backdropDismiss: false
@@ -1244,6 +1251,11 @@ export class AgendaPage implements OnInit {
});
} else {
this.mobileComponent.showAddNewEvent = true;
this.taskParticipants = [{
EmailAddress: SessionStore.user.Email,
IsRequired: true,
Name: SessionStore.user.UserName
}]
}
}
@@ -17,6 +17,7 @@ import { ThemeService } from 'src/app/services/theme.service';
import { NgxMatDateFormats } 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 { ChatMethodsService } from 'src/app/services/chat/chat-methods.service';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
@@ -62,6 +63,7 @@ export class NewEventPage implements OnInit {
eventAttendees: EventPerson[];
selectedSegment: string;
selectedDate: Date;
CalendarDate: Date;
recurringTypes: any;
selectedRecurringType: any;
@@ -84,6 +86,7 @@ export class NewEventPage implements OnInit {
autoStartTime;
autoEndTime;
CalendarNamesOptions = ['Oficial', 'Pessoal']
roomId:string;
constructor(
private modalController: ModalController,
@@ -93,6 +96,7 @@ export class NewEventPage implements OnInit {
private toastService: ToastService,
public ThemeService: ThemeService,
private platform: Platform,
private chatMethodService: ChatMethodsService,
) {
this.loggeduser = SessionStore.user;
this.postEvent = new Event();
@@ -100,28 +104,29 @@ export class NewEventPage implements OnInit {
this.eventBody = { BodyType : "1", Text : ""};
this.postEvent.Body = this.eventBody;
this.roomId = this.navParams.get('roomId');
this.selectedSegment = this.navParams.get('segment');
this.selectedDate = this.navParams.get('eventSelectedDate');
this.taskParticipants = this.navParams.get('attendees');
this.CalendarDate = this.navParams.get('CalendarDate')
}
ngOnInit() {
if (this.platform.is('desktop')) {
this.taskParticipants = [];
// this.taskParticipants = [];
}
this.CalendarName = this.loggeduser.Profile;
this.selectedRecurringType = "-1";
if(!this.CalendarName) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.CalendarName = 'Meu calendario';
console.log(this.eventService.calendarNamesAry)
} else {
this.CalendarName = this.eventService.calendarNamesAry[0]
}
}
this.selectedRecurringType = "-1";
this.getRecurrenceTypes();
@@ -176,14 +181,23 @@ export class NewEventPage implements OnInit {
}
};
this.setDefaultTime()
}
setDefaultTime() {
console.log(this.CalendarDate)
this.postEvent.StartDate = this.roundTimeQuarterHour(this.CalendarDate);
this.postEvent.EndDate = this.postEvent.StartDate;
}
close() {
this.modalController.dismiss();
}
roundTimeQuarterHour() {
var timeToReturn = new Date();
roundTimeQuarterHour(timeToReturn?) {
var timeToReturn = timeToReturn || new Date();
var minutes = timeToReturn.getMinutes();
var hours = timeToReturn.getHours();
@@ -414,8 +428,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.modalController.dismiss(this.postEvent);
let data = Object.assign(this.postEvent,{id:eventId})
this.modalController.dismiss(data);
} catch (error) {
this.toastService._badRequest()
@@ -487,12 +515,8 @@ export class NewEventPage implements OnInit {
const newAttendees: EventPerson[] = data['taskParticipants'];
const newAttendeesCC: EventPerson[] = data['taskParticipantsCc'];
if(newAttendees.length) {
this.setIntervenient(newAttendees);
}
if(newAttendeesCC) {
this.setIntervenientCC(newAttendeesCC);
}
this.setIntervenient(newAttendees);
this.setIntervenientCC(newAttendeesCC);
}
@@ -198,24 +198,6 @@
</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">
Apagou a mensagem
</div>
+19 -4
View File
@@ -11,7 +11,6 @@ import { ChatService } from 'src/app/services/chat.service';
import { FileService } from 'src/app/services/functions/file.service';
import { ProcessesService } from 'src/app/services/processes.service';
import { ToastService } from 'src/app/services/toast.service';
import { NewEventPage } from 'src/app/shared/agenda/new-event/new-event.page';
import { ChatOptionsPopoverPage } from 'src/app/shared/popover/chat-options-popover/chat-options-popover.page';
import { MessagesOptionsPage } from 'src/app/shared/popover/messages-options/messages-options.page';
import { ChatMessageStore } from 'src/app/store/chat/chat-message.service';
@@ -41,6 +40,7 @@ import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
import { File } from '@awesome-cordova-plugins/file/ngx';
import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
import { Filesystem, Directory } from '@capacitor/filesystem';
import { NewEventPage } from '../../agenda/new-event/new-event.page';
const IMAGE_DIR = 'stored-images';
@@ -586,7 +586,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
async bookMeeting() {
this.attendees = this.members.map((val) => {
let attendees = this.ChatSystemService.getDmRoom(this.roomId).members.map((val) => {
return {
Name: val.name,
EmailAddress: val.username + "@" + environment.domain,
@@ -599,15 +599,30 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
const modal = await this.modalController.create({
component: NewEventPage,
componentProps: {
attendees: this.attendees,
attendees: attendees,
roomId: this.roomId
},
cssClass: 'modal modal-desktop',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then((data) => {
if (data) {
if (data?.data && data.data.id) {
// 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: {}
// })
}
});
}
+1 -1
View File
@@ -125,7 +125,7 @@
(click)="goToExpediente(task.SerialNumber)">
<div class="item-exp d-flex">
<div class="schedule-date">
<div class="time-end">{{task.taskStartDate | date: 'dd-MM-yyyy'}}</div>
<div class="time-end">{{task.taskStartDate | date: 'dd-MM-yy'}}</div>
<div class="time-start">{{task.taskStartDate | date: 'HH:mm'}}</div>
</div>
<div class="schedule-details pointer">
@@ -130,6 +130,8 @@ export class BookMeetingModalPage implements OnInit {
authService: AuthService,
private toastService: ToastService,
public ThemeService: ThemeService,
public eventService: EventsService,
) {
this.taskParticipants = [];
@@ -148,6 +150,23 @@ export class BookMeetingModalPage implements OnInit {
this.postData.Category = 'Reunião'
if(!this.CalendarName) {
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
this.CalendarName = 'Meu calendario';
console.log(this.eventService.calendarNamesAry)
} else {
this.CalendarName = this.eventService.calendarNamesAry[0]
}
}
if(this.taskParticipants.length == 0) {
this.taskParticipants = [{
EmailAddress: SessionStore.user.Email,
IsRequired: true,
Name: SessionStore.user.UserName
}]
}
}
ngOnInit() {
@@ -72,7 +72,7 @@
<div class="item-middle-detail-extra-text">
<ion-label *ngIf=" task.WorkflowName == 'Agenda Oficial PR' || task.WorkflowName == 'Agenda Pessoal PR'">
<!-- Agenda {{task.Agenda || task.workflowInstanceDataFields.Agenda}} do Presidente da República -->
Agenda {{task.Agenda || task.workflowInstanceDataFields.Agenda}} do Presidente da República
Agenda {{task.Agenda || task.workflowInstanceDataFields.Agenda}} do Titular
</ion-label>
<ion-label *ngIf=" task.WorkflowName == 'Agenda Oficial MDGPR' || task.WorkflowName == 'Agenda Pessoal MDGPR'">
A sua agenda {{task.Agenda || task.workflowInstanceDataFields.Agenda}}
@@ -229,7 +229,7 @@
</div>
<div class="exp-card-text">
<!-- <p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">Despacho do Presidente da República</p> -->
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">Despacho do Presidente da República</p>
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">Despacho do Titular</p>
<p class="text-center exp-card-title " *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks]) && !p.userPermission([p.permissionList.Gabinete.md_tasks])">Despachos criados por mim</p>
<p class="text-center exp-card-content">{{ despachoprstore.count }} <span class="title1">Documentos</span> </p>
</div>
@@ -165,8 +165,8 @@ export class GabineteDigitalPage implements OnInit {
}
const pathname = window.location.pathname
this.router.events.forEach((event) => {
if (event instanceof NavigationEnd && event.url == pathname) {
//this.router.events.forEach((event) => {
//if (event instanceof NavigationEnd && event.url == pathname) {
this.waitForDomService.selector({
selector: 'app-gabinete-digital ion-content .aside-wrapper',
callback: () => {
@@ -179,18 +179,18 @@ export class GabineteDigitalPage implements OnInit {
}
}
})
}
});
//}
//});
this.hideRefreshButton();
this.waitForDomService.selector({
selector: 'app-gabinete-digital ion-content .aside-wrapper',
callback: () => {
// console.log('SECOND CALL')
this.loadAllProcesses();
}
})
// this.waitForDomService.selector({
// selector: 'app-gabinete-digital ion-content .aside-wrapper',
// callback: () => {
// // console.log('SECOND CALL')
// this.loadAllProcesses();
// }
// })
this.backgroundservice.registerBackService('Online', () => {
// this.loadAllProcesses();
@@ -260,8 +260,9 @@ export class PublicationsPage implements OnInit {
}
finally {
loader.remove()
this.refreshing()
}
this.refreshing()
}
async AddPublicationFolder(item?: any) {
+2 -2
View File
@@ -426,7 +426,7 @@ export class SearchPage implements OnInit {
});
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '361').subscribe(res=>{
,this.searchOrganicEntiry, this.searchDocTypeId, '361').subscribe(res => {
res.Categories.forEach( e => {
e['Active'] = false;
@@ -442,7 +442,7 @@ export class SearchPage implements OnInit {
this.reorderList(this.ordinance);
// hide show document
if(this.searchDocuments.length >= 1){
if(this.searchDocuments.length >= 1) {
this.showDocuments = true;
} else {
this.showDocuments = false