Fixed web loading screen and setup related issues

This commit is contained in:
2026-09-01 07:38:45 +05:30
parent a0e7a898fa
commit bfe0c1efbd
14 changed files with 268 additions and 131 deletions

View File

@@ -13,6 +13,8 @@ class BusinessProfile {
final String? emailId;
final String? panNumber;
final String? gstin;
final String? natureOfBusiness;
final String? msmeNumber;
BusinessProfile({
this.id,
@@ -29,13 +31,15 @@ class BusinessProfile {
this.emailId,
this.panNumber,
this.gstin,
this.natureOfBusiness,
this.msmeNumber,
});
factory BusinessProfile.fromJson(Map<String, dynamic> json) {
return BusinessProfile(
id: json['id'],
userId: json['userId'],
businessName: json['businessName'],
businessName: json['businessName'] ?? '',
industry: json['industry'],
taxNumber: json['taxNumber'],
currency: json['currency'],
@@ -47,6 +51,8 @@ class BusinessProfile {
emailId: json['emailId'],
panNumber: json['panNumber'],
gstin: json['gstin'],
natureOfBusiness: json['natureOfBusiness'] ?? json['industry'],
msmeNumber: json['msmeNumber'],
);
}
@@ -66,6 +72,8 @@ class BusinessProfile {
'emailId': emailId,
'panNumber': panNumber,
'gstin': gstin,
'natureOfBusiness': natureOfBusiness,
'msmeNumber': msmeNumber,
};
}
@@ -82,6 +90,8 @@ class BusinessProfile {
String? emailId,
String? panNumber,
String? gstin,
String? natureOfBusiness,
String? msmeNumber,
}) {
return BusinessProfile(
id: id,
@@ -98,6 +108,8 @@ class BusinessProfile {
emailId: emailId ?? this.emailId,
panNumber: panNumber ?? this.panNumber,
gstin: gstin ?? this.gstin,
natureOfBusiness: natureOfBusiness ?? this.natureOfBusiness,
msmeNumber: msmeNumber ?? this.msmeNumber,
);
}
}

View File

@@ -34,6 +34,8 @@ class BusinessHubScreen extends ConsumerWidget {
final bool showInventory = featureState?.inventoryManagement ?? false;
final bool showSales = featureState?.salesManagement ?? false;
final bool showPurchase = featureState?.purchaseManagement ?? false;
final nature = (profile?.natureOfBusiness ?? profile?.industry ?? 'JEWELLERY').toUpperCase();
final bool isJewellery = nature == 'JEWELLERY';
return RefreshIndicator(
onRefresh: () async {
@@ -200,7 +202,7 @@ class BusinessHubScreen extends ConsumerWidget {
),
isDesktop: isDesktop,
),
if (showInventory)
if (showInventory && isJewellery)
_buildActionCard(
context,
'Daily Rates',