|
|
|
|
@ -107,6 +107,28 @@ class AppColor {
|
|
|
|
|
static const Color unassignedColor = Color(0xff9F9FA8);
|
|
|
|
|
static const Color lowPriorityColor = Color(0xff54C166);
|
|
|
|
|
|
|
|
|
|
static const Color greenStatusColor = Color(0x1518C273);
|
|
|
|
|
static const Color greenStatusTextColor = Color(0xff18C273);
|
|
|
|
|
|
|
|
|
|
static const Color blueStatusColor = Color(0x303DA5E5);
|
|
|
|
|
static const Color blueStatusTextColor = inProgressChartColor; //Color(0xff144F79);
|
|
|
|
|
|
|
|
|
|
static const Color yellowStatusColor = Color(0x30F4A308);
|
|
|
|
|
static const Color yellowStatusTextColor = Color(0xffD48D05);
|
|
|
|
|
|
|
|
|
|
static const Color redStatusColor = Color(0x30F63939);
|
|
|
|
|
static const Color redStatusTextColor = Color(0xffF63939);
|
|
|
|
|
|
|
|
|
|
static const Color defaultStatusColorLight = Color(0xffEFEFF0);
|
|
|
|
|
static const Color defaultStatusTextColorLight = Color(0xff2B353E);
|
|
|
|
|
|
|
|
|
|
static const Color defaultStatusColorDark = Color(0xff262A3E);
|
|
|
|
|
static const Color defaultStatusTextColorDark = Colors.white;
|
|
|
|
|
|
|
|
|
|
static Color defaultStatusColor(BuildContext context) => context.isDark ? defaultStatusColorDark : defaultStatusColorLight;
|
|
|
|
|
|
|
|
|
|
static Color defaultStatusTextColor(BuildContext context) => context.isDark ? defaultStatusTextColorDark : defaultStatusTextColorLight;
|
|
|
|
|
|
|
|
|
|
// static Color greenStatus(BuildContext context) => context.isDark ? const Color(0xff1FA269) : green50;
|
|
|
|
|
static Color greenStatus(BuildContext context) => context.isDark ? completedColor : green70.withOpacity(.5);
|
|
|
|
|
|
|
|
|
|
@ -171,47 +193,58 @@ class AppColor {
|
|
|
|
|
static Color selectedButtonColor(BuildContext context) => context.isDark ? neutral60 : neutral30;
|
|
|
|
|
|
|
|
|
|
static Color unSelectedButtonColor(BuildContext context) => context.isDark ? neutral60 : Colors.white;
|
|
|
|
|
static Color noButtonColor(BuildContext context) => context.isDark ?AppColor.neutral70 : AppColor.white60;
|
|
|
|
|
|
|
|
|
|
static Color noButtonColor(BuildContext context) => context.isDark ? AppColor.neutral70 : AppColor.white60;
|
|
|
|
|
|
|
|
|
|
static Color filterButtonTextColor(BuildContext context) => context.isDark ? neutral30 : neutral50;
|
|
|
|
|
|
|
|
|
|
static Color getRequestStatusTextColorByName(BuildContext context, String? status) {
|
|
|
|
|
switch ((status ?? "").toLowerCase()) {
|
|
|
|
|
case "open":
|
|
|
|
|
return blueStatusTextColor;
|
|
|
|
|
case "in progress":
|
|
|
|
|
return orange60;
|
|
|
|
|
return yellowStatusTextColor;
|
|
|
|
|
case "high priority":
|
|
|
|
|
return white10;
|
|
|
|
|
return redStatusTextColor;
|
|
|
|
|
case "emergency":
|
|
|
|
|
return white10;
|
|
|
|
|
return redStatusTextColor;
|
|
|
|
|
case "yes":
|
|
|
|
|
return white10;
|
|
|
|
|
return redStatusTextColor;
|
|
|
|
|
case "request completed":
|
|
|
|
|
return greenStatusTextColor;
|
|
|
|
|
case "low priority":
|
|
|
|
|
return green15;
|
|
|
|
|
return greenStatusTextColor;
|
|
|
|
|
case "low":
|
|
|
|
|
return green15;
|
|
|
|
|
return greenStatusTextColor;
|
|
|
|
|
case "close":
|
|
|
|
|
return defaultStatusTextColor(context);
|
|
|
|
|
case "closed":
|
|
|
|
|
return defaultStatusTextColor(context);
|
|
|
|
|
default:
|
|
|
|
|
return Colors.white;
|
|
|
|
|
return yellowStatusTextColor;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static Color getHistoryLogStatusTextColorByName(String status) {
|
|
|
|
|
static Color getHistoryLogStatusTextColorByName(BuildContext context,String status) {
|
|
|
|
|
switch ((status).toLowerCase()) {
|
|
|
|
|
case "in progress":
|
|
|
|
|
return white936;
|
|
|
|
|
return yellowStatusTextColor;
|
|
|
|
|
case "waiting for delivery":
|
|
|
|
|
return white936;
|
|
|
|
|
return yellowStatusTextColor;
|
|
|
|
|
case "new":
|
|
|
|
|
return primary63;
|
|
|
|
|
return blueStatusTextColor;
|
|
|
|
|
case "open":
|
|
|
|
|
return primary63;
|
|
|
|
|
return blueStatusTextColor;
|
|
|
|
|
case "close":
|
|
|
|
|
return defaultStatusTextColor(context);
|
|
|
|
|
case "closed":
|
|
|
|
|
return black1E;
|
|
|
|
|
return defaultStatusTextColor(context);
|
|
|
|
|
case "completed":
|
|
|
|
|
return green15;
|
|
|
|
|
return greenStatusTextColor;
|
|
|
|
|
case "fixed":
|
|
|
|
|
return green15;
|
|
|
|
|
return greenStatusTextColor;
|
|
|
|
|
default:
|
|
|
|
|
return Colors.white;
|
|
|
|
|
return defaultStatusTextColor(context);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -222,7 +255,7 @@ class AppColor {
|
|
|
|
|
case "External":
|
|
|
|
|
return white90;
|
|
|
|
|
default:
|
|
|
|
|
return primary10;
|
|
|
|
|
return blueStatusColor;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -233,131 +266,124 @@ class AppColor {
|
|
|
|
|
case "External":
|
|
|
|
|
return black10;
|
|
|
|
|
default:
|
|
|
|
|
return Colors.white;
|
|
|
|
|
return blueStatusTextColor;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static Color getHistoryLogStatusColorByName(String status) {
|
|
|
|
|
static Color getHistoryLogStatusColorByName(BuildContext context,String status) {
|
|
|
|
|
switch ((status).toLowerCase()) {
|
|
|
|
|
case "in progress":
|
|
|
|
|
return orange30;
|
|
|
|
|
return yellowStatusColor;
|
|
|
|
|
case "new":
|
|
|
|
|
return primary10.withOpacity(.30);
|
|
|
|
|
return blueStatusColor;
|
|
|
|
|
case "open":
|
|
|
|
|
return primary10.withOpacity(.30);
|
|
|
|
|
return blueStatusColor;
|
|
|
|
|
case "close":
|
|
|
|
|
return defaultStatusColor(context);
|
|
|
|
|
case "closed":
|
|
|
|
|
return white936.withOpacity(.30);
|
|
|
|
|
return defaultStatusColor(context);
|
|
|
|
|
case "completed":
|
|
|
|
|
return green70.withOpacity(.5);
|
|
|
|
|
return greenStatusTextColor;
|
|
|
|
|
case "fixed":
|
|
|
|
|
return green70.withOpacity(.5);
|
|
|
|
|
return greenStatusTextColor;
|
|
|
|
|
case "reject":
|
|
|
|
|
return red30;
|
|
|
|
|
return redStatusColor;
|
|
|
|
|
case "cancelled":
|
|
|
|
|
return red30;
|
|
|
|
|
return redStatusColor;
|
|
|
|
|
case "canceled":
|
|
|
|
|
return red30;
|
|
|
|
|
return redStatusColor;
|
|
|
|
|
case "returned":
|
|
|
|
|
return red30;
|
|
|
|
|
return redStatusColor;
|
|
|
|
|
case "waiting for delivery":
|
|
|
|
|
return orange30;
|
|
|
|
|
return yellowStatusColor;
|
|
|
|
|
case "waiting for medical gas specialist review":
|
|
|
|
|
return orange30;
|
|
|
|
|
return yellowStatusColor;
|
|
|
|
|
case "reviewed":
|
|
|
|
|
return orange30;
|
|
|
|
|
return yellowStatusColor;
|
|
|
|
|
case "returned for correction":
|
|
|
|
|
return orange30;
|
|
|
|
|
return yellowStatusColor;
|
|
|
|
|
default:
|
|
|
|
|
return Colors.white;
|
|
|
|
|
return defaultStatusColor(context);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static Color getRequestStatusColorByName(BuildContext context, String? status) {
|
|
|
|
|
switch ((status ?? "").toLowerCase()) {
|
|
|
|
|
case "medium":
|
|
|
|
|
return blueStatus(context);
|
|
|
|
|
return blueStatusColor;
|
|
|
|
|
case "in progress":
|
|
|
|
|
return yellowStatus(context);
|
|
|
|
|
return yellowStatusColor;
|
|
|
|
|
case "complete":
|
|
|
|
|
return greenStatus(context);
|
|
|
|
|
return greenStatusColor;
|
|
|
|
|
case "request completed":
|
|
|
|
|
return greenStatusColor;
|
|
|
|
|
case "close":
|
|
|
|
|
return defaultStatusColor(context);
|
|
|
|
|
case "closed":
|
|
|
|
|
return greenStatus(context);
|
|
|
|
|
return defaultStatusColor(context);
|
|
|
|
|
case "high priority":
|
|
|
|
|
return redStatus(context);
|
|
|
|
|
return redStatusColor;
|
|
|
|
|
case "emergency":
|
|
|
|
|
return redStatus(context);
|
|
|
|
|
return redStatusColor;
|
|
|
|
|
case "yes":
|
|
|
|
|
return redStatus(context);
|
|
|
|
|
return redStatusColor;
|
|
|
|
|
case "low priority":
|
|
|
|
|
return greenStatus(context);
|
|
|
|
|
return greenStatusColor;
|
|
|
|
|
case "open":
|
|
|
|
|
return blueStatus(context);
|
|
|
|
|
return blueStatusColor;
|
|
|
|
|
default:
|
|
|
|
|
return greenStatus(context);
|
|
|
|
|
return yellowStatusColor;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static Color getRequestStatusColor(BuildContext context, int id) {
|
|
|
|
|
switch (id) {
|
|
|
|
|
case 1:
|
|
|
|
|
return blueStatus(context);
|
|
|
|
|
case 2:
|
|
|
|
|
return yellowStatus(context);
|
|
|
|
|
case 3:
|
|
|
|
|
return greenStatus(context);
|
|
|
|
|
case 4:
|
|
|
|
|
return redStatus(context);
|
|
|
|
|
case 6:
|
|
|
|
|
return greenStatus(context);
|
|
|
|
|
case 5:
|
|
|
|
|
return greenStatus(context);
|
|
|
|
|
case 8:
|
|
|
|
|
return greenStatus(context);
|
|
|
|
|
case 9:
|
|
|
|
|
return orange40;
|
|
|
|
|
default:
|
|
|
|
|
return blueStatus(context);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// static Color getRequestStatusColor(BuildContext context, int id) {
|
|
|
|
|
// switch (id) {
|
|
|
|
|
// case 1:
|
|
|
|
|
// return blueStatus(context);
|
|
|
|
|
// case 2:
|
|
|
|
|
// return yellowStatus(context);
|
|
|
|
|
// case 3:
|
|
|
|
|
// return greenStatus(context);
|
|
|
|
|
// case 4:
|
|
|
|
|
// return redStatus(context);
|
|
|
|
|
// case 6:
|
|
|
|
|
// return greenStatus(context);
|
|
|
|
|
// case 5:
|
|
|
|
|
// return greenStatus(context);
|
|
|
|
|
// case 8:
|
|
|
|
|
// return greenStatus(context);
|
|
|
|
|
// case 9:
|
|
|
|
|
// return orange40;
|
|
|
|
|
// default:
|
|
|
|
|
// return blueStatus(context);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
static Color demoRequestStatus(BuildContext context, int id) {
|
|
|
|
|
switch (id) {
|
|
|
|
|
case 1:
|
|
|
|
|
return blueStatus(context);
|
|
|
|
|
return blueStatusColor;
|
|
|
|
|
case 2:
|
|
|
|
|
return yellowStatus(context);
|
|
|
|
|
return yellowStatusColor;
|
|
|
|
|
case 3:
|
|
|
|
|
return greenStatus(context);
|
|
|
|
|
return greenStatusColor;
|
|
|
|
|
case 4:
|
|
|
|
|
return yellowStatus(context);
|
|
|
|
|
return yellowStatusColor;
|
|
|
|
|
default:
|
|
|
|
|
return yellowStatus(context);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static Color getRequestStatusTextColor(BuildContext context, int id) {
|
|
|
|
|
switch (id) {
|
|
|
|
|
case 2:
|
|
|
|
|
return orange60;
|
|
|
|
|
case 4:
|
|
|
|
|
return red60;
|
|
|
|
|
case 9:
|
|
|
|
|
return orange60;
|
|
|
|
|
default:
|
|
|
|
|
return Colors.white;
|
|
|
|
|
return yellowStatusColor;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static Color demoRequestStatusTextColor(BuildContext context, int id) {
|
|
|
|
|
switch (id) {
|
|
|
|
|
case 2:
|
|
|
|
|
return orange60;
|
|
|
|
|
return yellowStatusTextColor;
|
|
|
|
|
case 4:
|
|
|
|
|
return orange60;
|
|
|
|
|
return yellowStatusTextColor;
|
|
|
|
|
case 9:
|
|
|
|
|
return orange60;
|
|
|
|
|
return yellowStatusTextColor;
|
|
|
|
|
default:
|
|
|
|
|
return orange60;
|
|
|
|
|
return yellowStatusTextColor;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -365,19 +391,19 @@ class AppColor {
|
|
|
|
|
switch (id) {
|
|
|
|
|
//low priority
|
|
|
|
|
case 81:
|
|
|
|
|
return green15;
|
|
|
|
|
return greenStatusTextColor;
|
|
|
|
|
case 370:
|
|
|
|
|
return green15;
|
|
|
|
|
return greenStatusTextColor;
|
|
|
|
|
case 0:
|
|
|
|
|
return green15;
|
|
|
|
|
return greenStatusTextColor;
|
|
|
|
|
case 1:
|
|
|
|
|
//high priority
|
|
|
|
|
return white10;
|
|
|
|
|
return redStatusTextColor;
|
|
|
|
|
case 82:
|
|
|
|
|
//high priority
|
|
|
|
|
return white10;
|
|
|
|
|
return redStatusColor;
|
|
|
|
|
default:
|
|
|
|
|
return blueStatus(context);
|
|
|
|
|
return defaultStatusTextColor(context);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -385,18 +411,18 @@ class AppColor {
|
|
|
|
|
switch (id) {
|
|
|
|
|
//low priority
|
|
|
|
|
case 81:
|
|
|
|
|
return greenStatus(context);
|
|
|
|
|
return greenStatusColor;
|
|
|
|
|
case 370:
|
|
|
|
|
return greenStatus(context);
|
|
|
|
|
return greenStatusColor;
|
|
|
|
|
case 0:
|
|
|
|
|
return greenStatus(context);
|
|
|
|
|
return greenStatusColor;
|
|
|
|
|
//high priority
|
|
|
|
|
case 82:
|
|
|
|
|
return redStatus(context);
|
|
|
|
|
return redStatusColor;
|
|
|
|
|
case 1:
|
|
|
|
|
return redStatus(context);
|
|
|
|
|
return redStatusColor;
|
|
|
|
|
default:
|
|
|
|
|
return blueStatus(context);
|
|
|
|
|
return defaultStatusColor(context);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|