diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 974df44e1..b5c5b9a5a 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -252,6 +252,10 @@ const routes = [ }, { path: 'chat-message-debugging', loadChildren: () => import('./shared/popover/chat-message-debugging/chat-message-debugging.module').then( m => m.ChatMessageDebuggingPageModule) + }, + { + path: 'add-user', + loadChildren: () => import('./shared/chat/add-user/add-user.module').then( m => m.AddUserPageModule) } diff --git a/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.html b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.html index f98cc5950..5c9718ad4 100644 --- a/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.html +++ b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.html @@ -220,14 +220,18 @@ -
+ +<<<<<<< HEAD + +======= + +>>>>>>> develop_bitOut-fix
- + -->
diff --git a/src/app/pages/agenda/edit-event/edit-event.page.html b/src/app/pages/agenda/edit-event/edit-event.page.html index 57b957ae0..80bd88990 100644 --- a/src/app/pages/agenda/edit-event/edit-event.page.html +++ b/src/app/pages/agenda/edit-event/edit-event.page.html @@ -163,7 +163,7 @@ @@ -180,7 +180,7 @@
-
+
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 5542f0d12..f240e8da0 100644 --- a/src/app/pages/agenda/edit-event/edit-event.page.ts +++ b/src/app/pages/agenda/edit-event/edit-event.page.ts @@ -66,9 +66,9 @@ export class EditEventPage implements OnInit { public endMinDate = new Date(new Date().getTime() + 15 * 60000).toISOString().slice(0,10) public maxDate: any; public stepHour = 1; - public stepMinute = 5; - public stepSecond = 5; - currentDate = new Date(); + public stepMinute = 15; + public stepSecond = 15; + currentDate = this.roundTimeQuarterHour(); loadedEventAttachments: Attachment[] = []; taskParticipants: any = []; @@ -171,6 +171,39 @@ export class EditEventPage implements OnInit { }); } + roundTimeQuarterHour() { + var timeToReturn = new Date(); + // var minutes = timeToReturn.getMinutes(); + var minutes = timeToReturn.getMinutes(); + var hours = timeToReturn.getHours(); + + // console.log("MINUTOS: " +minutes); + // console.log("BEFORE MINUTES: " +(Math.round(minutes/15) * 15)); + + var m = (Math.round(minutes/15) * 15) % 60; + // console.log("AFTER MINUTES: " +m); + var h = minutes > 52 ? (hours === 23 ? 0 : ++hours) : hours; + + if (m == 0) { + if(minutes > m){ + m = m + 15; + } + timeToReturn.setHours(h); + timeToReturn.setMinutes(m); + }else{ + if(minutes > m){ + + m = m + 15; + + timeToReturn.setHours(h); + timeToReturn.setMinutes(m); + }else { + timeToReturn.setHours(h); + timeToReturn.setMinutes(m); + } + } + } + onSelectedRecurringChanged(ev?:any) { this.calculetedLastOccurrence(ev); diff --git a/src/app/pages/agenda/new-event/new-event.page.html b/src/app/pages/agenda/new-event/new-event.page.html index fe411fa7d..38d2679d0 100644 --- a/src/app/pages/agenda/new-event/new-event.page.html +++ b/src/app/pages/agenda/new-event/new-event.page.html @@ -310,6 +310,24 @@
+ +
diff --git a/src/app/pages/chat/chat.page.html b/src/app/pages/chat/chat.page.html index b16b1ef84..1b20e9b86 100644 --- a/src/app/pages/chat/chat.page.html +++ b/src/app/pages/chat/chat.page.html @@ -218,6 +218,17 @@ class=" height-100 flex-column"> + +
diff --git a/src/app/pages/events/events.page.ts b/src/app/pages/events/events.page.ts index e22c7f711..78c8864e2 100644 --- a/src/app/pages/events/events.page.ts +++ b/src/app/pages/events/events.page.ts @@ -460,18 +460,15 @@ export class EventsPage implements OnInit { }); } - goToEvent(eventId: any) { - this.router.navigate(['/home/events', eventId, 'events']); + goToEvent(event: any) { + let navigationExtras: NavigationExtras = { queryParams: { CalendarId: event.CalendarId } } + + + this.router.navigate(['/home/events', event.EventId, 'agenda'], navigationExtras); } goToExpediente(SerialNumber: any) { this.router.navigate(['/home/events/expediente', SerialNumber, 'events']); - /* if (this.loggeduser.Profile == 'MDGPR') { - this.router.navigate(['/home/events/expediente', SerialNumber, 'events']); - } - else if (this.loggeduser.Profile == 'PR') { - this.router.navigate(['/home/events/expedientes-pr', SerialNumber, 'events']); - } */ } viewExpedientListPage() { diff --git a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.html b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.html index 92ba13904..68058bd0c 100644 --- a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.html +++ b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.html @@ -199,7 +199,7 @@
-
+
diff --git a/src/app/pages/inactivity/inactivity.page.html b/src/app/pages/inactivity/inactivity.page.html index 109241f16..1b16c7224 100644 --- a/src/app/pages/inactivity/inactivity.page.html +++ b/src/app/pages/inactivity/inactivity.page.html @@ -12,7 +12,6 @@
-
Digite o PIN
Digite o novo PIN
@@ -26,7 +25,7 @@
-
+
1
2
3
diff --git a/src/app/pages/inactivity/inactivity.page.ts b/src/app/pages/inactivity/inactivity.page.ts index 27255c30d..09a7d114c 100644 --- a/src/app/pages/inactivity/inactivity.page.ts +++ b/src/app/pages/inactivity/inactivity.page.ts @@ -39,41 +39,9 @@ export class InactivityPage implements OnInit { ngOnInit() { - - // window.addEventListener('resize', (event) => { - // if(this.router.url != '/login') return false - - // if(this.loop == false) { - // this.loop = true - // this.runloop() - // } - - // }, true); - } runloop() { - // const containerHeight = 651 - - // let circleHeight = document.querySelector('.circle')['offsetHeight'] - // let circleWidth = document.querySelector('.circle')['offsetWidth'] - // - - // - - // document.querySelectorAll('.circle').forEach(e=>{ - // e['style']['height'] = (circleHeight -1 )+'px' - // e['style']['width'] = (circleWidth -1 )+'px' - // }) - - - // if( window.innerHeight< containerHeight) { - // setTimeout(()=>{ - // this.runloop() - // }, 100) - // } else { - // this.loop = false - // } } @@ -165,8 +133,8 @@ export class InactivityPage implements OnInit { if(!SessionStore.hasPin) { // this.storePin() + this.pinLogin() } else { - // this.pinLogin() } } @@ -187,7 +155,7 @@ export class InactivityPage implements OnInit { setTimeout(() => { this.clearCode() - }, 1000) + }, 5000) } else { this.toastService._badRequest('Pin incorreto') @@ -222,7 +190,7 @@ export class InactivityPage implements OnInit { } - }, 5000) + }, 100) } @@ -230,28 +198,8 @@ export class InactivityPage implements OnInit { storePin() { - setTimeout(() => { - const code = this.code.join(''); - SessionStore.setPin(code); - - if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){ - //When user has got access to Agenda but does not have their own calendar, goes to Agenda - if(this.p.userPermission(this.p.permissionList.Agenda.access) && SessionStore.user.OwnerCalendars.length == 0){ - this.router.navigate(['/home/agenda']); - } - else{ - this.router.navigate(['/home/events']); - } - } - //If user has access permission to both Chat and Action, goes to Chat by default. - else if((this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)) || this.p.userPermission(this.p.permissionList.Chat.access)){ - this.router.navigate(['/home/chat']); - } - else if(this.p.userPermission(this.p.permissionList.Actions.access)){ - this.router.navigate(['/home/publications']); - } - - }, 5000) + const code = this.code.join(''); + SessionStore.setPin(code); } diff --git a/src/app/pages/login/login.page.ts b/src/app/pages/login/login.page.ts index 5baee9067..8fd964e5f 100644 --- a/src/app/pages/login/login.page.ts +++ b/src/app/pages/login/login.page.ts @@ -11,7 +11,6 @@ import { ClearStoreService } from 'src/app/services/clear-store.service'; import { ChangeProfileService } from 'src/app/services/change-profile.service'; import { ThemeService } from 'src/app/services/theme.service'; import { PermissionService } from 'src/app/services/permission.service'; -import { PermissionList } from 'src/app/models/permission/permissionList'; import { MessageModel, DeleteMessageModel } from '../../models/beast-orm'; import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service'; import { ChatSystemService } from 'src/app/services/chat/chat-system.service'; @@ -158,7 +157,7 @@ export class LoginPage implements OnInit { this.getToken(); - this.router.navigateByUrl('/pin', { replaceUrl: true }); + this.router.navigateByUrl('/home/events', { replaceUrl: true }); } } else{ diff --git a/src/app/pages/publications/new-action/new-action.page.html b/src/app/pages/publications/new-action/new-action.page.html index b0a6b8150..e1410f6c7 100644 --- a/src/app/pages/publications/new-action/new-action.page.html +++ b/src/app/pages/publications/new-action/new-action.page.html @@ -35,7 +35,6 @@ displayFormat="D MMM YYYY H:mm" minuteValues="0,5,10,15,20,25,30,35,40,45,50,55" monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez" - min="{{minDate}}" max="2025"> @@ -43,7 +42,6 @@ diff --git a/src/app/pages/publications/publications.page.html b/src/app/pages/publications/publications.page.html index 0136d4e90..8e58da4a8 100644 --- a/src/app/pages/publications/publications.page.html +++ b/src/app/pages/publications/publications.page.html @@ -37,7 +37,7 @@
- + diff --git a/src/app/pages/search/search.page.ts b/src/app/pages/search/search.page.ts index 34cd15c99..438106d26 100644 --- a/src/app/pages/search/search.page.ts +++ b/src/app/pages/search/search.page.ts @@ -258,10 +258,8 @@ export class SearchPage implements OnInit { if(this.type == "Agenda" ){ - this.showLoader = true; - this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender ,this.searchOrganicEntiry, this.searchDocTypeId, '0').subscribe(res=>{ @@ -287,7 +285,8 @@ export class SearchPage implements OnInit { this.loadWordCloud(); },error => { - this.searchResult = "Registo não encontrado" + this.showLoader = false; + // this.searchResult = "Registo não encontrado" console.log(error) }); } @@ -551,6 +550,11 @@ export class SearchPage implements OnInit { this.loadWordCloud(); },error => { + counter++; + + if(counter ==2){ + this.showLoader = false; + } this.searchResult = "Registo não encontrado" console.log(error) }); @@ -586,6 +590,7 @@ export class SearchPage implements OnInit { this.showLoader = false; this.loadWordCloud(); },error => { + this.showLoader = false; this.searchResult = "Registo não encontrado" console.log(error) }); diff --git a/src/app/services/chat/chat-system.service.ts b/src/app/services/chat/chat-system.service.ts index d1d9716d0..0033dc89c 100644 --- a/src/app/services/chat/chat-system.service.ts +++ b/src/app/services/chat/chat-system.service.ts @@ -18,6 +18,7 @@ import { ChatMethodsService } from './chat-methods.service'; import { AESEncrypt } from '../aesencrypt.service' import { AttachmentsService } from 'src/app/services/attachments.service'; import { NetworkServiceService} from 'src/app/services/network-service.service'; +import { JsonStore } from '../jsonStore.service'; @Injectable({ providedIn: 'root' @@ -95,10 +96,12 @@ export class ChatSystemService { } loadChat() { - this.ReLoadChat() + if(SessionStore.user.ChatData) { + this.ReLoadChat() + } } - async ReLoadChat() { + private async ReLoadChat() { await this.chatService.refreshtoken(); await this.restoreUsers(); @@ -271,6 +274,7 @@ export class ChatSystemService { } } + this.loadingWholeList = false await this.storage.set('Rooms', rooms); setTimeout(() => { @@ -282,7 +286,6 @@ export class ChatSystemService { this.sortRoomList() }, 10000) - this.loadingWholeList = false } /** @@ -400,7 +403,7 @@ export class ChatSystemService { if (setData.name != 'Rocket Cat') { // create room if(!this.roomExist(roomId)) { - let room:RoomService = new RoomService(this.RochetChatConnectorService, new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService), this.storage, this.platform, this.sqlservice, this.NativeNotificationService, this.sortService, this.ChatService, this.NfService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService, this) + let room:RoomService = new RoomService(this.RochetChatConnectorService, new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService, this), this.storage, this.platform, this.sqlservice, this.NativeNotificationService, this.sortService, this.ChatService, this.NfService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService, this) room.setData(setData) room.receiveMessage() room.getAllUsers = this.getUsers @@ -573,9 +576,14 @@ export class ChatSystemService { })[0] if(roomName) { - const firstName = capitalizeTxt(roomName.split('.')[0]) - const lastName = capitalizeTxt(roomName.split('.')[1]) - return firstName + ' ' + lastName + try { + const firstName = capitalizeTxt(roomName.split('.')[0]) + const lastName = capitalizeTxt(roomName.split('.')[1]) + return firstName + ' ' + lastName + } catch(e) { + return roomData['membersExcludeMe'][0].name + } + } else if(roomData.name) { return roomData.name } else { diff --git a/src/app/services/chat/message.service.ts b/src/app/services/chat/message.service.ts index 299f98e87..56e5606d3 100644 --- a/src/app/services/chat/message.service.ts +++ b/src/app/services/chat/message.service.ts @@ -12,7 +12,7 @@ import { AESEncrypt } from '../aesencrypt.service' import { HttpEventType } from '@angular/common/http'; import { AttachmentsService } from 'src/app/services/attachments.service'; import { NetworkServiceService , ConnectionStatus} from 'src/app/services/network-service.service'; - +import { ChatSystemService } from './chat-system.service'; @Injectable({ providedIn: 'root' }) @@ -67,7 +67,8 @@ export class MessageService { private ChatMethodsService: ChatMethodsService, private AESEncrypt: AESEncrypt, private AttachmentsService: AttachmentsService, - private NetworkServiceService: NetworkServiceService) { + private NetworkServiceService: NetworkServiceService, + private ChatSystemService: ChatSystemService) { } setData({customFields = {}, channels, mentions, msg ,rid ,ts, u, t, _id, id, _updatedAt, file, attachments, temporaryData, localReference , viewed = [], received = [], delate = false, delateRequest =false, from }:Message) { @@ -119,6 +120,17 @@ export class MessageService { } } + if(!this.u.name && this.u.username) { + const user = this.ChatSystemService.users.find((u)=> u.username == this.u.username) + if(user) { + this.u.name = user.name + } else if( this.u.username == SessionStore.user.UserName) { + this.u.name = SessionStore.user.FullName + } else { + // console.log(user.username, SessionStore.user.UserName) + } + } + this.calDateDuration() } @@ -203,7 +215,6 @@ export class MessageService { // console.log('online send') this.RochetChatConnectorService.send(params).then( (ChatMessage: any) => { - console.log('response') ChatMessage = ChatMessage.message.result this.messageSend = true diff --git a/src/app/services/chat/room.service.ts b/src/app/services/chat/room.service.ts index 12c98a042..826b29e0a 100644 --- a/src/app/services/chat/room.service.ts +++ b/src/app/services/chat/room.service.ts @@ -184,7 +184,7 @@ export class RoomService { } } - setData({membersExcludeMe, members, u, customFields = {}, id, name, t, lastMessage = new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService), _updatedAt }) { + setData({membersExcludeMe, members, u, customFields = {}, id, name, t, lastMessage = new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService, this.ChatSystemService), _updatedAt }) { this.customFields = customFields this.id = id this.name = name @@ -710,10 +710,11 @@ export class RoomService { } else { const offlineMessage = await this.prepareMessageCreateIfNotExist({message:ChatMessage}) - offlineMessage.from = 'Offline' - offlineMessage.loadHistory = this.hasLoadHistory if(offlineMessage) { + offlineMessage.from = 'Offline' + offlineMessage.loadHistory = this.hasLoadHistory + this.messagesLocalReference.push(offlineMessage.localReference) offlineMessage?.decryptMessage() @@ -827,7 +828,7 @@ export class RoomService { message = this.fix_updatedAt(message) - const wewMessage = new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService) + const wewMessage = new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService, this.ChatSystemService) wewMessage.setData(message) wewMessage.loadHistory = this.hasLoadHistory @@ -884,7 +885,7 @@ export class RoomService { async prepareCreate({message, save = true}): Promise { message = this.fix_updatedAt(message) - const wewMessage = new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService) + const wewMessage = new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService, this.ChatSystemService) wewMessage.setData(message) wewMessage.loadHistory = this.hasLoadHistory @@ -922,7 +923,7 @@ export class RoomService { simplePrepareMessage(message) { message = this.fix_updatedAt(message) - const wewMessage = new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService) + const wewMessage = new MessageService(this.NfService, this.RochetChatConnectorService, this.ChatMethodsService, this.AESEncrypt, this.AttachmentsService, this.NetworkServiceService, this.ChatSystemService) wewMessage.setData(message) wewMessage.loadHistory = this.hasLoadHistory diff --git a/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html b/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html index 133ba6497..aa24a3ecc 100644 --- a/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html +++ b/src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.html @@ -210,7 +210,7 @@ -
+
diff --git a/src/app/shared/agenda/edit-event/edit-event.page.html b/src/app/shared/agenda/edit-event/edit-event.page.html index 8008ac9af..c5ea46168 100644 --- a/src/app/shared/agenda/edit-event/edit-event.page.html +++ b/src/app/shared/agenda/edit-event/edit-event.page.html @@ -147,7 +147,7 @@ [(ngModel)]="postEvent.EndDate" [max]="maxDate" [disabled]="disabled" - [min]="currentDate" + [min]="postEvent.StartDate" >
-
+
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 008df2e4e..c686fffa5 100644 --- a/src/app/shared/agenda/edit-event/edit-event.page.ts +++ b/src/app/shared/agenda/edit-event/edit-event.page.ts @@ -46,9 +46,9 @@ export class EditEventPage implements OnInit { public endMinDate = new Date(new Date().getTime() + 15 * 60000).toISOString().slice(0,10) public maxDate: any; public stepHour = 1; - public stepMinute = 5; - public stepSecond = 5; - currentDate = new Date(); + public stepMinute = 15; + public stepSecond = 15; + currentDate = this.roundTimeQuarterHour(); Form: FormGroup; validateFrom = false @@ -216,6 +216,39 @@ export class EditEventPage implements OnInit { } } + roundTimeQuarterHour() { + var timeToReturn = new Date(); + // var minutes = timeToReturn.getMinutes(); + var minutes = timeToReturn.getMinutes(); + var hours = timeToReturn.getHours(); + + // console.log("MINUTOS: " +minutes); + // console.log("BEFORE MINUTES: " +(Math.round(minutes/15) * 15)); + + var m = (Math.round(minutes/15) * 15) % 60; + // console.log("AFTER MINUTES: " +m); + var h = minutes > 52 ? (hours === 23 ? 0 : ++hours) : hours; + + if (m == 0) { + if(minutes > m){ + m = m + 15; + } + timeToReturn.setHours(h); + timeToReturn.setMinutes(m); + }else{ + if(minutes > m){ + + m = m + 15; + + timeToReturn.setHours(h); + timeToReturn.setMinutes(m); + }else { + timeToReturn.setHours(h); + timeToReturn.setMinutes(m); + } + } + } + onSelectedRecurringChanged(ev:any){ this.calculetedLastOccurrence(ev); diff --git a/src/app/shared/chat/add-user/add-user-routing.module.ts b/src/app/shared/chat/add-user/add-user-routing.module.ts new file mode 100644 index 000000000..49bc8b4fe --- /dev/null +++ b/src/app/shared/chat/add-user/add-user-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { AddUserPage } from './add-user.page'; + +const routes: Routes = [ + { + path: '', + component: AddUserPage + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class AddUserPageRoutingModule {} diff --git a/src/app/shared/chat/add-user/add-user.module.ts b/src/app/shared/chat/add-user/add-user.module.ts new file mode 100644 index 000000000..78b0aaeca --- /dev/null +++ b/src/app/shared/chat/add-user/add-user.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import { IonicModule } from '@ionic/angular'; + +import { AddUserPageRoutingModule } from './add-user-routing.module'; + +import { AddUserPage } from './add-user.page'; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + AddUserPageRoutingModule + ], + declarations: [AddUserPage] +}) +export class AddUserPageModule {} diff --git a/src/app/shared/chat/add-user/add-user.page.html b/src/app/shared/chat/add-user/add-user.page.html new file mode 100644 index 000000000..c4bb0ea98 --- /dev/null +++ b/src/app/shared/chat/add-user/add-user.page.html @@ -0,0 +1,9 @@ + + + addUser + + + + + + diff --git a/src/app/shared/chat/add-user/add-user.page.scss b/src/app/shared/chat/add-user/add-user.page.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/shared/chat/add-user/add-user.page.spec.ts b/src/app/shared/chat/add-user/add-user.page.spec.ts new file mode 100644 index 000000000..382032742 --- /dev/null +++ b/src/app/shared/chat/add-user/add-user.page.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { AddUserPage } from './add-user.page'; + +describe('AddUserPage', () => { + let component: AddUserPage; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ AddUserPage ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(AddUserPage); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/shared/chat/add-user/add-user.page.ts b/src/app/shared/chat/add-user/add-user.page.ts new file mode 100644 index 000000000..e35b74795 --- /dev/null +++ b/src/app/shared/chat/add-user/add-user.page.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-add-user', + templateUrl: './add-user.page.html', + styleUrls: ['./add-user.page.scss'], +}) +export class AddUserPage implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/shared/event/attendee-modal/attendee-modal.page.ts b/src/app/shared/event/attendee-modal/attendee-modal.page.ts index e9aeba0cf..2300a42a7 100644 --- a/src/app/shared/event/attendee-modal/attendee-modal.page.ts +++ b/src/app/shared/event/attendee-modal/attendee-modal.page.ts @@ -16,6 +16,7 @@ export class AttendeePage implements OnInit { contacts: EventPerson[]; showLoader: boolean = false; eventPersons: EventPerson[]; + inputFilter = '' @Output() closeComponent = new EventEmitter(); @@ -39,10 +40,10 @@ export class AttendeePage implements OnInit { public ThemeService: ThemeService ) { this.LtaskParticipants = removeDuplicate(this.taskParticipants); - this.LtaskParticipantsCc = removeDuplicate(this.taskParticipantsCc); - } + this.LtaskParticipantsCc = removeDuplicate(this.taskParticipantsCc); + } - ngOnChanges(){ + ngOnChanges() { this.LtaskParticipants = removeDuplicate(this.taskParticipants); this.LtaskParticipantsCc = removeDuplicate(this.taskParticipantsCc); } @@ -63,7 +64,6 @@ export class AttendeePage implements OnInit { } } - save() { @@ -107,7 +107,7 @@ export class AttendeePage implements OnInit { this.setContactWithClose(); } - close(){ + close() { this.closeComponent.emit(); } @@ -140,7 +140,7 @@ export class AttendeePage implements OnInit { }); // if to show - if(undefined != result2){ + if(undefined != result2) { return false; } @@ -149,7 +149,7 @@ export class AttendeePage implements OnInit { } - remove(itm: EventPerson){ + remove(itm: EventPerson) { if(this.adding == "intervenient"){ @@ -178,7 +178,17 @@ export class AttendeePage implements OnInit { } - + sort(data: []) { + return data.sort(function (a: any, b: any) { + if (a.Name > b.Name) { + return -1; + } + if (b.Name > a.Name) { + return 1; + } + return 0; + }).reverse() + } async fetchContacts(filter: string) { this.showLoader = true; @@ -196,7 +206,7 @@ export class AttendeePage implements OnInit { }); } - this.contacts = result; + this.contacts = this.sort(result as any); this.showLoader = false; } ); diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html index 84b084e29..ae6c88b83 100644 --- a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html +++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html @@ -155,7 +155,7 @@
-
+
diff --git a/src/app/shared/popover/chat-popover/chat-popover.page.html b/src/app/shared/popover/chat-popover/chat-popover.page.html index 099781440..c2f47a60b 100644 --- a/src/app/shared/popover/chat-popover/chat-popover.page.html +++ b/src/app/shared/popover/chat-popover/chat-popover.page.html @@ -6,6 +6,7 @@
+
diff --git a/src/app/shared/popover/request-options/request-options.page.html b/src/app/shared/popover/request-options/request-options.page.html index eab5b99a6..87bb35a98 100644 --- a/src/app/shared/popover/request-options/request-options.page.html +++ b/src/app/shared/popover/request-options/request-options.page.html @@ -40,7 +40,6 @@
- @@ -55,8 +54,5 @@
-
diff --git a/src/app/shared/publication/new-action/new-action.page.html b/src/app/shared/publication/new-action/new-action.page.html index 826ca06c6..9f60cc61b 100644 --- a/src/app/shared/publication/new-action/new-action.page.html +++ b/src/app/shared/publication/new-action/new-action.page.html @@ -46,7 +46,6 @@ placeholder="Data inicio*" [(ngModel)]="folder.DateBegin" [disabled]="disabled" - [min]="currentDate" > 700) { - return new Date(this.folder.DateBegin).toLocaleString('pt') < new Date(this.folder.DateEnd).toLocaleString("pt")? ['ok'] : [] + var validado: boolean; + + if (window.innerWidth <= 800) { + if ((this.folder.DateBegin < this.folder.DateEnd) && (new Date(this.folder.DateBegin).getTime() > this.currentDate.getTime())) { + validado = true; + }else{ + validado = false; + } + return validado == true ? ['ok']: []; } else { return ['ok'] } diff --git a/src/app/store/session.service.ts b/src/app/store/session.service.ts index eff78096c..955428411 100644 --- a/src/app/store/session.service.ts +++ b/src/app/store/session.service.ts @@ -56,6 +56,11 @@ class SessionService { return this._user.Inactivity } + + isUserActive() { + return this._user.Inactivity + } + setInativity(value: boolean) { this._user.Inactivity = value this._user.UrlBeforeInactivity = '' diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 6d33819f1..03ba77a7f 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,11 +1,12 @@ export const environment = { // apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/', - apiURL: 'https://gd-api.oapr.gov.ao/api/', + // apiURL: 'https://gd-api.oapr.gov.ao/api/', + apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/', // apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/', // apiChatUrl: 'http://192.168.0.29:3000/api/v1/', // apiWsChatUrl: 'wss://192.168.0.29:3000/websocket', apiChatUrl: 'https://gd-chat.oapr.gov.ao/api/v1/', - apiWsChatUrl: 'ws://gd-chat.oapr.gov.ao/websocket', + apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket', /* apiChatUrl: 'https://www.tabularium.pt/api/v1/', apiWsChatUrl: 'wss://www.tabularium.pt/websocket', */ // apiChatUrl: 'https://www.tabularium.pt/api/v1/', diff --git a/src/environments/environment.ts b/src/environments/environment.ts index f7c24870d..cb71aaa30 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -1,11 +1,12 @@ export const environment = { // apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/', - apiURL: 'https://gd-api.oapr.gov.ao/api/', + // apiURL: 'https://gd-api.oapr.gov.ao/api/', + apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/', // apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/', // apiChatUrl: 'http://192.168.0.29:3000/api/v1/', // apiWsChatUrl: 'wss://192.168.0.29:3000/websocket', apiChatUrl: 'https://gd-chat.oapr.gov.ao/api/v1/', - apiWsChatUrl: 'ws://gd-chat.oapr.gov.ao/websocket', + apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket', /* apiChatUrl: 'https://www.tabularium.pt/api/v1/', apiWsChatUrl: 'wss://www.tabularium.pt/websocket', */ // apiChatUrl: 'https://www.tabularium.pt/api/v1/',