feat: report purchasing
Build & Deploy iOS to TestFlight / build-and-deploy (push) Waiting to run

This commit is contained in:
efrilm
2026-06-22 14:30:38 +07:00
parent c1cefb122b
commit 0b70194d8e
19 changed files with 592 additions and 71 deletions
@@ -37,6 +37,7 @@ class PurchaseVendorCard extends StatelessWidget {
],
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// Rank badge
Container(
@@ -69,7 +70,7 @@ class PurchaseVendorCard extends StatelessWidget {
color: AppColor.info.withOpacity(0.1),
borderRadius: BorderRadius.circular(10),
),
child: Icon(
child: const Icon(
LineIcons.truck,
color: AppColor.info,
size: 20,
@@ -77,31 +78,51 @@ class PurchaseVendorCard extends StatelessWidget {
),
const SizedBox(width: 12),
// Name & details
// Name, chips, and total cost — all in one column
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
data.vendorName.trim(),
style: AppStyle.md.copyWith(
fontWeight: FontWeight.w700,
color: AppColor.textPrimary,
),
),
const SizedBox(height: 4),
// Vendor name + total cost on same row
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
data.vendorName.trim(),
style: AppStyle.md.copyWith(
fontWeight: FontWeight.w700,
color: AppColor.textPrimary,
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
),
const SizedBox(width: 8),
Text(
data.totalCost.currencyFormatRp,
style: AppStyle.md.copyWith(
fontWeight: FontWeight.w800,
color: AppColor.primary,
),
),
],
),
const SizedBox(height: 6),
// Chips — wrap to next line if not enough space
Wrap(
spacing: 6,
runSpacing: 4,
children: [
_Chip(
label: '${data.purchaseOrderCount} PO',
color: AppColor.info,
),
const SizedBox(width: 6),
_Chip(
label: '${data.ingredientCount} bahan',
color: AppColor.secondary,
),
const SizedBox(width: 6),
_Chip(
label: '${data.quantity} pcs',
color: AppColor.warning,
@@ -111,15 +132,6 @@ class PurchaseVendorCard extends StatelessWidget {
],
),
),
// Total cost
Text(
data.totalCost.currencyFormatRp,
style: AppStyle.md.copyWith(
fontWeight: FontWeight.w800,
color: AppColor.primary,
),
),
],
),
),