profile picture done

This commit is contained in:
Eudes Inácio
2023-08-29 16:05:32 +01:00
64 changed files with 519 additions and 289 deletions
+26 -23
View File
@@ -14,11 +14,11 @@
<!-- Toolbar -->
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<div [class]="weeksToShow" >
<div class="weeksToShow">
<!-- Calendar is here -->
<div class="calendar-segment-{{profile}}" [class.calendar-segment-pr-force]="SessionStore.user.Profile =='PR'">
<div class="calendar-container" [class]="calendarHeight">
<div class="calendar-container" class="calendarHeight" >
<ion-row class="ion-justify-content-between calendar-tool-tip">
<ion-row class="ion-align-items-center first-row">
@@ -139,25 +139,28 @@
</thead>
</table>
<calendar
class="calendar-component"
[eventSource]="listToPresent"
[calendarMode]="calendar.mode"
[currentDate]="calendar.currentDate"
(onEventSelected)="onEventSelected($event)"
(onTitleChanged)="onViewTitleChanged($event)"
(onRangeChanged)="onRangeChanged($event)"
(onCurrentDateChanged)="onCurrentChanged($event)"
queryMode="remote"
startHour="6"
endHour="20"
step="30"
startingDayMonth="1"
noEventsLabel="Sem Eventos"
allDayLabel="Todo o dia"
[monthviewDisplayEventTemplate]="template"
>
</calendar>
<div class="calendar-conteiner-height overflow-hidden" [style.height]="height">
<calendar
class="calendar-component"
[eventSource]="listToPresent"
[calendarMode]="calendar.mode"
[currentDate]="calendar.currentDate"
(onEventSelected)="onEventSelected($event)"
(onTitleChanged)="onViewTitleChanged($event)"
(onRangeChanged)="onRangeChanged($event)"
(onCurrentDateChanged)="onCurrentChanged($event)"
queryMode="remote"
startHour="6"
endHour="20"
step="30"
startingDayMonth="1"
noEventsLabel="Sem Eventos"
allDayLabel="Todo o dia"
[monthviewDisplayEventTemplate]="template"
>
</calendar>
</div>
<!-- Adding a customized ng-template -->
<ng-template #template let-view="view" let-row="row" let-col="col">
@@ -182,12 +185,12 @@
<div class="calendar-title-container px-20 d-flex">
<ion-row class="timeline-date align-center pr-10">
<button class="no-color" *ngIf="showCalendar" (click)="calendarHeight=['height-75'];showCalendar=false">
<button class="no-color" *ngIf="showCalendar" (click)="height='0px';showCalendar=false">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps font-25" src="assets/images/icons-collaps-up.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps font-25" src="assets/images/theme/gov/icons-collaps-up.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="collaps font-25" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-collaps-up.svg"></ion-icon>
</button>
<button class="no-color" *ngIf="!showCalendar" (click)="calendarHeight=['height-356'];showCalendar=true">
<button class="no-color" *ngIf="!showCalendar" (click)="weekToShow();showCalendar=true">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="collaps font-25" src="assets/images/icons-collaps-down.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="collaps font-25" src="assets/images/theme/gov/icons-collaps-down.svg" ></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="collaps font-25" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-collaps-down.svg" ></ion-icon>
+12 -2
View File
@@ -242,7 +242,7 @@ label{
color: #e16817;
}
td.monthview-primary-with-event {
background-color: red !important;
background-color: white !important;
}
.header-title{
font-family: Roboto;
@@ -1031,7 +1031,7 @@ $font-size: rem(15);
}
.height-356 {
height: 369px;
height: 360px;
}
}
@@ -1066,3 +1066,13 @@ $font-size: rem(15);
}
.calendar-conteiner-height {
height: 100%;
transition: 0.5s;
animation: 0.5s;
-webkit-transition: 0.5s;
-moz-transition: 0.5s;
-ms-transition: 0.5s;
-o-transition: 0.5s;
-webkit-animation: 0.5s;
}
+24 -19
View File
@@ -291,34 +291,37 @@ export class AgendaPage implements OnInit {
}, 1000)
}
weeksToShow = []
height = '75px'
weekToShow() {
setTimeout(() => {
let num = 0;
try {
let weekNum = 0;
function Week(a) {
for(let b of a.querySelectorAll('td')) {
if(!b.className.includes('text-muted')) {
num++;
return true
function Week(a) {
for(let b of a.querySelectorAll('td')) {
if(!b.className.includes('text-muted')) {
weekNum++;
return true
}
}
}
}
for (let a of document.querySelectorAll('.monthview-container .swiper-container .swiper-slide-active table tbody tr') as any ){
Week(a)
}
if(num <= 5) {
this.weeksToShow = ["week-5"]
} else {
this.weeksToShow = ["week-6"]
}
const dayBoxHeight = document.querySelector('.monthview-container .swiper-container .swiper-slide-active table tbody tr td').clientHeight
const weeks = document.querySelectorAll('.monthview-container .swiper-container .swiper-slide-active table tbody tr');
for (let week of weeks as any ){
Week(week)
}
this.showCalendar = true
this.height = (weekNum * dayBoxHeight) +'px'
} catch (e) {
setTimeout(()=> {
this.weekToShow()
}, 100)
}
}, 250)
}
@@ -588,6 +591,8 @@ export class AgendaPage implements OnInit {
this.showLoader = true;
const selectedCalendarIds = this.getSelectedAgendaCalendars();
this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds)
// this.calendar.currentDate.setDate(1);
this.updateEventListBox()
try {
@@ -26,11 +26,7 @@ export class EmendMessageModalPage implements OnInit {
}
save() {
if(this.emendMessage != '') {
this.modalController.dismiss({option:'save', note: this.emendMessage});
} else {
this.toastService._badRequest('É necessário adicionar uma nota');
}
this.modalController.dismiss({option:'save', note: this.emendMessage});
}
@@ -108,7 +108,6 @@ export class EventActionsPopoverPage implements OnInit {
if(res.data.option == 'save') {
if(res.data.note !== '') {
let body = { "serialNumber": this.serialNumber,
"action": "Emendar",
"dataFields": {
@@ -130,10 +129,6 @@ export class EventActionsPopoverPage implements OnInit {
finally {
loader.remove()
}
}
else {
this.toastService._badRequest('É necessário adicionar uma nota');
}
} else {
}
@@ -298,7 +298,7 @@ ion-menu{
background: var(--label-bg-color);
float: right;
padding: 5px 13.5px 5px 13.5px;
color: #fff;
color: black;
}
.text {
@@ -112,7 +112,7 @@ ion-button{
background: var(--label-bg-color);
float: right;
padding: 5px 13.5px 5px 13.5px;
color: #fff;
color: black;
font-size: rem(14);
}
@@ -198,7 +198,7 @@ ion-item{
/* font-size: 12px; */
float: right;
padding: 2.5px 13.5px 2.5px 13.5px;
color: #fff;
color: black;
}
}
.exp-date{
@@ -71,7 +71,7 @@ ion-button{
background: var(--label-bg-color);
float: right;
padding: 5px 13.5px 5px 13.5px;
color: #fff;
color: black;
font-size: rem(14);
}
@@ -177,7 +177,7 @@ ion-item{
/* font-size: 12px; */
float: right;
padding: 2.5px 13.5px 2.5px 13.5px;
color: #fff;
color: black;
}
}
.exp-date{
@@ -137,7 +137,7 @@ ion-button{
background: var(--label-bg-color);
float: right;
padding: 5px 13.5px 5px 13.5px;
color: #fff;
color: black;
font-size: rem(14);
}
@@ -183,7 +183,7 @@ ion-item{
/* font-size: rem(12); */
float: right;
padding: 2.5px 13.5px 2.5px 13.5px;
color: #fff;
color: black;
}
}
.exp-date{
@@ -177,7 +177,7 @@ ion-item{
/* font-size: 12px; */
float: right;
padding: 2.5px 13.5px 2.5px 13.5px;
color: #fff;
color: black;
}
}
.exp-date{
@@ -124,7 +124,7 @@ ion-button{
background: var(--label-bg-color);
float: right;
padding: 5px 13.5px 5px 13.5px;
color: #fff;
color: black;
font-size: rem(14);
}
@@ -177,7 +177,7 @@ ion-item{
/* font-size: 12px; */
float: right;
padding: 2.5px 13.5px 2.5px 13.5px;
color: #fff;
color: black;
}
}
.exp-date{
@@ -195,39 +195,35 @@ export class ApproveEventModalPage implements OnInit {
modal.onDidDismiss().then( async (res) => {
if(res.data.option == 'save') {
if(res.data.note !== '') {
let body = {
"serialNumber": serialNumber,
"action": "Emendar",
"dataFields": {
"ReviewUserComment": res.data,
}
let body = {
"serialNumber": serialNumber,
"action": "Emendar",
"dataFields": {
"ReviewUserComment": res.data,
}
}
//
const loader = this.toastService.loading()
//
const loader = this.toastService.loading()
try {
await this.processes.PostTaskAction(body).toPromise()
this.router.navigate(['/home/gabinete-digital/event-list']);
this.toastService._successMessage('Evento enviado para revisão');
} catch (error) {
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
try {
await this.processes.PostTaskAction(body).toPromise()
this.router.navigate(['/home/gabinete-digital/event-list']);
this.toastService._successMessage('Evento enviado para revisão');
} catch (error) {
if(error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest('Evento não enviado para revisão');
}
this.router.navigate(['/home/gabinete-digital/event-list']);
}
finally {
loader.remove()
this.toastService._badRequest('Evento não enviado para revisão');
}
this.router.navigate(['/home/gabinete-digital/event-list']);
}
finally {
loader.remove()
}
}
else {
this.toastService._badRequest('É necessário adicionar uma nota');
}
}
}, (error) => {
console.log(error)
@@ -190,37 +190,34 @@ export class ApproveEventPage implements OnInit {
.then(async (res) => {
if(res.data.option == 'save') {
if (res.data !== '') {
let body = {
"serialNumber": serialNumber,
"action": "Emendar",
"dataFields": {
"ReviewUserComment": res.data,
}
let body = {
"serialNumber": serialNumber,
"action": "Emendar",
"dataFields": {
"ReviewUserComment": res.data,
}
const loader = this.toastService.loading()
try {
await this.processes.PostTaskAction(body).toPromise()
.catch(() => {
this.offlineManager.storeRequestData('event-listRever', body);
});
this.httpErrorHandle.httpsSucessMessagge('Rever')
this.TaskService.loadEventosParaAprovacao();
this.goBack();
} catch (error) {
this.httpErrorHandle.httpStatusHandle(error)
} finally {
loader.remove()
}
}
else {
this.toastService._badRequest('É necessário adicionar uma nota');
const loader = this.toastService.loading()
try {
await this.processes.PostTaskAction(body).toPromise()
.catch(() => {
this.offlineManager.storeRequestData('event-listRever', body);
});
this.httpErrorHandle.httpsSucessMessagge('Rever')
this.TaskService.loadEventosParaAprovacao();
this.goBack();
} catch (error) {
this.httpErrorHandle.httpStatusHandle(error)
} finally {
loader.remove()
}
}
}, (error) => {
console.log(error)
@@ -307,33 +304,30 @@ export class ApproveEventPage implements OnInit {
modal.onDidDismiss().then(async (res) => {
if(res.data.option == 'save') {
if (res.data.note !== '') {
let body = {
"serialNumber": serialNumber,
"action": "Emendar",
"dataFields": {
"ReviewUserComment": res.data,
}
let body = {
"serialNumber": serialNumber,
"action": "Emendar",
"dataFields": {
"ReviewUserComment": res.data,
}
const loader = this.toastService.loading()
try {
await this.processes.PostTaskAction(body).toPromise();
this.goBack();
this.httpErrorHandle.httpsSucessMessagge('Rever')
this.TaskService.loadEventosParaAprovacao();
} catch (error) {
this.httpErrorHandle.httpStatusHandle(error)
} finally {
loader.remove()
}
}
else {
this.toastService._badRequest('É necessário adicionar uma nota');
const loader = this.toastService.loading()
try {
await this.processes.PostTaskAction(body).toPromise();
this.goBack();
this.httpErrorHandle.httpsSucessMessagge('Rever')
this.TaskService.loadEventosParaAprovacao();
} catch (error) {
this.httpErrorHandle.httpStatusHandle(error)
} finally {
loader.remove()
}
} else {
}
@@ -103,7 +103,7 @@ ion-button{
background: var(--label-bg-color);
float: right;
padding: 5px 13.5px 5px 13.5px;
color: #fff;
color: black;
font-size: rem(14);
}
@@ -173,7 +173,7 @@ ion-item{
/*font-size: rem(12);
*/float: right;
padding: 2.5px 13.5px 2.5px 13.5px;
color: #fff;
color: black;
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
-ms-border-radius: 15px;
@@ -102,7 +102,7 @@ ion-button{
background: var(--label-bg-color);
float: right;
padding: 5px 13.5px 5px 13.5px;
color: #fff;
color: black;
font-size: rem(14);
}
@@ -176,7 +176,7 @@ ion-item{
/* font-size: 12px; */
float: right;
padding: 2.5px 13.5px 2.5px 13.5px;
color: #fff;
color: black;
}
}
.exp-date{
@@ -396,7 +396,7 @@ ion-list {
font-size: rem(12);
float: right;
padding: 2.5px 13.5px 2.5px 13.5px;
color: #fff;
color: black;
}
}
@@ -68,7 +68,7 @@ ion-button{
background: var(--label-bg-color);
float: right;
padding: 5px 13.5px 5px 13.5px;
color: #fff;
color: black;
font-size: rem(14);
}
@@ -174,7 +174,7 @@ ion-item{
/* font-size: rem(12); */
float: right;
padding: 2.5px 13.5px 2.5px 13.5px;
color: #fff;
color: black;
}
}
.exp-date{
@@ -172,7 +172,7 @@ ion-item{
/* font-size: 12px; */
float: right;
padding: 2.5px 13.5px 2.5px 13.5px;
color: #fff;
color: black;
}
}
.exp-date{
+6 -2
View File
@@ -19,6 +19,8 @@ import { Platform } from '@ionic/angular';
import { FirstEnterService } from '../../services/first-enter.service';
import { Storage } from '@ionic/storage';
import { CPSession } from 'src/app/store/documentManagement';
import { StorageService } from 'src/app/services/storage.service';
@Component({
selector: 'app-login',
templateUrl: './login.page.html',
@@ -55,6 +57,7 @@ export class LoginPage implements OnInit {
private platform: Platform,
private FirstEnterService: FirstEnterService,
private storage:Storage,
private storageService: StorageService,
) {}
ngOnInit() {}
@@ -140,7 +143,8 @@ export class LoginPage implements OnInit {
}
this.changeProfileService.runLogin();
/* this.getToken(); */
this.getToken();
SessionStore.setInativity(true);
this.goback();
@@ -169,7 +173,7 @@ export class LoginPage implements OnInit {
this.ChatService.setheader();
this.ChatSystemService.loadChat();
}
this.storageService.remove("Notifications")
this.getToken();
if(!this.platform.is('desktop') && !this.platform.is('mobileweb')) {
@@ -194,8 +194,8 @@
*ngIf="desktopComponent.showAddNewPublication"
class="height-100 d-flex flex-column overflow-hidden background-white flex-grow-1"
[publicationType]="publicationType"
[publication]="publication"
[folderId]="folderId"
[documentId]="documentId"
(closeDesktopComponent)="closeDesktopComponent($event)"
(goBacktoPublicationDetails)="goBacktoPublicationDetails()"
@@ -48,6 +48,7 @@ export class PublicationsPage implements OnInit {
}
folderId: string;
documentId: any
// data set from child component
publicationType: any;
publicationId: string;
@@ -386,6 +387,7 @@ export class PublicationsPage implements OnInit {
}
this.publication = publication;
this.documentId = publication?.DocumentId
this.desktopComponent.showAddNewPublication = true;
}
@@ -39,7 +39,7 @@
<div class="post-img">
<img [lazyLoad]="publication.FileBase64">
</div>
<div class="post-content px-20">
<div class="post-content">
<div class="post-title-time">
<div class="post-title font-15-em">
<ion-label>{{publication.Title}}</ion-label>