mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
update badge das notificações
This commit is contained in:
@@ -487,6 +487,7 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
|
||||
|
||||
if(this.documents.length >= 0) {
|
||||
this.postEvent.HasAttachments = true;
|
||||
}
|
||||
@@ -495,9 +496,11 @@ export class NewEventPage implements OnInit {
|
||||
this.postEvent.EventRecurrence.Type = '-1'
|
||||
}
|
||||
|
||||
|
||||
if(this.loggeduser.Profile == 'MDGPR') {
|
||||
const CalendarId = this.selectedCalendarId()
|
||||
this.showLoader = true;
|
||||
this.postEvent.CalendarId = CalendarId
|
||||
|
||||
let loader = this.toastService.loading();
|
||||
|
||||
@@ -554,6 +557,7 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
const CalendarId = this.selectedCalendarId()
|
||||
let loader = this.toastService.loading();
|
||||
this.postEvent.CalendarId = CalendarId
|
||||
|
||||
this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).subscribe(
|
||||
(id) => {
|
||||
@@ -609,11 +613,13 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
});
|
||||
} else {
|
||||
|
||||
|
||||
this.postEvent.CalendarName
|
||||
|
||||
const CalendarId = this.selectedCalendarId()
|
||||
let loader = this.toastService.loading();
|
||||
|
||||
this.postEvent.CalendarId = CalendarId
|
||||
|
||||
this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).subscribe(
|
||||
(id) => {
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<ion-list class="members-list" *ngFor="let user of members">
|
||||
<div class="members-checkbox">
|
||||
<ion-checkbox disabled checked color="primary"></ion-checkbox>
|
||||
<p>{{user.name}}</p>
|
||||
<p class="ma-0">{{user.name}}</p>
|
||||
<ion-icon class="{{user.status}}" name="ellipse"></ion-icon>
|
||||
<button (click)="deleteMember(user)" class="btn-no-color detele-item-icon">
|
||||
<ion-icon color="danger" name="close"></ion-icon>
|
||||
@@ -49,19 +49,19 @@
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
<ion-virtual-scroll [items]="users " approxItemHeight="70px" [headerFn]="separateLetter">
|
||||
|
||||
<div class="item-divider" *virtualHeader="let header">
|
||||
<ion-label>{{header}}</ion-label>
|
||||
<div *ngFor="let userContainer of userContainer | keyvalue;" >
|
||||
|
||||
<div class="item-divider">
|
||||
<ion-label>{{ userContainer.key }}</ion-label>
|
||||
</div>
|
||||
|
||||
<div *virtualItem="let user" class="item-checkbox">
|
||||
<ion-checkbox (ionChange)="selectedContact(user)" color="primary"></ion-checkbox>
|
||||
<ion-label>{{user.name}}</ion-label>
|
||||
<div *ngFor="let user of userContainer.value" class="d-flex px-20 align-center">
|
||||
<ion-checkbox [(ngModel)]="user.isChecked" color="primary" (click)="selectedContact(user)"></ion-checkbox>
|
||||
<ion-label class="flex-grow-1 px-10">{{user.name}}</ion-label>
|
||||
<div class="icon"><ion-icon class="{{user.status}}" name="ellipse"></ion-icon></div>
|
||||
</div>
|
||||
|
||||
</ion-virtual-scroll>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -36,6 +36,10 @@ export class GroupContactsPage implements OnInit {
|
||||
@Input() roomId:string;
|
||||
@Output() openGroupMessage:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
|
||||
objectUserSingleStone = []
|
||||
userContainer = {}
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private chatService: ChatService,
|
||||
@@ -168,7 +172,7 @@ export class GroupContactsPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
loadUsers(){
|
||||
loadUsers() {
|
||||
|
||||
this.chatService.getAllUsers().subscribe((res:any)=>{
|
||||
|
||||
@@ -192,24 +196,31 @@ export class GroupContactsPage implements OnInit {
|
||||
});
|
||||
|
||||
|
||||
for( const user of this.users) {
|
||||
|
||||
const foundUser = this.objectUserSingleStone.find( e => e.name == user.name)
|
||||
|
||||
if(!foundUser) {
|
||||
this.objectUserSingleStone.push(user)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for(const user of this.objectUserSingleStone) {
|
||||
const firstLetter = user.name.charAt(0)
|
||||
|
||||
if(!this.userContainer[firstLetter]) {
|
||||
this.userContainer[firstLetter] = [user]
|
||||
} else {
|
||||
this.userContainer[firstLetter].push(user)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
|
||||
separateLetter(record, recordIndex, records){
|
||||
if(recordIndex == 0){
|
||||
return record.name[0];
|
||||
}
|
||||
|
||||
let first_prev = records[recordIndex - 1].name[0];
|
||||
let first_current = record.name[0];
|
||||
|
||||
if(first_prev != first_current){
|
||||
return first_current;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
doRefresh(ev){
|
||||
ev.target.complete();
|
||||
}
|
||||
@@ -267,6 +278,24 @@ export class GroupContactsPage implements OnInit {
|
||||
|
||||
this.users = users
|
||||
|
||||
|
||||
let a = this.objectUserSingleStone.filter( e => e.name.toLowerCase().includes(this.textSearch.toLowerCase()))
|
||||
|
||||
let b = {}
|
||||
for(const user of a) {
|
||||
const firstLetter = user.name.charAt(0)
|
||||
|
||||
if(!b[firstLetter]) {
|
||||
b[firstLetter] = [user]
|
||||
} else {
|
||||
b[firstLetter].push(user)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.userContainer = b
|
||||
|
||||
// console.log('this.users', this.users)
|
||||
}
|
||||
|
||||
@@ -274,18 +303,22 @@ export class GroupContactsPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
selectedContact(user:any){
|
||||
/* this.groupName = this.room.name; */
|
||||
user.isChecked = !user.isChecked;
|
||||
|
||||
const userIndex = this.users.findIndex((e) => e._id == user._id)
|
||||
this.users[userIndex] = user
|
||||
selectedContact(user:any) {
|
||||
/* this.groupName = this.room.name; */
|
||||
if(user.isChecked != true ) {
|
||||
user.isChecked = false
|
||||
} else {
|
||||
user.isChecked = true
|
||||
}
|
||||
|
||||
const userIndex = this.objectUserSingleStone.findIndex((e) => e._id == user._id)
|
||||
this.objectUserSingleStone[userIndex].isChecked = user.isChecked
|
||||
|
||||
}
|
||||
|
||||
addContacts(roomId:any){
|
||||
addContacts(roomId:any) {
|
||||
|
||||
this.selectedUserList = this.users.filter(function(contact) {
|
||||
this.selectedUserList = this.objectUserSingleStone.filter(function(contact) {
|
||||
return contact.isChecked == true;
|
||||
});
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
|
||||
<div class="messages-list-item-wrapper container-width-100"
|
||||
*ngFor="let msg of ChatSystemService.getDmRoom(roomId).messages; index as i; let last = last">
|
||||
|
||||
<div class='message-item incoming-{{msg.u.username!=sessionStore.user.UserName}} max-width-45' *ngIf="msg.msg !=''">
|
||||
<div class="message-item-options d-flex justify-content-end">
|
||||
<fa-icon [matMenuTriggerFor]="beforeMenu" icon="chevron-down" class="message-options-icon cursor-pointer">
|
||||
|
||||
@@ -54,8 +54,10 @@
|
||||
<img *ngIf="loggeduser.RoleDescription == 'Secretário Geral' " class="profile-image"
|
||||
src='assets/images/secretaria_geral.png'>
|
||||
|
||||
<ion-icon *ngIf="loggeduser.RoleDescription != 'Presidente da República'&& loggeduser.RoleDescription != 'Ministro e Director do Gabinete do PR' && loggeduser.RoleDescription != 'Secretário Geral' " class="icon font-45-em" src='assets/images/theme/gov/icons-profile.svg'></ion-icon>
|
||||
|
||||
<div class="profile-text">
|
||||
<div *ngIf="this.notificationLength > 0" class="icon-badge" style="right: -18px;top: -29px;">
|
||||
<div *ngIf="notificationLength > 0" class="icon-badge" style="right: -18px;top: -29px;">
|
||||
{{notificationLength}} </div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -206,9 +208,11 @@
|
||||
<img *ngIf="loggeduser.RoleDescription == 'Secretário Geral' " class="profile-image"
|
||||
src='assets/images/secretaria_geral.png'>
|
||||
|
||||
<ion-icon *ngIf="loggeduser.RoleDescription != 'Presidente da República'&& loggeduser.RoleDescription != 'Ministro e Director do Gabinete do PR' && loggeduser.RoleDescription != 'Secretário Geral' " class="icon" src='assets/images/theme/gov/icons-profile.svg'></ion-icon>
|
||||
|
||||
|
||||
<div class="profile-text">
|
||||
<div *ngIf="this.notificationLength > 0" class="icon-badge" style="right: -18px;top: -29px;">
|
||||
<div *ngIf="notificationLength > 0" class="icon-badge" style="right: -18px;top: -29px;">
|
||||
{{notificationLength}} </div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</div>
|
||||
<div class="width-100">
|
||||
<div class="d-flex width-100">
|
||||
<div class="flex-grow-1">
|
||||
<div class="flex-grow-1 flex-wrap d-flex">
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="btn-cancel desk" shape="round"> Enviar para o {{ environment.PR}} </button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Solicitar consideração superior</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])" class="btn-cancel desk" shape="round"> Solicitar revisão </button>
|
||||
@@ -22,23 +22,9 @@
|
||||
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="(task.Status || '') != 'Pending'" full class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Chat.access])" (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Iniciar Conversa</button>
|
||||
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div *ngIf="task && p.userRole(['PR'])" class="d-flex width-100">
|
||||
<div class="flex-grow-1">
|
||||
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openBookMeetingModal()" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<div hidden class="solid"></div>
|
||||
<button hidden class="btn-cancel" shape="round" >Delegar</button>
|
||||
<button (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Iniciar Conversa</button>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="solid"></div>
|
||||
<button (click)="close()" full class="btn-cancel" shape="round" >Cancelar</button>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
@media only screen and (max-width: 800px) {
|
||||
.btn-ok, .btn-cancel, .btn-delete{
|
||||
width: 100% !important;
|
||||
width: 47% !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1024px) {
|
||||
@@ -45,11 +45,11 @@
|
||||
}
|
||||
.btn-cancel{
|
||||
display: none;
|
||||
width: 100% !important;
|
||||
width: 47% !important;
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
.btn-delete, .btn-ok{
|
||||
width: 100% !important;
|
||||
width: 47% !important;
|
||||
margin-bottom: 10px !important;
|
||||
margin-top: 10px !important;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
import { Camera, CameraResultType, CameraSource} from '@capacitor/camera';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { PublicationFolderService } from 'src/app/store/publication-folder.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-new-publication',
|
||||
templateUrl: './new-publication.page.html',
|
||||
@@ -50,7 +52,8 @@ export class NewPublicationPage implements OnInit {
|
||||
private publications: PublicationsService,
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService,
|
||||
private httpErroHandle: HttpErrorHandle
|
||||
private httpErroHandle: HttpErrorHandle,
|
||||
public PublicationFolderService: PublicationFolderService
|
||||
) {
|
||||
this.publicationTitle = 'Nova Publicação';
|
||||
}
|
||||
@@ -65,22 +68,43 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
|
||||
getPublicationDetail() {
|
||||
this.showLoader = true;
|
||||
this.publications.GetPublicationById(this.publicationId).subscribe( res => {
|
||||
|
||||
|
||||
const folderId = this.folderId
|
||||
const localPublication = this.PublicationFolderService.getLocalPublication(folderId, this.publicationId);
|
||||
|
||||
if(localPublication?.DocumentId) {
|
||||
|
||||
this.publication = {
|
||||
DateIndex: res.DateIndex,
|
||||
DocumentId: res.DocumentId,
|
||||
ProcessId:res.ProcessId,
|
||||
Title:res.Title,
|
||||
Message: res.Message,
|
||||
DatePublication: res.DatePublication,
|
||||
FileBase64: "data:image/jpg;base64," + res.FileBase64,
|
||||
OriginalFileName: res.OriginalFileName,
|
||||
DateIndex: localPublication.DateIndex,
|
||||
DocumentId: localPublication.DocumentId,
|
||||
ProcessId:localPublication.ProcessId,
|
||||
Title:localPublication.Title,
|
||||
Message: localPublication.Message,
|
||||
DatePublication: localPublication.DatePublication,
|
||||
FileBase64: localPublication.FileBase64,
|
||||
OriginalFileName: localPublication.OriginalFileName,
|
||||
FileExtension: 'jpeg',
|
||||
}
|
||||
this.pub = this.publication;
|
||||
this.showLoader = false;
|
||||
});
|
||||
} else {
|
||||
this.showLoader = true;
|
||||
this.publications.GetPublicationById(this.publicationId).subscribe( res => {
|
||||
this.publication = {
|
||||
DateIndex: res.DateIndex,
|
||||
DocumentId: res.DocumentId,
|
||||
ProcessId:res.ProcessId,
|
||||
Title:res.Title,
|
||||
Message: res.Message,
|
||||
DatePublication: res.DatePublication,
|
||||
FileBase64: "data:image/jpg;base64," + res.FileBase64,
|
||||
OriginalFileName: res.OriginalFileName,
|
||||
FileExtension: 'jpeg',
|
||||
}
|
||||
this.pub = this.publication;
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -228,6 +252,9 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.PublicationFolderService.loadPublication(this.publication.DocumentId, this.publication.ProcessId)
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
+1
@@ -19,6 +19,7 @@
|
||||
<p class="post-data"><ion-skeleton-text animated style="width: 20%;"></ion-skeleton-text></p>
|
||||
</div>
|
||||
</div>
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
|
||||
|
||||
+42
-21
@@ -18,7 +18,6 @@ export class PublicationDetailPage implements OnInit {
|
||||
showLoader: boolean;
|
||||
/* folderId: string; */
|
||||
publication: Publication;
|
||||
|
||||
@Input() publicationId: string;
|
||||
@Input() folderId: string;
|
||||
@Output() addNewPublication = new EventEmitter<any>();
|
||||
@@ -64,30 +63,52 @@ export class PublicationDetailPage implements OnInit {
|
||||
}
|
||||
|
||||
getPublicationDetail() {
|
||||
this.showLoader = true;
|
||||
this.publications.GetPublicationById(this.publicationId).subscribe(res => {
|
||||
|
||||
|
||||
const folderId = this.folderId
|
||||
const localPublication = this.publicationFolderService.getLocalPublication(folderId, this.publicationId);
|
||||
|
||||
if(localPublication?.DocumentId) {
|
||||
|
||||
this.publication = {
|
||||
DateIndex: res.DateIndex,
|
||||
DocumentId: res.DocumentId,
|
||||
ProcessId:res.ProcessId,
|
||||
Title:res.Title,
|
||||
Message: res.Message,
|
||||
DatePublication: res.DatePublication,
|
||||
FileBase64: "data:image/jpg;base64," + res.FileBase64,
|
||||
OriginalFileName: res.OriginalFileName,
|
||||
DateIndex: localPublication.DateIndex,
|
||||
DocumentId: localPublication.DocumentId,
|
||||
ProcessId:localPublication.ProcessId,
|
||||
Title:localPublication.Title,
|
||||
Message: localPublication.Message,
|
||||
DatePublication: localPublication.DatePublication,
|
||||
FileBase64: localPublication.FileBase64,
|
||||
OriginalFileName: localPublication.OriginalFileName,
|
||||
FileExtension: 'jpeg',
|
||||
}
|
||||
this.showLoader = false;
|
||||
}, (error) => {
|
||||
} else {
|
||||
|
||||
this.showLoader = true;
|
||||
this.publications.GetPublicationById(this.publicationId).subscribe(res => {
|
||||
|
||||
this.publication = {
|
||||
DateIndex: res.DateIndex,
|
||||
DocumentId: res.DocumentId,
|
||||
ProcessId:res.ProcessId,
|
||||
Title:res.Title,
|
||||
Message: res.Message,
|
||||
DatePublication: res.DatePublication,
|
||||
FileBase64: "data:image/jpg;base64," + res.FileBase64,
|
||||
OriginalFileName: res.OriginalFileName,
|
||||
FileExtension: 'jpeg',
|
||||
}
|
||||
this.showLoader = false;
|
||||
}, (error) => {
|
||||
this.showLoader = false;
|
||||
|
||||
if(error.status == 404) {
|
||||
this.publicationFolderService.deletePost(this.folderId, this.publicationId)
|
||||
}
|
||||
|
||||
this.goBack();
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
});
|
||||
if(error.status == 404) {
|
||||
this.publicationFolderService.deletePost(this.folderId, this.publicationId)
|
||||
}
|
||||
|
||||
this.goBack();
|
||||
this.httpErrorHandle.httpStatusHandle(error)
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
close() {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<div class="main-header">
|
||||
<div class="title-content">
|
||||
<div *ngIf="publicationFolderService.FolderDetails[folderId]" class="div-title width-100 flex-grow-1">
|
||||
<div *ngIf="publicationFolderService.FolderDetails[folderId]" class="div-title d-flex width-100 flex-grow-1 justify-content-between">
|
||||
<div class="title">
|
||||
<ion-label>{{publicationFolderService.FolderDetails[folderId].Description}}</ion-label>
|
||||
</div>
|
||||
|
||||
<div class="actions-icon">
|
||||
<div class="actions-icon align-baseline">
|
||||
<!-- <ion-icon (click)="AddPublication('1',item.ProcessId)" slot="end" src='assets/images/icons-add-photo.svg'></ion-icon> -->
|
||||
<button *ngIf="p.userPermission([p.permissionList.Actions.editPost])" class="btn-no-color" (click)="openEditPublication(publicationFolderService.FolderDetails[folderId].ProcessId)">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
|
||||
@@ -21,7 +21,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-body width-100" *ngIf="publicationFolderService.FolderDetails[folderId]?.DateBegin != null">
|
||||
<p class="item-content-detail">{{publicationFolderService.FolderDetails[folderId].Detail}}</p>
|
||||
<p class="item-content-date">{{ publicationFolderService.FolderDetails[folderId].DateBegin | date: 'dd-MM-yyyy HH:mm'}}</p>
|
||||
</div>
|
||||
|
||||
@@ -36,6 +35,8 @@
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
<div class="main-container px-20" *ngIf="publicationFolderService.FolderDetails[folderId]">
|
||||
<p class="item-content-detail">{{publicationFolderService.FolderDetails[folderId].Detail}}</p>
|
||||
|
||||
<ion-card *ngFor="let publication of publicationFolderService.publicationList[folderId] let i = index"
|
||||
(click)="viewPublicationDetail(publication.DocumentId)">
|
||||
<ion-card-content>
|
||||
|
||||
Reference in New Issue
Block a user