feat: update parent category analytic
Build & Deploy iOS to TestFlight / build-and-deploy (push) Canceled after 0s

This commit is contained in:
efrilm
2026-10-03 00:38:32 +07:00
parent 36bc9e0f9e
commit 288d0d75a0
21 changed files with 1366 additions and 344 deletions
@@ -21,6 +21,11 @@ class ProfitSharingAllocation extends StatelessWidget {
Widget build(BuildContext context) {
final total = budget.total;
final percentages = budget.percentages;
// Fee owner berbeda tiap kategori induk, jadi porsi SDL dihitung dari
// nominalnya; persentase bawaan hanya dipakai saat belum ada omzet.
final sdlPercentage = total.hasRevenue
? total.sdlPercentage
: percentages.owner;
return Container(
margin: const EdgeInsets.symmetric(horizontal: 16),
@@ -52,7 +57,7 @@ class ProfitSharingAllocation extends StatelessWidget {
ProfitSharingBar(
purchase: percentages.purchase,
owner: percentages.owner,
owner: sdlPercentage,
team: percentages.team,
),
@@ -69,9 +74,9 @@ class ProfitSharingAllocation extends StatelessWidget {
_row(
context: context,
color: ProfitSharingColor.owner,
label: context.lang.share_owner,
percentage: percentages.owner,
amount: total.limitOwner,
label: context.lang.sdl,
percentage: sdlPercentage,
amount: total.sdl,
),
const Divider(height: 24, color: AppColor.borderLight),
_row(
@@ -140,7 +145,7 @@ class ProfitSharingAllocation extends StatelessWidget {
}
}
/// Bar proporsi belanja / owner / tim.
/// Bar proporsi belanja / SDL (owner) / tim.
class ProfitSharingBar extends StatelessWidget {
final double purchase;
final double owner;