fix agenda and publication

This commit is contained in:
Peter Maquiran
2024-05-24 11:29:53 +01:00
parent fcb6727f4e
commit 3eecefcfa6
38 changed files with 651 additions and 216 deletions
+107
View File
@@ -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
![Alt text](./svg/aa.svg)
### Components
![Alt text](./svg/business-co.svg)
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
![Alt text](./svg/ui-layer.svg)
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.
![Alt text](./svg/aa-relationship.svg)
## 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.
+82
View File
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 168 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 91 KiB

+133
View File
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 278 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 30 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 36 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 24 KiB

+11 -11
View File
@@ -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) => {
+17 -17
View File
@@ -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
@@ -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
}
}
@@ -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
@@ -243,7 +243,7 @@
{{last ? scrollToBottom() : ''}}
</div>
<div *ngIf="msg.t == 'ul'" class="info-text-leave">
<div *ngFor="let user of allUsers">
<div *ngFor="let user of ChatSystemService.users">
<div *ngIf="msg.msg == user.username">
<ion-label>{{user.name}} saiu do grupo</ion-label><br />
</div>
@@ -251,7 +251,7 @@
{{last ? scrollToBottom() : ''}}
</div>
<div *ngIf="msg.t == 'ru'" class="info-text-leave">
<div *ngFor="let user of allUsers">
<div *ngFor="let user of ChatSystemService.users">
<div *ngIf="msg.msg == user.username">
<ion-label>{{user.name}} foi removido do grupo</ion-label><br />
</div>
@@ -260,7 +260,7 @@
</div>
<div *ngIf="msg.t == 'au' && msg.msg != sessionStore.user.UserName">
<div *ngFor="let user of allUsers">
<div *ngFor="let user of ChatSystemService.users">
<div *ngIf="msg.msg == user.username" class="info-text-leave">
<ion-label>Adicionou {{user.name}}</ion-label><br />
</div>
@@ -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(){
@@ -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(){
@@ -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(){
+56 -21
View File
@@ -886,7 +886,7 @@ export class EventsService {
return this.http.put<Event>(`${puturl}`, event, options)
}
editEvent(event: Event, conflictResolutionMode: number, sendInvitationsOrCancellationsMode: number, CalendarId? ): Observable<Event> {
editEvent(event: Event, conflictResolutionMode: number, sendInvitationsOrCancellationsMode: number, CalendarId ): Observable<Event> {
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
}
}
}
@@ -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)
@@ -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)
@@ -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)
// }
];
+10 -25
View File
@@ -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))
@@ -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');
}
}
@@ -213,7 +213,7 @@
{{last ? scrollToBottom() : ''}}
</div>
<div *ngIf="msg.t == 'au' && msg.msg != sessionStore.user.UserName">
<div *ngFor="let user of allUsers">
<div *ngFor="let user of ChatSystemService.users">
<div *ngIf="msg.msg == user.username" class="info-text-leave">
<ion-label>Adicionou {{user.name}}</ion-label><br />
</div>
@@ -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() {
@@ -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)
@@ -43,13 +43,13 @@
<ion-card-content>
<div style="width: 100%; height: 395px;">
<app-swiper
<app-swiper
[publicationList]=publication
[navigation]="true"
[pagination]="false"
></app-swiper>
</div>
<!--
<!--
<swiper-container [config]="swiperThumbsConfig" [modules]="swiperModules" [speed]=400 navigation="true" [pagination]="{clickable: true, dynamicBullets: true }">
<swiper-slide *ngFor="let files of publication.Files let k = index" class="centered-slide">
<div class="cool">
+3 -5
View File
@@ -184,15 +184,13 @@ export class PublicationFolderService {
let a: any = Object.assign({}, this.publicationList[folderId][findIndex])
let b: any = Object.assign({}, publicationDetails)
a.Files = a.Files.length
b.Files = b.Files.length
const fileNamesB = a.Files.map((e) => e.OriginalFileName).join('')
const fileNamesL = b.Files.map((e) => e.OriginalFileName).join('')
if (JSON.stringify(a) != JSON.stringify(b)) {
if (a.Message != b.Message || a.Title != b.Title || a.Files.length != b.Files.length || fileNamesB != fileNamesL) {
console.log({a, b})
this.publicationList[folderId][findIndex] = publicationDetails
} else {
// console.log({publicationDetails})
}
}
+1 -1
View File
@@ -4,4 +4,4 @@ import { environment as oaprProd } from './suport/oapr'
import { DevDev } from './suport/dev'
export const environment: Environment = oaprProd;
export const environment: Environment = DevDev;
+3
View File
@@ -2,6 +2,9 @@
"folders": [
{
"path": "."
},
{
"path": "../testAu"
}
],
"settings": {