Procházet zdrojové kódy

feat(profit-share): implement profit share receiver management with tab navigation

- Add tab navigation for profit share receivers and profit share sections
- Display current effective profit share receiver information
- Implement change application button with navigation logic
- Restructure UI layout with fixed header and scrollable content
- Add placeholder for profit share content section
- Update user page menu text from "分账接收方" to "分账"
- Remove redundant change application button from receiver detail page
- Optimize data loading logic based on active tab selection
- Enhance styling for current info card with gradient background
- Add empty state handling for application list
runphp před 4 měsíci
rodič
revize
65d6b1ce29

+ 10 - 1
src/Controller/Api/ProfitShareReceiverController.php

@@ -25,7 +25,16 @@ class ProfitShareReceiverController
     public function index(Request $request, ProfitShareReceiverEntity $entity): Response
     {
         $params = ['user_id' => $request->userID];
-        return page_response(page: $entity->getReceiverList($params, $request->pageAndLimit()));
+        $effective = $entity->where([
+            'user_id' => $request->userID,
+            'status' => ReceiverStatusEnum::BOUND,
+        ])->order('effective_time', 'desc')->find();
+        return page_response(
+            page: $entity->getReceiverList($params, $request->pageAndLimit()),
+            data: [
+                'effective' => $effective
+            ]
+        );
     }
 
     public function read(int $id, Request $request, ProfitShareReceiverEntity $entity):Response