|
@@ -22,6 +22,7 @@ class LabourRequestItem extends StatelessWidget {
|
|
final VoidCallback? onCopyAction;
|
|
final VoidCallback? onCopyAction;
|
|
final VoidCallback? onQuickCopyAction;
|
|
final VoidCallback? onQuickCopyAction;
|
|
final VoidCallback? onPreSelectedClickAction;
|
|
final VoidCallback? onPreSelectedClickAction;
|
|
|
|
+ final VoidCallback? onDeleteAction;
|
|
|
|
|
|
LabourRequestItem({
|
|
LabourRequestItem({
|
|
required this.index,
|
|
required this.index,
|
|
@@ -33,6 +34,7 @@ class LabourRequestItem extends StatelessWidget {
|
|
this.onCopyAction,
|
|
this.onCopyAction,
|
|
this.onQuickCopyAction,
|
|
this.onQuickCopyAction,
|
|
this.onPreSelectedClickAction,
|
|
this.onPreSelectedClickAction,
|
|
|
|
+ this.onDeleteAction
|
|
});
|
|
});
|
|
|
|
|
|
@override
|
|
@override
|
|
@@ -220,7 +222,7 @@ class LabourRequestItem extends StatelessWidget {
|
|
Row(
|
|
Row(
|
|
children: [
|
|
children: [
|
|
MyTextView(
|
|
MyTextView(
|
|
- "Pre Selected:".tr,
|
|
|
|
|
|
+ "Favourite:".tr,
|
|
isFontRegular: true,
|
|
isFontRegular: true,
|
|
textColor: ColorConstants.textGrayAECAE5,
|
|
textColor: ColorConstants.textGrayAECAE5,
|
|
fontSize: 14,
|
|
fontSize: 14,
|
|
@@ -413,14 +415,15 @@ class LabourRequestItem extends StatelessWidget {
|
|
},
|
|
},
|
|
text: "Quick Copy".tr,
|
|
text: "Quick Copy".tr,
|
|
textColor: ColorConstants.white,
|
|
textColor: ColorConstants.white,
|
|
|
|
+ fontSize: 12,
|
|
backgroundColor: hexToColor(
|
|
backgroundColor: hexToColor(
|
|
"#C009FC",
|
|
"#C009FC",
|
|
),
|
|
),
|
|
radius: 17.25,
|
|
radius: 17.25,
|
|
- padding: const EdgeInsets.symmetric(horizontal: 8),
|
|
|
|
|
|
+ padding: const EdgeInsets.symmetric(horizontal: 5),
|
|
minWidth: 60,
|
|
minWidth: 60,
|
|
- minHeight: 35,
|
|
|
|
- ).marginOnly(left: 12),
|
|
|
|
|
|
+ minHeight: 30,
|
|
|
|
+ ).marginOnly(left: 6),
|
|
),
|
|
),
|
|
|
|
|
|
//详情按钮
|
|
//详情按钮
|
|
@@ -434,14 +437,15 @@ class LabourRequestItem extends StatelessWidget {
|
|
},
|
|
},
|
|
text: "Detail".tr,
|
|
text: "Detail".tr,
|
|
textColor: ColorConstants.white,
|
|
textColor: ColorConstants.white,
|
|
|
|
+ fontSize: 12,
|
|
backgroundColor: hexToColor(
|
|
backgroundColor: hexToColor(
|
|
"#56AAFF",
|
|
"#56AAFF",
|
|
),
|
|
),
|
|
radius: 17.25,
|
|
radius: 17.25,
|
|
- padding: const EdgeInsets.symmetric(horizontal: 8),
|
|
|
|
|
|
+ padding: const EdgeInsets.symmetric(horizontal: 5),
|
|
minWidth: 60,
|
|
minWidth: 60,
|
|
- minHeight: 35,
|
|
|
|
- ).marginOnly(left: 12),
|
|
|
|
|
|
+ minHeight: 30,
|
|
|
|
+ ).marginOnly(left: 6),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
|
|
|
|
@@ -456,12 +460,13 @@ class LabourRequestItem extends StatelessWidget {
|
|
},
|
|
},
|
|
text: "Recall".tr,
|
|
text: "Recall".tr,
|
|
textColor: ColorConstants.white,
|
|
textColor: ColorConstants.white,
|
|
|
|
+ fontSize: 12,
|
|
backgroundColor: hexToColor("#FFBB1B"),
|
|
backgroundColor: hexToColor("#FFBB1B"),
|
|
radius: 17.25,
|
|
radius: 17.25,
|
|
- padding: const EdgeInsets.symmetric(horizontal: 8),
|
|
|
|
|
|
+ padding: const EdgeInsets.symmetric(horizontal: 5),
|
|
minWidth: 60,
|
|
minWidth: 60,
|
|
- minHeight: 35,
|
|
|
|
- ).marginOnly(left: 12),
|
|
|
|
|
|
+ minHeight: 30,
|
|
|
|
+ ).marginOnly(left: 6),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
|
|
|
|
@@ -476,12 +481,13 @@ class LabourRequestItem extends StatelessWidget {
|
|
},
|
|
},
|
|
text: "Edit".tr,
|
|
text: "Edit".tr,
|
|
textColor: ColorConstants.white,
|
|
textColor: ColorConstants.white,
|
|
|
|
+ fontSize: 12,
|
|
backgroundColor: hexToColor("#FFBB1B"),
|
|
backgroundColor: hexToColor("#FFBB1B"),
|
|
radius: 17.25,
|
|
radius: 17.25,
|
|
- padding: const EdgeInsets.symmetric(horizontal: 8),
|
|
|
|
|
|
+ padding: const EdgeInsets.symmetric(horizontal: 5),
|
|
minWidth: 60,
|
|
minWidth: 60,
|
|
- minHeight: 35,
|
|
|
|
- ).marginOnly(left: 12),
|
|
|
|
|
|
+ minHeight: 30,
|
|
|
|
+ ).marginOnly(left: 6),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
|
|
|
|
@@ -496,12 +502,34 @@ class LabourRequestItem extends StatelessWidget {
|
|
},
|
|
},
|
|
text: "Status".tr,
|
|
text: "Status".tr,
|
|
textColor: ColorConstants.white,
|
|
textColor: ColorConstants.white,
|
|
|
|
+ fontSize: 12,
|
|
backgroundColor: hexToColor("#0AC074"),
|
|
backgroundColor: hexToColor("#0AC074"),
|
|
radius: 17.25,
|
|
radius: 17.25,
|
|
- padding: const EdgeInsets.symmetric(horizontal: 8),
|
|
|
|
|
|
+ padding: const EdgeInsets.symmetric(horizontal: 5),
|
|
minWidth: 60,
|
|
minWidth: 60,
|
|
- minHeight: 35,
|
|
|
|
- ).marginOnly(left: 12),
|
|
|
|
|
|
+ minHeight: 30,
|
|
|
|
+ ).marginOnly(left: 6),
|
|
|
|
+ ),
|
|
|
|
+ ),
|
|
|
|
+
|
|
|
|
+ //删除工作流按钮 只有 publish_status 为false 的才可以删除
|
|
|
|
+ Visibility(
|
|
|
|
+ visible: item.publishStatus == false ? true : false,
|
|
|
|
+ child: Flexible(
|
|
|
|
+ child: MyButton(
|
|
|
|
+ onPressed: () {
|
|
|
|
+ FocusScope.of(context).unfocus();
|
|
|
|
+ onDeleteAction?.call();
|
|
|
|
+ },
|
|
|
|
+ text: "Delete".tr,
|
|
|
|
+ textColor: ColorConstants.white,
|
|
|
|
+ fontSize: 12,
|
|
|
|
+ backgroundColor: Colors.redAccent,
|
|
|
|
+ radius: 17.25,
|
|
|
|
+ padding: const EdgeInsets.symmetric(horizontal: 5),
|
|
|
|
+ minWidth: 60,
|
|
|
|
+ minHeight: 30,
|
|
|
|
+ ).marginOnly(left: 6),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
],
|