fix 1 to 100%

This commit is contained in:
Peter Maquiran
2024-04-18 16:32:28 +01:00
parent b8200ffb68
commit 8a88d91b5a
8 changed files with 57 additions and 31 deletions
+21
View File
@@ -4,6 +4,27 @@ export const Cy = {
b: { b: {
enter: 'loginbutton' enter: 'loginbutton'
} }
},
gabinete: {
aside: {
despacho: 'cypress-despacho-item'
},
},
search: {
input: {
subject: 'cy-subject-input'
},
b: {
search:'cy-search-button'
}
} }
},
header: {
b: {
search: 'cy-search-button'
}
},
footer: {
gabinete: 'cypress-gabinete-tab',
} }
} }
+15 -15
View File
@@ -291,7 +291,7 @@ export class AgendaPage implements OnInit {
try { try {
this.myCal.update(); this.myCal.update();
this.myCal.loadEvents(); this.myCal.loadEvents();
this.onDropDownScrollWeal() // this.onDropDownScrollWeal()
} catch (e) { } } catch (e) { }
//this.reloadCalendar(); //this.reloadCalendar();
@@ -438,19 +438,19 @@ export class AgendaPage implements OnInit {
}; };
onDropDownScrollWeal() { // onDropDownScrollWeal() {
try { // try {
setTimeout(() => { // setTimeout(() => {
document.querySelector('.dropdown-scroll-weel').querySelectorAll('.active')[0].scrollIntoView({ behavior: 'smooth', block: 'center' }); // document.querySelector('.dropdown-scroll-weel').querySelectorAll('.active')[0].scrollIntoView({ behavior: 'smooth', block: 'center' });
setTimeout(() => { // setTimeout(() => {
document.querySelector('.dropdown-scroll-weel').querySelectorAll('.active')[1].scrollIntoView({ behavior: 'smooth', block: 'center' }); // document.querySelector('.dropdown-scroll-weel').querySelectorAll('.active')[1].scrollIntoView({ behavior: 'smooth', block: 'center' });
}, 300) // }, 300)
}, 10) // }, 10)
} catch (error) { // } catch (error) {
// console.log(error) // // console.log(error)
} // }
} // }
currentMoth = { currentMoth = {
@@ -795,7 +795,7 @@ export class AgendaPage implements OnInit {
try { try {
this.myCal.update(); this.myCal.update();
this.myCal.loadEvents(); this.myCal.loadEvents();
this.onDropDownScrollWeal() // this.onDropDownScrollWeal()
} catch (e) { } } catch (e) { }
this.updateEventListBox() this.updateEventListBox()
@@ -817,7 +817,7 @@ export class AgendaPage implements OnInit {
try { try {
this.myCal.update(); this.myCal.update();
this.myCal.loadEvents(); this.myCal.loadEvents();
this.onDropDownScrollWeal() // this.onDropDownScrollWeal()
} catch (e) { } } catch (e) { }
this.updateEventListBox() this.updateEventListBox()
@@ -713,13 +713,10 @@ export class NewPublicationPage implements OnInit {
.then(async (content) => { .then(async (content) => {
this.filecontent = true; this.filecontent = true;
const file = new File([element.blob], element.name);
const newAttachment = new PublicationAttachmentEntity( const newAttachment = new PublicationAttachmentEntity(
{ {
base64: 'data:video/mp4;base64,' + content.data, base64: content.data,
extension: 'mp4', extension: 'mp4',
blobFile: file,
FileType: this.checkFileType.checkFileType('mp4') as any, FileType: this.checkFileType.checkFileType('mp4') as any,
OriginalFileName: 'load video' OriginalFileName: 'load video'
} }
@@ -763,13 +760,10 @@ export class NewPublicationPage implements OnInit {
this.filecontent = true; this.filecontent = true;
const file = new File([element.blob], element.name);
window['a'] = element
const newAttachment = new PublicationAttachmentEntity( const newAttachment = new PublicationAttachmentEntity(
{ {
base64: 'data:video/mp4;base64,' + content.data, base64: content.data,
extension: 'mp4', extension: 'mp4',
blobFile: file,
FileType: this.checkFileType.checkFileType('mp4') as any, FileType: this.checkFileType.checkFileType('mp4') as any,
OriginalFileName: 'load video' OriginalFileName: 'load video'
} }
+6 -6
View File
@@ -54,18 +54,18 @@
</button> </button>
</div> --> </div> -->
<div class="input-text d-flex ion-align-items-center pm-10 pl-10"> <div class="input-text d-flex ion-align-items-center pm-10 pl-10">
<ion-input (keyup.enter)="basicSearch()" [(ngModel)]='searchSubject' class="search-input" type="search" <ion-input (keyup.enter)="basicSearch()" [(ngModel)]='searchSubject' class="search-input {{Cy.p.search.input.subject}}" type="search"
placeholder="Assunto"></ion-input> placeholder="Assunto"></ion-input>
</div> </div>
<!-- <div (click)="clearSearchInput()" class="d-flex align-center icon"> <!-- <div (click)="clearSearchInput()" class="d-flex align-center icon">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-25" name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-25" name="restaurant-outline" src="assets/images/icons-search-close.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-25" name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon> <ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-25" name="restaurant-outline" src="assets/images/theme/gov/icons-search-close.svg"></ion-icon>
</div> --> </div> -->
</div> </div>
<div (click)="basicSearch()" class="d-flex align-center searchChild pl-10"> <div (click)="basicSearch()" class="d-flex align-center searchChild pl-10 {{Cy.p.search.b.search}}">
<ion-icon class="icon-z" slot="end" src="assets/images/theme/gov/icons-search.svg"></ion-icon> <ion-icon class="icon-z" slot="end" src="assets/images/theme/gov/icons-search.svg"></ion-icon>
@@ -316,4 +316,4 @@
</div> </div>
</div> </div>
</ion-content> </ion-content>
+4 -1
View File
@@ -17,6 +17,7 @@ import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker'; import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker'; import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
import { momentG } from 'src/plugin/momentG'; import { momentG } from 'src/plugin/momentG';
import { Cy } from 'cypress/enum'
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = { const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: { parse: {
@@ -98,6 +99,8 @@ export class SearchPage implements OnInit {
@ViewChild('picker1') picker1: any; @ViewChild('picker1') picker1: any;
checkAgenda: boolean; checkAgenda: boolean;
Cy = Cy
constructor(private modalController: ModalController, constructor(private modalController: ModalController,
private search: SearchService, private search: SearchService,
private modalCtrl: ModalController, private modalCtrl: ModalController,
@@ -270,7 +273,7 @@ export class SearchPage implements OnInit {
}, },
); );
// console.log('set visualy') // console.log('set visualy')
}, 300) }, 1000)
}); });
} }
+1 -1
View File
@@ -4,7 +4,7 @@
<div class="mobile pt-20 d-flex div-top-header justify-space-between"> <div class="mobile pt-20 d-flex div-top-header justify-space-between">
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="div-search viewport-font-size"> <div title="Pesquisa" *ngIf="!hideSearchBtn" class="div-search viewport-font-size">
<div (click)="openSearch()"> <div (click)="openSearch()" class="{{Cy.header.b.search}}">
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="font-45-em" <ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="font-45-em"
src="assets/images/theme/doneIt/icons-search.svg"></ion-icon> src="assets/images/theme/doneIt/icons-search.svg"></ion-icon>
<ion-icon *ngIf=" ThemeService.currentTheme == 'default' " class="font-45-em" <ion-icon *ngIf=" ThemeService.currentTheme == 'default' " class="font-45-em"
+3
View File
@@ -18,6 +18,7 @@ import { AttachmentsService } from 'src/app/services/attachments.service';
import { NotificationHolderService } from 'src/app/store/notification-holder.service'; import { NotificationHolderService } from 'src/app/store/notification-holder.service';
import { HeaderSettingsService } from "src/app/services/header-settings.service" import { HeaderSettingsService } from "src/app/services/header-settings.service"
import { PublicationHolderService } from 'src/app/services/publication/publication-holder.service' import { PublicationHolderService } from 'src/app/services/publication/publication-holder.service'
import { Cy } from 'cypress/enum'
@Component({ @Component({
selector: 'app-header', selector: 'app-header',
templateUrl: './header.page.html', templateUrl: './header.page.html',
@@ -53,6 +54,8 @@ export class HeaderPage implements OnInit {
} }
} }
Cy = Cy
constructor( constructor(
private router: Router, private router: Router,
private modalController: ModalController, private modalController: ModalController,
@@ -101,6 +101,11 @@ export class PublicationFromMvService {
return e return e
}) })
} else {
window['upload-header-set-retry'](this.id)
this.toastService._badRequest("ocorreu um erro ao enviar o ficheiro")
return true
// loader.remove()
} }
const publication: any = Object.assign({}, this.form) const publication: any = Object.assign({}, this.form)