-
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 branch 'main' of https://github.com/e-picsa/picsa-apps into ft-…
…budget-detailed-summary
- Loading branch information
Showing
44 changed files
with
1,530 additions
and
822 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# Deploy dashboard to vercel hosting | ||
# https://vercel.com/guides/how-can-i-use-github-actions-with-vercel | ||
|
||
# Required Secrets | ||
# - VERCEL_TOKEN | ||
# - VERCEL_PROJECT_ID | ||
# - VERCEL_ORG_ID | ||
|
||
name: Web Release Dashboard | ||
|
||
# Only keep one active build per ref (e.g. pr branch, push branch, triggering workflow ref) | ||
concurrency: | ||
group: web-release-dashboard-${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'apps/picsa-apps/dashboard/**' | ||
|
||
jobs: | ||
web_release_dashboard: | ||
runs-on: ubuntu-latest | ||
environment: dashboard | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
lfs: true | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
############################################################################# | ||
# Node Modules | ||
# Manually restore any previous cache to speed install | ||
# As immutable install will not change cache only save new cache if not hit | ||
# Uses fine-grained methods from https://github.com/actions/cache | ||
############################################################################# | ||
- uses: actions/cache/restore@v3 | ||
id: cache | ||
with: | ||
path: ./.yarn/cache | ||
key: ${{ runner.os }}-node-modules-yarn-v1-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-node-modules-yarn-v1- | ||
- name: Install node modules | ||
run: yarn install --immutable && npm i -g vercel | ||
|
||
- uses: actions/cache/save@v3 | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
with: | ||
path: ./.yarn/cache | ||
key: ${{ runner.os }}-node-modules-yarn-v1-${{ hashFiles('yarn.lock') }} | ||
|
||
- name: Pull Vercel Environment Information | ||
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | ||
|
||
# Required build script defined in dashboard project `vercel.json` | ||
- name: Build | ||
run: npx vercel --local-config apps/picsa-apps/dashboard/vercel.json build --prod --token=${{ secrets.VERCEL_TOKEN }} | ||
|
||
- name: Deploy | ||
run: npx vercel --local-config apps/picsa-apps/dashboard/vercel.json deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} | ||
|
||
# TODO - run supabase db migrations (if required) | ||
# TODO - handle staging/preview deploy (if required) | ||
|
||
# NOTE - could also use deployment action to populate additonal metadata (could use cli) | ||
# https://github.com/marketplace/actions/vercel-action | ||
|
||
# - uses: amondnet/vercel-action@v20 | ||
# with: | ||
# vercel-token: ${{ secrets.VERCEL_TOKEN }} | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# vercel-args: '--local-config=apps/picsa-apps/dashboard/vercel.json --prebuilt --prod' | ||
# vercel-org-id: ${{ secrets.VERCEL_ORG_ID}} | ||
# vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}} |
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 |
---|---|---|
|
@@ -76,4 +76,5 @@ apps/extension-toolkit/www_sourcemaps | |
.next/ | ||
|
||
.eslintcache | ||
.nx/cache | ||
.nx/cache | ||
.vercel |
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,14 @@ | ||
{ | ||
"buildCommand": "yarn nx run picsa-apps-dashboard:build:production", | ||
"installCommand": "yarn install", | ||
"outputDirectory": "dist/apps/picsa-apps/dashboard/browser", | ||
"github": { | ||
"enabled": false | ||
}, | ||
"rewrites": [ | ||
{ | ||
"source": "/(.*)", | ||
"destination": "/index.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
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 |
---|---|---|
|
@@ -4,3 +4,7 @@ | |
|
||
.env | ||
.env.local | ||
|
||
# Supabase | ||
.branches | ||
.temp |
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
48 changes: 48 additions & 0 deletions
48
apps/picsa-server/supabase/migrations/20231010030939_remote_schema.sql
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,48 @@ | ||
|
||
SET statement_timeout = 0; | ||
SET lock_timeout = 0; | ||
SET idle_in_transaction_session_timeout = 0; | ||
SET client_encoding = 'UTF8'; | ||
SET standard_conforming_strings = on; | ||
SELECT pg_catalog.set_config('search_path', '', false); | ||
SET check_function_bodies = false; | ||
SET xmloption = content; | ||
SET client_min_messages = warning; | ||
SET row_security = off; | ||
|
||
CREATE EXTENSION IF NOT EXISTS "pgsodium" WITH SCHEMA "pgsodium"; | ||
|
||
CREATE EXTENSION IF NOT EXISTS "pg_graphql" WITH SCHEMA "graphql"; | ||
|
||
CREATE EXTENSION IF NOT EXISTS "pg_stat_statements" WITH SCHEMA "extensions"; | ||
|
||
CREATE EXTENSION IF NOT EXISTS "pgcrypto" WITH SCHEMA "extensions"; | ||
|
||
CREATE EXTENSION IF NOT EXISTS "pgjwt" WITH SCHEMA "extensions"; | ||
|
||
CREATE EXTENSION IF NOT EXISTS "supabase_vault" WITH SCHEMA "vault"; | ||
|
||
CREATE EXTENSION IF NOT EXISTS "uuid-ossp" WITH SCHEMA "extensions"; | ||
|
||
REVOKE USAGE ON SCHEMA "public" FROM PUBLIC; | ||
GRANT USAGE ON SCHEMA "public" TO "postgres"; | ||
GRANT USAGE ON SCHEMA "public" TO "anon"; | ||
GRANT USAGE ON SCHEMA "public" TO "authenticated"; | ||
GRANT USAGE ON SCHEMA "public" TO "service_role"; | ||
|
||
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "postgres"; | ||
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "anon"; | ||
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "authenticated"; | ||
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON SEQUENCES TO "service_role"; | ||
|
||
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "postgres"; | ||
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "anon"; | ||
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "authenticated"; | ||
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON FUNCTIONS TO "service_role"; | ||
|
||
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "postgres"; | ||
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "anon"; | ||
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "authenticated"; | ||
ALTER DEFAULT PRIVILEGES FOR ROLE "postgres" IN SCHEMA "public" GRANT ALL ON TABLES TO "service_role"; | ||
|
||
RESET ALL; |
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
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
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
10 changes: 5 additions & 5 deletions
10
...-tool/src/app/components/activities-editor-dialog/activities-editor-dialog.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 |
---|---|---|
@@ -1,22 +1,22 @@ | ||
<div class="table-container"> | ||
<h2 class="dialog-title">Add Activity</h2> | ||
<h2 class="dialog-title">{{'Add Activity' | translate}}</h2> | ||
<div class="dialog-body"> | ||
<mat-form-field> | ||
<mat-label>Select Activity</mat-label> | ||
<mat-label>{{'Select Activity' | translate}}</mat-label> | ||
<mat-select class="selectField" [(ngModel)]="selectedActivity"> | ||
<mat-option *ngFor="let activity of activities" [value]="activity"> | ||
{{ activity }} | ||
</mat-option> | ||
</mat-select> | ||
</mat-form-field> | ||
<div *ngIf="selectedActivity === 'Other'"> | ||
<h4>Type other activity</h4> | ||
<h4>{{'Type other activity' | translate}}</h4> | ||
<input matInput class="inputField" placeholder="Custom Activity" [(ngModel)]="customActivity"> | ||
</div> | ||
</div> | ||
<div class="buttons"> | ||
<button mat-button class="add-button" (click)="onSave()" [mat-dialog-close]="selectedActivity || customActivity" [disabled]="!(selectedActivity || customActivity)">Add</button> | ||
<button mat-button class="cancel-button" (click)="onClose()">Cancel</button> | ||
<button mat-button class="add-button" (click)="onSave()" [mat-dialog-close]="selectedActivity || customActivity" [disabled]="!(selectedActivity || customActivity)">{{'Add' | translate}}</button> | ||
<button mat-button class="cancel-button" (click)="onClose()">{{'Cancel' | translate}}</button> | ||
</div> | ||
</div> | ||
|
6 changes: 3 additions & 3 deletions
6
...lendar-tool/src/app/components/crop-dialog-component/crop-dialog-component.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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<div class="dialog-container"> | ||
<h2 class="dialog-container" >{{ data.name }} Extra information</h2> | ||
<h2 class="dialog-container" >{{ data.name }} {{'Extra information' | translate}}</h2> | ||
<p>{{"Please include any information required about farming this crop."}}</p> | ||
<input class="inputField" [(ngModel)]="editedExtraInformation" placeholder="Edit extra information" /> | ||
<div mat-dialog-actions> | ||
<button mat-button (click)="onSave()">Save</button> | ||
<button mat-button (click)="onClose()">Close</button> | ||
<button mat-button (click)="onSave()">{{'Save'|translate}}</button> | ||
<button mat-button (click)="onClose()">{{'Close'|translate}}</button> | ||
</div> | ||
</div> |
Oops, something went wrong.