diff --git a/brewman/.pre-commit-config.yaml b/brewman/.pre-commit-config.yaml index 8b434375..911249e5 100644 --- a/brewman/.pre-commit-config.yaml +++ b/brewman/.pre-commit-config.yaml @@ -6,7 +6,7 @@ repos: hooks: - id: black - - repo: https://gitlab.com/pycqa/flake8 + - repo: https://github.com/PyCQA/flake8 rev: 5.0.4 hooks: - id: flake8 diff --git a/brewman/brewman/routers/product.py b/brewman/brewman/routers/product.py index 276cdae5..0038feec 100644 --- a/brewman/brewman/routers/product.py +++ b/brewman/brewman/routers/product.py @@ -233,9 +233,9 @@ async def show_term_sku( @router.get("/q-product", response_model=List[ProductSku]) async def show_term_product( - q: str = None, # Query - a: bool = None, # Active - p: bool = None, # Is Purchased? + q: str | None = None, # Query + a: bool | None = None, # Active + p: bool | None = None, # Is Purchased? current_user: UserToken = Depends(get_user), ) -> List[ProductSku]: list_ = [] diff --git a/brewman/brewman/routers/recipe.py b/brewman/brewman/routers/recipe.py index 9774cec5..fe000db7 100644 --- a/brewman/brewman/routers/recipe.py +++ b/brewman/brewman/routers/recipe.py @@ -231,7 +231,7 @@ def get_sub_product_cost(product: Product, period_id: uuid.UUID, db: Session) -> detail=f"Ingredient {product.name} is not bought and also does not have a recipe for the period.", ) - return round(recipe.cost_price / recipe.sku.fraction / recipe.sku.product_yield, 5) # type: ignore[no-any-return] + return round(recipe.cost_price / recipe.sku.fraction / recipe.sku.product_yield, 5) @router.delete("/{id_}", response_model=None) diff --git a/brewman/pyproject.toml b/brewman/pyproject.toml index f7e1e940..396c6aab 100644 --- a/brewman/pyproject.toml +++ b/brewman/pyproject.toml @@ -5,27 +5,27 @@ description = "Accounting plus inventory management for a restaurant." authors = ["tanshu "] [tool.poetry.dependencies] -python = "^3.10" +python = "^3.11" uvicorn = {extras = ["standard"], version = "^0.19.0"} -fastapi = "^0.85.1" +fastapi = "^0.87.0" python-jose = {extras = ["cryptography"], version = "^3.3.0"} passlib = {extras = ["bcrypt"], version = "^1.7.4"} psycopg2-binary = "^2.9.5" -SQLAlchemy = {extras = ["mypy"], version = "^1.4.42"} +SQLAlchemy = {extras = ["mypy"], version = "^1.4.44"} python-multipart = "^0.0.5" PyJWT = "^2.6.0" alembic = "^1.8.1" itsdangerous = "^2.1.2" python-dotenv = "^0.21.0" pydantic = {extras = ["dotenv"], version = "^1.10.2"} -starlette = "^0.20.4" +starlette = "^0.21.0" [tool.poetry.dev-dependencies] flake8 = "^5.0.4" black = "^22.10.0" isort = {extras = ["toml"], version = "^5.10.1"} pre-commit = "^2.20.0" -mypy = "^0.982" +mypy = "^0.991" [build-system] requires = ["poetry-core>=1.0.0"] diff --git a/overlord/package.json b/overlord/package.json index 169584e6..68b24fb6 100644 --- a/overlord/package.json +++ b/overlord/package.json @@ -14,47 +14,47 @@ }, "private": true, "dependencies": { - "@angular/animations": "^14.2.8", - "@angular/cdk": "^14.2.6", - "@angular/common": "^14.2.8", - "@angular/compiler": "^14.2.8", - "@angular/core": "^14.2.8", - "@angular/flex-layout": "^14.0.0-beta.41", - "@angular/forms": "^14.2.8", - "@angular/material": "^14.2.6", - "@angular/material-moment-adapter": "^14.2.6", - "@angular/platform-browser": "^14.2.8", - "@angular/platform-browser-dynamic": "^14.2.8", - "@angular/router": "^14.2.8", + "@angular/animations": "^14.2.10", + "@angular/cdk": "^14.2.7", + "@angular/common": "^14.2.10", + "@angular/compiler": "^14.2.10", + "@angular/core": "^14.2.10", + "@angular/forms": "^14.2.10", + "@angular/material": "^14.2.7", + "@angular/material-moment-adapter": "^14.2.7", + "@angular/platform-browser": "^14.2.10", + "@angular/platform-browser-dynamic": "^14.2.10", + "@angular/router": "^14.2.10", "@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.10", + "@types/mousetrap": "1.6.11", "angular2-hotkeys": "^13.1.0", - "mathjs": "^11.3.2", + "mathjs": "^11.3.3", "moment": "^2.29.4", "rxjs": "^6.6.7", "tslib": "^2.1.0", "zone.js": "~0.11.4" }, "devDependencies": { - "@angular-devkit/build-angular": "^14.2.7", - "@angular-eslint/builder": "^14.1.2", - "@angular-eslint/eslint-plugin": "^14.1.2", - "@angular-eslint/eslint-plugin-template": "^14.1.2", - "@angular-eslint/schematics": "^14.1.2", - "@angular-eslint/template-parser": "^14.1.2", - "@angular/cli": "^14.2.7", - "@angular/compiler-cli": "^14.2.8", - "@angular/language-service": "^14.2.8", + "@angular-devkit/build-angular": "^14.2.9", + "@angular-eslint/builder": "^14.2.0", + "@angular-eslint/eslint-plugin": "^14.2.0", + "@angular-eslint/eslint-plugin-template": "^14.2.0", + "@angular-eslint/schematics": "^14.2.0", + "@angular-eslint/template-parser": "^14.2.0", + "@angular/cli": "^14.2.9", + "@angular/compiler-cli": "^14.2.10", + "@angular/language-service": "^14.2.10", "@types/jasmine": "~4.3.0", - "@types/node": "^18.11.8", - "@typescript-eslint/eslint-plugin": "^5.41.0", - "@typescript-eslint/parser": "^5.41.0", + "@types/node": "^18.11.9", + "@typescript-eslint/eslint-plugin": "^5.43.0", + "@typescript-eslint/parser": "^5.43.0", + "autoprefixer": "^10.4.13", "eslint": "^8.26.0", "eslint-plugin-import": "2.26.0", "eslint-plugin-unused-imports": "^2.0.0", - "husky": "^8.0.1", + "husky": "^8.0.2", "jasmine-core": "~4.5.0", "jasmine-spec-reporter": "7.0.0", "karma": "^6.4.1", @@ -63,8 +63,10 @@ "karma-jasmine": "~5.1.0", "karma-jasmine-html-reporter": "^2.0.0", "lint-staged": "^13.0.3", + "postcss": "^8.4.19", "prettier": "^2.7.1", "standard-version": "^9.5.0", + "tailwindcss": "^3.2.4", "ts-node": "^9.1.1", "typescript": "~4.6.4" }, @@ -81,4 +83,4 @@ "npx eslint --cache --fix" ] } -} \ No newline at end of file +} 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 9a514a5d..5bbceba5 100644 --- a/overlord/src/app/account/account-detail/account-detail.component.html +++ b/overlord/src/app/account/account-detail/account-detail.component.html @@ -1,5 +1,5 @@ -
- +
+ Account -
-
- + +
+ Code
-
- +
+ Name
-
- +
+ Account Type @@ -53,24 +35,14 @@
-
- Is Active? - Is Reconcilable? +
+ Is Active? + Is Reconcilable?
-
- +
+ Cost Centre diff --git a/overlord/src/app/account/account-list/account-list.component.html b/overlord/src/app/account/account-list/account-list.component.html index b9c287e8..15d10fcd 100644 --- a/overlord/src/app/account/account-list/account-list.component.html +++ b/overlord/src/app/account/account-list/account-list.component.html @@ -7,15 +7,9 @@ - -
- + +
+ -
+
diff --git a/overlord/src/app/app.module.ts b/overlord/src/app/app.module.ts index 94503a38..242d0d69 100644 --- a/overlord/src/app/app.module.ts +++ b/overlord/src/app/app.module.ts @@ -3,7 +3,6 @@ import { registerLocaleData } from '@angular/common'; import { HttpClientModule } from '@angular/common/http'; import enIN from '@angular/common/locales/en-IN'; import { LOCALE_ID, NgModule } from '@angular/core'; -import { FlexLayoutModule } from '@angular/flex-layout'; import { ReactiveFormsModule } from '@angular/forms'; import { MatButtonModule } from '@angular/material/button'; import { MatCardModule } from '@angular/material/card'; @@ -39,7 +38,6 @@ registerLocaleData(enIN); imports: [ BrowserModule, BrowserAnimationsModule, - FlexLayoutModule.withConfig({ useColumnBasisZero: true }), HotkeyModule.forRoot(), HttpClientModule, LayoutModule, diff --git a/overlord/src/app/attendance/attendance.component.html b/overlord/src/app/attendance/attendance.component.html index 04f12bc1..f8a97237 100644 --- a/overlord/src/app/attendance/attendance.component.html +++ b/overlord/src/app/attendance/attendance.component.html @@ -3,9 +3,9 @@ Attendance - -
- + +
+ - +
@@ -47,7 +49,7 @@ Status - + {{ at.name }} diff --git a/overlord/src/app/attendance/attendance.module.ts b/overlord/src/app/attendance/attendance.module.ts index 28d9c875..7b9d4602 100644 --- a/overlord/src/app/attendance/attendance.module.ts +++ b/overlord/src/app/attendance/attendance.module.ts @@ -2,7 +2,6 @@ import { A11yModule } from '@angular/cdk/a11y'; import { CdkTableModule } from '@angular/cdk/table'; import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { FlexLayoutModule } from '@angular/flex-layout'; import { ReactiveFormsModule } from '@angular/forms'; import { MomentDateAdapter } from '@angular/material-moment-adapter'; import { MatAutocompleteModule } from '@angular/material/autocomplete'; @@ -49,7 +48,6 @@ export const MY_FORMATS = { A11yModule, CommonModule, CdkTableModule, - FlexLayoutModule, MatAutocompleteModule, MatButtonModule, MatCardModule, diff --git a/overlord/src/app/auth/login/login.component.html b/overlord/src/app/auth/login/login.component.html index e6f45e87..4b38f366 100644 --- a/overlord/src/app/auth/login/login.component.html +++ b/overlord/src/app/auth/login/login.component.html @@ -3,15 +3,15 @@ Login - -
- + +
+ Username
-
- +
+ Password

Client ID: {{ clientId }}

-
- +
+ Otp diff --git a/overlord/src/app/balance-sheet/balance-sheet.component.html b/overlord/src/app/balance-sheet/balance-sheet.component.html index 1e11fa0d..7ecff59b 100644 --- a/overlord/src/app/balance-sheet/balance-sheet.component.html +++ b/overlord/src/app/balance-sheet/balance-sheet.component.html @@ -3,15 +3,9 @@ Balance Sheet - -
- + +
+ Cash Flow - -
- + +
+ - + - +
diff --git a/overlord/src/app/cash-flow/cash-flow.module.ts b/overlord/src/app/cash-flow/cash-flow.module.ts index e72e6f26..c307e48d 100644 --- a/overlord/src/app/cash-flow/cash-flow.module.ts +++ b/overlord/src/app/cash-flow/cash-flow.module.ts @@ -1,7 +1,6 @@ import { CdkTableModule } from '@angular/cdk/table'; import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { FlexLayoutModule } from '@angular/flex-layout'; import { ReactiveFormsModule } from '@angular/forms'; import { MomentDateAdapter } from '@angular/material-moment-adapter'; import { MatButtonModule } from '@angular/material/button'; @@ -42,7 +41,6 @@ export const MY_FORMATS = { imports: [ CommonModule, CdkTableModule, - FlexLayoutModule, MatButtonModule, MatCardModule, MatCheckboxModule, diff --git a/overlord/src/app/client/client-detail/client-detail.component.css b/overlord/src/app/client/client-detail/client-detail.component.css index 82c7afd6..e69de29b 100644 --- a/overlord/src/app/client/client-detail/client-detail.component.css +++ b/overlord/src/app/client/client-detail/client-detail.component.css @@ -1,3 +0,0 @@ -.example-card { - max-width: 400px; -} diff --git a/overlord/src/app/client/client-detail/client-detail.component.html b/overlord/src/app/client/client-detail/client-detail.component.html index 3355bdf5..b451ee98 100644 --- a/overlord/src/app/client/client-detail/client-detail.component.html +++ b/overlord/src/app/client/client-detail/client-detail.component.html @@ -1,51 +1,27 @@ -
- +
+ Client -
-
- + +
+ Code
-
- +
+ Name
-
- Is Enabled? +
+ Is Enabled?
-
- +
+ OTP diff --git a/overlord/src/app/client/client.module.ts b/overlord/src/app/client/client.module.ts index 4e6d56a8..0a25e820 100644 --- a/overlord/src/app/client/client.module.ts +++ b/overlord/src/app/client/client.module.ts @@ -1,7 +1,6 @@ import { CdkTableModule } from '@angular/cdk/table'; import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { FlexLayoutModule } from '@angular/flex-layout'; import { ReactiveFormsModule } from '@angular/forms'; import { MatButtonModule } from '@angular/material/button'; import { MatCardModule } from '@angular/material/card'; @@ -23,7 +22,6 @@ import { ClientRoutingModule } from './client-routing.module'; imports: [ CommonModule, CdkTableModule, - FlexLayoutModule, MatButtonModule, MatCardModule, MatCheckboxModule, diff --git a/overlord/src/app/closing-stock/closing-stock.component.html b/overlord/src/app/closing-stock/closing-stock.component.html index 6efe31b6..57e5470f 100644 --- a/overlord/src/app/closing-stock/closing-stock.component.html +++ b/overlord/src/app/closing-stock/closing-stock.component.html @@ -6,15 +6,9 @@ - -
- + +
+ Department @@ -22,7 +16,7 @@ - + - +
Physical Stock - + Physical Department - + Department - +
+ Cost Center - -
- + +
+ Name Daybook - -
- + +
+ - + - +
diff --git a/overlord/src/app/daybook/daybook.module.ts b/overlord/src/app/daybook/daybook.module.ts index 63941928..c75e47ab 100644 --- a/overlord/src/app/daybook/daybook.module.ts +++ b/overlord/src/app/daybook/daybook.module.ts @@ -2,7 +2,6 @@ import { A11yModule } from '@angular/cdk/a11y'; import { CdkTableModule } from '@angular/cdk/table'; import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { FlexLayoutModule } from '@angular/flex-layout'; import { ReactiveFormsModule } from '@angular/forms'; import { MomentDateAdapter } from '@angular/material-moment-adapter'; import { MatAutocompleteModule } from '@angular/material/autocomplete'; @@ -46,7 +45,6 @@ export const MY_FORMATS = { A11yModule, CommonModule, CdkTableModule, - FlexLayoutModule, MatAutocompleteModule, MatButtonModule, MatCardModule, diff --git a/overlord/src/app/employee-attendance/employee-attendance.component.html b/overlord/src/app/employee-attendance/employee-attendance.component.html index 34ee3c38..a7ac2e44 100644 --- a/overlord/src/app/employee-attendance/employee-attendance.component.html +++ b/overlord/src/app/employee-attendance/employee-attendance.component.html @@ -3,15 +3,9 @@ Employee Attendance -
-
- + +
+ - +
-
- +
+ - +
@@ -76,7 +66,7 @@ Status - + {{ at.name }} diff --git a/overlord/src/app/employee-attendance/employee-attendance.module.ts b/overlord/src/app/employee-attendance/employee-attendance.module.ts index e491fca2..9c4db49b 100644 --- a/overlord/src/app/employee-attendance/employee-attendance.module.ts +++ b/overlord/src/app/employee-attendance/employee-attendance.module.ts @@ -2,7 +2,6 @@ import { A11yModule } from '@angular/cdk/a11y'; import { CdkTableModule } from '@angular/cdk/table'; import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { FlexLayoutModule } from '@angular/flex-layout'; import { ReactiveFormsModule } from '@angular/forms'; import { MomentDateAdapter } from '@angular/material-moment-adapter'; import { MatAutocompleteModule } from '@angular/material/autocomplete'; @@ -49,7 +48,6 @@ export const MY_FORMATS = { A11yModule, CommonModule, CdkTableModule, - FlexLayoutModule, MatAutocompleteModule, MatButtonModule, MatCardModule, diff --git a/overlord/src/app/employee-benefits/employee-benefits.component.html b/overlord/src/app/employee-benefits/employee-benefits.component.html index 5b4f1e26..6d279260 100644 --- a/overlord/src/app/employee-benefits/employee-benefits.component.html +++ b/overlord/src/app/employee-benefits/employee-benefits.component.html @@ -3,9 +3,9 @@ Employee Benefits - -
- + +
+
- + - + Gross Salary - + Days Worked - +
diff --git a/overlord/src/app/employee-benefits/employee-benefits.module.ts b/overlord/src/app/employee-benefits/employee-benefits.module.ts index 9465bd99..30ba674d 100644 --- a/overlord/src/app/employee-benefits/employee-benefits.module.ts +++ b/overlord/src/app/employee-benefits/employee-benefits.module.ts @@ -2,7 +2,6 @@ import { A11yModule } from '@angular/cdk/a11y'; import { CdkTableModule } from '@angular/cdk/table'; import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { FlexLayoutModule } from '@angular/flex-layout'; import { ReactiveFormsModule } from '@angular/forms'; import { MomentDateAdapter } from '@angular/material-moment-adapter'; import { MatAutocompleteModule } from '@angular/material/autocomplete'; @@ -48,7 +47,6 @@ export const MY_FORMATS = { A11yModule, CommonModule, CdkTableModule, - FlexLayoutModule, MatAutocompleteModule, MatButtonModule, MatCardModule, diff --git a/overlord/src/app/employee-functions/employee-functions.component.html b/overlord/src/app/employee-functions/employee-functions.component.html index c58a9b30..18780b6a 100644 --- a/overlord/src/app/employee-functions/employee-functions.component.html +++ b/overlord/src/app/employee-functions/employee-functions.component.html @@ -2,15 +2,9 @@ - -
- + +
+ -
@@ -41,13 +40,9 @@ - + - + - Download Attendance - Download Fingerprints @@ -87,15 +90,16 @@
- + -
diff --git a/overlord/src/app/employee-functions/employee-functions.module.ts b/overlord/src/app/employee-functions/employee-functions.module.ts index 5bc4751d..a7e0b873 100644 --- a/overlord/src/app/employee-functions/employee-functions.module.ts +++ b/overlord/src/app/employee-functions/employee-functions.module.ts @@ -2,7 +2,6 @@ import { A11yModule } from '@angular/cdk/a11y'; import { CdkTableModule } from '@angular/cdk/table'; import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { FlexLayoutModule } from '@angular/flex-layout'; import { ReactiveFormsModule } from '@angular/forms'; import { MomentDateAdapter } from '@angular/material-moment-adapter'; import { MatAutocompleteModule } from '@angular/material/autocomplete'; @@ -49,7 +48,6 @@ export const MY_FORMATS = { A11yModule, CommonModule, CdkTableModule, - FlexLayoutModule, MatAutocompleteModule, MatButtonModule, MatCardModule, diff --git a/overlord/src/app/employee/employee-detail/employee-detail.component.html b/overlord/src/app/employee/employee-detail/employee-detail.component.html index 32665af9..57c0899b 100644 --- a/overlord/src/app/employee/employee-detail/employee-detail.component.html +++ b/overlord/src/app/employee/employee-detail/employee-detail.component.html @@ -11,42 +11,42 @@ -
-
- + +
+ Code
-
- +
+ Name
-
- +
+ Designation
-
- +
+ Salary
-
- +
+ Points
-
+
Is Active?
-
- +
+ Cost Centre @@ -55,7 +55,7 @@
- + - + - -
- + +
+ Entries - -
- + +
+ - + -
-
- +
+ Posted Not Posted All Incentives - -
- + +
+
-
+
Total Incentive: {{ voucher.incentive | number: '1.2-2' }} Total Points: {{ totalPoints() | number: '1.2-2' }} Point Value: {{ pointValue() | number: '1.2-2' }} @@ -54,7 +54,7 @@ Service Points - + +
diff --git a/overlord/src/app/issue/issue.module.ts b/overlord/src/app/issue/issue.module.ts index b22640f6..4b8b5419 100644 --- a/overlord/src/app/issue/issue.module.ts +++ b/overlord/src/app/issue/issue.module.ts @@ -2,7 +2,6 @@ import { A11yModule } from '@angular/cdk/a11y'; import { CdkTableModule } from '@angular/cdk/table'; import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { FlexLayoutModule } from '@angular/flex-layout'; import { ReactiveFormsModule } from '@angular/forms'; import { MomentDateAdapter } from '@angular/material-moment-adapter'; import { MatAutocompleteModule } from '@angular/material/autocomplete'; @@ -50,7 +49,6 @@ export const MY_FORMATS = { A11yModule, CommonModule, CdkTableModule, - FlexLayoutModule, HotkeyModule, MatAutocompleteModule, MatButtonModule, diff --git a/overlord/src/app/journal/journal-dialog.component.html b/overlord/src/app/journal/journal-dialog.component.html index 9cab2573..af2a69e9 100644 --- a/overlord/src/app/journal/journal-dialog.component.html +++ b/overlord/src/app/journal/journal-dialog.component.html @@ -1,20 +1,14 @@

Edit Journal Entry

-
- +
+ Dr Cr - + - + Amount - -
- + +
+
- + Dr Cr - + - + Amount - +
@@ -117,7 +115,7 @@ - + Narration -
-
+
+
-
+