removing decimal with precision and decimal count

This commit is contained in:
Filipriec
2026-08-24 21:31:06 +02:00
parent 16670f4375
commit 5e9b86c1fb
22 changed files with 50 additions and 467 deletions

View File

@@ -127,22 +127,13 @@
{% if page.draft.columns.show_link_target() %}<small>{{ nav.tr("td-link-alias-hint") }}</small>{% endif %}
</label>
{% endif %}
<label>{{ nav.tr("td-fixed-decimal-access") }}
<select name="fixed_decimal_input" hx-post="/admin/tables/builder" hx-trigger="change"
hx-include="#table-form" hx-target="#builder" hx-swap="innerHTML"
hx-vals='{"action": "refresh"}'>
<option value="no" {% if !page.draft.columns.fixed_decimal_enabled() %}selected{% endif %}>{{ nav.tr("td-fixed-decimal-disabled") }}</option>
<option value="yes" {% if page.draft.columns.fixed_decimal_enabled() %}selected{% endif %}>{{ nav.tr("td-fixed-decimal-enabled") }}</option>
</select>
<small>{{ nav.tr("td-fixed-decimal-access-hint") }}</small>
</label>
<label>{{ nav.tr("td-column-type") }}
<select name="column_type_input" hx-post="/admin/tables/builder" hx-trigger="change"
hx-include="#table-form" hx-target="#builder" hx-swap="innerHTML"
hx-vals='{"action": "refresh"}'>
<option value="">{{ nav.tr("td-choose-type") }}</option>
{% for column_type in column_types %}
<option value="{{ column_type }}" {% if page.draft.columns.type_input == *column_type %}selected{% endif %}>{% if *column_type == "link" %}{{ nav.tr("td-fk-link") }}{% else if *column_type == "numeric" %}{{ nav.tr("td-exact-decimal") }}{% else if *column_type == "decimal" %}{{ nav.tr("td-fixed-decimal-type") }}{% else %}{{ column_type }}{% endif %}</option>
<option value="{{ column_type }}" {% if page.draft.columns.type_input == *column_type %}selected{% endif %}>{% if *column_type == "link" %}{{ nav.tr("td-fk-link") }}{% else %}{{ column_type }}{% endif %}</option>
{% endfor %}
</select>
</label>
@@ -169,23 +160,6 @@
</label>
{% endif %}
{% if page.draft.columns.show_decimal_arguments() %}
<div class="field-note col-span-full">
<span class="field-label">{{ nav.tr("td-fixed-decimal-warning-title") }}</span>
<p class="hint">{{ nav.tr("td-fixed-decimal-warning") }}</p>
</div>
<label>{{ nav.tr("td-precision") }}
<input name="decimal_precision_input" value="{{ page.draft.columns.decimal_precision_input }}"
inputmode="numeric" placeholder="12">
<small>{{ nav.tr("td-precision-hint") }}</small>
</label>
<label>{{ nav.tr("td-scale") }}
<input name="decimal_scale_input" value="{{ page.draft.columns.decimal_scale_input }}"
inputmode="numeric" placeholder="3">
<small>{{ nav.tr("td-scale-hint") }}</small>
</label>
{% endif %}
{% if page.draft.columns.show_link_target() %}
<label>{{ nav.tr("td-referenced-table") }}
<select name="link_table_input">

View File

@@ -29,17 +29,6 @@
<input name="column_name_input" value="{{ page.columns.name_input }}" placeholder="issued_on">
{% if page.columns.show_link_target() %}<small>{{ nav.tr("td-link-alias-hint") }}</small>{% endif %}
</label>
<label>{{ nav.tr("td-fixed-decimal-access") }}
<select name="fixed_decimal_input"
hx-post="/admin/tables/columns/add/builder{{ page.selection.query() }}"
hx-trigger="change" hx-include="#column-form"
hx-target="#column-panel" hx-swap="innerHTML"
hx-vals='{"action": "refresh"}'>
<option value="no" {% if !page.columns.fixed_decimal_enabled() %}selected{% endif %}>{{ nav.tr("td-fixed-decimal-disabled") }}</option>
<option value="yes" {% if page.columns.fixed_decimal_enabled() %}selected{% endif %}>{{ nav.tr("td-fixed-decimal-enabled") }}</option>
</select>
<small>{{ nav.tr("td-fixed-decimal-access-hint") }}</small>
</label>
<label>{{ nav.tr("td-column-type") }}
<select name="column_type_input"
hx-post="/admin/tables/columns/add/builder{{ page.selection.query() }}"
@@ -48,7 +37,7 @@
hx-vals='{"action": "refresh"}'>
<option value="">{{ nav.tr("td-choose-type") }}</option>
{% for column_type in column_types %}
<option value="{{ column_type }}" {% if page.columns.type_input == *column_type %}selected{% endif %}>{% if *column_type == "link" %}{{ nav.tr("td-fk-link") }}{% else if *column_type == "numeric" %}{{ nav.tr("td-exact-decimal") }}{% else if *column_type == "decimal" %}{{ nav.tr("td-fixed-decimal-type") }}{% else %}{{ column_type }}{% endif %}</option>
<option value="{{ column_type }}" {% if page.columns.type_input == *column_type %}selected{% endif %}>{% if *column_type == "link" %}{{ nav.tr("td-fk-link") }}{% else %}{{ column_type }}{% endif %}</option>
{% endfor %}
</select>
</label>
@@ -75,23 +64,6 @@
</label>
{% endif %}
{% if page.columns.show_decimal_arguments() %}
<div class="field-note col-span-full">
<span class="field-label">{{ nav.tr("td-fixed-decimal-warning-title") }}</span>
<p class="hint">{{ nav.tr("td-fixed-decimal-warning") }}</p>
</div>
<label>{{ nav.tr("td-precision") }}
<input name="decimal_precision_input" value="{{ page.columns.decimal_precision_input }}"
inputmode="numeric" placeholder="12">
<small>{{ nav.tr("td-precision-hint") }}</small>
</label>
<label>{{ nav.tr("td-scale") }}
<input name="decimal_scale_input" value="{{ page.columns.decimal_scale_input }}"
inputmode="numeric" placeholder="3">
<small>{{ nav.tr("td-scale-hint") }}</small>
</label>
{% endif %}
{% if page.columns.show_link_target() %}
<label>{{ nav.tr("td-referenced-table") }}
<select name="link_table_input">