Skip to content

Commit

Permalink
Merge pull request #272 from e-picsa/feat/farmer-home
Browse files Browse the repository at this point in the history
Feat: farmer home
  • Loading branch information
chrismclarke authored May 15, 2024
2 parents af46fd6 + f3a8d3b commit fdf52f1
Show file tree
Hide file tree
Showing 120 changed files with 1,365 additions and 492 deletions.
1 change: 1 addition & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@
{ 'color': '000000', 'description': 'Updates related to Dashboard app', 'name': 'App: Dashboard' },
{ 'color': '000000', 'description': 'Updates related to Server app', 'name': 'App: Server' },
{ 'color': '000000', 'description': 'Updates related to Farmer app', 'name': 'App: Farmer' },
{ 'color': '000000', 'description': 'Updates related to Farmer app', 'name': 'App: Extension' },
]
5 changes: 4 additions & 1 deletion .github/pr-labeler.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
# HACK - for now farmer pages are contained within extension app, to refactor in future
'App: Farmer':
- changed-files:
- any-glob-to-any-file: 'apps/picsa-apps/extension-app/**/farmer/**/*'
- any-glob-to-any-file: 'apps/picsa-tools/farmer-content/**/*'
'App: Extension':
- changed-files:
- any-glob-to-any-file: 'apps/picsa-tools/extension-content/**/*'

# Tools
'Tool: Budget':
Expand Down
1 change: 1 addition & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ categories:
{ title: '🟦Option Tool', labels: ['Tool: Option'] },
{ title: '🟦Resources Tool', labels: ['Tool: Resources'] },
{ title: '🟦Seasonal Calendar Tool', labels: ['Tool: Seasonal Calendar'] },
{ title: '🟪Extension App', labels: ['App: Extension'] },
{ title: '🟪Farmer App', labels: ['App: Farmer'] },
{ title: '🟪Dashboard App', labels: ['App: Dashboard'] },
{ title: '🟪Server App', labels: ['App: Server'] },
Expand Down
2 changes: 1 addition & 1 deletion apps/picsa-apps/dashboard-e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noPropertyAccessFromIndexSignature": false,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
},
Expand Down
10 changes: 10 additions & 0 deletions apps/picsa-apps/extension-app/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@
"input": "libs/data/crop_activity/svgs",
"output": "assets/svgs/crop_activity"
},
{
"glob": "*.svg",
"input": "libs/data/extension_content/svgs",
"output": "assets/svgs/extension_content"
},
{
"glob": "*.svg",
"input": "libs/data/farmer_content/svgs",
"output": "assets/svgs/farmer_content"
},
{
"glob": "**/*",
"input": "apps/picsa-tools/climate-tool/src/assets",
Expand Down
21 changes: 21 additions & 0 deletions apps/picsa-apps/extension-app/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,32 @@ import { RouterModule, Routes } from '@angular/router';
import { BudgetToolModule } from '@picsa/budget/src/app/app.module-embedded';
import { ClimateToolModule } from '@picsa/climate/src/app/app.module-embedded';
import { CropProbabilityToolModule } from '@picsa/crop-probability/src/app/app.module-embedded';
import { appRoutes as extensionContentRoutes } from '@picsa/extension-content/src/app/app.routes';
import { FarmerActivityModule } from '@picsa/farmer-activity/src/app/app.module-embedded';
import { appRoutes as farmerContentRoutes } from '@picsa/farmer-content/src/app/app.routes';
import { ManualToolModule } from '@picsa/manual/src/app/app.module-embedded';
import { MonitoringToolModule } from '@picsa/monitoring/src/app/app.module-embedded';
import { OptionsToolModule } from '@picsa/option/src/app/app.module-embedded';
import { ResourcesToolModule } from '@picsa/resources/src/app/app.module-embedded';
import { SeasonalCalendarToolModule } from '@picsa/seasonal-calendar/src/app/app.module-embedded';

const routes: Routes = [
// Updated syntax for standalone components (other routes could be migrated in similar way)
// Import farmer-content routes which lazy-load on /farmer endpoint
// Use component-less top route to enforce route guard on all child routes
{
path: 'farmer',
canActivate: [],
children: farmerContentRoutes,
title: 'PICSA',
},
{
path: 'extension',
canActivate: [],
children: extensionContentRoutes,
title: 'PICSA',
},

// support embed of budget tool app
// see: https://medium.com/disney-streaming/combining-multiple-angular-applications-into-a-single-one-e87d530d6527
{
Expand All @@ -27,6 +45,7 @@ const routes: Routes = [
loadChildren: () =>
import('@picsa/crop-probability/src/app/app.module-embedded').then((mod) => mod.CropProbabilityToolModule),
},

{
path: 'farmer-activity',
loadChildren: () =>
Expand All @@ -53,6 +72,8 @@ const routes: Routes = [
loadChildren: () =>
import('@picsa/seasonal-calendar/src/app/app.module-embedded').then((mod) => mod.SeasonalCalendarToolModule),
},
// NOTE - Home not currently working as standalone component so keeping as module
// (possibly needs to import router-outlet or similar for setup)
{
path: '',
loadChildren: () => import('./pages/home/home.module').then((mod) => mod.HomePageModule),
Expand Down

This file was deleted.

20 changes: 0 additions & 20 deletions apps/picsa-apps/extension-app/src/app/data/index.ts

This file was deleted.

105 changes: 0 additions & 105 deletions apps/picsa-apps/extension-app/src/app/data/surveys/field-visit.ts

This file was deleted.

7 changes: 0 additions & 7 deletions apps/picsa-apps/extension-app/src/app/data/surveys/index.ts

This file was deleted.

63 changes: 0 additions & 63 deletions apps/picsa-apps/extension-app/src/app/data/surveys/registration.ts

This file was deleted.

19 changes: 0 additions & 19 deletions apps/picsa-apps/extension-app/src/app/data/surveys/testForm.ts

This file was deleted.

Loading

0 comments on commit fdf52f1

Please sign in to comment.