service new_task and style conf refactoring

This commit is contained in:
ragu 2023-01-05 18:11:24 +01:00
parent 14d1891695
commit 8607a42e34
18 changed files with 54 additions and 92 deletions

View file

@ -832,13 +832,15 @@ sub service_work {
$key_change .= "_" . $j;
}
my $work_val = "$pos_record->{$id}->{$key}";
$work_val = "" if($pos_record->{$id}->{$key} eq "::new_task::");
$return->{$article}->{$key_change}->{service_id} = "$pos_record->{$id}->{c_id}";
$return->{$article}->{$key_change}->{work_id} = "$key";
$return->{$article}->{$key_change}->{work_name} = "$val";
$return->{$article}->{$key_change}->{interval} = "$interval";
$return->{$article}->{$key_change}->{time_over} = "$time_over";
$return->{$article}->{$key_change}->{service_type} = "$service_type";
$return->{$article}->{$key_change}->{work_val} = "$pos_record->{$id}->{$key}";
$return->{$article}->{$key_change}->{work_val} = "$work_val";
$return->{$article}->{$key_change}->{mtime} = "$pos_record->{$id}->{mtime}";
$return->{$article}->{$key_change}->{user_name} = "$u_name";
$return->{$article}->{$key_change}->{owner} = "$pos_record->{$id}->{owner}";

View file

@ -753,10 +753,12 @@ elsif($q->param('request') eq "service_done"){
if(ref($xresponse->{$article}) eq "HASH"){
#$bw->log("service_done xresponse",$xresponse->{$article},"");
#if no new_task then select last service_id with work_duration < 1 day
my $service_id = "";
#select last service_id with work_duration < 1 day
foreach my $id (sort { $xresponse->{$article}->{$a}->{mtime} cmp $xresponse->{$article}->{$b}->{mtime} } keys (%{$xresponse->{$article}})){
if(!$q->param('new_task') && $q->param('work_val') ne "::new_task::"){
foreach my $id (sort { $xresponse->{$article}->{$a}->{mtime} cmp $xresponse->{$article}->{$b}->{mtime} } keys (%{$xresponse->{$article}})){
$service_id = $id if($id > 1);
}
}
my $rows=0;

View file

@ -418,7 +418,7 @@ sub sig_booking {
my $endpoint = "$dbt->{operator}->{$varenv->{dbname}}->{endpoint}/";
my %json = ();
$ctadr->{txt08} =~ s/[a-z]-/-/; $ctadr->{txt08} =~ s/[a-z]_/_/; $ctadr->{txt08} =~ s/[a-z]\@/\@/i;
$ctadr->{txt08} =~ s/[a-z]-/-/; $ctadr->{txt08} =~ s/[a-z]_/_/; $ctadr->{txt08} =~ s/[0-9a-z]\@/\@/i; $ctadr->{txt08} =~ s/[0-9a-z]\@/\@/i; $ctadr->{txt08} =~ s/\@(\w{1,2})\w+\.(\w+)/\@$1email\.$2/i;
$ctadr->{txt08} =~ s/[a-z]\./\./ if($ctadr->{txt08} =~ /\.\w+\@/);
#reservation start
if($todo eq "reserve"){

View file

@ -706,25 +706,6 @@ sub handler {
}
my $dyn_css = "";
if(1==1){
my $background = "";
$background = "$varenv{metahost}/img/$varenv{background_image}" if($varenv{background_image});
$dyn_css = "
html,body {
background-image:url('$background');
background-repeat: $varenv{background_repeat};
background-position: right bottom;
background-attachment:fixed;
background-size:$varenv{background_size};
font-size: $varenv{font_size};
line-height: $varenv{line_height};
margin: 0; padding: 0;
text-align:$varenv{background_align};
}\n";
}
my $url = "$varenv{wwwhost}/$path";
my $onload="";

View file

@ -128,7 +128,7 @@ sub admin_tpl(){
print $q->Tr();
if(1==1){
if(($users_dms->{u_id} > 0) || ($u_group eq "admin")){
print "<td style='background:$varenv{background_color2};margin:1px 0;padding:2px;' colspan='2' nowrap>\n";
print "<td style='background:#a7a18f;margin:1px 0;padding:2px;' colspan='2' nowrap>\n";
#print "<td style='margin:1px 0;padding:0px;' colspan='2' nowrap>\n";
print $but->singlesubmit7("rel_edit","save_relation","$ib{save_relation}","","modal_position(xpos,ypos)");
#look at dialog4menu, it seems better. vise a verse