feat(i18n): add VAT labels and email sent messages in German and English
style(admin): increase max-width of admin page and adjust table styles fix(n8n): enhance workflow import and publishing process fix(workflows): update SQL queries for fetching and updating sales orders feat(migrations): normalize rental types and enhance email guard for individuell rentals feat(migrations): add RPC for updating deposit in sales orders fix(migrations): ensure individuell orders persist net/vat components and backfill existing records test: update last run status to failed
This commit is contained in:
@@ -76,12 +76,9 @@ sed \
|
||||
echo "[n8n-bootstrap] Importing credentials"
|
||||
n8n import:credentials --input="$CREDENTIALS_FILE"
|
||||
|
||||
echo "[n8n-bootstrap] Importing workflow"
|
||||
echo "[n8n-bootstrap] Importing workflow 01"
|
||||
n8n import:workflow --input="$WORKFLOW_RENDERED"
|
||||
|
||||
echo "[n8n-bootstrap] Activating workflow ${N8N_PAYMENT_WORKFLOW_ID}"
|
||||
n8n update:workflow --id="${N8N_PAYMENT_WORKFLOW_ID}" --active=true
|
||||
|
||||
# Process and import workflow 03 - Manual Email Send
|
||||
if [ -f "$WORKFLOW03_TEMPLATE" ]; then
|
||||
sed \
|
||||
@@ -95,4 +92,12 @@ if [ -f "$WORKFLOW03_TEMPLATE" ]; then
|
||||
n8n import:workflow --input="$WORKFLOW03_RENDERED"
|
||||
fi
|
||||
|
||||
# Publish all imported workflows so they appear in the UI
|
||||
echo "[n8n-bootstrap] Publishing all workflows"
|
||||
WF_IDS=$(n8n list:workflow 2>/dev/null | cut -d'|' -f1 || true)
|
||||
for wfid in $WF_IDS; do
|
||||
echo "[n8n-bootstrap] Publishing workflow $wfid"
|
||||
n8n publish:workflow --id="$wfid" 2>/dev/null || true
|
||||
done
|
||||
|
||||
echo "[n8n-bootstrap] Bootstrap complete"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "executeQuery",
|
||||
"query": "SELECT c.id, c.name, c.email, c.phone,\n so.order_number, so.total_eur, so.deposit_eur,\n so.date_from, so.date_to, so.vehicle_label,\n so.daily_subtotal, so.weekend_subtotal,\n so.subtotal_eur, so.vat_eur,\n so.total_days, so.weekday_count, so.weekend_day_count\nFROM public.customers c\nJOIN public.sales_orders so ON so.customer_id = c.id\nWHERE so.id = '{{ $json.payload.id }}'::uuid",
|
||||
"query": "SELECT so.id, c.name, c.email, c.phone,\n so.order_number, so.total_eur, so.deposit_eur,\n so.date_from, so.date_to, so.vehicle_label,\n so.daily_subtotal, so.weekend_subtotal,\n so.subtotal_eur, so.vat_eur,\n so.total_days, so.weekday_count, so.weekend_day_count,\n so.rental_type\nFROM public.customers c\nJOIN public.sales_orders so ON so.customer_id = c.id\nWHERE so.id = '{{ $json.payload.id }}'::uuid\n AND coalesce(lower(trim(so.rental_type)), 'weekend') NOT IN ('individuell','individual','custom')",
|
||||
"options": {}
|
||||
},
|
||||
"id": "ca4ca61e-fea9-4044-9586-216af016cb2e",
|
||||
@@ -84,7 +84,7 @@
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "executeQuery",
|
||||
"query": "UPDATE public.sales_orders SET email_sent = 1, updated_at = now() WHERE id = '{{ $json.payload.id }}'::uuid",
|
||||
"query": "UPDATE public.sales_orders SET email_sent = 1, updated_at = now() WHERE id = '{{ $('Fetch Order Data').item.json.id }}'::uuid",
|
||||
"options": {}
|
||||
},
|
||||
"id": "update-email-sent-1",
|
||||
@@ -102,7 +102,7 @@
|
||||
{
|
||||
"parameters": {
|
||||
"operation": "executeQuery",
|
||||
"query": "UPDATE public.sales_orders SET email_sent = 2, updated_at = now() WHERE id = '{{ $json.payload.id }}'::uuid",
|
||||
"query": "UPDATE public.sales_orders SET email_sent = 2, updated_at = now() WHERE id = '{{ $('Fetch Order Data').item.json.id }}'::uuid",
|
||||
"options": {}
|
||||
},
|
||||
"id": "update-email-sent-2",
|
||||
@@ -121,20 +121,28 @@
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"options": {
|
||||
"testDirectly": true
|
||||
"caseSensitive": true,
|
||||
"leftValue": "",
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"boolean": [
|
||||
"conditions": [
|
||||
{
|
||||
"id": "cond-email-error",
|
||||
"leftValue": "={{ $json.error }}",
|
||||
"condition": "isEmpty"
|
||||
"rightValue": "",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "notExists"
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"combinator": "and"
|
||||
}
|
||||
},
|
||||
"id": "check-email-error",
|
||||
"name": "IF",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"typeVersion": 1,
|
||||
"typeVersion": 2,
|
||||
"position": [896, 0]
|
||||
}
|
||||
],
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user