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