feat : new dashboard and inventory_widget
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:rasadyar_chicken/data/models/response/bar_information/bar_information.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/kill_house_distribution_info/kill_house_distribution_info.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||
import 'package:rasadyar_chicken/presentation/pages/steward/root/logic.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
@@ -9,16 +10,42 @@ class HomeLogic extends GetxController {
|
||||
Rxn<KillHouseDistributionInfo> killHouseDistributionInfo = Rxn<KillHouseDistributionInfo>();
|
||||
Rxn<BarInformation> barInformation = Rxn();
|
||||
|
||||
RxList<Map<String, String?>> inventoryItems = [
|
||||
{'خریدهای دولتی داخل استان': null},
|
||||
{'خریدهای آزاد داخل استان': null},
|
||||
{'وزن خریدهای خارج استان': null},
|
||||
{'کل ورودی به انبار': null},
|
||||
{'کل فروش': null},
|
||||
{'مانده انبار': null},
|
||||
].obs;
|
||||
|
||||
RxList<Map<String, String>> broadcastItems = [
|
||||
{'وزن دولتی': '2،225،256'},
|
||||
{'وزن آزاد': '2،225،256'},
|
||||
{'فروش دولتی': '2،225،256'},
|
||||
{'فروش آزاد': '2،225،256'},
|
||||
{'توزیع داخل استان': '2،225،256'},
|
||||
{'توزیع خارج استان': '2،225،256'},
|
||||
{'قطعه بندی': '2،225،256'},
|
||||
].obs;
|
||||
|
||||
RxBool isExpanded = false.obs;
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
super.onReady();
|
||||
refreshData();
|
||||
|
||||
}
|
||||
|
||||
Future<void> refreshData() async {
|
||||
await Future.wait([getGeneralBarsInformation(), getTodayBars(), getDistributionInformation()]);
|
||||
await Future.wait([
|
||||
getGeneralBarsInformation(),
|
||||
getTodayBars(),
|
||||
getDistributionInformation(),
|
||||
rootLogic.getRolesProducts(),
|
||||
rootLogic.getInventory(),
|
||||
]);
|
||||
}
|
||||
|
||||
Future<void> getGeneralBarsInformation() async {
|
||||
|
||||
Reference in New Issue
Block a user