Reco family

This commit is contained in:
CHIEFSOFT\ameye
2024-11-07 06:00:54 -05:00
parent 21db457bbc
commit 983973a30d
2 changed files with 65 additions and 3 deletions
+23 -3
View File
@@ -103,8 +103,8 @@ long WrenchFamilyHomeBanners(CVars in, CVars &out){
if(itm_count < 3){
// if( RecoLearnMore( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
// if( RecoPlayGround( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
if( RecoReferAFreind( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
if( RecoPlayGround( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
// if( RecoReferAFreind( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
// if( RecoCheckBlog( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; }
}
@@ -151,7 +151,10 @@ long RecoCheckFamilyOffers( int itm_count, CVars in, CVars &out ){
out[vname] ="URL";
snprintf(vname, sizeof (vname), "link_path_%05d", ic);
out[vname] = "mytask";
out[vname] = "pending";
snprintf(vname, sizeof (vname), "action_%05d", ic);
out[vname] = "pending";
snprintf(vname, sizeof (vname), "button_text_%05d", ic);
out[vname] = "Continue";
@@ -216,6 +219,10 @@ long RecoCheckFamilyActive( int itm_count, CVars in, CVars &out ){
snprintf(vname, sizeof (vname), "link_path_%05d", ic);
out[vname] = "mytask"; //Active Task Page //"my-active-jobs";
snprintf(vname, sizeof (vname), "action_%05d", ic);
out[vname] = "mytask";
snprintf(vname, sizeof (vname), "button_text_%05d", ic);
out[vname] = "View Tasks";
@@ -280,6 +287,9 @@ long RecoFamilyPastDueTask( int itm_count, CVars in, CVars &out ){
snprintf(vname, sizeof (vname), "link_path_%05d", ic);
out[vname] = "pastdue"; //Active Task Page //"my-active-jobs";
snprintf(vname, sizeof (vname), "action_%05d", ic);
out[vname] = "pastdue";
snprintf(vname, sizeof (vname), "button_text_%05d", ic);
out[vname] = "View Tasks";
@@ -345,6 +355,9 @@ long RecoFamilyKidsWaiting( int itm_count, CVars in, CVars &out ){
snprintf(vname, sizeof (vname), "link_path_%05d", ic);
out[vname] = "parentwaiting";
snprintf(vname, sizeof (vname), "action_%05d", ic);
out[vname] = "parentwaiting";
snprintf(vname, sizeof (vname), "button_text_%05d", ic);
out[vname] = "Continue";
@@ -410,6 +423,10 @@ long RecoRecomendToParent( int itm_count, CVars in, CVars &out ){
snprintf(vname, sizeof (vname), "link_path_%05d", ic);
out[vname] = "familymarket";
snprintf(vname, sizeof (vname), "action_%05d", ic);
out[vname] = "familymarket";
snprintf(vname, sizeof (vname), "button_text_%05d", ic);
out[vname] = "View";
@@ -687,6 +704,9 @@ long RecoPlayGround( int itm_count, CVars in, CVars &out ){
snprintf(vname, sizeof (vname), "link_path_%05d", ic);
out[vname] = "resources";
snprintf(vname, sizeof (vname), "action_%05d", ic);
out[vname] = "resources";
snprintf(vname, sizeof (vname), "button_text_%05d", ic);
out[vname] = "View Tasks";
+42
View File
@@ -454,6 +454,48 @@ class ResultFormatter extends Model
);
}
break;
case WRENCHBOARD_FAMILY_HOMEBANNERS:
$total = $out["total_record"];
$res = array(
"status" => $out["status"],
"total_record" => ($total - 1),
"internal_return" => $out["internal_return"],
"family_action" => 0,
"home_dash_type" => $out["home_dash_type"],
"result_list" => array(),
);
for ($i = 0; $i < $total; $i++) {
$key = sprintf("%05d", $i);
$banner_action = $out["action_${key}"];
$res["result_list"][] =
[$banner_action =>
["banner" =>
[
"text" => $out["title_${key}"],
"contract" => $out["contract_${key}"],
"card_type" => $out["card_type_${key}"],
"style" => $out["card_style_${key}"],
"description" => $out["description_${key}"],
"blog_id" => $out["blog_id_${key}"],
"card_icon" => $out["card_icon_${key}"],
"offer_id" => $out["offer_id_${key}"],
"image" => $this->fixEmptyBanner( $out["banner_${key}"]),
"banner_location" => $out["banner_location_${key}"],
"link_path" => $out["link_path_${key}"],
"action" => $banner_action,
"button_text" => $out["button_text_${key}"],
"short_button_text" => $out["short_button_text_${key}"],
"short_title" => $out["short_title_${key}"],
"short_description" => $out["short_description_${key}"],
"short_style" => $out["short_style_${key}"],
"status"=> 1
]
]
];
}
break;
case WRENCHBOARD_CONTRACT_MSGLIST:
$total = $out["total_record"];
$res = array(