diff --git a/assets/app_icons/config.json b/assets/app_icons/config.json index 4c7eefa6..0bedcb06 100644 --- a/assets/app_icons/config.json +++ b/assets/app_icons/config.json @@ -131,6 +131,132 @@ "search": [ "parking_icon" ] + }, + { + "uid": "3a1701f9a414e497ab81ae1bb58d3e7c", + "css": "blood_type_icon", + "code": 59401, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M567.7 248.5A2004.5 2004.5 0 0 0 452.6 80.5C395.1 5.9 378.7 0 363.3 0S331.4 5.9 273.8 80.5A2004.4 2004.4 0 0 0 158.8 248.6C99.6 344.8 0 523.3 0 636.7A363.3 363.3 0 0 0 726.5 636.7C726.5 523.3 627 344.8 567.7 248.5ZM510.7 696.3H392.6V814.4A29.3 29.3 0 1 1 334 814.4V696.3H215.8A29.3 29.3 0 0 1 215.8 637.7H334V519.5A29.3 29.3 0 1 1 392.6 519.5V637.7H510.7A29.3 29.3 0 0 1 510.7 696.3Z", + "width": 727 + }, + "search": [ + "blood_type_icon" + ] + }, + { + "uid": "2073f5ad66d9ab6e47cc1be6e6e20146", + "css": "height_icon", + "code": 59402, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M615.2 883H527.3V820.3H566.5A29.3 29.3 0 1 0 566.5 761.7H527.3V703.1H605.6A29.3 29.3 0 0 0 605.6 644.5H527.3V585.9H566.5A29.3 29.3 0 1 0 566.5 527.3H527.3V468.8H605.6A29.3 29.3 0 0 0 605.6 410.2H527.3V351.6H566.5A29.3 29.3 0 1 0 566.5 293H527.3V234.4H605.6A29.3 29.3 0 0 0 605.6 175.7H527.3V117.2H566.5A29.3 29.3 0 1 0 566.5 58.6H527.3V29.3A29.3 29.3 0 1 0 468.7 29.3V883H363L375.5 683.7H152.1L164.6 883H29.3A29.3 29.3 0 0 0 0 912.2V970.8A29.3 29.3 0 0 0 58.6 970.8V941.6H585.9V970.8A29.3 29.3 0 1 0 644.6 970.8V912.1A29.3 29.3 0 0 0 615.2 883ZM146.7 625H381A29.3 29.3 0 0 0 410.2 595.7V400.5A146 146 0 0 0 363.3 293.2 146.1 146.1 0 0 1 164.4 293.2 146 146 0 0 0 117.4 400.6V595.8A29.3 29.3 0 0 0 146.7 625Z", + "width": 645 + }, + "search": [ + "height_icon" + ] + }, + { + "uid": "0f1a73756e84a7173b6426ac45ca4a5a", + "css": "online_payment_icon", + "code": 59403, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1214.7 273.8L1213.8 274A29 29 0 0 1 1207.2 274.8C1202 274.8 1195.9 272.2 1195.9 259.6 1195.9 253.1 1197 244.7 1206.7 244.7H1206.7A29.1 29.1 0 0 1 1213.7 246L1214.5 246.2V273.8ZM1216.2 211.5L1214.7 211.8V234.9L1213.2 234.5 1212.8 234.4A32.6 32.6 0 0 0 1204.1 232.8C1184.8 232.8 1180.7 247.5 1180.7 259.8A23.9 23.9 0 0 0 1206.6 286.3 52.5 52.5 0 0 0 1224 283.8 7.6 7.6 0 0 0 1230.5 275.5V209.1C1225.9 209.9 1221.1 210.7 1216.5 211.5M1272.2 274.3L1271.4 274.5 1268.4 275.3A30.7 30.7 0 0 1 1261.3 276.4C1256.8 276.4 1254 274.2 1254 270.3 1254 267.8 1255.2 263.6 1262.6 263.6H1272.2ZM1265.4 232.5A65.2 65.2 0 0 0 1245.7 236L1240.8 237.4 1242.4 248.7 1247.3 247.1A56.9 56.9 0 0 1 1263.4 244.3C1265.5 244.3 1272.1 244.3 1272.1 251.4V254.4H1263C1246.6 254.4 1239 259.7 1239 271 1239 280.6 1246 286.3 1257.8 286.3A60.9 60.9 0 0 0 1270.8 284.6L1271.1 284.6 1271.3 284.6 1272.8 284.8C1277.4 285.7 1282.2 286.5 1286.8 287.4V250.5C1286.8 238.6 1279.6 232.5 1265.5 232.5M1157.5 274.3L1156.7 274.5 1153.8 275.3A30.3 30.3 0 0 1 1146.6 276.4C1142.1 276.4 1139.4 274.2 1139.4 270.3 1139.4 267.8 1140.5 263.6 1147.9 263.6H1157.5L1157.5 274.3ZM1150.8 232.5A65 65 0 0 0 1131.1 236L1126.2 237.4 1127.8 248.7 1132.7 247.1A56.9 56.9 0 0 1 1148.8 244.3C1150.9 244.3 1157.5 244.3 1157.5 251.4V254.4H1148.4C1132 254.4 1124.3 259.7 1124.3 271 1124.3 280.6 1131.3 286.3 1143.2 286.3A60.9 60.9 0 0 0 1156.2 284.6L1156.5 284.6 1156.7 284.6 1158.1 284.8C1162.8 285.7 1167.5 286.5 1172.2 287.4V250.6C1172.2 238.5 1165 232.5 1150.9 232.5M1095.4 232.6A39.8 39.8 0 0 0 1079.4 236.2L1078.8 236.5 1078.3 236A24.2 24.2 0 0 0 1063.9 232.6 58.7 58.7 0 0 0 1047 235.1C1042 236.7 1040 239.1 1040 243.6V285.7H1055.7V246.8L1056.5 246.5A20 20 0 0 1 1063.4 245.3 6.2 6.2 0 0 1 1070.3 252.4V285.7H1085.7V251.8A11.4 11.4 0 0 0 1085.2 248.4L1084.7 247.4 1085.8 246.9A18.6 18.6 0 0 1 1093.5 245.3 6.3 6.3 0 0 1 1100.3 252.4V285.7H1115.7V250.9C1115.7 238.6 1109.2 232.7 1095.4 232.7M1260.6 174A53.6 53.6 0 0 1 1251.5 173.1L1250.6 173V150.3A11 11 0 0 0 1250.2 147.1L1249.7 146 1250.7 145.6C1251 145.5 1251.2 145.4 1251.5 145.3L1251.7 145.2 1252.7 144.8A1.5 1.5 0 0 1 1253.1 144.7 36.7 36.7 0 0 1 1261.2 143.8H1261.2C1270.8 143.8 1272 152.4 1272 158.8 1272 171.3 1265.7 174 1260.6 174M1260.6 130.8H1260.2A27.8 27.8 0 0 0 1238.5 138.1 14.7 14.7 0 0 0 1235.7 146.8H1235.7V170.3A6.9 6.9 0 0 1 1235.2 173.3L1234.7 174.2H1206.2V158H1206.2A24.3 24.3 0 0 0 1181 131.3H1166.6C1166 135.5 1165.5 138.5 1165 142.7H1179.2C1186.7 142.7 1190.7 149 1190.7 158.8V175.3L1189.7 174.7A10.9 10.9 0 0 0 1186.3 174.2H1161.7C1161.2 177.4 1160.6 181.4 1159.9 185.5H1235.8C1238.3 185 1241.4 184.5 1244 184.1A42.7 42.7 0 0 0 1259.8 187 25.9 25.9 0 0 0 1287 159 26.1 26.1 0 0 0 1260.6 130.8M1127.6 192.4H1128.3C1144.8 192.4 1152.5 187 1152.5 173.6A17.2 17.2 0 0 0 1133.7 156.2H1118.4A6.5 6.5 0 0 1 1111.2 149.3C1111.2 146.3 1112.3 142.7 1119.7 142.7H1152.9C1153.6 138.4 1154 135.7 1154.6 131.4H1120.2C1104.1 131.4 1096 138.1 1096 149.3S1103.1 166.2 1114.9 166.2H1130.1A7.2 7.2 0 0 1 1137.3 173.6 7.4 7.4 0 0 1 1128.8 181.2H1126.3L1077.7 181.1H1068.9C1061.4 181.1 1056.2 176.7 1056.2 167V160.2C1056.2 150 1060.2 143.6 1068.9 143.6H1083.3C1083.9 139.2 1084.3 136.5 1084.9 132.3H1065.4A24.6 24.6 0 0 0 1040.1 159.3H1040.1V167A23.3 23.3 0 0 0 1065.3 192.3H1079.6L1105.9 192.3H1127.7ZM1266.9 488.1A134.9 134.9 0 1 1 997.1 488.1H997.1A134.9 134.9 0 1 1 1266.9 488.1ZM1132 353.2A135.3 135.3 0 0 1 1266.9 488.1H1266.9A134.9 134.9 0 1 1 997 488.1M1132 353.2A135.3 135.3 0 0 1 1266.9 488.1H1266.9A134.8 134.8 0 0 1 1132 623M950.7 353.2A134.9 134.9 0 0 0 952.1 623 136.5 136.5 0 0 0 1042.8 588H1042.8A128.3 128.3 0 0 0 1056.3 573.8H1028.5A164.7 164.7 0 0 1 1018.5 560.2H1066.3A91.4 91.4 0 0 0 1074.2 545.9H1010.7A85.1 85.1 0 0 1 1004.9 531.6H1079.2A141.7 141.7 0 0 0 1086.3 488.8 184.3 184.3 0 0 0 1083.5 460.2H1000.6A104.3 104.3 0 0 1 1004.2 446H1078.4A85.1 85.1 0 0 0 1072.7 431.7H1009.9A141.6 141.6 0 0 1 1017.8 417.4H1065.6A67.9 67.9 0 0 0 1054.9 403.1H1028.5A121.7 121.7 0 0 1 1042 389.5 131.7 131.7 0 0 0 951.4 354.6C951.4 353.2 951.4 353.2 950.7 353.2ZM817.2 488.1A134.8 134.8 0 0 0 952.1 623 136.5 136.5 0 0 0 1042.7 588H1042.7A128.3 128.3 0 0 0 1056.3 573.8H1028.5A164.7 164.7 0 0 1 1018.5 560.2H1066.3A91.5 91.5 0 0 0 1074.2 545.9H1010.7A85.1 85.1 0 0 1 1004.9 531.6H1079.2A141.8 141.8 0 0 0 1086.3 488.8 184.3 184.3 0 0 0 1083.5 460.2H1000.6A104.3 104.3 0 0 1 1004.1 445.9H1078.4A85.1 85.1 0 0 0 1072.7 431.6H1009.9A141.6 141.6 0 0 1 1017.8 417.3H1065.6A67.9 67.9 0 0 0 1054.9 403.1H1028.5A121.7 121.7 0 0 1 1042 389.5 131.7 131.7 0 0 0 951.4 354.5H950.7M952.1 623A136.5 136.5 0 0 0 1042.8 588H1042.8A128.3 128.3 0 0 0 1056.3 573.8H1028.5A164.7 164.7 0 0 1 1018.5 560.2H1066.3A91.4 91.4 0 0 0 1074.2 545.9H1010.6A85.1 85.1 0 0 1 1004.9 531.6H1079.1A141.7 141.7 0 0 0 1086.3 488.8 184.3 184.3 0 0 0 1083.4 460.2H1000.7A104.3 104.3 0 0 1 1004.2 446H1078.5A85.1 85.1 0 0 0 1072.8 431.7H1009.9A141.6 141.6 0 0 1 1017.8 417.4H1065.6A67.9 67.9 0 0 0 1054.9 403.1H1028.5A121.7 121.7 0 0 1 1042 389.5 131.7 131.7 0 0 0 951.4 354.6H950.7M999.9 522.4L1002.1 510.2A30.9 30.9 0 0 1 998.5 511C993.5 511 992.8 508.1 993.5 506.6L997.9 481.6H1005.7L1007.9 468.1H1000.8L1002.2 459.5H987.9S979.3 506.6 979.3 512.3A10.7 10.7 0 0 0 990.8 524.5 21.9 21.9 0 0 0 999.9 522.4ZM1004.9 499.5A22.7 22.7 0 0 0 1029.9 524.5 37 37 0 0 0 1044.9 522.3L1047.7 508.8A42.8 42.8 0 0 1 1032.7 512.3C1017 512.3 1019.9 500.9 1019.9 500.9H1049.2A92.5 92.5 0 0 0 1051.3 488.1 19.3 19.3 0 0 0 1030.6 467.4C1015.6 466 1004.9 481.7 1004.9 499.5ZM1029.9 478.8C1037.7 478.8 1036.4 488.1 1036.4 488.8H1020.7C1020.6 488.1 1022 478.8 1029.9 478.8ZM1120.6 522.3L1123.4 506.7A35.1 35.1 0 0 1 1111.3 510.2C1101.3 510.2 1097 502.4 1097 493.8 1097 476.7 1105.6 467.4 1115.6 467.4A23.9 23.9 0 0 1 1128.4 471.7L1130.6 456.7A50.2 50.2 0 0 0 1114.2 453.2C1097.8 453.2 1081.3 467.5 1081.3 494.5 1081.3 512.3 1089.9 524.5 1107 524.5A64.1 64.1 0 0 0 1120.6 522.3ZM921.4 466A50.6 50.6 0 0 0 904.3 468.8L902.1 480.9A42.2 42.2 0 0 1 917.8 478.1C922.8 478.1 927.1 478.8 927.1 483.1 927.1 485.9 926.3 486.7 926.3 486.7H919.8C907.7 486.7 894.1 491.7 894.1 508.1 894.1 520.9 902.7 523.8 907.7 523.8A21.5 21.5 0 0 0 922.7 517.2L922 523H934.8L940.5 483.7A16.9 16.9 0 0 0 921.4 466ZM924.2 498.1C924.2 500.3 922.8 511.7 914.2 511.7A5.6 5.6 0 0 1 908.5 505.9C908.5 502.4 910.7 497.4 921.4 497.4A11.3 11.3 0 0 0 924.2 498.1ZM954.2 523.8A18.3 18.3 0 0 0 975.6 505.2C975.6 487.4 958.5 490.9 958.5 483.8 958.5 480.2 961.3 478.8 966.3 478.8 968.5 478.8 976.3 479.5 976.3 479.5L978.5 466.7A54.2 54.2 0 0 0 965 465.2C954.2 465.2 943.5 469.6 943.5 483.8 943.5 500.2 961.4 498.8 961.4 505.2 961.4 509.6 956.4 510.2 952.8 510.2A46.7 46.7 0 0 1 940 508L937.8 520.9C938.5 522.3 942.2 523.8 954.2 523.8ZM1239.1 454.5L1236.2 473.8A19.8 19.8 0 0 0 1222.7 466.7C1209.8 466.7 1198.4 482.4 1198.4 501 1198.4 512.4 1204.1 524.5 1216.2 524.5A19.1 19.1 0 0 0 1229.8 518.8L1229.1 523.8H1243.4L1254.1 455.3ZM1232.5 492.4C1232.5 500.2 1229 510.2 1221.1 510.2 1216.1 510.2 1213.3 505.9 1213.3 498.8 1213.3 487.4 1218.3 480.2 1224.7 480.2 1229.8 480.2 1232.6 483.8 1232.6 492.4ZM843.6 523.1L852.2 471.7 853.6 523.1H863.6L882.2 471.7 874.3 523.1H889.3L900.7 454.5H877.1L862.8 496.7 862.1 454.5H841.4L830 523.1ZM1064.9 523.1C1069.2 499.5 1069.9 480.2 1079.9 483.8A56.1 56.1 0 0 1 1084.9 467.4H1082C1075.5 467.4 1070.6 476 1070.6 476L1072 468.1H1058.5L1049.2 523.8H1064.9ZM1153.4 466A50.6 50.6 0 0 0 1136.3 468.8L1134.1 480.9A42.2 42.2 0 0 1 1149.8 478.1C1154.8 478.1 1159.1 478.8 1159.1 483.1 1159.1 485.9 1158.4 486.7 1158.4 486.7H1151.8C1139.7 486.7 1126.2 491.7 1126.2 508.1 1126.2 520.9 1134.7 523.8 1139.7 523.8A21.5 21.5 0 0 0 1154.7 517.2L1154 523H1166.8L1172.6 483.7A16.7 16.7 0 0 0 1153.4 466ZM1157 498.1C1157 500.3 1155.5 511.7 1147 511.7A5.6 5.6 0 0 1 1141.3 505.9C1141.3 502.4 1143.4 497.4 1154.1 497.4 1156.3 498.1 1156.3 498.1 1157 498.1ZM1184.8 523.1C1189.2 499.5 1189.8 480.2 1199.8 483.8A56 56 0 0 1 1204.8 467.4H1202C1195.4 467.4 1190.5 476 1190.5 476L1192 468.1H1178.4L1169.1 523.8H1184.8ZM977.8 512.4A10.7 10.7 0 0 0 989.2 524.5 27.2 27.2 0 0 0 999.9 522.3L1002.1 510.2A30.9 30.9 0 0 1 998.5 510.9C993.5 510.9 992.8 508.1 993.5 506.6L997.9 481.6H1005.7L1007.9 468H1000.8L1002.2 459.5M1012.1 499.5C1012.1 519.5 1018.6 524.5 1029.9 524.5A37 37 0 0 0 1044.9 522.3L1047.8 508.8A42.8 42.8 0 0 1 1032.8 512.3C1017.1 512.3 1019.9 500.9 1019.9 500.9H1049.2A92.5 92.5 0 0 0 1051.3 488.1 19.3 19.3 0 0 0 1030.7 467.4C1015.6 466 1012.1 481.7 1012.1 499.5ZM1029.9 478.8C1037.8 478.8 1039.2 488.1 1039.2 488.8H1020.6C1020.6 488.1 1022.1 478.8 1029.9 478.8ZM1120.6 522.3L1123.4 506.7A35.1 35.1 0 0 1 1111.3 510.2C1101.3 510.2 1097 502.4 1097 493.8 1097 476.7 1105.6 467.4 1115.6 467.4A23.9 23.9 0 0 1 1128.4 471.7L1130.6 456.7A50.2 50.2 0 0 0 1114.2 453.2C1097.8 453.2 1088.5 467.5 1088.5 494.5 1088.5 512.3 1089.9 524.5 1107 524.5A64.1 64.1 0 0 0 1120.6 522.3ZM902.1 481.7A42.2 42.2 0 0 1 917.8 478.8C922.8 478.8 927.1 479.5 927.1 483.8 927.1 486.7 926.4 487.4 926.4 487.4H919.8C907.7 487.4 894.2 492.4 894.2 508.8 894.2 521.7 902.7 524.5 907.7 524.5A21.5 21.5 0 0 0 922.7 518L922 523.7H934.8L940.6 484.4C940.6 468 926.3 467.3 920.6 467.3M931.3 498A23.4 23.4 0 0 1 914.2 511.6 5.6 5.6 0 0 1 908.5 505.8C908.5 502.3 910.6 497.3 921.3 497.3A58.3 58.3 0 0 0 931.4 498.1ZM938.5 522.3A60.4 60.4 0 0 0 954.9 523.8 18.3 18.3 0 0 0 976.3 505.2C976.3 487.4 959.2 490.9 959.2 483.8 959.2 480.2 962.1 478.8 967.1 478.8 969.2 478.8 977.1 479.5 977.1 479.5L979.2 466.7A54.2 54.2 0 0 0 965.7 465.2C955 465.2 951.4 469.6 951.4 483.8 951.4 500.2 962.1 498.8 962.1 505.2 962.1 509.6 957.1 510.2 953.5 510.2M1236.2 473.8A19.8 19.8 0 0 0 1222.7 466.7C1209.8 466.7 1205.5 482.4 1205.5 501 1205.5 512.4 1204.1 524.5 1216.2 524.5A19.1 19.1 0 0 0 1229.8 518.8L1229.1 523.8H1243.4L1254.1 455.3M1235.5 492.4C1235.5 500.3 1229 510.3 1221.2 510.3 1216.2 510.3 1213.4 505.9 1213.4 498.8 1213.4 487.4 1218.4 480.3 1224.8 480.3A10.9 10.9 0 0 1 1235.5 492.4ZM843.6 523.1L852.2 471.7 853.6 523.1H863.6L882.2 471.7 874.3 523.1H889.3L900.7 454.5H882.8L862.9 496.7 862.2 454.5H854.3L830 523.1ZM1049.9 523.1H1064.9C1069.2 499.5 1069.9 480.2 1079.9 483.8A56 56 0 0 1 1084.9 467.4H1082C1075.5 467.4 1070.6 476 1070.6 476L1072.1 468.1M1134.1 481.7A42.2 42.2 0 0 1 1149.8 478.8C1154.8 478.8 1159.1 479.5 1159.1 483.8 1159.1 486.7 1158.4 487.4 1158.4 487.4H1151.9C1139.7 487.4 1126.2 492.4 1126.2 508.8 1126.2 521.7 1134.7 524.5 1139.7 524.5A21.5 21.5 0 0 0 1154.7 518L1154 523.7H1166.9L1172.6 484.4C1172.6 468 1158.3 467.3 1152.6 467.3M1163.3 498A23.4 23.4 0 0 1 1146.2 511.6 5.6 5.6 0 0 1 1140.5 505.8C1140.5 502.3 1142.7 497.3 1153.3 497.3A62.8 62.8 0 0 0 1163.4 498.1ZM1169.8 523.1H1184.8C1189.2 499.5 1189.8 480.2 1199.8 483.8A56.1 56.1 0 0 1 1204.8 467.4H1202C1195.5 467.4 1190.6 476 1190.6 476L1192 468.1M440.6 102.4C438.6 108.2 405 200.6 393.7 231.3H393.7A0.6 0.6 0 0 1 393.7 231.5 15.2 15.2 0 0 1 380.5 241H362.5C373.4 211.2 398.5 142.3 413 102.4ZM734.2 171.7L722.6 203.4A15.5 15.5 0 0 1 709.2 213.3H690A51.2 51.2 0 0 0 694.9 203.4L706.5 171.7H678.7L667.2 203.4A15.6 15.6 0 0 1 653.8 213.3H634.6A50 50 0 0 0 639.5 203.4L651 171.7H623.3L611.7 203.4A15.5 15.5 0 0 1 598.3 213.3H509.7A48.6 48.6 0 0 0 514.7 203.6L517.6 195.5A25.5 25.5 0 0 0 493.7 157.8H462.2L452.1 185.6H483.7A6.7 6.7 0 0 1 490 195.5L486.9 203.6A15.2 15.2 0 0 1 473.5 213.3H427.9L417.8 241H699.4A59 59 0 0 0 750.3 203.6L762 171.7ZM297.1 241H223.8L233.9 213.3H307.2A15.7 15.7 0 0 0 320.7 203.4L323.5 195.5A6.7 6.7 0 0 0 317.2 185.6H271.7L281.8 157.8H327.3A25.5 25.5 0 0 1 351.2 195.5L348.3 203.4A59.6 59.6 0 0 1 297 241M396 561.7L421.6 417.2H461.8L436.9 561.7ZM396 561.7L428.9 417.2H461.8L436.9 561.7ZM582.2 418.9A101.8 101.8 0 0 0 545.2 412.4C505.1 412.4 476.2 432.4 476.2 461.3 476.2 483.1 496.3 494.2 512.3 501.5S533.2 513.5 533.2 519.9C533.2 529.5 520.3 534.4 509.1 534.4A87.2 87.2 0 0 1 470.6 526.3L465 523.9 459.4 556.8A130.1 130.1 0 0 0 505 564.9C547.6 564.9 575.7 544.8 575.7 514.3 575.7 497.5 565.2 484.6 541.1 474.2 526.7 467 517.8 462.9 517.8 455.7 517.8 449.2 525.1 442.9 541.1 442.9A73.6 73.6 0 0 1 571.6 448.5L575.6 450.1 582.1 418.8ZM582.2 418.9A101.8 101.8 0 0 0 545.2 412.4C505.1 412.4 483.4 432.4 483.4 461.3A42 42 0 0 0 512.3 501.5C528.3 508.7 533.2 513.5 533.2 519.9 533.2 529.5 520.3 534.4 509.1 534.4A87.2 87.2 0 0 1 470.6 526.3L465 523.9 459.4 556.8A130.1 130.1 0 0 0 505 564.9C547.6 564.9 575.7 544.8 575.7 514.3 575.7 497.5 565.2 484.6 541.1 474.2 526.7 467 517.8 462.9 517.8 455.7 517.8 449.2 525.1 442.9 541.1 442.9A73.6 73.6 0 0 1 571.6 448.5L575.6 450.1 582.1 418.8ZM651.2 417.2C641.6 417.2 634.3 418 630.3 427.6L570.1 561.7H613.5L621.5 537.6H672.9L677.7 561.7H716.2L682.5 417.2ZM632.7 513.5C635.2 506.3 648.8 471 648.8 471S652 462.1 654.4 456.5L656.8 470.2S664.8 506.3 666.4 514.3H632.7ZM660.8 417.2C651.2 417.2 644 418 640 427.6L570.1 561.7H613.5L621.5 537.6H672.9L677.7 561.7H716.2L682.5 417.2ZM632.7 513.5C636 505.5 648.8 471 648.8 471S652 462.1 654.4 456.5L656.8 470.2S664.8 506.3 666.4 514.3H632.7ZM322.1 518.3L318.1 497.4A116.3 116.3 0 0 0 261.9 434L298 562.4H341.4L406.4 418H363.1ZM322.1 518.3L318.1 497.4A116.3 116.3 0 0 0 261.9 434L298 562.4H341.4L406.4 418H371.1ZM210.6 417.2L217.8 418.8A135.3 135.3 0 0 1 318.1 497.5L303.7 429.2C301.2 419.6 294 417.2 285.2 417.2ZM210.6 417.2H210.6C261.9 429.2 304.5 460.5 318.1 496.7L304.5 439.7A19.6 19.6 0 0 0 285.2 424.5ZM210.6 417.2H210.6C261.9 429.2 304.5 460.5 318.1 496.7L308.5 465.3A28.3 28.3 0 0 0 291.6 442.1ZM362.3 513.5L335 486.2 322.1 516.7 318.9 496.6A116.3 116.3 0 0 0 262.7 433.2L298.8 561.7H342.2ZM436.9 561.7L402.5 526.3 396 561.7ZM529.2 511.9H529.2C532.4 515.1 534 517.5 533.2 520.7 533.2 530.3 520.4 535.2 509.1 535.2A87.2 87.2 0 0 1 470.6 527.2L465 524.7 459.4 557.5A130.1 130.1 0 0 0 505 565.6 79.5 79.5 0 0 0 563.7 545.5ZM575.8 561.7H613.5L621.5 537.6H672.9L677.7 561.7H716.2L702.5 503 654.4 456.4 656.8 469.3S664.8 505.4 666.4 513.4H632.7C635.9 505.4 648.8 470.9 648.8 470.9S652 462 654.4 456.4M745.6 844.7A15.6 15.6 0 0 1 730 829.2V747.1A15.6 15.6 0 0 1 761.2 747.1V829.2A15.6 15.6 0 0 1 745.6 844.7ZM803.2 844.7A15.6 15.6 0 0 1 787.7 829.2V747.1A15.6 15.6 0 1 1 818.8 747.1V829.2A15.6 15.6 0 0 1 803.2 844.7ZM860.9 844.7A15.6 15.6 0 0 1 845.3 829.2V747.1A15.6 15.6 0 1 1 876.4 747.1V829.2A15.6 15.6 0 0 1 860.9 844.7ZM210.1 698.8A18 18 0 0 1 228.3 680.6 18.2 18.2 0 0 1 246.8 698.8 18.4 18.4 0 0 1 228.3 717.3 18.2 18.2 0 0 1 210.1 698.8ZM214.2 740.7A5.1 5.1 0 0 1 219.3 735.6H238A5.1 5.1 0 0 1 243.1 740.7V837.2A5.3 5.3 0 0 1 238 842.3H219.3A5.3 5.3 0 0 1 214.2 837.2ZM260 740.6A5.1 5.1 0 0 1 265.1 735.5H273.8A4.1 4.1 0 0 1 278.1 738.8L282.1 748.7A43.1 43.1 0 0 1 316.5 733.2C350.5 733.2 359.3 756.1 359.3 782V837.2A5.3 5.3 0 0 1 354.2 842.3H335.5A5.1 5.1 0 0 1 330.4 837.2V782C330.4 768.1 324.9 759.6 311.9 759.6A23.5 23.5 0 0 0 288.8 776.2V837.2C288.8 841.2 287.2 842.3 282.1 842.3H265A5.3 5.3 0 0 1 259.9 837.2ZM371.8 835.2A4.7 4.7 0 0 1 370.5 829.4L377.4 815.5A4 4 0 0 1 383.6 813.7 43.2 43.2 0 0 0 407.2 820.6C415.3 820.6 419 817.6 419 813S413 803.7 398.9 798.2C378.3 790.3 369.1 780.6 369.1 764.4S381.3 733.2 407.4 733.2A58.1 58.1 0 0 1 439.1 741.1 6 6 0 0 1 441.4 748.5L435.4 760.7A5.3 5.3 0 0 1 428.7 762.9 51.1 51.1 0 0 0 407.4 757.6C400.3 757.6 397.3 761 397.3 764.5 397.3 769.4 402.6 771.9 412.5 776.1 433 784.4 447.8 791.8 447.8 813 447.8 829.9 433.5 844.9 406.7 844.9A59.7 59.7 0 0 1 371.8 835.2ZM465 761.4H454.6A5.1 5.1 0 0 1 449.7 756.3V740.6A4.8 4.8 0 0 1 454.6 735.5H465V706A5.3 5.3 0 0 1 470.1 700.9H489A4.9 4.9 0 0 1 493.9 706V735.5H518.8A5 5 0 0 1 523.9 740.6V756.3A5.3 5.3 0 0 1 518.8 761.4H493.8V809.6C493.8 816.8 497.3 818.3 502.5 818.3A70.6 70.6 0 0 0 518.7 814.8 4.1 4.1 0 0 1 524.7 817.6L527.7 831.7A5.2 5.2 0 0 1 524.7 837.9 84.4 84.4 0 0 1 494.7 844.9C470.8 844.9 464.8 828.9 464.8 810.4ZM570.3 774.8A78.3 78.3 0 0 1 590.9 777.8C591.3 764.2 587.4 757.7 576.1 757.7A133.7 133.7 0 0 0 546.1 761.7C542.6 762.8 540.5 760.3 540.1 757L537.8 745A4.9 4.9 0 0 1 541.2 738.5 134.9 134.9 0 0 1 577.7 733.2C611 733.2 618 750.6 618 779.6V837.2A5.1 5.1 0 0 1 612.9 842.2H605C603.2 842.2 601.8 841.5 600.4 838.5L597.4 831.4A46.8 46.8 0 0 1 563.9 844.8 34 34 0 0 1 527.8 808.3C527.8 789.4 543.3 774.8 570.3 774.8ZM571 823.3A22.9 22.9 0 0 0 590.2 812V796.3A42.5 42.5 0 0 0 574.5 793.1C562.2 793.1 555.5 798.8 555.5 808.3A14.1 14.1 0 0 0 571 823.4ZM634.1 685.7A5.5 5.5 0 0 1 639.2 680.6H657.9A5.5 5.5 0 0 1 663 685.7V837.2A5.3 5.3 0 0 1 657.9 842.3H639.2A5.3 5.3 0 0 1 634.1 837.2ZM680.3 685.7A5.5 5.5 0 0 1 685.4 680.6H704.1A5.5 5.5 0 0 1 709.2 685.7V837.2A5.3 5.3 0 0 1 704.1 842.3H685.4A5.3 5.3 0 0 1 680.3 837.2ZM944.7 733.2A47.8 47.8 0 0 1 993.7 782.7C993.7 784.3 993.4 788 993.2 789.6A5.4 5.4 0 0 1 988.1 794.5H919.7A25.7 25.7 0 0 0 946.3 819.2 35.4 35.4 0 0 0 969.2 811.4C971.7 809.2 974.5 809.1 976.1 811.4L985.1 823.4A4.5 4.5 0 0 1 984.7 830.3 60.3 60.3 0 0 1 944.9 844.9 55.8 55.8 0 0 1 944.7 733.3ZM964.5 775.5A19.6 19.6 0 0 0 944 757 21.2 21.2 0 0 0 921.3 775.5ZM1002.7 740.6A5.1 5.1 0 0 1 1007.8 735.5H1016.5A4.1 4.1 0 0 1 1020.8 738.8L1024.7 748.7A43.1 43.1 0 0 1 1059.2 733.2C1093.2 733.2 1101.9 756.1 1101.9 782V837.2A5.3 5.3 0 0 1 1096.8 842.3H1078.1A5.1 5.1 0 0 1 1073 837.2V782C1073 768.1 1067.5 759.6 1054.6 759.6A23.5 23.5 0 0 0 1031.5 776.2V837.2C1031.5 841.2 1029.8 842.3 1024.8 842.3H1007.7A5.3 5.3 0 0 1 1002.6 837.2ZM1124 761.4H1113.6A5.1 5.1 0 0 1 1108.7 756.3V740.6A4.8 4.8 0 0 1 1113.6 735.5H1124V706A5.3 5.3 0 0 1 1129.1 700.9H1148A4.9 4.9 0 0 1 1152.9 706V735.5H1177.8A5 5 0 0 1 1182.9 740.6V756.3A5.3 5.3 0 0 1 1177.8 761.4H1152.9V809.6C1152.9 816.8 1156.3 818.3 1161.6 818.3A70.6 70.6 0 0 0 1177.7 814.8 4.1 4.1 0 0 1 1183.7 817.6L1186.7 831.7A5.2 5.2 0 0 1 1183.7 837.9 84.3 84.3 0 0 1 1153.7 844.9C1129.9 844.9 1123.9 828.9 1123.9 810.4ZM1191 835.2A4.7 4.7 0 0 1 1189.6 829.4L1196.5 815.5A4 4 0 0 1 1202.8 813.7 43.2 43.2 0 0 0 1226.3 820.6C1234.4 820.6 1238.1 817.6 1238.1 813S1232.1 803.7 1218 798.2C1197.5 790.3 1188.2 780.6 1188.2 764.4S1200.5 733.2 1226.6 733.2A58.1 58.1 0 0 1 1258.2 741.1 6 6 0 0 1 1260.5 748.5L1254.5 760.7A5.3 5.3 0 0 1 1247.8 762.9 51.1 51.1 0 0 0 1226.6 757.6C1219.4 757.6 1216.4 761 1216.4 764.5 1216.4 769.4 1221.7 771.9 1231.6 776.1 1252.2 784.4 1267 791.8 1267 813 1267 829.9 1252.7 844.9 1225.8 844.9A59.7 59.7 0 0 1 1191 835.2ZM892.2 863A0.8 0.8 0 0 1 893 862.2H901.7A8.9 8.9 0 1 1 901.7 879.9H895.2V889.3A0.8 0.8 0 0 1 894.4 890H892.9A0.8 0.8 0 0 1 892.2 889.3ZM901.6 877A5.9 5.9 0 0 0 907.6 870.9 5.7 5.7 0 0 0 901.6 865.2H895.3V877ZM922.3 871.3A9.6 9.6 0 1 1 913.1 880.8 9.5 9.5 0 0 1 922.3 871.3ZM922.3 887.8A7 7 0 1 0 916 880.8 6.5 6.5 0 0 0 922.3 887.8ZM947.1 876.2L941.7 890A0.7 0.7 0 0 1 940.9 890.5H940.7A0.8 0.8 0 0 1 939.9 890L934.8 872.6C934.6 872 934.8 871.5 935.5 871.5H936.8A0.8 0.8 0 0 1 937.7 872.1L941 884.5H941L946.2 871.5A0.8 0.8 0 0 1 947 871.1H947.2A0.8 0.8 0 0 1 948 871.5L953.1 884.5H953.1L956.5 872A0.7 0.7 0 0 1 957.3 871.5H958.8C959.5 871.5 959.7 871.9 959.5 872.5L954.5 889.9A0.8 0.8 0 0 1 953.7 890.4H953.5A0.9 0.9 0 0 1 952.7 889.9L947.1 876.2ZM971.7 871.3A8.1 8.1 0 0 1 980 879.6 10.1 10.1 0 0 1 980 880.7 0.8 0.8 0 0 1 979.2 881.5H965.8A6.5 6.5 0 0 0 971.8 887.8 8.5 8.5 0 0 0 976.8 886.3C977.5 885.8 977.7 885.7 978.2 886.4L978.7 887C979.1 887.6 979.2 887.8 978.5 888.3A11.3 11.3 0 0 1 971.8 890.5 9.6 9.6 0 0 1 971.8 871.3ZM977.1 879.2A5.4 5.4 0 0 0 971.7 873.9 6 6 0 0 0 965.8 879.2ZM984.7 872.5A0.9 0.9 0 0 1 985.6 871.7H986.2A0.8 0.8 0 0 1 987 872.3L987.3 873.6A7.3 7.3 0 0 1 993 871.3C994.4 871.3 996.6 871.5 996.2 872.7L995.7 874.2A0.7 0.7 0 0 1 994.6 874.6 4.6 4.6 0 0 0 992.6 874.1 5.8 5.8 0 0 0 987.7 876.4V889.2A0.9 0.9 0 0 1 986.8 890H985.6A0.9 0.9 0 0 1 984.7 889.2ZM1007.3 871.3A8.1 8.1 0 0 1 1015.6 879.6 9.8 9.8 0 0 1 1015.6 880.7 0.8 0.8 0 0 1 1014.8 881.5H1001.4A6.5 6.5 0 0 0 1007.4 887.8 8.5 8.5 0 0 0 1012.4 886.3C1013 885.8 1013.3 885.7 1013.8 886.4L1014.3 887C1014.6 887.6 1014.8 887.8 1014.1 888.3A11.3 11.3 0 0 1 1007.4 890.5 9.6 9.6 0 0 1 1007.4 871.3ZM1012.7 879.2A5.4 5.4 0 0 0 1007.3 873.9 6 6 0 0 0 1001.4 879.2ZM1028 871.3A11.3 11.3 0 0 1 1033.1 872.4V863.1A0.9 0.9 0 0 1 1033.9 862.2H1035A1 1 0 0 1 1036 863.1V889.2A0.9 0.9 0 0 1 1035 890H1034.3C1033.9 890 1033.7 889.7 1033.5 889.3L1033.3 888.1A8.8 8.8 0 0 1 1027.5 890.5 9 9 0 0 1 1019.3 880.8 8.7 8.7 0 0 1 1028 871.3ZM1027.9 887.8A6.8 6.8 0 0 0 1033.1 884.8V875A12.1 12.1 0 0 0 1028.4 873.9 6.3 6.3 0 0 0 1022.2 880.8 6.4 6.4 0 0 0 1027.9 887.8ZM1051.7 863.1A0.9 0.9 0 0 1 1052.6 862.2H1053.8A0.9 0.9 0 0 1 1054.6 863.1V872.4A11.1 11.1 0 0 1 1059.7 871.3 8.7 8.7 0 0 1 1068.4 880.8 9 9 0 0 1 1060.2 890.5 8 8 0 0 1 1054.4 888.1L1054.2 889.3A0.8 0.8 0 0 1 1053.3 890H1052.6A0.9 0.9 0 0 1 1051.8 889.2ZM1059.8 887.8A6.3 6.3 0 0 0 1065.4 880.8 6.3 6.3 0 0 0 1059.3 873.9 10.9 10.9 0 0 0 1054.6 875.1V884.8A6.8 6.8 0 0 0 1059.7 887.8ZM1071.1 872.7C1070.8 872.1 1071.1 871.7 1071.8 871.7H1073.5A0.8 0.8 0 0 1 1074.3 872.2L1079.5 886.8H1079.5L1085.7 872.2A0.8 0.8 0 0 1 1086.5 871.7H1088C1088.7 871.7 1089 872.1 1088.7 872.7L1077.2 898.9A1 1 0 0 1 1076.4 899.5H1075C1074.3 899.5 1073.9 899 1074.2 898.4L1077.8 890ZM1102.1 863A0.8 0.8 0 0 1 1102.8 862.2H1111.5A8.9 8.9 0 1 1 1111.5 879.9H1105V889.3A0.8 0.8 0 0 1 1104.3 890H1102.8A0.8 0.8 0 0 1 1102 889.3ZM1111.4 877A5.9 5.9 0 0 0 1117.5 870.9 5.7 5.7 0 0 0 1111.4 865.2H1105.1V877ZM1120.4 889L1132.5 862.2A0.7 0.7 0 0 1 1133.2 861.8H1133.6A0.7 0.7 0 0 1 1134.2 862.2L1146.2 889A0.7 0.7 0 0 1 1145.6 890H1144A0.7 0.7 0 0 1 1143.3 889.6L1140.4 883H1126.3L1123.4 889.6A0.7 0.7 0 0 1 1122.7 890H1121.1A0.7 0.7 0 0 1 1120.4 889ZM1139.3 880.6C1137.3 876.2 1135.4 871.9 1133.5 867.5H1133.2L1127.3 880.6ZM1154.2 876.7L1144.6 863.4A0.7 0.7 0 0 1 1145.2 862.3H1147.1A0.8 0.8 0 0 1 1147.7 862.6L1155.8 873.7 1163.8 862.6A0.8 0.8 0 0 1 1164.4 862.3H1166.3A0.7 0.7 0 0 1 1166.9 863.4L1157.2 876.7V889.3A0.8 0.8 0 0 1 1156.5 890.1H1154.9A0.8 0.8 0 0 1 1154.2 889.3ZM1171 863A0.8 0.8 0 0 1 1171.7 862.2H1187.4A0.8 0.8 0 0 1 1188.1 863V864.1A0.8 0.8 0 0 1 1187.4 864.9H1174V875.7H1185.4A0.8 0.8 0 0 1 1186.2 876.5V877.7A0.8 0.8 0 0 1 1185.4 878.4H1174V889.3A0.8 0.8 0 0 1 1173.3 890H1171.7A0.8 0.8 0 0 1 1171 889.3ZM1205.5 861.8A14.3 14.3 0 1 1 1191.2 876.2 14.3 14.3 0 0 1 1205.5 861.8ZM1205.5 887.6A11.5 11.5 0 1 0 1194 876.2 11.5 11.5 0 0 0 1205.5 887.6ZM1225.6 863A0.8 0.8 0 0 1 1226.4 862.2H1236.7A8.5 8.5 0 0 1 1245.3 870.7 8.9 8.9 0 0 1 1239.5 878.8L1244.9 888.8A0.8 0.8 0 0 1 1244.2 890H1242.3A0.8 0.8 0 0 1 1241.4 889.4L1236.3 879.1H1228.7V889.3A0.8 0.8 0 0 1 1227.9 890H1226.4A0.8 0.8 0 0 1 1225.6 889.3ZM1236.5 876.5A5.7 5.7 0 1 0 1236.5 865.1H1228.8V876.5ZM1256.1 864.9H1249.2A0.8 0.8 0 0 1 1248.4 864.1V863A0.8 0.8 0 0 1 1249.2 862.2H1266A0.8 0.8 0 0 1 1266.8 863V864.1A0.8 0.8 0 0 1 1266 864.9H1259.1V889.3A0.8 0.8 0 0 1 1258.3 890H1256.8A0.8 0.8 0 0 1 1256.1 889.3Z", + "width": 1478 + }, + "search": [ + "online_payment_icon" + ] + }, + { + "uid": "3238628d101e2f79eeaaf407332b3052", + "css": "vital_sign_icon", + "code": 59405, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1145 758.4A14.1 14.1 0 0 0 1130.9 772.5 51.9 51.9 0 0 1 1079 824.3H275.7A51.9 51.9 0 0 1 223.9 772.4V232.3A51.9 51.9 0 0 1 275.7 180.5H725.2A14.1 14.1 0 0 0 725.2 152.2H275.7A80.2 80.2 0 0 0 195.7 232.3V772.4A80.2 80.2 0 0 0 275.7 852.5H1079A80.2 80.2 0 0 0 1159.1 772.4 14.1 14.1 0 0 0 1145 758.4ZM1079 152.2H792.5A14.1 14.1 0 0 0 792.5 180.4H1079A51.9 51.9 0 0 1 1130.8 232.3V704.7A14.1 14.1 0 0 0 1159.1 704.7V232.3A80.2 80.2 0 0 0 1079 152.2ZM907.5 585V300.1A36.8 36.8 0 0 0 870.8 263.3H477A14.1 14.1 0 1 0 477 291.6H870.7A8.5 8.5 0 0 1 879.2 300.1V421.1H821.6L799.2 398.7A19.8 19.8 0 0 0 771.2 398.7L712 458 689.3 435.3A19.8 19.8 0 0 0 661.3 435.3L622.9 473.6 521.1 371.8A19.8 19.8 0 0 0 493.1 371.8L443.8 421.1H352.5V300.1A8.5 8.5 0 0 1 361 291.6H406.6A14.1 14.1 0 1 0 406.6 263.3H361A36.8 36.8 0 0 0 324.2 300.1V585A36.8 36.8 0 0 0 361 621.8H870.7A36.8 36.8 0 0 0 907.5 585ZM352.6 585V449.3H447.3A19.6 19.6 0 0 0 461.3 443.5L507.1 397.8 608.9 499.6A19.8 19.8 0 0 0 636.9 499.6L675.2 461.2 697.9 484A19.8 19.8 0 0 0 725.9 484L785.2 424.7 804 443.6A19.6 19.6 0 0 0 818 449.4H879.2V585.1A8.5 8.5 0 0 1 870.7 593.5H361.1A8.5 8.5 0 0 1 352.6 585.1ZM637.6 716.5A57.6 57.6 0 1 0 695.2 658.9 57.7 57.7 0 0 0 637.6 716.5ZM724.5 716.5A29.3 29.3 0 1 1 695.2 687.2 29.4 29.4 0 0 1 724.5 716.5ZM431.7 696.3A57.6 57.6 0 1 0 431.7 736.6 57.6 57.6 0 1 0 431.7 696.3ZM377.8 745.8A29.3 29.3 0 1 1 407.1 716.5 29.4 29.4 0 0 1 377.8 745.8ZM515 716.5A29.3 29.3 0 1 1 485.7 687.2 29.4 29.4 0 0 1 515 716.5Z", + "width": 1348 + }, + "search": [ + "vital_sign_icon" + ] + }, + { + "uid": "e714a92298dafff5fead849df18d449b", + "css": "weight_icon", + "code": 59406, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M491.7 0A263 263 0 0 1 716.9 127Q794.5 140.1 882.6 162A131.3 131.3 0 0 1 982.2 303.3L922.3 881.9A132 132 0 0 1 791.4 1000.1H191.9A131.6 131.6 0 0 1 61 881.9L1.1 303.2A118.4 118.4 0 0 1 100.7 162Q184.1 141.4 266.3 127A263 263 0 0 1 491.7 0ZM240.1 185.1Q151.9 203.4 113.1 212.9A79.2 79.2 0 0 0 53.5 297.7L113.4 876.5A79.8 79.8 0 0 0 191.9 947.3H791.7A80.5 80.5 0 0 0 870.2 876.5L929.9 297.7A78.8 78.8 0 0 0 870.1 212.9Q817.9 200.2 743.1 185.2A253.9 253.9 0 0 1 754.8 263.2 263.1 263.1 0 0 1 228.5 263.2 252.6 252.6 0 0 1 240.1 185.1ZM491.7 52.5A210.5 210.5 0 1 0 702.2 263.1 211.1 211.1 0 0 0 491.7 52.5ZM491.7 105.1A27 27 0 0 1 518 131.3V262.9A26.3 26.3 0 0 1 491.7 289.2 25.9 25.9 0 0 1 465.4 262.9V131.6A26.3 26.3 0 0 1 491.7 105.1Z", + "width": 983 + }, + "search": [ + "weight_icon" + ] + }, + { + "uid": "48c8955311a2a09660e070396941b78b", + "css": "search_medicine_icon", + "code": 59404, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M442.2 620.3A223.9 223.9 0 1 0 369.1 547.3L195.7 720.8 268.7 793.8ZM559.5 240.6A189.3 189.3 0 1 1 370.2 429.9 189.5 189.5 0 0 1 559.5 240.6ZM389.7 575.4A226.8 226.8 0 0 0 414 599.7L377.3 636.5 353 612.1ZM328.7 636.5L353 660.8 268.7 745.1 244.3 720.8ZM328.7 636.5M571.7 515.1L644.7 442.1A68.8 68.8 0 1 0 547.4 344.7L474.3 417.7A68.8 68.8 0 1 0 571.7 515.1ZM571.7 369.1A34.4 34.4 0 0 1 620.4 417.7L596 442.1 547.4 393.4ZM498.7 442.1L523 417.7 571.7 466.4 547.4 490.8A34.4 34.4 0 0 1 498.7 442.1ZM498.7 442.1", + "width": 1000 + }, + "search": [ + "search_medicine_icon" + ] + }, + { + "uid": "2cfd058dc6a521015f26957251d5f9dd", + "css": "my_medical_file", + "code": 59407, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M730.5 105.5H609.8A88.9 88.9 0 0 0 531.4 58.6H469.3A78.1 78.1 0 0 0 318.2 58.6H256.1A88.9 88.9 0 0 0 177.7 105.5H58.6A58.8 58.8 0 0 0 0 164.1V941.6A58.8 58.8 0 0 0 58.6 1000.1H730.6A58.8 58.8 0 0 0 789.1 941.6V164.1A58.8 58.8 0 0 0 730.5 105.5ZM206.1 147.4A49.8 49.8 0 0 1 256 97.6H335A19.6 19.6 0 0 0 354.6 78.1 39.1 39.1 0 1 1 432.7 78.1 19.6 19.6 0 0 0 452.2 97.6H531.3A50 50 0 0 1 578.2 130.6C578.2 130.8 578.4 131 578.4 131.4A49.6 49.6 0 0 1 581.3 147.7V178.3A21 21 0 0 1 560.2 199.4H227.3A21 21 0 0 1 206.3 178.3ZM656.1 238.3V869.7H133.4V238.3ZM750 941.6A19.6 19.6 0 0 1 730.5 961.1H58.4A19.6 19.6 0 0 1 38.9 941.6V164.1A19.6 19.6 0 0 1 58.4 144.5H167V178.1A58.6 58.6 0 0 0 171 199.2H113.7A19.6 19.6 0 0 0 94.2 218.7V889.1A19.6 19.6 0 0 0 113.7 908.6H675.7A19.6 19.6 0 0 0 695.2 889.1V218.7A19.6 19.6 0 0 0 675.7 199.4H616.4A58.6 58.6 0 0 0 620.3 178.3V144.7H730.5A19.6 19.6 0 0 1 750 164.2ZM407.3 111.1A19.3 19.3 0 0 0 393.4 105.5 20.5 20.5 0 0 0 379.5 111.1 19.3 19.3 0 0 0 373.9 125 20.5 20.5 0 0 0 379.5 138.9 19.3 19.3 0 0 0 393.4 144.5 20.5 20.5 0 0 0 407.3 138.9 19.8 19.8 0 0 0 407.3 111.1ZM500 753.9H209.6A19.5 19.5 0 1 0 209.6 793H500A19.5 19.5 0 1 0 500 753.9ZM593 759.6A19.3 19.3 0 0 0 579.1 753.9 20.2 20.2 0 0 0 565.2 759.6 19.3 19.3 0 0 0 559.6 773.4 20.2 20.2 0 0 0 565.2 787.3 19.3 19.3 0 0 0 579.1 793 20.2 20.2 0 0 0 593 787.3 19.8 19.8 0 0 0 593 759.6ZM579.5 675.8H209.6A19.5 19.5 0 0 0 209.6 714.8H579.5A19.5 19.5 0 0 0 579.5 675.8ZM511.9 616.4H275.6A40.3 40.3 0 0 1 235.4 576.2V339.8A40.3 40.3 0 0 1 275.6 299.6H511.9A40.3 40.3 0 0 1 552.2 339.8V576.2A40.6 40.6 0 0 1 511.9 616.4ZM300.6 564.7L359.7 564.9C367.1 564.9 372.6 557.2 373 546.4V497.1C373 486.2 377.9 478.3 385.1 477.7L403.2 477.5C410.4 477.9 415.5 486.1 415.5 496.9V546.5C415.9 557.2 420.9 564.5 427.9 564.5L507.6 564.6 507.7 503.5C507.7 492.8 502.6 484.7 495.4 484.3L463.5 484.2C456.1 484.2 450.8 476.5 450.6 465.8L450.4 449.1C450.8 438.5 456.3 430.7 463.5 430.7H495.7C502.6 430.3 507.8 421.9 507.8 411.1V335.3A32.2 32.2 0 0 1 483.3 350.6H429.1C421.7 350.6 416.2 358.6 415.8 369.1V418.2C415.4 428.9 410 436.6 402.9 436.6L386.6 436.4C379.2 436.4 373.9 428.8 373.4 418.3V368.9C373 358.2 367.7 350.8 360.4 350.8H281.8V411.7C281.8 422.8 286.9 430.7 294.2 431.1L326.4 430.9C333.4 431.3 338.9 439.8 338.9 450.4V464.5C338.9 475.3 333.7 483.4 326.6 483.8H294.4C287 484.4 282.1 492.3 282.1 503.2L281.7 564.6Z", + "width": 789 + }, + "search": [ + "my_medical_file" + ] + }, + { + "uid": "40c03b22028e1b34f230c522b40ca125", + "css": "family", + "code": 59408, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1255.3 571.5A27.7 27.7 0 0 0 1211.5 605.3 207.6 207.6 0 0 1 1255 733.1 27.7 27.7 0 1 0 1310.4 733.1 262.5 262.5 0 0 0 1255.3 571.5ZM1162.3 385.9A210.9 210.9 0 1 0 926.7 385.9 364.6 364.6 0 0 0 813.6 448.4 155.5 155.5 0 0 0 597.6 448.4 364.8 364.8 0 0 0 484.5 385.9 210.9 210.9 0 1 0 248.9 385.9 367.5 367.5 0 0 0 0 732.4C0 732.6 0 732.8 0 733.1 0 775.5 24.1 838.2 139.1 895.7A1060.2 1060.2 0 0 0 464.8 984.6 1904.1 1904.1 0 0 0 946.5 984.6 1059.9 1059.9 0 0 0 1272.3 895.7C1387.3 838.3 1411.4 775.6 1411.4 733.1A367.5 367.5 0 0 0 1162.3 385.9ZM889 211A155.5 155.5 0 1 1 1044.5 366.5 155.5 155.5 0 0 1 889.1 210.9ZM623 503.3A100.5 100.5 0 0 1 788.2 503.3H788.2A100.5 100.5 0 1 1 623 503.3ZM211.1 210.9A155.5 155.5 0 1 1 366.6 366.4 155.5 155.5 0 0 1 211.1 210.9ZM440.8 925.4A960.1 960.1 0 0 1 163.9 846.2C94.1 811.3 55.5 771.3 55.5 733.4 55.5 733.4 55.5 733.4 55.5 733.1A311.3 311.3 0 0 1 565.3 493.2 155.8 155.8 0 0 0 606.4 680.5 265.2 265.2 0 0 0 440.8 925.4ZM915.2 932.8A1857 1857 0 0 1 496.1 932.8V926A209.5 209.5 0 0 1 915.2 926ZM1247.4 846.2A959.9 959.9 0 0 1 970.5 925.4 265.3 265.3 0 0 0 805.1 680.3 155.7 155.7 0 0 0 846.2 493 311.3 311.3 0 0 1 1356 732.9C1356 771.1 1317.4 811.2 1247.4 846.2ZM1172.6 506.5A27.7 27.7 0 0 0 1172.6 561.8 27.7 27.7 0 0 0 1172.6 506.5Z", + "width": 1411 + }, + "search": [ + "family" + ] + }, + { + "uid": "28e30de5c20857758e187ef8e56eddc1", + "css": "calendar-(2)", + "code": 59409, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M544.9 710.9A78.2 78.2 0 0 0 623 789H714.9A78.2 78.2 0 0 0 793 710.9V619.1A78.2 78.2 0 0 0 714.8 541H623A78.2 78.2 0 0 0 544.9 619.1ZM623 619.1H714.9V710.9H623ZM961 687.5A39 39 0 0 0 1000 648.5V234.4A156.4 156.4 0 0 0 843.8 78.1H793V39A39 39 0 0 0 714.8 39V78.1H537.1V39A39 39 0 1 0 459 39V78.1H283.2V39A39 39 0 1 0 205 39V78.1H156.3A156.4 156.4 0 0 0 0 234.4V843.8A156.4 156.4 0 0 0 156.3 1000H843.8A156.4 156.4 0 0 0 1000 843.8 39 39 0 0 0 921.9 843.8 78.2 78.2 0 0 1 843.7 921.9H156.3A78.2 78.2 0 0 1 78.1 843.8V234.4A78.2 78.2 0 0 1 156.3 156.3H205.1V195.5A39 39 0 0 0 283.2 195.5V156.3H459.1V195.5A39 39 0 0 0 537.2 195.5V156.3H715V195.5A39 39 0 0 0 793.1 195.5V156.3H843.9A78.2 78.2 0 0 1 922 234.4V648.5A39 39 0 0 0 961 687.5Z", + "width": 1000 + }, + "search": [ + "calendar-(2)" + ] } ] -} +} \ No newline at end of file diff --git a/assets/app_icons/fonts/DQIcons.ttf b/assets/app_icons/fonts/DQIcons.ttf index 8365db47..3cff7aa3 100644 Binary files a/assets/app_icons/fonts/DQIcons.ttf and b/assets/app_icons/fonts/DQIcons.ttf differ diff --git a/assets/images/DQ/DQ_logo.png b/assets/images/DQ/DQ_logo.png new file mode 100644 index 00000000..993a1bd3 Binary files /dev/null and b/assets/images/DQ/DQ_logo.png differ diff --git a/assets/images/DQ/dq_logo_icon.png b/assets/images/DQ/dq_logo_icon.png new file mode 100644 index 00000000..71626bd8 Binary files /dev/null and b/assets/images/DQ/dq_logo_icon.png differ diff --git a/assets/images/ask_doctor.png b/assets/images/ask_doctor.png new file mode 100644 index 00000000..f74ac6a8 Binary files /dev/null and b/assets/images/ask_doctor.png differ diff --git a/assets/images/ask_doctor_bg.png b/assets/images/ask_doctor_bg.png new file mode 100644 index 00000000..16e8e9d7 Binary files /dev/null and b/assets/images/ask_doctor_bg.png differ diff --git a/assets/images/blood-drop.png b/assets/images/blood-drop.png new file mode 100644 index 00000000..a981e3d3 Binary files /dev/null and b/assets/images/blood-drop.png differ diff --git a/assets/images/contact_us_bg.png b/assets/images/contact_us_bg.png index 1a7cc71e..40564039 100644 Binary files a/assets/images/contact_us_bg.png and b/assets/images/contact_us_bg.png differ diff --git a/assets/images/dq_home_page_bg_image.png b/assets/images/dq_home_page_bg_image.png new file mode 100644 index 00000000..f70df2ae Binary files /dev/null and b/assets/images/dq_home_page_bg_image.png differ diff --git a/assets/images/height_icon.png b/assets/images/height_icon.png index a837fb3d..cca88ac0 100644 Binary files a/assets/images/height_icon.png and b/assets/images/height_icon.png differ diff --git a/assets/images/new-design/height_icon.png b/assets/images/new-design/height_icon.png index a3a8575f..cca88ac0 100644 Binary files a/assets/images/new-design/height_icon.png and b/assets/images/new-design/height_icon.png differ diff --git a/assets/images/new-design/vidamobile.png b/assets/images/new-design/vidamobile.png new file mode 100644 index 00000000..f096e8a7 Binary files /dev/null and b/assets/images/new-design/vidamobile.png differ diff --git a/assets/images/online_payment_icon.png b/assets/images/online_payment_icon.png new file mode 100644 index 00000000..a6e0150a Binary files /dev/null and b/assets/images/online_payment_icon.png differ diff --git a/assets/images/online_payments_bg.png b/assets/images/online_payments_bg.png new file mode 100644 index 00000000..72f8e331 Binary files /dev/null and b/assets/images/online_payments_bg.png differ diff --git a/assets/images/progress-loading.gif b/assets/images/progress-loading.gif new file mode 100644 index 00000000..0d7769b7 Binary files /dev/null and b/assets/images/progress-loading.gif differ diff --git a/assets/images/rectangle.png b/assets/images/rectangle.png new file mode 100644 index 00000000..e4bdb0b6 Binary files /dev/null and b/assets/images/rectangle.png differ diff --git a/assets/images/search_medicine_icon.png b/assets/images/search_medicine_icon.png new file mode 100644 index 00000000..349620a5 Binary files /dev/null and b/assets/images/search_medicine_icon.png differ diff --git a/assets/images/test-weight.png b/assets/images/test-weight.png new file mode 100644 index 00000000..934b2467 Binary files /dev/null and b/assets/images/test-weight.png differ diff --git a/assets/images/vital_sign_icon.png b/assets/images/vital_sign_icon.png new file mode 100644 index 00000000..fbd0908b Binary files /dev/null and b/assets/images/vital_sign_icon.png differ diff --git a/ios/.gitignore b/ios/.gitignore index ce2e85b9..e67828a4 100644 --- a/ios/.gitignore +++ b/ios/.gitignore @@ -32,3 +32,4 @@ Runner/GeneratedPluginRegistrant.* !default.perspectivev3 /Runner.xcworkspace/contents.xcworkspacedata /Runner.xcodeproj/project.pbxproj +/Flutter/.last_build_id diff --git a/ios/Flutter/.last_build_id b/ios/Flutter/.last_build_id new file mode 100644 index 00000000..44c4b26c --- /dev/null +++ b/ios/Flutter/.last_build_id @@ -0,0 +1 @@ +da98d9f0c1f407e541c636e84847ac81 \ No newline at end of file diff --git a/lib/config/config.dart b/lib/config/config.dart index c67e2990..9bca1b94 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -6,7 +6,7 @@ import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; const MAX_SMALL_SCREEN = 660; -const BASE_URL = 'https://hmgwebservices.com/'; +const BASE_URL = 'https://uat.hmgwebservices.com/'; const GET_PROJECT = 'Services/Lists.svc/REST/GetProject'; @@ -119,6 +119,9 @@ const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; //URL to get clinic list const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized"; +//URL to get active appointment list +const GET_ACTIVE_APPOINTMENTS_LIST_URL = "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber"; + //URL to get projects list const GET_PROJECTS_LIST = 'Services/Lists.svc/REST/GetProject'; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index e2ce3de5..8bcff719 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -109,7 +109,8 @@ const Map> localizedValues = { 'set-reminder': {'en': 'Set Reminder', 'ar': 'تعيين تذكير'}, 'login': {'en': 'Login', 'ar': 'تسجيل الدخول'}, - 'loginregister': {'en': 'Login / Register', 'ar': 'دخولتسجيل'}, + 'loginregister': {'en': 'Login / Register', 'ar': 'تسجيل الدخول'}, + 'poweredBy': {'en': 'Powered By', 'ar': 'مشغل بواسطة'}, 'welcome': {'en': 'Welcome', 'ar': 'أهلا بك'}, 'welcome_text': { 'en': 'Dr. Sulaiman Al Habib Mobile Application ', @@ -117,7 +118,7 @@ const Map> localizedValues = { }, 'welcome_text2': { 'en': 'Have you visited AlHabib Medical Group before? ', - 'ar': 'الدكتور سليمان الحبيب لتطبيقات الهاتف المتحرك' + 'ar': 'هل قمت بزيارة مجموعة الحبيب الطبية من قبل؟' }, 'yes': {'en': 'Yes', 'ar': 'نعم'}, 'no': {'en': 'No', 'ar': 'لا'}, @@ -129,6 +130,11 @@ const Map> localizedValues = { "nationalID": {"en": "National ID", "ar": "رقم الهوية"}, "fileNo": {"en": "File Number", "ar": "رقم الملف"}, "forgotFileNo": {"en": "Forgot file Number?", "ar": "نسيت رقم الملف الطبي؟"}, + "forgotFileNoTitle": { + "en": "Forgot medical file Number", + "ar": "نسيت رقم الملف" + }, + "enter-national-id": { "en": "Please enter mobile number and national ID / Iqama", "ar": "الرجاء إدخال رقم الجوال والهوية الوطنية / الاقامة" @@ -283,6 +289,7 @@ const Map> localizedValues = { "enter-email": {"en": "Enter Email", "ar": "ادخل البريد الالكتروني"}, "family": {"en": "My Family", "ar": "عائلتي"}, "family-title": {"en": "My Family Files", "ar": "ملفات العائلة"}, + "myFamily": {"en": "My Family", "ar": "ملفات العائلة"}, "add-new-member": {"en": "Add Family Member", "ar": "إضافة عضو جديد"}, "sent-requests": {"en": "Sent Requests", "ar": "الطلبات المرسلة"}, "recieved-requests": {"en": "Recieved Requests", "ar": "الطلبات المستلمة"}, @@ -337,7 +344,7 @@ const Map> localizedValues = { "MyMedicalFile": {"en": "My Medical File", 'ar': 'ملف الطبي الالكتروني'}, "myMedicalFileSubTitle": { "en": "All your medical records", - 'ar': 'جميع سجلاتك البية' + 'ar': 'جميع سجلاتك الطبية' }, "viewMore": {"en": "View More", 'ar': 'عرض المزيد'}, "homeHealthCareService": { @@ -409,7 +416,7 @@ const Map> localizedValues = { "locationa": {"en": "location:", "ar": "الموقع"}, "ambulancerequest": {"en": "Ambulance :", "ar": "طلب نقل "}, "requestA": {"en": "Request:", "ar": "اسعاف"}, - "MyAppointments": {"en": "My Appointments", "ar": "مواعيدي"}, + "MyAppointments": {"en": "Appointments", "ar": "مواعيدي"}, "NoBookedAppointments": { "en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة" @@ -658,6 +665,10 @@ const Map> localizedValues = { "ar": "الفحص ليس تشخيص." }, "remeberthat": {"en": "Remember that", "ar": "تذكر ذلك:"}, + "loginToUseService": { + "en": "You need to login to use this service", + "ar": "هذة الخدمة تتطلب تسجيل الدخول" + }, "select-gender": {"en": "Select Gender", "ar": "اختر الجنس"}, "i-am-a": {"en": "I am a ...", "ar": "أنا ..."}, @@ -668,5 +679,8 @@ const Map> localizedValues = { "en": "Drag point to change your age", "ar": "اسحب لتغيير عمرك" }, - "email": {"en": "Email", "ar": "البريد الالكتروني"} + "email": {"en": "Email", "ar": "البريد الالكتروني"}, + "Book": {"en": "Book", "ar": "احجز"}, + "AppointmentLabel": {"en": "Appointment", "ar": "موعد"}, + "BloodType": {"en": "Blood Type", "ar": "فصيلة الدم"}, }; diff --git a/lib/core/model/rate/appointment_details.dart b/lib/core/model/rate/appointment_details.dart index 30280b4a..77d759db 100644 --- a/lib/core/model/rate/appointment_details.dart +++ b/lib/core/model/rate/appointment_details.dart @@ -5,13 +5,13 @@ class AppointmentDetails { int appointmentNo; int clinicID; int doctorID; - String startTime; - String endTime; - String appointmentDate; - String clinicName; - String doctorImageURL; - String doctorName; - String projectName; + dynamic startTime; + dynamic endTime; + dynamic appointmentDate; + dynamic clinicName; + dynamic doctorImageURL; + dynamic doctorName; + dynamic projectName; AppointmentDetails( {this.setupID, diff --git a/lib/core/service/AuthenticatedUserObject.dart b/lib/core/service/AuthenticatedUserObject.dart index 600e17e1..25005b3a 100644 --- a/lib/core/service/AuthenticatedUserObject.dart +++ b/lib/core/service/AuthenticatedUserObject.dart @@ -23,5 +23,6 @@ class AuthenticatedUserObject { logout() async { isLogin = false; + var asd =""; } } diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index d2bfa4fa..17467dfb 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -7,7 +7,9 @@ import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:flutter/cupertino.dart'; import 'package:http/http.dart' as http; +import '../../../locator.dart'; import '../../../routes.dart'; +import '../AuthenticatedUserObject.dart'; AppSharedPreferences sharedPref = new AppSharedPreferences(); @@ -16,7 +18,8 @@ AppSharedPreferences sharedPref = new AppSharedPreferences(); /// onSuccess: (dynamic response, int statusCode) {}, /// onFailure: (String error, int statusCode) {}, /// body: Map(); - +/// +AuthenticatedUserObject authenticatedUserObject = locator(); class BaseAppClient { post(String endPoint, {Map body, @@ -114,11 +117,15 @@ class BaseAppClient { onFailure( parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); - logout(); + } } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) { onSuccess(parsed, statusCode); + }else if (!parsed['IsAuthenticated']) { + await logout(); + + //helpers.showErrorToast('Your session expired Please login agian'); } else { if (parsed['SameClinicApptList'] != null) { onSuccess(parsed, statusCode); @@ -141,7 +148,8 @@ class BaseAppClient { logout() async { await sharedPref.remove(LOGIN_TOKEN_ID); - Navigator.of(AppGlobal.context).pushReplacementNamed(LOGIN_TYPE); + await authenticatedUserObject.getUser(); + Navigator.of(AppGlobal.context).pushReplacementNamed(HOME); } String getSessionId(String id) { diff --git a/lib/core/service/insurance_service.dart b/lib/core/service/insurance_service.dart index 7fee6615..02061612 100644 --- a/lib/core/service/insurance_service.dart +++ b/lib/core/service/insurance_service.dart @@ -31,48 +31,9 @@ class InsuranceCardService extends BaseService { _cardUpdated.clear(); } - InsuranceCardModel _insuranceCardModel = InsuranceCardModel( - channel: 3, - deviceTypeID: 2, - generalid: "Cs2020@2016\$2958", - iPAdress: "10.20.10.20", - isDentalAllowedBackend: false, - languageID: 1, - patientID: 1231755, - patientOutSA: 0, - patientType: 1, - patientTypeID: 1, - sessionID: "uoKFXSLUwEaHYPwKZNA", - tokenID: "@dm!n", - versionID: 5.5, - ); - - InsuranceUpdateModel _insuranceUpdateModel = InsuranceUpdateModel( - channel: 3, - deviceTypeID: 2, - generalid: "Cs2020@2016\$2958", - iPAdress: "10.20.10.20", - isDentalAllowedBackend: false, - patientID: 1231755, - patientType: 1, - versionID: 5.5, - languageID: 2, - patientOutSA: 0, - sessionID: "ENRSJBKXnzCuuVQ", - ); InsuranceApprovalModel _insuranceApprovalModel = InsuranceApprovalModel( - versionID: 5.5, - channel: 3, - languageID: LANGUAGE_ID, - iPAdress: "10.20.10.20", - generalid: "Cs2020@2016\$2958", - patientOutSA: 0, - sessionID: "DypNmtMkivzURHjeYg", isDentalAllowedBackend: false, - deviceTypeID: 2, - patientID: 1231755, - tokenID: "@dm!n", patientTypeID: 1, patientType: 1, eXuldAPPNO: 0, @@ -89,7 +50,7 @@ class InsuranceCardService extends BaseService { }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: _insuranceCardModel.toJson()); + }, body: Map()); } Future getInsuranceUpdate() async { @@ -97,13 +58,14 @@ class InsuranceCardService extends BaseService { // _cardList.clear(); await baseAppClient.post(GET_PAtIENTS_INSURANCE_UPDATED, onSuccess: (dynamic response, int statusCode) { + _cardUpdated.clear(); response['List_PatientInsuranceCardHistory'].forEach((item) { _cardUpdated.add(InsuranceUpdateModel.fromJson(item)); }); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: _insuranceUpdateModel.toJson()); + }, body: Map()); } Future getInsuranceApproval({int appointmentNo}) async { diff --git a/lib/core/service/medical/prescriptions_service.dart b/lib/core/service/medical/prescriptions_service.dart index 294ef897..3359e994 100644 --- a/lib/core/service/medical/prescriptions_service.dart +++ b/lib/core/service/medical/prescriptions_service.dart @@ -95,9 +95,13 @@ class PrescriptionsService extends BaseService { isDentalAllowedBackend: false); List prescriptionReportList = List(); - Future getPrescriptionReport({int dischargeNo}) async { + Future getPrescriptionReport({int dischargeNo,int projectId,int clinicID,String setupID}) async { hasError = false; _requestPrescriptionReport.dischargeNo = dischargeNo; + _requestPrescriptionReport.projectID = projectId; + _requestPrescriptionReport.clinicID = clinicID; + _requestPrescriptionReport.setupID = setupID; + await baseAppClient.post(GET_PRESCRIPTION_REPORT, onSuccess: (dynamic response, int statusCode) { prescriptionReportList.clear(); @@ -141,6 +145,9 @@ class PrescriptionsService extends BaseService { _requestSendPrescriptionEmail.projectID = projectID; hasError = false; await baseAppClient.post(SEND_PRESCRIPTION_EMAIL, + onSuccess: (response,statusCode){ + + }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; diff --git a/lib/core/viewModels/medical/prescriptions_view_model.dart b/lib/core/viewModels/medical/prescriptions_view_model.dart index 27b954d4..9d74fd88 100644 --- a/lib/core/viewModels/medical/prescriptions_view_model.dart +++ b/lib/core/viewModels/medical/prescriptions_view_model.dart @@ -102,9 +102,9 @@ class PrescriptionsViewModel extends BaseViewModel { notifyListeners(); } - getPrescriptionReport({int dischargeNo}) async { + getPrescriptionReport({int dischargeNo,int projectId,int clinicID,String setupID}) async { setState(ViewState.Busy); - await _prescriptionsService.getPrescriptionReport(dischargeNo: dischargeNo); + await _prescriptionsService.getPrescriptionReport(dischargeNo: dischargeNo,projectId: projectId,clinicID: clinicID,setupID: setupID); if (_prescriptionsService.hasError) { error = _prescriptionsService.error; setState(ViewState.ErrorLocal); diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart index ea06c8ad..dce0fe54 100644 --- a/lib/core/viewModels/project_view_model.dart +++ b/lib/core/viewModels/project_view_model.dart @@ -10,19 +10,23 @@ import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; class ProjectViewModel extends BaseViewModel { AppSharedPreferences sharedPref = AppSharedPreferences(); - Locale _appLocale; - String currentLanguage = 'en'; + Locale _appLocale = Locale('ar'); + String currentLanguage = 'ar'; bool _isArabic = false; bool isInternetConnection = true; bool isLoading = false; bool isError = false; String error = ''; dynamic searchvalue; + dynamic get searchValue => searchvalue; + Locale get appLocal => _appLocale; - LocaleType get localeType => isArabic? LocaleType.en:LocaleType.ar; + LocaleType get localeType => isArabic ? LocaleType.en : LocaleType.ar; + bool get isArabic => _isArabic; + // BaseViewModel baseViewModel = locator() StreamSubscription subscription; @@ -48,11 +52,10 @@ class ProjectViewModel extends BaseViewModel { } void loadSharedPrefLanguage() async { - currentLanguage = await sharedPref.getString(APP_LANGUAGE); - _appLocale = Locale(currentLanguage ?? 'en'); - _isArabic = currentLanguage != null - ? currentLanguage == 'ar' ? true : false - : true; + currentLanguage = + await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + _appLocale = Locale(currentLanguage); + _isArabic = currentLanguage == 'ar'; notifyListeners(); } diff --git a/lib/core/viewModels/qr_view_model.dart b/lib/core/viewModels/qr_view_model.dart index 03c88462..9833d6c8 100644 --- a/lib/core/viewModels/qr_view_model.dart +++ b/lib/core/viewModels/qr_view_model.dart @@ -1,11 +1,11 @@ import 'dart:convert'; - -// import 'package:barcode_scan/platform_wrapper.dart'; +import 'package:barcode_scan_fix/barcode_scan.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/qr/qr_parking_model.dart'; import 'package:diplomaticquarterapp/core/service/qr_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; + import '../../locator.dart'; class QrViewModel extends BaseViewModel { @@ -15,25 +15,25 @@ class QrViewModel extends BaseViewModel { readQr() async { //TODO fix the barcode scan - // var result = await BarcodeScanner.scan(); - // var data = json.decode(result.rawContent); - // var qRParkingID = data['QRParkingID']; - // setState(ViewState.BusyLocal); - // await _qrService.getQRParkingByID(qRParkingID); - // if (_qrService.hasError) { - // error = _qrService.error; - // setState(ViewState.ErrorLocal); - // } else { - // if (_qrService.qRParkingList.length > 0) { - // qrParkingModel = _qrService.qRParkingList[0]; - // await sharedPref.setObject(IS_GO_TO_PARKING, qrParkingModel); - // isSavePark = true; - // setState(ViewState.Idle); - // } else { - // error = "Invalid Qr Code"; - // setState(ViewState.ErrorLocal); - // } - // } + String result = await BarcodeScanner.scan(); + var data = json.decode(result); + var qRParkingID = data['QRParkingID']; + setState(ViewState.BusyLocal); + await _qrService.getQRParkingByID(qRParkingID); + if (_qrService.hasError) { + error = _qrService.error; + setState(ViewState.ErrorLocal); + } else { + if (_qrService.qRParkingList.length > 0) { + qrParkingModel = _qrService.qRParkingList[0]; + await sharedPref.setObject(IS_GO_TO_PARKING, qrParkingModel); + isSavePark = true; + setState(ViewState.Idle); + } else { + error = "Invalid Qr Code"; + setState(ViewState.ErrorLocal); + } + } } getIsSaveParking() async { diff --git a/lib/d_q_icons_icons.dart b/lib/d_q_icons_icons.dart index fc9679ca..c3b64559 100644 --- a/lib/d_q_icons_icons.dart +++ b/lib/d_q_icons_icons.dart @@ -30,4 +30,13 @@ class DQIcons { static const IconData thermometer = IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData weight_scale = IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData parking_icon = IconData(0xe808, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData blood_type_icon = IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData height_icon = IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData online_payment_icon = IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData search_medicine_icon = IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData vital_sign_icon = IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData weight_icon = IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData my_medical_file = IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData family = IconData(0xe810, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData calendar__2_ = IconData(0xe811, fontFamily: _kFontFam, fontPackage: _kFontPkg); } diff --git a/lib/main.dart b/lib/main.dart index 9cb5cb78..bd310dbc 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,14 +1,16 @@ +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; +import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; -import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart'; + import 'config/size_config.dart'; import 'core/viewModels/project_view_model.dart'; import 'locator.dart'; -import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; void main() async { setupLocator(); @@ -29,6 +31,8 @@ class MyApp extends StatelessWidget { ChangeNotifierProvider( create: (context) => ProjectViewModel(), ), + ChangeNotifierProvider( + create: (context) => ToDoCountProviderModel()), ChangeNotifierProvider( create: (context) => SearchProvider()), ChangeNotifierProvider.value( @@ -48,6 +52,7 @@ class MyApp extends StatelessWidget { TranslationBaseDelegate(), GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, ], supportedLocales: [ const Locale('ar', ''), // Arabic @@ -67,28 +72,27 @@ class MyApp extends StatelessWidget { hintColor: Colors.grey[400], disabledColor: Colors.grey[300], errorColor: Color.fromRGBO(235, 80, 60, 1.0), - scaffoldBackgroundColor: HexColor('#E9E9E9'), // Colors.grey[100], + scaffoldBackgroundColor: Color(0xffEEEEEE), textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), textSelectionHandleColor: Colors.grey, canvasColor: Colors.white, backgroundColor: Color.fromRGBO(255, 255, 255, 1), highlightColor: Colors.grey[100].withOpacity(0.4), splashColor: Colors.transparent, - primaryColor: Colors.grey, - bottomSheetTheme: BottomSheetThemeData( - backgroundColor: HexColor('#E0E0E0')), + primaryColor: Color(0xff40ACC9), + bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)), cursorColor: Colors.grey, iconTheme: IconThemeData(), appBarTheme: AppBarTheme( - color: Colors.grey[700], - brightness: Brightness.light, - elevation: 0.0, + color: Color(0xff40ACC9), + brightness: Brightness.dark, + elevation: 10.0, actionsIconTheme: IconThemeData( - color: Colors.grey[800], + color: Color(0xff40ACC9), ), ), ), - initialRoute: HOME, + initialRoute: SPLASH, routes: routes, debugShowCheckedModeBanner: false, ), diff --git a/lib/models/Appointments/toDoCountProviderModel.dart b/lib/models/Appointments/toDoCountProviderModel.dart new file mode 100644 index 00000000..5c74cfb5 --- /dev/null +++ b/lib/models/Appointments/toDoCountProviderModel.dart @@ -0,0 +1,12 @@ +import 'package:flutter/cupertino.dart'; + +class ToDoCountProviderModel with ChangeNotifier { + int _count; + + int get count => _count; + + void setState(int count) { + _count = count; + notifyListeners(); + } +} diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart index ea98921d..05919209 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart @@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.da import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart'; +import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/family/my-family.dart'; @@ -29,6 +30,11 @@ import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; class AllHabibMedicalService extends StatefulWidget { + //TODO + final Function goToMyProfile; + + AllHabibMedicalService({Key key, this.goToMyProfile}); + @override _AllHabibMedicalServiceState createState() => _AllHabibMedicalServiceState(); } @@ -95,12 +101,10 @@ class _AllHabibMedicalServiceState extends State { ), ), ServicesContainer( - onTap: () => Navigator.push( - context, - FadePage( - page: MedicalProfilePage(), - ), - ), + onTap: () { + Navigator.pop(context); + widget.goToMyProfile(); + }, imageLocation: 'assets/images/new-design/my_file_bottom_bar.png', title: TranslationBase.of(context).myMedicalFile, @@ -314,7 +318,7 @@ class _AllHabibMedicalServiceState extends State { onTap: () => Navigator.push( context, FadePage( - page: ParkingPage(), + page: FindUsPage(), ), ), imageLocation: 'assets/images/new-design/find_us_icon.png', diff --git a/lib/pages/BookAppointment/BookConfirm.dart b/lib/pages/BookAppointment/BookConfirm.dart index b0110d2b..144fc2a1 100644 --- a/lib/pages/BookAppointment/BookConfirm.dart +++ b/lib/pages/BookAppointment/BookConfirm.dart @@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsLis import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -382,8 +383,10 @@ class _BookConfirmState extends State { cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo, BuildContext context) { ConfirmDialog.closeAlertDialog(context); + GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); service.cancelAppointment(appo, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { Future.delayed(new Duration(milliseconds: 1500), () { if (!widget.isLiveCareAppointment) { @@ -397,11 +400,12 @@ class _BookConfirmState extends State { } }).catchError((err) { print(err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + GifLoaderDialogUtils.hideDialog(context); + }); } insertAppointment(context, DoctorList docObject) { + GifLoaderDialogUtils.showMyDialog(context); AppoitmentAllHistoryResultList appo; widget.service .insertAppointment( @@ -421,6 +425,7 @@ class _BookConfirmState extends State { docObject.projectID, docObject); }); } else { + GifLoaderDialogUtils.hideDialog(context); appo = new AppoitmentAllHistoryResultList(); appo.appointmentNo = res['SameClinicApptList'][0]['AppointmentNo']; appo.clinicID = res['SameClinicApptList'][0]['DoctorID']; @@ -445,11 +450,11 @@ class _BookConfirmState extends State { }).catchError((err) { AppToast.showErrorToast(message: err); print(err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } insertLiveCareScheduledAppointment(context, DoctorList docObject) { + GifLoaderDialogUtils.showMyDialog(context); AppoitmentAllHistoryResultList appo; widget.service .insertLiveCareScheduleAppointment( @@ -470,6 +475,7 @@ class _BookConfirmState extends State { docObject.clinicID, docObject.projectID, docObject); }); } else { + GifLoaderDialogUtils.hideDialog(context); appo = new AppoitmentAllHistoryResultList(); appo.appointmentNo = res['SameClinicApptList'][0]['AppointmentNo']; appo.clinicID = res['SameClinicApptList'][0]['DoctorID']; @@ -508,12 +514,12 @@ class _BookConfirmState extends State { navigateToBookSuccess(context, docObject, widget.patientShareResponse); }).catchError((err) { print(err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } getLiveCareAppointmentPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) { + GifLoaderDialogUtils.hideDialog(context); widget.service .getLiveCareAppointmentPatientShare( appointmentNo, clinicID, projectID, context) @@ -523,8 +529,7 @@ class _BookConfirmState extends State { navigateToBookSuccess(context, docObject, widget.patientShareResponse); }).catchError((err) { print(err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } String getTime(DateTime dateTime) { @@ -581,6 +586,7 @@ class _BookConfirmState extends State { Future navigateToBookSuccess(context, DoctorList docObject, PatientShareResponse patientShareResponse) async { + GifLoaderDialogUtils.hideDialog(context); Navigator.push( context, MaterialPageRoute( diff --git a/lib/pages/BookAppointment/BookSuccess.dart b/lib/pages/BookAppointment/BookSuccess.dart index 34dbdc2f..85aae542 100644 --- a/lib/pages/BookAppointment/BookSuccess.dart +++ b/lib/pages/BookAppointment/BookSuccess.dart @@ -230,9 +230,10 @@ class _BookSuccessState extends State { children: [ _getBulletPoint("1"), Container( + width: MediaQuery.of(context).size.width * 0.8, child: Text( "Please confirm the appointment to avoid the cancellation", - overflow: TextOverflow.fade, + overflow: TextOverflow.clip, style: TextStyle(fontSize: 13.0)), ), ], @@ -314,7 +315,7 @@ class _BookSuccessState extends State { minWidth: MediaQuery.of(context).size.width * 0.7, height: 45.0, child: RaisedButton( - color: new Color(0xFFc5272d), + color: new Color(0xFF40ACC9), textColor: Colors.white, disabledTextColor: Colors.white, disabledColor: new Color(0xFFbcc2c4), @@ -483,7 +484,7 @@ class _BookSuccessState extends State { minWidth: MediaQuery.of(context).size.width * 0.7, height: 45.0, child: RaisedButton( - color: new Color(0xFFc5272d), + color: new Color(0xFF40ACC9), textColor: Colors.white, disabledTextColor: Colors.white, disabledColor: new Color(0xFFbcc2c4), diff --git a/lib/pages/BookAppointment/BookingOptions.dart b/lib/pages/BookAppointment/BookingOptions.dart index b6dc5500..83af454f 100644 --- a/lib/pages/BookAppointment/BookingOptions.dart +++ b/lib/pages/BookAppointment/BookingOptions.dart @@ -31,6 +31,7 @@ class _BookingOptionsState extends State { Widget build(BuildContext context) { return AppScaffold( isShowAppBar: widget.isAppbar, + isShowDecPage: false, appBarTitle: TranslationBase.of(context).bookAppo, body: Container( margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0), diff --git a/lib/pages/BookAppointment/DoctorProfile.dart b/lib/pages/BookAppointment/DoctorProfile.dart index d6986f6f..5a7b4a41 100644 --- a/lib/pages/BookAppointment/DoctorProfile.dart +++ b/lib/pages/BookAppointment/DoctorProfile.dart @@ -40,6 +40,8 @@ class _DoctorProfileState extends State bool showFooterButton = false; var event = RobotProvider(); + AppSharedPreferences sharedPref = AppSharedPreferences(); + @override void initState() { _tabController = new TabController( @@ -69,6 +71,7 @@ class _DoctorProfileState extends State return AppScaffold( appBarTitle: TranslationBase.of(context).bookAppo, isShowAppBar: true, + isShowDecPage: false, bottomSheet: showFooterButton ? Container( width: MediaQuery.of(context).size.width, @@ -211,7 +214,6 @@ class _DoctorProfileState extends State } getPatientData() async { - AppSharedPreferences sharedPref = AppSharedPreferences(); if (await sharedPref.getObject(USER_PROFILE) != null) { var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); @@ -222,14 +224,14 @@ class _DoctorProfileState extends State } } - void goToBookConfirm() { + void goToBookConfirm() async { if (DocAvailableAppointments.areSlotsAvailable) { - if (widget.authUser.patientID != null) { + if (await sharedPref.getObject(USER_PROFILE) != null) { navigateToBookConfirm(context); } else { ConfirmDialog dialog = new ConfirmDialog( context: context, - confirmMessage: "You have to login to use this service", + confirmMessage: TranslationBase.of(context).loginToUseService, okText: TranslationBase.of(context).confirm, cancelText: TranslationBase.of(context).cancel_nocaps, okFunction: () => {navigateToLogin()}, diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart index aca0884f..85569473 100644 --- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -4,10 +4,10 @@ import 'package:diplomaticquarterapp/models/Appointments/timeSlot.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; -import 'package:smart_progress_bar/smart_progress_bar.dart'; import 'package:table_calendar/table_calendar.dart'; import '../../../uitl/date_uitl.dart'; @@ -331,11 +331,13 @@ class _DocAvailableAppointmentsState extends State } getDoctorFreeSlots(context, DoctorList docObject) { + GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); service .getDoctorFreeSlots(docObject.doctorID, docObject.clinicID, docObject.projectID, context) .then((res) { + GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { if (res['FreeTimeSlots'].length != 0) { freeSlotsResponse = res['FreeTimeSlots']; @@ -350,16 +352,17 @@ class _DocAvailableAppointmentsState extends State } }).catchError((err) { print(err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } getDoctorScheduledFreeSlots(context, DoctorList docObject) { + GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); service .getDoctorScheduledFreeSlots(docObject.doctorID, docObject.clinicID, docObject.projectID, docObject.serviceID, context) .then((res) { + GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { if (res['PatientER_DoctorFreeSlots'].length != 0) { freeSlotsResponse = res['PatientER_DoctorFreeSlots']; @@ -374,8 +377,7 @@ class _DocAvailableAppointmentsState extends State } }).catchError((err) { print(err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } Widget _buildEventsMarker(DateTime date, List events) { diff --git a/lib/pages/BookAppointment/components/DocInfo.dart b/lib/pages/BookAppointment/components/DocInfo.dart index ff24b1ca..aa6e3b9f 100644 --- a/lib/pages/BookAppointment/components/DocInfo.dart +++ b/lib/pages/BookAppointment/components/DocInfo.dart @@ -1,9 +1,9 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; class DoctorInformation extends StatelessWidget { - DoctorProfileList docProfileList; DoctorInformation({@required this.docProfileList}); @@ -27,8 +27,8 @@ class DoctorInformation extends StatelessWidget { child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Image.asset( - "assets/images/new-design/doctor_information_icon.png"), + SvgPicture.asset( + "assets/images/DQ/doctor_information_icon.svg"), Container( margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0), child: Text(TranslationBase.of(context).docInfo, @@ -43,12 +43,21 @@ class DoctorInformation extends StatelessWidget { child: Table( children: [ TableRow(children: [ - TableCell(child: _getHeadingText(TranslationBase.of(context).gender)), - TableCell(child: _getHeadingText(TranslationBase.of(context).nationality)), + TableCell( + child: _getHeadingText( + TranslationBase.of(context).gender)), + TableCell( + child: _getHeadingText( + TranslationBase.of(context).nationality)), ]), TableRow(children: [ - TableCell(child: _getNormalText(docProfileList.genderDescription)), - TableCell(child: _getNormalTextWithIcon(docProfileList.nationalityName, docProfileList.nationalityFlagURL)), + TableCell( + child: _getNormalText( + docProfileList.genderDescription)), + TableCell( + child: _getNormalTextWithIcon( + docProfileList.nationalityName, + docProfileList.nationalityFlagURL)), ]), ], ), @@ -82,13 +91,14 @@ class DoctorInformation extends StatelessWidget { child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ - Image.asset( - "assets/images/new-design/doctor_qualification_icon.png"), + SvgPicture.asset( + "assets/images/DQ/doctor_qualification_icon.svg"), Container( margin: EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 0.0), - child: Text(TranslationBase.of(context).docQualifications, + child: Text( + TranslationBase.of(context).docQualifications, style: - TextStyle(fontSize: 16.0, letterSpacing: 0.8)), + TextStyle(fontSize: 16.0, letterSpacing: 0.8)), ), ], ), @@ -146,10 +156,7 @@ class DoctorInformation extends StatelessWidget { color: Colors.grey[700])), Container( margin: EdgeInsets.only(left: 5.0, right: 5.0), - child: Image.network( - icon, - width: 18.0, - height: 18.0), + child: Image.network(icon, width: 18.0, height: 18.0), ), ], ), diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index 9d833db1..5dd7364f 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -8,8 +8,8 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; -import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:flutter/material.dart'; @@ -17,7 +17,9 @@ import 'package:smart_progress_bar/smart_progress_bar.dart'; class SearchByClinic extends StatefulWidget { final List clnicIds; + SearchByClinic({this.clnicIds}); + @override _SearchByClinicState createState() => _SearchByClinicState(); } @@ -26,11 +28,13 @@ class _SearchByClinicState extends State { bool nearestAppo = false; String dropdownValue; String projectDropdownValue; + // var event = RobotProvider(); List clinicsList = []; List projectsList = []; bool isMobileAppDentalAllow = false; bool isLoaded = false; + @override void initState() { WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList()); @@ -47,7 +51,7 @@ class _SearchByClinicState extends State { Row( children: [ Checkbox( - activeColor: new Color(0xFFc5272d), + activeColor: new Color(0xFF40ACC9), value: nearestAppo, onChanged: (bool value) { setState(() { @@ -77,12 +81,6 @@ class _SearchByClinicState extends State { } }); }, - // trailing: Icon(TranslationBase.of(AppGlobal.context) - // .locale - // .languageCode == - // 'en' - // ? Icons.keyboard_arrow_right - // : Icons.keyboard_arrow_left), title: Text(result.clinicDescription, style: TextStyle( fontSize: 14.0, @@ -168,27 +166,21 @@ class _SearchByClinicState extends State { } getClinicsList() { + GifLoaderDialogUtils.showMyDialog(context); ClinicListService service = new ClinicListService(); - service - .getClinicsList(context) - .then((res) { - if (res['MessageStatus'] == 1) { - setState(() { - isMobileAppDentalAllow = res['ISMobileAppDentalAllow']; - res['ListClinicCentralized'].forEach((v) { - clinicsList.add(new ListClinicCentralized.fromJson(v)); - }); - }); - } else {} - }) - .catchError((err) { - print(err); - }) - .showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)) - .then((value) { - getProjectsList(); + service.getClinicsList(context).then((res) { + if (res['MessageStatus'] == 1) { + setState(() { + isMobileAppDentalAllow = res['ISMobileAppDentalAllow']; + res['ListClinicCentralized'].forEach((v) { + clinicsList.add(new ListClinicCentralized.fromJson(v)); + }); }); + getProjectsList(); + } else {} + }).catchError((err) { + print(err); + }); } getProjectsList() { @@ -199,23 +191,24 @@ class _SearchByClinicState extends State { res['ListProject'].forEach((v) { projectsList.add(new HospitalsModel.fromJson(v)); }); - print(projectsList.length); }); + GifLoaderDialogUtils.hideDialog(context); filterClinic(); } else {} }).catchError((err) { print(err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } getDoctorsList(BuildContext context) { + GifLoaderDialogUtils.showMyDialog(context); SearchInfo searchInfo = new SearchInfo(); if (dropdownValue == "17") { searchInfo.ProjectID = int.parse(projectDropdownValue); searchInfo.ClinicID = int.parse(dropdownValue); searchInfo.date = DateTime.now(); + GifLoaderDialogUtils.hideDialog(context); navigateToDentalComplaints(context, searchInfo); } else { List doctorsList = []; @@ -231,6 +224,7 @@ class _SearchByClinicState extends State { nearestAppo, context) .then((res) { + GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { setState(() { if (res['DoctorList'].length != 0) { @@ -249,17 +243,16 @@ class _SearchByClinicState extends State { result = LinkedHashSet.from(arr).toList(); numAll = result.length; - navigateToSearchResults( context, doctorsList, result, numAll, arrDistance); } else { AppToast.showErrorToast(message: res['ErrorEndUserMessage']); } }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); print(err); AppToast.showErrorToast(message: err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } } @@ -296,8 +289,6 @@ class _SearchByClinicState extends State { .where((i) => widget.clnicIds.indexOf(i.clinicID) > -1) .toList(); isLoaded = true; - - ///print(clinicsList); } }); } diff --git a/lib/pages/BookAppointment/components/SearchByDoctor.dart b/lib/pages/BookAppointment/components/SearchByDoctor.dart index 80288085..1e1945b5 100644 --- a/lib/pages/BookAppointment/components/SearchByDoctor.dart +++ b/lib/pages/BookAppointment/components/SearchByDoctor.dart @@ -1,6 +1,7 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:flutter/material.dart'; import 'package:smart_progress_bar/smart_progress_bar.dart'; @@ -82,6 +83,7 @@ class _SearchByDoctorState extends State { } getDoctorsList(BuildContext context) { + GifLoaderDialogUtils.showMyDialog(context); List doctorsList = []; DoctorsListService service = new DoctorsListService(); @@ -123,7 +125,7 @@ class _SearchByDoctorState extends State { }); } else {} }); - + GifLoaderDialogUtils.hideDialog(context); navigateToSearchResults( context, doctorsList, _patientDoctorAppointmentListHospital); } else { @@ -131,8 +133,7 @@ class _SearchByDoctorState extends State { } }).catchError((err) { print(err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } _onDocTextChanged(content) { diff --git a/lib/pages/BookAppointment/widgets/BranchView.dart b/lib/pages/BookAppointment/widgets/BranchView.dart index 4ba5a9d3..747775d5 100644 --- a/lib/pages/BookAppointment/widgets/BranchView.dart +++ b/lib/pages/BookAppointment/widgets/BranchView.dart @@ -27,6 +27,7 @@ class _BranchViewState extends State { return AppScaffold( appBarTitle: TranslationBase.of(context).bookAppo, isShowAppBar: true, + isShowDecPage: false, isBottomBar: false, body: new ListView.builder( itemBuilder: (BuildContext context, int index) { @@ -109,7 +110,7 @@ class _ExpandableListViewState extends State { height: 28.0, width: 30.0, decoration: new BoxDecoration( - color: Colors.red, + color: Color(0xFF40ACC9), shape: BoxShape.circle, ), child: new Center( diff --git a/lib/pages/BookAppointment/widgets/CardCommon.dart b/lib/pages/BookAppointment/widgets/CardCommon.dart index a6cf648f..e56ba965 100644 --- a/lib/pages/BookAppointment/widgets/CardCommon.dart +++ b/lib/pages/BookAppointment/widgets/CardCommon.dart @@ -31,7 +31,7 @@ class CardCommon extends StatelessWidget { child: Text(this.text, overflow: TextOverflow.clip, style: TextStyle( - color: new Color(0xFFc5272d), + color: new Color(0xFF40ACC9), letterSpacing: 1.0, fontSize: 20.0)), ), diff --git a/lib/pages/BookAppointment/widgets/DoctorView.dart b/lib/pages/BookAppointment/widgets/DoctorView.dart index 40c0e2fc..d419e4af 100644 --- a/lib/pages/BookAppointment/widgets/DoctorView.dart +++ b/lib/pages/BookAppointment/widgets/DoctorView.dart @@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:flutter/material.dart'; import 'package:rating_bar/rating_bar.dart'; import 'package:smart_progress_bar/smart_progress_bar.dart'; @@ -135,12 +136,14 @@ class DoctorView extends StatelessWidget { } getDoctorsProfile(context, DoctorList docObject, {isAppo}) { + GifLoaderDialogUtils.showMyDialog(context); List docProfileList = []; DoctorsListService service = new DoctorsListService(); service .getDoctorsProfile(docObject.doctorID, docObject.clinicID, docObject.projectID, context) .then((res) { + GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { if (res['DoctorProfileList'].length != 0) { res['DoctorProfileList'].forEach((v) { @@ -154,7 +157,7 @@ class DoctorView extends StatelessWidget { } }).catchError((err) { print(err); - }).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } String getDate(String date) { diff --git a/lib/pages/MyAppointments/MyAppointments.dart b/lib/pages/MyAppointments/MyAppointments.dart index 379c6e71..129450ea 100644 --- a/lib/pages/MyAppointments/MyAppointments.dart +++ b/lib/pages/MyAppointments/MyAppointments.dart @@ -5,11 +5,11 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/AppointmentCar import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; -import 'package:smart_progress_bar/smart_progress_bar.dart'; class MyAppointments extends StatefulWidget { List appoList = []; @@ -33,6 +33,7 @@ class _MyAppointmentsState extends State bool isDataLoaded = false; var sharedPref = new AppSharedPreferences(); + @override void initState() { _tabController = new TabController(length: 3, vsync: this); @@ -77,6 +78,7 @@ class _MyAppointmentsState extends State } getPatientAppointmentHistory() { + GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); widget.appoList.clear(); widget.bookedAppoList.clear(); @@ -85,6 +87,7 @@ class _MyAppointmentsState extends State service.getPatientAppointmentHistory(false, context).then((res) { print(res['AppoimentAllHistoryResultList'].length); if (res['MessageStatus'] == 1) { + GifLoaderDialogUtils.hideDialog(context); setState(() { if (res['AppoimentAllHistoryResultList'].length != 0) { res['AppoimentAllHistoryResultList'].forEach((v) { @@ -100,11 +103,11 @@ class _MyAppointmentsState extends State AppToast.showErrorToast(message: res['ErrorEndUserMessage']); } }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); print(err); AppToast.showErrorToast(message: err); Navigator.of(context).pop(); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } bool isConfirmed(AppoitmentAllHistoryResultList appo) { diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart index 18740ce7..7bb45bad 100644 --- a/lib/pages/MyAppointments/widgets/AppointmentActions.dart +++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart @@ -18,12 +18,12 @@ import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_p import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; -import 'package:smart_progress_bar/smart_progress_bar.dart'; import 'package:url_launcher/url_launcher.dart'; class AppointmentActions extends StatefulWidget { @@ -94,7 +94,7 @@ class _AppointmentActionsState extends State { child: Text(e.title, overflow: TextOverflow.clip, style: TextStyle( - color: new Color(0xFFc5272d), + color: new Color(0xFF40ACC9), letterSpacing: 1.0, fontSize: 20.0)), ), @@ -351,49 +351,49 @@ class _AppointmentActionsState extends State { cancelAppointment() { ConfirmDialog.closeAlertDialog(context); + GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); - service - .cancelAppointment(widget.appo, context) - .then((res) { - print(res); - if (res['MessageStatus'] == 1) { - AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); - } else { - AppToast.showErrorToast(message: res['ErrorEndUserMessage']); - } - }) - .catchError((err) { - print(err); - }) - .showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)) - .then((value) { - Navigator.of(context).pop(); - }); + service.cancelAppointment(widget.appo, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + print(res); + if (res['MessageStatus'] == 1) { + AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); + Navigator.of(context).pop(); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); } openAppointmentRadiology() { + GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); FinalRadiology finalRadiology = new FinalRadiology(); service .getPatientRadOrders(widget.appo.appointmentNo.toString(), context) .then((res) { + GifLoaderDialogUtils.hideDialog(context); print(res['FinalRadiologyList']); finalRadiology = new FinalRadiology.fromJson(res['FinalRadiologyList'][0]); print(finalRadiology.reportData); navigateToRadiologyDetails(finalRadiology); }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); print(err); AppToast.showErrorToast(message: err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } openPrescriptionReport() { + GifLoaderDialogUtils.showMyDialog(context); List prescriptionReportEnhList = List(); DoctorsListService service = new DoctorsListService(); service.getPatientPrescriptionReports(widget.appo, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); res['ListPRM'].forEach((report) { prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report)); }); @@ -405,10 +405,10 @@ class _AppointmentActionsState extends State { AppToast.showErrorToast(message: "Sorry there is no data"); } }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); print(err); AppToast.showErrorToast(message: err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } Future navigateToMedicinePrescriptionReport( @@ -463,8 +463,10 @@ class _AppointmentActionsState extends State { } askYourDoc() { + GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); service.isAllowedToAskDoctor(widget.appo.doctorID, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); print(res['PatientDoctorAppointmentResultList']); if (res['PatientDoctorAppointmentResultList'].length != 0) { getCallRequestType(); @@ -473,15 +475,17 @@ class _AppointmentActionsState extends State { message: TranslationBase.of(context).askDocNotAllowed); } }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); print(err); AppToast.showErrorToast(message: err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } getCallRequestType() { + GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); service.getCallRequestType(context).then((res) { + GifLoaderDialogUtils.hideDialog(context); List requestData = new List(); res['ListReqTypes'].forEach((element) { requestData.add(new AskDocRequestType.fromJson(element)); @@ -490,9 +494,9 @@ class _AppointmentActionsState extends State { showAskDocRequestDialog(requestData); }); }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); print(err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } showAskDocRequestDialog(List requestData) { @@ -525,28 +529,32 @@ class _AppointmentActionsState extends State { } sendAskDocRequest(int requestType) { + GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); service .sendAskDocCallRequest(widget.appo, requestType.toString(), context) .then((res) { + GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { AppToast.showSuccessToast(message: "Request Sent Successfully"); } else { AppToast.showErrorToast(message: res['ErrorEndUserMessage']); } }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); print(err); AppToast.showErrorToast(message: err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } confirmAppointment() { + GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); service .confirmAppointment(widget.appo.appointmentNo, widget.appo.clinicID, widget.appo.projectID, widget.appo.isLiveCareAppointment, context) .then((res) { + GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); Navigator.of(context).pop(); @@ -554,9 +562,9 @@ class _AppointmentActionsState extends State { AppToast.showErrorToast(message: res['ErrorEndUserMessage']); } }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); print(err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } navigateToInsuranceApprovals(int appoNo) { diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index 9ba57084..bbaa7260 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -11,6 +11,7 @@ import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart' import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; @@ -18,7 +19,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:rating_bar/rating_bar.dart'; -import 'package:smart_progress_bar/smart_progress_bar.dart'; class ToDo extends StatefulWidget { PatientShareResponse patientShareResponse; @@ -82,7 +82,7 @@ class _ToDoState extends State { height: 20.0), Container( margin: - EdgeInsets.only(left: 5.0, right: 25.0), + EdgeInsets.only(left: 5.0, right: 20.0), child: Text( getDate(widget .appoList[index].appointmentDate), @@ -106,7 +106,14 @@ class _ToDoState extends State { TranslationBase.of(context) .liveCareAppo, style: TextStyle(fontSize: 12.0)) - : Text(widget.appoList[index].projectName != null ? widget.appoList[index].projectName : "-", + : Text( + widget.appoList[index].projectName != + null + ? widget + .appoList[index].projectName + : "-", + overflow: TextOverflow.clip, + maxLines: 2, style: TextStyle(fontSize: 11.0)), ), ], @@ -253,7 +260,7 @@ class _ToDoState extends State { textAlign: TextAlign.end, style: TextStyle( fontSize: 12.0, - color: Colors.red[600], + color: new Color(0xFF40ACC9), decoration: TextDecoration.underline)), ), @@ -464,8 +471,10 @@ class _ToDoState extends State { } getPatientAppointmentHistory() { + GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); service.getPatientAppointmentHistory(true, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { setState(() { if (res['AppoimentAllHistoryResultList'].length != 0) { @@ -485,26 +494,29 @@ class _ToDoState extends State { } }).catchError((err) { print(err); + GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } getPatientShare(context, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); service .getPatientShare(appo.appointmentNo.toString(), appo.clinicID, appo.projectID, context) .then((res) { + GifLoaderDialogUtils.hideDialog(context); widget.patientShareResponse = new PatientShareResponse.fromJson(res); openPaymentDialog(appo, widget.patientShareResponse); }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); print(err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } getAppoQR(context, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); PatientShareResponse patientShareResponse = new PatientShareResponse(); patientShareResponse.doctorNameObj = appo.doctorNameObj; @@ -518,12 +530,13 @@ class _ToDoState extends State { DoctorsListService service = new DoctorsListService(); service.generateAppointmentQR(patientShareResponse, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); print(res); navigateToQR(context, res['AppointmentQR'], patientShareResponse); }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); print(err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } Future navigateToQR( @@ -620,6 +633,7 @@ class _ToDoState extends State { } checkPaymentStatus(AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); service .checkPaymentStatus( @@ -627,8 +641,7 @@ class _ToDoState extends State { appo.projectID, appo.clinicID, appo.appointmentNo), context) .then((res) { - print("Printing Payment Status Reponse!!!!"); - print(res); + GifLoaderDialogUtils.hideDialog(context); String paymentInfo = res['Response_Message']; if (paymentInfo == 'Success') { createAdvancePayment(res, appo); @@ -636,18 +649,20 @@ class _ToDoState extends State { AppToast.showErrorToast(message: res['Response_Message']); } }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); print(err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); String paymentReference = res['Fort_id'].toString(); service .createAdvancePayment( appo, res['Amount'], res['Fort_id'], res['PaymentMethod'], context) .then((res) { + GifLoaderDialogUtils.hideDialog(context); print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']); addAdvancedNumberRequest( res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), @@ -656,23 +671,25 @@ class _ToDoState extends State { appo); }).catchError((err) { print(err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + GifLoaderDialogUtils.hideDialog(context); + }); } addAdvancedNumberRequest(String advanceNumber, String paymentReference, String appointmentID, AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); service .addAdvancedNumberRequest( advanceNumber, paymentReference, appointmentID, context) .then((res) { + GifLoaderDialogUtils.hideDialog(context); print(res); getAppoQR(context, appo); }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); print(err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + }); } Future navigateToPaymentMethod( @@ -705,51 +722,46 @@ class _ToDoState extends State { } confirmAppointment(AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); service .confirmAppointment(appo.appointmentNo, appo.clinicID, appo.projectID, appo.isLiveCareAppointment, context) .then((res) { - if (res['MessageStatus'] == 1) { - AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); - getPatientAppointmentHistory(); - } else { - AppToast.showErrorToast(message: res['ErrorEndUserMessage']); - } - }) - .catchError((err) { - print(err); - }) - .showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)) - .then((value) { - if (appo.isLiveCareAppointment) { - insertLiveCareVIDARequest(appo); - } else { - getPatientAppointmentHistory(); - } - }); + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); + if (appo.isLiveCareAppointment) { + insertLiveCareVIDARequest(appo); + } else { + getPatientAppointmentHistory(); + } + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); } insertLiveCareVIDARequest(AppoitmentAllHistoryResultList appo) { + GifLoaderDialogUtils.showMyDialog(context); DoctorsListService service = new DoctorsListService(); service .insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, appo.serviceID, appo.doctorID, context) .then((res) { - if (res['MessageStatus'] == 1) { - AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); - } else { - AppToast.showErrorToast(message: res['ErrorEndUserMessage']); - } - }) - .catchError((err) { - print(err); - }) - .showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)) - .then((value) { - getPatientAppointmentHistory(); - }); + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + AppToast.showSuccessToast(message: res['ErrorEndUserMessage']); + getPatientAppointmentHistory(); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + }); } } diff --git a/lib/pages/ToDoList/widgets/paymentDialog.dart b/lib/pages/ToDoList/widgets/paymentDialog.dart index 2fbcbcc1..7c461815 100644 --- a/lib/pages/ToDoList/widgets/paymentDialog.dart +++ b/lib/pages/ToDoList/widgets/paymentDialog.dart @@ -24,7 +24,7 @@ class _PaymentDialogState extends State { shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)), child: Container( - height: 510.0, + height: 550.0, width: 450.0, child: Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/pages/ToDoList/widgets/upcomingCard.dart b/lib/pages/ToDoList/widgets/upcomingCard.dart index c1d1b546..7f325ba6 100644 --- a/lib/pages/ToDoList/widgets/upcomingCard.dart +++ b/lib/pages/ToDoList/widgets/upcomingCard.dart @@ -191,7 +191,7 @@ class _TodoListCardState extends State { textAlign: TextAlign.end, style: TextStyle( fontSize: 12.0, - color: Colors.red[600], + color: new Color(0xFF40ACC9), decoration: TextDecoration.underline)), ), ), diff --git a/lib/pages/family/add-family-member.dart b/lib/pages/family/add-family-member.dart index f1742141..98df5f88 100644 --- a/lib/pages/family/add-family-member.dart +++ b/lib/pages/family/add-family-member.dart @@ -179,8 +179,7 @@ class _AddMember extends State { request.regionID = 1; } loading(true); - this - .familyFileProvider + familyFileProvider .insertNewMember(request) .then((value) => sendActivationCode(value)); } @@ -189,8 +188,7 @@ class _AddMember extends State { // var request = this.getCommonRequest(); loading(true); patientShareRequestID = result['PatientShareRequestID']; - this - .familyFileProvider + familyFileProvider .sendActivationCode(mobileNo, countryCode, nationalIDorFile.text) .then((result) => { if (result != null && result['isSMSSent'] == true) @@ -203,11 +201,13 @@ class _AddMember extends State { startSMSService(type, result) { loading(false); - new SMSOTP( + SMSOTP( context, type, - this.mobileNo, - (value) => {this.checkActivationCode(value, result)}, + mobileNo, + (value) { + this.checkActivationCode(value, result); + }, () => { print('Faild..'), }, @@ -215,8 +215,7 @@ class _AddMember extends State { } checkActivationCode(value, result) { - this - .familyFileProvider + familyFileProvider .checkActivationCode( result['LogInTokenID'], value, nationalIDorFile.text, mobileNo) .then((result) => { @@ -226,8 +225,7 @@ class _AddMember extends State { } handleFamilyRequests(id, stauts) { - this - .familyFileProvider + familyFileProvider .acceptAndRejectRecievedRequests(id, stauts) .then((result) => { sharedPref.remove(FAMILY_FILE), diff --git a/lib/pages/insurance/insurance_card_screen.dart b/lib/pages/insurance/insurance_card_screen.dart index 6483b6b2..55100497 100644 --- a/lib/pages/insurance/insurance_card_screen.dart +++ b/lib/pages/insurance/insurance_card_screen.dart @@ -19,7 +19,7 @@ class InsuranceCard extends StatefulWidget { @override _InsuranceCardState createState() => _InsuranceCardState(); } - +//TODO fix it class _InsuranceCardState extends State { @override Widget build(BuildContext context) { @@ -29,6 +29,7 @@ class _InsuranceCardState extends State { AppScaffold( isShowAppBar: true, baseViewModel: model, + image: 'assets/images/medical/insurance_card_icon.png', appBarTitle: TranslationBase.of(context).insuranceCards, body: Container( margin: EdgeInsets.only( diff --git a/lib/pages/insurance/insurance_update_screen.dart b/lib/pages/insurance/insurance_update_screen.dart index 2fa291df..1e616108 100644 --- a/lib/pages/insurance/insurance_update_screen.dart +++ b/lib/pages/insurance/insurance_update_screen.dart @@ -98,12 +98,7 @@ class _InsuranceUpdateState extends State children: [ Container( child: ListView.builder( - itemCount: model.getAllSharedRecordsByStatusResponse - .getAllSharedRecordsByStatusList == - null - ? 0 - : model.getAllSharedRecordsByStatusResponse - .getAllSharedRecordsByStatusList.length, + itemCount: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.length, itemBuilder: (BuildContext context, int index) { return Container( margin: EdgeInsets.all(10.0), diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index 2744d3a6..82fd6d22 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -1,26 +1,35 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_index_page.dart'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart'; -import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; +import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart'; +import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart'; import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/medicine_search_screen.dart'; +import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; +import '../../locator.dart'; + class HomePage extends StatefulWidget { final Function goToMyProfile; @@ -31,9 +40,22 @@ class HomePage extends StatefulWidget { } class _HomePageState extends State { + var toDoProvider; + + @override + void initState() { + WidgetsBinding.instance.addPostFrameCallback((timeStamp) { + getToDoCount(); + }); + super.initState(); + } + AuthenticatedUserObject authenticatedUserObject = locator(); + + @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); + toDoProvider = Provider.of(context); return BaseView( onModelReady: (model) => model.getPatientRadOrders(), builder: (_, model, wi) => AppScaffold( @@ -50,11 +72,11 @@ class _HomePageState extends State { children: [ Container( width: double.infinity, - height: 210, + height: 100, decoration: BoxDecoration( image: DecorationImage( image: ExactAssetImage( - 'assets/images/dashboard_top_bg.png'), + 'assets/images/dq_home_page_bg_image.png'), fit: BoxFit.cover), ), child: Stack( @@ -66,135 +88,18 @@ class _HomePageState extends State { child: Container( width: MediaQuery.of(context).size.width * 0.8, - child: Row( - children: [ - Expanded( - child: Container( - height: 120, - padding: EdgeInsets.all(5), - margin: EdgeInsets.all(5), - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage( - "assets/images/new-design/covid_bg_transparent.png"), - fit: BoxFit.fill, - ), - color: - Colors.white.withOpacity(0.3), - borderRadius: BorderRadius.all( - Radius.circular(5))), - child: Container( - margin: EdgeInsets.only(top: 10.0), - child: Column( - children: [ - Text("COVID-19 TEST", - style: TextStyle( - color: Colors.white, - fontWeight: - FontWeight.bold, - fontSize: 18.0)), - Row( - children: [ - Container( - margin: EdgeInsets.only( - top: 15.0, left: 3.5, right: 3.5), - child: SvgPicture.asset( - 'assets/images/new-design/covid-19-car.svg', - width: 45.0, - height: 45.0), - ), - Container( - margin: EdgeInsets.only( - left: 10.0, - top: 10.0), - child: Column( - children: [ - Text("Drive-Thru", - style: TextStyle( - color: Colors - .white, - fontWeight: - FontWeight - .bold, - fontSize: - 16.0)), - ButtonTheme( - shape: - RoundedRectangleBorder( - borderRadius: - BorderRadius - .circular( - 5.0), - ), - minWidth: MediaQuery.of( - context) - .size - .width * - 0.15, - height: 25.0, - child: RaisedButton( - color: Colors - .red[800], - textColor: - Colors.white, - disabledTextColor: - Colors.white, - disabledColor: - new Color( - 0xFFbcc2c4), - onPressed: () { - navigateToCovidDriveThru(); - }, - child: Text( - "BOOK NOW", - style: TextStyle( - fontSize: - 12.0)), - ), - ), - ], - ), - ), - ], - ), - ], - ), - ), - ), - ), - Expanded( - child: InkWell( - onTap: () => Navigator.push(context, - FadePage(page: LiveCareHome())), - child: Container( - height: 120, - padding: EdgeInsets.all(15), - margin: EdgeInsets.all(5), - decoration: BoxDecoration( - color: Colors.white - .withOpacity(0.3), - borderRadius: BorderRadius.all( - Radius.circular(5))), - child: SvgPicture.asset( - projectViewModel.isArabic - ? 'assets/images/new-design/livecare_arabic_logo.svg' - : 'assets/images/new-design/liveCare_white_logo.svg', - ), - ), - ), - ), - ], - ), + child: Container(), ), ) ], ), + ), - Container(width: double.infinity, height: 80) + Container(width: double.infinity, height:projectViewModel.isArabic ? 120:110), ], ), Positioned( - top: 155, + top: 40, left: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == Orientation.landscape @@ -205,12 +110,12 @@ class _HomePageState extends State { Orientation.landscape ? 0.02 : 0.03), - child: (!model.isLogin && projectViewModel.user == null) + child: (!authenticatedUserObject.isLogin && projectViewModel.user == null) ? Container( width: double.infinity, - height: 125, + height: 160, decoration: BoxDecoration( - color: HexColor('#A59E9E'), + color: Theme.of(context).primaryColor, shape: BoxShape.rectangle, border: Border.all( color: Colors.transparent, width: 0.5), @@ -230,7 +135,7 @@ class _HomePageState extends State { ), Texts( TranslationBase.of(context).myMedicalFile, - color: Colors.black87, + color: Colors.white, bold: true, fontSize: 23, ), @@ -240,23 +145,26 @@ class _HomePageState extends State { Texts( TranslationBase.of(context) .myMedicalFileSubTitle, - color: Colors.black, + color: Colors.white, fontSize: 16, ), Align( alignment: projectViewModel.isArabic - ? Alignment.bottomRight - : Alignment.bottomLeft, + ? Alignment.bottomLeft + : Alignment.bottomRight, child: InkWell( onTap: () { widget.goToMyProfile(); }, child: Container( margin: EdgeInsets.all(2), - width: 90, + width: MediaQuery.of(context) + .size + .width * + 0.30, height: 30, decoration: BoxDecoration( - color: HexColor('#D81A2E'), + color: Colors.white, shape: BoxShape.rectangle, border: Border.all( color: Colors.transparent, @@ -268,7 +176,8 @@ class _HomePageState extends State { child: Texts( TranslationBase.of(context) .viewMore, - color: Colors.white, + color: Theme.of(context) + .primaryColor, fontSize: 12, ), ), @@ -281,9 +190,9 @@ class _HomePageState extends State { ) : Container( width: double.infinity, - height: 130, + height: projectViewModel.isArabic ? 180 : 150, decoration: BoxDecoration( - color: HexColor('#A59E9E'), + color: Theme.of(context).primaryColor, shape: BoxShape.rectangle, border: Border.all( color: Colors.transparent, width: 0.5), @@ -294,140 +203,183 @@ class _HomePageState extends State { 'assets/images/bg_graphic.png'), fit: BoxFit.cover), ), - child: Container( - margin: EdgeInsets.all(5), - child: Column( - children: [ - Row( - children: [ - if (model.user != null) - Expanded( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - SizedBox( - height: 8, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + margin: EdgeInsets.all(5), + child: Column( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + if (model.user != null) + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + SizedBox( + height: 8, + ), + Texts( + model.user.firstName + + " " + + model.user.lastName, + color: Colors.grey[100], + bold: true, + fontSize: 15, + ), + Texts( + '${model.user.patientID}', + color: Colors.white, + fontSize: 14, + ), + SizedBox( + height: 5, + ), + Texts( + '${DateUtil.getMonthDayYearDateFormatted(model.user.dateofBirthDataTime)} ,${model.user.genderDescription} ${model.user.ageDesc}', + color: Colors.grey[100], + fontWeight: + FontWeight.normal, + fontSize: 14, + ), + ], + ), + ), + InkWell( + onTap: () { + widget.goToMyProfile(); + }, + child: Container( + margin: EdgeInsets.all(2), + width: MediaQuery.of(context) + .size + .width * + 0.30, + height: 30, + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.rectangle, + border: Border.all( + color: Colors.transparent, + width: 0.5), + borderRadius: BorderRadius.all( + Radius.circular(5), ), - Texts( - model.user.firstName + - " " + - model.user.lastName, - color: Colors.grey[100], + ), + child: Center( + child: Texts( + TranslationBase.of(context) + .viewMore, + color: Theme.of(context) + .primaryColor, + fontSize: 12, bold: true, - fontSize: 15, ), - Texts( - '${model.user.patientID}', - color: Colors.white, - fontSize: 14, - ), - SizedBox( - height: 5, - ), - Texts( - '${DateUtil.getMonthDayYearDateFormatted(model.user.dateofBirthDataTime)} ,${model.user.genderDescription} ${model.user.ageDesc}', - color: Colors.grey[100], - fontWeight: FontWeight.normal, - fontSize: 14, + ), + ), + ) + ], + ), + Row( + children: [ + Expanded( + child: Row( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/height_icon.png', + width: 30, + height: 55, ), + Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Texts( + "${model.heightCm}", + color: Colors.white, + bold: true, + ), + Texts( + TranslationBase.of(context).height, + color: Colors.white, + fontSize: 10, + ), + ], + ) ], ), ), - InkWell( - onTap: () { - widget.goToMyProfile(); - }, - child: Container( - margin: EdgeInsets.all(2), - width: 90, - height: 30, - decoration: BoxDecoration( - color: HexColor('#D81A2E'), - shape: BoxShape.rectangle, - border: Border.all( - color: Colors.transparent, - width: 0.5), - borderRadius: BorderRadius.all( - Radius.circular(5), - ), - ), - child: Center( - child: Texts( - TranslationBase.of(context) - .viewMore, - color: Colors.white, - fontSize: 12, - ), - ), + SizedBox( + width: 3, ), - ) - ], - ), - Row( - //crossAxisAlignment: CrossAxisAlignment.center, - //mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Expanded( - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Image.asset( - 'assets/images/height_icon.png', - width: 35, - height: 40, - ), - Texts( - "${model.heightCm}", - color: Colors.white, - ) - ], + Expanded( + child: Row( + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/test-weight.png', + width: 30, + height: 55, + ), + Column( + children: [ + Texts( + '${model.weightKg}', + color: Colors.white, + bold: true, + ), + Texts( + TranslationBase.of(context).weight, + color: Colors.white, + fontSize: 10, + ) + ], + ) + ], + ), ), - ), - SizedBox( - width: 3, - ), - Expanded( - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Image.asset( - 'assets/images/weight_icon.png', - width: 25, - height: 40, - ), - Texts( - '${model.weightKg}', - color: Colors.white, - ) - ], + SizedBox( + width: 3, ), - ), - SizedBox( - width: 3, - ), - Expanded( - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Image.asset( - 'assets/images/blood_icon.png', - width: 35, - height: 40, - ), - Texts( - '${model.bloadType}', - color: Colors.white, - ) - ], + Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + 'assets/images/blood-drop.png', + width: 35, + height: 40, + ), + Column( + children: [ + Texts( + '${model.bloadType}', + color: Colors.white, + ), + Texts( + TranslationBase.of(context).bloodType, + color: Colors.white, + fontSize: 10, + ) + ], + ) + ], + ), ), - ), - ], - ) - ], + ], + ) + ], + ), ), ), ), @@ -439,108 +391,143 @@ class _HomePageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - DashboardItem( - onTap: () { - Navigator.push( - context, - FadePage( - page: HomeHealthCareIndexPage(), - ), - ); - }, - child: Center( - child: Padding( - padding: const EdgeInsets.all(15.0), - child: Column( - children: [ - Image.asset( - 'assets/images/home_health_care_icon.png', - width: 50, - height: 50, - ), - SizedBox( - height: 3, - ), - Texts( - TranslationBase.of(context) - .homeHealthCareService, - textAlign: TextAlign.center, - color: Colors.white, - bold: true, - fontSize: SizeConfig.textMultiplier * 1.7, - ) - ], + Expanded( + child: DashboardItem( + onTap: () { + Navigator.push( + context, + FadePage( + page: VitalSignDetailsScreen(), + ), + ); + }, + child: Center( + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + children: [ + SizedBox(height: 15,), + + Container( + width: 60, + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(12) + ), + child: Center(child: Image.asset('assets/images/vital_sign_icon.png', + width: 80, + height: 50, + fit: BoxFit.contain,)), + ), + SizedBox(height: 20,), + Texts( + TranslationBase.of(context) + .vitalSigns, + textAlign: TextAlign.center, + color: Colors.white, + bold: true, + fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7, + ) + ], + ), ), ), + margin: 4, + height: 170, + imageName: 'home_healthcare_service_bg.png', + opacity: 1.0, ), - height: MediaQuery.of(context).size.width * 0.4, - imageName: 'home_healthcare_service_bg.png', - opacity: 0.5, ), - DashboardItem( - child: Center( - child: Padding( - padding: const EdgeInsets.all(15.0), - child: Column( - children: [ - Image.asset( - 'assets/images/pharmacy_logo.png', - width: 40, - height: 40, - ), - SizedBox( - height: 20, - ), - Texts( - TranslationBase.of(context).onlinePharmacy, - textAlign: TextAlign.center, - color: Colors.white, - bold: true, - fontSize: SizeConfig.textMultiplier * 1.7, - ) - ], + Expanded( + child: DashboardItem( + onTap: () { + Navigator.push( + context, + FadePage( + page: MedicineSearch(), + ), + ); + }, + opacity: 1.0, + child: Center( + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + children: [ + SizedBox(height: 15,), + Container( + width: 50, + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(12) + ), + child: Center(child: Image.asset('assets/images/search_medicine_icon.png', + width: 50, + height: 50, + fit: BoxFit.contain,)), + ), + SizedBox(height: 20,), + Texts( + TranslationBase.of(context).searchMedicine, + textAlign: TextAlign.center, + color: Colors.white, + bold: true, + fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7, + ) + ], + ), ), ), + margin: 4, + height: 170, + imageName: 'al-habib_onlne_pharmacy_bg.png', ), - height: MediaQuery.of(context).size.width * 0.4, - imageName: 'al-habib_onlne_pharmacy_bg.png', ), - DashboardItem( - onTap: (){ - Navigator.push( - context, - FadePage( - page: CMCIndexPage(), - ), - ); - }, - child: Center( - child: Padding( - padding: const EdgeInsets.all(15.0), - child: Column( - children: [ - Image.asset( - 'assets/images/comprehensive_medical_checkup_logo.png', - width: 50, - height: 50, - ), - SizedBox( - height: 3, - ), - Texts( - TranslationBase.of(context).emergencyService, - textAlign: TextAlign.center, - color: Colors.white, - bold: true, - fontSize: SizeConfig.textMultiplier * 1.7, - ) - ], + Expanded( + child: DashboardItem(opacity: 1.0, + onTap: (){ + Navigator.push( + context, + FadePage( + page: PaymentService(), + ), + ); + }, + child: Center( + child: Padding( + padding: const EdgeInsets.all(15.0), + child: Column( + children: [ + SizedBox(height: 15,), + Container( + decoration: BoxDecoration( + color: Colors.white, + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(12) + ), + child: Center(child: Image.asset('assets/images/online_payment_icon.png', + width: 80, + height: 50, + fit: BoxFit.contain,)), + ), + SizedBox(height: 15,), + Texts( + TranslationBase.of(context).onlinePaymentService, + textAlign: TextAlign.center, + color: Colors.white, + bold: true, + fontSize: projectViewModel.isArabic? SizeConfig.textMultiplier * 1.5 :SizeConfig.textMultiplier * 1.7, + ) + ], + ), ), ), + margin: 4, + height: 170, + imageName: 'online_payments_bg.png', ), - height: MediaQuery.of(context).size.width * 0.4, - color: HexColor("#747C80"), - imageName: 'emergency_service_image.png', ), ], ), @@ -548,121 +535,123 @@ class _HomePageState extends State { SizedBox( height: 8, ), - InkWell( - onTap: () => - Navigator.push(context, FadePage(page: PaymentService())), - child: Container( - margin: EdgeInsets.only(left: 15, right: 15), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - width: MediaQuery.of(context).size.width * 0.29, - child: Center( - child: Padding( - padding: const EdgeInsets.all(15.0), - child: Column( - children: [ - Image.asset( - 'assets/images/al-habib_online_payment_service_icon.png', - height: 55, - ), - SizedBox( - height: 5, + Container( + margin: EdgeInsets.only(left: 10, right: 10), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + //flex: 1, + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: MyAppointments(), ), - Texts( - TranslationBase.of(context) - .onlinePaymentService, - textAlign: TextAlign.center, - color: Colors.black87, - bold: false, - fontSize: SizeConfig.textMultiplier * 1.7, - ) - ], + ); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context) + .myAppointments, + imagePath: 'my_appointment_icon.png', + subTitle: TranslationBase.of(context).myAppointmentsList, ), ), ), - height: MediaQuery.of(context).size.width * 0.4, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(6.0), - color: Colors.white, + Expanded( + flex: 1, + child: InkWell( + onTap: () => Navigator.push(context, + FadePage(page: LabsHomePage())), + child: MedicalProfileItem( + title: TranslationBase.of(context).lab, + imagePath: 'lab_result_icon.png', + subTitle: + TranslationBase.of(context).lab, + ), + ), ), - ), - Container( - child: Center( - child: Padding( - padding: const EdgeInsets.all(15.0), - child: Column( - children: [ - Image.asset( - 'assets/images/ereferral_service_icon.png', - width: 50, - height: 55, - ), - SizedBox( - height: 10, - ), - Texts( - TranslationBase.of(context) - .offersAndPackages, - textAlign: TextAlign.center, - color: Colors.black87, - bold: false, - fontSize: SizeConfig.textMultiplier * 1.7, - ) - ], - ), + Expanded( + flex: 1, + child: InkWell( + onTap: () => Navigator.push(context, + FadePage(page: RadiologyHomePage())), + child: MedicalProfileItem( + title: TranslationBase.of(context) + .radiology, + imagePath: 'radiology_icon.png', + subTitle: TranslationBase.of(context) + .radiologySubtitle, ), ), - width: MediaQuery.of(context).size.width * 0.29, - height: MediaQuery.of(context).size.width * 0.4, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(6.0), - color: Colors.white, - )), - Container( - width: MediaQuery.of(context).size.width * 0.29, - child: InkWell( - onTap: () => Navigator.push( - context, - FadePage( - page: ErOptions( - isAppbar: true, - ))), - child: Center( - child: Padding( - padding: const EdgeInsets.all(15.0), - child: Column( - children: [ - Image.asset( - 'assets/images/Dr_Schedule_report.png', - width: 50, - height: 50, - ), - SizedBox( - height: 10, - ), - Texts( - TranslationBase.of(context) - .emergencyServices, - textAlign: TextAlign.center, - color: Colors.black87, - bold: false, - fontSize: SizeConfig.textMultiplier * 1.7, - ) - ], - ), + ), + ], + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: HomePrescriptionsPage(), + ), + ); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context) + .medicines, + imagePath: 'prescription_icon.png', + subTitle: TranslationBase.of(context) + .medicinesSubtitle, ), ), ), - height: MediaQuery.of(context).size.width * 0.4, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(6.0), - color: Colors.white, + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: DoctorHomePage(), + ), + ); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context) + .myDoctor, + imagePath: 'doctor_icon.png', + subTitle: TranslationBase.of(context) + .myDoctorSubtitle, + ), + ), ), - ), - ], - ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.push(context, + FadePage(page: InsuranceCard())); + }, + child: MedicalProfileItem( + title: TranslationBase.of(context) + .insurance, + imagePath: 'insurance_card_icon.png', + subTitle: TranslationBase.of(context) + .insuranceSubtitle, + ), + ), + ), + ], + ), + + ], ), ), SizedBox( @@ -674,6 +663,7 @@ class _HomePageState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ DashboardItem( + opacity:1.0, child: Container( width: double.infinity, padding: EdgeInsets.all(10), @@ -683,11 +673,10 @@ class _HomePageState extends State { Texts( TranslationBase.of(context).hMGService, color: Colors.white, - fontWeight: FontWeight.normal, + bold: true, ), Texts( - TranslationBase.of(context) - .viewAllHabibMedicalService, + TranslationBase.of(context).viewAllHabibMedicalService, color: Colors.white, fontWeight: FontWeight.normal, fontSize: 10, @@ -698,23 +687,21 @@ class _HomePageState extends State { Texts( TranslationBase.of(context).viewMore, color: Colors.white, - //fontWeight: FontWeight.normal, + bold: true, ) ], ), ), height: 100, - imageName: 'contact_us_bg.png', - opacity: 0.5, - color: Colors.grey[700], + imageName: 'ask_doctor_bg.png', + //color: Colors.grey[700], width: MediaQuery.of(context).size.width * 0.45, onTap: () => Navigator.push( - context, FadePage(page: AllHabibMedicalService())), + context, FadePage(page: AllHabibMedicalService(goToMyProfile: widget.goToMyProfile,))), ), DashboardItem( + opacity:1.0, onTap: () { - // Navigator.push( - // context, FadePage(page: FeedbackHomePage())); Navigator.push( context, FadePage(page: ContactUsPage())); }, @@ -727,13 +714,13 @@ class _HomePageState extends State { Texts( TranslationBase.of(context).contactUs, color: Colors.white, - fontWeight: FontWeight.normal, + bold: true, ), Texts( TranslationBase.of(context).viewAllWaysReachUs, color: Colors.white, fontWeight: FontWeight.normal, - fontSize: 10, + fontSize: SizeConfig.textMultiplier * 1.0 , ), Expanded( child: Container(), @@ -741,14 +728,13 @@ class _HomePageState extends State { Texts( TranslationBase.of(context).viewMore, color: Colors.white, - fontWeight: FontWeight.normal, + bold: true, ) ], ), ), height: 100, - imageName: 'contact_us_bg.png', - opacity: 0.5, + imageName: 'rectangle.png', color: Colors.grey[700], width: MediaQuery.of(context).size.width * 0.45, ), @@ -756,7 +742,7 @@ class _HomePageState extends State { ), ), SizedBox( - height: 80, + height: 120, ) ], ), @@ -770,6 +756,23 @@ class _HomePageState extends State { Navigator.push(context, MaterialPageRoute(builder: (context) => CovidDrivethruLocation())); } + + getToDoCount() { + toDoProvider.setState(0); + ClinicListService service = new ClinicListService(); + service.getActiveAppointmentNo(context).then((res) { + print(res['AppointmentActiveNumber']); + if (res['MessageStatus'] == 1) { + setState(() { + toDoProvider.setState(res['AppointmentActiveNumber']); + }); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + print(err); + }); + } } class DashboardItem extends StatelessWidget { @@ -782,7 +785,7 @@ class DashboardItem extends StatelessWidget { this.width, this.height, this.color, - this.opacity = 0.4}) + this.opacity = 1.0,this.icon,this.margin=0}) : super(key: key); final bool hasBorder; final String imageName; @@ -792,6 +795,8 @@ class DashboardItem extends StatelessWidget { final double height; final Color color; final double opacity; + final double margin; + final Widget icon; @override Widget build(BuildContext context) { @@ -808,7 +813,7 @@ class DashboardItem extends StatelessWidget { color: !hasBorder ? color != null ? color - : HexColor('#050705').withOpacity(opacity) + : Colors.black.withOpacity(opacity) : Colors.white, borderRadius: BorderRadius.circular(6.0), border: hasBorder @@ -819,10 +824,11 @@ class DashboardItem extends StatelessWidget { image: ExactAssetImage('assets/images/$imageName'), fit: BoxFit.cover, colorFilter: new ColorFilter.mode( - Colors.black.withOpacity(0.2), BlendMode.dstIn), + Colors.black.withOpacity(opacity), BlendMode.dstIn), ) - : null, + : icon, ), + margin: EdgeInsets.all(margin), child: Center( child: child, ), diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 1ca6c2eb..bb3589d9 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -3,6 +3,7 @@ import 'dart:typed_data'; import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; @@ -18,8 +19,12 @@ import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart'; import 'package:diplomaticquarterapp/uitl/LocalNotification.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/drawer/app_drawer_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/slide_up_page.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -29,6 +34,7 @@ import 'package:permission_handler/permission_handler.dart'; import 'package:provider/provider.dart'; import 'package:rxdart/rxdart.dart'; +import '../../locator.dart'; import 'home_page.dart'; class LandingPage extends StatefulWidget { @@ -44,6 +50,10 @@ class _LandingPageState extends State with WidgetsBindingObserver { int currentTab = 0; PageController pageController; ProjectViewModel projectProvider; + + ///inject the user data + AuthenticatedUserObject authenticatedUserObject = locator(); + final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); final authService = new AuthProvider(); var event = RobotProvider(); @@ -123,7 +133,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { AppGlobal.context = context; }); _requestIOSPermissions(); - pageController = PageController(keepPage: true); + pageController = PageController(keepPage: true); // _firebaseMessaging.setAutoInitEnabled(true); // // if (Platform.isIOS) { @@ -141,119 +151,119 @@ class _LandingPageState extends State with WidgetsBindingObserver { // }); //_firebase Background message handler - // _firebaseMessaging.configure( - // onMessage: (Map message) async { - // showDialog("onMessage: $message"); - // print("onMessage: $message"); - // print(message); - // print(message['name']); - // print(message['appointmentdate']); - // - // if (Platform.isIOS) { - // if (message['is_call'] == "true") { - // var route = ModalRoute.of(context); - // - // if (route != null) { - // print(route.settings.name); - // } - // - // Map myMap = new Map.from(message); - // print(myMap); - // LandingPage.isOpenCallPage = true; - // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); - // if (!isPageNavigated) { - // isPageNavigated = true; - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => IncomingCall( - // incomingCallData: LandingPage.incomingCallData))) - // .then((value) { - // isPageNavigated = false; - // }); - // } - // } else { - // print("Is Call Not Found iOS"); - // } - // } else { - // print("Is Call Not Found iOS"); - // } - // - // if (Platform.isAndroid) { - // if (message['data'].containsKey("is_call")) { - // var route = ModalRoute.of(context); - // - // if (route != null) { - // print(route.settings.name); - // } - // - // Map myMap = - // new Map.from(message['data']); - // print(myMap); - // LandingPage.isOpenCallPage = true; - // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); - // if (!isPageNavigated) { - // isPageNavigated = true; - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => IncomingCall( - // incomingCallData: LandingPage.incomingCallData))) - // .then((value) { - // isPageNavigated = false; - // }); - // } - // } else { - // print("Is Call Not Found Android"); - // } - // } else { - // print("Is Call Not Found Android"); - // } - // }, - // onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler, - // onLaunch: (Map message) async { - // print("onLaunch: $message"); - // showDialog("onLaunch: $message"); - // }, - // onResume: (Map message) async { - // print("onResume: $message"); - // print(message); - // print(message['name']); - // print(message['appointmentdate']); - // - // showDialog("onResume: $message"); - // - // if (Platform.isIOS) { - // if (message['is_call'] == "true") { - // var route = ModalRoute.of(context); - // - // if (route != null) { - // print(route.settings.name); - // } - // - // Map myMap = - // new Map.from(message); - // print(myMap); - // LandingPage.isOpenCallPage = true; - // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); - // if (!isPageNavigated) { - // isPageNavigated = true; - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => IncomingCall( - // incomingCallData: LandingPage.incomingCallData))) - // .then((value) { - // isPageNavigated = false; - // }); - // } - // } else { - // print("Is Call Not Found iOS"); - // } - // } else { - // print("Is Call Not Found iOS"); - // } - // }, + // _firebaseMessaging.configure( + // onMessage: (Map message) async { + // showDialog("onMessage: $message"); + // print("onMessage: $message"); + // print(message); + // print(message['name']); + // print(message['appointmentdate']); + // + // if (Platform.isIOS) { + // if (message['is_call'] == "true") { + // var route = ModalRoute.of(context); + // + // if (route != null) { + // print(route.settings.name); + // } + // + // Map myMap = new Map.from(message); + // print(myMap); + // LandingPage.isOpenCallPage = true; + // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); + // if (!isPageNavigated) { + // isPageNavigated = true; + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => IncomingCall( + // incomingCallData: LandingPage.incomingCallData))) + // .then((value) { + // isPageNavigated = false; + // }); + // } + // } else { + // print("Is Call Not Found iOS"); + // } + // } else { + // print("Is Call Not Found iOS"); + // } + // + // if (Platform.isAndroid) { + // if (message['data'].containsKey("is_call")) { + // var route = ModalRoute.of(context); + // + // if (route != null) { + // print(route.settings.name); + // } + // + // Map myMap = + // new Map.from(message['data']); + // print(myMap); + // LandingPage.isOpenCallPage = true; + // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); + // if (!isPageNavigated) { + // isPageNavigated = true; + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => IncomingCall( + // incomingCallData: LandingPage.incomingCallData))) + // .then((value) { + // isPageNavigated = false; + // }); + // } + // } else { + // print("Is Call Not Found Android"); + // } + // } else { + // print("Is Call Not Found Android"); + // } + // }, + // onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler, + // onLaunch: (Map message) async { + // print("onLaunch: $message"); + // showDialog("onLaunch: $message"); + // }, + // onResume: (Map message) async { + // print("onResume: $message"); + // print(message); + // print(message['name']); + // print(message['appointmentdate']); + // + // showDialog("onResume: $message"); + // + // if (Platform.isIOS) { + // if (message['is_call'] == "true") { + // var route = ModalRoute.of(context); + // + // if (route != null) { + // print(route.settings.name); + // } + // + // Map myMap = + // new Map.from(message); + // print(myMap); + // LandingPage.isOpenCallPage = true; + // LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); + // if (!isPageNavigated) { + // isPageNavigated = true; + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => IncomingCall( + // incomingCallData: LandingPage.incomingCallData))) + // .then((value) { + // isPageNavigated = false; + // }); + // } + // } else { + // print("Is Call Not Found iOS"); + // } + // } else { + // print("Is Call Not Found iOS"); + // } + // }, // ); } @@ -329,56 +339,59 @@ class _LandingPageState extends State with WidgetsBindingObserver { // projectProvider = Provider.of(context); // checkValue(projectProvider); return Scaffold( - appBar: AppBar( - elevation: 0, - textTheme: TextTheme( - headline6: - TextStyle(color: Colors.white, fontWeight: FontWeight.bold), - ), - title: Text(getText(currentTab).toUpperCase()), - leading: Builder( - builder: (BuildContext context) { - return IconButton( - icon: Icon(Icons.menu), - color: Colors.white, - onPressed: () => Scaffold.of(context).openDrawer(), - ); - }, - ), - actions: [ - // IconButton( - // iconSize: 70, - // icon: SvgPicture.asset('assets/images/svg/robort_svg.svg', - // height: 100, width: 100, fit: BoxFit.cover), - // onPressed: () { - // triggerRobot(); - // } //do something, - // ) - ], - centerTitle: true, - ), - drawer: SafeArea(child: AppDrawer()), - extendBody: true, - body: PageView( - physics: NeverScrollableScrollPhysics(), - controller: pageController, - children: [ - HomePage( - goToMyProfile: () { - _changeCurrentTab(1); + appBar: AppBar( + elevation: 0, + textTheme: TextTheme( + headline6: + TextStyle(color: Colors.white, fontWeight: FontWeight.bold), + ), + title: Texts(getText(currentTab).toUpperCase(),bold: true,color: Colors.white,), + leading: Builder( + builder: (BuildContext context) { + return IconButton( + icon: Icon(Icons.menu), + color: Colors.white, + onPressed: () => Scaffold.of(context).openDrawer(), + ); }, ), - MedicalProfilePage(), - MyAdmissionsPage(), - ToDo(), - BookingOptions() - ], // Please do not remove the BookingOptions from this array - ), - bottomNavigationBar: BottomNavBar( - changeIndex: _changeCurrentTab, - index: currentTab, - ), - ); + actions: [ + // IconButton( + // iconSize: 70, + // icon: SvgPicture.asset('assets/images/svg/robort_svg.svg', + // height: 100, width: 100, fit: BoxFit.cover), + // onPressed: () { + // triggerRobot(); + // } //do something, + // ) + ], + centerTitle: true, + ), + drawer: SafeArea(child: AppDrawer()), + extendBody: true, + body: PageView( + physics: NeverScrollableScrollPhysics(), + controller: pageController, + children: [ + HomePage(goToMyProfile: () {_changeCurrentTab(1);},), + MedicalProfilePage(), + BookingOptions(), + Container(), + ToDo(), + ], // Please do not remove the BookingOptions from this array + ), + bottomNavigationBar: BottomNavBar( + changeIndex: _changeCurrentTab, + index: currentTab, + ), + floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, + floatingActionButton: currentTab == 0 + ? FloatingButton( + elevation: true, + onTap: () { + _changeCurrentTab(2); + }) + : null); } triggerRobot() { @@ -392,11 +405,11 @@ class _LandingPageState extends State with WidgetsBindingObserver { case 1: return TranslationBase.of(context).medicalProfile; case 2: - return TranslationBase.of(context).mySchedule; + return TranslationBase.of(context).bookAppo; case 3: - return TranslationBase.of(context).services; + return TranslationBase.of(context).myFamily; case 4: - return TranslationBase.of(context).bookAppo; + return TranslationBase.of(context).services; } } diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 85c1b232..c06dd473 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -4,20 +4,20 @@ import 'package:diplomaticquarterapp/models/Authentication/check_activation_code import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; import 'package:diplomaticquarterapp/models/Authentication/send_activation_request.dart'; +import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart'; -import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/routes.dart'; import 'package:flutter/services.dart'; import 'package:intl/intl.dart'; import 'package:local_auth/local_auth.dart'; @@ -73,173 +73,165 @@ class _ConfirmLogin extends State { @override Widget build(BuildContext context) { return AppScaffold( - appBarTitle: TranslationBase.of(context).confirm, - isShowAppBar: true, - isShowDecPage: false, - body: SingleChildScrollView( - child: Container( - padding: EdgeInsets.all(20), - height: SizeConfig.realScreenHeight * .9, - width: SizeConfig.realScreenWidth, - child: Column( - children: [ - Expanded( - flex: 3, - child: user != null && isMoreOption == false - ? Column( - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Image.asset( - 'assets/images/habib-logo.png', - height: 80, - width: 80, - ), - AppText( - TranslationBase.of(context).welcomeBack + - ' ' + - user.name, - fontSize: SizeConfig.textMultiplier * 3.5, - ), - AppText( - TranslationBase.of(context).accountInfo, - fontSize: SizeConfig.textMultiplier * 2.5, - ), - Card( - color: Colors.grey[300], - child: Row( - children: [ - Expanded( - child: ListTile( - title: Text( - TranslationBase.of(context) - .lastLoginAt, - textAlign: TextAlign.center, - ), - subtitle: Text( - user.editedOn != null - ? formatDate(DateUtil - .convertStringToDate( - user.editedOn)) - : '--', - textAlign: TextAlign.center), - )), - Expanded( - child: ListTile( - title: Text( - TranslationBase.of(context) - .lastLoginWith, - textAlign: TextAlign.center), - subtitle: Text( - getType( - user.logInType, context), - textAlign: TextAlign.center), - )) - ], - )) - ], - ) - : Column( - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Image.asset( - 'assets/images/habib-logo.png', - height: 80, - width: 80, + appBarTitle: TranslationBase.of(context).confirm, + isShowAppBar: true, + isShowDecPage: false, + body: SingleChildScrollView( + child: Container( + padding: EdgeInsets.all(20), + height: SizeConfig.realScreenHeight * .9, + width: SizeConfig.realScreenWidth, + child: Column( + children: [ + Expanded( + flex: 3, + child: user != null && isMoreOption == false + ? Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Image.asset( + 'assets/images/DQ/dq_logo_icon.png', + height: 90, + width: 90, + ), + AppText( + TranslationBase.of(context).welcomeBack + + ' ' + + user.name, + fontSize: SizeConfig.textMultiplier * 3.5, + ), + AppText( + TranslationBase.of(context).accountInfo, + fontSize: SizeConfig.textMultiplier * 2.5, + ), + Card( + color: Colors.grey[300], + child: Row( + children: [ + Expanded( + child: ListTile( + title: Text( + TranslationBase.of(context).lastLoginAt, + textAlign: TextAlign.center, + ), + subtitle: Text( + user.editedOn != null + ? formatDate( + DateUtil.convertStringToDate( + user.editedOn)) + : '--', + textAlign: TextAlign.center), + )), + Expanded( + child: ListTile( + title: Text( + TranslationBase.of(context) + .lastLoginWith, + textAlign: TextAlign.center), + subtitle: Text( + getType(user.logInType, context), + textAlign: TextAlign.center), + )) + ], + )) + ], + ) + : Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Image.asset( + 'assets/images/DQ/dq_logo_icon.png', + height: 90, + width: 90, + ), + this.onlySMSBox == false + ? AppText( + TranslationBase.of(context) + .verifyLoginWith, + fontSize: SizeConfig.textMultiplier * 3.5, + textAlign: TextAlign.left, + ) + : AppText( + TranslationBase.of(context) + .verifyFingerprint2, + fontSize: SizeConfig.textMultiplier * 2.5, + textAlign: TextAlign.start, ), - this.onlySMSBox == false - ? AppText( - TranslationBase.of(context) - .verifyLoginWith, - fontSize: - SizeConfig.textMultiplier * 3.5, - textAlign: TextAlign.left, - ) - : AppText( - TranslationBase.of(context) - .verifyFingerprint2, - fontSize: - SizeConfig.textMultiplier * 2.5, - textAlign: TextAlign.left, - ), - ])), - user != null && isMoreOption == false - ? Expanded( - flex: 2, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - Expanded( - child: InkWell( - onTap: () => { - authenticateUser( - 3, - BiometricType - .face.index) - }, - child: - getButton(user.logInType))), - Expanded(child: getButton(5)) - ]) - ])) - : Expanded( - flex: 4, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, + ])), + user != null && isMoreOption == false + ? Expanded( + flex: 2, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, children: [ - onlySMSBox == false - ? Row( - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - Expanded(child: getButton(3)), - Expanded(child: getButton(2)) - ], - ) - : SizedBox(), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded(child: getButton(1)), - Expanded(child: getButton(4)) - ], - ), - ]), - ), - Expanded( - flex: 1, - child: Column( - mainAxisAlignment: MainAxisAlignment.end, + Expanded( + child: InkWell( + onTap: () => { + authenticateUser( + 3, BiometricType.face.index) + }, + child: getButton(user.logInType))), + Expanded(child: getButton(5)) + ]) + ])) + : Expanded( + flex: 4, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - user != null + onlySMSBox == false ? Row( + mainAxisAlignment: MainAxisAlignment.center, children: [ - Expanded( - child: DefaultButton( - TranslationBase.of(context) - .useAnotherAccount, - () => { - Navigator.of(context).pushNamed( - LOGIN_TYPE, - ) - }, - )), + Expanded(child: getButton(3)), + Expanded(child: getButton(2)) ], ) : SizedBox(), - ], - )) + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded(child: getButton(1)), + Expanded(child: getButton(4)) + ], + ), + ]), + ), + Expanded( + flex: 1, + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + user != null + ? Row( + children: [ + Expanded( + child: DefaultButton( + TranslationBase.of(context).useAnotherAccount, + () => { + Navigator.of(context).pushNamed( + LOGIN_TYPE, + ) + }, + )), + ], + ) + : SizedBox(), ], - )))); + ), + ) + ], + ), + ), + ), + ); } Future _getAvailableBiometrics() async { @@ -301,6 +293,7 @@ class _ConfirmLogin extends State { showLoader(true); var req = getCommonRequest(); var request = CheckPatientAuthenticationReq.fromJson(req.toJson()); + GifLoaderDialogUtils.showMyDialog(context); sharedPref.setObject(REGISTER_DATA_FOR_REGISTER, request); authService @@ -322,19 +315,23 @@ class _ConfirmLogin extends State { }) .catchError((err) { print(err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + GifLoaderDialogUtils.hideDialog(context); + + }); } sendActivationCode(type) async { var request = this.getCommonRequest(); // loading(true); - - await this.authService.sendActivationCode(request).then((result) => { - if (result != null && result['isSMSSent'] == true) - {this.startSMSService(type)} - }); - + GifLoaderDialogUtils.showMyDialog(context); + await this.authService.sendActivationCode(request).then((result) { + GifLoaderDialogUtils.hideDialog(context); + if (result != null && result['isSMSSent'] == true) { + this.startSMSService(type); + } + }).catchError((r) { + GifLoaderDialogUtils.hideDialog(context); + }); // SMSOTP.showLoadingDialog(context, false), } @@ -410,7 +407,6 @@ class _ConfirmLogin extends State { print(err); }).showProgressBar( text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); - ; } setUser() async {} @@ -482,11 +478,10 @@ class _ConfirmLogin extends State { } checkActivationCode({value}) async { - SMSOTP.showLoadingDialog(context, true); + GifLoaderDialogUtils.showMyDialog(context); var request = this.getCommonRequest().toJson(); - this - .authService + authService .checkActivationCode(request, value) .then((result) => { if (result is Map) @@ -501,25 +496,20 @@ class _ConfirmLogin extends State { } else { - this.userData = result - .list, //AuthenticatedUser.fromJson(result['List'][0]), - this.sharedPref.setObject(USER_PROFILE, result.list), - this.loginTokenID = result.logInTokenID, - this - .sharedPref - .setObject(LOGIN_TOKEN_ID, result.logInTokenID), - this - .sharedPref - .setString(TOKEN, result.authenticationTokenID), - this.checkIfUserAgreedBefore(result), - // Navigator.of(context).pop(), - SMSOTP.showLoadingDialog(context, false), + userData = result.list, + //AuthenticatedUser.fromJson(result['List'][0]), + sharedPref.setObject(USER_PROFILE, result.list), + loginTokenID = result.logInTokenID, + sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID), + sharedPref.setString(TOKEN, result.authenticationTokenID), + checkIfUserAgreedBefore(result), + } } else { // Navigator.of(context).pop(), - SMSOTP.showLoadingDialog(context, false), + GifLoaderDialogUtils.hideDialog(context), Future.delayed(Duration(seconds: 1), () { AppToast.showErrorToast(message: result); }), @@ -527,9 +517,8 @@ class _ConfirmLogin extends State { }) .catchError((err) { print(err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); - ; + GifLoaderDialogUtils.hideDialog(context); + }); } checkIfUserAgreedBefore(CheckActivationCode result) { diff --git a/lib/pages/login/forgot-password.dart b/lib/pages/login/forgot-password.dart index bbdbb1ae..3bdf5358 100644 --- a/lib/pages/login/forgot-password.dart +++ b/lib/pages/login/forgot-password.dart @@ -1,6 +1,9 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; @@ -15,11 +18,12 @@ class ForgotPassword extends StatefulWidget { class _ForgotPassword extends State { String selectedType = 'Saudi Arabia'; final TextEditingController nationalIDorFile = null; - final TextEditingController mobileNo = null; + final TextEditingController mobileNo = TextEditingController(); + @override Widget build(BuildContext context) { return AppScaffold( - appBarTitle: TranslationBase.of(context).forgotPassword, + appBarTitle: TranslationBase.of(context).forgotFileNoTitle, isShowAppBar: true, isShowDecPage: false, body: SingleChildScrollView( @@ -32,8 +36,9 @@ class _ForgotPassword extends State { flex: 1, child: AppText( TranslationBase.of(context).forgotDesc, - fontSize: SizeConfig.textMultiplier * 3.5, - textAlign: TextAlign.left, + fontSize: SizeConfig.textMultiplier * 3, + textAlign: TextAlign.start, + marginTop: 10.0, )), Expanded( flex: 2, @@ -43,29 +48,29 @@ class _ForgotPassword extends State { Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - Expanded( - // add Expanded to have your dropdown button fill remaining space - child: DropdownButtonHideUnderline( - child: DropdownButton( - isExpanded: true, - value: selectedType, - iconSize: 40, - elevation: 16, - onChanged: (String newValue) => { - setState(() { - selectedType = newValue; - }) - }, - items: [ - 'Saudi Arabia', - 'Dubai', - ].map>( - (String value) { - return DropdownMenuItem( - value: value, - child: Text(value), - ); - }).toList()))), +// Expanded( +// // add Expanded to have your dropdown button fill remaining space +// child: DropdownButtonHideUnderline( +// child: DropdownButton( +// isExpanded: true, +// value: selectedType, +// iconSize: 40, +// elevation: 16, +// onChanged: (String newValue) => { +// setState(() { +// selectedType = newValue; +// }) +// }, +// items: [ +// 'Saudi Arabia', +// 'Dubai', +// ].map>( +// (String value) { +// return DropdownMenuItem( +// value: value, +// child: Text(value), +// ); +// }).toList()))), ], ), MobileNo(controller: mobileNo), @@ -80,12 +85,13 @@ class _ForgotPassword extends State { Row( children: [ Expanded( - child: RaisedButton( - color: Colors.grey, - textColor: Colors.white, - child: Text(TranslationBase.of(context).submit), - onPressed: () => {}, - )) + child: DefaultButton( + TranslationBase.of(context).submit, + () { + sendPatientIDBySMS(); +// print(mobileNo.text); + }, + )), ], ), ], @@ -93,4 +99,21 @@ class _ForgotPassword extends State { ]), ))); } + + sendPatientIDBySMS() { + GifLoaderDialogUtils.showMyDialog(context); + final authService = new AuthProvider(); + authService.sendPatientIDSMS(mobileNo.text, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + setState(() {}); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); + print(err); + }); + } } diff --git a/lib/pages/login/login-type.dart b/lib/pages/login/login-type.dart index 8a5087a5..edd1bf3d 100644 --- a/lib/pages/login/login-type.dart +++ b/lib/pages/login/login-type.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; @@ -6,7 +7,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/routes.dart'; class LoginType extends StatelessWidget { static int loginType = 0; @@ -28,14 +28,16 @@ class LoginType extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Image.asset( - 'assets/images/habib-logo.png', - height: 80, - width: 80, + 'assets/images/DQ/dq_logo_icon.png', + height: 90, + width: 90, ), AppText( TranslationBase.of(context).logintypeRadio, fontSize: SizeConfig.textMultiplier * 3.5, - textAlign: TextAlign.left, + textAlign: TextAlign.start, + marginBottom: 20.0, + marginTop: 20.0, ), Row( mainAxisAlignment: MainAxisAlignment.center, @@ -75,6 +77,7 @@ class LoginType extends StatelessWidget { fontSize: SizeConfig.textMultiplier * 2, + fontWeight: FontWeight.bold, ) ], ), @@ -112,6 +115,7 @@ class LoginType extends StatelessWidget { fontSize: SizeConfig.textMultiplier * 2, + fontWeight: FontWeight.bold, ) ], ), @@ -131,7 +135,7 @@ class LoginType extends StatelessWidget { child: AppText( TranslationBase.of(context).forgotPassword, fontSize: SizeConfig.textMultiplier * 2.5, - margin: 10, + marginTop: 20.0, underline: true))) ]), ), @@ -150,7 +154,7 @@ class LoginType extends StatelessWidget { REGISTER, ) }, - )) + )), ], ), ], diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index f2ece252..458924e3 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -11,6 +11,7 @@ import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doct import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; @@ -23,6 +24,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:smart_progress_bar/smart_progress_bar.dart'; + class Login extends StatefulWidget { @override _Login createState() => _Login(); @@ -41,8 +43,8 @@ class _Login extends State { AppointmentRateViewModel appointmentRateViewModel = locator(); - AuthenticatedUserObject authenticatedUserObject = locator(); - + AuthenticatedUserObject authenticatedUserObject = + locator(); @override void initState() { @@ -59,73 +61,76 @@ class _Login extends State { @override Widget build(BuildContext context) { return AppScaffold( - appBarTitle: TranslationBase.of(context).login, - isShowAppBar: true, - isShowDecPage: false, - body: SingleChildScrollView( - child: Container( - padding: - EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30), - height: SizeConfig.realScreenHeight * .9, - width: SizeConfig.realScreenWidth, - child: Column(children: [ - Expanded( - flex: 2, - child: AppText( - TranslationBase.of(context).enterNationalId, - fontSize: SizeConfig.textMultiplier * 3.5, - textAlign: TextAlign.left, - )), - Expanded( - flex: 3, - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - MobileNo( - onNumberChange: (value) => - {mobileNo = value, validateForm()}, - onCountryChange: (value) => countryCode = value), - Container( - child: TextFields( - fontWeight: FontWeight.normal, - controller: nationalIDorFile, - onChanged: (value) => {validateForm()}, - prefixIcon: Icon( - loginType == 1 - ? Icons.chrome_reader_mode - : Icons.receipt, - color: Colors.red), - padding: EdgeInsets.only( - top: 20, bottom: 20, left: 10, right: 10), - hintText: loginType == 1 - ? TranslationBase.of(context).nationalID - : TranslationBase.of(context).fileNo, - )) - ], - ), - ), - Expanded( - flex: 3, - child: Column( - mainAxisAlignment: MainAxisAlignment.end, + appBarTitle: TranslationBase.of(context).login, + isShowAppBar: true, + isShowDecPage: false, + body: SingleChildScrollView( + child: Container( + padding: EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30), + height: SizeConfig.realScreenHeight * .9, + width: SizeConfig.realScreenWidth, + child: Column( + children: [ + Expanded( + flex: 2, + child: AppText( + TranslationBase.of(context).enterNationalId, + fontSize: SizeConfig.textMultiplier * 3.5, + textAlign: TextAlign.start, + )), + Expanded( + flex: 3, + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + MobileNo( + onNumberChange: (value) => + {mobileNo = value, validateForm()}, + onCountryChange: (value) => countryCode = value), + Container( + child: TextFields( + fontWeight: FontWeight.normal, + controller: nationalIDorFile, + onChanged: (value) => {validateForm()}, + prefixIcon: Icon( + loginType == 1 + ? Icons.chrome_reader_mode + : Icons.receipt, + color: Color(0xFF40ACC9)), + padding: EdgeInsets.only( + top: 20, bottom: 20, left: 10, right: 10), + hintText: loginType == 1 + ? TranslationBase.of(context).nationalID + : TranslationBase.of(context).fileNo, + )) + ], + ), + ), + Expanded( + flex: 3, + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Row( children: [ - Row( - children: [ - Expanded( - child: DefaultButton( - TranslationBase.of(context).login, - () => {this.startLogin()}, - color: isButtonDisabled == true - ? Colors.grey - : Colors.grey[900], - textColor: Colors.white, - )) - ], - ), + Expanded( + child: DefaultButton( + TranslationBase.of(context).login, + () => {this.startLogin()}, + color: isButtonDisabled == true + ? Colors.grey + : Colors.grey[900], + textColor: Colors.white, + )) ], - )) - ]), - ))); + ), + ], + )) + ], + ), + ), + ), + ); } startLogin() { @@ -136,8 +141,10 @@ class _Login extends State { void validateForm() { //TODO fix login - if (util.validateIDBox(nationalIDorFile.text, loginType) == true && - mobileNo.length >= 9 && + if (util.validateIDBox(nationalIDorFile.text, loginType) == + true /*&& + mobileNo.length >= 9 */ + && util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true) { setState(() { isButtonDisabled = false; @@ -150,7 +157,7 @@ class _Login extends State { } checkUserAuthentication() { - // showLoader(true); + // showLoader(true); var request = CheckPatientAuthenticationReq(); request.isRegister = false; request.patientMobileNumber = int.parse(mobileNo); @@ -165,22 +172,27 @@ class _Login extends State { request.patientID = int.parse(nationalIDorFile.text); } sharedPref.setObject(REGISTER_DATA_FOR_REGISTER, request); - authService.checkPatientAuthentication(request).then((value) => { - //showLoader(false), - if (value['isSMSSent']) - { - sharedPref.setString(LOGIN_TOKEN_ID, value['LogInTokenID']), - sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, request), - Navigator.of(context).pushNamed(CONFIRM_LOGIN) - } - else - { - if (value['IsAuthenticated']) {this.checkActivationCode()} - } - }).catchError((err) { + GifLoaderDialogUtils.showMyDialog(context); + authService + .checkPatientAuthentication(request) + .then((value) => { + //showLoader(false), + if (value['isSMSSent']) + { + sharedPref.setString(LOGIN_TOKEN_ID, value['LogInTokenID']), + sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, request), + GifLoaderDialogUtils.hideDialog(context), + Navigator.of(context).pushNamed(CONFIRM_LOGIN) + } + else + { + if (value['IsAuthenticated']) {this.checkActivationCode()} + } + }) + .catchError((err) { print(err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)); + GifLoaderDialogUtils.hideDialog(context); + }); // SMSOTP.showLoadingDialog(context, false), } @@ -191,7 +203,7 @@ class _Login extends State { // request.isSilentLogin = code != null ? false : true; if (code == null) //showLoader(true); - request['PatientMobileNumber'] = int.parse(mobileNo); + request['PatientMobileNumber'] = int.parse(mobileNo); request['ZipCode'] = countryCode; request['SearchType'] = loginType; request['LoginType'] = loginType; @@ -205,47 +217,45 @@ class _Login extends State { // request.isRegister = false; this.authService.checkActivationCode(request, code).then((result) => { result = CheckActivationCode.fromJson(result), - authenticatedUserObject.getUser(), + authenticatedUserObject.getUser(), this.sharedPref.setObject(USER_PROFILE, result.list), this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID), this.sharedPref.setString(TOKEN, result.authenticationTokenID), - //this.checkIfUserAgreedBefore(result), - Navigator.of(context).pushNamed( - HOME, - ), - //showLoader(false), + appointmentRateViewModel .getIsLastAppointmentRatedList() .then((value) => { + GifLoaderDialogUtils.hideDialog(context), if (appointmentRateViewModel.isHaveAppointmentNotRate) { - Navigator.pushReplacement( - context, - FadePage( - page: RateAppointmentDoctor(), - ), - ) + Navigator.pushAndRemoveUntil( + context, + FadePage( + page: RateAppointmentDoctor(), + ), + (r) => false) } else { - Navigator.pushReplacement( - context, - FadePage( - page: LandingPage(), - ), - ) + Navigator.pushAndRemoveUntil( + context, + FadePage( + page: LandingPage(), + ), + (r) => false) } - }).catchError((err) { - print(err); - }).showProgressBar( - text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6)) + }) + .catchError((err) { + print(err); + GifLoaderDialogUtils.hideDialog(context); + }), // SMSOTP.showLoadingDialog(context, false), }); } - // showLoader(bool isTrue) { - // setState(() { - // isLoading = isTrue; - // }); - // } +// showLoader(bool isTrue) { +// setState(() { +// isLoading = isTrue; +// }); +// } } diff --git a/lib/pages/login/register-info.dart b/lib/pages/login/register-info.dart index 2bbd1007..a3240665 100644 --- a/lib/pages/login/register-info.dart +++ b/lib/pages/login/register-info.dart @@ -6,14 +6,10 @@ import 'package:diplomaticquarterapp/models/Authentication/register_user_requet. import 'package:diplomaticquarterapp/pages/login/login-type.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; -import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; -import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; @@ -40,12 +36,15 @@ class _RegisterInfo extends State { new Language(name: 'English', value: '2'), new Language(name: 'Arabic', value: '1'), ]; - var email =''; + var email = ''; var location; + @override void initState() { - getRegisterInfo(); + WidgetsBinding.instance.addPostFrameCallback((timeStamp) { + getRegisterInfo(); + }); super.initState(); } @@ -243,7 +242,6 @@ class _RegisterInfo extends State { getRegisterInfo() async { var data = RegisterInfoResponse.fromJson(await sharedPref.getObject(NHIC_DATA)); - if (await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN) != null) { var data2 = CheckPatientAuthenticationReq.fromJson( await sharedPref.getObject(REGISTER_DATA_FOR_LOGIIN)); @@ -253,7 +251,7 @@ class _RegisterInfo extends State { this.registerd_data = data2; }); - } + } } getTempUserRequest() { diff --git a/lib/pages/login/register.dart b/lib/pages/login/register.dart index 3ee13a4c..03e7e1ca 100644 --- a/lib/pages/login/register.dart +++ b/lib/pages/login/register.dart @@ -76,7 +76,7 @@ class _Register extends State { controller: nationalIDorFile, onChanged: (value) => validateForm(), prefixIcon: - Icon(Icons.chrome_reader_mode, color: Colors.red), + Icon(Icons.chrome_reader_mode, color: Color(0xFF40ACC9)), padding: EdgeInsets.only( top: 20, bottom: 20, left: 10, right: 10), hintText: TranslationBase.of(context).nationalID, diff --git a/lib/pages/login/welcome.dart b/lib/pages/login/welcome.dart index be406a55..419df302 100644 --- a/lib/pages/login/welcome.dart +++ b/lib/pages/login/welcome.dart @@ -1,15 +1,10 @@ -import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; -import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; -import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; +import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/routes.dart'; class WelcomeLogin extends StatefulWidget { @override @@ -18,6 +13,7 @@ class WelcomeLogin extends StatefulWidget { class _WelcomeLogin extends State { bool isLoading = true; + @override void initState() { isLoading = true; @@ -40,25 +36,23 @@ class _WelcomeLogin extends State { mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Image.asset( - 'assets/images/habib-logo.png', - height: 80, - width: 80, - ), + Image.asset('assets/images/DQ/dq_logo_icon.png', + height: 90, width: 90), Text( TranslationBase.of(context).welcome, - style: TextStyle(fontSize: 30), - textAlign: TextAlign.left, + style: TextStyle( + fontSize: 30, fontWeight: FontWeight.bold), + textAlign: TextAlign.start, ), Text( TranslationBase.of(context).welcomeText, style: TextStyle(fontSize: 24), - textAlign: TextAlign.left, + textAlign: TextAlign.start, ), Text( TranslationBase.of(context).welcomeText2, style: TextStyle(fontSize: 24), - textAlign: TextAlign.left, + textAlign: TextAlign.start, ), SizedBox( height: SizeConfig.realScreenHeight * .15, @@ -81,7 +75,7 @@ class _WelcomeLogin extends State { LOGIN_TYPE, ), }, - color: Colors.red[900], + color: Color(0xFF40ACC9), textColor: Colors.white, )) ], diff --git a/lib/pages/medical/balance/dialogs/SelectBeneficiaryDialog.dart b/lib/pages/medical/balance/dialogs/SelectBeneficiaryDialog.dart index 17bee4b0..b004bc38 100644 --- a/lib/pages/medical/balance/dialogs/SelectBeneficiaryDialog.dart +++ b/lib/pages/medical/balance/dialogs/SelectBeneficiaryDialog.dart @@ -45,7 +45,7 @@ class _SelectBeneficiaryDialogState extends State { leading: Radio( value: BeneficiaryType.MyAccount, groupValue: beneficiaryType, - activeColor: Colors.red[800], + activeColor: Color(0xFF40ACC9), onChanged: (BeneficiaryType value) { setState(() { beneficiaryType = value; @@ -75,7 +75,7 @@ class _SelectBeneficiaryDialogState extends State { leading: Radio( value: BeneficiaryType.MyFamilyFiles, groupValue: beneficiaryType, - activeColor: Colors.red[800], + activeColor: Color(0xFF40ACC9), onChanged: (BeneficiaryType value) { setState(() { beneficiaryType = value; @@ -105,7 +105,7 @@ class _SelectBeneficiaryDialogState extends State { leading: Radio( value: BeneficiaryType.OtherAccount, groupValue: beneficiaryType, - activeColor: Colors.red[800], + activeColor: Color(0xFF40ACC9), onChanged: (BeneficiaryType value) { setState(() { beneficiaryType = value; diff --git a/lib/pages/medical/balance/dialogs/SelectHospitalDialog.dart b/lib/pages/medical/balance/dialogs/SelectHospitalDialog.dart index 9a4a359d..42bd66b7 100644 --- a/lib/pages/medical/balance/dialogs/SelectHospitalDialog.dart +++ b/lib/pages/medical/balance/dialogs/SelectHospitalDialog.dart @@ -54,7 +54,7 @@ class _SelectHospitalDialogState extends State { leading: Radio( value: widget.hospitals[index], groupValue: widget.selectedHospital, - activeColor: Colors.red[800], + activeColor: Color(0xFF40ACC9), onChanged: (value) { setState(() { widget.selectedHospital = value; diff --git a/lib/pages/medical/labs/labs_home_page.dart b/lib/pages/medical/labs/labs_home_page.dart index 995365d9..68dc180e 100644 --- a/lib/pages/medical/labs/labs_home_page.dart +++ b/lib/pages/medical/labs/labs_home_page.dart @@ -84,7 +84,7 @@ class LabsHomePage extends StatelessWidget { patientLabOrders: labOrder, ), ), - ), + ),isInOutPatient: labOrder.isInOutPatient, name: labOrder.doctorName, profileUrl: labOrder.doctorImageURL, subName: TranslationBase.of(context).billNo+' ${labOrder.invoiceNo}', diff --git a/lib/pages/medical/medical_profile_page.dart b/lib/pages/medical/medical_profile_page.dart index 61f22aca..5a41a18a 100644 --- a/lib/pages/medical/medical_profile_page.dart +++ b/lib/pages/medical/medical_profile_page.dart @@ -1,41 +1,29 @@ -import 'dart:math'; - -import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; +import 'package:badges/badges.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart'; +import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart'; import 'package:diplomaticquarterapp/pages/medical/patient_sick_leave_page.dart'; -import 'package:diplomaticquarterapp/pages/medical/reports/monthly_reports.dart'; -import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart'; -import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_home_page.dart'; -import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart'; import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/time_line_widget.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/others/sliver_app_bar_delegate.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart'; import 'package:provider/provider.dart'; -import '../../locator.dart'; -import 'active_medications/ActiveMedicationsPage.dart'; + import 'allergies_page.dart'; -import 'ask_doctor/ask_doctor_home_page.dart'; -import 'balance/my_balance_page.dart'; import 'doctor/doctor_home_page.dart'; -import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; -import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart'; -import 'eye/EyeHomePage.dart'; -import 'eye/EyeMeasurementsPage.dart'; import 'labs/labs_home_page.dart'; -import 'my_trackers/my_trackers.dart'; class MedicalProfilePage extends StatefulWidget { @override @@ -43,9 +31,12 @@ class MedicalProfilePage extends StatefulWidget { } class _MedicalProfilePageState extends State { + var authProvider = new AuthProvider(); + @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); + var appoCountProvider = Provider.of(context); return BaseView( onModelReady: (model) => model.getAppointmentHistory(), builder: (_, model, widget) => AppScaffold( @@ -62,31 +53,27 @@ class _MedicalProfilePageState extends State { Container( width: double.infinity, height: 210, - decoration: BoxDecoration( - image: DecorationImage( - image: ExactAssetImage( - 'assets/images/timeline_bg.png'), - fit: BoxFit.cover), - ), child: Stack( children: [ Image.asset( 'assets/images/timeline_bg.png', fit: BoxFit.cover, width: double.infinity, + // color: Colors.black.withOpacity(0.0) ), - if(model.authenticatedUserObject.isLogin) - ListView.builder( - itemBuilder: (context, index) => TimeLineWidget( - isUp: index % 2 == 1, - appoitmentAllHistoryResul: model - .appoitmentAllHistoryResultList[index], + if (model.authenticatedUserObject.isLogin) + ListView.builder( + itemBuilder: (context, index) => + TimeLineWidget( + isUp: index % 2 == 1, + appoitmentAllHistoryResul: model + .appoitmentAllHistoryResultList[index], + ), + itemCount: model + .appoitmentAllHistoryResultList.length, + scrollDirection: Axis.horizontal, + reverse: !projectViewModel.isArabic, ), - itemCount: - model.appoitmentAllHistoryResultList.length, - scrollDirection: Axis.horizontal, - reverse: !projectViewModel.isArabic, - ), ], ), ), @@ -96,7 +83,7 @@ class _MedicalProfilePageState extends State { children: [ Container( width: double.infinity, - height: 30, + height: 55, ), Row( children: [ @@ -111,13 +98,53 @@ class _MedicalProfilePageState extends State { ), ); }, - child: MedicalProfileItem( - title: TranslationBase.of(context) - .myAppointments, - imagePath: 'my_appointment_icon.png', - subTitle: TranslationBase.of(context) - .myAppointmentsList, - ), + child: authProvider.isLogin + ? Stack(children: [ + MedicalProfileItem( + title: + TranslationBase.of(context) + .myAppointments, + imagePath: + 'my_appointment_icon.png', + subTitle: + TranslationBase.of(context) + .myAppointmentsList, + hasBadge: true, + ), + Positioned( + right: 0.0, + child: Badge( + toAnimate: false, + position: + BadgePosition.topEnd(), + shape: BadgeShape.circle, + badgeColor: Color(0xFF40ACC9) + .withOpacity(1.0), + borderRadius: + BorderRadius.circular(8), + badgeContent: Container( + padding: + EdgeInsets.all(2.0), + child: Text( + appoCountProvider.count + .toString(), + style: TextStyle( + color: Colors.white, + fontSize: 16.0)), + ), + ), + ), + ]) + : MedicalProfileItem( + title: TranslationBase.of(context) + .myAppointments, + imagePath: + 'my_appointment_icon.png', + subTitle: + TranslationBase.of(context) + .myAppointmentsList, + hasBadge: true, + ), ), ), Expanded( @@ -158,48 +185,52 @@ class _MedicalProfilePageState extends State { Navigator.push( context, FadePage( - page: HomePrescriptionsPage(), + page: DoctorHomePage(), ), ); }, child: MedicalProfileItem( title: TranslationBase.of(context) - .medicines, - imagePath: 'prescription_icon.png', + .myDoctor, + imagePath: 'doctor_icon.png', subTitle: TranslationBase.of(context) - .medicinesSubtitle, + .myDoctorSubtitle, ), ), ), Expanded( flex: 1, child: InkWell( - onTap: () => Navigator.push( - context, - FadePage( - page: VitalSignDetailsScreen(), - ), - ), + onTap: () { + Navigator.push( + context, + FadePage( + page: HomePrescriptionsPage(), + ), + ); + }, child: MedicalProfileItem( title: TranslationBase.of(context) - .vitalSigns, - imagePath: 'vital_signs.png', + .medicines, + imagePath: 'prescription_icon.png', subTitle: TranslationBase.of(context) - .vitalSignsSubtitle, + .medicinesSubtitle, ), ), ), Expanded( flex: 1, child: InkWell( - onTap: () => Navigator.push(context, - FadePage(page: ActiveMedicationsPage())), + onTap: () { + Navigator.push(context, + FadePage(page: InsuranceCard())); + }, child: MedicalProfileItem( title: TranslationBase.of(context) - .myMedical, - imagePath: 'active_medications.png', + .insurance, + imagePath: 'insurance_card_icon.png', subTitle: TranslationBase.of(context) - .myMedicalSubtitle, + .insuranceSubtitle, ), ), ), @@ -210,20 +241,14 @@ class _MedicalProfilePageState extends State { Expanded( flex: 1, child: InkWell( - onTap: () { - Navigator.push( - context, - FadePage( - page: DoctorHomePage(), - ), - ); - }, + onTap: () => Navigator.push(context, + FadePage(page: AllergiesPage())), child: MedicalProfileItem( title: TranslationBase.of(context) - .myDoctor, - imagePath: 'doctor_icon.png', + .allergies, + imagePath: 'my_allergies_icon.png', subTitle: TranslationBase.of(context) - .myDoctorSubtitle, + .allergiesSubtitle, ), ), ), @@ -234,13 +259,13 @@ class _MedicalProfilePageState extends State { Navigator.push( context, FadePage( - page: EyeMeasurementsPage())); + page: PatientSickLeavePage())); }, child: MedicalProfileItem( - title: TranslationBase.of(context).eye, - imagePath: 'eye_measurement_icon.png', + title: TranslationBase.of(context).sick, + imagePath: 'sick_leaves_icons.png', subTitle: TranslationBase.of(context) - .eyeSubtitle, + .sickSubtitle, ), ), ), @@ -248,83 +273,24 @@ class _MedicalProfilePageState extends State { flex: 1, child: InkWell( onTap: () { - Navigator.push(context, - FadePage(page: InsuranceCard())); + Navigator.push( + context, + FadePage( + page: InsuranceApproval())); }, child: MedicalProfileItem( title: TranslationBase.of(context) - .insurance, - imagePath: 'insurance_card_icon.png', + .insuranceApproval, + imagePath: + 'insurance_approvals_icon.png', subTitle: TranslationBase.of(context) - .insuranceSubtitle, + .insuranceApprovalSubtitle, ), ), ), ], ), Row(children: [ - Expanded( - flex: 1, - child: InkWell( - onTap: () { - Navigator.push(context, - FadePage(page: InsuranceUpdate())); - }, - child: MedicalProfileItem( - title: TranslationBase.of(context) - .updateInsurance, - imagePath: 'insurance_update_icon_.png', - subTitle: TranslationBase.of(context) - .updateInsuranceSubtitle, - ), - ), - ), - Expanded( - flex: 1, - child: InkWell( - onTap: () { - Navigator.push(context, - FadePage(page: InsuranceApproval())); - }, - child: MedicalProfileItem( - title: TranslationBase.of(context) - .insuranceApproval, - imagePath: 'insurance_approvals_icon.png', - subTitle: TranslationBase.of(context) - .insuranceApprovalSubtitle, - ), - ), - ), - Expanded( - flex: 1, - child: InkWell( - onTap:()=> Navigator.push(context, FadePage(page: AllergiesPage())) , - child: MedicalProfileItem( - title: TranslationBase.of(context).allergies, - imagePath: 'my_allergies_icon.png', - subTitle: TranslationBase.of(context) - .allergiesSubtitle, - ), - ), - ), - ]), - Row(children: [ - Expanded( - flex: 1, - child: InkWell( - onTap: () { - Navigator.push(context, - FadePage(page: MyVaccines())); - }, - child: MedicalProfileItem( - title: TranslationBase.of(context) - .myVaccines, - imagePath: 'my_vaccines_icon.png', - subTitle: TranslationBase.of(context) - .myVaccinesSubtitle, - ), - ), - ), Expanded( flex: 1, child: InkWell( @@ -342,156 +308,16 @@ class _MedicalProfilePageState extends State { ), ), Expanded( - flex: 1, - child: InkWell( - onTap: () { - Navigator.push(context, - FadePage(page: MonthlyReportsPage())); - }, - child: MedicalProfileItem( - title: - TranslationBase.of(context).monthly, - imagePath: 'monthly_reports_icon.png', - subTitle: TranslationBase.of(context) - .monthlySubtitle, - ), - ), - ), - ]), - Row(children: [ - Expanded( - flex: 1, - child: InkWell( - onTap: () { - Navigator.push( - context, - FadePage( - page: PatientSickLeavePage())); - }, - child: MedicalProfileItem( - title: TranslationBase.of(context).sick, - imagePath: 'sick_leaves_icons.png', - subTitle: TranslationBase.of(context) - .sickSubtitle, - ), - ), - ), - Expanded( - flex: 1, - child: InkWell( - onTap: () { - Navigator.push(context, - FadePage(page: MyBalancePage())); - }, - child: MedicalProfileItem( - title: - TranslationBase.of(context).myBalance, - imagePath: 'check-in.png', - subTitle: TranslationBase.of(context) - .myBalanceSubtitle, - ), - ), - ), - Expanded( - flex: 1, - child: MedicalProfileItem( - title: - TranslationBase.of(context).patientCall, - imagePath: 'medical_history_icon.png', - subTitle: TranslationBase.of(context) - .patientCallSubtitle, - ), - ), - ]), - Row(children: [ - Expanded( - flex: 1, - child: InkWell( - //TODO - onTap: () { - Navigator.push( - context, FadePage(page: SmartWatchInstructions())); - }, - child: MedicalProfileItem( - title: TranslationBase.of(context) - .smartWatches, - imagePath: 'smartwatch_icon.png', - subTitle: TranslationBase.of(context) - .smartWatchesSubtitle, - ), - ), - ), - Expanded( - flex: 1, - child: InkWell( - onTap: () { - Navigator.push(context, - FadePage(page: MyTrackers())); - }, - child: MedicalProfileItem( - title: TranslationBase.of(context) - .myTrackers, - imagePath: 'my_tracker_icon.png', - subTitle: TranslationBase.of(context) - .myTrackersSubtitle, - ), - ), - ), - Expanded( - flex: 1, - child: InkWell( - onTap: (){ - Navigator.push(context, - FadePage(page: AskDoctorHomPage())); - }, - child: MedicalProfileItem( - title: TranslationBase.of(context).askYour, - imagePath: 'ask_doctor_icon.png', - subTitle: TranslationBase.of(context) - .askYourSubtitle, - ), - ), - ), - ]), - Row(children: [ - Expanded( - flex: 1, - child: InkWell( - //TODO -// onTap: () { -// Navigator.push( -// context, FadePage(page: DoctorHomePage())); -// }, - child: MedicalProfileItem( - title: - TranslationBase.of(context).internet, - imagePath: 'insurance_card_icon.png', - subTitle: TranslationBase.of(context) - .internetSubtitle, - ), - ), - ), - Expanded( - flex: 1, - child: InkWell( -// onTap: () { -// Navigator.push( -// context, FadePage(page: InsuranceApproval())); -// }, - child: MedicalProfileItem( - title: - TranslationBase.of(context).chatbot, - imagePath: 'insurance_approvals_icon.png', - subTitle: TranslationBase.of(context) - .chatbotSubtitle, - ), - ), + child: Container(), ), Expanded( - flex: 1, child: Container(), ), ]), + SizedBox( + height: + MediaQuery.of(context).size.height * 0.12, + ) ], ), ) @@ -499,14 +325,14 @@ class _MedicalProfilePageState extends State { ), if (model.user != null) Positioned( - top: 175, + top: 185, left: 20, right: 20, child: Container( width: double.infinity, - height: 70, + height: 80, decoration: BoxDecoration( - color: Colors.grey[600], + color: Theme.of(context).primaryColor, shape: BoxShape.rectangle, border: Border.all( color: Colors.transparent, width: 0.5), @@ -518,6 +344,7 @@ class _MedicalProfilePageState extends State { fit: BoxFit.cover)), child: Column( crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ SizedBox( height: 8, @@ -527,9 +354,7 @@ class _MedicalProfilePageState extends State { " " + model.user.lastName, color: Colors.white, - ), - SizedBox( - height: 8, + bold: true, ), Texts( '${model.user.patientID}', diff --git a/lib/pages/medical/patient_sick_leave_page.dart b/lib/pages/medical/patient_sick_leave_page.dart index dab3d6cf..d12573f0 100644 --- a/lib/pages/medical/patient_sick_leave_page.dart +++ b/lib/pages/medical/patient_sick_leave_page.dart @@ -31,8 +31,8 @@ class _PatientSickLeavePageState extends State { profileUrl: model.sickLeaveList[index].doctorImageURL, rat: model.sickLeaveList[index].actualDoctorRate.toDouble(), subName: model.sickLeaveList[index].projectName, - isInOutPatientDescription: - model.sickLeaveList[index].isInOutPatientDescription, + isInOutPatient: + model.sickLeaveList[index].isInOutPatient, onEmailTap: () { model.sendSickLeaveEmail( message: TranslationBase.of(context).emailSentSuccessfully, diff --git a/lib/pages/medical/prescriptions/prescription_details_page.dart b/lib/pages/medical/prescriptions/prescription_details_page.dart index 72c82c55..43dc398b 100644 --- a/lib/pages/medical/prescriptions/prescription_details_page.dart +++ b/lib/pages/medical/prescriptions/prescription_details_page.dart @@ -46,9 +46,13 @@ class PrescriptionDetailsPage extends StatelessWidget { child: Padding( padding: const EdgeInsets.all(8.0), child: Center( - child: Texts(prescriptionReport.itemDescription)), + child: Texts( + prescriptionReport.itemDescription.isNotEmpty + ? prescriptionReport.itemDescription + : prescriptionReport.itemDescriptionN), + ), ), - ), + ) ], ), ), @@ -169,7 +173,7 @@ class PrescriptionDetailsPage extends StatelessWidget { SizedBox( height: 5, ), - Texts(' '), + Texts(prescriptionReport.remarks), ], ), ), diff --git a/lib/pages/medical/prescriptions/prescription_items_page.dart b/lib/pages/medical/prescriptions/prescription_items_page.dart index c84be7bd..297d8333 100644 --- a/lib/pages/medical/prescriptions/prescription_items_page.dart +++ b/lib/pages/medical/prescriptions/prescription_items_page.dart @@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_page.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -19,10 +20,10 @@ class PrescriptionItemsPage extends StatelessWidget { Widget build(BuildContext context) { return BaseView( onModelReady: (model) => - model.getPrescriptionReport(dischargeNo: prescriptions.dischargeNo), + model.getPrescriptionReport(dischargeNo: prescriptions.dischargeNo,setupID:prescriptions.setupID,clinicID: prescriptions.clinicID,projectId: prescriptions.projectID), builder: (_, model, widget) => AppScaffold( isShowAppBar: true, - appBarTitle: 'Items', + appBarTitle: TranslationBase.of(context).prescriptions, baseViewModel: model, body: Container( height: MediaQuery.of(context).size.height * 0.8, @@ -62,8 +63,9 @@ class PrescriptionItemsPage extends StatelessWidget { child: Padding( padding: const EdgeInsets.all(8.0), child: Center( - child: Texts(model - .prescriptionReportList[index].itemDescription)), + child: Texts(model.prescriptionReportList[index].itemDescription.isNotEmpty? + model.prescriptionReportList[index].itemDescription :model + .prescriptionReportList[index].itemDescriptionN)), )), Icon( Icons.arrow_forward_ios, diff --git a/lib/pages/medical/prescriptions/prescriptions_page.dart b/lib/pages/medical/prescriptions/prescriptions_page.dart index e6e90d9e..6b852db9 100644 --- a/lib/pages/medical/prescriptions/prescriptions_page.dart +++ b/lib/pages/medical/prescriptions/prescriptions_page.dart @@ -86,8 +86,9 @@ class PrescriptionsPage extends StatelessWidget { child: DoctorCard( name: prescriptions.doctorName, profileUrl: prescriptions.doctorImageURL, - rat: prescriptions.doctorRate.toDouble(), + rat: prescriptions.actualDoctorRate.toDouble(), subName: prescriptions.name, + isInOutPatient: prescriptions.isInOutPatient, date: DateUtil.getMonthDayYearDateFormatted( prescriptions.dischargeDate), ), diff --git a/lib/pages/pharmacies/medicine_search_screen.dart b/lib/pages/pharmacies/medicine_search_screen.dart index 644134b2..7d8509ee 100644 --- a/lib/pages/pharmacies/medicine_search_screen.dart +++ b/lib/pages/pharmacies/medicine_search_screen.dart @@ -25,6 +25,7 @@ class MedicineSearch extends StatelessWidget { AppScaffold( baseViewModel: model, appBarTitle: TranslationBase.of(context).searchMedicine, + isShowAppBar: true, body: Container( height: SizeConfig.screenHeight, child: Column( diff --git a/lib/pages/rateAppointment/rate_appointment_doctor.dart b/lib/pages/rateAppointment/rate_appointment_doctor.dart index 83674906..7a128b10 100644 --- a/lib/pages/rateAppointment/rate_appointment_doctor.dart +++ b/lib/pages/rateAppointment/rate_appointment_doctor.dart @@ -100,7 +100,7 @@ class _RateAppointmentDoctorState extends State { height: 4, ), Texts( - model.appointmentDetails.clinicName, + model.appointmentDetails.clinicName != null ? model.appointmentDetails.clinicName : "", bold: true, ), SizedBox( diff --git a/lib/routes.dart b/lib/routes.dart index ada7c54c..8a0619e6 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -13,9 +13,11 @@ import 'package:diplomaticquarterapp/pages/family/add-family-member.dart'; import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart'; import 'package:diplomaticquarterapp/pages/symptom-checker/select-gender.dart'; import 'package:diplomaticquarterapp/pages/symptom-checker/symtom-checker.dart'; +import 'package:diplomaticquarterapp/splashPage.dart'; const String INIT_ROUTE = '/'; -const String HOME = '/'; +const String HOME = 'home'; +const String SPLASH = '/'; const String LOGIN = 'login'; const String WELCOME_LOGIN = 'welcome-login'; const String LOGIN_TYPE = 'login-type'; @@ -32,6 +34,7 @@ const String SYMPTOM_CHECKER = 'symptom-checker'; const String SYMPTOM_CHECKER_INFO = 'symptom-checker-info'; const String SELECT_GENDER = 'select-gender'; var routes = { + SPLASH: (_) => SplashScreen(), HOME: (_) => LandingPage(), WELCOME_LOGIN: (_) => WelcomeLogin(), LOGIN_TYPE: (_) => LoginType(), diff --git a/lib/services/authentication/auth_provider.dart b/lib/services/authentication/auth_provider.dart index 28b5e73b..2142bc53 100644 --- a/lib/services/authentication/auth_provider.dart +++ b/lib/services/authentication/auth_provider.dart @@ -1,17 +1,18 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; -import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_request.dart'; +import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; +import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_request.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_user_status_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/checkpatient_for_registration.dart'; import 'package:diplomaticquarterapp/models/Authentication/insert_device_imei_request.dart'; import 'package:diplomaticquarterapp/models/Authentication/register_user_requet.dart'; -import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; import 'package:diplomaticquarterapp/models/Authentication/registered_authenticated_user_req.dart'; -import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; +import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; +import 'package:diplomaticquarterapp/models/Request.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:flutter/cupertino.dart'; @@ -19,7 +20,9 @@ import '../../locator.dart'; // SharedPreferences sharedPref = new SharedPreferences(); enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED } + AppSharedPreferences sharedPref = new AppSharedPreferences(); +AppGlobal appGlobal = new AppGlobal(); const String INSERT_DEVICE_IMEI = 'Services/Patients.svc/REST/Patient_INSERTDeviceIMEI'; @@ -40,11 +43,15 @@ const REGISTER_USER = 'Services/Authentication.svc/REST/PatientRegistration'; const LOGGED_IN_USER_URL = 'Services/MobileNotifications.svc/REST/Insert_PatientMobileDeviceInfo'; +const FORGOT_PATIENT_ID = + 'Services/Authentication.svc/REST/SendPatientIDSMSByMobileNumber'; + class AuthProvider with ChangeNotifier { bool isLogin = false; bool isLoading = true; dynamic authenticatedUser; - AuthenticatedUserObject authenticatedUserObject = locator(); + AuthenticatedUserObject authenticatedUserObject = + locator(); AuthProvider() { getUserAuthentication(); @@ -355,4 +362,36 @@ class AuthProvider with ChangeNotifier { throw error; } } + + Future sendPatientIDSMS(mobileNo, context) async { + Map request; + var languageID = await sharedPref.getString(APP_LANGUAGE); + Request req = appGlobal.getPublicRequest(); + request = { + "LanguageID": languageID == 'ar' ? 1 : 2, + "IPAdress": "10.20.10.20", + "VersionID": req.VersionID, + "Channel": req.Channel, + "generalid": 'Cs2020@2016\$2958', + "PatientOutSA": 0, + "PatientID": 0, + "TokenID": "", + "PatientMobileNumber": mobileNo, + "SearchType": 2, + "ZipCode": "966", + "PatientIdentificationID": "", + "DeviceTypeID": req.DeviceTypeID, + "SessionID": null + }; + + dynamic localRes; + + await new BaseAppClient().post(FORGOT_PATIENT_ID, + onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } } diff --git a/lib/services/clinic_services/get_clinic_service.dart b/lib/services/clinic_services/get_clinic_service.dart index 61c5ad59..a508b08b 100644 --- a/lib/services/clinic_services/get_clinic_service.dart +++ b/lib/services/clinic_services/get_clinic_service.dart @@ -44,6 +44,34 @@ class ClinicListService extends BaseService { return Future.value(localRes); } + Future getActiveAppointmentNo(context) async { + Map request; + var languageID = await sharedPref.getString(APP_LANGUAGE); + Request req = appGlobal.getPublicRequest(); + request = { + "LanguageID": languageID == 'ar' ? 1 : 2, + "IPAdress": "10.20.10.20", + "VersionID": req.VersionID, + "Channel": req.Channel, + "generalid": 'Cs2020@2016\$2958', + "PatientOutSA": 0, + "TokenID": "", + "IsActiveAppointment": true, + "DeviceTypeID": req.DeviceTypeID, + "SessionID": null + }; + + dynamic localRes; + + await baseAppClient.post(GET_ACTIVE_APPOINTMENTS_LIST_URL, + onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + Future getProjectsList(context) async { Map request; var languageID = await sharedPref.getString(APP_LANGUAGE); diff --git a/lib/services/family_files/family_files_provider.dart b/lib/services/family_files/family_files_provider.dart index f5a06df9..b80ce22e 100644 --- a/lib/services/family_files/family_files_provider.dart +++ b/lib/services/family_files/family_files_provider.dart @@ -172,7 +172,7 @@ class FamilyFilesProvider with ChangeNotifier { throw error; } } - + //TODO Future checkActivationCode( loginTokenID, activationCode, indentification, mobileNo) async { try { diff --git a/lib/splashPage.dart b/lib/splashPage.dart new file mode 100644 index 00000000..ceec604c --- /dev/null +++ b/lib/splashPage.dart @@ -0,0 +1,36 @@ +import 'dart:async'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:flutter/material.dart'; + +class SplashScreen extends StatefulWidget { + @override + _SplashScreenState createState() => _SplashScreenState(); +} + +class _SplashScreenState extends State { + @override + void initState() { + super.initState(); + Timer( + Duration(seconds: 3), + () => Navigator.of(context).pushReplacement( + MaterialPageRoute( + builder: (BuildContext context) => LandingPage(), + ), + ), + ); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.white, + body: Center( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset('assets/images/DQ/DQ_logo.png'), + ), + ), + ); + } +} diff --git a/lib/uitl/gif_loader_dialog_utils.dart b/lib/uitl/gif_loader_dialog_utils.dart new file mode 100644 index 00000000..ac37cdfb --- /dev/null +++ b/lib/uitl/gif_loader_dialog_utils.dart @@ -0,0 +1,13 @@ +import 'package:flutter/material.dart'; + +import '../widgets/Loader/gif_loader_container.dart'; + +class GifLoaderDialogUtils { + static showMyDialog(BuildContext context) { + showDialog(context: context, child: GifLoaderContainer()); + } + + static hideDialog(BuildContext context) { + Navigator.of(context).pop(); + } +} diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 1b9f6e22..d763ed04 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -122,6 +122,8 @@ class TranslationBase { String get loginregister => localizedValues['loginregister'][locale.languageCode]; + String get poweredBy => localizedValues['poweredBy'][locale.languageCode]; + String get welcome => localizedValues['welcome'][locale.languageCode]; String get welcomeText => @@ -148,6 +150,9 @@ class TranslationBase { String get forgotPassword => localizedValues['forgotFileNo'][locale.languageCode]; + String get forgotFileNoTitle => + localizedValues['forgotFileNoTitle'][locale.languageCode]; + String get enterNationalId => localizedValues['enter-national-id'][locale.languageCode]; @@ -369,6 +374,7 @@ class TranslationBase { String get myFamilyFiles => localizedValues['family-title'][locale.languageCode]; + String get myFamily => localizedValues['myFamily'][locale.languageCode]; String get oxygenation => localizedValues['oxygenation'][locale.languageCode]; String get respirationRate => @@ -723,6 +729,13 @@ class TranslationBase { String get iAm => localizedValues['i-am'][locale.languageCode]; String get yearOld => localizedValues['years-old'][locale.languageCode]; String get email => localizedValues['email'][locale.languageCode]; + String get book => localizedValues['Book'][locale.languageCode]; + String get appointmentLabel => + localizedValues['AppointmentLabel'][locale.languageCode]; + String get bloodType => localizedValues['BloodType'][locale.languageCode]; + + String get loginToUseService => + localizedValues['loginToUseService'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/Loader/gif_loader_container.dart b/lib/widgets/Loader/gif_loader_container.dart new file mode 100644 index 00000000..06c151c9 --- /dev/null +++ b/lib/widgets/Loader/gif_loader_container.dart @@ -0,0 +1,43 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter_gifimage/flutter_gifimage.dart'; + +class GifLoaderContainer extends StatefulWidget { + @override + _GifLoaderContainerState createState() => _GifLoaderContainerState(); +} + +class _GifLoaderContainerState extends State + with TickerProviderStateMixin { + GifController controller1; + + @override + void initState() { + controller1 = GifController(vsync: this); + + WidgetsBinding.instance.addPostFrameCallback((_) { + controller1.repeat( + min: 0, max: 11, period: Duration(milliseconds: 750), reverse: true); + }); + super.initState(); + } + + @override + void dispose() { + controller1.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return Center( + //progress-loading.gif + child: Container( + // margin: EdgeInsets.only(bottom: 40), + child: GifImage( + controller: controller1, + image: AssetImage( + "assets/images/progress-loading.gif"), //NetworkImage("http://img.mp.itc.cn/upload/20161107/5cad975eee9e4b45ae9d3c1238ccf91e.jpg"), + ), + )); + } +} \ No newline at end of file diff --git a/lib/widgets/bottom_navigation/bottom_nav_bar.dart b/lib/widgets/bottom_navigation/bottom_nav_bar.dart index ee0734b9..21cbebba 100644 --- a/lib/widgets/bottom_navigation/bottom_nav_bar.dart +++ b/lib/widgets/bottom_navigation/bottom_nav_bar.dart @@ -5,6 +5,7 @@ import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import '../../d_q_icons_icons.dart'; import 'bottom_navigation_item.dart'; class BottomNavBar extends StatefulWidget { @@ -44,50 +45,50 @@ class _BottomNavBarState extends State { name: TranslationBase.of(context).home, ), BottomNavigationItem( - icon: EvaIcons.list, - activeIcon: EvaIcons.list, + icon: DQIcons.my_medical_file, + activeIcon: DQIcons.my_medical_file, changeIndex: _changeIndex, index: widget.index, currentIndex: 1, name: TranslationBase.of(context).medicalProfile, ), -// Expanded( -// child: SizedBox( -// height: 50, -// child: Column( -// mainAxisSize: MainAxisSize.min, -// mainAxisAlignment: MainAxisAlignment.center, -// children: [ -// SizedBox(height: 22), -// ], -// ), -// ), -// ), - - // Added Calendar Icon to access book appointment flow + if(widget.index == 0) + Expanded( + child: SizedBox( + height: 50, + child: Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox(height: 22), + ], + ), + ), + ), + if(widget.index != 0) BottomNavigationItem( icon: EvaIcons.calendar, - activeIcon: EvaIcons.calendarOutline, + activeIcon: EvaIcons.calendar, changeIndex: _changeIndex, index: _index, - currentIndex: 4, + currentIndex: 2, name: TranslationBase.of(context).bookAppo, ), BottomNavigationItem( - icon: EvaIcons.person, - activeIcon: EvaIcons.person, + icon: DQIcons.family, + activeIcon: DQIcons.family, changeIndex: _changeIndex, index: widget.index, - currentIndex: 2, - name: TranslationBase.of(context).mySchedule, + currentIndex: 3, + name: TranslationBase.of(context).myFamily, ), BottomNavigationItem( icon: EvaIcons.calendar, activeIcon: EvaIcons.calendar, changeIndex: _changeIndex, index: widget.index, - currentIndex: 3, + currentIndex: 4, name: TranslationBase.of(context).todoList, ) ], diff --git a/lib/widgets/bottom_navigation/bottom_navigation_item.dart b/lib/widgets/bottom_navigation/bottom_navigation_item.dart index e623dde5..f491917c 100644 --- a/lib/widgets/bottom_navigation/bottom_navigation_item.dart +++ b/lib/widgets/bottom_navigation/bottom_navigation_item.dart @@ -1,6 +1,10 @@ +import 'package:badges/badges.dart'; +import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; +import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; class BottomNavigationItem extends StatelessWidget { final IconData icon; @@ -10,6 +14,8 @@ class BottomNavigationItem extends StatelessWidget { final int currentIndex; final String name; + var authProvider = new AuthProvider(); + BottomNavigationItem( {this.icon, this.activeIcon, @@ -20,6 +26,7 @@ class BottomNavigationItem extends StatelessWidget { @override Widget build(BuildContext context) { + var model = Provider.of(context); return Expanded( child: SizedBox( // height: 72.0, @@ -29,35 +36,113 @@ class BottomNavigationItem extends StatelessWidget { highlightColor: Colors.transparent, splashColor: Colors.transparent, onTap: () => changeIndex(currentIndex), - child: Column( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SizedBox( - height: 15, - ), - Container( - child: Icon(currentIndex == index ? activeIcon : icon, - color: currentIndex == index - ? Theme.of(context).primaryColor - : Theme.of(context).dividerColor, - size: 22.0), - ), - SizedBox( - height: 5, - ), - - // Added TextAlign Property - Texts( - name, - textAlign: TextAlign.center, - color: currentIndex == index - ? Theme.of(context).primaryColor - : Theme.of(context).dividerColor, - fontSize: 11, - ), - ], - ), + child: currentIndex != 4 + ? Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + height: 15, + ), + Container( + child: Icon(currentIndex == index ? activeIcon : icon, + color: currentIndex == index + ? Theme.of(context).primaryColor + : Theme.of(context).dividerColor, + size: 22.0), + ), + SizedBox( + height: 5, + ), + Texts( + name, + textAlign: TextAlign.center, + color: currentIndex == index + ? Theme.of(context).primaryColor + : Theme.of(context).dividerColor, + fontSize: 11, + ), + ], + ) + : authProvider.isLogin + ? Stack( + alignment: AlignmentDirectional.center, + children: [ + Positioned( + right: 18.0, + bottom: 28.0, + child: Badge( + toAnimate: false, + position: BadgePosition.topEnd(), + shape: BadgeShape.circle, + badgeColor: Color(0xFF40ACC9).withOpacity(1.0), + borderRadius: BorderRadius.circular(8), + badgeContent: Container( + padding: EdgeInsets.all(2.0), + child: Text(model.count.toString(), + style: TextStyle( + color: Colors.white, fontSize: 14.0)), + ), + ), + ), + Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + height: 15, + ), + Container( + child: Icon( + currentIndex == index ? activeIcon : icon, + color: currentIndex == index + ? Theme.of(context).primaryColor + : Theme.of(context).dividerColor, + size: 22.0), + ), + SizedBox( + height: 5, + ), + Texts( + name, + textAlign: TextAlign.center, + color: currentIndex == index + ? Theme.of(context).primaryColor + : Theme.of(context).dividerColor, + fontSize: 11, + ), + ], + ), + ], + ) + : Column( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + height: 15, + ), + Container( + child: Icon( + currentIndex == index ? activeIcon : icon, + color: currentIndex == index + ? Theme.of(context).primaryColor + : Theme.of(context).dividerColor, + size: 22.0), + ), + SizedBox( + height: 5, + ), + Texts( + name, + textAlign: TextAlign.center, + color: currentIndex == index + ? Theme.of(context).primaryColor + : Theme.of(context).dividerColor, + fontSize: 11, + ), + ], + ), ), ), ), diff --git a/lib/widgets/buttons/button.dart b/lib/widgets/buttons/button.dart index b6ae08b1..d37eb039 100644 --- a/lib/widgets/buttons/button.dart +++ b/lib/widgets/buttons/button.dart @@ -105,7 +105,7 @@ class _ButtonState extends State