update carton form and add recent search

This commit is contained in:
tzw
2024-09-23 18:36:23 +06:30
parent 458884bf70
commit 3629a8312c
16 changed files with 292 additions and 96 deletions

View File

@@ -71,7 +71,8 @@ class CartonSubmit extends StatelessWidget {
child: SubmitTextWidget(
labelKey: 'box.carton.type',
text: carton_from_packages,
subText: boxDimension),
// subText: boxDimension
),
);
final shipmentBox = Padding(
@@ -135,9 +136,9 @@ class CartonSubmit extends StatelessWidget {
],
),
),
billToValue == billToSender
? billWidget(context)
: const SizedBox()
// billToValue == billToSender
// ? billWidget(context)
// : const SizedBox()
],
),
),
@@ -162,9 +163,9 @@ class CartonSubmit extends StatelessWidget {
],
),
),
billToValue == billToConsignee
? billWidget(context)
: const SizedBox()
// billToValue == billToConsignee
// ? billWidget(context)
// : const SizedBox()
],
),
))
@@ -174,14 +175,30 @@ class CartonSubmit extends StatelessWidget {
]),
);
final billToBox = Padding(
padding: const EdgeInsets.only(top: 10),
child: SubmitTextWidget(
labelKey: 'box.bill_to',
text: billToValue == billToSender ? 'Sender' : 'Consignee',
),
);
final deliveryTypeBox = Padding(
padding: const EdgeInsets.only(top: 10),
child: SubmitTextWidget(
labelKey: 'box.delivery_type',
labelKey: 'box.select.delivery',
text: deliveryType,
),
);
final cartonSizeBox = Padding(
padding: const EdgeInsets.only(top: 10),
child: SubmitTextWidget(
labelKey: 'box.carton_size',
text: boxDimension??'',
),
);
final packagesBox = Padding(
padding: const EdgeInsets.only(top: 10),
child: Column(crossAxisAlignment: CrossAxisAlignment.stretch, children: [
@@ -341,12 +358,16 @@ class CartonSubmit extends StatelessWidget {
children: [
cartonType,
const SizedBox(height: 10),
shipmentBox,
const SizedBox(height: 10),
usersBox,
const SizedBox(height: 10),
billToBox,
const SizedBox(height: 10),
deliveryTypeBox,
const SizedBox(height: 10),
cartonSizeBox,
const SizedBox(height: 10),
shipmentBox,
const SizedBox(height: 10),
packages.isNotEmpty ? packagesBox : const SizedBox(),
const SizedBox(height: 10),
cargosBox,