diff --git a/.vscode/launch.json b/.vscode/launch.json
index 78b77a89..bd5b3e12 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -11,6 +11,13 @@
"preLaunchTask": "npm: start",
"url": "http://localhost:4200/"
},
+ {
+ "name": "ng test",
+ "type": "chrome",
+ "request": "launch",
+ "preLaunchTask": "npm: test",
+ "url": "http://localhost:9876/debug.html"
+ },
{
"name": "Python: FastAPI",
"type": "python",
diff --git a/brewman/alembic/versions/12262aadbc08_recipe_templates.py b/brewman/alembic/versions/12262aadbc08_recipe_templates.py
index 782846ea..48f307d3 100644
--- a/brewman/alembic/versions/12262aadbc08_recipe_templates.py
+++ b/brewman/alembic/versions/12262aadbc08_recipe_templates.py
@@ -5,6 +5,7 @@ Revises: a1372ed99c45
Create Date: 2023-04-14 07:50:22.110724
"""
+
import sqlalchemy as sa
from alembic import op
diff --git a/brewman/alembic/versions/185c674cc392_load_data.py b/brewman/alembic/versions/185c674cc392_load_data.py
index 767a6777..a9f7d751 100644
--- a/brewman/alembic/versions/185c674cc392_load_data.py
+++ b/brewman/alembic/versions/185c674cc392_load_data.py
@@ -5,6 +5,7 @@ Revises: 0bf3d70ee7de
Create Date: 2022-10-31 06:23:13.091598
"""
+
from hashlib import md5
import sqlalchemy as sa
diff --git a/brewman/alembic/versions/2438cd581f00_nut.py b/brewman/alembic/versions/2438cd581f00_nut.py
index a9ce1b18..4a7f9088 100644
--- a/brewman/alembic/versions/2438cd581f00_nut.py
+++ b/brewman/alembic/versions/2438cd581f00_nut.py
@@ -5,6 +5,7 @@ Revises: ba0fff092981
Create Date: 2023-10-16 16:26:45.922654
"""
+
import sqlalchemy as sa
from alembic import op
diff --git a/brewman/alembic/versions/48af31eb6f3f_fp.py b/brewman/alembic/versions/48af31eb6f3f_fp.py
index 0ae5e018..16faa7ab 100644
--- a/brewman/alembic/versions/48af31eb6f3f_fp.py
+++ b/brewman/alembic/versions/48af31eb6f3f_fp.py
@@ -5,6 +5,7 @@ Revises: 12262aadbc08
Create Date: 2023-08-07 13:01:05.401492
"""
+
from alembic import op
diff --git a/brewman/alembic/versions/66abfc21db73_allergen.py b/brewman/alembic/versions/66abfc21db73_allergen.py
index 9749e27e..ceb60b8e 100644
--- a/brewman/alembic/versions/66abfc21db73_allergen.py
+++ b/brewman/alembic/versions/66abfc21db73_allergen.py
@@ -5,6 +5,7 @@ Revises: 2438cd581f00
Create Date: 2023-12-28 12:45:01.275322
"""
+
import sqlalchemy as sa
from alembic import op
diff --git a/brewman/alembic/versions/a1372ed99c45_recipe_upgrade.py b/brewman/alembic/versions/a1372ed99c45_recipe_upgrade.py
index 43a143b5..47644c2b 100644
--- a/brewman/alembic/versions/a1372ed99c45_recipe_upgrade.py
+++ b/brewman/alembic/versions/a1372ed99c45_recipe_upgrade.py
@@ -5,6 +5,7 @@ Revises: 185c674cc392
Create Date: 2023-03-31 05:03:40.408240
"""
+
import sqlalchemy as sa
from sqlalchemy import func
diff --git a/brewman/alembic/versions/ba0fff092981_price.py b/brewman/alembic/versions/ba0fff092981_price.py
index 42d47945..df5c78d1 100644
--- a/brewman/alembic/versions/ba0fff092981_price.py
+++ b/brewman/alembic/versions/ba0fff092981_price.py
@@ -5,6 +5,7 @@ Revises: 48af31eb6f3f
Create Date: 2023-08-11 18:12:51.293741
"""
+
import sqlalchemy as sa
from alembic import op
diff --git a/brewman/brewman/routers/account.py b/brewman/brewman/routers/account.py
index dabbe295..721b5b39 100644
--- a/brewman/brewman/routers/account.py
+++ b/brewman/brewman/routers/account.py
@@ -245,7 +245,7 @@ def delete_with_data(account: Account, db: Session) -> None:
assert acc_jnl is not None
if sus_jnl is None:
acc_jnl.account = suspense_account
- voucher.narration += f"\nSuspense \u20B9{acc_jnl.amount:,.2f} is {account.name}"
+ voucher.narration += f"\nSuspense \u20b9{acc_jnl.amount:,.2f} is {account.name}"
else:
amount = (sus_jnl.debit * sus_jnl.amount) + (acc_jnl.debit * acc_jnl.amount)
db.delete(acc_jnl)
@@ -254,7 +254,7 @@ def delete_with_data(account: Account, db: Session) -> None:
else:
sus_jnl.amount = abs(amount)
sus_jnl.debit = -1 if amount < 0 else 1
- voucher.narration += f"\nDeleted \u20B9{acc_jnl.amount * acc_jnl.debit:,.2f} of {account.name}"
+ voucher.narration += f"\nDeleted \u20b9{acc_jnl.amount * acc_jnl.debit:,.2f} of {account.name}"
if voucher.voucher_type in (
VoucherType.PAYMENT,
VoucherType.RECEIPT,
diff --git a/brewman/brewman/routers/employee.py b/brewman/brewman/routers/employee.py
index 4e6bae29..8e760fba 100644
--- a/brewman/brewman/routers/employee.py
+++ b/brewman/brewman/routers/employee.py
@@ -232,7 +232,7 @@ def delete_with_data(employee: Employee, db: Session) -> None:
assert acc_jnl is not None
if sus_jnl is None:
acc_jnl.account = suspense_account
- voucher.narration += f"\nSuspense \u20B9 {acc_jnl.amount:,.2f} is {employee.name}"
+ voucher.narration += f"\nSuspense \u20b9 {acc_jnl.amount:,.2f} is {employee.name}"
else:
amount = (sus_jnl.debit * sus_jnl.amount) + (acc_jnl.debit * acc_jnl.amount)
if acc_jnl.employee_benefit is not None:
@@ -243,7 +243,7 @@ def delete_with_data(employee: Employee, db: Session) -> None:
else:
sus_jnl.amount = abs(amount)
sus_jnl.debit = -1 if amount < 0 else 1
- voucher.narration += f"\nDeleted \u20B9 {acc_jnl.amount * acc_jnl.debit:,.2f} of {employee.name}"
+ voucher.narration += f"\nDeleted \u20b9 {acc_jnl.amount * acc_jnl.debit:,.2f} of {employee.name}"
if voucher.voucher_type in (
VoucherType.PAYMENT,
VoucherType.RECEIPT,
diff --git a/brewman/brewman/routers/rebase.py b/brewman/brewman/routers/rebase.py
index b8600d9a..c2b7d139 100644
--- a/brewman/brewman/routers/rebase.py
+++ b/brewman/brewman/routers/rebase.py
@@ -95,7 +95,7 @@ def save_starred(date_: date, db: Session) -> list[uuid.UUID]:
for other in others:
if voucher.voucher_type != VoucherType.OPENING_ACCOUNTS:
- voucher.narration += f"\nSuspense \u20B9{other.amount:,.2f} is {other.account.name}"
+ voucher.narration += f"\nSuspense \u20b9{other.amount:,.2f} is {other.account.name}"
if other.employee_benefit:
db.delete(other.employee_benefit)
if other.incentive:
diff --git a/docker/app/Dockerfile b/docker/app/Dockerfile
index e83580ce..495169cd 100644
--- a/docker/app/Dockerfile
+++ b/docker/app/Dockerfile
@@ -39,7 +39,7 @@ ARG INSTALL_DEV=false
RUN bash -c "if [ $INSTALL_DEV == 'true' ] ; then poetry install --no-root ; else poetry install --no-root --only main ; fi"
COPY --from=builder /app/brewman /app
-COPY --from=builder /app/frontend /app/frontend
+COPY --from=builder /app/frontend/browser /app/frontend
ENV PYTHONPATH=/app
EXPOSE 80
diff --git a/overlord/.gitignore b/overlord/.gitignore
index 3f8a8401..41adae5e 100644
--- a/overlord/.gitignore
+++ b/overlord/.gitignore
@@ -4,16 +4,14 @@
/dist
/tmp
/out-tsc
-# Only exists if Bazel was run
/bazel-out
-# dependencies
+# Node
/node_modules
+npm-debug.log
+yarn-error.log
package-lock.json
-# profiling files
-chrome-profiler-events*.json
-
# IDEs and editors
/.idea
.project
@@ -23,7 +21,7 @@ chrome-profiler-events*.json
.settings/
*.sublime-workspace
-# IDE - VSCode
+# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
@@ -31,14 +29,13 @@ chrome-profiler-events*.json
!.vscode/extensions.json
.history/*
-# misc
+# Miscellaneous
/.angular/cache
-/.sass-cache
+/.nx/cache
+.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
-npm-debug.log
-yarn-error.log
testem.log
/typings
diff --git a/overlord/angular.json b/overlord/angular.json
index 907ced64..3cb8e5e3 100644
--- a/overlord/angular.json
+++ b/overlord/angular.json
@@ -6,6 +6,9 @@
"overlord": {
"projectType": "application",
"schematics": {
+ "@schematics/angular:component": {
+ "style": "scss"
+ },
"@schematics/angular:application": {
"strict": true
}
@@ -15,11 +18,12 @@
"prefix": "app",
"architect": {
"build": {
- "builder": "@angular-devkit/build-angular:browser",
+ "builder": "@angular-devkit/build-angular:application",
"options": {
- "outputPath": "../frontend",
+ "outputPath": {
+ "base": "../frontend"
+ },
"index": "src/index.html",
- "main": "src/main.ts",
"polyfills": [
"zone.js"
],
@@ -32,7 +36,8 @@
"@angular/material/prebuilt-themes/indigo-pink.css",
"src/styles.css"
],
- "scripts": []
+ "scripts": [],
+ "browser": "src/main.ts"
},
"configurations": {
"production": {
@@ -40,7 +45,7 @@
{
"type": "initial",
"maximumWarning": "500kb",
- "maximumError": "1mb"
+ "maximumError": "1500kb"
},
{
"type": "anyComponentStyle",
@@ -57,9 +62,7 @@
"outputHashing": "all"
},
"development": {
- "buildOptimizer": false,
"optimization": false,
- "vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
@@ -71,10 +74,10 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
- "browserTarget": "overlord:build:production"
+ "buildTarget": "overlord:build:production"
},
"development": {
- "browserTarget": "overlord:build:development"
+ "buildTarget": "overlord:build:development"
}
},
"options": {
@@ -85,18 +88,18 @@
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
- "browserTarget": "overlord:build"
+ "buildTarget": "overlord:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
- "main": "src/test.ts",
"polyfills": [
"zone.js",
"zone.js/testing"
],
"tsConfig": "tsconfig.spec.json",
+ "inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets"
@@ -124,14 +127,6 @@
"schematicCollections": [
"@angular-eslint/schematics"
],
- "analytics": "0309c8d2-99a2-4dd3-b63e-9a0a43611460"
- },
- "schematics": {
- "@angular-eslint/schematics:application": {
- "setParserOptionsProject": true
- },
- "@angular-eslint/schematics:library": {
- "setParserOptionsProject": true
- }
+ "analytics": false
}
}
diff --git a/overlord/package.json b/overlord/package.json
index 90a571b0..97bf8a9e 100644
--- a/overlord/package.json
+++ b/overlord/package.json
@@ -14,47 +14,47 @@
},
"private": true,
"dependencies": {
- "@angular/animations": "^16.1.6",
- "@angular/cdk": "^16.1.5",
- "@angular/common": "^16.1.6",
- "@angular/compiler": "^16.1.6",
- "@angular/core": "^16.1.6",
- "@angular/forms": "^16.1.6",
- "@angular/material": "^16.1.5",
- "@angular/material-moment-adapter": "^16.1.5",
- "@angular/platform-browser": "^16.1.6",
- "@angular/platform-browser-dynamic": "^16.1.6",
- "@angular/router": "^16.1.6",
+ "@angular/animations": "^17.3.6",
+ "@angular/cdk": "^17.3.6",
+ "@angular/common": "^17.3.6",
+ "@angular/compiler": "^17.3.6",
+ "@angular/core": "^17.3.6",
+ "@angular/forms": "^17.3.6",
+ "@angular/material": "^17.3.6",
+ "@angular/material-moment-adapter": "^17.3.6",
+ "@angular/platform-browser": "^17.3.6",
+ "@angular/platform-browser-dynamic": "^17.3.6",
+ "@angular/router": "^17.3.6",
"@ngx-loading-bar/core": "^6.0.2",
"@ngx-loading-bar/http-client": "^6.0.2",
"@ngx-loading-bar/router": "^6.0.2",
- "@types/mousetrap": "1.6.11",
- "angular2-hotkeys": "^15.0.0",
- "mathjs": "^11.9.0",
- "moment": "^2.29.4",
+ "@types/mousetrap": "1.6.15",
+ "angular2-hotkeys": "^16.0.1",
+ "mathjs": "^12.4.2",
+ "moment": "^2.30.1",
"rxjs": "~7.8.0",
"tslib": "^2.6.0",
- "zone.js": "~0.13.1"
+ "zone.js": "~0.14.4"
},
"devDependencies": {
- "@angular-devkit/build-angular": "^16.1.5",
- "@angular-eslint/builder": "^16.1.0",
- "@angular-eslint/eslint-plugin": "^16.1.0",
- "@angular-eslint/eslint-plugin-template": "^16.1.0",
- "@angular-eslint/schematics": "^16.1.0",
- "@angular-eslint/template-parser": "^16.1.0",
- "@angular/cli": "^16.1.5",
- "@angular/compiler-cli": "^16.1.6",
- "@angular/language-service": "^16.1.6",
- "@types/jasmine": "~4.3.5",
- "@typescript-eslint/eslint-plugin": "^6.1.0",
- "@typescript-eslint/parser": "^6.1.0",
- "autoprefixer": "^10.4.14",
- "eslint": "^8.39.0",
- "eslint-config-prettier": "^8.7.0",
- "eslint-plugin-import": "^2.27.5",
- "eslint-plugin-unused-imports": "^3.0.0",
- "husky": "^8.0.2",
+ "@angular-devkit/build-angular": "^17.3.6",
+ "@angular-eslint/builder": "^17.3.0",
+ "@angular-eslint/eslint-plugin": "^17.3.0",
+ "@angular-eslint/eslint-plugin-template": "^17.3.0",
+ "@angular-eslint/schematics": "^17.3.0",
+ "@angular-eslint/template-parser": "^17.3.0",
+ "@angular/cli": "^17.3.6",
+ "@angular/compiler-cli": "^17.3.6",
+ "@angular/language-service": "^17.3.6",
+ "@types/jasmine": "~5.1.4",
+ "@typescript-eslint/eslint-plugin": "^7.2.0",
+ "@typescript-eslint/parser": "^7.2.0",
+ "autoprefixer": "^10.4.19",
+ "eslint": "^8.57.0",
+ "eslint-config-prettier": "^9.1.0",
+ "eslint-plugin-import": "^2.29.1",
+ "eslint-plugin-unused-imports": "^3.1.0",
+ "husky": "^9.0.11",
"jasmine-core": "~5.1.0",
"jasmine-spec-reporter": "7.0.0",
"karma": "^6.4.2",
@@ -62,12 +62,12 @@
"karma-coverage": "~2.2.1",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "^2.1.0",
- "lint-staged": "^13.2.3",
- "postcss": "^8.4.27",
- "prettier": "^3.0.0",
+ "lint-staged": "^15.2.2",
+ "postcss": "^8.4.38",
+ "prettier": "^3.2.5",
"standard-version": "^9.5.0",
- "tailwindcss": "^3.3.3",
- "typescript": "~5.1.6"
+ "tailwindcss": "^3.4.3",
+ "typescript": "~5.4.5"
},
"husky": {
"hooks": {
diff --git a/overlord/src/app/account/account-detail/account-detail.component.html b/overlord/src/app/account/account-detail/account-detail.component.html
index 6a81203b..330a887e 100644
--- a/overlord/src/app/account/account-detail/account-detail.component.html
+++ b/overlord/src/app/account/account-detail/account-detail.component.html
@@ -25,9 +25,11 @@