mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -216,9 +216,9 @@
|
||||
|
||||
<!-- List -->
|
||||
<ul *ngIf="showTimelineFilterState">
|
||||
<li [class.active]="segment == 'Combinado' " (click)="changeSegment('Combinado')" class="cursor-pointer">Todos</li>
|
||||
<li [class.active]="segment == 'Oficial' " (click)="changeSegment('Oficial')" class="cursor-pointer">Oficial</li>
|
||||
<li [class.active]="segment == 'Pessoal' " (click)="changeSegment('Pessoal')" class="cursor-pointer">Pessoal</li>
|
||||
<li class="changeText" [class.active]="segment == 'Combinado' " (click)="changeSegment('Combinado')" class="cursor-pointer">Todos</li>
|
||||
<li class="changeText" [class.active]="segment == 'Oficial' " (click)="changeSegment('Oficial')" class="cursor-pointer">Oficial</li>
|
||||
<li class="changeText" [class.active]="segment == 'Pessoal' " (click)="changeSegment('Pessoal')" class="cursor-pointer">Pessoal</li>
|
||||
</ul>
|
||||
|
||||
</ion-row>
|
||||
|
||||
@@ -292,6 +292,11 @@ td.monthview-primary-with-event {
|
||||
|
||||
.segment {
|
||||
|
||||
}
|
||||
|
||||
div ion-raw > ul > li{
|
||||
font-size: 11pt;
|
||||
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
|
||||
}
|
||||
|
||||
/* Timeline */
|
||||
@@ -794,4 +799,17 @@ app-approve-event{
|
||||
border-top-right-radius: 25px;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
|
||||
$font-size: 11pt;
|
||||
|
||||
.changeText{
|
||||
font-family: $font-family;
|
||||
font-size: $font-size;
|
||||
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@ import { Filesystem, Directory, Encoding } from '@capacitor/filesystem';
|
||||
import { VoiceRecorder, VoiceRecorderPlugin, RecordingData, GenericResponse, CurrentRecordingStatus } from 'capacitor-voice-recorder';
|
||||
import { Haptics, ImpactStyle } from '@capacitor/haptics';
|
||||
import { PreviewCameraPage } from 'src/app/modals/preview-camera/preview-camera.page';
|
||||
// import { SocialSharing } from '@ionic-native/social-sharing/ngx';
|
||||
import { Share } from '@capacitor/share';
|
||||
|
||||
const IMAGE_DIR = 'stored-images';
|
||||
|
||||
@@ -88,7 +90,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
private gestureController: GestureController,
|
||||
private processes: ProcessesService,
|
||||
public ThemeService: ThemeService,
|
||||
private changeDetectorRef: ChangeDetectorRef
|
||||
private changeDetectorRef: ChangeDetectorRef,
|
||||
// private socialSharing: SocialSharing
|
||||
) {
|
||||
this.loggedUser = authService.ValidatedUserChat['data'];
|
||||
this.roomId = this.navParams.get('roomId');
|
||||
@@ -652,6 +655,7 @@ touchStart(card) {
|
||||
modal.present();
|
||||
}
|
||||
|
||||
|
||||
imageSize(img){
|
||||
var canvas = document.createElement('canvas');
|
||||
var ctx = canvas.getContext('2d');
|
||||
@@ -670,6 +674,16 @@ getPicture(img){
|
||||
document.body.appendChild(canvas);
|
||||
|
||||
}
|
||||
|
||||
// async ShareEmail(msg){
|
||||
// // Check if sharing via email is supported
|
||||
// await Share.share({
|
||||
// title: msg.u.username,
|
||||
// text: msg._updatedAt,
|
||||
// url: msg.attachments[0].image_url,
|
||||
// dialogTitle: 'Share with buddies',
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import { Camera, CameraResultType, CameraSource, Photo } from '@capacitor/camera
|
||||
|
||||
import { Filesystem, Directory } from '@capacitor/filesystem';
|
||||
import { NgxImageCompressService } from "ngx-image-compress";
|
||||
|
||||
import { SocialSharing } from '@ionic-native/social-sharing/ngx';
|
||||
const IMAGE_DIR = 'stored-images';
|
||||
|
||||
interface LocalFile {
|
||||
@@ -87,7 +87,8 @@ export class NewPublicationPage implements OnInit {
|
||||
public ThemeService: ThemeService,
|
||||
private platform: Platform,
|
||||
private loadingCtrl: LoadingController,
|
||||
public imageCompress: NgxImageCompressService
|
||||
public imageCompress: NgxImageCompressService,
|
||||
private socialSharing: SocialSharing
|
||||
) {
|
||||
|
||||
this.publicationType = this.navParams.get('publicationType');
|
||||
@@ -111,6 +112,8 @@ export class NewPublicationPage implements OnInit {
|
||||
const image = await Camera.getPhoto({
|
||||
quality: 20,
|
||||
allowEditing: false,
|
||||
width:50,
|
||||
height: 50,
|
||||
resultType: CameraResultType.Uri,
|
||||
source: CameraSource.Camera // Camera, Photos or Prompt!
|
||||
|
||||
@@ -120,6 +123,8 @@ export class NewPublicationPage implements OnInit {
|
||||
this.saveImage(image)
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -393,8 +398,6 @@ export class NewPublicationPage implements OnInit {
|
||||
this.photo = this.sanitizer.bypassSecurityTrustResourceUrl(image && (image.dataUrl));
|
||||
} */
|
||||
|
||||
|
||||
|
||||
async selectImage() {
|
||||
const image = await Camera.getPhoto({
|
||||
quality: 20,
|
||||
@@ -402,7 +405,6 @@ export class NewPublicationPage implements OnInit {
|
||||
resultType: CameraResultType.Uri,
|
||||
source: CameraSource.Camera // Camera, Photos or Prompt!
|
||||
});
|
||||
|
||||
if (image) {
|
||||
this.saveImage(image)
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import { PublicationDetailPageModule } from 'src/app/shared/publication/view-pub
|
||||
import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
||||
import { EditActionPageModule } from 'src/app/shared/publication/edit-action/edit-action.module';
|
||||
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||
import { LazyLoadImageModule } from 'ng-lazyload-image'; // <-- import it
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -29,6 +30,7 @@ import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||
PublicationDetailPageModule,
|
||||
NewActionPageModule,
|
||||
EditActionPageModule,
|
||||
LazyLoadImageModule
|
||||
],
|
||||
declarations: [
|
||||
PublicationsPage,
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
|
||||
<div class="post-item overflow-y-auto">
|
||||
<div *ngIf="publication.FileBase64.length > 30" class="post-img">
|
||||
<img src="{{publication.FileBase64}}" alt="image" tappable (click)="openPreview(publication.FileBase64)">
|
||||
<img src="{{publication.FileBase64}}" alt="image" >
|
||||
</div>
|
||||
<div *ngIf="publication.FileBase64.length < 30" class="post-img">
|
||||
<img src="/assets/icon/icon-no-image.svg" alt="image">
|
||||
|
||||
@@ -10,6 +10,9 @@ import { ViewPublicationsPage } from './view-publications.page';
|
||||
|
||||
import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
||||
|
||||
import { LazyLoadImageModule } from 'ng-lazyload-image'; // <-- import it
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
@@ -18,6 +21,7 @@ import { HeaderPageModule } from 'src/app/shared/header/header.module';
|
||||
|
||||
ViewPublicationsPageRoutingModule,
|
||||
HeaderPageModule,
|
||||
LazyLoadImageModule
|
||||
],
|
||||
exports: [ViewPublicationsPage],
|
||||
declarations: [ViewPublicationsPage]
|
||||
|
||||
@@ -13,6 +13,7 @@ import { PublicationDetailPage } from './publication-detail/publication-detail.p
|
||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { forkJoin } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-publications',
|
||||
@@ -25,7 +26,9 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
publicationList: Publication[] = new Array();
|
||||
item: PublicationFolder;
|
||||
defaultImage = "https://governo.gov.ao/ao/noticias/presidente-joao-lourenco-ouviu-a-voz-da-igreja/"
|
||||
folderId: string;
|
||||
id: string;
|
||||
error: any;
|
||||
|
||||
publicationListStorage = PublicationListStorage
|
||||
@@ -65,8 +68,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
if (typeof (this.folderId) == 'object') {
|
||||
this.folderId = this.folderId['ProcessId']
|
||||
}
|
||||
|
||||
this.getPublicationsIds()
|
||||
this.testForkJoin()
|
||||
this.getPublicationDetail();
|
||||
setTimeout(() => {
|
||||
this.getPublicationsIds();
|
||||
@@ -74,7 +76,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
this.backgroundservice.registerBackService('Online', () => {
|
||||
this.getPublicationDetail();
|
||||
this.getPublicationsIds();
|
||||
this.testForkJoin()
|
||||
|
||||
})
|
||||
|
||||
@@ -86,14 +88,19 @@ export class ViewPublicationsPage implements OnInit {
|
||||
this.folderId = this.folderId['ProcessId']
|
||||
}
|
||||
|
||||
// if (typeof (this.id == 'object') {
|
||||
// this.id = this.id['ProcessId']
|
||||
// }
|
||||
this.testForkJoin()
|
||||
this.getPublicationDetail();
|
||||
this.getPublicationsIds();
|
||||
// this.getPublicationsIds();
|
||||
}
|
||||
|
||||
doRefresh = (event) => {
|
||||
setTimeout(() => {
|
||||
this.testForkJoin()
|
||||
this.getPublicationDetail();
|
||||
this.getPublicationsIds();
|
||||
// this.getPublicationsIds();
|
||||
event.target.complete();
|
||||
}, 3000);
|
||||
|
||||
@@ -120,13 +127,24 @@ export class ViewPublicationsPage implements OnInit {
|
||||
}, 100);
|
||||
|
||||
}
|
||||
// goes to fork
|
||||
// getPublicationsIds() {
|
||||
|
||||
// this.showLoader = true;
|
||||
// const folderId = this.folderId
|
||||
|
||||
// this.publications.GetIdsPublicationsImages(this.id).subscribe(res => {
|
||||
|
||||
// console.log(this.id)
|
||||
|
||||
// this.publicationList = new Array();
|
||||
|
||||
getPublicationsIds() {
|
||||
|
||||
this.showLoader = true;
|
||||
const folderId = this.folderId
|
||||
|
||||
this.publications.GetPublicationsID(this.folderId).subscribe(res => {
|
||||
this.publications.GetPublicationsImages(this.folderId).subscribe(res => {
|
||||
|
||||
console.log('publications ids', res)
|
||||
this.publicationList = new Array();
|
||||
@@ -210,6 +228,17 @@ export class ViewPublicationsPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
testForkJoin(){
|
||||
forkJoin([
|
||||
this.getPublicationsIds(),
|
||||
this.getPublications(),
|
||||
|
||||
|
||||
]).subscribe(allResults =>{
|
||||
this.publicationList = allResults[2]
|
||||
})
|
||||
}
|
||||
|
||||
getFromDB() {
|
||||
|
||||
this.sqliteservice.getActionById(this.folderId).then((publications) => {
|
||||
|
||||
Reference in New Issue
Block a user