From d6cc05a31294285b79507443ba577753bd3e5d1c Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Mon, 3 Jan 2022 18:19:11 +0100 Subject: [PATCH 1/3] save --- src/app/home/home.page.scss | 8 ++++++-- src/app/shared/header/header.page.ts | 20 +++++++++++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/app/home/home.page.scss b/src/app/home/home.page.scss index 8b6ee1ac6..955c24836 100644 --- a/src/app/home/home.page.scss +++ b/src/app/home/home.page.scss @@ -4,6 +4,10 @@ ion-tab-bar{ --color: #061b52; } +ion-icon { + color: blue; +} + // 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; @@ -41,4 +45,4 @@ ion-badge {/* */ ion-tabs.tab .bottoms{ display: none; } -} \ No newline at end of file +} 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() { From d22e602f137df28b68a7754aa4fbe7cedb75f437 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Tue, 4 Jan 2022 15:34:03 +0100 Subject: [PATCH 2/3] Added new icons change icon color when selected in mobile and tablet --- src/app/home/home.page.html | 31 ++++++++------ src/app/home/home.page.scss | 6 +-- src/app/home/home.page.ts | 40 ++++++++++++++++++- .../icon/tab/icons-nav-actions-selected.svg | 5 +++ src/assets/icon/tab/icons-nav-actions.svg | 5 +++ .../icon/tab/icons-nav-agenda-selected.svg | 4 ++ src/assets/icon/tab/icons-nav-agenda.svg | 4 ++ .../icon/tab/icons-nav-chat-selected.svg | 4 ++ src/assets/icon/tab/icons-nav-chat.svg | 4 ++ .../icon/tab/icons-nav-gabinete-selected.svg | 4 ++ src/assets/icon/tab/icons-nav-gabinete.svg | 4 ++ .../icon/tab/icons-nav-home-selected.svg | 3 ++ src/assets/icon/tab/icons-nav-home.svg | 5 +++ 13 files changed, 102 insertions(+), 17 deletions(-) create mode 100644 src/assets/icon/tab/icons-nav-actions-selected.svg create mode 100644 src/assets/icon/tab/icons-nav-actions.svg create mode 100644 src/assets/icon/tab/icons-nav-agenda-selected.svg create mode 100644 src/assets/icon/tab/icons-nav-agenda.svg create mode 100644 src/assets/icon/tab/icons-nav-chat-selected.svg create mode 100644 src/assets/icon/tab/icons-nav-chat.svg create mode 100644 src/assets/icon/tab/icons-nav-gabinete-selected.svg create mode 100644 src/assets/icon/tab/icons-nav-gabinete.svg create mode 100644 src/assets/icon/tab/icons-nav-home-selected.svg create mode 100644 src/assets/icon/tab/icons-nav-home.svg diff --git a/src/app/home/home.page.html b/src/app/home/home.page.html index 96fb9d42e..159253fb0 100644 --- a/src/app/home/home.page.html +++ b/src/app/home/home.page.html @@ -1,33 +1,38 @@ - - - + + + Início - - - + + + Agenda - - - + + + + Gabinete - - + + + Ações - - + + + + Chat + diff --git a/src/app/home/home.page.scss b/src/app/home/home.page.scss index 955c24836..7210b1585 100644 --- a/src/app/home/home.page.scss +++ b/src/app/home/home.page.scss @@ -1,11 +1,11 @@ ion-tab-bar{ --background: #f9f9f9; - --color: #061b52; + --color: #797979; } -ion-icon { - color: blue; +ion-tab-button{ + --color-selected: #061b52; } // Badge diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts index 7d4f59046..999b9592b 100644 --- a/src/app/home/home.page.ts +++ b/src/app/home/home.page.ts @@ -57,6 +57,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: "", @@ -150,11 +157,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/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 @@ + + + + + From 83ba2ebbd237c086b3dfd5d94a3f7fa2aea5d113 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Thu, 6 Jan 2022 20:52:50 +0100 Subject: [PATCH 3/3] fix visualisation of gestao documental in chat. implemented delete DM messages --- .../group-messages/group-messages.page.html | 49 +++++++++- .../pages/chat/messages/messages.page.html | 56 ++++++++++- src/app/pages/chat/messages/messages.page.ts | 4 - src/app/services/chat.service.ts | 2 +- src/app/services/functions/file.service.ts | 1 + .../group-messages/group-messages.page.html | 55 ++++++++++- .../shared/chat/messages/messages.page.html | 28 ++++-- .../chat-popover/chat-popover.page.scss | 1 + .../messages-options.page.html | 11 +-- .../messages-options.page.scss | 92 ++++++++++--------- .../messages-options/messages-options.page.ts | 5 +- 11 files changed, 233 insertions(+), 71 deletions(-) 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 02df0983c..8bd363076 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 0e72b5634..237c7a89b 100644 --- a/src/app/pages/chat/messages/messages.page.ts +++ b/src/app/pages/chat/messages/messages.page.ts @@ -365,10 +365,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 09f89ba4b..656c77f6a 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/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');