mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
swipe-delete button
This commit is contained in:
Generated
+1
-2
@@ -17290,8 +17290,7 @@
|
|||||||
},
|
},
|
||||||
"ssri": {
|
"ssri": {
|
||||||
"version": "6.0.1",
|
"version": "6.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz",
|
"resolved": "",
|
||||||
"integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==",
|
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"figgy-pudding": "^3.5.1"
|
"figgy-pudding": "^3.5.1"
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
<div class="main-header">
|
<div class="main-header">
|
||||||
<div class="title-content">
|
<div class="title-content">
|
||||||
<div class="back-icon">
|
<div class="back-icon">
|
||||||
<ion-icon (click)="close()" slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
<button class="btn-no-color" (click)="close()">
|
||||||
|
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="div-title">
|
<div class="div-title">
|
||||||
<ion-label class="title">Contactos</ion-label>
|
<ion-label class="title">Contactos</ion-label>
|
||||||
@@ -33,11 +35,16 @@
|
|||||||
<div *ngIf="members">
|
<div *ngIf="members">
|
||||||
<ion-label class="members-label">Contactos selecção:</ion-label>
|
<ion-label class="members-label">Contactos selecção:</ion-label>
|
||||||
<ion-list class="members-list" *ngFor="let user of members">
|
<ion-list class="members-list" *ngFor="let user of members">
|
||||||
<div class="members-checkbox">
|
<ion-item-sliding>
|
||||||
<ion-checkbox checked color="primary"></ion-checkbox>
|
<ion-item lines="none" class="members-checkbox ion-no-border ion-no-padding">
|
||||||
<p>{{user.name}}</p>
|
<ion-checkbox checked color="primary"></ion-checkbox>
|
||||||
<ion-icon class="{{user.status}}" name="ellipse"></ion-icon>
|
<p>{{user.name}}</p>
|
||||||
</div>
|
<ion-icon class="{{user.status}}" name="ellipse"></ion-icon>
|
||||||
|
</ion-item>
|
||||||
|
<ion-item-options (click)="deleteMember(user)" class="members-options" side="end">
|
||||||
|
<ion-item-option color="danger">Apagar</ion-item-option>
|
||||||
|
</ion-item-options>
|
||||||
|
</ion-item-sliding>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -93,10 +93,15 @@
|
|||||||
|
|
||||||
.members-checkbox{
|
.members-checkbox{
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: .5px 20px .5px 20px !important;
|
margin: 0px 20px 0px 20px !important;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
border-bottom: 1px solid #ebebeb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.members-options{
|
||||||
|
margin: 0px 20px 0px 19px !important;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-divider{
|
.item-divider{
|
||||||
@@ -115,7 +120,13 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-checkbox ion-checkbox, .members-checkbox ion-checkbox{
|
.members-checkbox ion-checkbox{
|
||||||
|
--border-color: #0d89d1;
|
||||||
|
--background-checked:#0d89d1;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-checkbox ion-checkbox{
|
||||||
--border-color: #0d89d1;
|
--border-color: #0d89d1;
|
||||||
--background-checked:#0d89d1;
|
--background-checked:#0d89d1;
|
||||||
float: left;
|
float: left;
|
||||||
|
|||||||
@@ -57,6 +57,28 @@ export class GroupContactsPage implements OnInit {
|
|||||||
console.log(this.isGroupCreated);
|
console.log(this.isGroupCreated);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
deleteMember(data:any){
|
||||||
|
let body = {
|
||||||
|
"roomId": this.room._id,
|
||||||
|
"userId": data._id,
|
||||||
|
}
|
||||||
|
console.log(this.room);
|
||||||
|
|
||||||
|
console.log(body);
|
||||||
|
if(this.room.t == "p"){
|
||||||
|
this.chatService.removeGroupMember(body).subscribe(res=>{
|
||||||
|
console.log(res);
|
||||||
|
this.loadUsers();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if(this.room.t == "c"){
|
||||||
|
this.chatService.removeChannelMember(body).subscribe(res=>{
|
||||||
|
console.log(res);
|
||||||
|
this.loadUsers();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
loadUsers(){
|
loadUsers(){
|
||||||
this.options = {
|
this.options = {
|
||||||
headers: this.headers,
|
headers: this.headers,
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ export class LoginPage implements OnInit {
|
|||||||
}
|
}
|
||||||
if (await this.authService.login(this.userattempt)) {
|
if (await this.authService.login(this.userattempt)) {
|
||||||
this.loginRocketChat();
|
this.loginRocketChat();
|
||||||
this.getToken();
|
//this.getToken();
|
||||||
|
|
||||||
this.router.navigate(['/home/events']);
|
this.router.navigate(['/home/events']);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,6 +119,12 @@ export class ChatService {
|
|||||||
}
|
}
|
||||||
return this.http.post(environment.apiChatUrl+'chat.sendMessage', body, opts);
|
return this.http.post(environment.apiChatUrl+'chat.sendMessage', body, opts);
|
||||||
}
|
}
|
||||||
|
leaveRoom(body:any){
|
||||||
|
let opts = {
|
||||||
|
headers: this.headers,
|
||||||
|
}
|
||||||
|
return this.http.post(environment.apiChatUrl+'rooms.leave', body, opts);
|
||||||
|
}
|
||||||
//Load members from a chat
|
//Load members from a chat
|
||||||
getMembers(roomId:any){
|
getMembers(roomId:any){
|
||||||
|
|
||||||
@@ -205,6 +211,12 @@ export class ChatService {
|
|||||||
closeChannel(body:any){
|
closeChannel(body:any){
|
||||||
return this.http.post(environment.apiChatUrl+'channels.close', body, this.options);
|
return this.http.post(environment.apiChatUrl+'channels.close', body, this.options);
|
||||||
}
|
}
|
||||||
|
removeChannelMember(body:any){
|
||||||
|
let opts = {
|
||||||
|
headers: this.headers,
|
||||||
|
}
|
||||||
|
return this.http.post(environment.apiChatUrl+'channels.kick', body, opts);
|
||||||
|
}
|
||||||
deleteGroup(body:any){
|
deleteGroup(body:any){
|
||||||
return this.http.post(environment.apiChatUrl+'groups.delete', body, this.options);
|
return this.http.post(environment.apiChatUrl+'groups.delete', body, this.options);
|
||||||
}
|
}
|
||||||
@@ -227,5 +239,11 @@ export class ChatService {
|
|||||||
renameGroup(body:any){
|
renameGroup(body:any){
|
||||||
return this.http.post(environment.apiChatUrl+'groups.rename', body, this.options);
|
return this.http.post(environment.apiChatUrl+'groups.rename', body, this.options);
|
||||||
}
|
}
|
||||||
|
removeGroupMember(body:any){
|
||||||
|
let opts = {
|
||||||
|
headers: this.headers,
|
||||||
|
}
|
||||||
|
return this.http.post(environment.apiChatUrl+'groups.kick', body, opts);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user