pull made

This commit is contained in:
Eudes Inácio
2023-08-15 18:10:45 +01:00
21 changed files with 196 additions and 234 deletions
+2 -62
View File
@@ -376,7 +376,7 @@ td.monthview-primary-with-event {
.calendar-tool-tip{
padding: 30px 10px 20px 10px;
padding: 37px 10px 20px 10px;
//border: 1px solid orange;
}
@@ -962,7 +962,7 @@ $font-size: rem(15);
position: absolute;
float: right;
right: 15px;
top: 1px;
top: 4px;
background: transparent;
color: transparent;
@@ -1037,66 +1037,6 @@ $font-size: rem(15);
}
@media only screen and (min-width: 398px) {
.week-5 {
.calendar-title-container {
font-size: 16px;
}
.height-75 {
height: 75px;
}
.height-356 {
height: 323px;
}
}
.week-6 {
.calendar-title-container {
font-size: 16px;
}
.height-75 {
height: 75px;
}
.height-356 {
height: 371px;
}
}
}
@media only screen and (min-width: 415px) {
.week-5 {
.calendar-title-container {
font-size: 16px;
}
.height-75 {
height: 75px;
}
.height-356 {
height: 319px;
}
}
.week-6 {
.calendar-title-container {
font-size: 16px;
}
.height-75 {
height: 75px;
}
.height-356 {
height: 360px;
}
}
}
@media only screen and (min-width: 500px) {
.week-5 {
.calendar-title-container {
+4
View File
@@ -235,6 +235,10 @@ export class AgendaPage implements OnInit {
this.tigerUpdate()
window['reloadCalendar'] = () => {
this.reloadCalendar()
}
}
@@ -353,6 +353,10 @@ export class EditEventPage implements OnInit {
if(this.sesseionStora.user.Profile == 'MDGPR' || this.sesseionStora.user.Profile == 'PR') {
this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
if(window['reloadCalendar']) {
window['reloadCalendar']()
}
if(this.initCalendarName != this.postEvent.CalendarName) {
let body = {
@@ -375,6 +379,10 @@ export class EditEventPage implements OnInit {
} else {
this.eventsService.editEvent(this.postEvent, 2, 3, this.postEvent.CalendarId).subscribe(async () => {
if(window['reloadCalendar']) {
window['reloadCalendar']()
}
if(this.initCalendarName != this.postEvent.CalendarName) {
let body = {
@@ -23,6 +23,7 @@ import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatSelectModule } from '@angular/material/select';
import { NgxMatMomentModule } from '@angular-material-components/moment-adapter';
import { MatDialogModule } from '@angular/material/dialog';
@NgModule({
imports: [
@@ -30,6 +31,7 @@ import { NgxMatMomentModule } from '@angular-material-components/moment-adapter'
FormsModule,
IonicModule,
NewEventPageRoutingModule,
//
MatDatepickerModule,
MatInputModule,
MatNativeDateModule,
@@ -39,7 +41,8 @@ import { NgxMatMomentModule } from '@angular-material-components/moment-adapter'
NgxMatMomentModule,
MatSelectModule,
MatButtonModule,
ReactiveFormsModule
ReactiveFormsModule,
MatDialogModule,
],
declarations: [NewEventPage]
})
@@ -129,11 +129,9 @@
>
<mat-datepicker-toggle id="new-inicio" matSuffix [for]="picker1" ></mat-datepicker-toggle>
<ngx-mat-datetime-picker #picker1
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
[stepHour]="stepHour" [stepMinute]="stepMinute"
[stepSecond]="stepSecond"
[touchUi]="touchUi"
[stepHour]="15" [stepMinute]="15"
>
</ngx-mat-datetime-picker>
</mat-form-field>
@@ -162,10 +160,8 @@
>
<mat-datepicker-toggle id="new-fim" matSuffix [for]="fim" ></mat-datepicker-toggle>
<ngx-mat-datetime-picker #fim
[showSpinners]="showSpinners"
[showSeconds]="showSeconds"
[stepHour]="stepHour" [stepMinute]="stepMinute"
[stepSecond]="stepSecond"
[stepHour]="15" [stepMinute]="15"
>
</ngx-mat-datetime-picker>
</mat-form-field>
@@ -147,18 +147,37 @@ export class GroupContactsPage implements OnInit {
this.modalController.dismiss();
}
onChange(event){
onChange(event) {
this.textSearch = event.detail.value;
this.users = this.contacts.filter( e => e.name.toLowerCase().includes(this.textSearch.toLowerCase())).sort((a,b) => {
if(a.name < b.name){
const users = this.contacts.filter( e => e.name.toLowerCase().includes(this.textSearch.toLowerCase())).sort((a,b) => {
if(a.name < b.name) {
return -1;
}
if(a.name > b.name){
if(a.name > b.name) {
return 1;
}
return 0;
});
const selectedUsers = this.users.filter( e => e?.isChecked == true)
users.forEach( (user, index) => {
if(user[index]) {
console.log({user, index})
const isCheck = selectedUsers.find( e => e._id == user._id)?.isChecked
if(isCheck) {
user[index].isChecked = isCheck
}
// if(user[index].isChecked) {
// console.log('user[index].isChecked', user[index].isChecked)
// }
}
})
this.users = users
}
@@ -24,16 +24,16 @@
</ion-header>
<ion-content>
<ion-progress-bar class="position-absolute" type="indeterminate" *ngIf="loading"></ion-progress-bar>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<ion-refresher-content>
</ion-refresher-content>
</ion-refresher>
<div class="main-content">
<ion-progress-bar class="position-absolute" type="indeterminate" *ngIf="loading"></ion-progress-bar>
<ion-virtual-scroll [items]="userList" approxItemHeight="70px" [headerFn]="separateLetter">
<div class="item-divider" *virtualHeader="let header">
<ion-label>{{header}}</ion-label>
</div>
@@ -95,9 +95,13 @@ export class ContactsPage implements OnInit {
}
this.chatService.createRoom(body).subscribe(async(res) => {
this.room = res['room'];
await this.ChatSystemService.getAllRooms();
this.getDirectMessage(this.room._id);
this.loading = false
this.ChatSystemService.getAllRooms(() => {
this.getDirectMessage(this.room._id);
this.loading = false
}, this.room._id);
}, ()=> {
this.loading = false
});
@@ -1,15 +1,15 @@
<ion-content>
<div class="content-container d-flex flex-column">
<div class="title-content width-100">
<div class="div-title">
<div class="title-content width-100 ">
<div class="div-title padding">
<ion-label class="title">{{publicationTitle}}</ion-label> <br>
<i style="margin-top: -3px; font-size: 15px;" > Campos marcados com * são obrigatórios</i>
</div>
</div>
<div class="overflow-y-auto">
<div class="overflow-y-auto padding">
<div *ngIf="publicationType!='1'" class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="pub.Title" name="title" ngDefaultControl placeholder="Título*" ></ion-input>
</div>
@@ -25,41 +25,39 @@
</div>
</div>
<div *ngIf="capturedImage != '' " class="ion-item-container-no-border">
<ion-label class="attached-title">Fotografia Anexada </ion-label>
<div *ngIf="capturedImage != '' " class="ion-item-container-no-border mb-20">
<ion-label class="attached-title pb-10">Fotografia Anexada</ion-label>
<ion-item lines="none">
<ion-thumbnail slot="start">
<div class="d-flex justify-content-between">
<div class="d-flex">
<ion-thumbnail slot="start">
<ion-img [(ngModel)]="capturedImage" name="image" ngDefaultControl [src]="capturedImage" (click)="imageSize(capturedImage)" ></ion-img>
<ion-row>
<ion-col>
<img src="" #imageElement/>
</ion-col>
</ion-row>
</ion-thumbnail>
<ion-label>
<p>{{capturedImageTitle}}</p>
<p hidden>size</p>
</ion-label>
<div (click)="clear()">
</ion-thumbnail>
<ion-label class="pl-10">
<p>{{capturedImageTitle}}</p>
<p hidden>size</p>
</ion-label>
</div>
<div class="font-25" (click)="clear()">
<ion-icon name="close"></ion-icon>
</div>
</ion-item>
</div>
</div>
<div class="picture d-flex pb-5 hide-desktop" *ngIf="!( publication.FileBase64 == 'data:image/jpg;base64,null' || publication.FileBase64 == '' )">
<div class="picture d-flex pb-5 hide-desktop" *ngIf="publication && !( publication.FileBase64 == 'data:image/jpg;base64,null' || publication.FileBase64 == '' ) && !capturedImage">
<div class="post-img" *ngIf="publication.FileBase64">
<img src="{{publication.FileBase64}}" alt="image" >
</div>
<div class="d-flex flex-column pl-10" *ngIf="publication.FileBase64">
<div class="picture-file-name">{{publication.OriginalFileName}}.{{publication.FileExtension}}</div>
<div class="size">75 Kb</div>
<!-- <div class="size">75 Kb</div> -->
</div>
<div class="flex-grow-1 d-flex align-center justify-end" *ngIf="publication.FileBase64">
<div style="color: red;">X</div>
<div class="flex-grow-1 d-flex align-center justify-end font-25" *ngIf="publication.FileBase64" (click)="deletePublicationImage()">
<ion-icon name="close"></ion-icon>
</div>
</div>
@@ -101,10 +99,7 @@
</button>
</ion-buttons>
<ion-buttons slot="end">
<button *ngIf="publicationType == '2' || publicationType == '1'" class="btn-ok" fill="clear" color="#fff" (click)="save()">
<ion-label>Criar</ion-label>
</button>
<button *ngIf="publicationType == '3'" class="btn-ok" fill="clear" color="#fff" (click)="save()">
<button class="btn-ok" fill="clear" color="#fff" (click)="save()">
<ion-label>Gravar</ion-label>
</button>
</ion-buttons>
@@ -55,9 +55,11 @@ ion-toolbar{
background: #ffffff;
height: 100%;
box-shadow: 0px 0px 18px rgba(0, 0, 0, 0.6);
padding: 25px 20px 0 20px;
overflow: auto;
}
.padding{
padding: 25px 20px 0 20px;
}
.title-content{
margin: 0px auto;
padding: 0 !important;
@@ -125,6 +125,7 @@ export class NewPublicationPage implements OnInit {
this.convertBlobToBase64Worker.postMessage(blob);
this.convertBlobToBase64Worker.onmessage = async (oEvent)=> {
this.capturedImage = oEvent.data
this.capturedImageTitle = 'foto'
}
}
@@ -186,6 +187,7 @@ export class NewPublicationPage implements OnInit {
this.convertBlobToBase64Worker.postMessage(blob);
this.convertBlobToBase64Worker.onmessage = async (oEvent)=> {
this.capturedImage = oEvent.data
this.capturedImageTitle = 'foto'
}
@@ -357,6 +359,7 @@ export class NewPublicationPage implements OnInit {
}
clear() {
this.capturedImageTitle = '';
this.capturedImage = '';
}
@@ -375,30 +378,6 @@ export class NewPublicationPage implements OnInit {
}
}
/* async openGallery() {
const modal = await this.modalController.create({
component: GalleryPage,
componentProps:{
},
cssClass: 'new-publication',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss();
} */
/* async takePicture(){
const image = await Plugins.Camera.getPhoto({
quality: 100,
allowEditing: false,
resultType: CameraResultType.DataUrl,
source: CameraSource.Camera
});
this.photo = this.sanitizer.bypassSecurityTrustResourceUrl(image && (image.dataUrl));
} */
async selectImage() {
const image = await Camera.getPhoto({
quality: 90,
@@ -453,26 +432,6 @@ export class NewPublicationPage implements OnInit {
});
await loading.present();
/* Filesystem.readdir({
path: `${IMAGE_DIR}/${fileName}`,
directory: Directory.Data,
}).then(result => {
let lastphoto = result.files[result.files.length - 1]
this.loadFileData(lastphoto);
},
async (err) => {
// Folder does not yet exists!
await Filesystem.mkdir({
path: IMAGE_DIR,
directory: Directory.Data,
recursive: true
});
}
).then(_ => {
loading.dismiss();
}); */
}
async loadFileData(fileName: string) {
@@ -506,22 +465,6 @@ export class NewPublicationPage implements OnInit {
}
/* compressImage() {
let image = this.capturedImage;
this.imageCompress.compressFile(image, orientation, 50, 50,).then(() => {
this.imgResultBeforeCompress = image;
this.imageCompress.compressFile(image, orientation, 50, 50).then(
result => {
this.imgResultAfterCompress = result;
}
);
})
} */
compressFile() {
//this.imgResultBeforeCompress = image;s
@@ -538,5 +481,7 @@ export class NewPublicationPage implements OnInit {
}
deletePublicationImage() {
this.publication.FileBase64 = ""
}
}