Reports
This commit is contained in:
@ -1,13 +1,29 @@
|
||||
{% extends "main/base/layout.html" %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<form
|
||||
hx-post="{{ url("complex-form-handle") }}"
|
||||
hx-trigger="change"
|
||||
hx-target="#complex-form-content"
|
||||
>
|
||||
<div id="complex-form-content">
|
||||
{% include "main/complex_form/route_module.html" %}
|
||||
<form class="row">
|
||||
<div
|
||||
class="col"
|
||||
hx-post="{{ url("complex-form-handle-route-module") }}"
|
||||
hx-trigger="change"
|
||||
hx-target="#route-module-content"
|
||||
>
|
||||
<div id="route-module-content">
|
||||
{% set state = form_state.route_module %}
|
||||
{% include "main/complex_form/route_module.html" %}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="col"
|
||||
hx-post="{{ url("complex-form-handle-reports") }}"
|
||||
hx-trigger="change"
|
||||
hx-target="#reports-content"
|
||||
>
|
||||
<div id="reports-content">
|
||||
{% set state = form_state.reports %}
|
||||
{% include "main/complex_form/reports.html" %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
86
project/main/templates/main/complex_form/reports.html
Normal file
86
project/main/templates/main/complex_form/reports.html
Normal file
@ -0,0 +1,86 @@
|
||||
{% from "main/components/inputs.html" import checkbox, select %}
|
||||
|
||||
{% set indent_1 = "ms-4" %}
|
||||
{% set indent_2 = "ms-5" %}
|
||||
|
||||
<div class="card p-3">
|
||||
{{ checkbox(
|
||||
title="Enable Reports",
|
||||
name="reports",
|
||||
state=state.enabled
|
||||
) }}
|
||||
|
||||
<hr>
|
||||
|
||||
{{ checkbox(
|
||||
title="Allow empty cashbag",
|
||||
name="allow_empty_cashbag",
|
||||
state=state.allow_empty_cashbag
|
||||
) }}
|
||||
{{ checkbox(
|
||||
title="Reports builder",
|
||||
name="reports_builder",
|
||||
state=state.reports_builder
|
||||
) }}
|
||||
{{ checkbox(
|
||||
title="Tax reports",
|
||||
name="tax_reports",
|
||||
state=state.tax_reports
|
||||
) }}
|
||||
{{ checkbox(
|
||||
title="Transaction list",
|
||||
name="transaction_list",
|
||||
state=state.transaction_list
|
||||
) }}
|
||||
{{ checkbox(
|
||||
title="Reports generator",
|
||||
name="reports_generator",
|
||||
state=state.reports_generator
|
||||
) }}
|
||||
{{ checkbox(
|
||||
title="Technical center reports",
|
||||
name="technical_center_reports",
|
||||
state=state.technical_center_reports
|
||||
) }}
|
||||
{{ checkbox(
|
||||
title="Dispense list",
|
||||
name="dispense_list",
|
||||
state=state.dispense_list
|
||||
) }}
|
||||
|
||||
{{ checkbox(
|
||||
title="Cash conformity",
|
||||
name="cash_conformity",
|
||||
state=state.cash_conformity
|
||||
) }}
|
||||
{{ checkbox(
|
||||
title="Scan 2nd barcode",
|
||||
name="scan_2nd_bardcode",
|
||||
state=state.scan_2nd_bardcode,
|
||||
cls=indent_1
|
||||
) }}
|
||||
{{ select(
|
||||
title="Days between CC",
|
||||
name="days_between_cc",
|
||||
options={
|
||||
"1": "1",
|
||||
"2": "2",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "5",
|
||||
"6": "6",
|
||||
"7": "7",
|
||||
"8": "8",
|
||||
"9": "9",
|
||||
"14": "14",
|
||||
"30": "30",
|
||||
"31": "31",
|
||||
"60": "60",
|
||||
"90": "90",
|
||||
"365": "365",
|
||||
},
|
||||
state=state.days_between_cc,
|
||||
cls=indent_1
|
||||
) }}
|
||||
|
||||
</div>
|
||||
@ -3,84 +3,102 @@
|
||||
{% set indent_1 = "ms-4" %}
|
||||
{% set indent_2 = "ms-5" %}
|
||||
|
||||
{% set state = form_state.route_module %}
|
||||
<div class="card p-3">
|
||||
{{ checkbox(
|
||||
title="Enable Route module",
|
||||
name="route_module",
|
||||
state=state.enabled
|
||||
) }}
|
||||
|
||||
{{ checkbox(
|
||||
title="Route module",
|
||||
name="route_module",
|
||||
state=state.enabled
|
||||
) }}
|
||||
{{ checkbox(
|
||||
title="Smart routing",
|
||||
name="smart_routing",
|
||||
state=state.smart_routing,
|
||||
cls=indent_1
|
||||
) }}
|
||||
{{ checkbox(
|
||||
title="Predictive pickup",
|
||||
name="predictive_pickup",
|
||||
state=state.predictive_pickup,
|
||||
cls=indent_2
|
||||
) }}
|
||||
{{ checkbox(
|
||||
title="Automatic planning",
|
||||
name="automatic_planning",
|
||||
state=state.automatic_planning,
|
||||
cls=indent_2
|
||||
) }}
|
||||
{{ checkbox(
|
||||
title="Geo routing",
|
||||
name="geo_routing",
|
||||
state=state.geo_routing,
|
||||
cls=indent_1
|
||||
) }}
|
||||
<hr>
|
||||
|
||||
{{ select(
|
||||
title="Packing model",
|
||||
name="packing_model",
|
||||
options={
|
||||
"": "No packing model",
|
||||
"per_route": "Packing model per route",
|
||||
"per_machine": "Packing model per machine",
|
||||
},
|
||||
state=state.packing_model,
|
||||
cls=indent_1
|
||||
) }}
|
||||
{{ checkbox(
|
||||
title="Smart routing",
|
||||
name="smart_routing",
|
||||
state=state.smart_routing
|
||||
) }}
|
||||
|
||||
{{ checkbox(
|
||||
title="Predictive pickup",
|
||||
name="predictive_pickup",
|
||||
state=state.predictive_pickup,
|
||||
cls=indent_1
|
||||
) }}
|
||||
|
||||
{{ checkbox(
|
||||
title="Prekitting to box",
|
||||
name="prekitting_to_box",
|
||||
state=state.prekitting_to_box,
|
||||
cls=indent_2
|
||||
) }}
|
||||
{{ checkbox(
|
||||
title="Prekitting to pallet",
|
||||
name="prekitting_to_pallet",
|
||||
state=state.prekitting_to_pallet,
|
||||
cls=indent_2
|
||||
) }}
|
||||
{{ checkbox(
|
||||
title="Real time stock",
|
||||
name="real_time_stock",
|
||||
state=state.real_time_stock,
|
||||
cls=indent_2
|
||||
) }}
|
||||
{{ checkbox(
|
||||
title="Warehouse",
|
||||
name="warehouse",
|
||||
state=state.warehouse,
|
||||
cls=indent_1
|
||||
) }}
|
||||
{{ checkbox(
|
||||
title="End warehouse tracking",
|
||||
name="end_warehouse_tracking",
|
||||
state=state.end_warehouse_tracking,
|
||||
cls=indent_2
|
||||
) }}
|
||||
{{ checkbox(
|
||||
title="Custom forms in routing",
|
||||
name="custom_forms_in_routing",
|
||||
state=state.custom_forms_in_routing,
|
||||
cls=indent_1
|
||||
) }}
|
||||
{{ checkbox(
|
||||
title="Automatic planning",
|
||||
name="automatic_planning",
|
||||
state=state.automatic_planning,
|
||||
cls=indent_1
|
||||
) }}
|
||||
|
||||
{{ checkbox(
|
||||
title="Geo routing",
|
||||
name="geo_routing",
|
||||
state=state.geo_routing
|
||||
) }}
|
||||
|
||||
{{ checkbox(
|
||||
title="Warehouse",
|
||||
name="warehouse",
|
||||
state=state.warehouse
|
||||
) }}
|
||||
|
||||
{{ checkbox(
|
||||
title="End warehouse tracking",
|
||||
name="end_warehouse_tracking",
|
||||
state=state.end_warehouse_tracking,
|
||||
cls=indent_1
|
||||
) }}
|
||||
|
||||
{{ checkbox(
|
||||
title="Pick&Pack application",
|
||||
name="pick_and_pack_application",
|
||||
state=state.pick_and_pack_application,
|
||||
cls=indent_1
|
||||
) }}
|
||||
|
||||
{{ checkbox(
|
||||
title="Custom forms in routing",
|
||||
name="custom_forms_in_routing",
|
||||
state=state.custom_forms_in_routing
|
||||
) }}
|
||||
|
||||
{{ checkbox(
|
||||
title="Money bag tracking",
|
||||
name="money_bag_tracking",
|
||||
state=state.money_bag_tracking
|
||||
) }}
|
||||
|
||||
{{ select(
|
||||
title="Packing model",
|
||||
name="packing_model",
|
||||
options={
|
||||
"": "No packing model",
|
||||
"per_route": "Packing model per route",
|
||||
"per_machine": "Packing model per machine",
|
||||
},
|
||||
state=state.packing_model
|
||||
) }}
|
||||
|
||||
{{ checkbox(
|
||||
title="Prekitting to box",
|
||||
name="prekitting_to_box",
|
||||
state=state.prekitting_to_box,
|
||||
cls=indent_1
|
||||
) }}
|
||||
|
||||
{{ checkbox(
|
||||
title="Prekitting to pallet",
|
||||
name="prekitting_to_pallet",
|
||||
state=state.prekitting_to_pallet,
|
||||
cls=indent_1
|
||||
) }}
|
||||
|
||||
{{ checkbox(
|
||||
title="Real time stock",
|
||||
name="real_time_stock",
|
||||
state=state.real_time_stock,
|
||||
cls=indent_1
|
||||
) }}
|
||||
</div>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
{% if state.visible %}
|
||||
{% set id = random_id() %}
|
||||
|
||||
<div class="form-check {{ cls }}">
|
||||
<div class="form-check {{ cls }} mb-2">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="checkbox"
|
||||
@ -22,15 +22,20 @@
|
||||
{% macro select(title, name, options, state, cls="") %}
|
||||
{% if state.visible %}
|
||||
<div class="{{ cls }}">
|
||||
{% if title %}
|
||||
<label class="form-label {% if not state.enabled %}text-secondary{% endif %}">
|
||||
{{ title }}
|
||||
</label>
|
||||
{% endif %}
|
||||
<select
|
||||
name="{{ name }}"
|
||||
class="form-select form-select-sm"
|
||||
class="form-select mb-2"
|
||||
{% if not state.enabled %}disabled{% endif %}
|
||||
>
|
||||
{% for value, title in options.items() %}
|
||||
<option
|
||||
value="{{ value }}"
|
||||
{% if value == state.value %}selected {% endif %}
|
||||
{% if not state.enabled %}disabled {% endif %}
|
||||
{% if value == state.value %}selected{% endif %}
|
||||
>
|
||||
{{ title }}
|
||||
</option>
|
||||
|
||||
Reference in New Issue
Block a user