smartlock sequence refactoring

This commit is contained in:
ragu 2022-10-02 19:26:08 +02:00
parent 03d4fac62b
commit 60a60121f3
4 changed files with 208 additions and 310 deletions

View file

@ -163,36 +163,28 @@ sub tpl(){
table => "$node_meta->{ct_table}",
limit => $q->escapeHTML($limit),
offset => $q->escapeHTML($offset),
cal_sort_updown => $users_dms->{cal_sort_updown},
};
if($R::base_edit !~ /transpos|save_pos/){
$search = { %$search,
cttpos_id => $q->escapeHTML("$R::cttpos_id"),
txt06 => $q->escapeHTML("$R::txt06"),
txt08 => $q->escapeHTML("$R::txt08"),
txt23 => $q->escapeHTML("$R::txt23"),
int04 => $q->escapeHTML("$R::int04"),
int06 => $q->escapeHTML("$R::int06"),
int12 => $q->escapeHTML("$R::int12"),
int13 => $q->escapeHTML("$R::int13"),
cp_ct_name => $q->escapeHTML("$R::cp_ct_name"),
int10 => $q->escapeHTML("$R::int10"),
int20 => $q->escapeHTML("$R::int20"),
barcode => $q->escapeHTML("$R::barcode"),
ct_txt06 => $q->escapeHTML("$R::ct_txt06"),#PLZ
ct_ct_name => $q->escapeHTML("$R::ct_ct_name"),
}
}
$search = { %$search,
start_date_time => "$start_date_time",
end_date_time => "$end_date_time",
owner => $q->escapeHTML("$R::owner"),
} if(!$R::cttpos_id && !$R::ct_id);
#$search->{barcode} = $q->escapeHTML("$R::barcode") if($R::base_edit eq "save_pos" && $R::barcode);
$search->{ct_id} = $q->escapeHTML("$R::ct_id") if($R::ct_id);#done on save_pos and insert fee
if($R::ct_id){
$search->{ct_id} = $q->escapeHTML("$R::ct_id");
}else{
$search->{start_date_time} = "$start_date_time";
$search->{end_date_time} = "$end_date_time";
$search->{cttpos_id} = $q->escapeHTML("$R::cttpos_id");
$search->{txt06} = $q->escapeHTML("$R::txt06");
$search->{txt08} = $q->escapeHTML("$R::txt08");
$search->{txt23} = $q->escapeHTML("$R::txt23");
$search->{int04} = $q->escapeHTML("$R::int04");
$search->{int06} = $q->escapeHTML("$R::int06");
$search->{int12} = $q->escapeHTML("$R::int12");
$search->{int13} = $q->escapeHTML("$R::int13");
$search->{cp_ct_name} = $q->escapeHTML("$R::cp_ct_name");
$search->{int10} = $q->escapeHTML("$R::int10");
$search->{int20} = $q->escapeHTML("$R::int20");
$search->{barcode} = $q->escapeHTML("$R::barcode");
$search->{ct_txt06} = $q->escapeHTML("$R::ct_txt06");#PLZ
$search->{ct_ct_name} = $q->escapeHTML("$R::ct_ct_name");
}
if(!$start_chck && !$end_chck){
if($node_meta->{ct_table} eq "contenttranspos"){
@ -247,8 +239,8 @@ sub tpl(){
foreach(@tpl_order){
#$h++;
my ($key,$des,$size) = split /=/,$_;
my $valxx = $q->param("$_");
$valxx = "" if($R::base_edit eq "save_pos" && $key ne "barcode");#empty search fields, select only bike number
my $valxx = $q->param("$_") || "";
#$valxx = "" if($R::base_edit eq "save_pos" && $key ne "barcode");#empty search fields, select only bike number
if($key =~ /time/){
$size="10px";