update staff list, add pin editor and privilege editor
This commit is contained in:
@@ -34,7 +34,7 @@ class CartonInfo extends StatefulWidget {
|
||||
class _CartonInfoState extends State<CartonInfo> {
|
||||
final DateFormat dateFormat = DateFormat("d MMM yyyy");
|
||||
final NumberFormat numberFormatter = NumberFormat("#,###");
|
||||
MultiImgController multiImgController = MultiImgController();
|
||||
MultiImgController _multiImgController = MultiImgController();
|
||||
bool _isLoading = false;
|
||||
late Carton _carton;
|
||||
List<CargoType> _cargoTypes = [];
|
||||
@@ -58,7 +58,7 @@ class _CartonInfoState extends State<CartonInfo> {
|
||||
_carton.cartonType = carton_from_packages;
|
||||
_carton.billTo = billToConsignee;
|
||||
_carton.cartonSizeType = customCarton;
|
||||
multiImgController.setImageUrls = _carton.photos;
|
||||
_multiImgController.setImageUrls = _carton.photoUrls;
|
||||
_cargoTypes = _carton.cargoTypes.where((e) => !e.isCutomDuty).toList();
|
||||
_surchareItems = _carton.cargoTypes.where((e) => e.isCutomDuty).toList();
|
||||
if (_carton.cartonType == carton_from_packages) {
|
||||
@@ -245,7 +245,6 @@ class _CartonInfoState extends State<CartonInfo> {
|
||||
style: TextStyle(color: Colors.black54, fontSize: 15)))
|
||||
],
|
||||
),
|
||||
//),
|
||||
Container(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(right: 60),
|
||||
@@ -273,7 +272,6 @@ class _CartonInfoState extends State<CartonInfo> {
|
||||
);
|
||||
}).toList()),
|
||||
const SizedBox(height: 10),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -283,29 +281,39 @@ class _CartonInfoState extends State<CartonInfo> {
|
||||
|
||||
final img = MultiImageFile(
|
||||
enabled: false,
|
||||
controller: multiImgController,
|
||||
controller: _multiImgController,
|
||||
title: "Receipt File",
|
||||
);
|
||||
|
||||
final uploadImageBtn = Padding(
|
||||
padding: EdgeInsets.only(left: 200.0, right: 8.0),
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xff272262),
|
||||
elevation: 3,
|
||||
shape:
|
||||
RoundedRectangleBorder(borderRadius: BorderRadius.circular(5.0)),
|
||||
minimumSize: Size(10, 35),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
CupertinoPageRoute(
|
||||
builder: (context) => CartonImageUploadEditor(box: _carton)),
|
||||
);
|
||||
},
|
||||
child: const Text('Upload Images'),
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xff272262),
|
||||
elevation: 3,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(5.0)),
|
||||
minimumSize: Size(10, 35),
|
||||
),
|
||||
onPressed: () async {
|
||||
bool? updated = await Navigator.push(
|
||||
context,
|
||||
CupertinoPageRoute(
|
||||
builder: (context) =>
|
||||
CartonImageUploadEditor(carton: _carton)),
|
||||
);
|
||||
|
||||
if (updated ?? false) {
|
||||
Carton? c = await context
|
||||
.read<CartonModel>()
|
||||
.getCarton(widget.carton.id ?? "");
|
||||
if (c == null) return;
|
||||
_carton = c;
|
||||
_init();
|
||||
}
|
||||
},
|
||||
child: LocalText(context, "box.imageupload.title",
|
||||
color: Colors.white, fontSize: 14)),
|
||||
);
|
||||
|
||||
final deleteBtn = Padding(
|
||||
@@ -390,7 +398,9 @@ class _CartonInfoState extends State<CartonInfo> {
|
||||
_surchareItems.isEmpty ? const SizedBox() : surchargeItemBox,
|
||||
uploadImageBtn,
|
||||
img,
|
||||
deleteBtn
|
||||
const SizedBox(height: 15),
|
||||
deleteBtn,
|
||||
const SizedBox(height: 20)
|
||||
]))));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user