From 347e95f15a3944a81cfd76a58e671b1d806526f7 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Wed, 21 Feb 2024 10:50:05 -0500 Subject: [PATCH] banners --- www-api/app/Controllers/WrenchApi.php | 49 ++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/www-api/app/Controllers/WrenchApi.php b/www-api/app/Controllers/WrenchApi.php index f2f5709d..976b3758 100644 --- a/www-api/app/Controllers/WrenchApi.php +++ b/www-api/app/Controllers/WrenchApi.php @@ -165,7 +165,8 @@ class WrenchApi extends BaseController $in['action'] = WRENCHBOARD_FAMILY_TRANSFER; break; case 'familybanners': - + $call_backend = false; + $local_out["banners"] = $this->childBanners(); break; case 'familyrewardhx': @@ -661,6 +662,52 @@ class WrenchApi extends BaseController return json_encode( $final_out ); } + private function childBanners(){ + $bannerArray = array( + "pending" => [ + 'banner' => [ + 'image'=> 'bannerimage.png', + 'icon'=> 'bannerimage.icon', + 'style'=> 'style1', + 'text'=> 'This is Banner Main text', + ] + ], + "current" => [ + 'banner' => [ + 'image'=> 'bannerimage.png', + 'icon'=> 'bannerimage.icon', + 'style'=> 'style2', + 'text'=> 'This is Banner Main text', + ] + ], + "recommend" => [ + 'banner' => [ + 'image'=> 'bannerimage.png', + 'icon'=> 'bannerimage.icon', + 'style'=> 'style3', + 'text'=> 'This is Banner Main text', + ] + ], + "another1task" => [ + 'banner' => [ + 'image'=> 'bannerimage.png', + 'icon'=> 'bannerimage.icon', + 'style'=> 'style4', + 'text'=> 'This is Banner Main text', + ] + ], + "pastdue" => [ + 'banner' => [ + 'image'=> 'bannerimage.png', + 'icon'=> 'bannerimage.icon', + 'style'=> 'style5', + 'text'=> 'This is Banner Main text', + ] + ], + ); + + return $bannerArray; + } private function familyTypes(){ return [ array("ty"=>"Parent", "id"=>"PARENT", "tag"=>"fam_type_parent"),