diff --git a/src/app/home/home.page.html b/src/app/home/home.page.html index 0a84abf12..06f92a11e 100644 --- a/src/app/home/home.page.html +++ b/src/app/home/home.page.html @@ -33,6 +33,7 @@ Chat + diff --git a/src/app/home/home.page.scss b/src/app/home/home.page.scss index f6ed8143e..0fb5539e4 100644 --- a/src/app/home/home.page.scss +++ b/src/app/home/home.page.scss @@ -4,6 +4,10 @@ ion-tab-bar{ --color: #797979; } +// ion-tab-button{ +// --color-selected: #061b52; +// } + // Badge // -------------------------------------------------- @@ -18,7 +22,7 @@ ion-badge {/* */ /* display: inline-block;*/ - min-width: 18px; + min-width: 18px; font-size: $badge-font-size; /* font-weight: $badge-font-weight; line-height: 1; @@ -46,4 +50,4 @@ ion-badge {/* */ ion-tab-button.active{ color: #061b52; -} \ No newline at end of file +} diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts index 0be604403..31c9647c1 100644 --- a/src/app/home/home.page.ts +++ b/src/app/home/home.page.ts @@ -60,6 +60,13 @@ export class HomePage implements OnInit { showAttendees: false, showAttendeeModal: false } + tabButton = { + home: false, + agenda: false, + gabinete: false, + actions: false, + chat: false, + } eventToaprove: any = { back: false, serialNumber: "", @@ -167,11 +174,42 @@ export class HomePage implements OnInit { } myWorker.postMessage('ali'); */ + this.clearTabButtonSelection(); + } + + clearTabButtonSelection(){ + this.tabButton.home = false; + this.tabButton.agenda = false; + this.tabButton.gabinete = false; + this.tabButton.actions = false; + this.tabButton.chat = false; + } + + selectedTab(url?:string){ + this.clearTabButtonSelection(); + if(url =='/home/events'){ + this.tabButton.home = true; + } + else if(url == '/home/agenda'){ + this.tabButton.agenda = true; + } + else if(url =='/home/gabinete-digital'){ + this.tabButton.gabinete = true; + } + else if(url =='/home/publications'){ + this.tabButton.actions = true; + } + else if(url == '/home/chat'){ + this.tabButton.chat = true; + } + else{ + this.clearTabButtonSelection(); + } } logDeviceInfo = async () => { const info = await Device.getInfo(); - + console.log('Device info',info); }; 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 3974560fd..0d50edaa1 100644 --- a/src/app/pages/chat/group-messages/group-messages.page.html +++ b/src/app/pages/chat/group-messages/group-messages.page.html @@ -92,13 +92,54 @@ - - {{last ? scrollToBottom() : ''}} + +
+
+ {{msg.u.name}} + {{showDateDuration(msg._updatedAt)}} +
+
+ {{msg.msg}} +
+
+
+ image +
+
+
+
+ +
+ + + + + + + {{file.title}} +
+
+
+ + {{file.description}} + + {{msg.file.type.replace('application/','').toUpperCase()}} + +
+
+
+
+
+ {{last ? scrollToBottom() : ''}} +
+
+ +
Alterou o nome do grupo para "{{msg.msg.split('-').join(' ')}}"
{{last ? scrollToBottom() : ''}} @@ -119,8 +160,8 @@
{{last ? scrollToBottom() : ''}} -
-
+
+
{{msg.u.name}} criou esta reunião

De {{showDateDuration(msg.file.start_date)}} a {{showDateDuration(msg.file.end_date)}}
diff --git a/src/app/pages/chat/messages/messages.page.html b/src/app/pages/chat/messages/messages.page.html index 693f1c0cc..1cf59303b 100644 --- a/src/app/pages/chat/messages/messages.page.html +++ b/src/app/pages/chat/messages/messages.page.html @@ -91,8 +91,60 @@ {{last ? scrollToBottom() : ''}}
-
-
+ +
+
+ {{msg.u.name}} + {{showDateDuration(msg._updatedAt)}} +
+
+ {{msg.msg}} + {{last ? scrollToBottom() : ''}} +
+
+ +
+
+ {{msg.u.name}} + {{showDateDuration(msg._updatedAt)}} +
+
+
+
+
+ image +
+
+
+
+ +
+ + + + + + + {{file.title}} +
+
+
+ + {{file.description}} + + {{msg.file.type.replace('application/','').toUpperCase()}} + +
+
+
+
+
+ {{last ? scrollToBottom() : ''}} +
+
+ +
+
{{msg.u.name}} criou esta reunião

De {{showDateDuration(msg.file.start_date)}} a {{showDateDuration(msg.file.end_date)}}
diff --git a/src/app/pages/chat/messages/messages.page.ts b/src/app/pages/chat/messages/messages.page.ts index 9939181c0..f240b6fe9 100644 --- a/src/app/pages/chat/messages/messages.page.ts +++ b/src/app/pages/chat/messages/messages.page.ts @@ -368,10 +368,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy { if (file.type == "application/webtrix") { this.openViewDocumentModal(file); } - else { - let fullUrl = "https://www.tabularium.pt" + url; - this.fileService.viewDocumentByUrl(fullUrl); - } } docIndex(index: number) { diff --git a/src/app/services/chat.service.ts b/src/app/services/chat.service.ts index 16c07557c..c032e7261 100644 --- a/src/app/services/chat.service.ts +++ b/src/app/services/chat.service.ts @@ -190,7 +190,7 @@ export class ChatService { let opts = { headers: this.headers, } - return this.http.post(environment.apiChatUrl+'im.close', body, this.options); + return this.http.post(environment.apiChatUrl+'im.delete', body, this.options); } createRoom(body:any){ diff --git a/src/app/services/functions/file.service.ts b/src/app/services/functions/file.service.ts index ee3d2d9de..a5cd7bd01 100644 --- a/src/app/services/functions/file.service.ts +++ b/src/app/services/functions/file.service.ts @@ -435,6 +435,7 @@ export class FileService { { "rid": roomId, "msg": "", + "alias": "documento", "attachments": [{ "title": res.data.selected.Assunto, "description": res.data.selected.DocTypeDesc, 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 ff4c7537b..c09032572 100644 --- a/src/app/shared/chat/group-messages/group-messages.page.html +++ b/src/app/shared/chat/group-messages/group-messages.page.html @@ -91,6 +91,57 @@ {{last ? scrollToBottom() : ''}}
+ + +
+
+ + + + +
+
+ {{msg.u.name}} + {{showDateDuration(msg._updatedAt)}} +
+
+ {{msg.msg}} +
+
+
+ image +
+
+
+
+ +
+ + + + + + + {{file.title}} +
+
+
+ + {{file.description}} + + {{msg.file.type.replace('application/','').toUpperCase()}} + +
+
+
+
+
+ {{last ? scrollToBottom() : ''}} +
+
+ + +
Alterou o nome do grupo para "{{msg.msg.split('-').join(' ')}}"
{{last ? scrollToBottom() : ''}} @@ -111,8 +162,8 @@
{{last ? scrollToBottom() : ''}}
-
-
+
+
{{msg.u.name}} criou esta reunião

De {{showDateDuration(msg.file.start_date)}} a {{showDateDuration(msg.file.end_date)}}
diff --git a/src/app/shared/chat/messages/messages.page.html b/src/app/shared/chat/messages/messages.page.html index 2eb06d3eb..d48e1075b 100644 --- a/src/app/shared/chat/messages/messages.page.html +++ b/src/app/shared/chat/messages/messages.page.html @@ -9,7 +9,7 @@
@@ -51,13 +51,28 @@
{{msg.msg}} + {{last ? scrollToBottom() : ''}} +
+
+
+
+ + + + +
+
+ {{msg.u.name}} + {{showDateDuration(msg._updatedAt)}} +
+
+
- image
- +
{{last ? scrollToBottom() : ''}}
+
-
-
+
+
{{msg.u.name}} criou esta reunião

De {{showDateDuration(msg.file.start_date)}} a {{showDateDuration(msg.file.end_date)}}
diff --git a/src/app/shared/header/header.page.ts b/src/app/shared/header/header.page.ts index 3a7671340..b8d9446ec 100644 --- a/src/app/shared/header/header.page.ts +++ b/src/app/shared/header/header.page.ts @@ -99,7 +99,25 @@ export class HeaderPage implements OnInit { } locationPathname(): string { - return window.location.pathname + let path = window.location.pathname; + if(path.includes('/home/events')){ + return '/home/events'; + } + else if(path.includes('/home/agenda')){ + return '/home/agenda'; + } + else if(path.includes('/home/gabinete-digital')){ + return '/home/gabinete-digital'; + } + else if(path.includes('/home/publications')){ + return '/home/publications'; + } + else if(path.includes('/home/chat')){ + return '/home/chat'; + } + else{ + return path; + } } async openSearch() { diff --git a/src/app/shared/popover/chat-popover/chat-popover.page.scss b/src/app/shared/popover/chat-popover/chat-popover.page.scss index 738f71a16..2f6033257 100644 --- a/src/app/shared/popover/chat-popover/chat-popover.page.scss +++ b/src/app/shared/popover/chat-popover/chat-popover.page.scss @@ -14,6 +14,7 @@ overflow: hidden; } } + .buttons{ display: flex; flex-wrap: wrap; diff --git a/src/app/shared/popover/messages-options/messages-options.page.html b/src/app/shared/popover/messages-options/messages-options.page.html index 7150aa3fd..85018456f 100644 --- a/src/app/shared/popover/messages-options/messages-options.page.html +++ b/src/app/shared/popover/messages-options/messages-options.page.html @@ -1,13 +1,10 @@ -
-
- -
- +
diff --git a/src/app/shared/popover/messages-options/messages-options.page.scss b/src/app/shared/popover/messages-options/messages-options.page.scss index 29fe1e464..b07cb0e9b 100644 --- a/src/app/shared/popover/messages-options/messages-options.page.scss +++ b/src/app/shared/popover/messages-options/messages-options.page.scss @@ -1,50 +1,58 @@ .container{ - --padding-top:20px !important; - --padding-bottom:20px !important; - --padding-start:20px !important; - --padding-end:20px !important; + --padding-top:20px !important; + --padding-bottom:20px !important; + --padding-start:20px !important; + --padding-end:20px !important; } .arrow-right{ - display: none; - margin-bottom: 20px; - .arrow-right-icon{ - width: 37px; - float: right; - font-size: 35px; - overflow: hidden; - } + display: none; + margin-bottom: 20px; + .arrow-right-icon{ + width: 37px; + float: right; + font-size: 35px; + overflow: hidden; + } } + .buttons{ - display: flex; - flex-wrap: wrap; - justify-content: space-around; + display: flex; + flex-wrap: wrap; + justify-content: space-around; } .solid { - display: none; - width: 90%; - border-top: 1px solid #bbb; - margin: 0 auto !important; - } - /* .btn-ok, .btn-cancel, .btn-delete{ - width: calc(50% - 10px) !important; - margin: 5px 5px 5px 5px !important; - } */ -@media only screen and (min-width: 701px) { - .arrow-right{ - display: flex; - justify-content: flex-end; - } - .btn-cancel{ - display: none; - width: 100% !important; - margin-bottom: 10px !important; - } - .btn-delete{ - width: 100% !important; - margin-bottom: 10px !important; - margin-top: 10px !important; - } - /* .solid{ - display: block; - } */ + display: block; + width: 90%; + border-top: 1px solid #bbb; + margin: 10px auto !important; +} + +@media only screen and (min-width: 701px) { + .arrow-right{ + display: flex; + justify-content: flex-end; + } + .btn-cancel{ + //display: none; + width: 100% !important; + margin-bottom: 10px !important; + } + .btn-cancel:hover, .btn-delete:hover{ + background-color: var(--button-hover); + color: #fff !important; + } + .btn-ok{ + width: 100% !important; + } + .btn-delete{ + width: 100% !important; + margin-bottom: 10px !important; + } + .solid{ + display: block; + } + .mobile-only{ + display: none !important; + } + } diff --git a/src/app/shared/popover/messages-options/messages-options.page.ts b/src/app/shared/popover/messages-options/messages-options.page.ts index 2de44a93d..07e37d951 100644 --- a/src/app/shared/popover/messages-options/messages-options.page.ts +++ b/src/app/shared/popover/messages-options/messages-options.page.ts @@ -1,8 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { ModalController, NavParams, PopoverController } from '@ionic/angular'; import { ChatService } from 'src/app/services/chat.service'; -import { ThemeService } from 'src/app/services/theme.service' - +import { ThemeService } from 'src/app/services/theme.service'; @Component({ selector: 'app-messages-options', @@ -18,7 +17,7 @@ export class MessagesOptionsPage implements OnInit { private modalController: ModalController, private chatService: ChatService, private navParams: NavParams, - public ThemeService: ThemeService + public ThemeService: ThemeService, ) { this.roomId = this.navParams.get('roomId'); diff --git a/src/assets/icon/tab/icons-nav-actions-selected.svg b/src/assets/icon/tab/icons-nav-actions-selected.svg new file mode 100644 index 000000000..71b564d51 --- /dev/null +++ b/src/assets/icon/tab/icons-nav-actions-selected.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/icon/tab/icons-nav-actions.svg b/src/assets/icon/tab/icons-nav-actions.svg new file mode 100644 index 000000000..50f5fef81 --- /dev/null +++ b/src/assets/icon/tab/icons-nav-actions.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/icon/tab/icons-nav-agenda-selected.svg b/src/assets/icon/tab/icons-nav-agenda-selected.svg new file mode 100644 index 000000000..4aaf75c7e --- /dev/null +++ b/src/assets/icon/tab/icons-nav-agenda-selected.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icon/tab/icons-nav-agenda.svg b/src/assets/icon/tab/icons-nav-agenda.svg new file mode 100644 index 000000000..abcfa1e1b --- /dev/null +++ b/src/assets/icon/tab/icons-nav-agenda.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icon/tab/icons-nav-chat-selected.svg b/src/assets/icon/tab/icons-nav-chat-selected.svg new file mode 100644 index 000000000..e31e28ccd --- /dev/null +++ b/src/assets/icon/tab/icons-nav-chat-selected.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icon/tab/icons-nav-chat.svg b/src/assets/icon/tab/icons-nav-chat.svg new file mode 100644 index 000000000..b4781298a --- /dev/null +++ b/src/assets/icon/tab/icons-nav-chat.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icon/tab/icons-nav-gabinete-selected.svg b/src/assets/icon/tab/icons-nav-gabinete-selected.svg new file mode 100644 index 000000000..44a02ba44 --- /dev/null +++ b/src/assets/icon/tab/icons-nav-gabinete-selected.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icon/tab/icons-nav-gabinete.svg b/src/assets/icon/tab/icons-nav-gabinete.svg new file mode 100644 index 000000000..592210b02 --- /dev/null +++ b/src/assets/icon/tab/icons-nav-gabinete.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icon/tab/icons-nav-home-selected.svg b/src/assets/icon/tab/icons-nav-home-selected.svg new file mode 100644 index 000000000..8dbe504b4 --- /dev/null +++ b/src/assets/icon/tab/icons-nav-home-selected.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/icon/tab/icons-nav-home.svg b/src/assets/icon/tab/icons-nav-home.svg new file mode 100644 index 000000000..0c712e2d1 --- /dev/null +++ b/src/assets/icon/tab/icons-nav-home.svg @@ -0,0 +1,5 @@ + + + + +