Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion functions/src/export-csv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ function getPropertiesByName(
properties: Set<string | number>
): List<string | number | null> {
// Fill the list with the value associated with a prop, if the LOI has it, otherwise leave empty.
return List.of(...properties)
return List([...properties])
.map(prop => loi.properties[prop])
.map(value => value?.stringValue || value?.numericValue || null);
}
2 changes: 1 addition & 1 deletion web/src/app/components/about/about.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ <h1 class="page-title" i18n="@@app.labels.about">About</h1>
<span i18n="@@app.labels.back">Back</span>
</button>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@
-->

<form [formGroup]="formGroup">
<mat-radio-group class="data-sharing-terms"
<mat-radio-group
class="data-sharing-terms"
[id]="typeControlKey"
[formControlName]="typeControlKey"
>
<mat-card *ngFor="let option of dataSharingTermsOptions" class="data-sharing-terms-card">
<mat-card
*ngFor="let option of dataSharingTermsOptions"
class="data-sharing-terms-card"
>
<mat-card-content>
<mat-radio-button class="option-radio-button" [value]="option.value">
<span class="data-sharing-label">{{ option.label }}</span>
Expand All @@ -39,11 +43,13 @@ <h3 id="customize-agreement-header" class="field-header">
>
</p>
<mat-form-field class="custom-terms">
<textarea matInput
<textarea
matInput
formControlName="customText"
placeholder="Enter the terms of your custom agreement..."
i18n-placeholder="@@app.forms.placeholders.customAgreement"
aria-labelledby="customize-agreement-header">
aria-labelledby="customize-agreement-header"
>
</textarea>
<mat-error
*ngIf="customTextControl.touched && customTextControl.invalid"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<mat-list
role="list"
class="jobs"
[ngClass]="{collapsed: !isSidePanelExpanded()}"
[ngClass]="{ collapsed: !isSidePanelExpanded() }"
>
@for (entry of jobs(); track entry.id) {
<ground-job-list-item
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</button>
</div>

<div style="display: none;">
<div style="display: none">
<qrcode
*ngIf="surveyAppLink"
#qrCodeElement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->

<div *ngIf="auth.getUser$() | async as user">
<div *ngIf="user.isAuthenticated">
<button mat-icon-button (click)="openProfileDialog($event)">
Expand All @@ -23,9 +24,7 @@
class="user-thumb"
/>
<ng-template #showDefaultPhoto>
<user-avatar
[displayText]="user.displayName?.charAt(0)"
></user-avatar>
<user-avatar [displayText]="user.displayName?.charAt(0)"></user-avatar>
</ng-template>
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@

<ground-header></ground-header>

<div class="body-container">
<div
class="body-container"
style="background-image: url(assets/img/happy-land.png)"
>
<mat-card appearance="outlined" class="card">
<mat-card-content class="content">
<div>
<img class="logo" src="assets/img/logo.svg" alt="Ground logo" />
</div>
<p class="title">Ground</p>
<p class="cta" *ngIf="!(isAuthenticated$() | async)">
<p class="cta" *ngIf="(isAuthenticated$() | async) === false">
<ng-container i18n="@@app.login.signInToContinue"
>Sign in to continue</ng-container
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

.body-container {
background-image: url(/assets/img/happy-land.png);
background-repeat: no-repeat;
background-size: cover;
width: 100vw;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,33 @@ <h1 class="page-title" i18n="@@app.labels.surveys">Surveys</h1>

<div class="filters-container">
<mat-chip-set aria-label="Survey filter">
<ng-container *ngTemplateOutlet="filterChip; context: { filter: SurveyListFilter.ALL }"></ng-container>

<ng-container *ngTemplateOutlet="filterChip; context: { filter: SurveyListFilter.RESTRICTED, icon: 'lock' }"></ng-container>

<ng-container *ngTemplateOutlet="filterChip; context: { filter: SurveyListFilter.UNLISTED, icon: 'account_circle' }"></ng-container>

<ng-container *ngTemplateOutlet="filterChip; context: { filter: SurveyListFilter.PUBLIC, icon: 'public' }"></ng-container>
<ng-container
*ngTemplateOutlet="
filterChip;
context: { filter: SurveyListFilter.ALL }
"
></ng-container>

<ng-container
*ngTemplateOutlet="
filterChip;
context: { filter: SurveyListFilter.RESTRICTED, icon: 'lock' }
"
></ng-container>

<ng-container
*ngTemplateOutlet="
filterChip;
context: { filter: SurveyListFilter.UNLISTED, icon: 'account_circle' }
"
></ng-container>

<ng-container
*ngTemplateOutlet="
filterChip;
context: { filter: SurveyListFilter.PUBLIC, icon: 'public' }
"
></ng-container>
</mat-chip-set>
</div>

Expand All @@ -43,9 +63,15 @@ <h1 class="page-title" i18n="@@app.labels.surveys">Surveys</h1>
<mat-icon mat-card-avatar class="add-icon">add_24px</mat-icon>
</div>

<mat-card-title class="survey-title" i18n="@@app.labels.createSurvey">Create survey</mat-card-title>
<mat-card-title class="survey-title" i18n="@@app.labels.createSurvey"
>Create survey</mat-card-title
>

<mat-card-subtitle class="survey-description" i18n="@@app.labels.createSurveyDescription">Define jobs and sites for data collectors</mat-card-subtitle>
<mat-card-subtitle
class="survey-description"
i18n="@@app.labels.createSurveyDescription"
>Define jobs and sites for data collectors</mat-card-subtitle
>
</mat-card-header>
</mat-card>

Expand All @@ -57,12 +83,22 @@ <h1 class="page-title" i18n="@@app.labels.surveys">Surveys</h1>
(click)="handleSurveySelection(survey)"
>
<mat-card-header>
<mat-icon mat-card-avatar fontSet="material-symbols-outlined" class="add-icon general-access-icon">
<mat-icon
mat-card-avatar
fontSet="material-symbols-outlined"
class="add-icon general-access-icon"
>
<ng-container [ngSwitch]="survey.generalAccess">
<ng-container *ngSwitchCase="SurveyGeneralAccess.RESTRICTED">lock</ng-container>
<ng-container *ngSwitchCase="SurveyGeneralAccess.UNLISTED">account_circle</ng-container>
<ng-container *ngSwitchCase="SurveyGeneralAccess.RESTRICTED">pending</ng-container>
<ng-container *ngSwitchDefault>public</ng-container>
<ng-container *ngSwitchCase="SurveyGeneralAccess.RESTRICTED"
>lock</ng-container
>
<ng-container *ngSwitchCase="SurveyGeneralAccess.UNLISTED"
>account_circle</ng-container
>
<ng-container *ngSwitchCase="SurveyGeneralAccess.RESTRICTED"
>pending</ng-container
>
<ng-container *ngSwitchDefault>public</ng-container>
</ng-container>
</mat-icon>

Expand All @@ -76,7 +112,7 @@ <h1 class="page-title" i18n="@@app.labels.surveys">Surveys</h1>
</div>
</div>

<ng-template #filterChip let-filter="filter", let-icon="icon">
<ng-template #filterChip let-filter="filter" let-icon="icon">
<mat-chip
*ngIf="filterCounters().get(filter)"
[disabled]="currentFilter() === filter"
Expand All @@ -90,8 +126,21 @@ <h1 class="page-title" i18n="@@app.labels.surveys">Surveys</h1>
{{ currentFilter() !== filter ? icon : 'check' }}
</mat-icon>

<span *ngIf="filter === SurveyListFilter.ALL" i18n="@@app.labels.all">All</span>
<span *ngIf="filter === SurveyListFilter.RESTRICTED" i18n="@@app.labels.restricted">Restricted</span>
<span *ngIf="filter === SurveyListFilter.UNLISTED" i18n="@@app.labels.unlisted">Unlisted</span>
<span *ngIf="filter === SurveyListFilter.ALL" i18n="@@app.labels.all"
>All</span
>
<span
*ngIf="filter === SurveyListFilter.RESTRICTED"
i18n="@@app.labels.restricted"
>Restricted</span
>
<span
*ngIf="filter === SurveyListFilter.UNLISTED"
i18n="@@app.labels.unlisted"
>Unlisted</span
>
<span *ngIf="filter === SurveyListFilter.PUBLIC" i18n="@@app.labels.public"
>Public</span
>
</mat-chip>
</ng-template>
2 changes: 1 addition & 1 deletion web/src/app/components/terms/terms.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ <h1 class="page-title">
}
</div>
</div>
</div>
</div>
32 changes: 16 additions & 16 deletions web/src/locale/messages.th.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"app.labels.deleteSurvey": "ลบแบบสำรวจ",
"app.cards.deleteSurvey.title": "ลบแบบสำรวจ",
"app.cards.deleteSurvey.description": "ลบแบบสำรวจและข้อมูลที่เกี่ยวข้องอย่างถาวร",
"app.labels.editJobSectionAria": "Select job editor section",
"app.labels.editJobSectionAria": "เลือกส่วนแก้ไขงาน",
"app.labels.tasks": "งานย่อย",
"app.labels.sites": "ไซต์",
"app.editSurvey.surveyDetails.title": "รายละเอียดแบบสำรวจ",
Expand Down Expand Up @@ -89,15 +89,15 @@
"app.error.generic": "ขัดข้อง มีบางอย่างผิดพลาด",
"app.error.accessDenied": "ปฏิเสธการเข้าถึง",
"app.error.clickHereToRegister": "คลิกที่นี่เพื่อลงทะเบียน",
"app.loiPanel.noDataForThisSite": "No data collected for this site",
"app.submissionPanel.skipped": "Skipped",
"app.loiPanel.noDataForThisSite": "ยังไม่มีข้อมูลการเก็บสำหรับไซต์นี้",
"app.submissionPanel.skipped": "ข้าม",
"app.labels.loadingSubmissionPhoto": "รูปภาพการส่ง",
"app.labels.lngEast": "E",
"app.labels.lngWest": "W",
"app.labels.latNorth": "N",
"app.labels.latSouth": "S",
"app.labels.altitude": "Altitude: {$altitude}m",
"app.labels.accuracy": "Accuracy: {$accuracy}m",
"app.labels.lngEast": "ต.ออก",
"app.labels.lngWest": "ต.ตก",
"app.labels.latNorth": "ท.เหนือ",
"app.labels.latSouth": "ท.ใต้",
"app.labels.altitude": "ความสูง: {$altitude} ม.",
"app.labels.accuracy": "ความแม่นยำ: {$accuracy} ม.",
"app.labels.copyLink": "คัดลอกลิงก์",
"app.labels.copyQrCode": "คัดลอกรหัส QR",
"app.notifications.success.surveyLinkCopied": "ลิงก์แบบสำรวจถูกคัดลอกไปยังคลิปบอร์ด",
Expand Down Expand Up @@ -150,10 +150,10 @@
"app.controls.errors.requiredAnswer": "ต้องเลือกอย่างน้อยหนึ่งคำตอบ",
"app.texts.whenAdding": "เมื่อเพิ่มจุดเก็บข้อมูลใหม่...",
"app.labels.addATask": "เพิ่มงานย่อย",
"app.dialogs.deleteTask.title": "Warning",
"app.dialogs.deleteTask.content": "Are you sure you wish to delete this question? Any associated data will be lost. This cannot be undone.",
"app.dialogs.duplicateTask.title": "Duplicate task",
"app.dialogs.duplicateTask.content": "Are you sure you wish to duplicate this task?",
"app.dialogs.deleteTask.title": "คำเตือน",
"app.dialogs.deleteTask.content": "คุณแน่ใจหรือไม่ว่าต้องการลบคำถามนี้? ข้อมูลที่เกี่ยวข้องทั้งหมดจะถูกลบและไม่สามารถกู้คืนได้",
"app.dialogs.duplicateTask.title": "ทำสำเนางาน",
"app.dialogs.duplicateTask.content": "คุณแน่ใจหรือไม่ว่าต้องการทำสำเนางานนี้?",
"app.controls.errors.requiredOptionText": "จำเป็นต้องระบุข้อความของตัวเลือก",
"app.controls.tasks.addCondition": "เพิ่มเงื่อนไข",
"app.controls.tasks.removeCondition": "ลบเงื่อนไข",
Expand All @@ -179,15 +179,15 @@
"app.taskEditor.instructions.label": "คำแนะนำ",
"app.taskEditor.instructions.placeholder": "คำแนะนำ",
"app.taskEditor.instructions.requiredMessage": "จำเป็นต้องมีคำแนะนำ",
"app.labels.other": "Other...",
"app.labels.other": "อื่น ๆ...",
"app.labels.agreeWithTermsOfService": "ฉันได้อ่านและยอมรับข้อกำหนดในการให้บริการแล้ว.",
"app.cards.dataSharingTerms.private.description": "ผู้เก็บข้อมูลต้องยินยอมให้แบ่งปันข้อมูลกับผู้จัดทำแบบสำรวจ",
"app.cards.dataSharingTerms.public.description": "ผู้เก็บข้อมูลสละสิทธิ์ทั้งหมดในข้อมูลที่เก็บรวบรวมภายใต้แบบสำรวจนี้ ตาม <a href=\"https://creativecommons.org/public-domain/cc0/\" target=\"_blank\">สัญญาอนุญาต CC0</a> ผู้จัดทำแบบสำรวจสามารถแบ่งปันข้อมูลได้อย่างเสรี.",
"app.cards.dataSharingTerms.custom.description": "กำหนดเงื่อนไขแบบกำหนดเองที่ผู้เก็บข้อมูลต้องยอมรับ",
"app.labels.roles.dataCollector": "ผู้เก็บข้อมูล",
"app.labels.roles.surveyOrganizer": "ผู้จัดทำแบบสำรวจ",
"app.labels.roles.viewer": "ผู้ดูข้อมูล",
"app.labels.no": "No",
"app.labels.yes": "Yes"
"app.labels.no": "ไม่",
"app.labels.yes": "ใช่"
}
}
Loading