-
Notifications
You must be signed in to change notification settings - Fork 2
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 #170 from e-picsa/feat/zm-updates
Feat/zm updates
- Loading branch information
Showing
42 changed files
with
672 additions
and
174 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
5 changes: 3 additions & 2 deletions
5
...s/climate-tool/src/app/components/chart-tools/probability-tool/probabililty-tool.model.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 |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { marker as translateMarker } from '@biesbjerg/ngx-translate-extract-marker'; | ||
import { IProbabilityToolOptions } from '@picsa/models'; | ||
|
||
export const PROBABILITY_TOOL_OPTIONS: IProbabilityToolOptions = { | ||
above: { | ||
label: 'Above', | ||
label: translateMarker('Above'), | ||
}, | ||
below: { | ||
label: 'Below', | ||
label: translateMarker('Below'), | ||
}, | ||
}; |
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
6 changes: 3 additions & 3 deletions
6
apps/picsa-tools/manual-tool/src/app/components/stepsContainer/stepsContainer.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
4 changes: 2 additions & 2 deletions
4
apps/picsa-tools/manual-tool/src/app/components/stepsContainer/stepsContainer.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
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,2 @@ | ||
export * from './manual-contents'; | ||
export * from './manual-resources'; |
19 changes: 19 additions & 0 deletions
19
apps/picsa-tools/manual-tool/src/app/data/manual-contents/common.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 @@ | ||
export interface IManualPeriodEntry { | ||
label: string; | ||
steps: IManualStep[]; | ||
} | ||
export interface IManualStep { | ||
page: { | ||
[code: string]: number; | ||
}; | ||
name: string; | ||
label: string; | ||
type: 'step'; | ||
activities: IManualActivity[]; | ||
} | ||
export interface IManualActivity { | ||
label: string; | ||
video: string; | ||
icon: string; | ||
id: string; | ||
} |
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
182 changes: 182 additions & 0 deletions
182
apps/picsa-tools/manual-tool/src/app/data/manual-contents/farmer.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,182 @@ | ||
import { marker as translateMarker } from '@biesbjerg/ngx-translate-extract-marker'; | ||
|
||
import { IManualActivity, IManualPeriodEntry } from './common'; | ||
|
||
/** Picsa manual contents organised by section and step */ | ||
|
||
export const PICSA_MANUAL_CONTENTS_FARMER: IManualPeriodEntry[] = [ | ||
{ | ||
label: translateMarker('PICSA'), | ||
steps: [ | ||
{ | ||
page: { | ||
en: 2, | ||
zm_ny: 2, | ||
mw_ny: 2, | ||
}, | ||
name: '', | ||
label: translateMarker('Introduction'), | ||
type: 'step', | ||
activities: [], | ||
}, | ||
|
||
{ | ||
page: { | ||
en: 6, | ||
zm_ny: 11, | ||
mw_ny: 11, | ||
}, | ||
name: translateMarker('Step A'), | ||
label: translateMarker('What does the farmer currently do?'), | ||
type: 'step', | ||
activities: [ | ||
{ | ||
label: translateMarker('Resource Allocation Map (RAM)'), | ||
video: 'assets/videos/countdown.mp4', | ||
icon: 'picsa_manual_resource_allocation', | ||
id: 'ram-activity', | ||
}, | ||
{ | ||
label: translateMarker('Seasonal Calendar'), | ||
video: 'assets/videos/countdown.mp4', | ||
icon: 'picsa_manual_calender', | ||
id: 'calendar-activity', | ||
}, | ||
], | ||
}, | ||
{ | ||
page: { | ||
en: 10, | ||
zm_ny: 17, | ||
mw_ny: 17, | ||
}, | ||
name: translateMarker('Step B'), | ||
label: translateMarker('Is the climate changing?'), | ||
type: 'step', | ||
activities: [ | ||
{ | ||
label: translateMarker('Historic climate'), | ||
video: 'assets/videos/countdown.mp4', | ||
icon: 'picsa_manual_temperature', | ||
id: 'historic-climate-activity', | ||
}, | ||
], | ||
}, | ||
{ | ||
page: { | ||
en: 12, | ||
zm_ny: 20, | ||
mw_ny: 20, | ||
}, | ||
name: translateMarker('Step C'), | ||
label: translateMarker('What are the opportunities and risks?'), | ||
type: 'step', | ||
activities: [ | ||
{ | ||
label: translateMarker('Probability and Risk'), | ||
video: 'assets/videos/countdown.mp4', | ||
icon: 'picsa_manual_campus', | ||
id: 'probability-risk-activity', | ||
}, | ||
], | ||
}, | ||
{ | ||
page: { | ||
en: 14, | ||
zm_ny: 23, | ||
mw_ny: 23, | ||
}, | ||
name: translateMarker('Step D'), | ||
label: translateMarker('What are the options for the farmer?'), | ||
type: 'step', | ||
activities: [ | ||
{ | ||
label: translateMarker('Crop Info'), | ||
video: 'assets/videos/countdown.mp4', | ||
icon: 'picsa_manual_crop', | ||
id: 'crop-info-activity', | ||
}, | ||
{ | ||
label: translateMarker('Livestock Info'), | ||
video: 'assets/videos/countdown.mp4', | ||
icon: 'picsa_manual_livestock', | ||
id: 'livestock-info-activity', | ||
}, | ||
{ | ||
label: translateMarker('Livelihood Info'), | ||
video: 'assets/videos/countdown.mp4', | ||
icon: 'picsa_manual_place_holder', | ||
id: 'livelihood-info-activity', | ||
}, | ||
], | ||
}, | ||
{ | ||
page: { | ||
en: 16, | ||
zm_ny: 26, | ||
mw_ny: 26, | ||
}, | ||
name: translateMarker('Step E'), | ||
label: translateMarker('Options by context'), | ||
type: 'step', | ||
activities: [ | ||
{ | ||
label: translateMarker('Farmers choose'), | ||
video: 'assets/videos/countdown.mp4', | ||
icon: 'picsa_manual_place_holder', | ||
id: 'farmers-choose-activity', | ||
}, | ||
], | ||
}, | ||
{ | ||
page: { | ||
en: 17, | ||
zm_ny: 27, | ||
mw_ny: 27, | ||
}, | ||
name: translateMarker('Step F'), | ||
label: translateMarker('Comparing different options and planning using Participatory Budgets'), | ||
type: 'step', | ||
activities: [ | ||
{ | ||
label: translateMarker('Budget'), | ||
video: 'assets/videos/countdown.mp4', | ||
icon: 'picsa_manual_place_holder', | ||
id: 'budget-activity', | ||
}, | ||
], | ||
}, | ||
{ | ||
page: { | ||
en: 19, | ||
zm_ny: 30, | ||
mw_ny: 30, | ||
}, | ||
name: translateMarker('Step G'), | ||
label: translateMarker('The farmer decides'), | ||
type: 'step', | ||
activities: [ | ||
{ | ||
label: translateMarker('Select and amend'), | ||
video: 'assets/videos/countdown.mp4', | ||
icon: 'picsa_manual_place_holder', | ||
id: 'select-amend-activity', | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
]; | ||
|
||
/** Picsa manual contents organised by section only */ | ||
const PICSA_MANUAL_GRID_DATA_FARMER: IManualActivity[] = []; | ||
|
||
for (const period of PICSA_MANUAL_CONTENTS_FARMER) { | ||
for (const step of period.steps) { | ||
for (const item of step.activities) { | ||
PICSA_MANUAL_GRID_DATA_FARMER.push(item); | ||
} | ||
} | ||
} | ||
|
||
export { PICSA_MANUAL_GRID_DATA_FARMER }; |
3 changes: 3 additions & 0 deletions
3
apps/picsa-tools/manual-tool/src/app/data/manual-contents/index.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,3 @@ | ||
export * from './common'; | ||
export * from './extension'; | ||
export * from './farmer'; |
5 changes: 2 additions & 3 deletions
5
apps/picsa-tools/manual-tool/src/app/pages/activity-details/activity-details.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 |
---|---|---|
@@ -1,22 +1,21 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { ActivatedRoute } from '@angular/router'; | ||
|
||
import { IManualActivity, PICSA_MANUAL_GRID_DATA } from '../../data/manual-contents'; | ||
import { IManualActivity, PICSA_MANUAL_GRID_DATA_EXTENSION } from '../../data'; | ||
|
||
@Component({ | ||
selector: 'picsa-manual-activity-details', | ||
templateUrl: './activity-details.component.html', | ||
styleUrls: ['./activity-details.component.scss'], | ||
}) | ||
|
||
export class ActivityDetailsComponent implements OnInit { | ||
activity?: IManualActivity; | ||
|
||
constructor(private route: ActivatedRoute) {} | ||
ngOnInit() { | ||
const activityId = this.route.snapshot.params.id; | ||
if (activityId) { | ||
this.activity = PICSA_MANUAL_GRID_DATA.find((activity) => activity.id === activityId); | ||
this.activity = PICSA_MANUAL_GRID_DATA_EXTENSION.find((activity) => activity.id === activityId); | ||
} | ||
} | ||
} |
Oops, something went wrong.