Skip to content

Commit

Permalink
Merge pull request #171 from e-picsa/hotfix/manual
Browse files Browse the repository at this point in the history
Hotfix/manual
  • Loading branch information
chrismclarke authored Jul 23, 2023
2 parents 4f16e2b + 20da5fa commit 144613a
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 26 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions apps/picsa-apps/extension-app-native/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "io.picsa.extension"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 3031000
versionName "3.31.0"
versionCode 3031001
versionName "3.31.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@
"@capacitor-community/firebase-crashlytics",
"@capacitor-firebase/performance"
],
"plugins": {
"CapacitorHttp": {
"enabled": true
}
},
"server": {
"cleartext": true
}
Expand Down
11 changes: 6 additions & 5 deletions apps/picsa-apps/extension-app-native/capacitor.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ const config: CapacitorConfig = {
],
// Enable app to use native http for requests (bypass cors)
// https://capacitorjs.com/docs/apis/http
plugins: {
CapacitorHttp: {
enabled: true,
},
},
// TODO - check if resources still work as intended once enabled
// plugins: {
// CapacitorHttp: {
// enabled: true,
// },
// },
server: {
/** Uncomment and replace with local ip to serve live-reload */

Expand Down
5 changes: 5 additions & 0 deletions apps/picsa-tools/manual-tool/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
"input": "apps/picsa-tools/resources-tool/src/assets/resources",
"output": "/assets/resources"
},
{
"glob": "picsa-manual-farmer.pdf",
"input": "apps/picsa-tools/resources-tool/src/assets/resources",
"output": "/assets/resources"
},
{
"glob": "{*.min.js,op-chaining-support.js,cmaps/*,images/*,locale/en-GB/*,locale/locale.properties,standard_fonts/**}",
"input": "node_modules/ngx-extended-pdf-viewer/assets/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@

<!-- <pdf-find-button [showFindButton]="true" [textLayer]="true"></pdf-find-button> -->
</div>
<div [class.invisible]="false" id="toolbarViewerMiddle">
<!-- Only show zoom in/out buttons on web (native uses pinch zoom) -->
<div [class.invisible]="false" id="toolbarViewerMiddle" *ngIf="!isNative">
<pdf-zoom-out id="zoomOut"></pdf-zoom-out>
<pdf-zoom-in id="zoomIn"></pdf-zoom-in>
</div>
<div id="toolbarViewerRight">
<pdf-paging-area></pdf-paging-area>
<pdf-paging-area> </pdf-paging-area>
</div>
</div>
</ng-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ ngx-extended-pdf-viewer {
.toolbarButton {
color: var(--color-primary-contrast) !important;
}

// hide first/last page buttons
#primaryFirstPage,
#primaryLastPage {
display: none;
}
}

.error-message {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component, Input, ViewEncapsulation } from '@angular/core';
import { Capacitor } from '@capacitor/core';
import { pdfDefaultOptions } from 'ngx-extended-pdf-viewer';

@Component({
Expand All @@ -10,6 +11,7 @@ import { pdfDefaultOptions } from 'ngx-extended-pdf-viewer';
export class PdfViewerComponent {
legacyBrowser = true;
sidebarOpen = false;
public isNative = Capacitor.isNativePlatform();
@Input() page?: number;
@Input() src: string;
constructor() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { Component, OnDestroy, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Capacitor, CapacitorHttp } from '@capacitor/core';
import { PicsaCommonComponentsService } from '@picsa/components/src';
import { PicsaDialogService } from '@picsa/shared/features';
import { xmlNodeReplaceContent, xmlToJson } from '@picsa/utils';
import type { IEnketoFormEntry } from 'dist/libs/webcomponents/dist/types/components/enketo-webform/enketo-webform';
import { RxDocument } from 'rxdb';
import { Subject, takeUntil } from 'rxjs';

import { environment } from '../../../../environments/environment';
import { IFormSubmission } from '../../../schema/submissions';
import { MonitoringToolService } from '../../../services/monitoring-tool.service';

Expand Down
2 changes: 1 addition & 1 deletion libs/environments/src/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import packageJson from '../../../package.json';

export const APP_VERSION = {
number: packageJson.version,
date: '2023-07-22',
date: '2023-07-23',
};
2 changes: 1 addition & 1 deletion libs/i18n/assets/mw_ny.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
"paw-paw": "papaya",
"Performance": "•Performance•",
"Performance in high, mid and low RF (rainfall)": "•Performance in high, mid and low RF (rainfall)•",
"PICSA": "PICSA",
"PICSA": "PICSA",
"Pigeon Peas": "•Pigeon Peas•",
"pigeon peas": "nandolo",
"pigs": "nkhumba",
Expand Down
2 changes: 1 addition & 1 deletion libs/i18n/assets/zm_ny.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
"paw-paw": "paw-paw",
"Performance": "•Performance•",
"Performance in high, mid and low RF (rainfall)": "•Performance in high, mid and low RF (rainfall)•",
"PICSA": "PICSA",
"PICSA": "PICSA",
"Pigeon Peas": "•Pigeon Peas•",
"pigeon peas": "nyamdolo",
"pigs": "nkhumba",
Expand Down
3 changes: 2 additions & 1 deletion libs/i18n/source/mw_ny.json
Original file line number Diff line number Diff line change
Expand Up @@ -250,5 +250,6 @@
"Add New Option": "Onjezerani Chisankho china",
"Collection not found": "Kutolera sizikupezeka",
"fruits": "zipatso",
"livestock": "ziweto"
"livestock": "ziweto",
"PICSA": "PICSA"
}
3 changes: 2 additions & 1 deletion libs/i18n/source/zm_ny.json
Original file line number Diff line number Diff line change
Expand Up @@ -250,5 +250,6 @@
"Add New Option": "Ikani zosankha zatsopano",
"Collection not found": "Zokonzedwa bwino sizikupezeka",
"fruits": "zipatso",
"livestock": "ziweto"
"livestock": "ziweto",
"PICSA": "PICSA"
}
4 changes: 1 addition & 3 deletions libs/shared/src/services/native/storage-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ export class NativeStorageService {

public checkFileCached(entry: IStorageFileEntry) {
const cachedEntry = this.cachedFilesList[entry.relativePath];
console.log('check file cached', entry.relativePath);
if (!cachedEntry) {
return false;
}
Expand Down Expand Up @@ -157,7 +156,6 @@ export class NativeStorageService {
updates$.next({ progress, subscription });
},
complete: async () => {
console.log('download to cache completed');
if (data) {
const directory = Directory.Data;
const { relativePath } = fileMeta;
Expand All @@ -169,7 +167,7 @@ export class NativeStorageService {
recursive: true,
fast_mode: true,
on_fallback(error) {
console.error(error);
console.error('blobl write error', cachePath, error);
throw error;
},
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "picsa-apps",
"version": "3.31.0",
"version": "3.31.1",
"license": "See LICENSE",
"scripts": {
"ng": "nx",
Expand Down

0 comments on commit 144613a

Please sign in to comment.