Browse Source

add form supply for dung, spraying

smf
daivp 4 years ago
parent
commit
db9ec3fb46
1 changed files with 22 additions and 2 deletions
  1. +22
    -2
      lib/presentation/screens/actions/sc_action.dart

+ 22
- 2
lib/presentation/screens/actions/sc_action.dart View File

_listSupplyUsingDetail.add(usingSupplyDetail); _listSupplyUsingDetail.add(usingSupplyDetail);
}); });
_requestActivity.tbSuppliesUsingDetailsDTOs = _listSupplyUsingDetail; _requestActivity.tbSuppliesUsingDetailsDTOs = _listSupplyUsingDetail;
} else if (widget.activityType == 'ACTIVE_TYPE_FERTILIZE' ||
widget.activityType == 'ACTIVE_TYPE_SPRAYING_PESTICIDES') {
var _listSupplyUsingDetail = <TbSuppliesUsingDetailsDTOs>[];
_supplyUsings.forEach((element) {
var usingSupplyDetail = TbSuppliesUsingDetailsDTOs()
..tbSuppliesInWarehouseId = element.tbSuppliesInWarehouseId
..dosage = element.dosage
..quantity = element.quantity
..howToUse = element.howToUse ?? ''
..tbEquipmentOfCustomerId = element.equipmentOfCustomerId;
_listSupplyUsingDetail.add(usingSupplyDetail);
});
_requestActivity.tbSuppliesUsingDetailsDTOs = _listSupplyUsingDetail;
} }
//convert data to json //convert data to json
var activityCommonData = var activityCommonData =
height: 16, height: 16,
color: Colors.grey[200], color: Colors.grey[200],
), ),
WidgetDungSupply(currentItems: [], onChangeSupplies: (value) {}),
WidgetDungSupply(
currentItems: [],
onChangeSupplies: (value) {
_supplyUsings = value;
}),
], ],
); );
break; break;
color: Colors.grey[200], color: Colors.grey[200],
), ),
WidgetSprayingSupply( WidgetSprayingSupply(
currentItems: [], onChangeSupplies: (value) {}),
currentItems: [],
onChangeSupplies: (value) {
_supplyUsings = value;
}),
], ],
); );
break; break;

Loading…
Cancel
Save