saving name of the orders
This commit is contained in:
@@ -655,6 +655,7 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
|
||||
|
||||
late TextEditingController _dateController;
|
||||
late TextEditingController _globalLocationController;
|
||||
late TextEditingController _orderNameController;
|
||||
|
||||
late List<Map<String, dynamic>> _positions;
|
||||
|
||||
@@ -677,6 +678,7 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
|
||||
_globalLocationController = TextEditingController(
|
||||
text: widget.order.locationAddress,
|
||||
);
|
||||
_orderNameController = TextEditingController();
|
||||
|
||||
_positions = <Map<String, dynamic>>[
|
||||
<String, dynamic>{
|
||||
@@ -699,6 +701,7 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
|
||||
void dispose() {
|
||||
_dateController.dispose();
|
||||
_globalLocationController.dispose();
|
||||
_orderNameController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -744,6 +747,7 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
|
||||
|
||||
_dateController.text = dateText;
|
||||
_globalLocationController.text = location;
|
||||
_orderNameController.text = firstShift.order.eventName ?? '';
|
||||
_shiftId = shiftRoles.first.shiftId;
|
||||
|
||||
final List<Map<String, dynamic>> positions =
|
||||
@@ -1161,6 +1165,7 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
|
||||
.updateOrder(id: widget.order.orderId, teamHubId: selectedHub.id)
|
||||
.vendorId(_selectedVendor?.id)
|
||||
.date(_toTimestamp(orderDateOnly))
|
||||
.eventName(_orderNameController.text)
|
||||
.execute();
|
||||
|
||||
await _dataConnect
|
||||
@@ -1277,6 +1282,14 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
|
||||
),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
|
||||
_buildSectionHeader('ORDER NAME'),
|
||||
UiTextField(
|
||||
controller: _orderNameController,
|
||||
hintText: 'Order name',
|
||||
prefixIcon: UiIcons.briefcase,
|
||||
),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
|
||||
_buildSectionHeader('HUB'),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
|
||||
Reference in New Issue
Block a user