Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c32db91535 | ||
|
|
79cdf83c9e |
+4
-1
@@ -51,4 +51,7 @@ yarn-error.log*
|
||||
|
||||
# Ignore Pyright-generated stubs
|
||||
*.pyi
|
||||
typings/
|
||||
typings/
|
||||
|
||||
# AI Coding agents temp files
|
||||
.scratch/
|
||||
Vendored
+1
-1
@@ -4,7 +4,7 @@
|
||||
"tasks": [
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "start -- --port 4200",
|
||||
"script": "start",
|
||||
"isBackground": true,
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}/overlord"
|
||||
|
||||
@@ -4,6 +4,7 @@ build-production: ## Build the production container image. Usage: make build-pro
|
||||
@echo "Building image..."
|
||||
@podman manifest rm registry.tanshu.com/brewman:latest 2>/dev/null || true
|
||||
@podman build \
|
||||
--format docker \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--manifest registry.tanshu.com/brewman:latest \
|
||||
--pull \
|
||||
@@ -20,6 +21,7 @@ build-check: ## Multi-arch build without push (compile check). Usage: make build
|
||||
@echo "Building image..."
|
||||
@podman manifest rm brewman:test 2>/dev/null || true
|
||||
@podman build \
|
||||
--format docker \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--manifest brewman:test \
|
||||
--pull \
|
||||
@@ -33,6 +35,7 @@ build-check-local: ## Single-arch build without push (compile check). Usage: mak
|
||||
@echo "Building image..."
|
||||
@podman manifest rm brewman:test 2>/dev/null || true
|
||||
@podman build \
|
||||
--format docker \
|
||||
--platform linux/amd64 \
|
||||
--manifest brewman:test \
|
||||
--no-cache \
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
env_file: "/var/lib/{{ host_directory }}/.env"
|
||||
networks:
|
||||
- name: "brewman_{{ instance }}_net"
|
||||
# volumes:
|
||||
# - "/var/lib/{{ host_directory }}/frontend:/frontend"
|
||||
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -fsS http://localhost/health || kill -s 15 1"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
start_period: 30s
|
||||
retries: 3
|
||||
|
||||
@@ -14,7 +14,10 @@ def report_start_date(request: Request, s: str | date | None = None) -> date:
|
||||
return d
|
||||
if "start" not in session:
|
||||
session["start"] = get_first_day(date.today()).isoformat()
|
||||
return date.fromisoformat(session["start"])
|
||||
try:
|
||||
return date.fromisoformat(session["start"])
|
||||
except ValueError:
|
||||
return get_first_day(date.today())
|
||||
|
||||
|
||||
def report_finish_date(request: Request, f: str | date | None = None) -> date:
|
||||
@@ -28,7 +31,10 @@ def report_finish_date(request: Request, f: str | date | None = None) -> date:
|
||||
return d
|
||||
if "finish" not in session:
|
||||
session["finish"] = get_last_day(date.today()).isoformat()
|
||||
return date.fromisoformat(session["finish"])
|
||||
try:
|
||||
return date.fromisoformat(session["finish"])
|
||||
except ValueError:
|
||||
return get_last_day(date.today())
|
||||
|
||||
|
||||
def report_date(request: Request, d: str | date | None = None) -> date:
|
||||
@@ -42,7 +48,10 @@ def report_date(request: Request, d: str | date | None = None) -> date:
|
||||
return parsed_date
|
||||
if "date" not in session:
|
||||
session["date"] = get_last_day(date.today()).isoformat()
|
||||
return date.fromisoformat(session["date"])
|
||||
try:
|
||||
return date.fromisoformat(session["date"])
|
||||
except ValueError:
|
||||
return get_last_day(date.today())
|
||||
|
||||
|
||||
def get_first_day(dt: date, d_years: int = 0, d_months: int = 0) -> date:
|
||||
|
||||
@@ -26,20 +26,16 @@
|
||||
<div class="row-container">
|
||||
<mat-form-field class="flex-auto basis-4-5">
|
||||
<mat-label>Product</mat-label>
|
||||
<input
|
||||
type="text"
|
||||
matInput
|
||||
#productElement
|
||||
[matAutocomplete]="auto"
|
||||
[formField]="form.product"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<input type="text" matInput [matAutocomplete]="auto" [formField]="form.product" autocomplete="off" />
|
||||
<mat-autocomplete
|
||||
#auto="matAutocomplete"
|
||||
autoActiveFirstOption
|
||||
[displayWith]="displayFn"
|
||||
(optionSelected)="selected($event)"
|
||||
>
|
||||
@for (product of products(); track product.id) {
|
||||
<mat-option [value]="product">{{ product.name }}</mat-option>
|
||||
}
|
||||
</mat-autocomplete>
|
||||
</mat-form-field>
|
||||
<button mat-raised-button type="submit" class="flex-auto basis-1-5" color="primary">Show</button>
|
||||
|
||||
Reference in New Issue
Block a user