This commit is contained in:
ivan gomes
2021-11-16 16:00:14 +01:00
parent 24c07e3dea
commit 0bc7bfa21d
501 changed files with 7317 additions and 4966 deletions
+29 -13
View File
@@ -22,7 +22,7 @@
<!-- Calendar is here -->
<div class="calendar-segment-{{profile}}" [class.calendar-segment-pr-force]="loggeduser.Profile =='PR'">
<div class="calendar-container" [style.height]="calendarHeight">
<div class="calendar-container" [style.height]="calendarHeight ">
<ion-row class="ion-justify-content-between calendar-tool-tip">
<ion-row class="ion-align-items-center">
@@ -30,7 +30,9 @@
<div class="arrow cursor-pointer">
<button (click)="back()" class="btn-no-color" >
<ion-icon slot="icon-only" src="assets/images/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src="assets/images/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-left.svg"></ion-icon>
</button>
</div>
@@ -39,8 +41,10 @@
<h2 class="capitaliseText d-flex align-center">
{{ viewTitle }}
<div class="cursor-pointer" (click)="dropdownScrollWeal = true; onDropDownScrollWeal()">
<ion-icon style="font-size: 19pt;" src="assets/images/icons-arrow-arrow-down.svg" ></ion-icon>
<div (click)="dropdownScrollWeal = true; onDropDownScrollWeal()" class="cursor-pointer">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " style="font-size: 19pt;" src="assets/images/icons-arrow-arrow-down.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " style="font-size: 19pt;" src="assets/images/theme/gov/icons-arrow-arrow-down.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " style="font-size: 19pt;" src="assets/images/theme/gov/icons-arrow-arrow-down.svg" ></ion-icon>
</div>
</h2>
@@ -99,7 +103,9 @@
</div> -->
<!-- Move forward one screen of the slides -->
<div (click)="next()" class="arrow cursor-pointer">
<ion-icon slot="icon-only" src="assets/images/icons-calendar-arrow-right.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="icon-only" src="assets/images/icons-calendar-arrow-right.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-right.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " slot="icon-only" src="assets/images/theme/gov/icons-calendar-arrow-right.svg"></ion-icon>
</div>
</ion-row>
@@ -113,12 +119,16 @@
<ion-icon class="right-icons d-md-none" src="assets/images/icons-profile-calendar-pr.svg"></ion-icon>
</button>
<button class="btn-no-color" (click)="viewEventsToApprove()" *ngIf="loggeduser.Profile == 'MDGPR'">
<ion-icon class="right-icons" src="assets/images/icons-received-event.svg"></ion-icon>
<button class="btn-no-color cursor-pointer" (click)="viewEventsToApprove()" *ngIf="loggeduser.Profile == 'MDGPR'">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-received-event.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="right-icons" src="assets/images/theme/gov/icons-received-event.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="right-icons" src="assets/images/theme/tribunal/icons-received-event.svg"></ion-icon>
</button>
<button class="btn-no-color cy-add-event" (click)="clearContact();openAddEvent();">
<ion-icon class="right-icons" src="assets/images/icons-add-new-event.svg" ></ion-icon>
<button class="btn-no-color cy-add-event cursor-pointer" (click)="clearContact();openAddEvent();">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="right-icons" src="assets/images/icons-add.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="right-icons" src="assets/images/theme/gov/icons-add.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="right-icons" src="assets/images/theme/tribunal/icons-add.svg" ></ion-icon>
</button>
</ion-row>
@@ -180,10 +190,14 @@
<ion-row class="timeline-header pb-0 ion-justify-content-between ion-align-items-center currente-date-timelien">
<ion-row class="timeline-date align-center">
<button class="btn-no-color" *ngIf="showCalendar" (click)="calendarHeight='75px';showCalendar=false">
<ion-icon class="collaps btn-no-color" src="assets/images/icons-collaps-up.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps btn-no-color" src="assets/images/icons-collaps-up.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps btn-no-color" src="assets/images/theme/gov/icons-collaps-up.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="collaps btn-no-color" src="assets/images/theme/tribunal/icons-collaps-up.svg" ></ion-icon>
</button>
<button class="btn-no-color" *ngIf="!showCalendar" (click)="calendarHeight='320px';showCalendar=true">
<ion-icon class="collaps btn-no-color" src="assets/images/icons-collaps-down.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps btn-no-color" src="assets/images/icons-collaps-down.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps btn-no-color" src="assets/images/theme/gov/icons-collaps-down.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="collaps btn-no-color" src="assets/images/theme/tribunal/icons-collaps-down.svg" ></ion-icon>
</button >
@@ -195,7 +209,9 @@
<div class="filter-name">{{timelineFilterState}}</div>
<!-- Icon -->
<button (click)="showTimelineFilterState=!showTimelineFilterState" class="arrow-down btn-no-color">
<ion-icon src="assets/images/icons-arrow-arrow-down.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " style="font-size: 19pt;" src="assets/images/icons-arrow-arrow-down.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " style="font-size: 19pt;" src="assets/images/theme/gov/icons-arrow-arrow-down.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " style="font-size: 19pt;" src="assets/images/theme/gov/icons-arrow-arrow-down.svg" ></ion-icon>
</button>
<!-- List -->
@@ -323,7 +339,7 @@
<div *ngFor="let event of events.value" class="EventListBox" >
<div class="d-flex content-pr-{{event.event.CalendarName}} mt-10 cursor-pointer item hover" (click)="eventClicked(event)">
<div class="d-flex content-pr-{{event.event.CalendarName}} mt-10 cursor-pointer item-hover" (click)="eventClicked(event)">
<div class="schedule-time" *ngIf="!event.event.IsAllDayEvent">
<div *ngIf="!event.endMany && !event.middle" class="time-start">{{event.event.StartDate | date: 'HH:mm'}}</div>
+47 -22
View File
@@ -15,7 +15,7 @@
.monthview-current{
/* background-color: red; */
border-bottom: 1px solid lightskyblue !important;
border-bottom: 1px solid rgb(158, 250, 135) !important;
}
.monthview-selected {
/* background-color: lightskyblue !important; */
@@ -255,7 +255,7 @@ td.monthview-primary-with-event {
.div-top-header{
width: 400px;
margin: 0 auto;
background-color: #0782c9;
background-color: #07c941;
padding-top: 15px;
border: 0!important;
@@ -284,8 +284,6 @@ td.monthview-primary-with-event {
height: 100%;
font-family: Roboto;
margin: 0 auto;
border-top-left-radius: 25px;
border-top-right-radius: 25px;
background-color: #fff;
overflow:auto;
/* padding: 25px 20px 0 20px; */
@@ -395,6 +393,7 @@ td.monthview-primary-with-event {
.currente-date-timelien{
cursor: pointer;
padding: 10px 20px;
.timeline-date{
font-size: 15px;
@@ -409,10 +408,10 @@ td.monthview-primary-with-event {
font-weight: normal;
ion-icon{
font-size: 35px;
color: #0d89d1;
color: var(--title-text-color);
}
.filter-name{
color: #0d89d1;
color: var(--title-text-color);
font-family: Roboto;
font-size: 15px;
margin-right: 25px;
@@ -437,7 +436,12 @@ td.monthview-primary-with-event {
font-weight: normal;
}
li.active{
background-color: rgba(66, 185, 254, 0.1);
background-color: var(--mat-selected) !important;
color: white;
}
li:hover:not(.active){
background-color: var(--mat-selected-hover);
}
}
}
@@ -512,7 +516,7 @@ td.monthview-primary-with-event {
font-family: Roboto;
font-size: 15px;
font-weight: bold;
color: #0d89d1;
color: var(--title-text-color);
}
.description p{
@@ -572,12 +576,6 @@ td.monthview-primary-with-event {
}
.calendar-timeline{
height: 100%;
background-color: white;
border-top-left-radius: 25px;
}
.calendar-border{
background: #ebebeb;
@@ -602,7 +600,7 @@ td.monthview-primary-with-event {
overflow: hidden;
.calendar-timeline{
border-top-right-radius: 24px;
border-top-right-radius: 0px;
width: calc(100%);
overflow: hidden;
@@ -618,11 +616,6 @@ td.monthview-primary-with-event {
}
}
.event-details{
width: 40%;
background: white;
border-top-right-radius: 25px;
}
.event-details{
@@ -636,6 +629,7 @@ td.monthview-primary-with-event {
.calendar-timeline{
border-top-right-radius: 0px;
border-top-left-radius: 25px;
width: calc(100% - 40%);
border-right: 1px solid #d8d8d8;
@@ -751,13 +745,13 @@ app-approve-event{
}
li.active {
background-color: #42b9fe !important;
background-color: var(--mat-selected) !important;
color: white;
}
li:hover{
cursor: pointer;
background-color: #e6f6ff75 ;
background-color: var(--mat-selected-hover) ;
}
}
@@ -769,4 +763,35 @@ app-approve-event{
height: 100%;
width: 100%;
z-index: 99;
}
@media only screen and (min-width: 1225px) {
.calendar-timeline{
height: 100%;
background-color: white;
border-top-left-radius: 25px;
}
.event-details{
width: 40%;
background: white;
border-top-right-radius: 0px;
}
}
@media only screen and (min-width: 321px) {
.calendar-timeline{
height: 100%;
background-color: white;
border-top-left-radius: 0px;
}
.event-details{
width: 40%;
background: white;
border-top-right-radius: 25px;
}
}
+6 -2
View File
@@ -31,6 +31,7 @@ import { ChangeProfileService } from 'src/app/services/change-profile.service';
import { SqliteService } from 'src/app/services/sqlite.service';
import { BackgroundService } from 'src/app/services/background.service';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
@@ -176,7 +177,8 @@ export class AgendaPage implements OnInit {
private changeProfileService: ChangeProfileService,
private sqliteservice: SqliteService,
private platform: Platform,
private backgroundservice: BackgroundService
private backgroundservice: BackgroundService,
public ThemeService: ThemeService
) {
this.dateAdapter.setLocale('es');
@@ -733,6 +735,7 @@ export class AgendaPage implements OnInit {
Profile: profile
}
this.sqliteservice.addEvent(event)
});
}
}
@@ -949,7 +952,7 @@ export class AgendaPage implements OnInit {
// });
this.myCal.update();
this.myCal.loadEvents();
// this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
}
this.cloneAllmobileComponent();
@@ -1144,6 +1147,7 @@ export class AgendaPage implements OnInit {
async closeComponentEditEventOrAdd() {
if (this.IsEvent = 'edit') {
// this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
this.eventClicked(this.viewingEventObject);
} else if (this.IsEvent = 'add') {
this.cloneAllmobileComponent();
@@ -205,7 +205,8 @@
</ion-item>
</div>
<div class="add-people">
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
</div>
</div>
</div>
@@ -226,7 +227,8 @@
</ion-item>
</div>
<div class="add-people">
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
</div>
</div>
</div>
@@ -248,7 +250,8 @@
<div class="d-flex container-div width-100 ion-item-container-no-border" >
<ion-label (click)="getDoc()" class="cursor-pointer">
<div class="attach-icon">
<ion-icon src="assets/images/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "src="assets/images/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
</div>
<div class="attach-document">
<ion-label>Adicionar documentos</ion-label>
@@ -272,7 +275,6 @@
<span class="app-name span-left" *ngIf="document.ApplicationId == 386"> Acções Presidenciais </span>
<span class="app-name span-left" *ngIf="document.ApplicationId == 361 "> Arquivo Despacho Electrónico </span>
<!-- <span class="span-right" *ngIf="document.CreateDate"> {{document.CreateDate | date: 'dd-MM-yyyy HH:mm'}} </span> -->
</p>
</ion-label>
</ion-item>
@@ -83,7 +83,8 @@
float: right;
overflow: auto;
font-size: 25px;
padding: 10px;
height: 45px;
display: flex;
}
.list-people-title{
/* font-size: 13px; */
@@ -91,7 +92,7 @@
}
.attach-document{
font-size: 15px;
color: #0d89d1;
color: var(--title-text-color);;
margin: 5px 5px 5px 10px;
padding: 5px;
float: left;
@@ -104,7 +105,7 @@
.attach-title-item{
width: 100%;
font-size: 15px;
color:#0d89d1;
color:var(--title-text-color);
}
/* SPAN */
@@ -11,6 +11,8 @@ import { ToastService } from 'src/app/services/toast.service';
import { Event } from '../../../models/event.model';
import { AttendeesPageModal } from '../../events/attendees/attendees.page';
import { SearchPage } from '../../search/search.page';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-edit-event',
@@ -56,6 +58,7 @@ export class EditEventPage implements OnInit {
private attachmentsService: AttachmentsService,
private toastService: ToastService,
private router: Router,
public ThemeService: ThemeService
) {
this.postEvent = new Event();
@@ -2,7 +2,9 @@
<div class="header-content">
<div hidden class="header-icon-left">
<button class="btn-no-color cursor-pointer" (click)="close()">
<ion-icon src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
</button>
</div>
<div class="header-title">
@@ -1,5 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-emend-message-modal',
@@ -11,6 +12,7 @@ export class EmendMessageModalPage implements OnInit {
constructor(
private modalController: ModalController,
public ThemeService: ThemeService
) {
this.emendMessage = '';
}
@@ -1,7 +1,8 @@
<ion-content class="wrapper">
<div class="arrow-right" (click)="closePopover()">
<button class="btn-no-color">
<ion-icon slot="end" class="arrow-right-icon" src='assets/images/icons-arrow-arrow-right.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "slot="end" class="arrow-right-icon" src='assets/images/icons-arrow-arrow-right.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" class="arrow-right-icon" src='assets/images/theme/gov/icons-calendar-arrow-right.svg'></ion-icon>
</button>
</div>
<div class="buttons">
@@ -8,6 +8,7 @@ import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.p
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { EmendMessageModalPage } from '../emend-message-modal/emend-message-modal.page';
import { Location } from '@angular/common';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-event-actions-popover',
@@ -26,7 +27,8 @@ export class EventActionsPopoverPage implements OnInit {
private popoverController: PopoverController,
private animationController: AnimationController,
private toastService: ToastService,
private location: Location) {
private location: Location,
public ThemeService: ThemeService) {
this.serialNumber = this.navParams.get('serialNumber');
this.instanceId = this.navParams.get('InstanceId');
}
@@ -193,7 +193,7 @@
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
</div>
<div class="ion-input-class-no-height" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom ">
<div class="ion-input-class-no-height cursor-pointer" (click)="addParticipants()" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom ">
<div class="list-people">
<ion-item lines="none">
<ion-list>
@@ -208,8 +208,9 @@
</ion-list>
</ion-item>
</div>
<div (click)="addParticipants()" class="add-people cursor-pointer">
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<div class="add-people cursor-pointer">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
</div>
</div>
</div>
@@ -220,7 +221,7 @@
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-people-cc.svg"></ion-icon>
</div>
<div class="ion-input-class-no-height">
<div class="ion-input-class-no-height cursor-pointer" (click)="addParticipantsCC()">
<div class="list-people">
<ion-item lines="none">
<ion-list>
@@ -235,8 +236,9 @@
</ion-list>
</ion-item>
</div>
<div (click)="addParticipantsCC()" class="add-people cursor-pointer">
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<div class="add-people cursor-pointer">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
</div>
</div>
</div>
@@ -258,7 +260,8 @@
<div class="ion-item-container-no-border cursor-pointer" (click)="getDoc()">
<ion-label>
<div class="attach-icon">
<ion-icon src="assets/images/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
</div>
<div class="attach-document">
<ion-label>Adicionar documentos</ion-label>
@@ -100,7 +100,8 @@ ion-content{
float: right;
overflow: auto;
font-size: 25px;
padding: 10px;
height: 45px;
display: flex;
}
.list-people-title{
/* font-size: 13px; */
@@ -108,7 +109,7 @@ ion-content{
}
.attach-document{
font-size: 15px;
color: #0d89d1;
color: var(--title-text-color);
margin: 5px 5px 5px 10px;
padding: 5px;
float: left;
@@ -121,7 +122,7 @@ ion-content{
.attach-title-item{
width: 100%;
font-size: 15px;
color:#0d89d1;
color:var(--title-text-color);
}
/* SPAN */
.span-left{
@@ -15,6 +15,7 @@ import { SearchPage } from '../../search/search.page';
import { ThemePalette } from '@angular/material/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { EventRecurrence } from 'src/app/models/agenda/eventrecurrence.model';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
@@ -67,6 +68,7 @@ export class NewEventPage implements OnInit {
private animationController: AnimationController,
private toastService: ToastService,
userService: AuthService,
public ThemeService: ThemeService
) {
this.loggeduser = userService.ValidatedUser;
this.postEvent = new Event();
@@ -279,12 +281,12 @@ export class NewEventPage implements OnInit {
});
this.toastService.successMessage()
this.toastService._successMessage()
this.modalController.dismiss(this.postEvent);
} catch (error) {
this.toastService.badRequest()
this.toastService._badRequest()
} finally {
loader.remove()
}
@@ -15,7 +15,8 @@
<div class="title-content d-flex justify-between width-100">
<div class="left">
<button class="btn-no-color d-flex align-center" (click)="goBack()">
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</button>
</div>
<div class="middle">
@@ -23,7 +24,8 @@
</div>
<div class="menu-options d-flex">
<button class="btn-no-color" (click)="editEvent()">
<ion-icon class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon>
</button>
<button class="btn-no-color" (click)="deleteEvent()">
<ion-icon class="delete" name="trash-sharp"></ion-icon>
@@ -97,7 +99,8 @@
</div>
<div (click)="docIndex(i);LoadDocumentDetails()" class="cursor-pointer" style="width: 35px; height: 41px;" autoHide="false">
<ion-icon src="assets/images/icons-menu.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg" ></ion-icon>
</div>
</ion-label>
@@ -185,7 +185,7 @@ ion-menu{
}
.attach-document{
font-size: 15px;
color: #0d89d1;
color: var(--title-text-color);
margin: 5px 5px 5px 10px;
padding: 5px;
float: left;
@@ -198,7 +198,7 @@ ion-menu{
.attach-title-item{
width: 100%;
font-size: 15px;
color:#0d89d1;
color:var(--title-text-color);
}
/* SPAN */
.span-left{
@@ -19,6 +19,8 @@ import { ExpedientTaskModalPage } from '../../gabinete-digital/expediente/expedi
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { BackgroundService } from 'src/app/services/background.service';
import { StorageService } from 'src/app/services/storage.service';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-view-event',
@@ -68,7 +70,8 @@ export class ViewEventPage implements OnInit {
public platform: Platform,
private sqliteservice: SqliteService,
private backgroundservice: BackgroundService,
private storage: StorageService
private storage: StorageService,
public ThemeService: ThemeService
) {
this.isEventEdited = false;
this.loadedEvent = new Event();
@@ -168,9 +171,9 @@ export class ViewEventPage implements OnInit {
loader.remove()
}, (error) => {
console.log('errorstatus',error.status)
console.log('errorstatus ss',error.status)
if (error.status == 0) {
if (error.status === 0) {
this.getFromDb();
} else {
this.toastService.badRequest('Este evento já não existe na sua agenda')
@@ -202,6 +205,8 @@ export class ViewEventPage implements OnInit {
() => {
loader.remove();
});
loader.remove();
}
@@ -418,8 +423,9 @@ export class ViewEventPage implements OnInit {
const loader = this.toastService.loading();
this.sqliteservice.getEventById(this.eventId).then((event) => {
let arrayevent = [];
console.log('EVENT ATTENDEES',event[0].Attendees)
let elemet = {
Attendees: JSON.parse(event[0].Attendees) || "",
Attendees: (typeof JSON.parse(event[0].Attendees) === 'undefined') ? "" : JSON.parse(event[0].Attendees),
Body: JSON.parse(event[0].Body) || "",
CalendarId: event[0].CalendarId,
CalendarName: event[0].CalendarName,
+20 -9
View File
@@ -8,7 +8,7 @@
<ion-refresher-content>
</ion-refresher-content>
</ion-refresher>
<div class="main-content d-flex height-100">
<div class="main-content d-flex height-100 border-t-radius">
<!-- Aside left -->
<div class="aside-wrapper d-flex flex-column flex-grow-1">
<!-- <p class="text-center mt-0 aside-title px-20">Chat</p> -->
@@ -18,13 +18,15 @@
</div>
<div class="div-icon">
<button class="btn-no-color" (click)="openContactsPage()">
<ion-icon slot="end" src="assets/images/icons-chat-new-conversation.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src="assets/images/icons-chat-new-conversation.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src="assets/images/theme/gov/icons-chat-new-conversation.svg"></ion-icon>
</button>
<button class="btn-no-color" (click)="openNewGroupPage()">
<ion-icon slot="end" src="assets/images/icons-chat-new-group.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src="assets/images/icons-chat-new-group.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src="assets/images/theme/gov/icons-chat-new-group.svg" ></ion-icon>
</button>
<button *ngIf="hideRefreshBtn" class="btn-no-color" (click)="refreshing()">
<ion-icon class="title-icon" name="reload-circle"></ion-icon>
<ion-icon class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
</div>
</div>
@@ -46,11 +48,13 @@
*ngFor="let dm of userDirectMessages"
[class.item-active]="dm._id == idSelected">
<div class="item-icon">
<ion-icon class="icon" slot="start" src="assets/images/icons-chat-chat-40.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon" slot="start" src="assets/images/icons-chat-chat-40.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && dm._id != idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-chat-40.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && dm._id == idSelected " class="icon" slot="start" src="assets/images/theme/gov/icons-chat-chat-40-hover.svg"></ion-icon>
</div>
<div [class.highlight]="dm._id =='cjFv5XfreKz5j3fWW'"
(click)="openMessagesPage(dm._id)"
class="item-content flex-grow-1"><!-- (click)="openMessages(dm)" -->
class="item-content flex-grow-1 cursor-pointer"><!-- (click)="openMessages(dm)" -->
<div class="item-title-time">
<div class="item-title" [class.item-title-active]="dm._id == idSelected">
<ion-label *ngFor="let user of dm.uids">
@@ -88,15 +92,22 @@
[class.item-active]="group._id ==idSelected"
class="item item-hover d-flex">
<div class="item-icon">
<ion-icon class="icon" slot="start" src="assets/images/icons-chat-group-chat-40.svg"></ion-icon>
<!-- <ion-icon class="icon" slot="start" src="assets/images/icons-chat-group-chat-40.svg"></ion-icon> -->
<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">
(click)="openGroupMessagesPage(group._id)" class="item-content flex-grow-1 cursor-pointer">
<div class="item-title-time">
<div class="item-title" [class.item-title-active]="group._id ==idSelected">
<ion-label>{{group.name.split('-').join(' ')}}</ion-label>
</div>
<div class="item-date" [class.item-date-active]="group._id ==idSelected" *ngIf="group.lastMessage">{{showDateDuration(group._updatedAt)}}</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" [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>
+4 -6
View File
@@ -38,8 +38,6 @@ ion-content{
font-family: Roboto;
margin: 0 auto;
background-color: #fff;
border-top-left-radius: 25px;
border-top-right-radius: 25px;
overflow: auto;
@@ -98,16 +96,16 @@ ion-content{
margin-top: 10px;
}
.item-title{
width: calc(100% - 75px);
width: calc(100% - 90px);
float: left;
font-size: 15px;
color: #0d89d1;
color: var(--title-text-color);
}
.item-title-active{
color: #fff;
}
.item-date{
width: 75px;
width: 90px;
float: right;
font-size: 13px;
color: #797979;
@@ -137,7 +135,7 @@ ion-content{
.item-active{
color: #fff !important;
background-color: #42b9fe !important;
background-color: var(--gabinete-active-hove-background) !important;
}
@media only screen and (min-width: 701px) {
.main-content{
+30 -11
View File
@@ -26,8 +26,11 @@ import { NavigationStart, NavigationEnd, Router } from '@angular/router';
import { EventPerson } from 'src/app/models/eventperson.model';
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
import { environment } from 'src/environments/environment';
import { NotificationsService } from 'src/app/services/notifications.service';
//import { NotificationsService } from 'src/app/services/notifications.service';
import { TimeService } from 'src/app/services/functions/time.service';
import { ThemeService } from 'src/app/services/theme.service'
import { DataService } from 'src/app/services/data.service';
@Component({
selector: 'app-chat',
@@ -82,12 +85,6 @@ export class ChatPage implements OnInit {
@Output() getRoomInfo;
/*
Websockets variables
*/
subject: any;
public messages: Subject<any>;
@@ -119,6 +116,9 @@ export class ChatPage implements OnInit {
private resolver: ComponentFactoryResolver,
private route: Router,
private timeService: TimeService,
public ThemeService: ThemeService,
private dataService:DataService,
private router: Router,
){
this.loggedUserChat = authService.ValidatedUserChat['data'];
this.headers = new HttpHeaders();
@@ -153,6 +153,21 @@ export class ChatPage implements OnInit {
console.log(t);
this.setStatus('away');
if(this.dataService.get("newGroup")){
this.openNewGroupPage();
}
this.router.events.forEach((event) => {
if (event instanceof NavigationStart && event.url.startsWith('/home/chat')) {
if (window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/chat')) {
alert('OIII')
} else {
if(this.dataService.get("newGroup")){
this.openNewGroupPage();
}
}
}
});
}
ngOnDestroy(){
@@ -382,7 +397,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);
@@ -400,7 +415,7 @@ hideRefreshButton(){
//console.log('TIMER');
//Check if modal is opened
if(this.segment == "Contactos" && this.showMessages != true){
await new Promise(resolve => setTimeout(resolve, 2000));
await new Promise(resolve => setTimeout(resolve, 1000));
await this.getDirectMessages();
//console.log('Timer contactos list running')
}
@@ -420,6 +435,10 @@ hideRefreshButton(){
return this.timeService.showDateDuration(start);
}
countDownDate(date:any, roomId:string){
return this.timeService.countDownDate(date, roomId);
}
async getChatMembers(){
//return await this.chatService.getMembers(roomId).toPromise();
this.chatService.getAllUsers().subscribe(res=> {
@@ -432,7 +451,7 @@ hideRefreshButton(){
async getGroups(event?){
this.result = this.chatService.getAllPrivateGroups().subscribe(async (res:any)=>{
//console.log(res);
if(res.groups != 200){
this.privateGroups = res.groups;
@@ -452,7 +471,7 @@ hideRefreshButton(){
else {
//Check if modal is opened
if(this.segment == "Grupos" && this.showGroupMessages != true){
await new Promise(resolve => setTimeout(resolve, 2000));
await new Promise(resolve => setTimeout(resolve, 1000));
await this.getGroups();
//console.log('Timer groups list running')
}
@@ -4,7 +4,8 @@
<div class="title-content width-100">
<div class="left">
<button class="btn-no-color" (click)="close()">
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</button>
</div>
<div class="middle">
@@ -1,6 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { ModalController, NavParams, PickerController } from '@ionic/angular';
import { ChatService } from 'src/app/services/chat.service';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-edit-group',
@@ -21,6 +22,7 @@ export class EditGroupPage implements OnInit {
private pickerController: PickerController,
private chatService: ChatService,
private navParams: NavParams,
public ThemeService: ThemeService
) {
this.roomId = this.navParams.get('roomId');
}
@@ -3,14 +3,15 @@
<div class="main-header">
<div class="title-content width-100">
<div class="back-icon">
<button class="btn-no-color" (click)="close()">
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<button class="btn-no-color cursor-pointer" (click)="close()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</button>
</div>
<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>
@@ -68,7 +68,7 @@
--border-radius: 5px;
--box-shadow: none;
overflow: auto;
--icon-color:#0d89d1;
--icon-color: var(--font-awesome);
}
}
@@ -120,14 +120,14 @@
}
.members-checkbox ion-checkbox{
--border-color: #0d89d1;
--background-checked:#0d89d1;
--border-color: var(--title-text-color);
--background-checked:var(--title-text-color);
float: left;
}
.item-checkbox ion-checkbox{
--border-color: #0d89d1;
--background-checked:#0d89d1;
--border-color: var(--title-text-color);
--background-checked:var(--title-text-color);
float: left;
}
@@ -137,7 +137,7 @@
width: 330px;
padding-left: 10px;
font-size: 15px;
color: #0d89d1;
color: var(--title-text-color);
float: left;
}
.item-checkbox ion-icon, .members-checkbox ion-icon{
@@ -6,6 +6,7 @@ import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service';
import { NewGroupPage } from '../../new-group/new-group.page';
import { GroupMessagesPage } from '../group-messages.page';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-group-contacts',
@@ -37,6 +38,7 @@ export class GroupContactsPage implements OnInit {
private chatService: ChatService,
private authService: AuthService,
private navParams: NavParams,
public ThemeService: ThemeService
)
{
this.loggedUser = authService.ValidatedUserChat['data'];
@@ -57,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,
@@ -119,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];
@@ -133,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();
@@ -141,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;
}
@@ -192,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
@@ -6,7 +6,7 @@
<div class="left">
<button class="btn-no-color" (click)="close()">
<!-- <ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> -->
<fa-icon icon="chevron-left" class="header-top-btn"></fa-icon>
<fa-icon icon="chevron-left" class="header-top-btn font-awesome-1"></fa-icon>
</button>
</div>
<div class="middle-container" *ngIf="!showMessageOptions">
@@ -20,13 +20,14 @@
<div class="right">
<button class="btn-no-color" (click)="openOptions()">
<!-- <ion-icon src="assets/images/icons-menu.svg"></ion-icon> -->
<fa-icon icon="ellipsis-v" class="header-top-btn"></fa-icon>
<fa-icon icon="ellipsis-v" class="header-top-btn font-awesome-1"></fa-icon>
</button>
</div>
</div>
<div (click)="addContacts()" class="header-bottom">
<div class="header-bottom-icon">
<ion-icon src="assets/icon/icons-user.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/icon/icons-user.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/icon/theme/gov/icons-user.svg"></ion-icon>
</div>
<div class="header-bottom-contacts">
<ion-label class="contacts-list" *ngFor="let member of members" >
@@ -34,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>
@@ -124,7 +129,8 @@
<div class="container width-100 d-flex">
<div>
<button class="btn-no-color" (click)="openChatOptions()">
<ion-icon class="chat-icon-options" src="assets/images/icons-add-new-event.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-options" src="assets/images/icons-add.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-options" src="assets/images/theme/gov/icons-add.svg"></ion-icon>
</button>
</div>
<div class="message-box width-80">
@@ -137,10 +143,12 @@
</div>
<div>
<button *ngIf="message" class="btn-no-color" (click)="sendMessage()">
<ion-icon class="chat-icon-send" src="assets/icon/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
</button>
<button *ngIf="!message" class="btn-no-color">
<ion-icon class="chat-icon-send" src="assets/icon/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
</button>
</div>
</div>
@@ -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;
@@ -19,6 +19,7 @@ import { environment } from 'src/environments/environment';
import { NewEventPage } from '../../agenda/new-event/new-event.page';
import { EventPerson } from 'src/app/models/eventperson.model';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-group-messages',
@@ -55,6 +56,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
longPressActive = false;
showMessageOptions = false;
selectedMsgId:string;
roomCountDownDate:any;
@ViewChild('scrollMe') private myScrollContainer: ElementRef;
@@ -73,6 +75,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
private fileToBase64Service: FileToBase64Service,
private fileService: FileService,
private toastService: ToastService,
public ThemeService: ThemeService
) {
this.loggedUserChat = authService.ValidatedUserChat['data'];
this.isGroupCreated = true;
@@ -123,6 +126,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
ngAfterViewInit() {
this.scrollChangeCallback = () => this.onContentScrolled(event);
window.addEventListener('scroll', this.scrollChangeCallback, true);
this.roomCountDownDate = this.timeService.countDownDate(this.room.customFields.countDownDate, this.room._id);
}
handlePress(id?:string){
@@ -180,6 +184,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.countDownDateTimer(this.room.customFields.countDownDate, this.room._id);
}
this.getGroupContacts(this.room);
this.loadGroupMessages(this.room);
this.showLoader = false;
@@ -252,33 +259,10 @@ 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){
this.roomCountDownDate = this.timeService.countDownDate(date, roomId);
return this.timeService.countDownDateTimer(date, roomId);
}
addZero(i) {
@@ -2,9 +2,10 @@
<ion-toolbar class="header-toolbar">
<div class="main-header">
<div class="title-content width-100">
<div class="back-icon">
<button class="btn-no-color" (click)="close()">
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<div class="back-icon ">
<button class="btn-no-color cursor-pointer" (click)="close()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</button>
</div>
<div class="div-title">
@@ -34,7 +35,7 @@
<ion-label>{{header}}</ion-label>
</div>
<div (click)="createRoom(user.username)" *virtualItem="let user" class="item-user">
<div (click)="createRoom(user.username)" *virtualItem="let user" class="item-user cursor-pointer">
<p>{{user.name}}</p>
<span class="icon">
<ion-icon class="{{user.status}}" slot="end" name="ellipse"></ion-icon>
@@ -71,7 +71,7 @@
--border-radius: 5px;
--box-shadow: none;
overflow: hidden;
--icon-color:#0d89d1;
--icon-color: var( --font-awesome);
}
}
@@ -107,7 +107,7 @@
margin: 0 !important;
width: 90%;
font-size: 15px;
color: #0d89d1;
color: var(--title-text-color);
float: left;
}
.item-user .icon{
@@ -5,6 +5,7 @@ import { AuthService } from 'src/app/services/auth.service';
import { ChatService } from 'src/app/services/chat.service';
import { GroupMessagesPage } from '../../group-messages/group-messages.page';
import { MessagesPage } from '../messages.page';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-contacts',
@@ -28,6 +29,7 @@ export class ContactsPage implements OnInit {
private http: HttpClient,
private chatService: ChatService,
private authService: AuthService,
public ThemeService: ThemeService
)
{
this.loggedUser = authService.ValidatedUserChat['data'];
+28 -10
View File
@@ -8,7 +8,7 @@
<div class="left">
<button class="btn-no-color" (click)="close()">
<!-- <ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon> -->
<fa-icon icon="chevron-left" class="header-top-btn"></fa-icon>
<fa-icon icon="chevron-left" class="header-top-btn font-awesome-1"></fa-icon>
</button>
</div>
<div class="middle-container" *ngIf="!showMessageOptions">
@@ -23,13 +23,15 @@
</div>
<div hidden class="right">
<button class="btn-no-color" (click)="openMessagesOptions()">
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
</button>
</div>
</div>
<div hidden class="header-bottom" (click)="addContacts()">
<div class="header-bottom-icon">
<ion-icon src="assets/icon/icons-user.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/icon/icons-user.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/icon/theme/gov/icons-user.svg"></ion-icon>
</div>
<div class="header-bottom-contacts">
<ion-label class="text-color-blue">Adicionar contacto</ion-label>
@@ -46,7 +48,6 @@
<ion-refresher-content>
</ion-refresher-content>
</ion-refresher> -->
<div (click)="handleClick()" class="messages" #scrollMe>
<div class="messages-list-item-wrapper container-width-100" *ngFor="let msg of chatMessageStore.message[roomId]; let last = last"
[class.messages-list-item-wrapper-active]="msg._id == selectedMsgId">
@@ -122,26 +123,43 @@
</ion-footer> -->
<ion-footer>
<ion-list hidden>
<ion-item (click)="playFile(storedFileNames)">
{{storedFileNames}}
</ion-item>
<ion-item (click)="playFile(storedFileNames)">
{{storedFileNames}}
</ion-item>
</ion-list>
<audio hidden controls>
<source src="https://www.tabularium.pt/file-upload/5g6DkyMC4MHcuaDyp/Audio%20record.mp3" type="audio/mpeg">
</audio>
<!-- <button (click)="startRecording()">Start Recording</button>
<button (click)="stopRecording()">Stop Recording</button> -->
<div class="container width-100 d-flex">
<div>
<button class="btn-no-color" (click)="openChatOptions()">
<ion-icon class="chat-icon-options" src="assets/images/icons-add-new-event.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-options" src="assets/images/icons-add.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-options" src="assets/images/theme/gov/icons-add.svg"></ion-icon>
</button>
</div>
<div class="width-70">
<ion-item class="ion-no-padding ion-no-margin type-message" lines="none">
<ion-textarea clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
<button hidden class="btn-no-color" (click)="notImplemented()">
<!-- <ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon> -->
<ion-textarea *ngIf="!recording" clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="message"></ion-textarea>
<ion-textarea *ngIf="recording" clearOnEdit="true" placeholder="Escrever uma mensagem" auto-grow class="message-input" rows="1" [(ngModel)]="durationDisplay"></ion-textarea>
<button hidden #recordbtn class="btn-no-color" (click)="notImplemented()">
<ion-icon slot="end" src="assets/icon/icons-chat-mic.svg"></ion-icon>
</button>
</ion-item>
</div>
<div>
<button *ngIf="message" class="btn-no-color" (click)="sendMessage()">
<ion-icon class="chat-icon-send" src="assets/icon/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
</button>
<button *ngIf="!message" class="btn-no-color">
<ion-icon class="chat-icon-send" src="assets/icon/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="chat-icon-send" src="assets/icon/theme/gov/icons-chat-send.svg"></ion-icon>
</button>
</div>
</div>
@@ -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;
+107 -64
View File
@@ -19,7 +19,10 @@ import { MessagesOptionsPage } from 'src/app/shared/popover/messages-options/mes
import { ChatMessageStore } from 'src/app/store/chat/chat-message.service';
import { ChatUserStorage } from 'src/app/store/chat/chat-user.service';
import { environment } from 'src/environments/environment';
import { ThemeService } from 'src/app/services/theme.service'
import { Filesystem, Directory, Encoding } from '@capacitor/filesystem';
import { VoiceRecorder, VoiceRecorderPlugin, RecordingData, GenericResponse, CurrentRecordingStatus } from 'capacitor-voice-recorder';
import { Haptics, ImpactStyle } from '@capacitor/haptics';
@Component({
selector: 'app-messages',
@@ -44,8 +47,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
members:any;
scrollingOnce:boolean = true;
chatMessageStore = ChatMessageStore
chatUserStorage = ChatUserStorage
chatMessageStore = ChatMessageStore;
chatUserStorage = ChatUserStorage;
private scrollChangeCallback: () => void;
currentPosition: any;
@@ -60,6 +63,13 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
task: ExpedientTaskModalPageNavParamsTask;
LoadedDocument:any = null;
recording = false;
storedFileNames = [];
durationDisplay = '';
duration = 0;
@ViewChild('recordbtn', { read: ElementRef }) recordBtn: ElementRef;
myAudio: any;
constructor(
public popoverController: PopoverController,
private modalController: ModalController,
@@ -73,12 +83,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
private fileService: FileService,
private gestureController: GestureController,
private processes: ProcessesService,
public ThemeService: ThemeService
) {
/* this.activatedRoute.paramMap.subscribe(params => {
if(params["params"].SerialNumber) {
this.roomId = params["params"].roomId;
}
}); */
this.loggedUser = authService.ValidatedUserChat['data'];
this.roomId = this.navParams.get('roomId');
@@ -90,57 +96,110 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
ngOnInit() {
/* setInterval(()=>{ */
this.load();
/* }, 9000); */
/* this.el = document.getElementById("scrollToBottom");
this.el.scrollTop = this.el.scrollHeight - this.el.scrollTop; */
this.load();
this.setStatus('online');
//this.onPressingMessage();
/* setInterval(()=>{
const gesture = this.gestureController.create({
el: this.rectangle.nativeElement,
gestureName:'my-gesture',
onMove: (detail) => { this.onMove(detail); }
})
gesture.enable();
}, 9000); */
this.loadFiles();
VoiceRecorder.requestAudioRecordingPermission();
}
ngAfterViewInit() {
this.scrollChangeCallback = () => this.onContentScrolled(event);
window.addEventListener('scroll', this.scrollChangeCallback, true);
// const gesture = this.gestureController.create({
// el: this.rectangle.nativeElement,
// gestureName:'long-press',
// onStart: () => { alert('OP') },
// /* onMove () => {
// console.log('Move');
// }, */
// onEnd: () => {
// console.log('ENNNNNDS');
// },
// })
const longpress = this.gestureController.create({
el: this.recordBtn.nativeElement,
threshold: 0,
gestureName: 'long-press',
onStart: ev => {
Haptics.impact({ style: ImpactStyle.Light })
this.startRecording();
this.calculateDuration();
},
onEnd: ev =>{
Haptics.impact({ style: ImpactStyle.Light })
this.stopRecording();
}
}, true);
longpress.enable();
}
calculateDuration(){
if(!this.recording){
this.duration = 0;
this.durationDisplay = '';
return;
}
this.duration += 1;
const minutes = Math.floor(this.duration / 60);
const seconds = (this.duration % 60).toString().padStart(2,'0');
this.durationDisplay = `${minutes}:${seconds}`;
setTimeout(()=>{
this.calculateDuration();
}, 1000)
}
async loadFiles(){
Filesystem.readdir({
path: '',
directory: Directory.Data
}).then(result =>{
console.log(result);
const temp:any[] = result.files.reverse();
this.storedFileNames = temp[0];
console.log(this.storedFileNames);
})
}
startRecording(){
if(this.recording){
return;
}
this.recording = true;
VoiceRecorder.startRecording();
}
stopRecording(){
if(!this.recording){
return;
}
this.recording = false;
VoiceRecorder.stopRecording().then(async (result: RecordingData) =>{
this.recording = false;
if(result.value && result.value.recordDataBase64){
const recordData = result.value.recordDataBase64;
console.log(recordData);
this.myAudio = recordData;
const fileName = new Date().getTime() + ".wav";
await Filesystem.writeFile({
path: fileName,
directory: Directory.Data,
data: recordData,
})
}
})
}
async playFile(fileName?:any){
const audioFile = await Filesystem.readFile({
path: fileName,
directory: Directory.Data
})
console.log(audioFile);
const base64sound = audioFile.data;
const audioRef = new Audio(`data:audio/aac;base64,${base64sound}`)
audioRef.oncanplaythrough = () => audioRef.play();
audioRef.load();
// gesture.enable();
}
handlePress(id?:string){
this.selectedMsgId = id;
this.showMessageOptions = true;
/* if(!this.showMessageOptions){
this.showMessageOptions = true;
}
else{
this.showMessageOptions = false;
} */
}
handleClick(){
@@ -148,22 +207,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.selectedMsgId = "";
}
/* onPressingMessage(){
const gesture = this.gestureController.create({
el: this.messageContainer.nativeElement,
gestureName: 'long-press',
onStart: ev =>{
this.longPressActive = true;
console.log('Pressing');
},
onEnd: ev => {
this.longPressActive = false;
console.log('Stop pressing');
}
});
gesture.enable(true);
} */
deleteMessage(msgId:string){
let body = {
"roomId": this.roomId,
@@ -272,7 +315,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
const roomId = this.roomId;
this.chatService.getRoomMessages(this.roomId).subscribe(res => {
/* console.log(res); */
console.log(res);
this.messages = res['messages'].reverse();
this.chatMessageStore.add(roomId, this.messages)
console.log(this.messages);
@@ -518,7 +561,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.messages = res['messages'].reverse();
this.chatMessageStore.add(roomId, this.messages)
console.log(this.messages);
//console.log(this.messages);
// Reconnect in one second
if(this.route.url != "/home/chat"){
console.log("Timer message stop")
@@ -527,7 +570,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
if(document.querySelector('.isMessagesChatOpened')){
await new Promise(resolve => setTimeout(resolve, 5000));
await this.serverLongPull();
console.log('Timer message running')
//console.log('Timer message running')
}
}
@@ -3,14 +3,15 @@
<div class="main-header">
<div class="title-content width-100">
<div class="back-icon">
<button class="btn-no-color" (click)="close()">
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<button class="btn-no-color cursor-pointer" (click)="close()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</button>
</div>
<div class="div-title">
<ion-label class="title">Contactos</ion-label>
</div>
<app-btn-seguinte (click)="groupMessages()"></app-btn-seguinte>
<app-btn-seguinte (click)="groupMessages()" class="cursor-pointer"></app-btn-seguinte>
</div>
</div>
</ion-toolbar>
@@ -69,7 +69,7 @@
--border-radius: 5px;
--box-shadow: none;
overflow: auto;
--icon-color:#0d89d1;
--icon-color:var(--title-text-color);
}
}
@@ -102,8 +102,8 @@ ion-content{
}
.item-checkbox ion-checkbox{
--border-color: #0d89d1;
--background-checked:#0d89d1;
--border-color: var(--title-text-color);
--background-checked:var(--title-text-color);
float: left;
}
@@ -113,7 +113,7 @@ ion-content{
width: 330px;
padding-left: 10px;
font-size: 15px;
color: #0d89d1;
color: var(--title-text-color);
float: left;
}
.item-checkbox ion-icon{
@@ -2,6 +2,7 @@ import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Component, OnInit } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { GroupMessagesPage } from '../../group-messages/group-messages.page';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-contacts',
@@ -53,6 +54,7 @@ export class ContactsPage implements OnInit {
constructor(
private modalController: ModalController,
private http: HttpClient,
public ThemeService: ThemeService
)
{
this.headers = new HttpHeaders();
@@ -4,13 +4,18 @@
<div class="title-content width-100">
<div class="left">
<button class="btn-no-color" (click)="close()">
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</button>
</div>
<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>
@@ -21,13 +26,13 @@
<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>
<div *ngIf="showDuration" class="container-div">
<div class="ion-item-class-2">
<div class="ion-item-class-2 width-100">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-duration.svg"></ion-icon>
</div>
@@ -36,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;
@@ -61,9 +61,16 @@ ion-content{
.middle{
padding: 0!important;
float: left;
width: 221px;
width:fit-content;
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 */
@@ -108,7 +115,6 @@ ion-content{
.item-container-no-border{
display: flex;
width: 360px;
margin: 25px auto;
border-radius: 5px;
align-items: center;
@@ -126,8 +132,8 @@ ion-content{
overflow: auto;
.ion-item-class-2{
width: 360px;
margin: 0px auto;
overflow: auto;
.ion-icon-class{
width: 45px;
@@ -138,7 +144,7 @@ ion-content{
}
}
.ion-input-class{
width: 315px;
width: calc(100% - 45px) !important;
height: 45px;
border: 1px solid #ebebeb;
border-radius: 5px;
+57 -18
View File
@@ -3,6 +3,8 @@ import { Component, OnInit } from '@angular/core';
import { ModalController, NavParams, PickerController, PopoverController } from '@ionic/angular';
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',
@@ -15,6 +17,7 @@ export class NewGroupPage implements OnInit {
displayDuration: any;
showDuration: boolean;
selectedDuration = ['','',''];
thedate:any;
groupName:string;
constructor(
@@ -22,8 +25,10 @@ export class NewGroupPage implements OnInit {
private popoverController: PopoverController,
private modalController: ModalController,
private navParams: NavParams,
)
{
public ThemeService: ThemeService,
private chatService: ChatService,
)
{
this.isGroupCreated = false;
this.groupName = this.navParams.get('name');
}
@@ -33,24 +38,55 @@ 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('-');
name = name.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
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
});
@@ -58,7 +94,7 @@ export class NewGroupPage implements OnInit {
await modal.present();
modal.onDidDismiss();
}
async setDuration(ev: any) {
const popover = await this.popoverController.create({
component: GroupDurationPage,
@@ -73,14 +109,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,
@@ -91,24 +130,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";
}
@@ -124,7 +163,7 @@ export class NewGroupPage implements OnInit {
value.minutes.value + " minutos";
}
}
}
}
},
},
],
@@ -178,7 +217,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');
});
@@ -14,14 +14,18 @@
<div *ngFor="let attendee of contacts;">
<ion-item (click)="selectContact(attendee)" class="cursor-pointer" lines="none" *ngIf="filterSearchList(attendee)" >
<div class="pr-10">
<ion-icon class="font-35" src="assets/images/icons-userprofile.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-default-profile.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-profile.svg"></ion-icon>
</div>
<ion-label>
<h3>{{ attendee.Name }}</h3>
<p>{{ attendee.EmailAddress }}</p>
</ion-label>
<div>
<ion-icon class="font-35" src="assets/images/icons-add-25.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-add-25.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-add-25.svg" ></ion-icon>
</div>
</ion-item>
</div>
@@ -35,7 +39,8 @@
<ion-item-sliding class="px-20">
<ion-item lines="none" *ngFor="let attendee of taskParticipants;" class="d-flex">
<div class="pr-10">
<ion-icon class="font-35" src="assets/images/icons-userprofile.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-default-profile.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-profile.svg"></ion-icon>
</div>
<ion-label>
<h3>{{ attendee.Name }}</h3>
@@ -53,7 +58,10 @@
<ion-item-sliding class="px-20">
<ion-item lines="none" *ngFor="let attendee of taskParticipantsCc;" class="d-flex">
<div class="pr-10">
<ion-icon class="font-35" src="assets/images/icons-userprofile.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-35" src="assets/images/icons-default-profile.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-35" src="assets/images/theme/gov/icons-profile.svg"></ion-icon>
</div>
<ion-label>
<h3>{{ attendee.Name }}</h3>
@@ -2,6 +2,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { EventPerson } from 'src/app/models/eventperson.model';
import { ModalController, NavParams } from '@ionic/angular';
import { ContactsService } from 'src/app/services/contacts.service';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-attendees',
@@ -25,7 +26,8 @@ export class AttendeesPageModal implements OnInit {
private modalCtrl: ModalController,
private contactsService: ContactsService,
private navParams: NavParams,
private modalController: ModalController) {
private modalController: ModalController,
public ThemeService: ThemeService) {
this.adding = this.navParams.get('adding');
this.taskParticipants = this.navParams.get('taskParticipants');
@@ -83,7 +83,8 @@
float: right;
overflow: auto;
font-size: 25px;
padding: 10px;
height: 45px;
display: flex;
}
.list-people-title{
/* font-size: 13px; */
@@ -91,7 +92,7 @@
}
.attach-document{
font-size: 15px;
color: #0d89d1;
color: var(--title-text-color);
margin: 5px 5px 5px 10px;
padding: 5px;
float: left;
+38 -1
View File
@@ -34,10 +34,26 @@
</div>
<button class="btn-no-color" [routerLink]="['/home/agenda']">
<ion-icon
*ngIf="ThemeService.currentTheme == 'default' "
class="icon-next"
slot="end"
src="assets/images/icons-arrow-circle-arrow-right.svg"
></ion-icon>
<ion-icon
*ngIf="ThemeService.currentTheme == 'gov' "
class="icon-next"
slot="end"
src="assets/images/theme/gov/icons-arrow-circle-arrow-right.svg"
></ion-icon>
<ion-icon
*ngIf="ThemeService.currentTheme == 'tribunal' "
class="icon-next"
slot="end"
src="assets/images/theme/tribunal/icons-arrow-circle-arrow-right.svg"
></ion-icon>
</button>
</div>
<div class="content overflow-y-auto flex-grow-1 height-100">
@@ -85,7 +101,26 @@
<div class="text">Correspondência por ler</div>
</div>
<button (click)="viewExpedientListPage()" class="btn-no-color cursor-pointer">
<ion-icon class="icon-next" slot="end" src="assets/images/icons-arrow-circle-arrow-right.svg"></ion-icon>
<ion-icon
*ngIf="ThemeService.currentTheme == 'default' "
class="icon-next"
slot="end"
src="assets/images/icons-arrow-circle-arrow-right.svg"
></ion-icon>
<ion-icon
*ngIf="ThemeService.currentTheme == 'gov' "
class="icon-next"
slot="end"
src="assets/images/theme/gov/icons-arrow-circle-arrow-right.svg"
></ion-icon>
<ion-icon
*ngIf="ThemeService.currentTheme == 'tribunal' "
class="icon-next"
slot="end"
src="assets/images/theme/tribunal/icons-arrow-circle-arrow-right.svg"
></ion-icon>
</button>
</div>
<div class="content overflow-y-auto flex-grow-1 height-100">
@@ -108,4 +143,6 @@
</div>
</div>
</div>
<!-- <iframe id="home-iframe" style="width: 100%;" src="/assets/www/pdfjs/web/viewer.html?file=/assets/www/pdfjs/web/compressed.tracemonkey-pldi-09.pdf.pdf"></iframe> -->
</ion-content>
+17 -12
View File
@@ -85,7 +85,7 @@ ion-toolbar{
.p-small{
font-size: 13pt;
margin-top: 13px;
color:#000;
color: var(--header-tab-text-white);
margin-right: 25px !important;
text-align: right;
/* color: #ffffff; */
@@ -182,7 +182,7 @@ ion-toolbar{
.ion-icon-location{
text-align: center;
display: block;
color: #000;
color: var(--subtitle-text-color);
font-size: 16px;
margin: 0 auto;
}
@@ -278,10 +278,9 @@ ion-toolbar{
}
.event-number{
color: white;
color: var(--header-tab-text-white);
font-family: Roboto;
font-size: 15px;
color: var(--white);
bold{
font-family: Roboto;
@@ -294,7 +293,7 @@ ion-toolbar{
font-family: Roboto;
font-size: 30px;
text-align: center;
color: var(--white);
color: var(--header-tab-text-white);
line-height: unset;
margin-top: 10px;
}
@@ -309,7 +308,7 @@ ion-toolbar{
font-size: em(25px);
font-family: Roboto;
font-weight: 300;
color: var(--white);
color: var(--header-tab-text-white);
margin-right: 7px;
}
@@ -317,7 +316,7 @@ ion-toolbar{
margin-top: 2px;
font-family: Roboto;
font-size: 15px;
color: var(--white);
color: var(--header-tab-text-white);
}
}
@@ -330,9 +329,12 @@ ion-toolbar{
.schedule {
max-width: 400px;
font-family: Roboto;
background-color: white;
box-shadow: 0 0 10px 0 rgb(0 0 0 / 7%);
border: solid 1px #e9e9e9;
//background-color: white;
background-color: var(--box-container-color);
//box-shadow: 0 0 10px 0 rgb(0 0 0 / 7%);
box-shadow: 0 0 10px 0 var(--box-border-color-shadow);
//border: solid 1px #e9e9e9;
border: solid 1px var(--box-border-color);
margin-bottom: 20px;
border-radius: 25px;
display: flex;
@@ -381,10 +383,12 @@ ion-toolbar{
//padding-bottom: 5px;
padding: 5px 20px 5px 20px;
background-color: transparent !important;
}
ion-list{
padding: 0px;
margin: 0px;
background-color: transparent !important;
.d-flex{
width: 100%;
display: flex;
@@ -398,8 +402,8 @@ ion-toolbar{
display: flex;
justify-content: space-between;
align-items: center;
background-color: transparent !important;
--background: transparent !important;
.schedule-time{
margin-right: 10px;
.time-start{
@@ -436,7 +440,8 @@ ion-toolbar{
font-family: Roboto;
font-size: 15px;
font-weight: bold;
color: #0d89d1;
//color: #0d89d1;
color: var(--title-text-color)
}
.description p{
white-space: nowrap;
+66 -26
View File
@@ -20,7 +20,7 @@ import { SqliteService } from 'src/app/services/sqlite.service';
import { NetworkConnectionService } from 'src/app/services/network-connection.service'
import { BackgroundService } from 'src/app/services/background.service';
import { momentG } from 'src/plugin/momentG';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-events',
templateUrl: './events.page.html',
@@ -78,7 +78,7 @@ export class EventsPage implements OnInit {
loggeduser: LoginUserRespose;
existingScreenOrientation: string;
/* existingScreenOrientation: string; */
constructor(
private eventService: EventsService,
@@ -95,9 +95,10 @@ export class EventsPage implements OnInit {
private sqliteservice: SqliteService,
private networkconnection: NetworkConnectionService,
private backgroundservice: BackgroundService,
public ThemeService: ThemeService
) {
this.existingScreenOrientation = this.screenOrientation.type;
console.log(this.existingScreenOrientation);
/* this.existingScreenOrientation = this.screenOrientation.type;
console.log(this.existingScreenOrientation); */
this.loggeduser = authService.ValidatedUser;
@@ -108,11 +109,14 @@ export class EventsPage implements OnInit {
// console.log('Resize event detected');
});
try {
this.sqliteservice.databaseConn();
} catch (error) {
console.log("Error creating local database: ", error)
window['zipPhoneCallback'] = function (zipphone) {
var frame = document.getElementById('home-iframe');
if(frame) {
frame['contentWindow']['postMessage']({call:'cookies', value: { cookies: {} }});
}
}
}
ngOnInit() {
@@ -162,22 +166,22 @@ export class EventsPage implements OnInit {
}
// Lock to portrait
lockToPortrait() {
/* lockToPortrait() {
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.PORTRAIT);
console.log('set');
}
} */
// Lock to landscape
lockToLandscape() {
/* lockToLandscape() {
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.LANDSCAPE);
}
} */
// Unlock screen orientation
unlockScreenOrientation() {
/* unlockScreenOrientation() {
this.screenOrientation.unlock();
}
} */
checkScreenOrientation() {
/* checkScreenOrientation() {
if (window.innerWidth < 701) {
this.lockToPortrait();
console.log('was here');
@@ -186,7 +190,7 @@ export class EventsPage implements OnInit {
else {
this.unlockScreenOrientation();
}
}
} */
async RefreshEvents() {
this.currentEvent = "";
@@ -314,6 +318,48 @@ export class EventsPage implements OnInit {
if (list.length > 0) {
list.forEach(element => {
this.sqliteservice.addEvent(element)
this.sqliteservice.getAllEvents().then((event: any[]) => {
let todayEvents = new Array()
event.forEach((element) => {
let eventObject = {
AppointmentState: element.AppointmentState,
Attachments: element.Attachments,
Attendees: element.Attendees,
CalendarId: element.CalendarId,
CalendarName: element.CalendarName,
Category: element.Category,
EndDate: element.EndDate,
EventId: element.EventId,
EventRecurrence: element.EventRecurrence,
EventType: element.EventType,
HasAttachments: element.HasAttachments,
HumanDate: element.HumanDate,
IsAllDayEvent: element.IsAllDayEvent,
IsMeeting: element.IsMeeting,
IsRecurring: element.IsRecurring,
Location: element.Location,
Organizer: element.Organizer,
Profile: element.Profile,
StartDate: element.StartDate,
Subject: element.Subject
}
todayEvents.push(eventObject);
})
console.log('JIFJSOSDJSDONS',todayEvents)
})
});
}
}
}
addProcessToDb(list) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else {
if (list.length > 0) {
list.forEach(element => {
this.sqliteservice.addProcess(element)
});
}
}
@@ -453,14 +499,7 @@ export class EventsPage implements OnInit {
LoadList() {
this.processes.GetTaskListExpediente(false).subscribe(result => {
console.log("Expediente", result);
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else {
result.forEach((element) => {
this.sqliteservice.addProcess(element)
})
}
this.addProcessToDb(result);
const ExpedienteTask = result.map(e => this.expedienteTaskPipe.transform(e))
@@ -484,12 +523,13 @@ export class EventsPage implements OnInit {
}
goToExpediente(SerialNumber: any) {
if (this.loggeduser.Profile == 'MDGPR') {
this.router.navigate(['/home/events/expediente', SerialNumber, 'events']);
/* if (this.loggeduser.Profile == 'MDGPR') {
this.router.navigate(['/home/events/expediente', SerialNumber, 'events']);
}
else if (this.loggeduser.Profile == 'PR') {
this.router.navigate(['/home/events/expedientes-pr', SerialNumber, 'events']);
}
} */
}
viewExpedientListPage() {
@@ -7,13 +7,15 @@
<div class="main-header" >
<div class="title-content width-100 d-flex justify-space-between align-center">
<div class="font-30 cursor-pointer align-center d-flex" (click)="goBack()" defaultHref="#">
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div>
<div class="middle d-flex align-center flex-grow-1">
<div class="title">{{ task.Folio}}</div>
</div>
<div class="div-icon" (click)="openOptions()">
<ion-icon class="font-25 cursor-pointer" src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-25 cursor-pointer" src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-25 cursor-pointer" src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
</div>
</div>
</div>
@@ -132,7 +132,7 @@ ion-button{
}
.attach-document{
font-size: 15px;
color: #0d89d1;
color: var(--title-text-color);
margin: 5px 5px 5px 10px;
padding: 5px;
float: left;
@@ -22,6 +22,7 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
import { Platform } from '@ionic/angular';
import { SqliteService } from 'src/app/services/sqlite.service';
import { BackgroundService } from 'src/app/services/background.service';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-despacho-pr',
@@ -59,6 +60,7 @@ export class DespachoPrPage implements OnInit {
private sqliteservice: SqliteService,
private backgroundservice: BackgroundService,
private platform: Platform,
public ThemeService: ThemeService
) {
this.activatedRoute.paramMap.subscribe(params => {
if (params["params"].SerialNumber) {
@@ -155,7 +157,7 @@ export class DespachoPrPage implements OnInit {
} catch (e) {
window.history.back();
}
this.toastService.badRequest('Processo não encontrado')
this.toastService._badRequest('Processo não encontrado')
}
});
@@ -270,9 +272,9 @@ export class DespachoPrPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.close();
this.toastService.successMessage()
this.toastService._successMessage()
} catch (error) {
this.toastService.badRequest()
this.toastService._badRequest()
}
finally {
loader.remove()
@@ -295,10 +297,10 @@ export class DespachoPrPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.toastService.successMessage('Processo arquivado')
this.toastService._successMessage('Processo arquivado')
this.close();
} catch (error) {
this.toastService.badRequest('Processo não arquivado')
this.toastService._badRequest('Processo não arquivado')
}
finally {
loader.remove()
@@ -318,10 +320,10 @@ export class DespachoPrPage implements OnInit {
documents
}).toPromise()
this.toastService.successMessage('Processo criado')
this.toastService._successMessage('Processo criado')
this.close();
} catch (error) {
this.toastService.badRequest('Processo não criado')
this.toastService._badRequest('Processo não criado')
}
finally {
loader.remove()
@@ -344,10 +346,10 @@ export class DespachoPrPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.toastService.successMessage('')
this.toastService._successMessage('')
this.close();
} catch (error) {
this.toastService.badRequest()
this.toastService._badRequest()
}
finally {
loader.remove()
@@ -371,10 +373,10 @@ export class DespachoPrPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.toastService.successMessage()
this.toastService._successMessage()
this.close();
} catch (error) {
this.toastService.badRequest()
this.toastService._badRequest()
}
finally {
loader.remove()
@@ -389,11 +391,11 @@ export class DespachoPrPage implements OnInit {
sendExpedienteToPending() {
this.processes.SetTaskToPending(this.serialNumber).subscribe(res => {
this.popoverController.dismiss('close')
this.toastService.successMessage('Processo enviado para pendentes')
this.toastService._successMessage('Processo enviado para pendentes')
this.goBack()
}, () => {
this.toastService.badRequest('Processo não encontrado')
this.toastService._badRequest('Processo não encontrado')
});
}
@@ -11,7 +11,7 @@
</div>
<div class="theicon btn-refresh">
<button class="btn-no-color" (click)="doRefresh()">
<ion-icon slot="end" class="title-icon" name="reload-circle"></ion-icon>
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
</div>
</div>
@@ -45,7 +45,8 @@
<ion-label>{{ task.Folio }}</ion-label>
</div>
<div class="exp-icon">
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-attachment.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-expediente-attachment.svg"></ion-icon>
<label *ngIf="task.DocumentsQty != 0">{{task.DocumentsQty}}</label>
</div>
</div>
@@ -152,7 +152,7 @@ ion-item{
font-family: Roboto;
font-size: 12pt;
font-weight: 700;
color: #0d89d1;
color: var(--title-text-color);
padding-left: 3px;
.subject{
@@ -20,6 +20,7 @@ import { DespachosprStore } from 'src/app/store/despachospr-store.service';
import { SqliteService } from 'src/app/services/sqlite.service';
import { BackgroundService } from 'src/app/services/background.service';
import { SortService } from 'src/app/services/functions/sort.service';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-despachos-pr',
@@ -63,6 +64,7 @@ export class DespachosPrPage implements OnInit {
private sqliteservice: SqliteService,
private backgroundservice: BackgroundService,
private sortService: SortService,
public ThemeService: ThemeService
) {
this.loggeduser = authService.ValidatedUser;
@@ -8,13 +8,15 @@
<div class="main-header">
<div class="title-content width-100 d-flex justify-space-between align-center">
<div class=" btn-dismiss font-30 cursor-pointer" (click)="goBack()" defaultHref="#">
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div>
<div class="middle d-flex align-center flex-grow-1">
<ion-label class="title">{{ task.Folio}}</ion-label>
</div>
<div class="div-icon" (click)="openOptions()">
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
</div>
</div>
</div>
@@ -91,7 +91,7 @@ ion-button{
}
.attach-document{
font-size: 15px;
color: #0d89d1;
color: var(--title-text-color);
margin: 5px 5px 5px 10px;
padding: 5px;
float: left;
@@ -22,6 +22,8 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
import { SqliteService } from 'src/app/services/sqlite.service';
import { Platform } from '@ionic/angular';
import { BackgroundService } from 'src/app/services/background.service';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-despacho',
@@ -59,7 +61,8 @@ export class DespachoPage implements OnInit {
public p: PermissionService,
private sqliteservice: SqliteService,
private platform: Platform,
private backgroundservice: BackgroundService
private backgroundservice: BackgroundService,
public ThemeService: ThemeService
) {
@@ -183,6 +186,7 @@ export class DespachoPage implements OnInit {
this.sqliteservice.updateProcess(res);
}
}
updateProcessInterveners(users) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else {
@@ -353,6 +357,32 @@ export class DespachoPage implements OnInit {
}
async generateDiploma(note:string, documents:any) {
let body = {
"serialNumber": this.serialnumber,
"action": "Reencaminhar",
"ActionTypeId": 99999839,
"dataFields": {
"ReviewUserComment": note,
},
"AttachmentList" :documents,
}
const loader = this.toastService.loading()
try {
await this.processes.CompleteTask(body).toPromise()
this.toastService.successMessage()
this.close();
} catch (error) {
this.toastService.badRequest()
} finally {
loader.remove()
}
}
toDateString(e) {
return new Date(e).toDateString()
}
@@ -414,6 +444,9 @@ export class DespachoPage implements OnInit {
else if (actionName == 'Reexecução') {
await this.reexecute(res.data.note, docs);
this.goBack();
} else if(actionName == 'Gerar Diploma') {
await this.generateDiploma(res.data.note, docs);
this.goBack();
}
}
});
@@ -485,7 +518,13 @@ export class DespachoPage implements OnInit {
});
await modal.present();
modal.onDidDismiss().then(res => {
this.goBack();
if(res){
const data = res.data;
if(data == 'close') {
this.goBack();
}
}
});
}
@@ -530,4 +569,5 @@ export class DespachoPage implements OnInit {
return await popover.present();
}
}
@@ -10,7 +10,7 @@
<div class="title"><ion-label >Despachos</ion-label></div>
<div class="theicon btn-refresh">
<button class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon" name="reload-circle"></ion-icon>
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
</div>
</div>
@@ -24,7 +24,7 @@
pullingText="deslize para actualizar"
refreshingSpinner="circles"
refreshingText="A actualizar...">
</ion-refresher-content>
</ion-refresher-content>
</ion-refresher>
<div >
@@ -43,7 +43,8 @@
<ion-label>{{ task.Folio }}</ion-label>
</div>
<div class="exp-icon">
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-attachment.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-expediente-attachment.svg"></ion-icon>
<label *ngIf="task.DocumentsQty != 0">{{task.DocumentsQty}}</label>
</div>
</div>
@@ -133,7 +133,7 @@ ion-item{
font-family: Roboto;
font-size: 12pt;
font-weight: 700;
color: #0d89d1;
color: var(--title-text-color);
padding-left: 3px;
.subject{
@@ -7,6 +7,8 @@ import { SqliteService } from 'src/app/services/sqlite.service';
import { Platform } from '@ionic/angular';
import { isThisHour } from 'date-fns';
import { BackgroundService } from 'src/app/services/background.service';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-despachos',
@@ -24,7 +26,8 @@ export class DespachosPage implements OnInit {
private despachoRule: DespachoService,
private sqliteservice: SqliteService,
private platform: Platform,
private backgroundservice: BackgroundService
private backgroundservice: BackgroundService,
public ThemeService: ThemeService
) {
}
@@ -8,7 +8,8 @@
<div class="main-header">
<div class="title-content width-100 d-flex justify-space-between">
<div class="font-30 cursor-pointer" (click)="goBack()" defaultHref="#">
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div>
<div class="middle d-flex align-center flex-grow-1 ">
<ion-label class="title">{{ task.Folio}}</ion-label>
@@ -151,7 +151,7 @@ ion-button{
}
.attach-document{
font-size: 15px;
color: #0d89d1;
color: var(--title-text-color);
margin: 5px 5px 5px 10px;
padding: 5px;
float: left;
@@ -1,19 +1,15 @@
import { Component, OnInit } from '@angular/core';
import { AnimationController, ModalController, PopoverController } from '@ionic/angular';
import { AddNotePage } from 'src/app/modals/add-note/add-note.page';
import { ProcessesService } from 'src/app/services/processes.service';
import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
import { momentG } from 'src/plugin/momentG';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-meeting-modal.page';
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
import { ActivatedRoute, Router } from '@angular/router';
import { DeplomaOptionsPage } from 'src/app/shared/popover/deploma-options/deploma-options.page';
import { ToastService } from 'src/app/services/toast.service';
import { Location } from '@angular/common'
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-diploma-assinar',
@@ -44,6 +40,7 @@ export class DiplomaAssinarPage implements OnInit {
private animationController: AnimationController,
private toastService: ToastService,
private location: Location,
public ThemeService: ThemeService
) {
this.activatedRoute.paramMap.subscribe(params => {
if(params["params"].SerialNumber) {
@@ -120,15 +117,15 @@ export class DiplomaAssinarPage implements OnInit {
}, (error)=>{
try {
this.toastService.badRequest('Processo não encontrado')
this.toastService._badRequest('Processo não encontrado')
this.goBack()
} catch (e) {
window.history.back();
} finally {
if(error.status == 0) {
this.toastService.badRequest('Não é possível visualizar este processo no modo offline')
this.toastService._badRequest('Não é possível visualizar este processo no modo offline')
} else {
this.toastService.badRequest('Processo não encontrado')
this.toastService._badRequest('Processo não encontrado')
}
}
});
@@ -182,11 +179,11 @@ export class DiplomaAssinarPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.toastService.successMessage(false, ()=>{
this.toastService._successMessage(false, ()=>{
this.goBack();
})
} catch (error) {
this.toastService.badRequest()
this.toastService._badRequest()
}
finally {
loader.remove()
@@ -9,7 +9,7 @@
<div class="thetitle"><ion-label >Diplomas</ion-label></div>
<div class="theicon btn-refresh">
<button class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon" name="reload-circle"></ion-icon>
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
</div>
<div class="bottom-title d-flex"><h3 class="bottom-text">Diplomas por Assinar</h3></div>
@@ -48,7 +48,8 @@
<ion-label>{{ task.Folio }}</ion-label>
</div>
<div class="exp-icon">
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "src="assets/images/icons-expediente-attachment.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-expediente-attachment.svg"></ion-icon>
<label *ngIf="task.DocumentsQty != 0">{{task.DocumentsQty}}</label>
</div>
</div>
@@ -142,7 +142,7 @@ ion-item{
font-family: Roboto;
font-size: 12pt;
font-weight: 700;
color: #0d89d1;
color: var(--title-text-color);
padding-left: 3px;
.subject{
@@ -3,11 +3,12 @@ import { NavigationEnd, NavigationExtras, Router } from '@angular/router';
import { customTask, DailyWorkTask } from '../../../models/dailyworktask.model';
import { ProcessesService } from 'src/app/services/processes.service';
import { formatDate } from '@angular/common';
import { ModalController, NavParams } from '@ionic/angular';
import { ModalController, NavParams, Platform } from '@ionic/angular';
import { AlertService } from 'src/app/services/alert.service';
import { DiplomaPage } from 'src/app/pages/gabinete-digital/diplomas/diploma/diploma.page';
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
import { SortService } from 'src/app/services/functions/sort.service';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-diplomas-assinar',
@@ -33,7 +34,7 @@ export class DiplomasAssinarPage implements OnInit {
private alertService: AlertService,
private router: Router,
private sortService: SortService,
) {
public ThemeService: ThemeService) {
}
ngOnInit() {
@@ -8,7 +8,8 @@
<div class="main-header">
<div class="title-content width-100 d-flex justify-space-between">
<div class="font-30 cursor-pointer" (click)="goBack()" defaultHref="#">
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div>
<div class="middle d-flex align-center flex-grow-1 ">
<ion-label class="title">{{ task.Folio}}</ion-label>
@@ -17,7 +18,8 @@
<!-- <ion-menu-button autoHide="false">
<ion-icon name="ellipsis-vertical-outline"></ion-icon>
</ion-menu-button> -->
<ion-icon class="font-25 cursor-pointer" src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-25 cursor-pointer" src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-25 cursor-pointer" src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
</div>
</div>
</div>
@@ -133,7 +133,7 @@ ion-button{
}
.attach-document{
font-size: 15px;
color: #0d89d1;
color: var(--title-text-color);
margin: 5px 5px 5px 10px;
padding: 5px;
float: left;
@@ -15,6 +15,8 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
import { Platform } from '@ionic/angular';
import { SqliteService } from 'src/app/services/sqlite.service';
import { BackgroundService } from 'src/app/services/background.service';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-diploma',
@@ -49,6 +51,7 @@ export class DiplomaPage implements OnInit {
private sqliteservice: SqliteService,
private backgroundservice: BackgroundService,
private platform: Platform,
public ThemeService: ThemeService
) {
this.activatedRoute.paramMap.subscribe(params => {
// console.log(params["params"]);
@@ -160,7 +163,7 @@ export class DiplomaPage implements OnInit {
} catch (e) {
window.history.back();
}
this.toastService.badRequest('Processo não encontrado')
this.toastService._badRequest('Processo não encontrado')
}
});
@@ -279,12 +282,12 @@ export class DiplomaPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.toastService.successMessage(false, () => {
this.toastService._successMessage(false, () => {
this.close();
})
} catch (error) {
this.toastService.badRequest()
this.toastService._badRequest()
}
finally {
loader.remove()
@@ -305,9 +308,9 @@ export class DiplomaPage implements OnInit {
const loader = this.toastService.loading()
try {
await this.processes.CompleteTask(body).toPromise()
this.toastService.successMessage()
this.toastService._successMessage()
} catch (error) {
this.toastService.badRequest()
this.toastService._badRequest()
}
finally {
loader.remove()
@@ -331,9 +334,9 @@ export class DiplomaPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise();
this.toastService.successMessage('Processo concluído')
this.toastService._successMessage('Processo concluído')
} catch (error) {
this.toastService.badRequest()
this.toastService._badRequest()
}
finally {
loader.remove()
@@ -9,7 +9,7 @@
<div class="thetitle"><ion-label >Diplomas</ion-label></div>
<div class="theicon btn-refresh">
<button class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon" name="reload-circle"></ion-icon>
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
</div>
</div>
@@ -48,7 +48,8 @@
<ion-label>{{ task.Folio }}</ion-label>
</div>
<div class="exp-icon">
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-attachment.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-expediente-attachment.svg"></ion-icon>
<label *ngIf="task.DocumentsQty != 0">{{task.DocumentsQty}}</label>
</div>
</div>
@@ -84,7 +85,8 @@
<ion-label>{{ task.Folio }}</ion-label>
</div>
<div class="exp-icon">
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-attachment.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-expediente-attachment.svg"></ion-icon>
<label *ngIf="task.DocumentsQty != 0">{{task.DocumentsQty}}</label>
</div>
</div>
@@ -132,7 +132,7 @@ ion-item{
font-family: Roboto;
font-size: 12pt;
font-weight: 700;
color: #0d89d1;
color: var(--title-text-color);
padding-left: 3px;
.subject{
@@ -6,6 +6,8 @@ import { ProcessesService } from 'src/app/services/processes.service';
import { SqliteService } from 'src/app/services/sqlite.service';
import { BackgroundService } from 'src/app/services/background.service';
import { SortService } from 'src/app/services/functions/sort.service';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-diplomas',
@@ -31,6 +33,7 @@ export class DiplomasPage implements OnInit, OnDestroy {
private sqliteservice: SqliteService,
private backgroundservice: BackgroundService,
private sortService: SortService,
public ThemeService: ThemeService
) {
//Inicializar segment
@@ -2,14 +2,16 @@
<div class="header-content mx-20 d-flex justify-between">
<div class="header-icon-left">
<button class="btn-no-color cursor-pointer" (click)="close()">
<ion-icon src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</button>
</div>
<div class="header-title flex-grow-1">
<label>{{loadedEvent.workflowInstanceDataFields.Subject}}</label>
</div>
<div class="header-icon-right cursor-pointer" (click)="editar(loadedEvent.serialNumber)">
<ion-icon src="assets/images/icons-edit.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-edit.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-edit.svg"></ion-icon>
</div>
</div>
</ion-header>
@@ -90,7 +92,7 @@
<span class="app-name" *ngIf="document.ApplicationId == 386"> AccoesPresidenciais </span>
<span class="app-name" *ngIf="document.ApplicationId == 361 "> ArquivoDespachoElect </span>
</p>
<p><span class="span-left">{{document.Stakeholders}}</span><span class="span-right"> {{document.CreateDate | date: 'dd-MM-yyyy HH:mm'}} </span></p>
<p><span class="span-left" *ngIf="document.Stakeholders != false">{{document.Stakeholders}}</span><span class="span-right" *ngIf="document.CreateDate != false"> {{document.CreateDate }} </span></p>
</ion-label>
</ion-item>
</ion-list>
@@ -82,7 +82,7 @@ ion-menu{
}
.attach-document{
font-size: 15px;
color: #0d89d1;
color: var(--title-text-color);
margin: 5px 5px 5px 10px;
padding: 5px;
float: left;
@@ -95,7 +95,7 @@ ion-menu{
.attach-title-item{
width: 100%;
font-size: 15px;
color:#0d89d1;
color:var(--title-text-color);
}
/* SPAN */
.span-left{
@@ -180,7 +180,7 @@ display: none;
.attach-title-item{
width: 100%;
font-size: 15px;
color:#0d89d1;
color:var(--title-text-color);
}
/* SPAN */
.span-left{
@@ -12,6 +12,7 @@ import { EmendMessageModalPage } from '../../../agenda/emend-message-modal/emend
import { EventActionsPopoverPage } from '../../../agenda/event-actions-popover/event-actions-popover.page';
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
import { ToastService } from 'src/app/services/toast.service';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-approve-event-modal',
@@ -43,6 +44,7 @@ export class ApproveEventModalPage implements OnInit {
private iab: InAppBrowser,
private animationController: AnimationController,
private toastService: ToastService,
public ThemeService: ThemeService
) {
@@ -108,13 +110,13 @@ export class ApproveEventModalPage implements OnInit {
try {
await this.processes.PostTaskAction(body).toPromise()
this.toastService.successMessage('Evento aprovado', ()=>{
this.toastService._successMessage('Evento aprovado', ()=>{
this.router.navigate(['/home/gabinete-digital/event-list']);
this.modalController.dismiss(null);
})
} catch (error) {
this.toastService.badRequest('Evento não aprovado')
this.toastService._badRequest('Evento não aprovado')
}
finally {
loader.remove()
@@ -139,11 +141,11 @@ export class ApproveEventModalPage implements OnInit {
try {
await this.processes.PostTaskAction(body).toPromise()
this.toastService.successMessage('Evento rejeitado', () =>{
this.toastService._successMessage('Evento rejeitado', () =>{
this.router.navigate(['/home/gabinete-digital/event-list']);
})
} catch (error) {
this.toastService.badRequest('Evento não rejeitado')
this.toastService._badRequest('Evento não rejeitado')
}
finally {
loader.remove()
@@ -7,17 +7,20 @@
<div class="content d-flex flex-column width-100" *ngIf="loadedEvent.workflowInstanceDataFields">
<div class="header-content width-100 d-flex justify-space-between">
<div (click)="goBack()" class="header-icon-left cursor-pointer">
<ion-icon src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div>
<div class="header-title flex-grow-1 cursor-pointer" *ngIf="loadedEvent.workflowInstanceDataFields.Subject">
<label>{{loadedEvent.workflowInstanceDataFields.Subject}}</label>
</div>
<div (click)="editar(loadedEvent.serialNumber)" class="header-icon-right display-none-true">
<ion-icon src="assets/images/icons-edit.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-edit.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon>
</div>
<div class="menu-ptions">
<button class="btn-no-color" (click)="openOptions(loadedEvent)">
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
</button>
</div>
</div>
@@ -97,7 +97,7 @@ ion-menu{
}
.attach-document{
font-size: 15px;
color: #0d89d1;
color: var(--title-text-color);
margin: 5px 5px 5px 10px;
padding: 5px;
float: left;
@@ -110,7 +110,7 @@ ion-menu{
.attach-title-item{
width: 100%;
font-size: 15px;
color:#0d89d1;
color:var(--title-text-color);
}
/* SPAN */
.span-left{
@@ -16,6 +16,9 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
import { SqliteService } from '../../../../services/sqlite.service';
import { BackgroundService } from '../../../../services/background.service';
import { Platform } from '@ionic/angular';
import { ThemeService } from 'src/app/services/theme.service'
import { OfflineManagerService } from 'src/app/services/offline-manager.service';
@Component({
selector: 'app-approve-event',
@@ -58,7 +61,9 @@ export class ApproveEventPage implements OnInit {
private location: Location,
private sqliteservice: SqliteService,
private platform: Platform,
private backgroundservice: BackgroundService
private backgroundservice: BackgroundService,
public ThemeService: ThemeService,
private offlineManager: OfflineManagerService
) {
this.activatedRoute.paramMap.subscribe(params => {
// console.log(params["params"]);
@@ -200,11 +205,11 @@ export class ApproveEventPage implements OnInit {
try {
await this.processes.PostTaskAction(body).toPromise()
this.toastService.successMessage();
this.toastService._successMessage();
this.goBack();
} catch (error) {
this.toastService.badRequest()
this.toastService._badRequest()
}
finally {
loader.remove()
@@ -252,11 +257,15 @@ export class ApproveEventPage implements OnInit {
const loader = this.toastService.loading()
try {
await this.processes.PostTaskAction(body).toPromise();
this.toastService.successMessage('Pedido enviado');
await this.processes.PostTaskAction(body).toPromise()
.catch(() => {
console.log('Send event to approve for revition')
this.offlineManager.storeRequestData('event-listRever', body);
});
this.toastService._successMessage('Pedido enviado');
this.goBack();
} catch (error) {
this.toastService.badRequest();
this.toastService._badRequest();
} finally {
loader.remove()
}
@@ -277,10 +286,10 @@ export class ApproveEventPage implements OnInit {
const loader = this.toastService.loading()
try {
await this.processes.PostTaskAction(body).toPromise();
await this.toastService.successMessage('Processo rejeitado');
await this.toastService._successMessage('Processo rejeitado');
this.goBack();
} catch (error) {
this.toastService.badRequest()
this.toastService._badRequest()
}
finally {
loader.remove()
@@ -355,10 +364,10 @@ export class ApproveEventPage implements OnInit {
try {
await this.processes.PostTaskAction(body).toPromise();
this.toastService.successMessage();
this.toastService._successMessage();
this.goBack();
} catch (error) {
this.toastService.badRequest();
this.toastService._badRequest();
} finally {
loader.remove()
}
@@ -6,7 +6,8 @@
<div class="header-content">
<div class="header-icon-left">
<button class="btn-no-color cursor-pointer" (click)="goBack()">
<ion-icon src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</button>
</div>
<div class="header-title">
@@ -115,7 +115,7 @@ ion-item-sliding{
font-style: normal;
line-height: normal;
letter-spacing: normal;
color: #0d89d1;
color: var(--title-text-color) !important;
margin: 0;
padding: 0;
}
@@ -12,6 +12,7 @@ import { SqliteService } from '../../../services/sqlite.service';
import { BackgroundService } from '../../../services/background.service';
import { Platform } from '@ionic/angular';
import { SortService } from 'src/app/services/functions/sort.service';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-event-list',
@@ -42,7 +43,8 @@ export class EventListPage implements OnInit {
private sqliteservice: SqliteService,
private platform: Platform,
private sortService: SortService,
private backgroundservice: BackgroundService
private backgroundservice: BackgroundService,
public ThemeService: ThemeService
) { }
ngOnInit() {
@@ -266,7 +266,7 @@
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
</div>
<div class="ion-input-class-no-height" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom ">
<div class="ion-input-class-no-height cursor-pointer" (click)="addParticipants()" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom ">
<div class="list-people">
<ion-item lines="none">
<ion-list>
@@ -275,8 +275,9 @@
</ion-list>
</ion-item>
</div>
<div class="add-people" (click)="addParticipants()">
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<div class="add-people" >
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
</div>
</div>
</div>
@@ -297,7 +298,8 @@
</ion-item>
</div>
<div class="add-people" (click)="addParticipantsCc()">
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
</div>
</div>
</div>
@@ -317,7 +319,8 @@
<div class="ion-item-container-no-border cursor-pointer" (click)="getDoc()">
<ion-label>
<div class="attach-icon">
<ion-icon src="assets/images/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
</div>
<div class="attach-document">
<ion-label>Anexar Documentos</ion-label>
@@ -66,7 +66,7 @@
float: right;
overflow: auto;
font-size: 25px;
padding: 10px;
display: flex;
}
.list-people-title{
/* font-size: 13px; */
@@ -74,7 +74,7 @@
}
.attach-document{
font-size: 15px;
color: #0d89d1;
color: var(--title-text-color);
margin: 5px 5px 5px 10px;
padding: 5px;
float: left;
@@ -19,6 +19,8 @@ import * as _moment from 'moment';
import * as _rollupMoment from 'moment';
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
import { ThemeService } from 'src/app/services/theme.service'
const moment = _rollupMoment || _moment;
@@ -125,6 +127,7 @@ export class BookMeetingModalPage implements OnInit {
authService: AuthService,
private toastService: ToastService,
private activatedRoute: ActivatedRoute,
public ThemeService: ThemeService
) {
this.taskParticipants = [];
this.loggeduser = authService.ValidatedUser;
@@ -272,10 +275,10 @@ export class BookMeetingModalPage implements OnInit {
this.modalController.dismiss();
// this.distartExpedientModal();
this.toastService.successMessage('Reunião criada');
this.toastService._successMessage('Reunião criada');
} catch (error) {
this.toastService.badRequest('Reunião não criada')
this.toastService._badRequest('Reunião não criada')
}
finally {
loader.remove()
@@ -297,10 +300,10 @@ export class BookMeetingModalPage implements OnInit {
break;
}
this.close();
this.toastService.successMessage('Reunião criada');
this.toastService._successMessage('Reunião criada');
} catch (error) {
this.toastService.badRequest()
this.toastService._badRequest()
} finally {
loader.remove()
}
@@ -133,7 +133,7 @@
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
</div>
<div class="ion-input-class-no-height" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom ">
<div class="ion-input-class-no-height cursor-pointer" (click)="addParticipants();" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom ">
<div class="list-people">
<ion-item lines="none">
<ion-list>
@@ -142,8 +142,9 @@
</ion-list>
</ion-item>
</div>
<div class="add-people" (click)="addParticipants();">
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<div class="add-people" >
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
</div>
</div>
</div>
@@ -154,7 +155,7 @@
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-people-cc.svg"></ion-icon>
</div>
<div class="ion-input-class-no-height" >
<div class="ion-input-class-no-height cursor-pointer" (click)="addParticipantsCc();">
<div class="list-people">
<ion-item lines="none">
<ion-list>
@@ -163,17 +164,19 @@
</ion-list>
</ion-item>
</div>
<div class="add-people" (click)="addParticipantsCc();">
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<div class="add-people" >
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
</div>
</div>
</div>
</div>
<div class="ion-item-container-no-border" (click)="getDoc()">
<div class="ion-item-container-no-border cursor-pointer" (click)="getDoc()">
<ion-label class="d-flex align-center">
<div class="attach-icon d-flex align-center">
<ion-icon src="assets/images/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-attach-doc.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-attach-doc.svg"></ion-icon>
</div>
<div class="attach-document pl-10">
<ion-label>Anexar Documentos</ion-label>
@@ -70,7 +70,7 @@
float: right;
overflow: auto;
font-size: 25px;
padding: 10px;
display: flex;
}
.list-people-title{
/* font-size: 13px; */
@@ -78,7 +78,7 @@
}
.attach-document{
font-size: 15px;
color: #0d89d1;
color: var(--title-text-color);
}
.attach-title-item{
@@ -22,6 +22,8 @@ import { NgxMatDateFormats } from '@angular-material-components/datetime-picker'
import { task } from 'src/app/models/ExpedientTaskModalPage';
import { DespachoService } from 'src/app/Rules/despacho.service';
import { SearchDocumentPipe } from 'src/app/pipes/search-document.pipe';
import { ThemeService } from 'src/app/services/theme.service'
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
@@ -106,7 +108,8 @@ export class ExpedientTaskModalPage implements OnInit {
private alertController: AlertService,
private userAuth: AuthService,
private toastService: ToastService,
private despachoService: DespachoService
private despachoService: DespachoService,
public ThemeService: ThemeService
) {
this.loggeduser = userAuth.ValidatedUser;
@@ -325,11 +328,11 @@ export class ExpedientTaskModalPage implements OnInit {
try {
this.taskResult = await this.processes.postDespatcho(this.postData).toPromise();
await this.toastService.successMessage('Processo efetuado');
await this.toastService._successMessage('Processo efetuado');
this.modalController.dismiss(action_despacho);
} catch (error) {
await this.toastService.badRequest('Processo não efetuado')
await this.toastService._badRequest('Processo não efetuado')
} finally {
loader.remove()
}
@@ -359,11 +362,11 @@ export class ExpedientTaskModalPage implements OnInit {
try {
this.taskResult = await this.processes.postParecer(this.postData).toPromise();
await this.toastService.successMessage('Pedido enviado');
await this.toastService._successMessage('Pedido enviado');
this.modalController.dismiss(action_parecer);
} catch (error) {
await this.toastService.badRequest('Processo não efetuado')
await this.toastService._badRequest('Processo não efetuado')
} finally {
loader.remove()
}
@@ -391,10 +394,10 @@ export class ExpedientTaskModalPage implements OnInit {
try {
this.taskResult = await this.processes.postDeferimento(this.postData).toPromise();
this.toastService.successMessage('Processo efetuado');
this.toastService._successMessage('Processo efetuado');
this.modalController.dismiss(action_deferimento);
} catch (error) {
await this.toastService.badRequest('Processo não efetuado')
await this.toastService._badRequest('Processo não efetuado')
} finally {
loader.remove()
}
@@ -433,18 +436,18 @@ export class ExpedientTaskModalPage implements OnInit {
if(this.postData.DispatchFolder.Message){
try {
this.taskResult = await this.despachoService.createDespacho(this.postData).toPromise();
await this.toastService.successMessage('Processo efetuado');
await this.toastService._successMessage('Processo efetuado');
this.modalController.dismiss(action_despacho_pr);
} catch (error) {
await this.toastService.badRequest('Processo não efetuado')
await this.toastService._badRequest('Processo não efetuado')
} finally {
//loader.remove()
}
}
else{
this.validateField = true;
this.toastService.badRequest('Por favor adicione uma descrição');
this.toastService._badRequest('Por favor adicione uma descrição');
}
loader.remove();
break;
@@ -471,11 +474,11 @@ export class ExpedientTaskModalPage implements OnInit {
try {
this.taskResult = await this.processes.postParecerPr(this.postData).toPromise();
await this.toastService.successMessage('Pedido enviado');
await this.toastService._successMessage('Pedido enviado');
this.modalController.dismiss(action_parecer_pr);
} catch (error) {
await this.toastService.badRequest('Processo não efetuado')
await this.toastService._badRequest('Processo não efetuado')
} finally {
loader.remove()
}
@@ -12,14 +12,18 @@
<div class="main-header" style="overflow: unset !important;">
<div class="title-content width-100 d-flex justify-between">
<div class="font-30 cursor-pointer" (click)="goBack()" defaultHref="#">
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div>
<div class="middle flex-grow-1">
<ion-label class="title">{{ task.Folio}}</ion-label>
</div>
<div class="menu-ptions">
<button class="btn-no-color" (click)="openOptions()">
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
</button>
</div>
</div>
@@ -100,22 +104,24 @@
<button *ngIf="!p.userRole(['PR'])" (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documentos</button>
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" full class="btn-cancel" shape="round" >Enviar para pendentes</button>
<button (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Iniciar Conversa</button>
<div class="solid"></div>
</div>
</div>
<div *ngIf="task && p.userRole(['PR'])" class="aside-right flex-column height-100 overflow-y-auto">
<div class="buttons">
<!-- <div class="buttons">
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
<div class="solid"></div>
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
<button (click)="openBookMeetingModal(task)" 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>
<button (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Iniciar Conversa</button>
<div hidden class="solid"></div>
<button hidden class="btn-cancel" shape="round" >Delegar</button>
</div>
</div> -->
</div>
@@ -37,7 +37,7 @@
margin: 2.5px 0 0 5px;
display: flex;
align-items: center;
}
.right{
padding: 0!important;
@@ -70,7 +70,7 @@
margin: 1px;
}
}
.title{
font-size: 25px;
overflow: auto;
@@ -100,7 +100,8 @@ ion-button{
.label{
border-radius: 20px;
background: #ffb703;
//background: #ffb703;
background: var(--label-bg-color);
float: right;
padding: 5px 13.5px 5px 13.5px;
color: #fff;
@@ -124,14 +125,14 @@ ion-button{
.bottom-content{
//width: 360px;
margin: 0 auto;
.bottom-content h3{
font-size: 16px;
margin: 0 0 0 10px;
}
.attach-document{
font-size: 15px;
color: #0d89d1;
color: var(--title-text-color);
margin: 5px 5px 5px 10px;
padding: 5px;
float: left;
@@ -166,7 +167,7 @@ ion-button{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
.arrow-right-icon{
width: 37px;
float: right;
@@ -249,7 +250,7 @@ ion-button{
font-size: 13px;
color: black;
width: 100%;
}
.description{
font-family: Roboto;
@@ -271,7 +272,7 @@ ion-button{
padding-bottom: unset !important;
}
}
}
@@ -319,7 +320,7 @@ ion-button{
.option-desc {
display: flex;
color: #828282;
color: var(--profile-text-color) !important;
width: 100%;
justify-content: space-between;
align-items: center;
@@ -330,4 +331,4 @@ ion-button{
background-color: #e0e0e0;
padding-left: 4px;
}
}
}
@@ -24,11 +24,14 @@ import { TaskService } from 'src/app/Rules/task.service';
import { DocumentViewerPage } from 'src/app/modals/document-viewer/document-viewer.page';
import { PermissionService } from 'src/app/services/worker/permission.service';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { ThemeService } from 'src/app/services/theme.service'
import { SqliteService } from 'src/app/services/sqlite.service';
import { Platform } from '@ionic/angular';
import { BackgroundService } from 'src/app/services/background.service';
import { NewGroupPage } from 'src/app/pages/chat/new-group/new-group.page';
import { DataService } from 'src/app/services/data.service';
@Component({
selector: 'app-expediente-detail',
@@ -75,7 +78,9 @@ export class ExpedienteDetailPage implements OnInit {
private expedienteService: ExpedienteService,
public platform: Platform,
private sqliteservice: SqliteService,
private backgroundservice: BackgroundService
private backgroundservice: BackgroundService,
public ThemeService: ThemeService,
private dataService: DataService,
) {
this.activatedRoute.paramMap.subscribe(params => {
if (params["params"].SerialNumber) {
@@ -104,6 +109,12 @@ export class ExpedienteDetailPage implements OnInit {
this.toastService.presentToast('Não foi possível fazer login');
}
updateProcessDB(res) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else {
this.sqliteservice.updateProcess(res)
}
}
getFromDB() {
this.platform.ready().then(() => {
@@ -160,9 +171,9 @@ export class ExpedienteDetailPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise();
this.close();
this.toastService.successMessage('Processo aprovado')
this.toastService._successMessage('Processo aprovado')
} catch (error) {
this.toastService.badRequest('Processo não aprovado')
this.toastService._badRequest('Processo não aprovado')
} finally {
loader.remove()
}
@@ -185,9 +196,9 @@ export class ExpedienteDetailPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.close();
this.toastService.successMessage()
this.toastService._successMessage()
} catch (error) {
this.toastService.badRequest()
this.toastService._badRequest()
} finally {
loader.remove()
}
@@ -282,11 +293,11 @@ export class ExpedienteDetailPage implements OnInit {
sendExpedienteToPending() {
this.processes.SetTaskToPending(this.serialNumber).subscribe(res => {
console.log(res);
this.toastService.successMessage('Processo enviado para pendentes')
this.toastService._successMessage('Processo enviado para pendentes')
this.goBack();
},
(error) => {
this.toastService.badRequest('Processo não enviado para pendentes')
this.toastService._badRequest('Processo não enviado para pendentes')
});
}
@@ -314,7 +325,7 @@ export class ExpedienteDetailPage implements OnInit {
}
this.fulltask = res;
this.sqliteservice.updateProcess(res)
this.updateProcessDB(res)
let thedate = new Date(this.task.CreateDate);
this.customDate = this.days[thedate.getDay()] + ", " + thedate.getDate() + " de " + (this.months[thedate.getMonth()]);
@@ -338,12 +349,12 @@ export class ExpedienteDetailPage implements OnInit {
this.getFromDB();
} else {
try {
this.toastService.badRequest('Processo não encontrado')
this.toastService._badRequest('Processo não encontrado')
this.goBack()
} catch (e) {
window.history.back();
}
this.toastService.badRequest('Processo não encontrado')
this.toastService._badRequest('Processo não encontrado')
}
});
@@ -430,9 +441,9 @@ export class ExpedienteDetailPage implements OnInit {
const loader = this.toastService.loading()
this.attachmentsService.AddAttachment(body).subscribe((res) => {
this.toastService.successMessage()
this.toastService._successMessage()
}, () => {
this.toastService.badRequest()
this.toastService._badRequest()
}, () => {
loader.remove()
});
@@ -468,7 +479,7 @@ export class ExpedienteDetailPage implements OnInit {
await this.processes.CompleteTask(body).toPromise();
this.goBack();
} catch (error) {
this.toastService.badRequest('Processo não descartado')
this.toastService._badRequest('Processo não descartado')
} finally {
loader.remove()
}
@@ -499,10 +510,10 @@ export class ExpedienteDetailPage implements OnInit {
try {
await this.expedienteService.discard({ SerialNumber: this.task.SerialNumber }).toPromise()
this.toastService.successMessage('Processo descartado');
this.toastService._successMessage('Processo descartado');
this.goBack();
} catch (error) {
this.toastService.badRequest('Processo não descartado')
this.toastService._badRequest('Processo não descartado')
} finally {
loader.remove()
}
@@ -518,10 +529,10 @@ export class ExpedienteDetailPage implements OnInit {
const loader = this.toastService.loading()
try {
await this.expedienteService.CompleteTask(body).toPromise();
//this.toastService.successMessage('Processo descartado');
//this.toastService._successMessage('Processo descartado');
this.goBack();
} catch (error) {
this.toastService.badRequest('Processo não descartado')
this.toastService._badRequest('Processo não descartado')
} finally {
loader.remove()
}
@@ -532,10 +543,10 @@ export class ExpedienteDetailPage implements OnInit {
const loader = this.toastService.loading()
try {
await this.processes.UpdateTaskStatus(this.task.FolderId).toPromise();
this.toastService.successMessage();
this.toastService._successMessage();
this.goBack();
} catch (error) {
this.toastService.badRequest()
this.toastService._badRequest()
} finally {
loader.remove()
}
@@ -604,4 +615,30 @@ export class ExpedienteDetailPage implements OnInit {
return await popover.present();
}
openNewGroupPage(){
this.router.navigate(['/home/chat']);
this.dataService.set("newGroup", true);
if( window.innerWidth < 801){
this.newGroup();
}
else{
this.dataService.set("newGroup", true);
/* this.closeAllDesktopComponents();
this.showNewGroup=true; */
}
}
async newGroup(){
const modal = await this.modalController.create({
component: NewGroupPage,
cssClass: 'modal modal-desktop',
componentProps: {
name: this.task.Folio,
},
});
await modal.present();
modal.onDidDismiss();
}
}
@@ -7,7 +7,8 @@
<div class="header-content">
<div class="header-icon-left">
<button class="btn-no-color cursor-pointer" (click)="goBack()">
<ion-icon src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-arrow-arrow-left.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</button>
</div>
<div class="header-title">
@@ -15,7 +16,7 @@
</div>
<div class="btn-refresh">
<button class="btn-no-color" (click)="doRefresh($event)">
<ion-icon slot="end" class="title-icon" name="reload-circle"></ion-icon>
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
</div>
</div>
@@ -33,8 +34,8 @@
<ion-list>
<div
class="expediente ion-no-padding ion-no-margin cursor-pointer"
*ngFor = "let task of listToPresent"
class="expediente ion-no-padding ion-no-margin cursor-pointer"
*ngFor = "let task of expedientegbstore.list"
(click)="goToExpediente(task.SerialNumber)"
>
<div class="item width-100">
@@ -43,7 +44,8 @@
<ion-label>{{ task.Subject }}</ion-label>
</div>
<div class="exp-icon">
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "src="assets/images/icons-expediente-attachment.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-expediente-attachment.svg"></ion-icon>
<label *ngIf="task.DocumentsQty != 0">{{task.DocumentsQty}}</label>
</div>
</div>
@@ -65,13 +67,13 @@
</ion-list>
<div
*ngIf="!skeletonLoader && listToPresent.length == 0 && listToPresent.length == 0"
*ngIf="!skeletonLoader && expedientegbstore.list.length == 0 && expedientegbstore.list.length == 0"
class="empty-list d-flex height-100 align-center justify-content-center"
>
<span>Lista vazia</span>
</div>
<div *ngIf="skeletonLoader && listToPresent.length == 0">
<div *ngIf="skeletonLoader && expedientegbstore.list.length == 0">
<ion-list>
<ion-item>
@@ -129,7 +129,7 @@ ion-item{
font-family: Roboto;
font-size: 12pt;
font-weight: 700;
color: #0d89d1;
color: var(--title-text-color);
padding-left: 3px;
.subject{
@@ -7,6 +7,8 @@ import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
import { SqliteService } from 'src/app/services/sqlite.service';
import { Platform } from '@ionic/angular';
import { BackgroundService } from '../../../services/background.service';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-expediente',
@@ -23,7 +25,8 @@ export class ExpedientePage implements OnInit {
taskslist = [];
serialNumber: string;
expedienteGdStore = ExpedienteGdStore
//expedienteGdStore = ExpedienteGdStore;
expedientegbstore = ExpedienteGdStore
expedienteTaskPipe = new ExpedienteTaskPipe()
onlinecheck: boolean;
@@ -34,7 +37,8 @@ export class ExpedientePage implements OnInit {
private toastService: ToastService,
public platform: Platform,
private sqliteservice: SqliteService,
private backgroundservice: BackgroundService
private backgroundservice: BackgroundService,
public ThemeService: ThemeService
) { }
ngOnInit() {
@@ -57,41 +61,30 @@ export class ExpedientePage implements OnInit {
this.backgroundservice.registerBackService('Online', () => {
this.LoadList();
});
}
async LoadList() {
LoadList() {
this.processes.GetTaskListExpediente(false).subscribe(async res => {
this.skeletonLoader = true
const result = res
try {
const expediente: object[] = await this.processes.GetTaskListExpediente(false).toPromise()
const result = expediente
this.taskslist = new Array();
let ress = result.reverse().filter((data: any) => data.workflowInstanceDataFields.Status == "Active");
this.taskslist = new Array();
let res = result.reverse().filter((data: any) => data.workflowInstanceDataFields.Status == "Active");
ress.forEach((element: any) => {
res.forEach((element: any) => {
let task = this.expedienteTaskPipe.transform(element)
this.taskslist.push(task);
this.addProcessTODb(task);
});
this.listToPresent = this.taskslist
console.log('expediente list', this.listToPresent)
let task = this.expedienteTaskPipe.transform(element)
this.taskslist.push(task);
this.sqliteservice.addProcess(task);
});
this.listToPresent = this.taskslist
console.log('expediente list', this.listToPresent)
} catch (error) {
this.toastService.badRequest('Processo não encontrado')
this.goBack()
} finally {
this.skeletonLoader = false;
}
this.skeletonLoader = false;
}, (error) => {
this.getEventsFromLocalDb();
})
}
async refreshing() {
@@ -116,6 +109,13 @@ export class ExpedientePage implements OnInit {
this.router.navigate(['/home/gabinete-digital/expediente', serialNumber, 'gabinete-digital']);
}
addProcessTODb(task) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else {
this.sqliteservice.addProcess(task);
}
}
SqliteAddExpediente(list) {
list.forEach((expediente) => {
let data = {
@@ -12,14 +12,16 @@
<div class="main-header" style="overflow: unset !important;">
<div class="title-content width-100 d-flex justify-between">
<div class="font-30 cursor-pointer" (click)="goBack()" defaultHref="#">
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div>
<div class="middle flex-grow-1">
<ion-label class="title">{{ task.Folio}}</ion-label>
</div>
<div class="menu-ptions">
<button class="btn-no-color" (click)="openOptions()">
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
</button>
</div>
</div>
@@ -131,7 +131,7 @@ ion-button{
}
.attach-document{
font-size: 15px;
color: #0d89d1;
color: var(--title-text-color);
margin: 5px 5px 5px 10px;
padding: 5px;
float: left;
@@ -20,6 +20,7 @@ import { SearchList } from 'src/app/models/search-document';
import { Location } from '@angular/common';
import { AttachmentList } from 'src/app/models/Excludetask';
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-expediente-pr',
@@ -57,7 +58,8 @@ export class ExpedientePrPage implements OnInit {
private animationController: AnimationController,
private toastService: ToastService,
private attachmentsService: AttachmentsService,
private location: Location
private location: Location,
public ThemeService: ThemeService
) {
this.loggeduser = userAuth.ValidatedUser;
@@ -133,11 +135,11 @@ export class ExpedientePrPage implements OnInit {
sendExpedienteToPending() {
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
console.log(res);
this.toastService.successMessage('Processo enviado para pendentes')
this.toastService._successMessage('Processo enviado para pendentes')
this.goBack();
},
(error)=>{
this.toastService.badRequest('Processo não enviado para pendentes')
this.toastService._badRequest('Processo não enviado para pendentes')
});
}
@@ -182,15 +184,15 @@ export class ExpedientePrPage implements OnInit {
}, (error)=>{
try {
this.toastService.badRequest('Processo não encontrado')
this.toastService._badRequest('Processo não encontrado')
this.goBack()
} catch (e) {
window.history.back();
} finally {
if(error.status == 0) {
this.toastService.badRequest('Não é possível visualizar este processo no modo offline')
this.toastService._badRequest('Não é possível visualizar este processo no modo offline')
} else {
this.toastService.badRequest('Processo não encontrado')
this.toastService._badRequest('Processo não encontrado')
}
}
});
@@ -301,9 +303,9 @@ export class ExpedientePrPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise();
this.close();
this.toastService.successMessage('Processo aprovado')
this.toastService._successMessage('Processo aprovado')
} catch(error) {
this.toastService.badRequest('Processo não aprovado')
this.toastService._badRequest('Processo não aprovado')
} finally {
loader.remove()
}
@@ -326,9 +328,9 @@ export class ExpedientePrPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.close();
this.toastService.successMessage()
this.toastService._successMessage()
} catch(error) {
this.toastService.badRequest()
this.toastService._badRequest()
} finally {
loader.remove()
}
@@ -446,10 +448,10 @@ export class ExpedientePrPage implements OnInit {
try {
await this.processes.CompleteTask(otherbody).toPromise()
this.toastService.successMessage('Processo descartado');
this.toastService._successMessage('Processo descartado');
this.goBack();
} catch (error) {
this.toastService.badRequest('Processo não descartado')
this.toastService._badRequest('Processo não descartado')
} finally {
loader.remove()
}
@@ -466,10 +468,10 @@ export class ExpedientePrPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise();
// this.toastService.successMessage('Processo descartado');
// this.toastService._successMessage('Processo descartado');
this.goBack();
} catch (error) {
// this.toastService.badRequest('Processo não descartado')
// this.toastService._badRequest('Processo não descartado')
} finally {
loader.remove()
}
@@ -483,10 +485,10 @@ export class ExpedientePrPage implements OnInit {
try {
await this.processes.UpdateTaskStatus(this.task.FolderId).toPromise();
this.toastService.successMessage();
this.toastService._successMessage();
this.goBack();
} catch (error) {
this.toastService.badRequest()
this.toastService._badRequest()
} finally {
loader.remove()
}
@@ -10,7 +10,7 @@
<div class="thetitle"><ion-label >Expediente</ion-label></div>
<div class="theicon btn-refresh">
<button class="btn-no-color" (click)="refreshing()">
<ion-icon slot="end" class="title-icon" name="reload-circle"></ion-icon>
<ion-icon slot="end" class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
</div>
</div>
@@ -39,7 +39,8 @@
<ion-label>{{ task.Subject }}</ion-label>
</div>
<div class="exp-icon">
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' "src="assets/images/icons-expediente-attachment.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-expediente-attachment.svg"></ion-icon>
<label *ngIf="task.DocumentsQty != 0">{{task.DocumentsQty}}</label>
</div>
</div>
@@ -131,7 +131,7 @@ ion-item{
font-family: Roboto;
font-size: 12pt;
font-weight: 700;
color: #0d89d1;
color: var(--title-text-color);
padding-left: 3px;
.subject{
@@ -11,6 +11,8 @@ import { AuthService } from 'src/app/services/auth.service';
import { Location } from '@angular/common'
import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe';
import { ThemeService } from 'src/app/services/theme.service'
@Component({
selector: 'app-expedientes-pr',
@@ -38,7 +40,8 @@ export class ExpedientesPrPage implements OnInit {
private alertService: AlertService,
private authService: AuthService,
private router: Router,
private location: Location
private location: Location,
public ThemeService: ThemeService
) {
this.loggeduser = authService.ValidatedUser;
}
@@ -65,7 +68,7 @@ export class ExpedientesPrPage implements OnInit {
LoadList() {
this.skeletonLoader = true
this.processes.GetTaskListExpediente(false).subscribe(result => {
console.log(result);
this.skeletonLoader = false
@@ -96,7 +99,8 @@ export class ExpedientesPrPage implements OnInit {
}
goToExpediente(serialNumber:any){
this.router.navigate(['/home/gabinete-digital/expedientes-pr',serialNumber,'gabinete-digital']);
//this.router.navigate(['/home/gabinete-digital/expedientes-pr',serialNumber,'gabinete-digital']);
this.router.navigate(['/home/gabinete-digital/expediente', serialNumber, 'gabinete-digital']);
}
async viewExpedientDetail(serialNumber:any) {
@@ -8,7 +8,7 @@
</ion-refresher-content>
</ion-refresher>
<div class="main-content d-flex height-100">
<div class="main-content d-flex height-100 border-t-radius">
<!-- Aside left -->
<div class="aside-wrapper d-flex flex-column width-md-40 flex-grow-1">
@@ -18,7 +18,7 @@
<ion-label>Gabinete Digital</ion-label>
</div>
<button *ngIf="hideRefreshBtn" class="btn-no-color btn-refresh" (click)="doRefresh($event)">
<ion-icon class="title-icon" name="reload-circle"></ion-icon>
<ion-icon class="title-icon font-awesome" name="reload-circle"></ion-icon>
</button>
<div *ngIf="!hideRefreshBtn" class="title-icons">
<ion-segment [(ngModel)]="segmentVista" (ionChange)="onSegmentVistaChange()">
@@ -48,7 +48,9 @@
<ion-label>{{ task.Folio }}</ion-label>
</div>
<div *ngIf="task.DocumentsQty != 0" class="item-icon">
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-attachment.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-expediente-attachment.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " src="assets/images/theme/gov/icons-expediente-attachment.svg"></ion-icon>
<label>{{task.DocumentsQty}}</label>
</div>
</div>
@@ -109,7 +111,10 @@
<div (click)="openExpedientListPage(); selectedElement='Correspondence'" [class.active]="selectedElement == 'Correspondence'" class="box-hover exp-card d-flex flex-column justify-center">
<div class="d-flex justify-center">
<ion-icon src="assets/images/icons-correspondencia.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-correspondencia.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'Correspondence'" src="assets/images/theme/gov/icons-correspondencia.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'Correspondence'" src="assets/images/theme/gov/icons-correspondencia-hover.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'Correspondence'" src="assets/images/theme/gov/icons-correspondencia.svg"></ion-icon>
</div>
<p class="text-center exp-card-title ">Expediente</p>
<p class="text-center exp-card-content">{{expedientegbstore.count}} <span class="title1">Documentos</span></p>
@@ -118,7 +123,10 @@
<!-- <div [class.active]="selectedElement == 'Pending'" (click)="openPendentesPage(); selectedElement='Pending'" class="exp-card d-flex flex-column justify-center" > -->
<div [class.active]="selectedElementF('Pending')" (click)="openPendentesPage(); selectedElement='Pending'" class="box-hover exp-card d-flex flex-column justify-center" >
<div class="d-flex justify-center">
<ion-icon src="assets/images/icons-expediente-pendente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-pendente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'Pending'" src="assets/images/theme/gov/icons-expediente-pendente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'Pending'" src="assets/images/theme/gov/icons-expediente-pendente-hover.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'Pending'" src="assets/images/theme/gov/icons-expediente-pendente.svg"></ion-icon>
</div>
<p *ngIf="loggeduser.Profile == 'MDGPR'" class="text-center exp-card-title ">Pendentes</p>
<p *ngIf="loggeduser.Profile == 'PR'" class="text-center exp-card-title ">Meus Pendentes</p>
@@ -127,7 +135,10 @@
<div *ngIf="loggeduser.Profile == 'PR'" (click)="openDespachosPrPage(); selectedElement='DispatchesPr'" [class.active]="selectedElement == 'DispatchesPr'" class="box-hover exp-card d-md-flex flex-column justify-center" >
<div class="d-flex justify-center">
<ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-despachos-presidente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DispatchesPr'" src="assets/images/theme/gov/icons-despachos-presidente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'DispatchesPr'" src="assets/images/theme/gov/icons-despachos-presidente-hover.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'DispatchesPr'" src="assets/images/theme/gov/icons-despachos-presidente.svg"></ion-icon>
</div>
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'MDGPR'">Despacho do Presidente da República</p>
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'PR'">Despachos criados por mim</p>
@@ -136,7 +147,10 @@
<div [class.active]="selectedElement == 'Dispatches'" class="box-hover exp-card d-flex flex-column justify-center" (click)="openDespachosPage(); selectedElement='Dispatches'" *ngIf="loggeduser.Profile == 'MDGPR'">
<div class="d-flex justify-center">
<ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-despachos-presidente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'Dispatches'" src="assets/images/theme/gov/icons-despachos-presidente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'Dispatches'" src="assets/images/theme/gov/icons-despachos-presidente-hover.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'Dispatches'" src="assets/images/theme/gov/icons-despachos-presidente.svg"></ion-icon>
</div>
<p class="text-center exp-card-title ">Despachos</p>
<p class="text-center exp-card-content">{{despachoStore.count}} <span class="title1">Documentos</span> </p>
@@ -144,7 +158,10 @@
<div (click)="openPedidosPage('parecer'); selectedElement='RequestsForOpinion'" [class.active]="selectedElement == 'RequestsForOpinion'" class="box-hover exp-card d-flex flex-column justify-center">
<div class="d-flex justify-center">
<ion-icon src="assets/images/icons-expediente-parecer.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-parecer.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'RequestsForOpinion' " src="assets/images/theme/gov/icons-expediente-parecer.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'RequestsForOpinion'" src="assets/images/theme/gov/icons-expediente-parecer-hover.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'RequestsForOpinion' " src="assets/images/theme/gov/icons-expediente-parecer.svg"></ion-icon>
</div>
<p *ngIf="loggeduser.Profile == 'MDGPR'" class="text-center exp-card-title ">Pedidos de Parecer</p>
<p *ngIf="loggeduser.Profile == 'PR'" class="text-center exp-card-title ">Pedidos de Parecer solicitados por mim</p>
@@ -153,7 +170,10 @@
<div (click)="openPedidosPage('deferimento'); selectedElement = 'RequestForApproval'" [class.active]="selectedElement == 'RequestForApproval'" class="box-hover exp-card d-flex flex-column justify-center">
<div class="d-flex justify-center">
<ion-icon src="assets/images/icons-expediente-deferimento.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-deferimento.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'RequestForApproval'" src="assets/images/theme/gov/icons-expediente-deferimento.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'RequestForApproval'" src="assets/images/theme/gov/icons-expediente-deferimento-hover.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'RequestForApproval'" src="assets/images/theme/gov/icons-expediente-deferimento.svg"></ion-icon>
</div>
<p class="text-center exp-card-title ">Pedidos de Deferimento</p>
<p class="text-center exp-card-content">{{pedidosstore.countdeferimento}} <span class="title1">Documentos</span></p>
@@ -176,7 +196,10 @@
<div *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openDespachosPrPage(); selectedElement='showDespachosPr'" [class.active]="selectedElement == 'showDespachosPr'" class="box-hover exp-card-long width-100 d-flex flex-column justify-center">
<div class="center-div">
<div class="exp-card-icon">
<ion-icon src="assets/images/icons-despachos-presidente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-despachos-presidente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'showDespachosPr'" src="assets/images/theme/gov/icons-despachos-presidente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'showDespachosPr'" src="assets/images/theme/gov/icons-despachos-presidente-hover.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'showDespachosPr'" src="assets/images/theme/gov/icons-despachos-presidente.svg"></ion-icon>
</div>
<div class="exp-card-text">
<p class="exp-card-title">Despacho do Presidente da República</p>
@@ -187,16 +210,22 @@
<div *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openDiplomasPage('validar'); selectedElement='DiplomasPorValidar'" [class.active]="selectedElement == 'DiplomasPorValidar'" class="box-hover exp-card d-flex flex-column justify-center">
<div class="d-flex justify-center">
<ion-icon src="assets/images/icons-expediente-diploma.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-diploma.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DiplomasPorValidar' " src="assets/images/theme/gov/icons-expediente-diploma.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'DiplomasPorValidar' " src="assets/images/theme/gov/icons-expediente-diploma-hover.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'DiplomasPorValidar' " src="assets/images/theme/gov/icons-expediente-diploma.svg"></ion-icon>
</div>
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'MDGPR' ">Diplomas por Validar</p>
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'PR'">Diplomas por Assinar</p>
<p class="text-center exp-card-content">{{ deplomasStore.deplomasReviewCount }} <span class="title1">Documentos</span> </p>
<p class="text-center exp-card-content">{{ deplomasStore.deplomasReviewCount }} bug <span class="title1">Documentos</span> </p>
</div>
<div *ngIf="loggeduser.Profile == 'MDGPR'" (click)="openDiplomasPage('assinados'); selectedElement='DiplomasAssinados'" [class.active]="selectedElement == 'DiplomasAssinados'" class="box-hover exp-card d-flex flex-column justify-center">
<div class="d-flex justify-center">
<ion-icon src="assets/images/icons-diplomas-assinados-presidente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-diplomas-assinados-presidente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DiplomasAssinados'" src="assets/images/theme/gov/icons-diplomas-assinados-presidente.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'DiplomasAssinados'" src="assets/images/theme/gov/icons-diplomas-assinados-presidente-hover.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'DiplomasAssinados'" src="assets/images/theme/gov/icons-diplomas-assinados-presidente.svg"></ion-icon>
</div>
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'MDGPR'">Diplomas assinados PR</p>
<p class="text-center exp-card-title " *ngIf="loggeduser.Profile == 'PR'" >Diplomas</p>
@@ -205,7 +234,10 @@
<div *ngIf="loggeduser.Profile == 'PR'" (click)="openDiplomasAssinarPage(); selectedElement='DiplomasAssinar'" [class.active]="selectedElement == 'DiplomasAssinar'" class="box-hover exp-card d-flex flex-column justify-center">
<div class="d-flex justify-center">
<ion-icon src="assets/images/icons-expediente-diploma.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-expediente-diploma.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement != 'DiplomasAssinar' " src="assets/images/theme/gov/icons-expediente-diploma.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && selectedElement == 'DiplomasAssinar' " src="assets/images/theme/gov/icons-expediente-diploma-hover.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' && selectedElement != 'DiplomasAssinar' " src="assets/images/theme/gov/icons-expediente-diploma.svg"></ion-icon>
</div>
<p class="text-center exp-card-title">Diplomas para Assinar</p>
<p class="text-center exp-card-content">{{ deplomasStore.diplomasListCount }} <span class="title1">Documentos</span></p>
@@ -26,7 +26,7 @@ ion-segment-button{
text-align: center;
}
.title-container{
background:#ecf8ff;
background:var(--gabinete-title-container);
padding: 30px 20px 15px 20px !important;
//margin-bottom: 15px;
border-top-left-radius: 25px;
@@ -117,11 +117,9 @@ ion-segment-button{
height: 100%;
font-family: Roboto;
margin: 0 auto;
background:#ecf8ff;
background:var(--gabinete-main-container);
overflow:hidden;
padding: 0 !important;
border-top-left-radius: 25px;
border-top-right-radius: 25px;
.aside-wrapper{
overflow: hidden;
@@ -201,12 +199,11 @@ ion-segment-button{
}
.exp-card-title{
font-size: 15px;
color: #0d89d1;
color: var(--title-text-color);;
font-family: Roboto;
font-weight: bold;
font-stretch: normal;
font-style: normal;
color: #0d89d1;
margin: 15px 0 0 10px;
text-align: center;
}
@@ -272,7 +269,7 @@ ion-list{
font-family: Roboto;
font-size: 12pt;
font-weight: 700;
color: #0d89d1;
color: var(--title-text-color);
padding-left: 3px;
.item-subject{
@@ -354,7 +351,7 @@ ion-list{
.label{
border-radius: 15px;
background: #ffb703;
background: var(--label-bg-color);
/* font-size: 12px; */
float: right;
padding: 2.5px 13.5px 2.5px 13.5px;
@@ -560,8 +557,8 @@ ion-list{
.active {
color: white !important;
fill: white !important;
border: 1px solid #42b9fe !important;
background: #42b9fe !important;
border: var(--gabinete-active-hove-box-border) !important;
background: var(--gabinete-active-hove-background) !important;
box-sizing: border-box;
.exp-card-content, .icon-selected{
@@ -19,10 +19,11 @@ import { WaitForDomService } from 'src/app/services/dom/wait-for-dom.service';
import { TotalDocumentStore } from 'src/app/store/total-document.service';
import { DeplomasStore } from 'src/app/store/deplomas.service';
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
import { NotificationsService } from 'src/app/services/notifications.service';
//import { NotificationsService } from 'src/app/services/notifications.service';
import { DespachoService } from 'src/app/Rules/despacho.service';
import { ChangeProfileService } from 'src/app/services/change-profile.service';
import { PermissionService } from 'src/app/services/worker/permission.service';
import { ThemeService } from 'src/app/services/theme.service'
import { SqliteService } from '../../services/sqlite.service';
@@ -123,12 +124,13 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
authService: AuthService,
public p: PermissionService,
public waitForDomService: WaitForDomService,
private notificationsService: NotificationsService,
//private notificationsService: NotificationsService,
private despachoRule: DespachoService,
private sqliteservice: SqliteService,
private platform: Platform,
private changeProfileService: ChangeProfileService,
private backgroundservice: BackgroundService
private backgroundservice: BackgroundService,
public ThemeService: ThemeService
) {
this.loggeduser = authService.ValidatedUser;
@@ -616,6 +618,7 @@ export class GabineteDigitalPage implements OnInit, DoCheck {
let diplomasAssinar = despachospr.filter(data => data.activityInstanceName == "Assinar Diploma");
this.count_dip_as = Object.keys(diplomasAssinar).length;
this.deplomasStore.resetDiplomasList(diplomasAssinar)
@@ -8,7 +8,8 @@
<div class="main-header ">
<div class="title-content width-100 d-flex justify-space-between ">
<div class="font-30 cursor-pointer" (click)="goBack()" defaultHref="#">
<ion-icon slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src='assets/images/icons-arrow-arrow-left.svg'></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
</div>
<!-- <app-btn-modal-dismiss></app-btn-modal-dismiss> -->
<div class="middle flex-grow-1">
@@ -16,7 +17,8 @@
</div>
<div class="div-icon">
<div autoHide="false" class="d-flex" (click)="openOptions()">
<ion-icon class="font-30 cursor-pointer" src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-30 cursor-pointer" src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-30 cursor-pointer" src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
</div>
</div>
</div>

Some files were not shown because too many files have changed in this diff Show More