Add numeric value column to extra vars, and add option to mark extra var as sortable #2604 #2559

This commit is contained in:
Kijin Sung 2025-10-23 11:17:24 +09:00
parent 978aecd7a8
commit 2a7eeebcbd
19 changed files with 141 additions and 37 deletions

View file

@ -36,6 +36,7 @@ class Value
public $is_disabled = 'N';
public $is_readonly = 'N';
public $search = 'N';
public $sort = 'N';
public $style = null;
/**
@ -87,8 +88,9 @@ class Value
* @param string $parent_type
* @param string $is_strict
* @param string $options
* @param string $sort
*/
function __construct(int $module_srl, int $idx, string $name, string $type = 'text', $default = null, $desc = '', $is_required = 'N', $search = 'N', $value = null, $eid = '', $parent_type = 'document', $is_strict = '', $options = null)
function __construct(int $module_srl, int $idx, string $name, string $type = 'text', $default = null, $desc = '', $is_required = 'N', $search = 'N', $value = null, $eid = '', $parent_type = 'document', $is_strict = '', $options = null, $sort = 'N')
{
if (!$idx)
{
@ -108,6 +110,7 @@ class Value
$this->is_required = $is_required;
$this->is_strict = $is_strict;
$this->search = $search;
$this->sort = $sort;
}
/**

View file

@ -50,7 +50,7 @@ class ValueCollection
foreach ($keys as $val)
{
$this->keys[$val->idx] = new Value($val->module_srl, $val->idx, $val->name, $val->type, $val->default, $val->desc, $val->is_required, $val->search, $val->value ?? null, $val->eid, $val->parent_type ?? 'document', $val->is_strict, $val->options);
$this->keys[$val->idx] = new Value($val->module_srl, $val->idx, $val->name, $val->type, $val->default, $val->desc, $val->is_required, $val->search, $val->value ?? null, $val->eid, $val->parent_type ?? 'document', $val->is_strict, $val->options, $val->sort ?? 'N');
}
}