diff --git a/src/app/app.module.ts b/src/app/app.module.ts index f721322e2..21fd97ea0 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -13,7 +13,7 @@ import { HttpClientModule } from '@angular/common/http'; import { InAppBrowser } from '@ionic-native/in-app-browser/ngx'; -import { File } from '@ionic-native/File/ngx'; +//import { File } from '@ionic-native/File/ngx'; import { WebView } from '@ionic-native/ionic-webview/ngx'; import { FilePath } from '@ionic-native/file-path/ngx'; import { Camera } from '@ionic-native/camera/ngx'; @@ -35,7 +35,7 @@ import { IonicStorageModule } from '@ionic/storage'; { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }, InAppBrowser, Camera, - File, + //File, WebView, FilePath, ], diff --git a/src/app/home/home.page.html b/src/app/home/home.page.html index 1fa8391bd..1b249bcbc 100644 --- a/src/app/home/home.page.html +++ b/src/app/home/home.page.html @@ -20,7 +20,7 @@ - Ações + Acções - Presidente da República - - - - - - - - - - - Combinada - - - Oficial - - - Pessoal - - - + - + + -

{{customDate}}

+

{{customDate}}

+
+ +

5 eventtos agendados para hoje

- - - -
- - - - - - - -
- - -
-
-

{{event.StartDate | date: 'hh:mm'}}

-

{{event.EndDate | date: 'hh:mm'}}

-
-
-

{{event.Location}}

-

{{event.Subject}}

-
-
-
-
-
-
- - - -
- - -
-
-

{{event.StartDate | date: 'hh:mm'}}

-

{{event.EndDate | date: 'hh:mm'}}

-
-
-

{{event.Location}}

-

{{event.Subject}}

-
-
-
-
-
-
- - - -
- - -
-
-

{{event.StartDate | date: 'hh:mm'}}

-

{{event.EndDate | date: 'hh:mm'}}

-
-
-

{{event.Location}}

-

{{event.Subject}}

-
-
-
-
-
-
-
-
+
+
08:30
+
Reunião de Conselho de Ministros no Palácio Presidencial
+
+ +
\ No newline at end of file diff --git a/src/app/pages/events/events.page.scss b/src/app/pages/events/events.page.scss index cae4ec29a..07435b4d8 100644 --- a/src/app/pages/events/events.page.scss +++ b/src/app/pages/events/events.page.scss @@ -266,4 +266,11 @@ ion-toolbar{ bottom: 15px; right: 14px; color: #e16817; - } \ No newline at end of file + } + + +.next-meeting{ + display: flex; + justify-content: center; + margin: 0px auto; +} \ No newline at end of file diff --git a/src/app/pages/publications/gallery/gallery.page.ts b/src/app/pages/publications/gallery/gallery.page.ts index c825ac2aa..bdcead0fa 100644 --- a/src/app/pages/publications/gallery/gallery.page.ts +++ b/src/app/pages/publications/gallery/gallery.page.ts @@ -20,5 +20,4 @@ export class GalleryPage implements OnInit { } - } diff --git a/src/app/pages/publications/new-action/new-action.page.html b/src/app/pages/publications/new-action/new-action.page.html index 7ac37fae9..8df1b933a 100644 --- a/src/app/pages/publications/new-action/new-action.page.html +++ b/src/app/pages/publications/new-action/new-action.page.html @@ -19,7 +19,7 @@
- Nova Ação + Nova Acção
@@ -82,7 +82,7 @@
- +
diff --git a/src/app/pages/publications/new-publication/new-publication.page.ts b/src/app/pages/publications/new-publication/new-publication.page.ts index 5d912d9dc..ee3389064 100644 --- a/src/app/pages/publications/new-publication/new-publication.page.ts +++ b/src/app/pages/publications/new-publication/new-publication.page.ts @@ -52,6 +52,7 @@ export class NewPublicationPage implements OnInit { private publications: PublicationsService, private camera: Camera, ) { + this.publicationType = this.navParams.get('publicationType'); this.folderId = this.navParams.get('folderId'); this.publicationTitle = 'Nova Publicação'; @@ -106,8 +107,11 @@ export class NewPublicationPage implements OnInit { async save(){ if(this.publicationType == '3'){ + console.log(this.navParams.get('publication')); + if(this.capturedImage != ''){ this.publication = { + DateIndex: this.publication.DateIndex, DocumentId:this.publication.DocumentId, ProcessId:this.publication.ProcessId, Title: this.pub.Title, @@ -115,7 +119,7 @@ export class NewPublicationPage implements OnInit { DatePublication: this.publication.DatePublication, OriginalFileName: this.capturedImageTitle, FileBase64: this.capturedImage, - FileExtension: 'jpg', + FileExtension: 'jpeg', } console.log('Edit change image'); console.log(this.publication); @@ -124,14 +128,15 @@ export class NewPublicationPage implements OnInit { } else{ this.publication = { + DateIndex: this.publication.DateIndex, DocumentId:this.publication.DocumentId, ProcessId:this.publication.ProcessId, Title: this.pub.Title, Message: this.pub.Message, DatePublication: this.publication.DatePublication, - OriginalFileName: '', + OriginalFileName: this.publication.OriginalFileName, FileBase64: this.publication.FileBase64, - FileExtension: 'jpg', + FileExtension: 'jpeg', } console.log('Edit - keep image'); console.log(this.publication); @@ -142,6 +147,7 @@ export class NewPublicationPage implements OnInit { else{ this.publication = { + DateIndex: new Date(), DocumentId:null, ProcessId:this.folderId, Title: this.pub.Title, @@ -149,7 +155,7 @@ export class NewPublicationPage implements OnInit { DatePublication: new Date(), OriginalFileName: this.capturedImageTitle, FileBase64: this.capturedImage, - FileExtension: 'jpg', + FileExtension: 'jpeg', } console.log('Create'); diff --git a/src/app/pages/publications/publications.page.html b/src/app/pages/publications/publications.page.html index a40b1b5ce..70e30b792 100644 --- a/src/app/pages/publications/publications.page.html +++ b/src/app/pages/publications/publications.page.html @@ -21,7 +21,7 @@
- Ações Presidenciais + Acções Presidenciais
diff --git a/src/app/pages/publications/publications.page.ts b/src/app/pages/publications/publications.page.ts index 2881b7fe4..dbde526c8 100644 --- a/src/app/pages/publications/publications.page.ts +++ b/src/app/pages/publications/publications.page.ts @@ -52,9 +52,10 @@ export class PublicationsPage implements OnInit { }); } doRefresh(event) { - this.getActions(); + /* this.getActions(); */ setTimeout(() => { + this.getActions(); event.target.complete(); }, 2000); } @@ -83,8 +84,8 @@ export class PublicationsPage implements OnInit { else{ this.publicationsTravelFolderList.push(folder); } + this.showLoader = false; }); - }); } diff --git a/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts b/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts index 8817801af..3bd5967dc 100644 --- a/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts +++ b/src/app/pages/publications/view-publications/publication-detail/publication-detail.page.ts @@ -24,6 +24,7 @@ export class PublicationDetailPage implements OnInit { this.publicationId = this.navParams.get('publicationId'); this.folderId = this.navParams.get('folderIdId'); this.publication = { + DateIndex: null, DocumentId: '', ProcessId:'', Title:'', @@ -40,6 +41,13 @@ export class PublicationDetailPage implements OnInit { /* console.log(this.publication.FileBase64); */ this.getPublicationDetail(); } + doRefresh(event) { + this.getPublicationDetail(); + + setTimeout(() => { + event.target.complete(); + }, 2000); + } getPublicationDetail(){ this.showLoader = true; @@ -47,15 +55,17 @@ export class PublicationDetailPage implements OnInit { console.log(this.folderId); this.publications.GetPublicationById(this.folderId,this.publicationId).subscribe(res=>{ console.log(res); + /* this.publication = res; */ this.publication = { + DateIndex: res.DateIndex, DocumentId: res.DocumentId, ProcessId:res.ProcessId, Title:res.Title, Message: res.Message, DatePublication: res.DatePublication, FileBase64: "data:image/jpg;base64," + res.FileBase64, - OriginalFileName: '', - FileExtension: '', + OriginalFileName: res.OriginalFileName, + FileExtension: 'jpeg', } this.showLoader = false; }); @@ -78,7 +88,6 @@ export class PublicationDetailPage implements OnInit { async editPost(publicationType:any) { console.log(this.publication); - const modal = await this.modalController.create({ component: NewPublicationPage, componentProps:{ @@ -90,7 +99,9 @@ export class PublicationDetailPage implements OnInit { }); await modal.present(); modal.onDidDismiss().then(()=>{ - this.getPublicationDetail(); + setTimeout(() => { + this.getPublicationDetail(); + }, 5000); }); } diff --git a/src/app/pages/publications/view-publications/view-publications.page.ts b/src/app/pages/publications/view-publications/view-publications.page.ts index 522d3baa4..313a97078 100644 --- a/src/app/pages/publications/view-publications/view-publications.page.ts +++ b/src/app/pages/publications/view-publications/view-publications.page.ts @@ -35,8 +35,9 @@ export class ViewPublicationsPage implements OnInit { this.getPublications(); setTimeout(() => { - /* event.target.complete(); */ - }, 2000); + this.getPublications(); + event.target.complete(); + }, 3000); } close(){ this.modalController.dismiss(); @@ -54,6 +55,7 @@ export class ViewPublicationsPage implements OnInit { format: 'png' } let item: Publication = { + "DateIndex": element.DateIndex, "DocumentId":element.DocumentId, "ProcessId":element.ProcessId, "Title":element.Title, diff --git a/src/app/shared/header/header.page.html b/src/app/shared/header/header.page.html index 49c3e1cac..3e9412eba 100644 --- a/src/app/shared/header/header.page.html +++ b/src/app/shared/header/header.page.html @@ -1,14 +1,26 @@ -
- - -
- -
-
+ + + + + + + + + + + +
+ +
+
+
+ +
+
- + \ No newline at end of file diff --git a/src/app/shared/header/header.page.scss b/src/app/shared/header/header.page.scss index cf8935c63..59eae0c69 100644 --- a/src/app/shared/header/header.page.scss +++ b/src/app/shared/header/header.page.scss @@ -1,28 +1,31 @@ -.div-top-header{ - width: 400px; - margin: 0 auto; - background-color: #0782c9; - overflow: auto; - padding-top: 15px; - border: 0!important; +@import '~src/function.scss'; - .div-search{ - font-size: 45px; - float: left; - margin: 0 0 0 10px - } - .div-logo{ - background: transparent; - width: 140px; - margin: 5px 0 0px 71px; - float: left; - } - .div-logo img{ - width: 100%; - } - .div-profile{ - font-size: 45px; - float: right; - margin-right: 10px; - } - } \ No newline at end of file +.div-top-header{ + margin: 0 auto; + background-color: #0782c9; + overflow: auto; + padding-top: em(15px); + border: 0!important; + + .div-search{ + font-size: 45px; + margin: 0 0 0 10px + } + .div-logo{ + background: transparent; + width: em(140px); + margin: 0px auto; + margin-top: 5px; + justify-content: center; + display: flex; + } + .div-logo img{ + width: 100%; + margin: 0px auto; + } + .div-profile{ + font-size: 45px; + float: right; + margin-right: em(10px); + } +} \ No newline at end of file diff --git a/src/function.scss b/src/function.scss new file mode 100644 index 000000000..818b0bb66 --- /dev/null +++ b/src/function.scss @@ -0,0 +1,60 @@ + +// =============== Custom function ============================== + +// convert string number to int or double +@function to-number($value) { + @if type-of($value) == 'number' { + @return $value; + } @else if type-of($value) != 'string' { + @error 'Value for `to-number` should be a number or a string.'; + } + + $result: 0; + $digits: 0; + $minus: str-slice($value, 1, 1) == '-'; + $numbers: ('0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9); + + @for $i from if($minus, 2, 1) through str-length($value) { + $character: str-slice($value, $i, $i); + + @if (index(map-keys($numbers), $character) or $character == '.') { + @if $character == '.' { + $digits: 1; + } @else if $digits == 0 { + $result: $result * 10 + map-get($numbers, $character); + } @else { + $digits: $digits * 10; + $result: $result + map-get($numbers, $character) / $digits; + } + } + } + + @return if($minus, -$result, $result);; + } + + // convert px to rem + @function rem($size) { + $remSize: to-number($size) / 16; + //Default font size on html is 16px; + @return #{$remSize}rem; + } + + // convert px to em + @function em($size) { + $remSize: to-number($size) / 16px; + @return #{$remSize}em; + } + + // convert pt to rem + @function pt-rem($size) { + $pxSize: to-number($size) * 1.328147; + $remSize: $pxSize / 16; + @return #{$remSize}rem; + } + + // convert pt to em + @function pt-em($size) { + $pxSize: to-number($size) * 1.328147; + $remSize: $pxSize / 16; + @return #{$remSize}em; + } \ No newline at end of file