-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1561 from RADAR-base/release=2.6.1-alpha
Release 2.6.1-alpha
- Loading branch information
Showing
24 changed files
with
291 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<widget android-versionCode="570" id="org.phidatalab.radar_armt" ios-CFBundleIdentifier="org.phidatalab.radar-armt" ios-CFBundleVersion="1" version="2.6.0-alpha" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<widget android-versionCode="571" id="org.phidatalab.radar_armt" ios-CFBundleIdentifier="org.phidatalab.radar-armt" ios-CFBundleVersion="1" version="2.6.1-alpha" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<name>RADAR Questionnaire</name> | ||
<description>An application that collects active data for research.</description> | ||
<author email="[email protected]" href="http://radar-base.org/">RADAR-Base</author> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/app/pages/home/components/task-calendar-row/task-calendar-row.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<div id="task-item" [class.task-item-name]="isTaskNameShown"> | ||
<ion-row> | ||
<ion-col> | ||
<div class="task-info-left"> | ||
<div class="start-time"> | ||
{{ taskLabel }} | ||
</div> | ||
<div> | ||
<img | ||
class="extra-info-icon" | ||
*ngIf="task.warning" | ||
src="assets/imgs/warning.png" | ||
/> | ||
</div> | ||
</div> | ||
<div class="task-info-right"> | ||
<div class="metrics"> | ||
<div class="metric-time"> | ||
<img | ||
class="icon-padding icon-xsm" | ||
src="assets/imgs/stopwatch.png" | ||
/> | ||
{{ task.estimatedCompletionTime }} | ||
<span class="units">min</span> | ||
</div> | ||
<div class="metric-q"> | ||
<img class="icon-padding icon-xsm" src="assets/imgs/nTasks.png" /> | ||
{{ task.nQuestions }} | ||
<span class="units">x</span> | ||
</div> | ||
</div> | ||
<div class="status-div"> | ||
<div *ngIf="!task.completed"> | ||
<ion-icon name="radio-button-off" class="status"></ion-icon> | ||
</div> | ||
<div *ngIf="task.completed"> | ||
<ion-icon name="checkmark" class="status-checked"></ion-icon> | ||
</div> | ||
</div> | ||
</div> | ||
</ion-col> | ||
</ion-row> | ||
</div> |
92 changes: 92 additions & 0 deletions
92
src/app/pages/home/components/task-calendar-row/task-calendar-row.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
task-calendar-row { | ||
#task-item { | ||
display: block; | ||
margin-bottom: 3px; | ||
padding: 3px 9px; | ||
padding-bottom: 0; | ||
background-color: $cl-primary-40; | ||
text-align: center; | ||
font-size: 18px; | ||
} | ||
|
||
.task-item-name { | ||
font-size: 15px !important; | ||
} | ||
|
||
.units { | ||
margin-right: 2px; | ||
font-size: 12px; | ||
} | ||
|
||
.icon-padding { | ||
padding-right: 5px; | ||
padding-left: 5px; | ||
} | ||
|
||
.extra-info-icon { | ||
padding-left: 3px; | ||
} | ||
|
||
.icon-xsm { | ||
height: 14px; | ||
} | ||
|
||
.task-info-left { | ||
display: inline-flex; | ||
float: left; | ||
padding-left: 5px; | ||
width: auto; | ||
} | ||
|
||
.task-info-right { | ||
display: inline-flex; | ||
float: right; | ||
margin-right: 10px; | ||
max-width: 160px; | ||
width: 160px; | ||
} | ||
|
||
.metrics { | ||
display: inline-flex; | ||
float: left; | ||
margin-right: 8px; | ||
text-align: left; | ||
} | ||
|
||
.metric-time { | ||
float: left; | ||
margin-right: 10px; | ||
width: 64px; | ||
white-space: nowrap; | ||
} | ||
|
||
.metric-q { | ||
float: left; | ||
width: 56px; | ||
white-space: nowrap; | ||
} | ||
|
||
.status-div { | ||
float: right; | ||
margin-top: -8px; | ||
margin-right: 8px; | ||
margin-bottom: -7px; | ||
padding-top: 5px; | ||
padding-bottom: 5px; | ||
width: 24px; | ||
} | ||
|
||
.status { | ||
color: map-get($colors, tertiary); | ||
font-size: 26px; | ||
} | ||
|
||
.status-checked { | ||
padding-top: 2px; | ||
width: 23px; | ||
height: 23px; | ||
border-radius: 50%; | ||
background-color: map-get($colors, tertiary); | ||
font-size: 21px; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
src/app/pages/home/components/task-calendar-row/task-calendar-row.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Component, Input, OnInit } from '@angular/core' | ||
|
||
import { LocalizationService } from '../../../../core/services/misc/localization.service' | ||
import { Task } from '../../../../shared/models/task' | ||
|
||
@Component({ | ||
selector: 'task-calendar-row', | ||
templateUrl: 'task-calendar-row.component.html' | ||
}) | ||
export class TaskCalendarRowComponent implements OnInit { | ||
@Input() | ||
isTaskNameShown: boolean | ||
@Input() | ||
task | ||
|
||
taskLabel: string | ||
|
||
constructor(private localization: LocalizationService) {} | ||
|
||
ngOnInit() { | ||
if (this.isTaskNameShown) this.taskLabel = this.task.name | ||
else this.taskLabel = this.getStartTime(this.task) | ||
} | ||
|
||
getStartTime(task: Task) { | ||
return this.localization.moment(task.timestamp).format('HH:mm') | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/app/pages/home/components/task-calendar-row/task-calendar-row.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { CommonModule } from '@angular/common' | ||
import { NgModule } from '@angular/core' | ||
import { IonicModule } from 'ionic-angular' | ||
import { MomentModule } from 'ngx-moment' | ||
|
||
import { TaskCalendarRowComponent } from './task-calendar-row.component' | ||
|
||
const COMPONENTS = [TaskCalendarRowComponent] | ||
|
||
@NgModule({ | ||
imports: [ | ||
MomentModule, | ||
CommonModule, | ||
IonicModule.forRoot(TaskCalendarRowComponent) | ||
], | ||
declarations: COMPONENTS, | ||
exports: COMPONENTS | ||
}) | ||
export class TaskCalendarRowModule {} |
Oops, something went wrong.