Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer

This commit is contained in:
Peter Maquiran
2021-10-29 11:44:43 +01:00
45 changed files with 199 additions and 196 deletions
+7 -1
View File
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.gpr.gabinetedigital" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:mfp="http://www.ibm.com/mobilefirst/cordova-plugin-mfp">
<name>gabinete digital</name>
<name>Gabinete digital</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author>
<content src="index.html" />
@@ -39,6 +39,12 @@
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
</platform>
<mfp:android>
<mfp:sdkChecksum>1109370933</mfp:sdkChecksum>
+1 -1
View File
@@ -209,4 +209,4 @@
"url": "git+https://Kayaya@bitbucket.org/equilibriumito/gabinete-digital.git"
},
"license": "ISC"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 52 KiB

+3 -3
View File
@@ -97,8 +97,8 @@
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon" slot="start" src="assets/images/icons-chat-group-chat-40.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && group._id != idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-group-chat-40.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && group._id == idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-group-chat-40-hover.svg"></ion-icon>
</div>
<div
(click)="openGroupMessagesPage(group._id)" class="item-content flex-grow-1 cursor-pointer">
@@ -107,7 +107,7 @@
<ion-label>{{group.name.split('-').join(' ')}}</ion-label>
</div>
<div class="item-date" [class.item-date-active]="group._id ==idSelected" *ngIf="group.lastMessage && !group.customFields.countDownDate">{{showDateDuration(group._updatedAt)}}</div>
<div class="item-date" *ngIf="group.customFields.countDownDate">{{countDownDate(group.customFields.countDownDate, group._id)}}</div>
<div class="item-date" [class.item-date-active]="group._id ==idSelected" *ngIf="group.customFields.countDownDate">{{countDownDate(group.customFields.countDownDate, group._id)}}</div>
</div>
<div *ngIf="group.lastMessage" class="item-description d-flex align-items-center" [class.item-description-active]="group._id ==idSelected">
<div class="item-message">{{group.lastMessage.u.name}}: {{group.lastMessage.msg}} </div>
+3 -3
View File
@@ -379,7 +379,7 @@ hideRefreshButton(){
async getDirectMessages(event?){
this.chatService.getAllDirectMessages().subscribe(async (res:any)=>{
console.log(res.ims);
//console.log(res.ims);
if(res != 200){
//console.log(res.ims);
@@ -433,7 +433,7 @@ hideRefreshButton(){
async getGroups(event?){
this.result = this.chatService.getAllPrivateGroups().subscribe(async (res:any)=>{
console.log(res);
//console.log(res);
if(res.groups != 200){
this.privateGroups = res.groups;
@@ -445,7 +445,7 @@ hideRefreshButton(){
var dateB = new Date(b._updatedAt).getTime();
return dateB - dateA;
});
console.log(this.allGroups);
//console.log(this.allGroups);
/* }); */
if(this.route.url != "/home/chat"){
console.log("Timer message stop")
@@ -11,7 +11,7 @@
<div class="div-title">
<ion-label class="title">Contactos</ion-label>
</div>
<app-btn-seguinte (click)="createGroup()"></app-btn-seguinte>
<app-btn-seguinte (click)="updateGroup()"></app-btn-seguinte>
</div>
</div>
</ion-toolbar>
@@ -59,42 +59,6 @@ export class GroupContactsPage implements OnInit {
console.log(this.isGroupCreated);
}
deleteMember(data:any){
let body = {
"roomId": this.room._id,
"userId": data._id,
}
console.log(body);
if(this.room.t == "p"){
this.chatService.removeGroupMember(body).subscribe(res=>{
console.log(res);
this.getMembers();
});
}
else if(this.room.t == "c"){
this.chatService.removeChannelMember(body).subscribe(res=>{
console.log(res);
this.getMembers();
});
}
}
getMembers(){
if(this.room.t == "p"){
this.chatService.getGroupMembers(this.room._id).subscribe(res=>{
this.members = res['members'];
this.loadUsers();
});
}
else if(this.room.t == "c"){
this.chatService.getChannelMembers(this.room._id).subscribe(res=>{
this.members = res['members'];
this.loadUsers();
});
}
}
loadUsers(){
this.options = {
headers: this.headers,
@@ -121,6 +85,21 @@ export class GroupContactsPage implements OnInit {
});
}
getMembers(){
if(this.room.t == "p"){
this.chatService.getGroupMembers(this.room._id).subscribe(res=>{
this.members = res['members'];
this.loadUsers();
});
}
else if(this.room.t == "c"){
this.chatService.getChannelMembers(this.room._id).subscribe(res=>{
this.members = res['members'];
this.loadUsers();
});
}
}
separateLetter(record, recordIndex, records){
if(recordIndex == 0){
return record.name[0];
@@ -135,6 +114,27 @@ export class GroupContactsPage implements OnInit {
return null;
}
deleteMember(data:any){
let body = {
"roomId": this.room._id,
"userId": data._id,
}
console.log(body);
if(this.room.t == "p"){
this.chatService.removeGroupMember(body).subscribe(res=>{
console.log(res);
this.getMembers();
});
}
else if(this.room.t == "c"){
this.chatService.removeChannelMember(body).subscribe(res=>{
console.log(res);
this.getMembers();
});
}
}
doRefresh(ev){
this.loadUsers();
this.getMembers();
@@ -143,26 +143,8 @@ export class GroupContactsPage implements OnInit {
async close(){
this.modalController.dismiss();
if(this.isGroupCreated){
console.log('go to conversa');
}
else{
this.modalController.dismiss();
console.log('go to new group page');
const modal = await this.modalController.create({
component: NewGroupPage,
componentProps: {
name:this.groupName,
duration:'',
},
cssClass: 'new-group',
backdropDismiss: false,
});
await modal.present();
}
}
onChange(event){
this.textSearch = event.detail.value;
}
@@ -194,50 +176,21 @@ export class GroupContactsPage implements OnInit {
});
}
createGroup(){
if(!this.isGroupCreated){
/* this.close(); */
let body = { "name":this.groupName, }
this.chatService.addGroup(body).subscribe(res=>{
console.log('group created');
console.log(res['group']);
this.addContacts(res['group']);
this.openGroupMessages(res['group']);
});
}
else{
updateGroup(){
this.chatService.getRoomInfo(this.room._id).subscribe(room=>{
this.room = room['room'];
this.addContacts(this.room);
this.close();
/* this.openGroupMessages(this.room); */
/* this.chatService.getGroupInfo(this.room._id).subscribe(res=>{
console.log(res);
this.addContacts(res['group']);
this.openGroupMessages(res['group']);
}) */
}
}
async newGroup(){
this.close();
const modal = await this.modalController.create({
component: NewGroupPage,
cssClass: 'new-group',
backdropDismiss: false,
this.openGroupMessages(room['room']._id);
});
await modal.present();
modal.onDidDismiss();
}
async openGroupMessages(room:any){
async openGroupMessages(roomId:any){
this.close();
console.log(roomId);
const modal = await this.modalController.create({
component: GroupMessagesPage,
componentProps: {
room: room,
roomId: roomId,
},
cssClass: 'group-messages',
backdropDismiss: false
@@ -35,6 +35,10 @@
</ion-label>
</div>
</div>
<div *ngIf="roomCountDownDate" class="d-flex align-items-center yellow-orange pl-10">
<i class="far fa-clock font-15"></i>
<ion-label class="font-15 pl-10" color="warning">{{roomCountDownDate}}</ion-label>
</div>
</div>
</ion-toolbar>
</ion-header>
@@ -133,7 +133,7 @@
display: flex;
width: fit-content;
height: auto;
background: #fef4c5;
background: var(--chat-alert-msg-color);
text-align: center;
font-size: 13px;
color: #262420;
@@ -202,11 +202,11 @@
}
.incoming-false{
margin: 10px 20px 10px 75px;
background: #e4f4fe;
background: var(--chat-incoming-msg-color);
float: right;
}
.title{
color: #0782c9;
color: var(--title-text-color);
font-weight: bold;
margin-bottom: 5px;
@@ -56,6 +56,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
longPressActive = false;
showMessageOptions = false;
selectedMsgId:string;
roomCountDownDate:any;
@ViewChild('scrollMe') private myScrollContainer: ElementRef;
@@ -182,6 +183,9 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
this.room = room['room'];
this.roomName = this.room.name.split('-').join(' ');
if(this.room.customFields.countDownDate){
this.roomCountDownDate = this.timeService.countDownDate(this.room.customFields.countDownDate, this.room._id);
}
this.getGroupContacts(this.room);
this.loadGroupMessages(this.room);
this.showLoader = false;
@@ -254,33 +258,9 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
showDateDuration(start:any){
return this.timeService.showDateDuration(start);
/* let end;
end = new Date();
start = new Date(start);
let customizedDate;
const totalSeconds = Math.floor((end - (start))/1000);;
const totalMinutes = Math.floor(totalSeconds/60);
const totalHours = Math.floor(totalMinutes/60);
const totalDays = Math.floor(totalHours/24);
const hours = totalHours - ( totalDays * 24 );
const minutes = totalMinutes - ( totalDays * 24 * 60 ) - ( hours * 60 );
const seconds = totalSeconds - ( totalDays * 24 * 60 * 60 ) - ( hours * 60 * 60 ) - ( minutes * 60 );
if(totalDays == 0){
if(start.getDate() == new Date().getDate()){
let time = start.getHours() + ":" + this.addZero(start.getUTCMinutes());
return time;
}
else{
return 'Ontem';
}
}
else{
let date = start.getDate() + "/" + (start.getMonth()+1) + "/" + start.getFullYear();
return date;
} */
}
countDownDate(date:any, roomId:string){
return this.timeService.countDownDate(date, roomId);
}
addZero(i) {
@@ -173,12 +173,12 @@
}
.incoming-false{
margin: 10px 20px 10px 75px;
background: #e4f4fe;
background: var(--chat-incoming-msg-color);
float: right;
}
.title{
display: inline;
color: #0782c9;
color: var(--title-text-color);
font-weight: bold;
margin-bottom: 5px;
@@ -11,7 +11,11 @@
<div class="middle">
<ion-label class="title">Novo Grupo</ion-label>
</div>
<app-btn-seguinte *ngIf="groupName" (click)="addContacts()"></app-btn-seguinte>
<div *ngIf="groupName">
<button class="btn-no-color btn-criar" (click)="createGroup()">
<ion-label>Criar grupo</ion-label>
</button>
</div>
</div>
</div>
</ion-toolbar>
@@ -22,7 +26,7 @@
<div class="item-container">
<ion-input [(ngModel)]="groupName" placeholder="Título"></ion-input>
</div>
<div *ngIf="false" class="item-container-no-border">
<div class="item-container-no-border">
<ion-checkbox (ionChange)="_ionChange($event)" color="primary"></ion-checkbox>
<ion-label>Grupo Ultra-secreto</ion-label>
</div>
@@ -37,6 +41,6 @@
</div>
</div>
</div>
</div>
</div>
</ion-content>
@@ -32,7 +32,7 @@ ion-content{
float: right;
margin-right: 10px;
}
}
.main-header{
width: 100%; /* 400px */
@@ -45,7 +45,7 @@ ion-content{
padding: 30px 20px 0px 20px;
color:#000;
transform: translate3d(0, 1px, 0);
.title-content{
margin: 0px auto;
overflow: auto;
@@ -64,6 +64,13 @@ ion-content{
width: 221px;
margin: 2.5px 0 0 5px;
}
.btn-criar{
padding: 0!important;
float: right;
font-size: 15px;
color: var(--font-awesome);
margin: 8px 5px 0 5px;
}
.right{
padding: 0!important;
float: right;
@@ -87,8 +94,8 @@ ion-content{
float: right;
padding-left: 20px;
}
}
.main-content{
width: 100%; /* 400px */
+55 -19
View File
@@ -4,6 +4,7 @@ import { ModalController, NavParams, PickerController, PopoverController } from
import { GroupDurationPage } from 'src/app/shared/popover/group-duration/group-duration.page';
import { GroupContactsPage } from '../group-messages/group-contacts/group-contacts.page';
import { ThemeService } from 'src/app/services/theme.service'
import { ChatService } from 'src/app/services/chat.service';
@Component({
selector: 'app-new-group',
@@ -16,6 +17,7 @@ export class NewGroupPage implements OnInit {
displayDuration: any;
showDuration: boolean;
selectedDuration = ['','',''];
thedate:any;
groupName:string;
constructor(
@@ -23,9 +25,10 @@ export class NewGroupPage implements OnInit {
private popoverController: PopoverController,
private modalController: ModalController,
private navParams: NavParams,
public ThemeService: ThemeService
)
{
public ThemeService: ThemeService,
private chatService: ChatService,
)
{
this.isGroupCreated = false;
this.groupName = this.navParams.get('name');
}
@@ -35,24 +38,54 @@ export class NewGroupPage implements OnInit {
}
_ionChange(event){
this.showDuration = event.detail.checked;
if(event.detail.checked){
this.thedate = new Date();
}
else{
this.thedate = '';
}
}
close(){
this.modalController.dismiss();
}
async addContacts(){
createGroup(){
let name = this.groupName.split(' ').join('-');
let body = { "name":name, }
this.chatService.addGroup(body).subscribe(res=>{
console.log('group created');
console.log(res['group']);
//this.addGroupMessage.emit(res['group']._id);
if(this.thedate){
let countDownBody = {
"roomId": res['group']._id,
"customFields":{"countDownDate":this.thedate}
}
this.chatService.setGroupCustomFields(countDownBody).subscribe(res=>{
console.log(res);
});
}
this.isGroupCreated = true;
this.addContacts(res['group']);
});
}
async addContacts(room){
this.close();
let name = this.groupName.split(' ').join('-');
console.log(name);
const modal = await this.modalController.create({
component: GroupContactsPage,
componentProps: {
isCreated:this.isGroupCreated,
name: name,
duration:'',
},
room: room,
},
cssClass: 'contacts',
backdropDismiss: false
});
@@ -60,7 +93,7 @@ export class NewGroupPage implements OnInit {
await modal.present();
modal.onDidDismiss();
}
async setDuration(ev: any) {
const popover = await this.popoverController.create({
component: GroupDurationPage,
@@ -75,14 +108,17 @@ export class NewGroupPage implements OnInit {
const picker = await this.pickerController.create({
cssClass: '',
buttons: [
{
{
text: 'Cancelar', role: 'cancel', cssClass: 'btn-cancel'
},
{
text: 'Ok',
{
text: 'Ok',
cssClass: 'btn-cancel',
handler:(value:any)=>{
console.log('button done pressed');
let now = new Date();
this.thedate = new Date(now.getFullYear(), now.getMonth(), now.getDate() + value.days.value, now.getHours() + value.hours.value, now.getMinutes() + value.minutes.value, now.getSeconds(), now.getMilliseconds());
this.selectedDuration = [
value.days.value,
value.hours.value,
@@ -93,24 +129,24 @@ export class NewGroupPage implements OnInit {
if(value.days.value > 0){
if(value.days.value == 1){
if(value.hours.value == 1){
this.displayDuration = value.days.value + " day " +
this.displayDuration = value.days.value + " day " +
value.hours.value + " hora " +
value.minutes.value + " minutos";
}
else{
this.displayDuration = value.days.value + " days " +
this.displayDuration = value.days.value + " days " +
value.hours.value + " horas " +
value.minutes.value + " minutos";
}
}
else{
if(value.hours.value == 1){
this.displayDuration = value.days.value + " days " +
this.displayDuration = value.days.value + " days " +
value.hours.value + " hora " +
value.minutes.value + " minutos";
}
else{
this.displayDuration = value.days.value + " days " +
this.displayDuration = value.days.value + " days " +
value.hours.value + " horas " +
value.minutes.value + " minutos";
}
@@ -126,7 +162,7 @@ export class NewGroupPage implements OnInit {
value.minutes.value + " minutos";
}
}
}
}
},
},
],
@@ -180,7 +216,7 @@ export class NewGroupPage implements OnInit {
await picker.present();
picker.onDidDismiss().then(async data =>{
let day = await picker.getColumn('days');
let hour = await picker.getColumn('hours');
let hour = await picker.getColumn('hours');
let minutes = await picker.getColumn('minutes');
});
+3 -3
View File
@@ -19,13 +19,13 @@
</div>
</div>
<h3 *ngIf="ThemeService.currentTheme != 'tribunal'"class="center text-white">Gabinete Digital</h3>
<h3 *ngIf="ThemeService.currentTheme == 'tribunal'" class="center text-white">Tribunal Constitucional</h3>
<h3 *ngIf="ThemeService.currentTheme == 'tribunal'" class="center">Tribunal Constitucional</h3>
<form class="form">
<p class="form-label text-white">Email</p>
<p class="form-label">Email</p>
<ion-item class="form-input">
<ion-input type="text" [(ngModel)]="username" name="input-username"></ion-input>
</ion-item>
<p class="form-label text-white">Palavra-passe</p>
<p class="form-label">Palavra-passe</p>
<ion-item class="form-input">
<ion-input (keyup.enter)="Login()" type="password" [(ngModel)]="password" name="input-password" ></ion-input>
</ion-item>
+4 -3
View File
@@ -1,7 +1,7 @@
@import '~src/function.scss';
:host, app-login {
ion-content {
background: linear-gradient(180deg, #42B9FE 0%, #0782C9 100%) !important;
background: linear-gradient(180deg, #c0ccd3 0%, #737b80 100%) !important;
}
}
ion-content{
@@ -55,6 +55,7 @@ ion-content{
border-radius: 50%;
padding: 15px;
margin: auto;
background-color: #fff !important;
.bg-4 img{
width: 100%;
@@ -67,8 +68,7 @@ ion-content{
.div-logo{
width: 200px !important;
margin: 0 auto;
padding-bottom: 15px;
overflow: hidden;
padding: 15px !important;
}
.div-logo img{
@@ -92,6 +92,7 @@ ion-item{
.form-label{
margin: 15px 0 5px 0;
font-size: 15px;
color: var(--login-label-text);
}
.form-input{
--background: #fff;
@@ -43,7 +43,6 @@ export class TimeService {
countDownDate(date:any, roomId:string){
/* let timer = setInterval(() =>{ */
console.log('Show TIMER');
let difference = new Date(date).getTime() - new Date().getTime();
let c_day = Math.floor(difference/(1000*60*60*24));
let c_hours = Math.floor((difference % (1000*60*60*24)) / (1000*60*60));
@@ -2,6 +2,6 @@
padding: 0!important;
float: right;
font-size: 15px;
color: #0782c9;
color: var(--title-text-color);
margin: 8px 0 0 5px;
}
@@ -23,9 +23,9 @@
</ion-label>
</div>
</div>
<div *ngIf="room.customFields.countDownDate" class="d-flex align-items-center yellow-orange pl-10">
<div *ngIf="roomCountDownDate" class="d-flex align-items-center yellow-orange pl-10">
<i class="far fa-clock font-15" ></i>
<ion-label class="font-15 pl-10" color="warning">{{countDownDate(room.customFields.countDownDate, room._id)}}</ion-label>
<ion-label class="font-15 pl-10" color="warning">{{roomCountDownDate}}</ion-label>
</div>
</div>
</ion-toolbar>
@@ -100,7 +100,7 @@
.info-text{
/* width: 322px; */
width: em(422px);
background: #fef4c5;
background: var(--chat-alert-msg-color);
text-align: center;
font-size: 13px;
color: #262420;
@@ -160,12 +160,12 @@
}
.incoming-false{
margin: 10px 20px 10px 75px;
background: #e4f4fe;
background: var(--chat-incoming-msg-color);
float: right;
}
.title{
display: inline;
color: #0782c9;
color: var(--title-text-color);
font-weight: bold;
margin-bottom: 5px;
@@ -56,6 +56,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
currentPosition: any;
startPosition: number;
scrollToBottomBtn = false;
roomCountDownDate:any;
@Input() roomId:string;
@Output() closeAllDesktopComponents:EventEmitter<any> = new EventEmitter<any>();
@@ -251,6 +252,9 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
if(this.room.name){
this.roomName = this.room.name.split('-').join(' ');
}
if(this.room.customFields.countDownDate){
this.roomCountDownDate = this.timeService.countDownDate(this.room.customFields.countDownDate, this.room._id);
}
this.getGroupContacts(this.room);
//this.loadGroupMessages(this.room);
this.showLoader = false;
@@ -136,12 +136,12 @@
}
.incoming-false{
margin: 10px 20px 10px 75px;
background: #e4f4fe;
background: var(--chat-incoming-msg-color);
float: right;
}
.title{
display: inline;
color: #0782c9;
color: var(--title-text-color);
font-weight: bold;
margin-bottom: 5px;
@@ -21,12 +21,12 @@
<ion-input [(ngModel)]="groupName" placeholder="Título"></ion-input>
</div>
<div *ngIf="true" class="item-container-no-border">
<div class="item-container-no-border">
<ion-checkbox (ionChange)="_ionChange($event)" color="primary"></ion-checkbox>
<ion-label>Grupo Ultra-secreto</ion-label>
</div>
<!-- *ngIf="showDuration" -->
<div class="container-div">
<div *ngIf="showDuration" class="container-div">
<div class="ion-item-class-2">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-duration.svg"></ion-icon>
@@ -36,11 +36,5 @@
</div>
</div>
</div>
<ion-label>{{displayDuration}}</ion-label>
<br />
<ion-label>{{thedate}}</ion-label>
<br />
<ion-label>{{countDownTime}}</ion-label>
</div>
</ion-content>
+16 -10
View File
@@ -42,12 +42,16 @@ export class NewGroupPage implements OnInit {
_ionChange(event){
console.log(event);
console.log(event.detail.checked);
this.showDuration = event.detail.checked;
this.showDuration = event.detail.checked;
//this.thedate = new Date(2021, 10, 1, 10, 33, 30, 0);
this.thedate = new Date();
if(event.detail.checked){
this.thedate = new Date();
}
else{
this.thedate = '';
}
}
close(){
//this.modalController.dismiss();
console.log('close');
@@ -63,13 +67,15 @@ export class NewGroupPage implements OnInit {
this.addGroupMessage.emit(res['group']._id);
let countDownBody = {
"roomId": res['group']._id,
"customFields":{"countDownDate":this.thedate}
if(this.thedate){
let countDownBody = {
"roomId": res['group']._id,
"customFields":{"countDownDate":this.thedate}
}
this.chatService.setGroupCustomFields(countDownBody).subscribe(res=>{
console.log(res);
});
}
this.chatService.setGroupCustomFields(countDownBody).subscribe(res=>{
console.log(res);
});
});
}
+1 -1
View File
@@ -1135,7 +1135,7 @@ ngx-mat-datetime-content{
.incoming-false:hover{
.message-options-icon{
display: block;
background-color: #e4f4fe;
background-color: var(--chat-incoming-msg-color);
}
}
}
+11 -2
View File
@@ -627,10 +627,14 @@ body {
--indicator-color: transparent !important;
--indicator-color-checked: transparent !important;
}
.yellow-orange{
color: #ffb703 !important;
}
.tribunal {
--ion-color-primary: #000;
--login-background: linear-gradient(180deg, #97CBE6 60%, #61BBEA 100%) !important;
--login-background: linear-gradient(180deg, #e1e7eb 60%, #7c8386b2 100%) !important;
--login-label-text: #000;
--button-hover: #000;
--button-color: #ff0000;
--button-border-color: #c63527;
@@ -697,7 +701,8 @@ body {
.bg-4{
background: rgba(255, 255, 255, 0.918);
//background: rgba(255, 255, 255, 0.918);
background-color: #fff !important;
}
}
@@ -706,6 +711,8 @@ body {
}
.gov {
--chat-alert-msg-color: #e0e9ee;
--chat-incoming-msg-color: #fff3da;
--ion-color-primary: #000;
--ion-color-secondary: #e4e8eb75;
--login-background: linear-gradient(180deg, #c63527 60%, #000 100%) !important;
@@ -778,6 +785,8 @@ body {
}
.default {
--chat-alert-msg-color: #fef4c5;
--chat-incoming-msg-color: #e4f4fe;
--ion-color-primary: #3880ff;
--ion-color-secondary: #e4e8eb75;
--login-background: linear-gradient(180deg, #42b9fe 0%, #0782c9 100%) !important;