5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2025-03-01 07:21:48 +00:00

Merge branch 'production.panel.sutty.nl' of 0xacab.org:sutty/sutty into production.panel.sutty.nl

This commit is contained in:
Sutty 2024-07-05 19:23:58 +00:00
commit e4c1a777db
25 changed files with 31 additions and 28 deletions

View file

@ -108,7 +108,7 @@ export default class extends Controller {
if (!this.isChecked(itemTarget)) continue;
this.originalValue.push(itemTarget.dataset.value);
this.newArrayValueURL.searchParams.set("value", itemTarget.dataset?.humanValue || itemTarget.dataset?.value);
this.newArrayValueURL.searchParams.set("value", itemTarget.dataset?.sendValue || itemTarget.dataset?.value);
const placeholder = this.placeholderTarget.content.firstElementChild.cloneNode(true);

View file

@ -58,7 +58,7 @@
- content_for :"#{id}_body" do
.form-group.mb-0{ id: value_list_id }
- metadata.values.each_pair do |value, uuid|
= render 'targets/array/item', value: uuid, 'human-value': value, class: 'mb-2' do
= render 'targets/array/item', value: uuid, 'send-value': uuid, 'human-value': value, class: 'mb-2' do
= render 'bootstrap/custom_checkbox', name: name, id: random_id, value: uuid, checked: metadata.value.include?(uuid), content: value, type: 'radio'
-#

View file

@ -59,7 +59,7 @@
- content_for :"#{id}_body" do
.form-group.mb-0{ id: value_list_id }
- metadata.values.each_pair do |value, uuid|
= render 'targets/array/item', value: uuid, 'human-value': value, class: 'mb-2' do
= render 'targets/array/item', value: uuid, 'send-value': uuid, 'human-value': value, class: 'mb-2' do
= render 'bootstrap/custom_checkbox', name: name, id: random_id, value: uuid, checked: metadata.value.include?(uuid), content: value, data: { action: 'required-checkbox#change', target: 'required-checkbox.checkbox' }
-#

View file

@ -59,7 +59,7 @@
- content_for :"#{id}_body" do
.form-group.mb-0{ id: value_list_id }
- metadata.values.each_pair do |value, uuid|
= render 'targets/array/item', value: uuid, 'human-value': value, class: 'mb-2' do
= render 'targets/array/item', value: uuid, 'send-value': uuid, 'human-value': value, class: 'mb-2' do
= render 'bootstrap/custom_checkbox', name: name, id: random_id, value: uuid, checked: metadata.value.include?(uuid), content: value, data: { action: 'required-checkbox#change', target: 'required-checkbox.checkbox' }
-#

View file

@ -6,16 +6,19 @@
@param :value [String] El valor (requerido)
@param :human-value [String] El valor legible por humanes (opcional)
@param :send-value [String] El valor que se envía al controlador (opcional)
@param :searchable-value [String] El valor para usar en el filtro (opcional)
:ruby
local_assigns[:'human-value'] ||= value
local_assigns[:'send-value'] ||= local_assigns[:'human-value']
local_assigns[:'searchable-value'] ||= local_assigns[:'human-value'].remove_diacritics.downcase
local_assigns.delete(:value)
data = local_assigns.delete(:data)
data ||= {}
data[:'human-value'] = local_assigns.delete(:'human-value')
data[:'send-value'] = local_assigns.delete(:'send-value')
data[:'searchable-value'] = local_assigns.delete(:'searchable-value')
%div{ **local_assigns, data: { target: 'array.item', value: value, **data } }= yield

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
public/packs/js/application-f68840b38b1cfd7c6500.js (Stored with Git LFS) Normal file

Binary file not shown.

BIN
public/packs/js/application-f68840b38b1cfd7c6500.js.br (Stored with Git LFS) Normal file

Binary file not shown.

BIN
public/packs/js/application-f68840b38b1cfd7c6500.js.gz (Stored with Git LFS) Normal file

Binary file not shown.

BIN
public/packs/js/application-f68840b38b1cfd7c6500.js.map (Stored with Git LFS) Normal file

Binary file not shown.

BIN
public/packs/js/application-f68840b38b1cfd7c6500.js.map.br (Stored with Git LFS) Normal file

Binary file not shown.

BIN
public/packs/js/application-f68840b38b1cfd7c6500.js.map.gz (Stored with Git LFS) Normal file

Binary file not shown.

BIN
public/packs/manifest.json (Stored with Git LFS)

Binary file not shown.

BIN
public/packs/manifest.json.br (Stored with Git LFS)

Binary file not shown.

BIN
public/packs/manifest.json.gz (Stored with Git LFS)

Binary file not shown.