diff --git a/doc/architecture.md b/doc/architecture.md
new file mode 100644
index 000000000..6e1bbc69c
--- /dev/null
+++ b/doc/architecture.md
@@ -0,0 +1,107 @@
+# Software Architecture documentation
+This Architecture promotes a clear separation of concerns by dividing the system into layers, each with its own responsibility. However, rather than using a traditional layered approach, we'll focus on a component-based structure where each component adheres to SOLID principles and can operate independently. The architecture consist of the following layers:
+
+- **Components**: Business components
+- **Presentation**: UI components and Angular services.
+
+## Architecture Layers
+
+
+
+### Components
+
+
+
+Components are the core business logic units in the application. The components are divided into two sub-layers:
+
+**Domain Layer**
+
+- Contains business logic and rules.
+- Models the business entities.
+- Does not depend on the data layer or any other external services.
+
+**Data Layer**
+
+- Responsible for data access and persistence.
+- Contains repositories or data services that interact with APIs or databases.
+- Isolated from the domain layer to ensure a clear separation of concerns.
+
+### Presentation
+
+
+The presentation layer is responsible for the user interface and interactions. It consists of Angular UI components and services:
+
+
+## File Structure Explanation
+The project is divided into several key sections, each serving a specific purpose:
+
+**Source Code (src)**
+
+- **common**: Shared utilities such as decorators, interceptors, and guards.
+
+- **core**: Business Object divided by features to store shared entity, use case and repository interface
+
+- **infra**: Infrastructure code such as storage, HTTP clients, and logging.
+
+- **libs**: Reusable libraries (e.g., session management, cryptography).
+
+- **components**: Business Feature divided by responsibility
+
+- **UI**: Presentation layer with Angular divided by Feature
+
+- **utils**: Utility functions and constants.
+main.ts: Entry point of the application.
+
+
+├── package-lock.json
+├── package.json
+├── src
+│ ├── common
+│ ├── core
+│ │ ├── attachment
+│ │ │ ├── entity
+│ │ │ ├── repository
+│ │ │ └── use-cases
+│ ├── components
+│ │ ├── gabinete
+│ │ │ ├── domain
+│ │ │ ├── data
+│ │ ├── Agenda
+│ │ │ ├── domain
+│ │ │ ├── data
+│ ├── UI
+│ │ ├── pages
+│ │ │ ├── share
+| │ │ │ ├── buttons
+│ │ │ │ └── modal
+│ │ │ ├── Home
+│ │ │ | ├── service
+│ │ │ │ └── store
+│ │ │ ├── Agenda
+│ │ │ ├── Gabinete
+│ │ │ ├── Actions
+│ │ │ ├── Chat
+│ ├── infra
+│ │ ├── http
+│ ├── utils
+│ │ ├── date.ts
+│ │ ├── exception.ts
+│ │ ├── sort.ts
+│ ├── libs
+
+
+## Achieving Reusability
+
+
+
+### Example: Gabinete Page
+
+Consider a Gabinete scenario:
+- **Business components**: Event Component, Gabinete Component
+- **UI components**: Gabinete UI Business
+
+In this setup, the Event Component functionalities are reusable without any dependency on UI details. If the product team introduces create-event functionality in the Gabinete screen, the Event Component module can be added as a dependency to the Gabinete UI module seamlessly.
+
+
+## Conclusion
+This file structure supports Clean Architecture by ensuring a clear separation of concerns and adhering to SOLID principles. Each part of the application is modular, making it easy to maintain, test, and extend. This setup promotes a clean and organized project that scales well as complexity grows.
diff --git a/doc/svg/Group.svg b/doc/svg/Group.svg
new file mode 100644
index 000000000..02274f57a
--- /dev/null
+++ b/doc/svg/Group.svg
@@ -0,0 +1,82 @@
+
diff --git a/doc/svg/aa-relationship.svg b/doc/svg/aa-relationship.svg
new file mode 100644
index 000000000..2b92c8b53
--- /dev/null
+++ b/doc/svg/aa-relationship.svg
@@ -0,0 +1,53 @@
+
diff --git a/doc/svg/aa.svg b/doc/svg/aa.svg
new file mode 100644
index 000000000..a1e55766e
--- /dev/null
+++ b/doc/svg/aa.svg
@@ -0,0 +1,133 @@
+
diff --git a/doc/svg/bunesscomponent.svg b/doc/svg/bunesscomponent.svg
new file mode 100644
index 000000000..6268063be
--- /dev/null
+++ b/doc/svg/bunesscomponent.svg
@@ -0,0 +1,8 @@
+
diff --git a/doc/svg/business-co.svg b/doc/svg/business-co.svg
new file mode 100644
index 000000000..56a16031f
--- /dev/null
+++ b/doc/svg/business-co.svg
@@ -0,0 +1,22 @@
+
diff --git a/doc/svg/ui-layer.svg b/doc/svg/ui-layer.svg
new file mode 100644
index 000000000..ad87fb105
--- /dev/null
+++ b/doc/svg/ui-layer.svg
@@ -0,0 +1,6 @@
+
diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts
index f24a47bb4..d64991053 100644
--- a/src/app/home/home.page.ts
+++ b/src/app/home/home.page.ts
@@ -363,18 +363,18 @@ export class HomePage implements OnInit {
}
async synchWhenOnline() {
- try {
- await this.storage.get('eventEdit').then((req) => {
- JSON.parse(req).forEach(element => {
- this.eventservice.editEvent(element, 2, 3).subscribe((res) => {
- this.storage.remove('eventEdit')
- //this.sqliteservice.deleteeventsTable();
- })
- });
- })
- } catch (error) {
+ // try {
+ // await this.storage.get('eventEdit').then((req) => {
+ // JSON.parse(req).forEach(element => {
+ // this.eventservice.editEvent(element, 2, 3).subscribe((res) => {
+ // this.storage.remove('eventEdit')
+ // //this.sqliteservice.deleteeventsTable();
+ // })
+ // });
+ // })
+ // } catch (error) {
- }
+ // }
try {
await this.storage.get('eventDelete').then((req) => {
diff --git a/src/app/modals/view-event/view-event.page.ts b/src/app/modals/view-event/view-event.page.ts
index 111b1d64f..90d9967bc 100644
--- a/src/app/modals/view-event/view-event.page.ts
+++ b/src/app/modals/view-event/view-event.page.ts
@@ -78,23 +78,23 @@ export class ViewEventPage implements OnInit {
ngOnInit() {
this.loadEvent();
- this.backgroundservice.registerBackService('Online', () => {
- this.storage.get('eventEdit').then((req) => {
- JSON.parse(req).forEach(element => {
- this.eventsService.editEvent(element, 2, 3).subscribe((res) => {
- this.storage.remove('eventEdit')
- })
- });
- })
- this.storage.get('eventDelete').then((req) => {
- JSON.parse(req).forEach(element => {
- this.eventsService.editEvent(element, 2, 3).subscribe((res) => {
- this.storage.remove('eventDelete')
- })
- });
- })
- this.loadEvent();
- });
+ // this.backgroundservice.registerBackService('Online', () => {
+ // this.storage.get('eventEdit').then((req) => {
+ // JSON.parse(req).forEach(element => {
+ // this.eventsService.editEvent(element, 2, 3).subscribe((res) => {
+ // this.storage.remove('eventEdit')
+ // })
+ // });
+ // })
+ // this.storage.get('eventDelete').then((req) => {
+ // JSON.parse(req).forEach(element => {
+ // this.eventsService.editEvent(element, 2, 3).subscribe((res) => {
+ // this.storage.remove('eventDelete')
+ // })
+ // });
+ // })
+ // this.loadEvent();
+ // });
window.onresize = (event) => {
// if not mobile remove all component
diff --git a/src/app/pages/agenda/edit-event/edit-event.page.ts b/src/app/pages/agenda/edit-event/edit-event.page.ts
index 250b37cea..080736aec 100644
--- a/src/app/pages/agenda/edit-event/edit-event.page.ts
+++ b/src/app/pages/agenda/edit-event/edit-event.page.ts
@@ -377,7 +377,7 @@ export class EditEventPage implements OnInit {
this.postEvent.EventRecurrence.Type = this.selectedRecurringType;
if (this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
- this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
+ this.eventsService.editEvent(this.postEvent, 2, 3, null).subscribe(async () => {
if (window['reloadCalendar']) {
window['reloadCalendar']()
@@ -648,24 +648,24 @@ export class EditEventPage implements OnInit {
this.postEvent.IsAllDayEvent = this.allDayCheck;
this.postEvent.StartDate = this.setAlldayTime(this.postEvent.StartDate)
this.postEvent.EndDate = this.setAlldayTimeEndDate(this.postEvent.EndDate)
-
+
console.log('Recurso ativado!!');
} else {
this.postEvent.IsAllDayEvent = this.allDayCheck;
this.postEvent.EndDate = this.setAlldayTimeEndDateNotAlday(this.postEvent.EndDate)
console.log('Recurso desativado');
-
+
}
}
-
+
setAlldayTime(timeToReturn) {
let date: any = new Date(timeToReturn) || new Date();
let newdate = new Date();
date.setHours(0)
date.setMinutes(0)
date.setSeconds(0);
-
-
+
+
return date
}
@@ -675,8 +675,8 @@ export class EditEventPage implements OnInit {
date.setHours(23)
date.setMinutes(59)
date.setSeconds(0);
-
-
+
+
return date
}
@@ -686,8 +686,8 @@ export class EditEventPage implements OnInit {
date.setHours(23)
date.setMinutes(0)
date.setSeconds(0);
-
-
+
+
return date
}
}
diff --git a/src/app/pages/agenda/view-event/view-event.page.ts b/src/app/pages/agenda/view-event/view-event.page.ts
index d598893ec..52cd41f04 100644
--- a/src/app/pages/agenda/view-event/view-event.page.ts
+++ b/src/app/pages/agenda/view-event/view-event.page.ts
@@ -106,25 +106,25 @@ export class ViewEventPage implements OnInit {
ngOnInit() {
this.loadEvent();
- this.backgroundservice.registerBackService('Online', () => {
- this.storage.get('eventEdit').then((req) => {
- JSON.parse(req).forEach(element => {
- this.eventsService.editEvent(element, 2, 3).subscribe((res) => {
- this.storage.remove('eventEdit')
+ // this.backgroundservice.registerBackService('Online', () => {
+ // this.storage.get('eventEdit').then((req) => {
+ // JSON.parse(req).forEach(element => {
+ // this.eventsService.editEvent(element, 2, 3).subscribe((res) => {
+ // this.storage.remove('eventEdit')
- })
- });
- })
- this.storage.get('eventDelete').then((req) => {
- JSON.parse(req).forEach(element => {
- this.eventsService.editEvent(element, 2, 3).subscribe((res) => {
- this.storage.remove('eventDelete')
+ // })
+ // });
+ // })
+ // this.storage.get('eventDelete').then((req) => {
+ // JSON.parse(req).forEach(element => {
+ // this.eventsService.editEvent(element, 2, 3).subscribe((res) => {
+ // this.storage.remove('eventDelete')
- })
- });
- })
- this.loadEvent();
- });
+ // })
+ // });
+ // })
+ // this.loadEvent();
+ // });
window.onresize = (event) => {
// if not mobile remove all component
diff --git a/src/app/pages/chat/group-messages/group-messages.page.html b/src/app/pages/chat/group-messages/group-messages.page.html
index 295800e6f..0a5ae759c 100644
--- a/src/app/pages/chat/group-messages/group-messages.page.html
+++ b/src/app/pages/chat/group-messages/group-messages.page.html
@@ -243,7 +243,7 @@
{{last ? scrollToBottom() : ''}}
-
+
{{user.name}} saiu do grupo
@@ -251,7 +251,7 @@
{{last ? scrollToBottom() : ''}}
-
+
{{user.name}} foi removido do grupo
@@ -260,7 +260,7 @@
-
+
Adicionou {{user.name}}
diff --git a/src/app/pages/chat/group-messages/group-messages.page.ts b/src/app/pages/chat/group-messages/group-messages.page.ts
index d2ebd9d38..34927a2d0 100644
--- a/src/app/pages/chat/group-messages/group-messages.page.ts
+++ b/src/app/pages/chat/group-messages/group-messages.page.ts
@@ -52,7 +52,6 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
roomName: any;
members: any = []
contacts: string[] = [" Ana M.", "Andre F.", "Bruno G.", "Catarina T", "Tiago"];
- allUsers: any[] = [];
roomId: string;
loggedUserChat: any;
@@ -421,12 +420,9 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
async getChatMembers() {
- this.chatService.getAllUsers().subscribe(res => {
-
-
- this.allUsers = res['users'].filter(data => data.username != SessionStore.user.UserName);
-
- });
+ if(this.ChatSystemService.users.length == 0) {
+ this.ChatSystemService.getUser()
+ }
}
/* load(){
diff --git a/src/app/pages/events/edit-event/edit-event.page.ts b/src/app/pages/events/edit-event/edit-event.page.ts
index 66ea7f577..17b596792 100644
--- a/src/app/pages/events/edit-event/edit-event.page.ts
+++ b/src/app/pages/events/edit-event/edit-event.page.ts
@@ -162,28 +162,28 @@ export class EditEventPage implements OnInit {
Save()
{
- if (this.ionicForm.valid){
+ // if (this.ionicForm.valid){
- this.activatedRoute.paramMap.subscribe(paramMap =>{
- if (paramMap.has("profile")){
+ // this.activatedRoute.paramMap.subscribe(paramMap =>{
+ // if (paramMap.has("profile")){
- }
- });
+ // }
+ // });
- this.eventsService.editEvent(this.loadedEvent, 2, 3).subscribe(async () =>
- {
- const alert = await this.alertController.create({
- cssClass: 'my-custom-class',
- header: 'Evento actualizado',
- buttons: ['OK']
- });
+ // this.eventsService.editEvent(this.loadedEvent, 2, 3).subscribe(async () =>
+ // {
+ // const alert = await this.alertController.create({
+ // cssClass: 'my-custom-class',
+ // header: 'Evento actualizado',
+ // buttons: ['OK']
+ // });
- setTimeout(()=>{
- alert.dismiss();
- }, 1500);
- });
- }
+ // setTimeout(()=>{
+ // alert.dismiss();
+ // }, 1500);
+ // });
+ // }
}
showAlert(){
diff --git a/src/app/pages/events/event-detail/event-detail.page.ts b/src/app/pages/events/event-detail/event-detail.page.ts
index 52095b581..d2b709dff 100644
--- a/src/app/pages/events/event-detail/event-detail.page.ts
+++ b/src/app/pages/events/event-detail/event-detail.page.ts
@@ -163,27 +163,27 @@ export class EventDetailPage implements OnInit {
Save()
{
- if (this.ionicForm.valid){
+ // if (this.ionicForm.valid){
- this.activatedRoute.paramMap.subscribe(paramMap =>{
- if (paramMap.has("profile")){
+ // this.activatedRoute.paramMap.subscribe(paramMap =>{
+ // if (paramMap.has("profile")){
- }
- });
+ // }
+ // });
- this.eventsService.editEvent(this.loadedEvent, 2, 3).subscribe(async () =>
- {
- const alert = await this.alertController.create({
- cssClass: 'my-custom-class',
- header: 'Evento actualizado',
- buttons: ['OK']
- });
+ // this.eventsService.editEvent(this.loadedEvent, 2, 3).subscribe(async () =>
+ // {
+ // const alert = await this.alertController.create({
+ // cssClass: 'my-custom-class',
+ // header: 'Evento actualizado',
+ // buttons: ['OK']
+ // });
- setTimeout(()=>{
- alert.dismiss();
- }, 1500);
- });
- }
+ // setTimeout(()=>{
+ // alert.dismiss();
+ // }, 1500);
+ // });
+ // }
}
showAlert(){
diff --git a/src/app/services/events.service.ts b/src/app/services/events.service.ts
index e4dc8f6b0..caef83496 100644
--- a/src/app/services/events.service.ts
+++ b/src/app/services/events.service.ts
@@ -886,7 +886,7 @@ export class EventsService {
return this.http.put
(`${puturl}`, event, options)
}
- editEvent(event: Event, conflictResolutionMode: number, sendInvitationsOrCancellationsMode: number, CalendarId? ): Observable {
+ editEvent(event: Event, conflictResolutionMode: number, sendInvitationsOrCancellationsMode: number, CalendarId ): Observable {
let arrayReq = [];
arrayReq.push(event);
const puturl = environment.apiURL + 'calendar/PutEvent';
@@ -917,18 +917,35 @@ export class EventsService {
this.headers = this.headersPrOficial;
} else {
- const headers = [
- this.headerSharedOficial,
- this.headerSharedPessoal,
- this.headerOwnPessoal,
- this.headerOwnOficial
- ]
- const header = headers.find((header)=> {
- return header?.get('CalendarId')?.includes(CalendarId)
- })
+ if(CalendarId) {
+
+ const headers = [
+ this.headerSharedOficial,
+ this.headerSharedPessoal,
+ this.headerOwnPessoal,
+ this.headerOwnOficial
+ ]
+
+ const calendar = this.DetectCalendars(CalendarId)
+ const header = this.makeHeader(calendar)
+
+ this.headers = header
+ } else {
+ const headers = [
+ this.headerSharedOficial,
+ this.headerSharedPessoal,
+ this.headerOwnPessoal,
+ this.headerOwnOficial
+ ]
+
+ const header = headers.find((header)=> {
+ return header?.get('CalendarId')?.includes(CalendarId)
+ })
+
+ this.headers = header
+ }
- this.headers = header
}
}
else {
@@ -939,18 +956,36 @@ export class EventsService {
this.headers = this.headersPrPessoal;
}
else {
- const headers = [
- this.headerSharedOficial,
- this.headerSharedPessoal,
- this.headerOwnPessoal,
- this.headerOwnOficial
- ]
- const header = headers.find((header)=> {
- return header?.get('CalendarId')?.includes(CalendarId)
- })
- this.headers = header
+
+ if(CalendarId) {
+
+ const headers = [
+ this.headerSharedOficial,
+ this.headerSharedPessoal,
+ this.headerOwnPessoal,
+ this.headerOwnOficial
+ ]
+
+ const calendar = this.DetectCalendars(CalendarId)
+ const header = this.makeHeader(calendar)
+
+ this.headers = header
+ } else {
+ const headers = [
+ this.headerSharedOficial,
+ this.headerSharedPessoal,
+ this.headerOwnPessoal,
+ this.headerOwnOficial
+ ]
+
+ const header = headers.find((header)=> {
+ return header?.get('CalendarId')?.includes(CalendarId)
+ })
+
+ this.headers = header
+ }
}
}
diff --git a/src/app/services/events/edit-event/edit-event-routing.module.ts b/src/app/services/events/11edit-event/edit-event-routing.module.ts
similarity index 100%
rename from src/app/services/events/edit-event/edit-event-routing.module.ts
rename to src/app/services/events/11edit-event/edit-event-routing.module.ts
diff --git a/src/app/services/events/edit-event/edit-event.module.ts b/src/app/services/events/11edit-event/edit-event.module.ts
similarity index 100%
rename from src/app/services/events/edit-event/edit-event.module.ts
rename to src/app/services/events/11edit-event/edit-event.module.ts
diff --git a/src/app/services/events/edit-event/edit-event.page.html b/src/app/services/events/11edit-event/edit-event.page.html
similarity index 100%
rename from src/app/services/events/edit-event/edit-event.page.html
rename to src/app/services/events/11edit-event/edit-event.page.html
diff --git a/src/app/services/events/edit-event/edit-event.page.scss b/src/app/services/events/11edit-event/edit-event.page.scss
similarity index 100%
rename from src/app/services/events/edit-event/edit-event.page.scss
rename to src/app/services/events/11edit-event/edit-event.page.scss
diff --git a/src/app/services/events/edit-event/edit-event.page.spec.ts b/src/app/services/events/11edit-event/edit-event.page.spec.ts
similarity index 100%
rename from src/app/services/events/edit-event/edit-event.page.spec.ts
rename to src/app/services/events/11edit-event/edit-event.page.spec.ts
diff --git a/src/app/services/events/edit-event/edit-event.page.ts b/src/app/services/events/11edit-event/edit-event.page.ts
similarity index 90%
rename from src/app/services/events/edit-event/edit-event.page.ts
rename to src/app/services/events/11edit-event/edit-event.page.ts
index 4ac7b984e..51743da43 100644
--- a/src/app/services/events/edit-event/edit-event.page.ts
+++ b/src/app/services/events/11edit-event/edit-event.page.ts
@@ -70,7 +70,7 @@ export class EditEventPage implements OnInit {
else{
this.pageId = paramMap.get('eventId');
eventid = paramMap.get('eventId');
-
+
}
if (paramMap.has("caller")){
@@ -158,28 +158,28 @@ export class EditEventPage implements OnInit {
Save()
{
- if (this.ionicForm.valid){
+ // if (this.ionicForm.valid){
- this.activatedRoute.paramMap.subscribe(paramMap =>{
- if (paramMap.has("profile")){
-
+ // this.activatedRoute.paramMap.subscribe(paramMap =>{
+ // if (paramMap.has("profile")){
- }
- });
- this.eventsService.editEvent(this.loadedEvent, 2, 3).subscribe(async () =>
- {
- const alert = await this.alertController.create({
- cssClass: 'my-custom-class',
- header: 'Evento actualizado',
- buttons: ['OK']
- });
+ // }
+ // });
- setTimeout(()=>{
- alert.dismiss();
- }, 1500);
- });
- }
+ // this.eventsService.editEvent(this.loadedEvent, 2, 3).subscribe(async () =>
+ // {
+ // const alert = await this.alertController.create({
+ // cssClass: 'my-custom-class',
+ // header: 'Evento actualizado',
+ // buttons: ['OK']
+ // });
+
+ // setTimeout(()=>{
+ // alert.dismiss();
+ // }, 1500);
+ // });
+ // }
}
loadAttachments()
@@ -187,7 +187,7 @@ export class EditEventPage implements OnInit {
this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => {
this.loadedEventAttachments = res;
-
+
},((erro) => {
console.error('loadAttchament', erro)
@@ -230,7 +230,7 @@ export class EditEventPage implements OnInit {
backdropDismiss: false
});
-
+
modal.onDidDismiss().then((data) => {
if (data['data'] != null)
diff --git a/src/app/services/events/event-detail/event-detail-routing.module.ts b/src/app/services/events/11event-detail/event-detail-routing.module.ts
similarity index 100%
rename from src/app/services/events/event-detail/event-detail-routing.module.ts
rename to src/app/services/events/11event-detail/event-detail-routing.module.ts
diff --git a/src/app/services/events/event-detail/event-detail.module.ts b/src/app/services/events/11event-detail/event-detail.module.ts
similarity index 100%
rename from src/app/services/events/event-detail/event-detail.module.ts
rename to src/app/services/events/11event-detail/event-detail.module.ts
diff --git a/src/app/services/events/event-detail/event-detail.page.html b/src/app/services/events/11event-detail/event-detail.page.html
similarity index 100%
rename from src/app/services/events/event-detail/event-detail.page.html
rename to src/app/services/events/11event-detail/event-detail.page.html
diff --git a/src/app/services/events/event-detail/event-detail.page.scss b/src/app/services/events/11event-detail/event-detail.page.scss
similarity index 100%
rename from src/app/services/events/event-detail/event-detail.page.scss
rename to src/app/services/events/11event-detail/event-detail.page.scss
diff --git a/src/app/services/events/event-detail/event-detail.page.spec.ts b/src/app/services/events/11event-detail/event-detail.page.spec.ts
similarity index 100%
rename from src/app/services/events/event-detail/event-detail.page.spec.ts
rename to src/app/services/events/11event-detail/event-detail.page.spec.ts
diff --git a/src/app/services/events/event-detail/event-detail.page.ts b/src/app/services/events/11event-detail/event-detail.page.ts
similarity index 90%
rename from src/app/services/events/event-detail/event-detail.page.ts
rename to src/app/services/events/11event-detail/event-detail.page.ts
index d5afa0596..7da123b0d 100644
--- a/src/app/services/events/event-detail/event-detail.page.ts
+++ b/src/app/services/events/11event-detail/event-detail.page.ts
@@ -70,7 +70,7 @@ export class EventDetailPage implements OnInit {
else{
this.pageId = paramMap.get('eventId');
eventid = paramMap.get('eventId');
-
+
}
if (paramMap.has("caller")){
@@ -93,7 +93,7 @@ export class EventDetailPage implements OnInit {
backdropDismiss: false
});
-
+
modal.onDidDismiss().then((data) => {
if (data['data'] != null)
@@ -158,28 +158,28 @@ export class EventDetailPage implements OnInit {
Save()
{
- if (this.ionicForm.valid){
+ // if (this.ionicForm.valid){
- this.activatedRoute.paramMap.subscribe(paramMap =>{
- if (paramMap.has("profile")){
-
+ // this.activatedRoute.paramMap.subscribe(paramMap =>{
+ // if (paramMap.has("profile")){
- }
- });
- this.eventsService.editEvent(this.loadedEvent, 2, 3).subscribe(async () =>
- {
- const alert = await this.alertController.create({
- cssClass: 'my-custom-class',
- header: 'Evento actualizado',
- buttons: ['OK']
- });
+ // }
+ // });
- setTimeout(()=>{
- alert.dismiss();
- }, 1500);
- });
- }
+ // this.eventsService.editEvent(this.loadedEvent, 2, 3).subscribe(async () =>
+ // {
+ // const alert = await this.alertController.create({
+ // cssClass: 'my-custom-class',
+ // header: 'Evento actualizado',
+ // buttons: ['OK']
+ // });
+
+ // setTimeout(()=>{
+ // alert.dismiss();
+ // }, 1500);
+ // });
+ // }
}
loadAttachments()
@@ -187,7 +187,7 @@ export class EventDetailPage implements OnInit {
this.attachamentsService.getAttachmentsById(this.pageId).subscribe(res => {
this.loadedEventAttachments = res;
-
+
},((erro) => {
console.error('loadAttchament', erro)
diff --git a/src/app/services/events/events-routing.module.ts b/src/app/services/events/events-routing.module.ts
index 5b2cbdb3c..bca181043 100644
--- a/src/app/services/events/events-routing.module.ts
+++ b/src/app/services/events/events-routing.module.ts
@@ -8,10 +8,10 @@ const routes: Routes = [
path: '',
component: EventsPage
},
- {
- path: 'event-detail',
- loadChildren: () => import('./event-detail/event-detail.module').then( m => m.EventDetailPageModule)
- },
+ // {
+ // path: 'event-detail',
+ // loadChildren: () => import('./event-detail/event-detail.module').then( m => m.EventDetailPageModule)
+ // },
{
path: 'attachments',
loadChildren: () => import('./attachments/attachments.module').then( m => m.AttachmentsPageModule)
@@ -24,10 +24,10 @@ const routes: Routes = [
path: 'event-detail-modal',
loadChildren: () => import('./event-detail-modal/event-detail-modal.module').then( m => m.EventDetailModalPageModule)
},
- {
- path: 'edit-event',
- loadChildren: () => import('./edit-event/edit-event.module').then( m => m.EditEventPageModule)
- }
+ // {
+ // path: 'edit-event',
+ // loadChildren: () => import('./edit-event/edit-event.module').then( m => m.EditEventPageModule)
+ // }
];
diff --git a/src/app/services/events/events.page.ts b/src/app/services/events/events.page.ts
index 29c7d2455..72d212440 100644
--- a/src/app/services/events/events.page.ts
+++ b/src/app/services/events/events.page.ts
@@ -5,7 +5,7 @@ import { EventsService } from 'src/app/services/events.service';
import { NavigationExtras, Router } from '@angular/router';
import { ActivatedRoute, NavigationEnd } from '@angular/router';
import { ModalController, Platform } from '@ionic/angular';
-import { EventDetailPage } from './event-detail/event-detail.page';
+// import { EventDetailPage } from './event-detail/event-detail.page';
import { ProcessesService } from '../../services/processes.service';
import { DailyWorkTask } from '../../models/dailyworktask.model';
import { LoginUserRespose } from 'src/app/models/user.model';
@@ -84,7 +84,7 @@ export class EventsPage implements OnInit {
public ThemeService: ThemeService,
) {
this.existingScreenOrientation = this.screenOrientation.type;
-
+
this.loggeduser = SessionStore.user;
@@ -92,7 +92,7 @@ export class EventsPage implements OnInit {
this.platform.resize.subscribe(async () => {
//
- //
+ //
});
@@ -137,7 +137,7 @@ export class EventsPage implements OnInit {
// Lock to portrait
lockToPortrait(){
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.PORTRAIT);
-
+
}
// Lock to landscape
@@ -153,7 +153,7 @@ export class EventsPage implements OnInit {
checkScreenOrientation(){
if( window.innerWidth < 701) {
this.lockToPortrait();
-
+
}
else{
@@ -233,8 +233,8 @@ export class EventsPage implements OnInit {
let prOficialEvents= await this.eventService.getAllPrOficialEvents(start, end).toPromise();
let prPessoalEvents= await this.eventService.getAllPrPessoalEvents(start, end).toPromise();
this.eventsList = prOficialEvents.concat(prPessoalEvents);
-
-
+
+
if(this.eventsList.length > 0){
this.currentEvent = this.eventsList[0].Subject;
@@ -297,12 +297,12 @@ export class EventsPage implements OnInit {
changeProfile(){
if(this.profile == "mdgpr"){
-
+
this.profile ="pr";
this.RefreshEvents();
}
else{
-
+
this.profile ="mdgpr";
this.RefreshEvents();
}
@@ -315,26 +315,11 @@ export class EventsPage implements OnInit {
this.router.navigate(['/home/login']);
}
- async openEventDetail1(id:any){
-
- const modal = await this.modalController.create({
- component: EventDetailPage,
- componentProps: {
- eventId: id,
- },
- cssClass: 'event-detail',
- backdropDismiss: false
- });
-
- modal.onDidDismiss();
- await modal.present();
-
- }
LoadList() {
this.processes.GetTaskListExpediente(false).subscribe(result => {
-
+
const ExpedienteTask = result.map( e=> this.expedienteTaskPipe.transform(e))
diff --git a/src/app/shared/agenda/edit-event/edit-event.page.ts b/src/app/shared/agenda/edit-event/edit-event.page.ts
index b7c558d8b..a6975183f 100644
--- a/src/app/shared/agenda/edit-event/edit-event.page.ts
+++ b/src/app/shared/agenda/edit-event/edit-event.page.ts
@@ -366,7 +366,7 @@ export class EditEventPage implements OnInit {
try {
if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
- await this.eventsService.editEvent(this._postEvent, 2, 3).toPromise()
+ await this.eventsService.editEvent(this._postEvent, 2, 3, this._postEvent.CalendarId).toPromise()
if(this.initCalendarName != this._postEvent.CalendarName) {
let body = {
"EventId": this._postEvent.EventId,
@@ -380,6 +380,7 @@ export class EditEventPage implements OnInit {
this.showLoader = false;
this.httpErrorHandle.httpsSucessMessagge('Editar evento')
} else {
+ console.log(this._postEvent, 2, 3, this._postEvent.CalendarId)
await this.eventsService.editEvent(this._postEvent, 2, 3, this._postEvent.CalendarId).toPromise()
if(this.initCalendarName != this._postEvent.CalendarName) {
let body = {
@@ -542,7 +543,7 @@ export class EditEventPage implements OnInit {
SourceName: data.selected.Assunto,
ParentId: this._postEvent.EventId,
SourceId: data.selected.Id,
- Stakeholders: data.selected.Stakeholders | data.selected.EntidadeOrganicaNome,
+ Stakeholders: data.selected.EntidadeOrganicaNome | data.selected.Stakeholders,
ApplicationId: data.selected.ApplicationType.toString(),
CreateDate: data.selected.Data,
Id: 'add',
@@ -590,13 +591,13 @@ export class EditEventPage implements OnInit {
this.postEvent.IsAllDayEvent = this.allDayCheck;
this.postEvent.StartDate = this.setAlldayTime(this.postEvent.StartDate)
this.postEvent.EndDate = this.setAlldayTimeEndDate(this.postEvent.EndDate)
-
+
console.log('Recurso ativado!!');
} else {
this.postEvent.IsAllDayEvent = this.allDayCheck;
this.postEvent.EndDate = this.setAlldayTimeEndDateNotAlday(this.postEvent.EndDate)
console.log('Recurso desativado');
-
+
}
}
diff --git a/src/app/shared/chat/group-messages/group-messages.page.html b/src/app/shared/chat/group-messages/group-messages.page.html
index 88a865d57..a42e49399 100644
--- a/src/app/shared/chat/group-messages/group-messages.page.html
+++ b/src/app/shared/chat/group-messages/group-messages.page.html
@@ -213,7 +213,7 @@
{{last ? scrollToBottom() : ''}}
-
+
Adicionou {{user.name}}
diff --git a/src/app/shared/chat/group-messages/group-messages.page.ts b/src/app/shared/chat/group-messages/group-messages.page.ts
index 64864d56f..041ae5845 100644
--- a/src/app/shared/chat/group-messages/group-messages.page.ts
+++ b/src/app/shared/chat/group-messages/group-messages.page.ts
@@ -41,7 +41,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
loggedUser: any;
message: any;
messages: any;
- allUsers: any[] = [];
documents: SearchList[] = [];
room: any = new Array();
@@ -333,12 +332,18 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
async getChatMembers() {
- this.chatService.getAllUsers().subscribe(res => {
- //
+ // this.chatService.getAllUsers().subscribe(res => {
+ // //
+
+ // this.allUsers = res['users']
+ // //
+ // });
+
+
+ if(this.ChatSystemService.users.length == 0) {
+ this.ChatSystemService.getUser()
+ }
- this.allUsers = res['users']
- //
- });
}
openGroupContactsPage() {
diff --git a/src/app/shared/publication/upload/publication-from-mv.service.ts b/src/app/shared/publication/upload/publication-from-mv.service.ts
index b71c2b000..4158ddabc 100644
--- a/src/app/shared/publication/upload/publication-from-mv.service.ts
+++ b/src/app/shared/publication/upload/publication-from-mv.service.ts
@@ -226,13 +226,14 @@ export class PublicationFromMvService {
try {
- await this.publications.CreatePublication(publication.ProcessId, publication).toPromise()
+ const publicationsId = await this.publications.CreatePublication(publication.ProcessId, publication).toPromise()
+
this.httpErroHandle.httpsSucessMessagge('Criar publicação')
// this.goBackToViewPublications.emit();
window['upload-header-set-remove'](this.id);
this.doneUpload()
- this.publicationFolderService.getPublicationsIds(this.folderId)
+ this.publicationFolderService.loadPublication(publicationsId, this.folderId)
} catch (error) {
window['upload-header-set-retry'](this.id)
this.httpErroHandle.httpStatusHandle(error)
diff --git a/src/app/shared/publication/view-publications/view-publications.page.html b/src/app/shared/publication/view-publications/view-publications.page.html
index 54582b856..961587800 100644
--- a/src/app/shared/publication/view-publications/view-publications.page.html
+++ b/src/app/shared/publication/view-publications/view-publications.page.html
@@ -43,13 +43,13 @@
-