From d1ac4080ca6eabb63739aee4759d33888ee8819e Mon Sep 17 00:00:00 2001 From: mosazaid Date: Sun, 1 Nov 2020 14:18:04 +0200 Subject: [PATCH 01/20] working on pharmacy home page --- assets/app_icons/config.json | 170 +++++++++++- assets/app_icons/fonts/DQIcons.ttf | Bin 7016 -> 13824 bytes assets/images/pharmacy_module/bg_1.png | Bin 0 -> 2898 bytes assets/images/pharmacy_module/bg_2.png | Bin 0 -> 1463 bytes assets/images/pharmacy_module/bg_3.png | Bin 0 -> 1651 bytes assets/images/pharmacy_module/bg_4.png | Bin 0 -> 1483 bytes .../pharmacy_module/medication_icon.png | Bin 0 -> 2080 bytes assets/images/pharmacy_module/offer_icon.png | Bin 0 -> 4540 bytes .../pharmacy_module/pharmacy_logo_green.png | Bin 0 -> 41399 bytes .../pharmacy_module/prescription_icon.png | Bin 0 -> 1498 bytes .../pharmacy_module/search_scan_icon.png | Bin 0 -> 1090 bytes lib/config/config.dart | 53 ++-- lib/config/localized_values.dart | 31 ++- lib/core/model/pharmacy_module/Customer.dart | 128 +++++++++ .../model/pharmacy_module/Manufacturer.dart | 98 +++++++ .../pharmacy_module/PharmacyImageObject.dart | 27 ++ .../pharmacy_module/PharmacyProduct.dart | 149 ++++++++++ lib/core/model/pharmacy_module/Reviews.dart | 82 ++++++ lib/core/service/client/base_app_client.dart | 34 ++- .../parmacyModule/parmacy_module_service.dart | 72 +++++ .../pharmacy_module_view_model.dart | 59 ++++ lib/d_q_icons_icons.dart | 12 + lib/locator.dart | 12 +- lib/pages/landing/home_page.dart | 11 +- lib/pages/landing/landing_page.dart | 262 +++++++++--------- .../pharmacyModule/pharmacy_module_page.dart | 233 ++++++++++++++++ .../pharmacyModule/widgets/BannerPager.dart | 88 ++++++ .../widgets/ProductTileItem.dart | 107 +++++++ .../widgets/borderedButton.dart | 59 ++++ .../widgets/manufacturerItem.dart | 35 +++ .../rate_appointment_doctor.dart | 2 +- lib/uitl/date_uitl.dart | 1 + lib/uitl/translations_delegate_base.dart | 9 + lib/uitl/utils.dart | 21 ++ lib/widgets/others/app_scaffold_widget.dart | 7 +- pubspec.yaml | 4 + 36 files changed, 1606 insertions(+), 160 deletions(-) create mode 100644 assets/images/pharmacy_module/bg_1.png create mode 100644 assets/images/pharmacy_module/bg_2.png create mode 100644 assets/images/pharmacy_module/bg_3.png create mode 100644 assets/images/pharmacy_module/bg_4.png create mode 100644 assets/images/pharmacy_module/medication_icon.png create mode 100644 assets/images/pharmacy_module/offer_icon.png create mode 100644 assets/images/pharmacy_module/pharmacy_logo_green.png create mode 100644 assets/images/pharmacy_module/prescription_icon.png create mode 100644 assets/images/pharmacy_module/search_scan_icon.png create mode 100644 lib/core/model/pharmacy_module/Customer.dart create mode 100644 lib/core/model/pharmacy_module/Manufacturer.dart create mode 100644 lib/core/model/pharmacy_module/PharmacyImageObject.dart create mode 100644 lib/core/model/pharmacy_module/PharmacyProduct.dart create mode 100644 lib/core/model/pharmacy_module/Reviews.dart create mode 100644 lib/core/service/parmacyModule/parmacy_module_service.dart create mode 100644 lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart create mode 100644 lib/pages/pharmacyModule/pharmacy_module_page.dart create mode 100644 lib/pages/pharmacyModule/widgets/BannerPager.dart create mode 100644 lib/pages/pharmacyModule/widgets/ProductTileItem.dart create mode 100644 lib/pages/pharmacyModule/widgets/borderedButton.dart create mode 100644 lib/pages/pharmacyModule/widgets/manufacturerItem.dart diff --git a/assets/app_icons/config.json b/assets/app_icons/config.json index 4c7eefa6..e0f1051d 100644 --- a/assets/app_icons/config.json +++ b/assets/app_icons/config.json @@ -131,6 +131,174 @@ "search": [ "parking_icon" ] + }, + { + "uid": "03df3404af4fa2db99c8dfb9e9729367", + "css": "more_menu_icon", + "code": 59401, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "", + "width": 222 + }, + "search": [ + "more_menu_icon" + ] + }, + { + "uid": "8882d4d64a842809f1cb078522c9b867", + "css": "offer_icon", + "code": 59402, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1089.5 567L1107.2 972.1 1406.5 924.4 1467.7 530ZM1089.5 567L1107.2 972.1 934 924.4 873.6 530ZM856.1 506L865 588.4 1083.3 622.8 1080.4 541.3ZM1495.6 506L1482 588.4 1083.3 622.8 1080.4 541.3ZM856.1 506L1080.4 541.3 1495.5 506 1221.9 481.9ZM994.9 527.4L1351 493.3 1288 487.7 934 518.2ZM1336 519.5L1100 489.9 1059 492.6 1272.6 524.9ZM882.9 591.2L886 611 1092.9 645.6 1455.7 608.2 1458.4 590.4 1092 622.1 1083.4 622.8ZM1308.7 940L1251.5 949.1 1272.6 524.9 1336 519.5ZM1328.3 381.2C1277.7 331.5 1175.8 491.5 1175.8 491.5L1178.7 502.5S1296.2 431.6 1332.9 428.5C1361.9 426 1361.3 449.9 1331.2 461.8 1303.7 472.6 1178.7 502.5 1178.7 502.5A747 747 0 0 0 1274.4 487.3C1351.9 473.5 1369.4 456.8 1369.9 431.4S1349.7 402.1 1328.3 381.2ZM1274.4 487.2C1349.2 473.9 1368.1 457.9 1369.8 434A63.5 63.5 0 0 0 1332.9 428.4C1361.9 425.9 1361.3 449.9 1331.2 461.7 1303.7 472.5 1178.7 502.4 1178.7 502.4H1178.7A880 880 0 0 0 1274.4 487.2ZM1249 462.9S1245.7 453.6 1229.5 452.2 1212.6 441.2 1212.6 441.1A594.4 594.4 0 0 0 1175.8 491.5L1178.7 502.5S1212.2 482.4 1249 463ZM1023.4 381.2C1073.9 331.5 1175.8 491.5 1175.8 491.5L1172.9 502.5S1055.4 431.6 1018.7 428.5C989.8 426 990.3 449.9 1020.5 461.8 1047.9 472.6 1172.9 502.5 1172.9 502.5A747 747 0 0 1 1077.3 487.3C999.8 473.5 982.2 456.8 981.7 431.4S1002 402.1 1023.4 381.2ZM1077.3 487.2C1002.5 473.9 983.5 457.9 981.9 434A63.5 63.5 0 0 1 1018.7 428.4C989.8 425.9 990.3 449.9 1020.5 461.7 1047.9 472.5 1172.9 502.4 1172.9 502.4H1172.9A880 880 0 0 1 1077.3 487.2ZM1102.6 462.9S1105.9 453.6 1122.1 452.2 1139.1 441.2 1139.1 441.1A595 595 0 0 1 1175.8 491.5L1172.9 502.5S1139.4 482.4 1102.6 463ZM1211.9 506H1135.9A5 5 0 0 1 1131.2 500.7H1131.2A16.4 16.4 0 0 1 1146.7 483.6H1201.1A16.4 16.4 0 0 1 1216.6 500.7H1216.6A5 5 0 0 1 1211.9 506ZM233.4 567L251.1 972.1 550.4 924.4 611.6 530ZM233.4 567L251.1 972.1 78 924.4 17.5 530ZM0 506L8.9 588.4 227.1 622.8 224.2 541.3ZM639.5 506L625.9 588.4 227.1 622.8 224.3 541.3ZM0 506L224.2 541.3 639.4 506 365.8 481.9ZM138.8 527.4L494.9 493.3 431.9 487.7 78 518.2ZM479.9 519.5L243.9 489.9 202.9 492.6 416.5 524.9ZM26.8 591.2L29.8 611 236.8 645.6 599.6 608.2 602.3 590.4 235.9 622.1 227.2 622.8ZM452.6 940L395.4 949.1 416.5 524.9 479.9 519.5ZM116.8 935.2L167.5 949.1 138.8 527.4 77.9 518.2ZM472.2 381.2C421.6 331.5 319.8 491.5 319.8 491.5L322.7 502.5S440.1 431.6 476.8 428.5C505.8 426 505.3 449.9 475.1 461.8 447.6 472.6 322.7 502.5 322.7 502.5A747 747 0 0 0 418.3 487.3C495.8 473.5 513.4 456.8 513.8 431.4S493.6 402.1 472.2 381.2ZM418.3 487.2C493.1 473.9 512.1 457.9 513.7 434A63.5 63.5 0 0 0 476.8 428.4C505.8 425.9 505.3 449.9 475.1 461.7 447.6 472.5 322.7 502.4 322.7 502.4H322.7A880 880 0 0 0 418.3 487.2ZM393 462.9S389.7 453.6 373.4 452.2 356.5 441.2 356.5 441.1A595.1 595.1 0 0 0 319.8 491.5L322.7 502.5S356.2 482.4 393 463ZM167.3 381.2C217.8 331.5 319.7 491.5 319.7 491.5L316.8 502.5S199.3 431.6 162.6 428.5C133.6 426 134.2 449.9 164.3 461.8 191.8 472.6 316.8 502.5 316.8 502.5A747 747 0 0 1 221.1 487.3C143.6 473.5 126.1 456.8 125.6 431.4S145.9 402.1 167.3 381.2ZM221.1 487.2C146.3 473.9 127.4 457.9 125.7 434A63.5 63.5 0 0 1 162.7 428.4C133.7 426 134.3 449.9 164.4 461.7 191.9 472.6 316.9 502.5 316.9 502.5H316.9A880.2 880.2 0 0 1 221.1 487.2ZM246.5 462.9S249.8 453.6 266.1 452.2 283 441.2 283 441.1A594.5 594.5 0 0 1 319.8 491.5L316.8 502.5S283.4 482.4 246.6 463ZM355.8 506H279.8A5 5 0 0 1 275.1 500.7H275.1A16.4 16.4 0 0 1 290.6 483.6H345A16.4 16.4 0 0 1 360.6 500.7H360.6A5 5 0 0 1 355.8 506ZM442.3 310.5L747.8 362.8 1053.3 310.5 747.8 276ZM595.1 336.7L747.8 362.9 900.6 336.7 747.8 319.4ZM905 493.5L868 497A388.3 388.3 0 0 1 1017.1 154.2 341.6 341.6 0 0 0 1005.2 189.2 271.6 271.6 0 0 1 1037.7 188.2 345.8 345.8 0 0 0 905 493.5ZM977.3 471.4L937.5 464.6C958 318.6 1048.8 196.5 1174.5 145.9A349.9 349.9 0 0 0 1153.7 179.4 299.7 299.7 0 0 1 1188.3 187.6 354.4 354.4 0 0 0 977.3 471.4ZM811.4 491.9L773.1 489.4A555.9 555.9 0 0 1 946.6 109.9 504.1 504.1 0 0 0 938.1 175.9 517.9 517.9 0 0 0 811.4 491.9ZM562.9 381.4L599.5 374.8A366.4 366.4 0 0 0 378.9 82.6 185.9 185.9 0 0 0 366.4 121.2 326.3 326.3 0 0 1 562.9 381.4ZM535.3 463.1L574.1 451.5C538.7 309 435.9 199.1 305.7 164.6A338.6 338.6 0 0 1 329.9 195.3 302.9 302.9 0 0 0 296.4 207.8 343.9 343.9 0 0 1 535.3 463.1ZM688.7 486.7L726.8 483A552.6 552.6 0 0 0 543.9 109 503.8 503.8 0 0 1 554 174.7 515.1 515.1 0 0 1 688.7 486.7ZM747.8 362.8V1000L985.2 937.7 1053.3 310.5ZM747.8 362.8V1000L510.4 937.7 442.3 310.5ZM973.1 823S943.9 837.1 937.9 904.5A135.6 135.6 0 0 1 925.4 953.4L848 973.7A166.3 166.3 0 0 0 871.7 919C879 883.9 879.9 875.1 879.9 875.1S884.8 854.4 935.2 826.3A61.6 61.6 0 0 1 973.1 823ZM879.9 875.2A105 105 0 0 1 927.1 804.3C1032.3 744.5 1161.9 869.9 1161.9 869.9L1143.7 867.9 1147.7 889.3 1126.3 886.3 1135.7 907 1115.5 902.6 1120.9 918.9 1099.4 912.9 1096.5 938.4S1034.2 853.5 998.2 838.5A100.5 100.5 0 0 0 879.9 875.2ZM522.5 823.1S550.4 840.7 559.5 909A160.3 160.3 0 0 0 570.1 953.4L647.6 973.9A166.4 166.4 0 0 1 623.9 919.1C616.6 884 615.7 875.3 615.7 875.3S610.8 854.6 560.3 826.5A61.6 61.6 0 0 0 522.5 823.1ZM615.7 875.3A105.1 105.1 0 0 0 568.5 804.4C463.3 744.7 333.7 870.1 333.7 870.1L351.9 868.1 347.8 889.5 369.3 886.5 359.9 907.2 380.1 902.8 374.7 919 396.2 913.1 399.1 938.6S463.9 854.9 499.8 839.8A96.5 96.5 0 0 1 615.7 875.3ZM463.6 75.2A38.7 38.7 0 0 0 437.4 56.9L441.1 31.4A62 62 0 0 1 482.9 60.6ZM902.8 42.4A41.8 41.8 0 0 0 882.1 67.7L859.9 59.4A66.8 66.8 0 0 1 893.1 18.9ZM1096.4 123.4A32.9 32.9 0 0 0 1070.9 134.7L1056.2 118.6A52.7 52.7 0 0 1 1096.9 100.4ZM773.5 28.6A41.4 41.4 0 0 0 768.4 58.4L748.3 63.4A66.3 66.3 0 0 1 756.3 15.8ZM632.6 122.7A38.6 38.6 0 0 0 617.6 97.3L629.1 78.3A61.8 61.8 0 0 1 653 118.9ZM206 205.9A34.3 34.3 0 0 0 179.8 193.4Q179.8 181.5 179.8 169.6A55 55 0 0 1 221.6 189.6ZM1171.1 285.2A61.2 61.2 0 0 0 1138.9 287.6 83.4 83.4 0 0 1 1197.3 250.9Q1198.5 262.3 1199.6 273.8A60.3 60.3 0 0 0 1171.1 285.2ZM828.8 208.3A75.2 75.2 0 0 0 810.9 238.1 102.1 102.1 0 0 1 819.9 164.4L837.8 176.3A75.9 75.9 0 0 0 828.8 208.3ZM284 117.2A61.7 61.7 0 0 1 315.8 123.5 85.9 85.9 0 0 0 261.4 79.7L256.8 102.2A61.8 61.8 0 0 1 284 117.2ZM278.4 313.3A59.7 59.7 0 0 1 350.7 314.2L360.8 305.2A64.5 64.5 0 0 0 264.1 293.9ZM221.7 4.5L253 0 274.9 19.2 223.6 20.3ZM728.1 145.8L739 178.5 726.9 206.3 714.7 151.2ZM1240.6 60.6L1209.4 66.5 1193.7 92.1 1243 76.4Z", + "width": 1496 + }, + "search": [ + "offer_icon" + ] + }, + { + "uid": "48bf5922e89257ff0ba5f3ae4a47297d", + "css": "prescription_icon", + "code": 59403, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M466 297H414.1V245A19.5 19.5 0 1 0 374.9 245V297H323A19.5 19.5 0 0 0 323 336.1H374.9V388A19.5 19.5 0 0 0 414.1 388V336.1H466A19.5 19.5 0 1 0 466 297ZM394.5 144.6A171.9 171.9 0 1 0 566.4 316.5 172.1 172.1 0 0 0 394.5 144.6ZM394.5 449.3A132.8 132.8 0 1 1 527.3 316.5 133 133 0 0 1 394.5 449.3ZM783.4 179.6L609.5 5.7A19.5 19.5 0 0 0 595.7 0H58.6A58.7 58.7 0 0 0 0 58.6V941.4A58.7 58.7 0 0 0 58.6 1000H431.7A19.5 19.5 0 1 0 431.7 960.8H58.6A19.6 19.6 0 0 1 39.2 941.4V58.6A19.6 19.6 0 0 1 58.7 39.1H576.2V154.2A58.7 58.7 0 0 0 634.8 212.8H750.1V560.5A19.5 19.5 0 1 0 789.2 560.5V193.4A19.5 19.5 0 0 0 783.4 179.6ZM634.8 173.8A19.6 19.6 0 0 1 615.2 154.3V66.7L722.4 173.8H634.8ZM644.5 546.9H305.3A19.5 19.5 0 0 0 305.3 586.1H644.5A19.5 19.5 0 0 0 644.5 546.9ZM208.2 546.9H144.5A19.5 19.5 0 0 0 144.5 586.1H208.2A19.5 19.5 0 0 0 208.2 546.9ZM500 656.3H305.3A19.5 19.5 0 0 0 305.3 695.4H500A19.5 19.5 0 1 0 500 656.3ZM208.2 656.3H144.5A19.5 19.5 0 0 0 144.5 695.4H208.2A19.5 19.5 0 0 0 208.2 656.3ZM319.1 771.4A19.5 19.5 0 1 0 324.9 785.2 19.6 19.6 0 0 0 319.1 771.4ZM208.2 765.6H144.5A19.5 19.5 0 1 0 144.5 804.8H208.2A19.5 19.5 0 1 0 208.2 765.6ZM879 757.8A121.3 121.3 0 0 0 862.1 759 121.1 121.1 0 0 0 660.5 638.6L505.8 793.3A121.1 121.1 0 0 0 677 964.5L758 883.6A121.1 121.1 0 1 0 878.9 757.9ZM649.4 936.9A82 82 0 1 1 533.4 820.9L597 757.4 713 873.4ZM740.6 845.8L624.6 729.8 688.1 666.2A82 82 0 1 1 804.1 782.2ZM859.4 958.6A82 82 0 0 1 859.4 799.3ZM898.6 958.6V799.3A82 82 0 0 1 898.6 958.6Z", + "width": 1000 + }, + "search": [ + "prescription_icon" + ] + }, + { + "uid": "fce0d47a8f283966d22c8450b4c63f70", + "css": "search_scan_icon", + "code": 59404, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M846.2 544.3A19.5 19.5 0 0 1 828.4 532.9 74.4 74.4 0 0 0 729.8 496.2 19.5 19.5 0 0 1 713.5 460.7 113.5 113.5 0 0 1 863.9 516.6 19.5 19.5 0 0 1 846.2 544.3ZM185.6 174.1V500A19.5 19.5 0 0 0 224.7 500V174.1A19.5 19.5 0 0 0 185.6 174.1ZM305.5 465.2V174.1A19.5 19.5 0 0 0 266.4 174.1V465.2A19.5 19.5 0 0 0 305.5 465.2ZM347.2 454.6A19.5 19.5 0 0 0 386.3 454.6V453.1A19.5 19.5 0 1 0 347.2 453.1ZM366.7 389.9A19.5 19.5 0 0 0 386.2 370.4V174.1A19.5 19.5 0 0 0 347.2 174.1V370.4A19.5 19.5 0 0 0 366.7 389.9ZM467 500V174.1A19.5 19.5 0 0 0 428 174.1V500A19.5 19.5 0 1 0 467 500ZM528.3 389.9A19.5 19.5 0 0 0 547.8 370.4V174.1A19.5 19.5 0 1 0 508.7 174.1V370.4A19.5 19.5 0 0 0 528.3 389.9ZM508.7 454.6A19.5 19.5 0 0 0 547.8 454.6V453.1A19.5 19.5 0 1 0 508.7 453.1ZM249.5 96.4A19.5 19.5 0 0 0 230 76.9H96.3A19.5 19.5 0 0 0 76.8 96.4V230.3A19.5 19.5 0 1 0 115.9 230.3V116H230A19.5 19.5 0 0 0 249.5 96.4ZM76.8 597.8A19.5 19.5 0 0 0 96.3 617.3H230A19.5 19.5 0 0 0 230 578.2H115.9V463.9A19.5 19.5 0 1 0 76.8 463.9ZM798.7 249.8A19.5 19.5 0 0 0 818.2 230.3V96.4A19.5 19.5 0 0 0 798.7 76.9H665A19.5 19.5 0 0 0 665 116H779.1V230.3A19.5 19.5 0 0 0 798.7 249.8ZM993.4 896.6L944.6 790.7A19.5 19.5 0 0 0 918.7 781.1L888.1 795.2 859.6 732.9A196 196 0 0 0 895 421.4V52.9A52.9 52.9 0 0 0 842.3 0H52.8A52.9 52.9 0 0 0-0.1 52.9V259.3A19.5 19.5 0 0 0 39 259.3V52.9A13.8 13.8 0 0 1 52.7 39.1H842.3A13.8 13.8 0 0 1 856 52.9V392.8A198.1 198.1 0 0 0 829.1 380.3 193.8 193.8 0 0 0 709.5 374.9V174.1A19.5 19.5 0 1 0 670.4 174.1V390.5A194.3 194.3 0 0 0 628.6 419.9V174.1A19.5 19.5 0 0 0 589.5 174.1V469.9A195.7 195.7 0 0 0 583.2 645.4C584.7 648.7 586.3 651.9 588 655.1H52.8A13.8 13.8 0 0 1 39.1 641.3V434.9A19.5 19.5 0 1 0-0.1 434.9V641.4A52.9 52.9 0 0 0 52.7 694.3H614.8A194.8 194.8 0 0 0 824 749.2L852.5 811.7 821.8 825.9A19.5 19.5 0 0 0 812.3 851.8L861 957.8A72.8 72.8 0 0 0 993.3 896.8ZM826 706.4A156.2 156.2 0 0 1 618.7 629.2 156.9 156.9 0 0 1 695.8 421.5 156.5 156.5 0 0 1 862.7 444.9L863.1 445.3A156.9 156.9 0 0 1 826 706.4ZM941.3 957.8A33.2 33.2 0 0 1 915.7 958.8 33.6 33.6 0 0 1 896.6 941.3L856 853 917.3 824.9 957.8 913A33.9 33.9 0 0 1 941.2 958ZM19.5 366.7A19.5 19.5 0 1 0-0.1 347V347A19.5 19.5 0 0 0 19.5 366.7Z", + "width": 1000 + }, + "search": [ + "search_scan_icon" + ] + }, + { + "uid": "4aab61c6fa11812333db81c2bb204c83", + "css": "share_icon", + "code": 59405, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M872.7 173.8A139.7 139.7 0 1 1 732.9 34.1 139.7 139.7 0 0 1 872.7 173.8ZM313.7 500A139.7 139.7 0 1 1 173.8 360.2 139.7 139.7 0 0 1 313.7 500ZM872.7 826.1A139.7 139.7 0 1 1 732.9 686.4 139.7 139.7 0 0 1 872.7 826.1ZM294.6 570.3L612.8 755.8M612.3 244.2L294.6 429.7", + "width": 907 + }, + "search": [ + "share_icon" + ] + }, + { + "uid": "65fb587059226e09ea7e14cd39772bb1", + "css": "wishlist_add_icon", + "code": 59406, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M785.4 0A320.4 320.4 0 0 0 541.7 114.3 320.4 320.4 0 0 0 297.9 0 294.5 294.5 0 0 0 0 299.7C0 506.8 184.1 673 463 929.4L541.7 1000.3 620.4 929.4C899.2 673.2 1083.4 507.1 1083.4 299.7A294.5 294.5 0 0 0 785.4 0Z", + "width": 1083 + }, + "search": [ + "wishlist_add_icon" + ] + }, + { + "uid": "c752092fa3a1a55f5bc0ae60f4beb4c7", + "css": "wishlist_icon", + "code": 59407, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M785.4 0A320.4 320.4 0 0 0 541.7 114.3 320.4 320.4 0 0 0 297.9 0 294.5 294.5 0 0 0 0 299.7C0 506.8 184.1 673 463 929.4L541.7 1000.3 620.4 929.4C899.2 673.2 1083.4 507.1 1083.4 299.7A294.5 294.5 0 0 0 785.4 0ZM575 857.5L564 867.7 541.6 888 519.2 867.7 508.2 857.5A3310.1 3310.1 0 0 1 188.7 539.8 382.1 382.1 0 0 1 83.6 299.7 216.7 216.7 0 0 1 145.4 145.3 211.9 211.9 0 0 1 298 83.4 238.8 238.8 0 0 1 478 168L541.7 243.8 605.5 168A237.9 237.9 0 0 1 785.4 83.4 212.9 212.9 0 0 1 938.3 145.3 217.1 217.1 0 0 1 1000.1 299.7 384.1 384.1 0 0 1 894.8 539.8 3316.8 3316.8 0 0 1 575 857.5Z", + "width": 1083 + }, + "search": [ + "wishlist_icon" + ] + }, + { + "uid": "88b990d06e49752b331bb5c6704b3d42", + "css": "bg_1", + "code": 59408, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M80.6 6.2H2052.5A74.4 74.4 0 0 1 2126.9 80.6V923.9A74.4 74.4 0 0 1 2052.5 998.3H80.6A74.4 74.4 0 0 1 6.2 923.9V80.6A74.4 74.4 0 0 1 80.6 6.2ZM1063.2 993.8H1037.3L1039 992.1 1036 993.8H987.3L1020.5 981.6 889 993.8H29.8A52.5 52.5 0 0 1 6.2 946.5V867.8L1027.4 962.7 6.2 565.1V321L1034.3 947 89.8 6.2H367.8L1039.9 927.1 645.9 6.2H809L1059.9 937.4 996.5 6.2H1136.5L1074.3 920.2V920.2L1335.1 6.2H1499.5L1081.7 942.6 1765.2 6.2H2043.3L1103.6 942.1V942.1L1103.6 942.1 2126.9 344.5V586.4L1102.1 963.1 2126.9 867.9V946.5A52.5 52.5 0 0 1 2103.3 993.8H1243.6L1103.2 980.8 1136.7 993.8H1063.2Z", + "width": 2133 + }, + "search": [ + "bg_1" + ] + }, + { + "uid": "ace5228aabf92ff4bf5524cef4c6409f", + "css": "bg_2", + "code": 59409, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M75 1000A75 75 0 0 1 0 925V75A75 75 0 0 1 75 0H2062.5A75 75 0 0 1 2137.5 75V925A75 75 0 0 1 2062.5 1000ZM2142 792.6C2084.5 793.1 2087.9 773.2 2043.5 760.2S1990.1 764.4 1953.4 739.3 1930.2 698.9 1905.4 667 1863.7 645 1847.6 605.3 1850.5 559.6 1845.2 519.5 1820.1 479 1824.9 436.1 1848.9 397.8 1863.1 360.3 1860.4 312.2 1886.3 277.7 1926 257.1 1960.1 232.7 1984.7 190.3 2031.5 175.4 2082.4 179.8 2136.4 179.3M2141.7 750.7C2091.8 751.2 2095.1 731.3 2057.1 720.2S2009.8 726.4 1977.9 704.4 1959.6 667.4 1938.2 640 1900 622.7 1886 588.1 1890.9 547.8 1886.4 513.3 1862.3 478.7 1866.5 441.5 1889.7 409.1 1902 376.8 1897.2 334 1919.7 304.1 1956 288 1985.3 267.1 2005.1 228.2 2045.8 215.3 2090.2 221.5 2136.6 221.1M2141.3 711.9C2098.5 712.2 2101.8 692.5 2069.6 683S2028.1 690.9 2000.7 672 1987 638.3 1968.8 615 1933.8 601.9 1921.9 572.2 1928.8 536.8 1925 507.6 1901.4 478.2 1905.1 446.4 1927.7 419.2 1938.2 391.9 1931.5 354 1950.6 328.4 1983.7 316.9 2008.8 298.9 2024.1 263.2 2059.1 252.3 2097.8 260.4 2137.1 260M742.2 1004.9C740.7 947.4 760.5 950.5 772.8 905.9S767.6 852.6 792.1 815.5 832 791.6 863.4 766.3 884.6 724.1 924.1 707.4 969.8 709.4 1009.8 703.4 1049.8 677.6 1092.7 681.7 1131.4 704.9 1169.1 718.5 1217.1 714.9 1252.1 740.1 1273.4 779.4 1298.4 813.1 1341.2 837 1356.9 883.4 1353.5 934.3 1354.9 988.3M784 1003.8C782.6 954 802.5 956.9 813 918.7S806 871.7 827.4 839.3 864 820.4 890.9 798.5 907.6 760 941.9 745.4 982.3 749.6 1016.6 744.5 1050.8 719.8 1088 723.3 1120.9 745.9 1153.4 757.6 1196 752.1 1226.4 774 1243.1 810 1264.5 838.9 1303.7 858 1317.4 898.4 1311.9 942.9 1313.1 989.2M822.8 1002.7C821.7 960 841.5 962.9 850.4 930.5S841.7 889.3 860.1 861.5 893.5 847.3 916.5 828.7 929 793.4 958.4 781 993.9 787.3 1023.1 782.9 1052 758.8 1083.9 762 1111.4 784.1 1138.9 794 1176.6 786.6 1202.5 805.4 1214.7 838.2 1233.1 862.9 1269 877.6 1280.6 912.4 1273.2 951.2 1274.3 990.5", + "width": 2138 + }, + "search": [ + "bg_2" + ] + }, + { + "uid": "0887f8af7107badceb2618215c9d8053", + "css": "bg_3", + "code": 59410, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M808.5 441.7C833.6 416.6 869 452 894.1 426.9S883.8 366.4 908.9 341.3 969.4 351.6 994.5 326.4 984.2 266 1009.4 240.9 1069.8 251.1 1094.9 226 1084.7 165.5 1109.8 140.4 1170.3 150.6 1195.4 125.5 1185.2 65.1 1210.3 39.9 1270.8 50.1 1295.9 25M85.1 848.6C120.5 851.1 117 901 152.4 903.5S191.3 856.1 226.7 858.5 258.7 910.9 294.1 913.4 333 866 368.4 868.4 400.4 920.8 435.8 923.3 474.7 875.9 510.2 878.3 542.1 930.7 577.5 933.2 616.5 885.8 651.9 888.3 683.9 940.6 719.4 943.1", + "width": 2138 + }, + "search": [ + "bg_3" + ] + }, + { + "uid": "15d14398ff70be8823b96215f803bf80", + "css": "bg_4", + "code": 59411, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M1546 479.2C1571.1 454.1 1606.5 489.5 1631.6 464.4S1621.3 403.9 1646.4 378.8 1706.9 389.1 1732 363.9 1721.7 303.5 1746.9 278.4 1807.3 288.6 1832.4 263.5 1822.2 203 1847.3 177.9 1907.8 188.1 1932.9 163 1922.7 102.6 1947.8 77.4 2008.3 87.6 2033.4 62.5M1354.2 796L1262.5 743.1V849ZM1549.7 796L1458.1 743.1V849ZM1745.3 796L1653.6 743.1V849Z", + "width": 2138 + }, + "search": [ + "bg_4" + ] + }, + { + "uid": "1ad61f1d7131991dd2361861dd272499", + "css": "medication_icon", + "code": 59412, + "src": "custom_icons", + "selected": true, + "svg": { + "path": "M578.7 308A105.9 105.9 0 0 0 476.3 229.1 106.8 106.8 0 0 0 384.1 282.2L317.1 398.2V398.2L250.1 514.2A106.3 106.3 0 0 0 428.9 628.6Q429.2 628.2 429.4 627.8L568.1 388.5A105.3 105.3 0 0 0 578.7 308ZM411.4 616.8A85.1 85.1 0 0 1 268.4 524.8L330.1 418 353 431.2H353L477.4 503ZM549.8 377.9L487.9 484.6 372.7 418.1 402.3 366.9A10.6 10.6 0 0 0 383.9 356.3L354.4 407.6 340.6 399.6 402.3 292.8A85.6 85.6 0 0 1 476.3 250.3 85.1 85.1 0 0 1 549.6 377.8ZM718.7 591.9A407.8 407.8 0 0 0 526.8 591.9C496.1 600.6 480.5 613 480.5 628.6 480.5 628.6 480.5 628.6 480.5 628.6V722.6C480.5 738.4 496 750.6 526.7 759.4A409.2 409.2 0 0 0 718.7 759.4C749.4 750.7 765 738.3 765 722.6V628.6L765 628.6C765 613 749.4 600.7 718.7 591.9ZM532.6 612.2A387.3 387.3 0 0 1 712.8 612.2C738.3 619.5 743.8 627.4 743.8 628.6H743.8C743.8 629.9 738.3 637.7 712.9 645A387.3 387.3 0 0 1 532.6 645C507 637.7 501.6 629.9 501.6 628.6S507 619.5 532.6 612.2ZM743.8 722.7C743.8 724.2 738.3 731.9 712.9 739.1A388.7 388.7 0 0 1 532.5 739.1C507.1 731.9 501.6 724.2 501.6 722.7V655.7A130.1 130.1 0 0 0 526.8 665.4 407.7 407.7 0 0 0 718.7 665.4 130.2 130.2 0 0 0 743.8 655.7V682.1A222 222 0 0 1 688.6 699.8 10.6 10.6 0 1 0 692.6 720.6 257.9 257.9 0 0 0 743.8 705.4ZM414.4 324.9A10.6 10.6 0 0 0 399.9 328.8L399.7 329.1A10.6 10.6 0 1 0 418.1 339.6L418.2 339.3A10.6 10.6 0 0 0 414.4 324.9ZM669.4 713.7A10.6 10.6 0 0 0 657.8 704.2H657.6A10.6 10.6 0 0 0 658.6 725.3L659.6 725.3 659.9 725.3A10.6 10.6 0 0 0 669.4 713.7ZM999.5 500A500 500 0 0 1 499.5 1000 35.7 35.7 0 1 1 499.5 928.6 428.6 428.6 0 0 0 821 217.1V250A35.7 35.7 0 0 1 749.5 250V107.1A35.7 35.7 0 0 1 785.2 71.4H928.1A35.7 35.7 0 1 1 928.1 142.9H820.9V145.7A35.7 35.7 0 0 1 860.2 153.9 496.8 496.8 0 0 1 999.5 500ZM213.8 678.6A35.7 35.7 0 0 0 178.1 714.3V782.9A428.6 428.6 0 0 1 499.5 71.4 35.7 35.7 0 1 0 499.5 0 500 500 0 0 0 116.9 821.4H70.9A35.7 35.7 0 1 0 70.9 892.8H213.8A35.7 35.7 0 0 0 249.6 857.2V714.3A35.7 35.7 0 0 0 213.8 678.6Z", + "width": 1000 + }, + "search": [ + "medication_icon" + ] } ] -} +} \ No newline at end of file diff --git a/assets/app_icons/fonts/DQIcons.ttf b/assets/app_icons/fonts/DQIcons.ttf index 8365db4766e73d654150b1de29fba2b30ceaaf6b..474ea22c23043d46a05e307809bdb7ba605add04 100644 GIT binary patch delta 7320 zcmbVQ36LDsd45Otdwoy$^ffy>JF_#RnOULLN_)%=+xn2*EB>F;xjrmBcBqNkRxo93ND9ea7(-J7Kps|Ld6* zk`P6lnR##i{`>#`_x=An|2N+_cJRJZw5cB9xFGu-D2;u<&>!Xh1oU4(S+VcX-0gdQv-DlC_bNPJ zd+^Af>ASn%y%zMJh3CFQ)3@J(Zy?j~J_FC)ho=wiJru3q79-UEGBo(BTaFx^Te*4Q zdW44l4utvvfg)-A=N zC}2f_5G@yY{~B15p-?EjP$V#ZM;qxofh$_-g?}yKOK4LfBMJVzx3mN`5;Z)7Ce-A_ z4J6g6AsrdWL>5XR8#ySAT;w4i1lS|D5}XE60}8@P4TOK<7(E=#t6&d`Xl=e-z!I8o z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q*9^2)bA z^S=<+XWx27QNI4Y|Gc!JJ@1x_*sJzpw%nax+Q9z%yI%|bx24y<{F4v<_T=l6k3ael wUw{5-si{=tvF^qQjlAML@f#-Yk9Qvd(}07*qoM6N<$f*j`LGynhq literal 0 HcmV?d00001 diff --git a/assets/images/pharmacy_module/bg_2.png b/assets/images/pharmacy_module/bg_2.png new file mode 100644 index 0000000000000000000000000000000000000000..96cfd3bc7fa1b57db632233ed49f7d44f31cb2b4 GIT binary patch literal 1463 zcmV;o1xWgdP)Wms`#SaD@nab;L>Wms`#SaD@oab;L?W?6G* zT61SxbZA?2XMZDDzCVtQ|4dT(QUaAbUNWPEXD zeR5|1|Nnu;@7MqU01$LiPE!B|2ODf{ZpO#R$;LhOpf%TAeF{~@YmQV{UgjH~xE7lMe9qUT?5|-tE4*ch^)(2QM^d#yMz75YU zd5u;*n=Xk}0uvN4hdOk&RHB$S==SF!lb>LT8ypq7+QIS;#i%(hfxR%?Vioau%6(d_b?y~3k_hkJBWY> zquj$?{2~wini7QSeHILytp+)>d6X}y1q%c;dk3D|9W@lMcLdQ;Fb_Qrt9^&% zH+anChckQV1EfKP5W94pW6$dCD%Z1PeZxZ^M1ryw1cQAb`m6{Wk9EI?K5!O5GfE!B zdJiS0!8#QQGVbqyuWPKkNAnC=2R-zWSestqD^H@{O^S8fLm%e~AjD$057a(fXQQ*8 z;l2Y+*q~{k!KR1ZD-4?b9KEDTW2uSFY(-J@BG}S7W2sSArb}*>Si~Y+ z%=wNpM1GbODq&k#CyAvdD{O%rZj$IXN9l~Q)Of}sudPM6K$fP7rFz$vtxJ$C*Cs&O zOFK~(b?@H6o%2 zuxARW`H*lvk`2wr-^Z#pTNBp$Y0}F#QCsz{mPQX0l~xC^mSbY6S^%qI1GSUMN(ZW# zpi`%Du~crL)-s!Sk=wse>k97-SdScpiVVuHN}LciPXacLilr32o*u7PzvSM2Z8X?4 zDwbO3kG^j*DTKl&06UHYR(r0y7es05?*n)3);h2KavV^A`vF+j(cf6CW8N+Ia%j1lXc~yBk6C~1 ze`kMxETx_{95O%q#Y!91v_7Ser^ixWx-Kb)kVS2*+PXjvh+-^Ul zbbWhbETsihJLtf;lgqgNdV8HxN*``MeK{qTQiCeW0ZmgHb>qdC-)}yo^e=|lZUn{i R^F#mu002ovPDHLkV1jpIv|9iG literal 0 HcmV?d00001 diff --git a/assets/images/pharmacy_module/bg_3.png b/assets/images/pharmacy_module/bg_3.png new file mode 100644 index 0000000000000000000000000000000000000000..127c266984f68af8a40dc6f9aa0b95d0d7282ef4 GIT binary patch literal 1651 zcmV-(28{WMP)5yXZHsDcjB9R;Y;KKgZ;fqmj&5*{ZgG!qa*uFwka2U7a&(b$b&_*+l682Lc6pWm z|NjyCrr`hp01$LiPE!B|2ODf{ZpO#R$WqN(^f@UVP7A07o50)3x9D9PtD3J`afnxj5S+DsJ{&hX_`=yRQ~eSu@bHG z@L6XotwC_MTMJJ%n-p|l&0WQ0eY%=ET}?y(tlY9b?e_$-(-WR`cHOV58RI#pp>I|c zCsD)1AY6%nwiK&%qbA=^I{8@FWo>+MWD8+i=;`+GLzh3o(*N1$k{t0v=`J2=wnw)iH55P2bHMev*LZ@IQNlc=+dNW^H z+S759ve?N9god)NHnr0OSG7X4_qR415q(t>oqiQ5#fHsBa;L+Is_`(^wkNFhc3)@X z7j}0~SB+gQ^EbDUEER0^a@8kQ*fkrqvTv;NsE1W;;Ods!$L^lcudD6k!R{$m%1KtA z2Pe!fkSZ08&Q~|yq6w_Y^Zg2{h765R!r^@@1=mV?(l{3N32IA>xd+5@3FEDW%Fp1l zibK4$$qBe=5+a?Hl^mpV(N0bzNpwUv0&gWbNDQs(L++@Zz(3~%88<^X^_=j{ zs4bRmtfR=>S=%~qO%!dp#(EQdvanB>v1#Wx>MkH zb@=$WKJMvkv3(j*!QBGCn-s_A>w7(6;1RU~4~m!Z1LsA9SXrL!-YKuw2P~C3#!A5# zrcrbXR=XK5I6JjQ;IO{R5X8gft!fFKG*Mxf%>-`hd zfBAE`4z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YEm2P8f`W>Ni z$gn#h`x+46u~|AauZ%mwF$bb-mMNPIbOfI@&L-6n+|jM;l(J?GPb=a6s-8N6lrihO zHocC3OS+kH4J5GHq6Y9RS+UJ|0-JtGXUf`1WV7Uzbhc}&@AlU?n=@nuwlmZ7|A^WP zwC187JZP=!<;1K~jLimRv+8eWtXYavAlT4Ht17@feblmo7mYt7U*m1AT$^4=<2upK zXC)i!)hX*b`1Vyl^*|HfKPZV=V{D2BT6mkonYZe6J`Jn>3cImzWVM$7PwI(v`Uqf1 ziCBG`xWBqKE6d=tf^CinVjHEgN?5td9N@XBr<@h1M_Q;C;H~`}WtP`siG5h&8sa4nJQnR`uOGnls z7P-?;tRkrjIRUF&jkY<67{Jr9R`0RJ?y+7M$^(E^JJzc@+`(>GOqc_2X1|cl4{Z(s zcJ#vU;9EMyOme@dCeEyPY#v9(S~}K1pyJF51S-xfBqz_;IGbL7^+(3)IMv>8X$KmW z^e_!HDs9s{XMR=R*lb1(;6{zh@bYUwiI`U29v5~w7Fhpg(;L9$^^leGtT>ye0es4{ z!YW#B;Kglc+Ri9rRF3*>d6hnVt%tTVUDVI|=05pt zeOx%ugv?R#vk({80a%4TF7ysxxq3N!QttW-es_#=MardR*~002ovPDHLkV1lcV+`#|< literal 0 HcmV?d00001 diff --git a/assets/images/pharmacy_module/medication_icon.png b/assets/images/pharmacy_module/medication_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..95851e4ec9be696a0ad3a16d2100e2159f6aa9e2 GIT binary patch literal 2080 zcmV+*2;cXKP)pk>)xKmY5*<;t_98oDkYltXpihJfjUP0Yr$Si@r?SuuF^G>ZJ-_n+y{KJ zLDluZbHE~CE${}g71$g?c&n`3O!l?FcYwYPs;&X92_YvekQpXv?j(M{OU zNcM5+{t~0*`LY6fsCTI?H3SaZV4^n4VA!$*ksa@tFs~EXkeN%l(Jw+Xo`}HYG+D-jk6$7`Zjhs%0qd`wTs+L*4 z{zrOS6|z^=6Fb3%BKkBMu0JkIIKj4_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EldK=NXqW4C17FlHU8m&ed5aG-N%|R;8x?kg1VujdUj@P z@9cS0CVy&`y1i_hL0@Xld#6d=8-Y2w=MMuv0y=7gdneJE%u_cIoyl@y)U|^c1oX{* z&*O%AP80R<sCcLJpv$8M0-gxx3K6{>J zyo_;$@mftap3m48j}=j1fNe8g+thz|l#v|)b+~bVnn$to$&BDUYhP!1*NrrK-A#!; zEoLWODJn_he(LGOweAmHp>SEKBZz^-5y`8cgb?Z{s?{$W^QJ}7w5!g-)uTGgJqUHqj^`Le!B_d7OEFoFjZ0u?YebQ5_=2O z5m-qamJgK3&euhk%}HavW(F{Un3dZJYy(yUtB9$`xg}DMh4Ej*k8ke>#I$$-0000< KMNUMnLSTZ_nEP7* literal 0 HcmV?d00001 diff --git a/assets/images/pharmacy_module/offer_icon.png b/assets/images/pharmacy_module/offer_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..64db2b76da01e2797ea12705102fa12f16e90877 GIT binary patch literal 4540 zcmV;t5ku~YP)t!Zp?lBcH4_L%<2B`gi>v$U~WICIP*$&3BTC`4?g6=;6 z)INRR>y!(f!>Xbj=*s5>SEP~uGe8@wDWe*y$))wR6z==@mkFJlAIEb0w1cF9)POYm ze+Cp(k-luKp=@t>Md81Xe}%|(B+AHMDnKpxEA28l%+@g#u|iCR?C~ESLTiIVkjV1; z?X1DZ)*42=b9qHNYNHZc+>V#)S%Z6Lzd1^_A3 z+8WH1{nS2($1I|pDx-M1sKjbi^+oTpSy(_{Rr{X_T{MxxpGCQte;nn7G78Hs0u&eK zAxPy?SZ}%3uo7AIk^|MN;T82bRFeAmGFS~nfTU(%@Yy7G*Q=^?{B866o zM>0Ozz6ra_D1gmK%@{B{8xR^B!xwU$d~QQE(YbFS?QNH_ zy*dFq3|V~gVKWDn%bOaS6>5mmg;-)wo|f2CtNnf(8?ckht`jJ@&#?Unk`M_RYA6R) zPCrDfm1aWbH2Hm6fyJYlKR;2Iw&oLCE*zKMgjF(|hF9bn_0QFr?aya#4Hn2g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ZgxAB+gOi2wiq literal 0 HcmV?d00001 diff --git a/assets/images/pharmacy_module/prescription_icon.png b/assets/images/pharmacy_module/prescription_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..740004c7bd99820ec858f10c14d1386254af4ecf GIT binary patch literal 1498 zcmV<01tt24P)KYK~!jg&6-HKR;3OG_dn?M8|@MJ6O-78-_P zq|}2E6utTo1rZdfL^mp=QX%yr^HQcLqGsT2rY0>*!^=21W@+j;zaG}No#pQAJ^S1o z|FGF-t?#z}XRYunUNyT`U@0&G=nHfL1_93ib*6Iycp$Lt6Ufr=Vb=CI07;F` zxxN_*%#pN6QnREdopY-b^r|GiCh0{6Nm4ie@ zRz<@kdoRpt;G8=x=_4yXmS?<7sLHAcR7e^osVUmD0aGO1XezhadkQ|+w@O;!oNJJ@ zF{V>eWF{f0hv^@eB%qt5&m~pH^kxR1Yb8At*+{y&ux6$s9}*`ewMgnCNzS={fN7Ej znS83Gk@7?5C#zd!@2K$+nUW$i3FllZP%mi&Fx)v;=bXDZ`GDc_B$henzKWSg>qPNq zhaAXvVlTJ%b6E|5u4)@%EAot&IY>S!wjXc`I1h}8$>v%r9TclyXfZMoDEm4QG#31J zqBcdZ3V6eGn}ER?{gwy#&s=Pw@MpX_6+&FM2&C9g+0Cq-B!UIOixdMrIV+6Xil7J&|vUy&{n~oPf@f z!einw=iI?S-b2!mBICD6+U=ZcEyhXOoLDdE?x1`YxXwA(XytlI*Ax@nFi+B3LHSJV z-7eBdESB_lP(C2(L{NTT(mh!NCE%RecDNC?NqR!k=B!TgKAx5fKwn8?B@K|&C~1Rp z?od|a4$V&ZlivdTkvGHz;8UPi7AGA>0_Xv3u{NB--<-?`7Sr}qLmkkkJx4i7n6rKO z!~cF@9sZUglD`+o(w-f_$OHmgE&dMR+L*j2@QukoE0o07vF>dGdIs_=cSq5%m>Bb2 z6A;)A)Fia627jT}N^EzWl|+So8_`o8lUK#$Nl*7e2n70Xo9@gcox~Jt3($!ac}to+ zp+Pm0R!bTssXEQOFbQy3NbJfnNe2Y-qrlD#1i~zIaSq_mBZ)+S zF2J`r+7Mw4QKCs9aVPLn&=Zqm^3lK@?GSLls-#JrM8pWJGrPmqbI}28Hqc<7HvpAo zUF?9z&Hs-C={ctJbVwuzfx)JC(CVu3!)&jWXO)}8O7ow32OA@@GZ->+1D%T`to%sS z8|5bP3x1)>*$Xk2;+>Oh-29vlB=x_Ctt!^LC z+v>uJ-35Og1TarPBYrP`eHlnp0N+`#Ex^6_v|9m;0e*-RFgq6`Hxc;5%Hsn9yMfN( zUFlii&k{Wwflk(--uQeT;WTh2C~qdmpJVWw$Ivd0J;1=QOBc}g8*(YoKrnoOO8mmM z7N7eMe*xQo7efF40T@-7YVv`P3;+NC07*qoM6N<$f}yj+ A761SM literal 0 HcmV?d00001 diff --git a/assets/images/pharmacy_module/search_scan_icon.png b/assets/images/pharmacy_module/search_scan_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..d168b0e665eb4e591866e699b15a767b2d702fc0 GIT binary patch literal 1090 zcmV-I1ikx-P)}>0*#I;S_ek1|plr zpn@!d#Pp%?rH4uogEGu|3GD(>FNzamG`$&JBs06~pn-v7l#^lQCA9hVu-7^5*>ldB zInH?YA2w_4?^|o_-}%m7Ykg~@cBuQzSO2P?tCx{cQ1=7p0Pg|A*#>n|Bk(xT8$wt- z!V`bN+FY8?%cucp2mU_$IA^AY z5W-)1LsU~CPW?rBgH%!jumd^~qRYno3Ih z)S06Il6JGzo$9dKo%R)grg#B-29%8qa3WPU0rvoHW!lXl*&>VM1M~u2A%sKf3iT)T zxcZ~|G_V(#59|isR4+->ml9U>clGTG5o}cNP(zsrlp>h1Z;Lr!OUkxM{ZxHR{Wdz z>^D7@Ct)<;8j{2`tM6-k2qbCSFmMaWd1So06*vkE05EFSOrqj!9aNjg*}g5V%kLCz zLH&dzYG)Fqv2+p1@nAy;VaXV9jU>BF2QWK?uoservN9l%D+Ai4?y|DVetsFXZPfv^4Y(R; zAvp`}0{Tea*S2c8VQx~pV-#1Z8`YQdW*Q;&wz%A-bxqz}z=)jjsL3ak>(!I$ro7pJ z(&SNnDrMUcXZ59dvK3(p>K=8!Iwjg>nPk_m@{vf0<r;0c8XD!_0;*nE(I)07*qo IM6N<$f^Q53M*si- literal 0 HcmV?d00001 diff --git a/lib/config/config.dart b/lib/config/config.dart index 40ffc502..457a1a76 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -6,7 +6,8 @@ import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; const MAX_SMALL_SCREEN = 660; -const BASE_URL = 'https://uat.hmgwebservices.com/'; +// const BASE_URL = 'https://hmgwebservices.com/'; +const BASE_URL = 'https://uat.hmgwebservices.com//'; const GET_PROJECT = 'Services/Lists.svc/REST/GetProject'; @@ -57,11 +58,16 @@ const GET_NEAREST_HOSPITAL = 'Services/Patients.svc/REST/Patient_GetProjectAvgERWaitingTime'; ///Er Nearest -const GET_AMBULANCE_REQUEST = 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; -const GET_PATIENT_ALL_PRES_ORDERS= 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; -const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID= 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID'; -const UPDATE_PRESS_ORDER = 'Services/Patients.svc/REST/PatientER_UpdatePresOrder'; -const INSERT_ER_INERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; +const GET_AMBULANCE_REQUEST = + 'Services/Patients.svc/REST/PatientER_RRT_GetAllTransportationMethod'; +const GET_PATIENT_ALL_PRES_ORDERS = + 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = + 'Services/Patients.svc/REST/PatientER_RRT_GetPickUpRequestByPresOrderID'; +const UPDATE_PRESS_ORDER = + 'Services/Patients.svc/REST/PatientER_UpdatePresOrder'; +const INSERT_ER_INERT_PRES_ORDER = + 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; ///FindUs const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations'; @@ -141,7 +147,8 @@ const GET_PATIENT_SHARE = "Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNO"; //URL to get patient appointment history -const GET_PATIENT_APPOINTMENT_HISTORY = "Services/Doctors.svc/REST/PateintHasAppoimentHistory"; +const GET_PATIENT_APPOINTMENT_HISTORY = + "Services/Doctors.svc/REST/PateintHasAppoimentHistory"; //URL to get patient appointment curfew history const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY = @@ -264,13 +271,14 @@ const SEND_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = const CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT = 'Services/Authentication.svc/REST/CheckActivationCodeForAdvancePayment'; +const GET_COVID_DRIVETHRU_PROJECT_LIST = + 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter'; -const GET_COVID_DRIVETHRU_PROJECT_LIST = 'Services/Doctors.svc/REST/COVID19_ProjectDriveThroughTestingCenter'; - -const GET_COVID_DRIVETHRU_PAYMENT_INFO = 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation'; - -const GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots'; +const GET_COVID_DRIVETHRU_PAYMENT_INFO = + 'Services/Doctors.svc/REST/COVID19_GetPatientPaymentInormation'; +const GET_COVID_DRIVETHRU_FREE_SLOTS = + 'Services/Doctors.svc/REST/COVID19_GetFreeSlots'; ///My Trackers const GET_DIABETIC_RESULT_AVERAGE = @@ -324,14 +332,23 @@ const GET_ALL_CITIES = 'services/Lists.svc/rest/GetAllCities'; const CREATE_E_REFERRAL = "Services/Patients.svc/REST/CreateEReferral"; const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals"; +// pharmacy +const GET_PHARMACY_BANNER = "epharmacy/api/promotionbanners"; +const GET_PHARMACY_TOP_MANUFACTURER = "epharmacy/api/topmanufacturer"; +const GET_PHARMACY_BEST_SELLER_PRODUCT = "epharmacy/api/bestsellerproducts"; // Home Health Care -const HHC_GET_ALL_SERVICES = "Services/Patients.svc/REST/PatientER_HHC_GetAllServices"; -const HHC_GET_ALL_CMC_SERVICES = "Services/Patients.svc/REST/PatientER_CMC_GetAllServices"; -const PATIENT_ER_UPDATE_PRES_ORDER ="Services/Patients.svc/REST/PatientER_UpdatePresOrder"; -const GET_ORDER_DETAIL_BY_ID ="Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder"; -const GET_CMC_ORDER_DETAIL_BY_ID ="Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder"; -const GET_CHECK_UP_ITEMS ="Services/Patients.svc/REST/GetCheckUpItems"; +const HHC_GET_ALL_SERVICES = + "Services/Patients.svc/REST/PatientER_HHC_GetAllServices"; +const HHC_GET_ALL_CMC_SERVICES = + "Services/Patients.svc/REST/PatientER_CMC_GetAllServices"; +const PATIENT_ER_UPDATE_PRES_ORDER = + "Services/Patients.svc/REST/PatientER_UpdatePresOrder"; +const GET_ORDER_DETAIL_BY_ID = + "Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder"; +const GET_CMC_ORDER_DETAIL_BY_ID = + "Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder"; +const GET_CHECK_UP_ITEMS = "Services/Patients.svc/REST/GetCheckUpItems"; const TIMER_MIN = 10; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index a44ffec6..10d82424 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -344,7 +344,7 @@ const Map> localizedValues = { "en": "Home Health Care Service", 'ar': 'الرعاية الصحية المنزلية' }, - "OnlinePharmacy": {"en": "Online Pharmacy", 'ar': 'صيدلايات الحبيب'}, + "OnlinePharmacy": {"en": "Online Pharmacy", 'ar': 'صيدليات الحبيب'}, "EmergencyService": {"en": "Emergency Service", 'ar': 'الفحص الطبي الشامل'}, "OnlinePaymentService": { "en": "Online Payment Service", @@ -621,4 +621,33 @@ const Map> localizedValues = { "ar": "خدمة الاشعة: هذه الخدمة تمكنك من الاطلاع على تقارير وصور الاشعة التي تمت في مجموعة الحبيب الطبية وكذلك ارسال التقرير عن طريق الايميل." }, + // pharmacy module + "medicationRefill": { + "en": "MEDICATION REFILL", + "ar": "إعادة تعبئة الدواء" + }, + "offersAndPromotions": { + "en": "OFFERS & SPECIAL PROMOTIONS", + "ar": "العروض والترقيات الخاصة" + }, + "myPrescriptions": { + "en": "MY PRESCRIPTIONS", + "ar": "وصفاتي" + }, + "searchAndScanMedication": { + "en": "SEARCH & SCAN FOR MEDICATION", + "ar": "البحث والمسح للأدوية" + }, + "shopByBrands": { + "en": "Shop By Brands", + "ar": "تسوق حسب الماركات" + }, + "recentlyViewed": { + "en": "Recently Viewed", + "ar": "شوهدت مؤخرا" + }, + "bestSellers": { + "en": "Best Sellers", + "ar": "أفضل البائعين" + }, }; diff --git a/lib/core/model/pharmacy_module/Customer.dart b/lib/core/model/pharmacy_module/Customer.dart new file mode 100644 index 00000000..a5311489 --- /dev/null +++ b/lib/core/model/pharmacy_module/Customer.dart @@ -0,0 +1,128 @@ +class Customer { + String fileNumber; + String iqamaNumber; + int isOutSa; + int patientType; + String gender; + String birthDate; + String phone; + String countryCode; + String yahalaAccountno; + String billingAddress; + String shippingAddress; + String id; + String username; + String email; + String firstName; + String lastName; + String languageId; + String adminComment; + String isTaxExempt; + String hasShoppingCartItems; + String active; + String deleted; + String isSystemAccount; + String systemName; + String lastIpAddress; + String createdOnUtc; + String lastLoginDateUtc; + String lastActivityDateUtc; + String registeredInStoreId; + + Customer( + {this.fileNumber, + this.iqamaNumber, + this.isOutSa, + this.patientType, + this.gender, + this.birthDate, + this.phone, + this.countryCode, + this.yahalaAccountno, + this.billingAddress, + this.shippingAddress, + this.id, + this.username, + this.email, + this.firstName, + this.lastName, + this.languageId, + this.adminComment, + this.isTaxExempt, + this.hasShoppingCartItems, + this.active, + this.deleted, + this.isSystemAccount, + this.systemName, + this.lastIpAddress, + this.createdOnUtc, + this.lastLoginDateUtc, + this.lastActivityDateUtc, + this.registeredInStoreId}); + + Customer.fromJson(Map json) { + fileNumber = json['file_number']; + iqamaNumber = json['iqama_number']; + isOutSa = json['is_out_sa']; + patientType = json['patient_type']; + gender = json['gender']; + birthDate = json['birth_date']; + phone = json['phone']; + countryCode = json['country_code']; + yahalaAccountno = json['yahala_accountno']; + billingAddress = json['billing_address']; + shippingAddress = json['shipping_address']; + id = json['id']; + username = json['username']; + email = json['email']; + firstName = json['first_name']; + lastName = json['last_name']; + languageId = json['language_id']; + adminComment = json['admin_comment']; + isTaxExempt = json['is_tax_exempt']; + hasShoppingCartItems = json['has_shopping_cart_items']; + active = json['active']; + deleted = json['deleted']; + isSystemAccount = json['is_system_account']; + systemName = json['system_name']; + lastIpAddress = json['last_ip_address']; + createdOnUtc = json['created_on_utc']; + lastLoginDateUtc = json['last_login_date_utc']; + lastActivityDateUtc = json['last_activity_date_utc']; + registeredInStoreId = json['registered_in_store_id']; + } + + Map toJson() { + final Map data = new Map(); + data['file_number'] = this.fileNumber; + data['iqama_number'] = this.iqamaNumber; + data['is_out_sa'] = this.isOutSa; + data['patient_type'] = this.patientType; + data['gender'] = this.gender; + data['birth_date'] = this.birthDate; + data['phone'] = this.phone; + data['country_code'] = this.countryCode; + data['yahala_accountno'] = this.yahalaAccountno; + data['billing_address'] = this.billingAddress; + data['shipping_address'] = this.shippingAddress; + data['id'] = this.id; + data['username'] = this.username; + data['email'] = this.email; + data['first_name'] = this.firstName; + data['last_name'] = this.lastName; + data['language_id'] = this.languageId; + data['admin_comment'] = this.adminComment; + data['is_tax_exempt'] = this.isTaxExempt; + data['has_shopping_cart_items'] = this.hasShoppingCartItems; + data['active'] = this.active; + data['deleted'] = this.deleted; + data['is_system_account'] = this.isSystemAccount; + data['system_name'] = this.systemName; + data['last_ip_address'] = this.lastIpAddress; + data['created_on_utc'] = this.createdOnUtc; + data['last_login_date_utc'] = this.lastLoginDateUtc; + data['last_activity_date_utc'] = this.lastActivityDateUtc; + data['registered_in_store_id'] = this.registeredInStoreId; + return data; + } +} \ No newline at end of file diff --git a/lib/core/model/pharmacy_module/Manufacturer.dart b/lib/core/model/pharmacy_module/Manufacturer.dart new file mode 100644 index 00000000..3b16337b --- /dev/null +++ b/lib/core/model/pharmacy_module/Manufacturer.dart @@ -0,0 +1,98 @@ +import 'PharmacyImageObject.dart'; + +class Manufacturer { + String id; + String name; + String namen; + // List localizedNames; + String description; + int manufacturerTemplateId; + String metaKeywords; + String metaDescription; + String metaTitle; + int pageSize; + String pageSizeOptions; + String priceRanges; + bool published; + bool deleted; + int displayOrder; + String createdOnUtc; + String updatedOnUtc; + PharmacyImageObject image; + + Manufacturer( + {this.id, + this.name, + this.namen, + // this.localizedNames, + this.description, + this.manufacturerTemplateId, + this.metaKeywords, + this.metaDescription, + this.metaTitle, + this.pageSize, + this.pageSizeOptions, + this.priceRanges, + this.published, + this.deleted, + this.displayOrder, + this.createdOnUtc, + this.updatedOnUtc, + this.image}); + + Manufacturer.fromJson(Map json) { + id = json['id']; + name = json['name']; + namen = json['namen']; + // if (json['localized_names'] != null) { + // localizedNames = new List(); + // json['localized_names'].forEach((v) { + // localizedNames.add(new LocalizedNames.fromJson(v)); + // }); + // } + description = json['description']; + manufacturerTemplateId = json['manufacturer_template_id']; + metaKeywords = json['meta_keywords']; + metaDescription = json['meta_description']; + metaTitle = json['meta_title']; + pageSize = json['page_size']; + pageSizeOptions = json['page_size_options']; + priceRanges = json['price_ranges']; + published = json['published']; + deleted = json['deleted']; + displayOrder = json['display_order']; + createdOnUtc = json['created_on_utc']; + updatedOnUtc = json['updated_on_utc']; + image = json['image'] != null + ? new PharmacyImageObject.fromJson(json['image']) + : null; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['name'] = this.name; + data['namen'] = this.namen; + // if (this.localizedNames != null) { + // data['localized_names'] = + // this.localizedNames.map((v) => v.toJson()).toList(); + // } + data['description'] = this.description; + data['manufacturer_template_id'] = this.manufacturerTemplateId; + data['meta_keywords'] = this.metaKeywords; + data['meta_description'] = this.metaDescription; + data['meta_title'] = this.metaTitle; + data['page_size'] = this.pageSize; + data['page_size_options'] = this.pageSizeOptions; + data['price_ranges'] = this.priceRanges; + data['published'] = this.published; + data['deleted'] = this.deleted; + data['display_order'] = this.displayOrder; + data['created_on_utc'] = this.createdOnUtc; + data['updated_on_utc'] = this.updatedOnUtc; + if (this.image != null) { + data['image'] = this.image.toJson(); + } + return data; + } +} diff --git a/lib/core/model/pharmacy_module/PharmacyImageObject.dart b/lib/core/model/pharmacy_module/PharmacyImageObject.dart new file mode 100644 index 00000000..d3db634b --- /dev/null +++ b/lib/core/model/pharmacy_module/PharmacyImageObject.dart @@ -0,0 +1,27 @@ +class PharmacyImageObject { + int id; + int position; + String src; + String thumb; + String attachment; + + PharmacyImageObject({this.id, this.position, this.src, this.thumb, this.attachment}); + + PharmacyImageObject.fromJson(Map json) { + id = json['id']; + position = json['position']; + src = json['src']; + thumb = json['thumb']; + attachment = json['attachment']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['position'] = this.position; + data['src'] = this.src; + data['thumb'] = this.thumb; + data['attachment'] = this.attachment; + return data; + } +} diff --git a/lib/core/model/pharmacy_module/PharmacyProduct.dart b/lib/core/model/pharmacy_module/PharmacyProduct.dart new file mode 100644 index 00000000..cd461ae5 --- /dev/null +++ b/lib/core/model/pharmacy_module/PharmacyProduct.dart @@ -0,0 +1,149 @@ +import 'PharmacyImageObject.dart'; +import 'Reviews.dart'; + +class PharmacyProduct { + String id; + String name; + String namen; + String shortDescription; + String fullDescription; + String fullDescriptionn; + int approvedRatingSum; + int approvedTotalReviews; + String sku; + bool isRx; + String rxMessage; + String rxMessagen; + int stockQuantity; + String stockAvailability; + String stockAvailabilityn; + bool allowBackInStockSubscriptions; + int orderMinimumQuantity; + int orderMaximumQuantity; + double price; + double oldPrice; + String discountName; + String discountNamen; + String discountPercentage; + int displayOrder; + List discountIds; + List reviews; + List images; + + PharmacyProduct( + {this.id, + this.name, + this.namen, + this.shortDescription, + this.fullDescription, + this.fullDescriptionn, + this.approvedRatingSum, + this.approvedTotalReviews, + this.sku, + this.isRx, + this.rxMessage, + this.rxMessagen, + this.stockQuantity, + this.stockAvailability, + this.stockAvailabilityn, + this.allowBackInStockSubscriptions, + this.orderMinimumQuantity, + this.orderMaximumQuantity, + this.price, + this.oldPrice, + this.discountName, + this.discountNamen, + this.discountPercentage, + this.displayOrder, + this.discountIds, + this.reviews, + this.images}); + + PharmacyProduct.fromJson(Map json) { + try { + id = json['id']; + name = json['name']; + namen = json['namen']; + shortDescription = json['short_description']; + fullDescription = json['full_description']; + fullDescriptionn = json['full_descriptionn']; + approvedRatingSum = json['approved_rating_sum']; + approvedTotalReviews = json['approved_total_reviews']; + sku = json['sku']; + isRx = json['is_rx']; + rxMessage = json['rx_message']; + rxMessagen = json['rx_messagen']; + stockQuantity = json['stock_quantity']; + stockAvailability = json['stock_availability']; + stockAvailabilityn = json['stock_availabilityn']; + allowBackInStockSubscriptions = json['allow_back_in_stock_subscriptions']; + orderMinimumQuantity = json['order_minimum_quantity']; + orderMaximumQuantity = json['order_maximum_quantity']; + price = json['price']; + oldPrice = json['old_price']; + discountName = json['discount_name']; + discountNamen = json['discount_namen']; + discountPercentage = json['discount_percentage']; + displayOrder = json['display_order']; + if (json['discount_ids'] != null) { + discountIds = new List(); + json['discount_ids'].forEach((v) { + discountIds.add(v); + }); + } + if (json['reviews'] != null) { + reviews = new List(); + json['reviews'].forEach((v) { + reviews.add(new Reviews.fromJson(v)); + }); + } + if (json['images'] != null) { + images = new List(); + json['images'].forEach((v) { + images.add(new PharmacyImageObject.fromJson(v)); + }); + } + } catch (e) { + print(e); + } + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['name'] = this.name; + data['namen'] = this.namen; + data['short_description'] = this.shortDescription; + data['full_description'] = this.fullDescription; + data['full_descriptionn'] = this.fullDescriptionn; + data['approved_rating_sum'] = this.approvedRatingSum; + data['approved_total_reviews'] = this.approvedTotalReviews; + data['sku'] = this.sku; + data['is_rx'] = this.isRx; + data['rx_message'] = this.rxMessage; + data['rx_messagen'] = this.rxMessagen; + data['stock_quantity'] = this.stockQuantity; + data['stock_availability'] = this.stockAvailability; + data['stock_availabilityn'] = this.stockAvailabilityn; + data['allow_back_in_stock_subscriptions'] = + this.allowBackInStockSubscriptions; + data['order_minimum_quantity'] = this.orderMinimumQuantity; + data['order_maximum_quantity'] = this.orderMaximumQuantity; + data['price'] = this.price; + data['old_price'] = this.oldPrice; + data['discount_name'] = this.discountName; + data['discount_namen'] = this.discountNamen; + data['discount_percentage'] = this.discountPercentage; + data['display_order'] = this.displayOrder; + if (this.discountIds != String) { + data['discount_ids'] = this.discountIds.map((v) => v).toList(); + } + if (this.reviews != String) { + data['reviews'] = this.reviews.map((v) => v.toJson()).toList(); + } + if (this.images != String) { + data['images'] = this.images.map((v) => v.toJson()).toList(); + } + return data; + } +} diff --git a/lib/core/model/pharmacy_module/Reviews.dart b/lib/core/model/pharmacy_module/Reviews.dart new file mode 100644 index 00000000..ec0de75e --- /dev/null +++ b/lib/core/model/pharmacy_module/Reviews.dart @@ -0,0 +1,82 @@ +import 'Customer.dart'; + +class Reviews { + int id; + int position; + int reviewId; + int customerId; + int productId; + int storeId; + bool isApproved; + String title; + String reviewText; + Null replyText; + int rating; + int helpfulYesTotal; + int helpfulNoTotal; + String createdOnUtc; + Customer customer; + Null product; + + Reviews( + {this.id, + this.position, + this.reviewId, + this.customerId, + this.productId, + this.storeId, + this.isApproved, + this.title, + this.reviewText, + this.replyText, + this.rating, + this.helpfulYesTotal, + this.helpfulNoTotal, + this.createdOnUtc, + this.customer, + this.product}); + + Reviews.fromJson(Map json) { + id = json['id']; + position = json['position']; + reviewId = json['review_id']; + customerId = json['customer_id']; + productId = json['product_id']; + storeId = json['store_id']; + isApproved = json['is_approved']; + title = json['title']; + reviewText = json['review_text']; + replyText = json['reply_text']; + rating = json['rating']; + helpfulYesTotal = json['helpful_yes_total']; + helpfulNoTotal = json['helpful_no_total']; + createdOnUtc = json['created_on_utc']; + customer = json['customer'] != null + ? new Customer.fromJson(json['customer']) + : null; + product = json['product']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['position'] = this.position; + data['review_id'] = this.reviewId; + data['customer_id'] = this.customerId; + data['product_id'] = this.productId; + data['store_id'] = this.storeId; + data['is_approved'] = this.isApproved; + data['title'] = this.title; + data['review_text'] = this.reviewText; + data['reply_text'] = this.replyText; + data['rating'] = this.rating; + data['helpful_yes_total'] = this.helpfulYesTotal; + data['helpful_no_total'] = this.helpfulNoTotal; + data['created_on_utc'] = this.createdOnUtc; + if (this.customer != null) { + data['customer'] = this.customer.toJson(); + } + data['product'] = this.product; + return data; + } +} \ No newline at end of file diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index d2bfa4fa..11319d96 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -77,7 +77,7 @@ class BaseAppClient { body['PatientID'] = body['PatientID'] != null ? body['PatientID'] : user['PatientID']; body['PatientOutSA'] = user['OutSA']; - body['SessionID'] = SESSION_ID;//getSessionId(token); + body['SessionID'] = SESSION_ID; //getSessionId(token); } } @@ -139,6 +139,38 @@ class BaseAppClient { } } + get(String endPoint, + {Function(dynamic response, int statusCode) onSuccess, + Function(String error, int statusCode) onFailure, + bool isAllowAny = false, + Map queryParams}) async { + String url = BASE_URL + endPoint; + if (queryParams != null) { + String queryString = Uri(queryParameters: queryParams).query; + url += '?' + queryString; + } + + print("URL : $url"); + + if (await Utils.checkConnection()) { + final response = await http.get(url.trim(), headers: { + 'Content-Type': 'application/json', + 'Accept': 'application/json' + }); + final int statusCode = response.statusCode; + print("statusCode :$statusCode"); + + if (statusCode < 200 || statusCode >= 400 || json == null) { + onFailure('Error While Fetching data', statusCode); + } else { + var parsed = json.decode(response.body.toString()); + onSuccess(parsed, statusCode); + } + } else { + onFailure('Please Check The Internet Connection', -1); + } + } + logout() async { await sharedPref.remove(LOGIN_TOKEN_ID); Navigator.of(AppGlobal.context).pushReplacementNamed(LOGIN_TYPE); diff --git a/lib/core/service/parmacyModule/parmacy_module_service.dart b/lib/core/service/parmacyModule/parmacy_module_service.dart new file mode 100644 index 00000000..3bec5ba5 --- /dev/null +++ b/lib/core/service/parmacyModule/parmacy_module_service.dart @@ -0,0 +1,72 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy_module/Manufacturer.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy_module/PharmacyImageObject.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy_module/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class PharmacyModuleService extends BaseService { + bool isFinished = true; + bool hasError = false; + String errorMsg = ''; + + List bannerItems = List(); + List manufacturerList = List(); + List bestSellerProducts = List(); + + Future getBannerListList() async { + hasError = false; + try { + await baseAppClient.get(GET_PHARMACY_BANNER, + onSuccess: (dynamic response, int statusCode) { + bannerItems.clear(); + response['images'].forEach((item) { + bannerItems.add(PharmacyImageObject.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + } catch (error) { + throw error; + } + } + + Future getTopManufacturerList() async { + Map queryParams = {'page': '1', 'limit': '8'}; + try { + await baseAppClient.get(GET_PHARMACY_TOP_MANUFACTURER, + onSuccess: (dynamic response, int statusCode) { + manufacturerList.clear(); + response['manufacturer'].forEach((item) { + manufacturerList.add(Manufacturer.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams); + } catch (error) { + throw error; + } + } + + Future getBestSellerProducts() async { + Map queryParams = { + 'fields': + 'id,discount_ids,name,namen,localized_names,display_order,short_description,full_description,full_descriptionn,sku,order_minimum_quantity,order_maximum_quantity,price,old_price,images,is_rx,rx_message,rx_messagen,discount_name,discount_namen,approved_rating_sum,approved_total_reviews,allow_back_in_stock_subscriptions,stock_quantity,stock_availability,stock_availabilityn,discount_percentage,reviews', + }; + try { + await baseAppClient.get(GET_PHARMACY_BEST_SELLER_PRODUCT, + onSuccess: (dynamic response, int statusCode) { + bestSellerProducts.clear(); + response['products'].forEach((item) { + bestSellerProducts.add(PharmacyProduct.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams); + } catch (error) { + throw error; + } + } +} diff --git a/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart b/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart new file mode 100644 index 00000000..8d9207b0 --- /dev/null +++ b/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart @@ -0,0 +1,59 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy_module/Manufacturer.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy_module/PharmacyImageObject.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacy_module/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart'; +import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; + +import '../../../locator.dart'; + +class PharmacyModuleViewModel extends BaseViewModel { + PharmacyModuleService _pharmacyService = locator(); + + List get bannerList => _pharmacyService.bannerItems; + + List get manufacturerList => _pharmacyService.manufacturerList; + + List get bestSellerProduct => _pharmacyService.bestSellerProducts; + + Future getPharmacyHomeData() async { + setState(ViewState.Busy); + await _pharmacyService.getBannerListList(); + if (_pharmacyService.hasError) { + error = _pharmacyService.error; + setState(ViewState.Error); + } else { + _getTopManufacturerList(); + } + } + + List getBannerImagesUrl() { + List images = List(); + images.add('assets/images/pharmacy_module/pharmacy_logo_green.png'); + _pharmacyService.bannerItems.forEach((element) { + images.add(element.src); + }); + + return images; + } + + _getTopManufacturerList() async { + await _pharmacyService.getTopManufacturerList(); + if (_pharmacyService.hasError) { + error = _pharmacyService.error; + setState(ViewState.Error); + } else { + _getBestSellerProducts(); + } + } + + _getBestSellerProducts() async { + await _pharmacyService.getBestSellerProducts(); + if (_pharmacyService.hasError) { + error = _pharmacyService.error; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } +} diff --git a/lib/d_q_icons_icons.dart b/lib/d_q_icons_icons.dart index fc9679ca..040e6e08 100644 --- a/lib/d_q_icons_icons.dart +++ b/lib/d_q_icons_icons.dart @@ -30,4 +30,16 @@ 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 more_menu_icon = IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData offer_icon = IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData prescription_icon = IconData(0xe80b, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData search_scan_icon = IconData(0xe80c, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData share_icon = IconData(0xe80d, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData wishlist_add_icon = IconData(0xe80e, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData wishlist_icon = IconData(0xe80f, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData bg_1 = IconData(0xe810, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData bg_2 = IconData(0xe811, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData bg_3 = IconData(0xe812, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData bg_4 = IconData(0xe813, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData medication_icon = IconData(0xe814, fontFamily: _kFontFam, fontPackage: _kFontPkg); } diff --git a/lib/locator.dart b/lib/locator.dart index a71d7964..203bd8a0 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -43,6 +43,8 @@ import 'core/service/medical/radiology_service.dart'; import 'core/service/medical/reports_monthly_service.dart'; import 'core/service/medical/vital_sign_service.dart'; import 'core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; +import 'core/service/parmacyModule/parmacy_module_service.dart'; + import 'core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; import 'core/viewModels/appointment_rate_view_model.dart'; import 'core/viewModels/blooddonation/blood_details_view_model.dart'; @@ -78,6 +80,7 @@ import 'core/viewModels/pharmacies_view_model.dart'; import 'core/service/pharmacies_service.dart'; import 'core/service/insurance_service.dart'; import 'core/viewModels/insurance_card_View_model.dart'; +import 'core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'core/viewModels/qr_view_model.dart'; import 'core/viewModels/vaccine_view_model.dart'; import 'core/service/vaccine_service.dart'; @@ -132,9 +135,10 @@ void setupLocator() { locator.registerLazySingleton(() => CreteNewBabyService()); locator.registerLazySingleton(() => DeleteBabyService()); + locator.registerLazySingleton(() => VaccinationTableService()); - locator.registerLazySingleton(() => VaccinationTableService()); + locator.registerLazySingleton(() => PharmacyModuleService()); /// View Model @@ -177,8 +181,14 @@ void setupLocator() { locator.registerFactory(() => EyeViewModel()); locator.registerFactory(() => ActiveMedicationsViewModel()); locator.registerFactory(() => AskDoctorViewModel()); + locator.registerFactory(() => AllergiesViewModel()); locator.registerFactory(() => HomeHealthCareViewModel()); locator.registerFactory(() => CMCViewModel()); + + + + locator.registerFactory(() => PharmacyModuleViewModel()); + } diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index 06ac1577..59f01705 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; +import 'package:diplomaticquarterapp/pages/pharmacyModule/pharmacy_module_page.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; @@ -478,6 +479,8 @@ class _HomePageState extends State { opacity: 0.5, ), DashboardItem( + onTap: () => Navigator.push(context, FadePage(page: PharmacyPage())), + child: Center( child: Padding( padding: const EdgeInsets.all(15.0), @@ -782,7 +785,8 @@ class DashboardItem extends StatelessWidget { this.width, this.height, this.color, - this.opacity = 0.4}) + this.opacity = 0.4, + this.hasColorFilter = true}) : super(key: key); final bool hasBorder; final String imageName; @@ -792,6 +796,7 @@ class DashboardItem extends StatelessWidget { final double height; final Color color; final double opacity; + final bool hasColorFilter; @override Widget build(BuildContext context) { @@ -818,8 +823,8 @@ class DashboardItem extends StatelessWidget { ? DecorationImage( image: ExactAssetImage('assets/images/$imageName'), fit: BoxFit.cover, - colorFilter: new ColorFilter.mode( - Colors.black.withOpacity(0.2), BlendMode.dstIn), + colorFilter: hasColorFilter ? new ColorFilter.mode( + Colors.black.withOpacity(0.2), BlendMode.dstIn) : null, ) : null, ), diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index ff21d73e..439622b7 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -124,137 +124,137 @@ class _LandingPageState extends State with WidgetsBindingObserver { }); _requestIOSPermissions(); pageController = PageController(keepPage: true); - _firebaseMessaging.setAutoInitEnabled(true); - - if (Platform.isIOS) { - _firebaseMessaging.requestNotificationPermissions(); - } - - _firebaseMessaging.getToken().then((String token) { - sharedPref.setString(PUSH_TOKEN, token); - if (token != null) { - checkUserStatus(token); - } - requestPermissions(); - }).catchError((err) { - print(err); - }); - - //_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.setAutoInitEnabled(true); + // + // if (Platform.isIOS) { + // _firebaseMessaging.requestNotificationPermissions(); + // } + // + // _firebaseMessaging.getToken().then((String token) { + // sharedPref.setString(PUSH_TOKEN, token); + // if (token != null) { + // checkUserStatus(token); + // } + // requestPermissions(); + // }).catchError((err) { + // print(err); + // }); + // + // //_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"); + // // } + // // }, + // ); } showDialogs(String message) { diff --git a/lib/pages/pharmacyModule/pharmacy_module_page.dart b/lib/pages/pharmacyModule/pharmacy_module_page.dart new file mode 100644 index 00000000..60d55437 --- /dev/null +++ b/lib/pages/pharmacyModule/pharmacy_module_page.dart @@ -0,0 +1,233 @@ +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/pages/landing/home_page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacyModule/widgets/BannerPager.dart'; +import 'package:diplomaticquarterapp/pages/pharmacyModule/widgets/ProductTileItem.dart'; +import 'package:diplomaticquarterapp/pages/pharmacyModule/widgets/borderedButton.dart'; +import 'package:diplomaticquarterapp/pages/pharmacyModule/widgets/manufacturerItem.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; + +class PharmacyPage extends StatelessWidget { + + @override + Widget build(BuildContext context) { + return BaseView( + // onModelReady: (model) => model.getPharmacyHomeData(), + onModelReady: (model) => model.getPharmacyHomeData(), + builder: (_, model, wi) => AppScaffold( + title: "", + isShowAppBar: true, + isShowDecPage: false, + baseViewModel: model, + backgroundColor: Colors.white, + body: Container( + width: double.infinity, + child: SingleChildScrollView( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + BannerPager(model), + GridViewButtons(), + /*BannerPager(model.getBannerImagesUrl()),*/ + Container( + margin: EdgeInsets.fromLTRB(10, 0, 10, 0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts( + TranslationBase.of(context).shopByBrands, + bold: true, + ), + BorderedButton( + TranslationBase.of(context).viewAll, + hasBorder: true, + vPadding: 6, + borderColor: Colors.green, + color: Colors.green, + handler: () {}, + ), + ], + ), + ), + Container( + height: 60, + child: ListView.builder( + itemBuilder: (ctx, i) => + ManufacturerItem(model.manufacturerList[i]), + scrollDirection: Axis.horizontal, + itemCount: model.manufacturerList.length, + ), + ), + Container( + margin: EdgeInsets.fromLTRB(10, 10, 10, 10), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts( + TranslationBase.of(context).recentlyViewed, + bold: true, + ), + BorderedButton( + TranslationBase.of(context).viewAll, + hasBorder: true, + vPadding: 6, + borderColor: Colors.green, + color: Colors.green, + handler: () {}, + ), + ], + ), + ), + Container(), + Container( + margin: EdgeInsets.fromLTRB(10, 10, 10, 10), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts( + TranslationBase.of(context).bestSellers, + bold: true, + ), + BorderedButton( + TranslationBase.of(context).viewAll, + hasBorder: true, + borderColor: Colors.green, + color: Colors.green, + vPadding: 6, + handler: () {}, + ), + ], + ), + ), + Container( + height: MediaQuery.of(context).size.height / 4, + child: ListView.builder( + itemBuilder: (ctx, i) => + ProductTileItem(model.bestSellerProduct[i]), + scrollDirection: Axis.horizontal, + itemCount: model.bestSellerProduct.length, + ), + ), + ], + ), + ), + ), + ), + ); + } +} + +class GridViewButtons extends StatelessWidget { + @override + Widget build(BuildContext context) { + final gridHeight = (MediaQuery.of(context).size.width * 0.3) * 1.8; + return Container( + child: SizedBox( + height: gridHeight, + child: GridView.count( + childAspectRatio: 2.2, + crossAxisSpacing: 10, + mainAxisSpacing: 10, + controller: new ScrollController(keepScrollOffset: false), + shrinkWrap: true, + padding: const EdgeInsets.all(4.0), + crossAxisCount: 2, + children: [ + DashboardItem( + imageName: 'pharmacy_module/bg_1.png', + hasColorFilter: false, + opacity: 0.8, + child: GridViewCard( + TranslationBase.of(context).offersAndPromotions, + 'assets/images/pharmacy_module/offer_icon.png', + () {}), + ), + DashboardItem( + imageName: 'pharmacy_module/bg_2.png', + opacity: 0, + hasColorFilter: false, + child: GridViewCard(TranslationBase.of(context).medicationRefill, + 'assets/images/pharmacy_module/medication_icon.png', () {}), + ), + DashboardItem( + imageName: 'pharmacy_module/bg_3.png', + opacity: 0, + hasColorFilter: false, + child: GridViewCard(TranslationBase.of(context).myPrescriptions, + 'assets/images/pharmacy_module/prescription_icon.png', () {}), + ), + DashboardItem( + imageName: 'pharmacy_module/bg_4.png', + opacity: 0, + hasColorFilter: false, + child: GridViewCard( + TranslationBase.of(context).searchAndScanMedication, + 'assets/images/pharmacy_module/search_scan_icon.png', + () {}), + ), + ], + ), + ), + ); + } +} + +class GridViewCard extends StatelessWidget { + final String text; + final String cardImage; + final Function handler; + + GridViewCard(this.text, this.cardImage, this.handler); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(4.0), + child: Container( + child: Row( + children: [ + Expanded( + flex: 2, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 2, + child: Padding( + padding: const EdgeInsets.all(6), + child: Texts( + text, + color: Colors.white, + fontSize: SizeConfig.textMultiplier * 1.5, + ), + ), + ), + Expanded( + child: BorderedButton( + TranslationBase.of(context).viewAll, + handler: () {}, + ), + ), + ], + ), + ), + Expanded( + child: Align( + alignment: Alignment.centerRight, + child: Image.asset( + cardImage, + fit: BoxFit.cover, + ), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/pharmacyModule/widgets/BannerPager.dart b/lib/pages/pharmacyModule/widgets/BannerPager.dart new file mode 100644 index 00000000..989c7557 --- /dev/null +++ b/lib/pages/pharmacyModule/widgets/BannerPager.dart @@ -0,0 +1,88 @@ +import 'package:carousel_slider/carousel_slider.dart'; +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; +import 'package:flutter/material.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; + +class BannerPager extends StatefulWidget { + final PharmacyModuleViewModel _model; + + BannerPager(this._model); + + @override + _BannerPagerState createState() => _BannerPagerState(); +} + +class _BannerPagerState extends State { + int _current = 0; + + @override + Widget build(BuildContext context) { + return Container( + child: Column( + children: [ + CarouselSlider( + options: CarouselOptions( + aspectRatio: 7 / 2, + enlargeCenterPage: true, + enableInfiniteScroll: false, + initialPage: 0, + autoPlay: true, + autoPlayInterval: Duration(seconds: 3), + autoPlayAnimationDuration: Duration(milliseconds: 800), + autoPlayCurve: Curves.decelerate, + onPageChanged: (index, reason) { + setState(() { + _current = index; + }); + }, + ), + items: widget._model + .getBannerImagesUrl() + .mapIndexed( + (item, index) => Container( + margin: EdgeInsets.symmetric(horizontal: 1.0), + child: ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(5.0)), + child: Center( + child: index == 0 + ? Image.asset( + item, + fit: BoxFit.cover, + ) + : Image.network( + item, + fit: BoxFit.cover, + ), + ), + ), + ), + ) + .toList(), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: widget._model + .getBannerImagesUrl() + .mapIndexed( + (item, index) => Container( + width: 12.0, + height: 4.0, + margin: + EdgeInsets.symmetric(vertical: 0.0, horizontal: 2.0), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + color: _current == index + ? Color.fromRGBO(0, 250, 0, 0.9) + : Color.fromRGBO(0, 0, 0, 0.4), + ), + ), + ) + .toList(), + ), + ) + ], + )); + } +} diff --git a/lib/pages/pharmacyModule/widgets/ProductTileItem.dart b/lib/pages/pharmacyModule/widgets/ProductTileItem.dart new file mode 100644 index 00000000..fdce3559 --- /dev/null +++ b/lib/pages/pharmacyModule/widgets/ProductTileItem.dart @@ -0,0 +1,107 @@ +import 'package:diplomaticquarterapp/core/model/pharmacy_module/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class ProductTileItem extends StatelessWidget { + final PharmacyProduct item; + + ProductTileItem(this.item); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectProvider = Provider.of(context); + return Card( + elevation: 2, + shape: Border(right: BorderSide(color: Colors.grey.shade300, width: 1)), + margin: EdgeInsets.symmetric( + horizontal: 8, + vertical: 4, + ), + child: Container( + padding: EdgeInsets.symmetric(horizontal: 0), + width: MediaQuery.of(context).size.width / 3, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Stack( + children: [ + Container( + margin: EdgeInsets.fromLTRB(0, 16, 0, 0), + alignment: Alignment.center, + child: Image.network( + item.images[0].src, + fit: BoxFit.cover, + height: 80, + ), + ), + Container( + width: item.rxMessage != null + ? MediaQuery.of(context).size.width / 5 + : 0, + padding: EdgeInsets.all(4), + decoration: BoxDecoration( + color: Color(0xffb23838), + borderRadius: + BorderRadius.only(topLeft: Radius.circular(6)), + ), + child: Texts( + item.rxMessage != null ? item.rxMessage : "", + color: Colors.white, + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ), + ) + ], + ), + Container( + margin: EdgeInsets.symmetric( + horizontal: 6, + vertical: 0, + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + projectProvider.isArabic ? item.name : item.namen, + regular: true, + fontSize: 12, + fontWeight: FontWeight.w400, + ), + Padding( + padding: const EdgeInsets.only(top: 4, bottom: 4), + child: Texts( + "SAR ${item.price}", + bold: true, + fontSize: 14, + ), + ), + Row( + children: [ + StarRating( + totalAverage: item.approvedTotalReviews > 0 + ? (item.approvedRatingSum.toDouble() / + item.approvedTotalReviews.toDouble()) + .toDouble() + : 0, + forceStars: true), + Texts( + "(${item.approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ) + ], + ), + ], + ), + ) + ], + ), + ), + ); + } +} diff --git a/lib/pages/pharmacyModule/widgets/borderedButton.dart b/lib/pages/pharmacyModule/widgets/borderedButton.dart new file mode 100644 index 00000000..5e05448e --- /dev/null +++ b/lib/pages/pharmacyModule/widgets/borderedButton.dart @@ -0,0 +1,59 @@ +import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:flutter/material.dart'; + +class BorderedButton extends StatelessWidget { + final String text; + final Function handler; + final Color color; + final bool hasBorder; + final Color borderColor; + final Color backgroundColor; + final double vPadding; + final double hPadding; + + BorderedButton( + this.text, { + this.handler, + this.color, + this.hasBorder = false, + this.borderColor, + this.backgroundColor, + this.vPadding = 0, + this.hPadding = 0, + }); + + @override + Widget build(BuildContext context) { + return Container( + padding: EdgeInsets.symmetric(horizontal: 4, vertical: 4), + child: ButtonTheme( + //adds padding inside the button + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + //limits the touch area to the button area + minWidth: 0, + //wraps child's width + height: 0, + //wraps child's height + child: RaisedButton( + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + padding: EdgeInsets.symmetric(horizontal: 12, vertical: vPadding), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(4.0), + side: BorderSide(color: hasBorder ? borderColor : Colors.white, width: 0.8),), + color: backgroundColor ?? Colors.white, + textColor: color ?? Color(0xffc4aa54), + disabledTextColor: color ?? Colors.black, + disabledColor: backgroundColor ?? Colors.white, + onPressed: handler, + child: Text( + text, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: SizeConfig.textMultiplier * 1.6, + fontWeight: FontWeight.normal), + ), + ), //your original button + ), + ); + } +} diff --git a/lib/pages/pharmacyModule/widgets/manufacturerItem.dart b/lib/pages/pharmacyModule/widgets/manufacturerItem.dart new file mode 100644 index 00000000..e29de45c --- /dev/null +++ b/lib/pages/pharmacyModule/widgets/manufacturerItem.dart @@ -0,0 +1,35 @@ +import 'package:diplomaticquarterapp/core/model/pharmacy_module/Manufacturer.dart'; +import 'package:flutter/material.dart'; + +class ManufacturerItem extends StatelessWidget { + final Manufacturer item; + + ManufacturerItem(this.item); + + @override + Widget build(BuildContext context) { + return Card( + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), + margin: EdgeInsets.symmetric( + horizontal: 8, + vertical: 4, + ), + child: Container( + decoration: BoxDecoration( + border: Border( + right: BorderSide(color: Colors.grey.shade300, width: 1), + bottom: BorderSide(color: Colors.grey.shade300, width: 1), + left: BorderSide(color: Colors.grey.shade300, width: 1), + top: BorderSide(color: Colors.grey.shade300, width: 1)), + ), + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 8), + child: Image.network( + item.image.src, + fit: BoxFit.cover, + ), + ), + ), + ); + } +} diff --git a/lib/pages/rateAppointment/rate_appointment_doctor.dart b/lib/pages/rateAppointment/rate_appointment_doctor.dart index 83674906..d36ef9db 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??'', bold: true, ), SizedBox( diff --git a/lib/uitl/date_uitl.dart b/lib/uitl/date_uitl.dart index b35bbcf4..8ffaf97c 100644 --- a/lib/uitl/date_uitl.dart +++ b/lib/uitl/date_uitl.dart @@ -265,6 +265,7 @@ class DateUtil { break; case DayOfWeek.Sunday: return "Sunday"; + break; } return ""; diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index e1559bd4..61e24391 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -685,6 +685,15 @@ class TranslationBase { String get serviceInformationTitle => localizedValues['ServiceInformationTitle'][locale.languageCode]; String get infoLab => localizedValues['info-lab'][locale.languageCode]; String get infoRadiology => localizedValues['info-radiology'][locale.languageCode]; + + // pharmacy module + String get medicationRefill => localizedValues['medicationRefill'][locale.languageCode]; + String get offersAndPromotions => localizedValues['offersAndPromotions'][locale.languageCode]; + String get myPrescriptions => localizedValues['myPrescriptions'][locale.languageCode]; + String get searchAndScanMedication => localizedValues['searchAndScanMedication'][locale.languageCode]; + String get shopByBrands => localizedValues['shopByBrands'][locale.languageCode]; + String get recentlyViewed => localizedValues['recentlyViewed'][locale.languageCode]; + String get bestSellers => localizedValues['bestSellers'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index 33a1d072..3b9fa975 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -1,4 +1,7 @@ import 'dart:convert'; +import 'dart:core'; +import 'dart:core'; +import 'dart:core'; import 'dart:typed_data'; import 'package:connectivity/connectivity.dart'; @@ -152,4 +155,22 @@ class Utils { static Uint8List dataFromBase64String(String base64String) { return base64Decode(base64String); } + +} +// extension function that use in iterations(list.. etc) to iterate items and get index and item it self +extension IndexedIterable on Iterable { + Iterable mapIndexed(T Function(E e, int i) f) { + var i = 0; + return map((e) => f(e, i++)); + } } +/* + userBoard.asMap().map((i, element) => MapEntry(i, Stack( + GestureDetector(onTap: () { + setState(() { + // print("element=${element.toString()}"); + // print("element=${userBoard[i].toString()}"); + }); + }), + ))).values.toList(); + */ diff --git a/lib/widgets/others/app_scaffold_widget.dart b/lib/widgets/others/app_scaffold_widget.dart index 1bf3cb19..31005606 100644 --- a/lib/widgets/others/app_scaffold_widget.dart +++ b/lib/widgets/others/app_scaffold_widget.dart @@ -35,6 +35,7 @@ class AppScaffold extends StatelessWidget { final String title; final String description; final bool isShowDecPage; + final Color backgroundColor; AuthenticatedUserObject authenticatedUserObject = locator(); @@ -50,14 +51,14 @@ class AppScaffold extends StatelessWidget { this.floatingActionButton, this.title, this.description, - this.isShowDecPage = true, this.isBottomBar}); + this.isShowDecPage = true, this.isBottomBar,this.backgroundColor}); @override Widget build(BuildContext context) { AppGlobal.context = context; return Scaffold( - backgroundColor: Theme.of(context).scaffoldBackgroundColor, + backgroundColor: backgroundColor ?? Theme.of(context).scaffoldBackgroundColor, appBar: isShowAppBar ? AppBar( elevation: 0, @@ -110,6 +111,6 @@ class AppScaffold extends StatelessWidget { buildBodyWidget() { // return body; //Stack(children: [body, buildAppLoaderWidget(isLoading)]); - return Stack(children: [body, FloatingSearchButton()]); + return Stack(children: [body, /*FloatingSearchButton()*/]); } } diff --git a/pubspec.yaml b/pubspec.yaml index 24dc3a23..8155dc59 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -75,6 +75,9 @@ dependencies: # charts charts_flutter: ^0.9.0 + #image banner slider + carousel_slider: ^2.3.1 + # Qr code Scanner TODO fix it #barcode_scan: ^3.0.1 @@ -171,6 +174,7 @@ flutter: - assets/images/svg/ - assets/tracker/ - assets/images/AlHabibMedicalService/ + - assets/images/pharmacy_module/ fonts: From 9a169ff77bde4349ed64e5fea20b88a26d738d5d Mon Sep 17 00:00:00 2001 From: mosazaid Date: Thu, 5 Nov 2020 09:57:17 +0200 Subject: [PATCH 02/20] finish home page and start working on order preview page --- lib/config/config.dart | 2 + lib/config/localized_values.dart | 4 + lib/config/shared_pref_kay.dart | 1 + lib/core/model/pharmacies/Addresses.dart | 85 ++++++++++ .../Customer.dart | 0 .../Manufacturer.dart | 0 .../PharmacyImageObject.dart | 0 .../PharmacyProduct.dart | 0 .../Reviews.dart | 2 +- lib/core/service/client/base_app_client.dart | 2 +- .../parmacyModule/order-preview-service.dart | 29 ++++ .../parmacyModule/parmacy_module_service.dart | 31 +++- .../pharmacyModule/OrderPreviewViewModel.dart | 8 + .../pharmacy_module_view_model.dart | 22 ++- lib/locator.dart | 5 +- lib/pages/landing/home_page.dart | 2 +- .../screens/order-preview-page.dart | 48 ++++++ .../screens}/pharmacy_module_page.dart | 26 +++- .../screens/phramacy-product-detail-page.dart | 19 +++ .../widgets/BannerPager.dart | 0 .../pharmacies/widgets/ProductOrderItem.dart | 13 ++ .../pharmacies/widgets/ProductTileItem.dart | 146 ++++++++++++++++++ .../widgets/manufacturerItem.dart | 2 +- .../widgets/ProductTileItem.dart | 107 ------------- lib/uitl/translations_delegate_base.dart | 1 + lib/widgets/buttons/GestureIconButton.dart | 70 +++++++++ .../buttons}/borderedButton.dart | 0 27 files changed, 499 insertions(+), 126 deletions(-) create mode 100644 lib/core/model/pharmacies/Addresses.dart rename lib/core/model/{pharmacy_module => pharmacies}/Customer.dart (100%) rename lib/core/model/{pharmacy_module => pharmacies}/Manufacturer.dart (100%) rename lib/core/model/{pharmacy_module => pharmacies}/PharmacyImageObject.dart (100%) rename lib/core/model/{pharmacy_module => pharmacies}/PharmacyProduct.dart (100%) rename lib/core/model/{pharmacy_module => pharmacies}/Reviews.dart (98%) create mode 100644 lib/core/service/parmacyModule/order-preview-service.dart create mode 100644 lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart create mode 100644 lib/pages/pharmacies/screens/order-preview-page.dart rename lib/pages/{pharmacyModule => pharmacies/screens}/pharmacy_module_page.dart (87%) create mode 100644 lib/pages/pharmacies/screens/phramacy-product-detail-page.dart rename lib/pages/{pharmacyModule => pharmacies}/widgets/BannerPager.dart (100%) create mode 100644 lib/pages/pharmacies/widgets/ProductOrderItem.dart create mode 100644 lib/pages/pharmacies/widgets/ProductTileItem.dart rename lib/pages/{pharmacyModule => pharmacies}/widgets/manufacturerItem.dart (92%) delete mode 100644 lib/pages/pharmacyModule/widgets/ProductTileItem.dart create mode 100644 lib/widgets/buttons/GestureIconButton.dart rename lib/{pages/pharmacyModule/widgets => widgets/buttons}/borderedButton.dart (100%) diff --git a/lib/config/config.dart b/lib/config/config.dart index 457a1a76..20bf9caa 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -336,6 +336,8 @@ const GET_E_REFERRALS = "Services/Patients.svc/REST/GetEReferrals"; const GET_PHARMACY_BANNER = "epharmacy/api/promotionbanners"; const GET_PHARMACY_TOP_MANUFACTURER = "epharmacy/api/topmanufacturer"; const GET_PHARMACY_BEST_SELLER_PRODUCT = "epharmacy/api/bestsellerproducts"; +const GET_PHARMACY_PRODUCTs_BY_IDS = "epharmacy/api/productsbyids/"; +const GET_CUSTOMERS_ADDRESSES = "epharmacy/api/Customers/"; // Home Health Care const HHC_GET_ALL_SERVICES = diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 10d82424..4b693fcd 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -650,4 +650,8 @@ const Map> localizedValues = { "en": "Best Sellers", "ar": "أفضل البائعين" }, + "deleteAllItems": { + "en": "Delete All Items", + "ar": "حذف كافة العناصر" + }, }; diff --git a/lib/config/shared_pref_kay.dart b/lib/config/shared_pref_kay.dart index 7422052d..c5fafe03 100644 --- a/lib/config/shared_pref_kay.dart +++ b/lib/config/shared_pref_kay.dart @@ -16,3 +16,4 @@ const USER_LONG = 'user-long'; const IS_GO_TO_PARKING = 'IS_GO_TO_PARKING'; const IS_SEARCH_APPO = 'is-search-appo'; const IS_LIVECARE_APPOINTMENT = 'is_livecare_appointment'; +const PHARMACY_LAST_VISITED_PRODUCTS = 'last-visited'; diff --git a/lib/core/model/pharmacies/Addresses.dart b/lib/core/model/pharmacies/Addresses.dart new file mode 100644 index 00000000..74d5a591 --- /dev/null +++ b/lib/core/model/pharmacies/Addresses.dart @@ -0,0 +1,85 @@ +class Addresses { + String id; + String firstName; + String lastName; + String email; + String company; + int countryId; + String country; + String stateProvinceId; + String city; + String address1; + String address2; + String zipPostalCode; + String phoneNumber; + String faxNumber; + String customerAttributes; + String createdOnUtc; + String province; + String latLong; + + Addresses( + {this.id, + this.firstName, + this.lastName, + this.email, + this.company, + this.countryId, + this.country, + this.stateProvinceId, + this.city, + this.address1, + this.address2, + this.zipPostalCode, + this.phoneNumber, + this.faxNumber, + this.customerAttributes, + this.createdOnUtc, + this.province, + this.latLong}); + + Addresses.fromJson(Map json) { + id = json['id']; + firstName = json['first_name']; + lastName = json['last_name']; + email = json['email']; + company = json['company']; + countryId = json['country_id']; + country = json['country']; + stateProvinceId = json['state_province_id']; + city = json['city']; + address1 = json['address1']; + address2 = json['address2']; + zipPostalCode = json['zip_postal_code']; + phoneNumber = json['phone_number']; + faxNumber = json['fax_number']; + customerAttributes = json['customer_attributes']; + createdOnUtc = json['created_on_utc']; + province = json['province']; + latLong = json['lat_long']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['first_name'] = this.firstName; + data['last_name'] = this.lastName; + data['email'] = this.email; + data['company'] = this.company; + data['country_id'] = this.countryId; + data['country'] = this.country; + data['state_province_id'] = this.stateProvinceId; + data['city'] = this.city; + data['address1'] = this.address1; + data['address2'] = this.address2; + data['zip_postal_code'] = this.zipPostalCode; + data['phone_number'] = this.phoneNumber; + data['fax_number'] = this.faxNumber; + data['customer_attributes'] = this.customerAttributes; + data['created_on_utc'] = this.createdOnUtc; + data['province'] = this.province; + data['lat_long'] = this.latLong; + return data; + } + +} diff --git a/lib/core/model/pharmacy_module/Customer.dart b/lib/core/model/pharmacies/Customer.dart similarity index 100% rename from lib/core/model/pharmacy_module/Customer.dart rename to lib/core/model/pharmacies/Customer.dart diff --git a/lib/core/model/pharmacy_module/Manufacturer.dart b/lib/core/model/pharmacies/Manufacturer.dart similarity index 100% rename from lib/core/model/pharmacy_module/Manufacturer.dart rename to lib/core/model/pharmacies/Manufacturer.dart diff --git a/lib/core/model/pharmacy_module/PharmacyImageObject.dart b/lib/core/model/pharmacies/PharmacyImageObject.dart similarity index 100% rename from lib/core/model/pharmacy_module/PharmacyImageObject.dart rename to lib/core/model/pharmacies/PharmacyImageObject.dart diff --git a/lib/core/model/pharmacy_module/PharmacyProduct.dart b/lib/core/model/pharmacies/PharmacyProduct.dart similarity index 100% rename from lib/core/model/pharmacy_module/PharmacyProduct.dart rename to lib/core/model/pharmacies/PharmacyProduct.dart diff --git a/lib/core/model/pharmacy_module/Reviews.dart b/lib/core/model/pharmacies/Reviews.dart similarity index 98% rename from lib/core/model/pharmacy_module/Reviews.dart rename to lib/core/model/pharmacies/Reviews.dart index ec0de75e..f924dce3 100644 --- a/lib/core/model/pharmacy_module/Reviews.dart +++ b/lib/core/model/pharmacies/Reviews.dart @@ -1,4 +1,4 @@ -import 'Customer.dart'; +import '../pharmacies/Customer.dart'; class Reviews { int id; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 11319d96..dba6181e 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -156,7 +156,7 @@ class BaseAppClient { final response = await http.get(url.trim(), headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' - }); + },); final int statusCode = response.statusCode; print("statusCode :$statusCode"); diff --git a/lib/core/service/parmacyModule/order-preview-service.dart b/lib/core/service/parmacyModule/order-preview-service.dart new file mode 100644 index 00000000..1f3f9ddd --- /dev/null +++ b/lib/core/service/parmacyModule/order-preview-service.dart @@ -0,0 +1,29 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; +import 'package:diplomaticquarterapp/core/service/base_service.dart'; + +class OrderPreviewService extends BaseService{ + bool isFinished = true; + bool hasError = false; + String errorMsg = ''; + + List addresses = List(); + + Future getBannerListList() async { + hasError = false; + try { + await baseAppClient.get(GET_CUSTOMERS_ADDRESSES, + onSuccess: (dynamic response, int statusCode) { + addresses.clear(); + response['customers'][0]['addresses'].forEach((item) { + addresses.add(Addresses.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + } catch (error) { + throw error; + } + } +} \ No newline at end of file diff --git a/lib/core/service/parmacyModule/parmacy_module_service.dart b/lib/core/service/parmacyModule/parmacy_module_service.dart index 3bec5ba5..8584e140 100644 --- a/lib/core/service/parmacyModule/parmacy_module_service.dart +++ b/lib/core/service/parmacyModule/parmacy_module_service.dart @@ -1,7 +1,8 @@ import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacy_module/Manufacturer.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacy_module/PharmacyImageObject.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacy_module/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyImageObject.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; class PharmacyModuleService extends BaseService { @@ -12,6 +13,7 @@ class PharmacyModuleService extends BaseService { List bannerItems = List(); List manufacturerList = List(); List bestSellerProducts = List(); + List lastVisitedProducts = List(); Future getBannerListList() async { hasError = false; @@ -69,4 +71,27 @@ class PharmacyModuleService extends BaseService { throw error; } } + + Future getLastVisitedProducts() async { + String lastVisited = ""; + if (await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS) != + null) { + lastVisited = + await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS); + try { + await baseAppClient.get("$GET_PHARMACY_PRODUCTs_BY_IDS$lastVisited", + onSuccess: (dynamic response, int statusCode) { + lastVisitedProducts.clear(); + response['products'].forEach((item) { + lastVisitedProducts.add(PharmacyProduct.fromJson(item)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }); + } catch (error) { + throw error; + } + } + } } diff --git a/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart b/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart new file mode 100644 index 00000000..00f4819b --- /dev/null +++ b/lib/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart @@ -0,0 +1,8 @@ +import 'package:diplomaticquarterapp/core/service/parmacyModule/order-preview-service.dart'; + +import '../../../locator.dart'; +import '../base_view_model.dart'; + +class OrderPreviewViewModel extends BaseViewModel { + OrderPreviewService _orderService = locator(); +} diff --git a/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart b/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart index 8d9207b0..f8c574f7 100644 --- a/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart +++ b/lib/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart @@ -1,7 +1,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacy_module/Manufacturer.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacy_module/PharmacyImageObject.dart'; -import 'package:diplomaticquarterapp/core/model/pharmacy_module/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyImageObject.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/core/service/parmacyModule/parmacy_module_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; @@ -14,7 +14,11 @@ class PharmacyModuleViewModel extends BaseViewModel { List get manufacturerList => _pharmacyService.manufacturerList; - List get bestSellerProduct => _pharmacyService.bestSellerProducts; + List get bestSellerProduct => + _pharmacyService.bestSellerProducts; + + List get lastVisitedProducts => + _pharmacyService.lastVisitedProducts; Future getPharmacyHomeData() async { setState(ViewState.Busy); @@ -49,6 +53,16 @@ class PharmacyModuleViewModel extends BaseViewModel { _getBestSellerProducts() async { await _pharmacyService.getBestSellerProducts(); + if (_pharmacyService.hasError) { + error = _pharmacyService.error; + setState(ViewState.Error); + } else { + _getLastVisitedProducts(); + } + } + + _getLastVisitedProducts() async { + await _pharmacyService.getLastVisitedProducts(); if (_pharmacyService.hasError) { error = _pharmacyService.error; setState(ViewState.Error); diff --git a/lib/locator.dart b/lib/locator.dart index 203bd8a0..a7352b47 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -42,6 +42,7 @@ import 'core/service/medical/prescriptions_service.dart'; import 'core/service/medical/radiology_service.dart'; import 'core/service/medical/reports_monthly_service.dart'; import 'core/service/medical/vital_sign_service.dart'; +import 'core/service/parmacyModule/order-preview-service.dart'; import 'core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; import 'core/service/parmacyModule/parmacy_module_service.dart'; @@ -80,6 +81,7 @@ import 'core/viewModels/pharmacies_view_model.dart'; import 'core/service/pharmacies_service.dart'; import 'core/service/insurance_service.dart'; import 'core/viewModels/insurance_card_View_model.dart'; +import 'core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; import 'core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'core/viewModels/qr_view_model.dart'; import 'core/viewModels/vaccine_view_model.dart'; @@ -139,6 +141,7 @@ void setupLocator() { locator.registerLazySingleton(() => PharmacyModuleService()); + locator.registerLazySingleton(() => OrderPreviewService()); /// View Model @@ -188,7 +191,7 @@ void setupLocator() { - locator.registerFactory(() => PharmacyModuleViewModel()); + locator.registerFactory(() => OrderPreviewViewModel()); } diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index 59f01705..8cd9923f 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -10,7 +10,7 @@ import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; -import 'package:diplomaticquarterapp/pages/pharmacyModule/pharmacy_module_page.dart'; +import 'file:///C:/Users/admin/AndroidStudioProjects/diplomatic-quarter/lib/pages/pharmacies/screens/pharmacy_module_page.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; diff --git a/lib/pages/pharmacies/screens/order-preview-page.dart b/lib/pages/pharmacies/screens/order-preview-page.dart new file mode 100644 index 00000000..d9646fcf --- /dev/null +++ b/lib/pages/pharmacies/screens/order-preview-page.dart @@ -0,0 +1,48 @@ +import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/GestureIconButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; + +class OrderPreviewPage extends StatelessWidget { + @override + Widget build(BuildContext context) { + return BaseView( + builder: (_, model, wi) => AppScaffold( + title: "Shopping Cart", + isShowAppBar: true, + isShowDecPage: false, + baseViewModel: model, + backgroundColor: Colors.white, + body: Container( + width: double.infinity, + child: SingleChildScrollView( + child: Container( + margin: EdgeInsets.all(10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + GestureIconButton( + TranslationBase.of(context).deleteAllItems, + Icon(Icons.delete_outline_sharp, color: Colors.grey.shade800,), + onTap: () => {}, + ), + const Divider( + color: Colors.grey, + height: 20, + thickness: 1, + indent: 0, + endIndent: 0, + ), + + ], + ), + ), + ), + ), + ), + ); + } +} + diff --git a/lib/pages/pharmacyModule/pharmacy_module_page.dart b/lib/pages/pharmacies/screens/pharmacy_module_page.dart similarity index 87% rename from lib/pages/pharmacyModule/pharmacy_module_page.dart rename to lib/pages/pharmacies/screens/pharmacy_module_page.dart index 60d55437..f9c6cdeb 100644 --- a/lib/pages/pharmacyModule/pharmacy_module_page.dart +++ b/lib/pages/pharmacies/screens/pharmacy_module_page.dart @@ -2,13 +2,15 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/landing/home_page.dart'; -import 'package:diplomaticquarterapp/pages/pharmacyModule/widgets/BannerPager.dart'; -import 'package:diplomaticquarterapp/pages/pharmacyModule/widgets/ProductTileItem.dart'; -import 'package:diplomaticquarterapp/pages/pharmacyModule/widgets/borderedButton.dart'; -import 'package:diplomaticquarterapp/pages/pharmacyModule/widgets/manufacturerItem.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/order-preview-page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/widgets/BannerPager.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/widgets/ProductTileItem.dart'; +import 'file:///C:/Users/admin/AndroidStudioProjects/diplomatic-quarter/lib/widgets/buttons/borderedButton.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/widgets/manufacturerItem.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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/material.dart'; class PharmacyPage extends StatelessWidget { @@ -82,7 +84,15 @@ class PharmacyPage extends StatelessWidget { ], ), ), - Container(), + Container( + height: model.lastVisitedProducts.length > 0 ? MediaQuery.of(context).size.height / 4 : 0, + child: ListView.builder( + itemBuilder: (ctx, i) => + ProductTileItem(model.lastVisitedProducts[i]), + scrollDirection: Axis.horizontal, + itemCount: model.lastVisitedProducts.length, + ), + ), Container( margin: EdgeInsets.fromLTRB(10, 10, 10, 10), child: Row( @@ -144,7 +154,9 @@ class GridViewButtons extends StatelessWidget { child: GridViewCard( TranslationBase.of(context).offersAndPromotions, 'assets/images/pharmacy_module/offer_icon.png', - () {}), + () { + Navigator.push(context, FadePage(page: OrderPreviewPage())); + }), ), DashboardItem( imageName: 'pharmacy_module/bg_2.png', @@ -210,7 +222,7 @@ class GridViewCard extends StatelessWidget { Expanded( child: BorderedButton( TranslationBase.of(context).viewAll, - handler: () {}, + handler: handler, ), ), ], diff --git a/lib/pages/pharmacies/screens/phramacy-product-detail-page.dart b/lib/pages/pharmacies/screens/phramacy-product-detail-page.dart new file mode 100644 index 00000000..afbd2b06 --- /dev/null +++ b/lib/pages/pharmacies/screens/phramacy-product-detail-page.dart @@ -0,0 +1,19 @@ +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; + +class ProductDetailScreen extends StatelessWidget { + final PharmacyProduct product; + + ProductDetailScreen(this.product); + + @override + Widget build(BuildContext context) { + return AppScaffold( + body: Center( + child: Texts("id = ${product.id}"), + ), + ); + } +} diff --git a/lib/pages/pharmacyModule/widgets/BannerPager.dart b/lib/pages/pharmacies/widgets/BannerPager.dart similarity index 100% rename from lib/pages/pharmacyModule/widgets/BannerPager.dart rename to lib/pages/pharmacies/widgets/BannerPager.dart diff --git a/lib/pages/pharmacies/widgets/ProductOrderItem.dart b/lib/pages/pharmacies/widgets/ProductOrderItem.dart new file mode 100644 index 00000000..81b6068a --- /dev/null +++ b/lib/pages/pharmacies/widgets/ProductOrderItem.dart @@ -0,0 +1,13 @@ +import 'package:flutter/material.dart'; + +class ProductOrderItem extends StatelessWidget { + @override + Widget build(BuildContext context) { + return ListTile( + leading: Icon( + Icons.delete_outline_sharp, + color: Colors.grey.shade800, + ), + ); + } +} diff --git a/lib/pages/pharmacies/widgets/ProductTileItem.dart b/lib/pages/pharmacies/widgets/ProductTileItem.dart new file mode 100644 index 00000000..62493387 --- /dev/null +++ b/lib/pages/pharmacies/widgets/ProductTileItem.dart @@ -0,0 +1,146 @@ +import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/phramacy-product-detail-page.dart'; +import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class ProductTileItem extends StatelessWidget { + final AppSharedPreferences sharedPref = AppSharedPreferences(); + final PharmacyProduct item; + + ProductTileItem(this.item); + + void productOnClick(BuildContext ctx) { + _saveLastVisitProducts(); + Navigator.push(ctx, FadePage(page: ProductDetailScreen(item))); + } + + void _saveLastVisitProducts() async { + String lastVisited = ""; + bool isIdExist = false; + if (await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS) != + null) { + lastVisited = + await this.sharedPref.getString(PHARMACY_LAST_VISITED_PRODUCTS); + lastVisited.split(",").forEach((id) { + if (id == item.id) { + isIdExist = true; + } + }); + } + if (!isIdExist) { + if (lastVisited == "") { + // it means there is no lastVisited yet + lastVisited = "${item.id}"; + } else { + // there is lastVisited id's and this product id is not found + lastVisited += ",${item.id}"; + } + sharedPref.setString(PHARMACY_LAST_VISITED_PRODUCTS, lastVisited); + } + } + + @override + Widget build(BuildContext context) { + ProjectViewModel projectProvider = Provider.of(context); + return InkWell( + onTap: () => productOnClick(context), + splashColor: Theme.of(context).primaryColor, + child: Card( + elevation: 2, + shape: Border(right: BorderSide(color: Colors.grey.shade300, width: 1)), + margin: EdgeInsets.symmetric( + horizontal: 8, + vertical: 4, + ), + child: Container( + padding: EdgeInsets.symmetric(horizontal: 0), + width: MediaQuery.of(context).size.width / 3, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Stack( + children: [ + Container( + margin: EdgeInsets.fromLTRB(0, 16, 0, 0), + alignment: Alignment.center, + child: Image.network( + item.images[0].src, + fit: BoxFit.cover, + height: 80, + ), + ), + Container( + width: item.rxMessage != null + ? MediaQuery.of(context).size.width / 5 + : 0, + padding: EdgeInsets.all(4), + decoration: BoxDecoration( + color: Color(0xffb23838), + borderRadius: + BorderRadius.only(topLeft: Radius.circular(6)), + ), + child: Texts( + item.rxMessage != null ? item.rxMessage : "", + color: Colors.white, + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ), + ) + ], + ), + Container( + margin: EdgeInsets.symmetric( + horizontal: 6, + vertical: 0, + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + projectProvider.isArabic ? item.name : item.namen, + regular: true, + fontSize: 12, + fontWeight: FontWeight.w400, + ), + Padding( + padding: const EdgeInsets.only(top: 4, bottom: 4), + child: Texts( + "SAR ${item.price}", + bold: true, + fontSize: 14, + ), + ), + Row( + children: [ + StarRating( + totalAverage: item.approvedTotalReviews > 0 + ? (item.approvedRatingSum.toDouble() / + item.approvedTotalReviews.toDouble()) + .toDouble() + : 0, + forceStars: true), + Texts( + "(${item.approvedTotalReviews})", + regular: true, + fontSize: 10, + fontWeight: FontWeight.w400, + ) + ], + ), + ], + ), + ) + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/pharmacyModule/widgets/manufacturerItem.dart b/lib/pages/pharmacies/widgets/manufacturerItem.dart similarity index 92% rename from lib/pages/pharmacyModule/widgets/manufacturerItem.dart rename to lib/pages/pharmacies/widgets/manufacturerItem.dart index e29de45c..7ffa3d89 100644 --- a/lib/pages/pharmacyModule/widgets/manufacturerItem.dart +++ b/lib/pages/pharmacies/widgets/manufacturerItem.dart @@ -1,4 +1,4 @@ -import 'package:diplomaticquarterapp/core/model/pharmacy_module/Manufacturer.dart'; +import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart'; import 'package:flutter/material.dart'; class ManufacturerItem extends StatelessWidget { diff --git a/lib/pages/pharmacyModule/widgets/ProductTileItem.dart b/lib/pages/pharmacyModule/widgets/ProductTileItem.dart deleted file mode 100644 index fdce3559..00000000 --- a/lib/pages/pharmacyModule/widgets/ProductTileItem.dart +++ /dev/null @@ -1,107 +0,0 @@ -import 'package:diplomaticquarterapp/core/model/pharmacy_module/PharmacyProduct.dart'; -import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -class ProductTileItem extends StatelessWidget { - final PharmacyProduct item; - - ProductTileItem(this.item); - - @override - Widget build(BuildContext context) { - ProjectViewModel projectProvider = Provider.of(context); - return Card( - elevation: 2, - shape: Border(right: BorderSide(color: Colors.grey.shade300, width: 1)), - margin: EdgeInsets.symmetric( - horizontal: 8, - vertical: 4, - ), - child: Container( - padding: EdgeInsets.symmetric(horizontal: 0), - width: MediaQuery.of(context).size.width / 3, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Stack( - children: [ - Container( - margin: EdgeInsets.fromLTRB(0, 16, 0, 0), - alignment: Alignment.center, - child: Image.network( - item.images[0].src, - fit: BoxFit.cover, - height: 80, - ), - ), - Container( - width: item.rxMessage != null - ? MediaQuery.of(context).size.width / 5 - : 0, - padding: EdgeInsets.all(4), - decoration: BoxDecoration( - color: Color(0xffb23838), - borderRadius: - BorderRadius.only(topLeft: Radius.circular(6)), - ), - child: Texts( - item.rxMessage != null ? item.rxMessage : "", - color: Colors.white, - regular: true, - fontSize: 10, - fontWeight: FontWeight.w400, - ), - ) - ], - ), - Container( - margin: EdgeInsets.symmetric( - horizontal: 6, - vertical: 0, - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - projectProvider.isArabic ? item.name : item.namen, - regular: true, - fontSize: 12, - fontWeight: FontWeight.w400, - ), - Padding( - padding: const EdgeInsets.only(top: 4, bottom: 4), - child: Texts( - "SAR ${item.price}", - bold: true, - fontSize: 14, - ), - ), - Row( - children: [ - StarRating( - totalAverage: item.approvedTotalReviews > 0 - ? (item.approvedRatingSum.toDouble() / - item.approvedTotalReviews.toDouble()) - .toDouble() - : 0, - forceStars: true), - Texts( - "(${item.approvedTotalReviews})", - regular: true, - fontSize: 10, - fontWeight: FontWeight.w400, - ) - ], - ), - ], - ), - ) - ], - ), - ), - ); - } -} diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 61e24391..84eddbbb 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -694,6 +694,7 @@ class TranslationBase { String get shopByBrands => localizedValues['shopByBrands'][locale.languageCode]; String get recentlyViewed => localizedValues['recentlyViewed'][locale.languageCode]; String get bestSellers => localizedValues['bestSellers'][locale.languageCode]; + String get deleteAllItems => localizedValues['deleteAllItems'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/buttons/GestureIconButton.dart b/lib/widgets/buttons/GestureIconButton.dart new file mode 100644 index 00000000..841d7ea6 --- /dev/null +++ b/lib/widgets/buttons/GestureIconButton.dart @@ -0,0 +1,70 @@ +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/material.dart'; + +class GestureIconButton extends StatefulWidget { + GestureIconButton( + this.label, + this.icon, { + Key key, + this.onTap, + this.backgroundColor, + }) : super(key: key); + + final String label; + final Widget icon; + final VoidCallback onTap; + final Color backgroundColor; + + @override + _GestureIconButtonState createState() => _GestureIconButtonState(); +} + +class _GestureIconButtonState extends State { + bool _buttonLongPress = false; + + @override + Widget build(BuildContext context) { + return GestureDetector( + onLongPressStart: (_) => + setState(() => _buttonLongPress = !_buttonLongPress), + onLongPressEnd: (_) => + setState(() => _buttonLongPress = !_buttonLongPress), + child: Wrap( + children: [ + Container( + decoration: BoxDecoration( + border: Border.all( + color: widget.backgroundColor != null + ? widget.backgroundColor + : Colors.grey[200], + ), + color: widget.backgroundColor != null + ? widget.backgroundColor + : Colors.grey.shade200, + borderRadius: BorderRadius.all(Radius.circular(8))), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Expanded( + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: const EdgeInsets.only(right: 8.0), + child: widget.icon, + ), + Texts( + widget.label, + color: _buttonLongPress ? Colors.white : Colors.black, + ), + ], + ), + ), + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/pharmacyModule/widgets/borderedButton.dart b/lib/widgets/buttons/borderedButton.dart similarity index 100% rename from lib/pages/pharmacyModule/widgets/borderedButton.dart rename to lib/widgets/buttons/borderedButton.dart From dade295656da3b0b3c363fecc8c29ff2473fe996 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Thu, 5 Nov 2020 10:26:04 +0200 Subject: [PATCH 03/20] fix merge issue --- lib/uitl/translations_delegate_base.dart | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 2b794af9..c5246e35 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -706,8 +706,6 @@ class TranslationBase { String get recentlyViewed => localizedValues['recentlyViewed'][locale.languageCode]; String get bestSellers => localizedValues['bestSellers'][locale.languageCode]; String get deleteAllItems => localizedValues['deleteAllItems'][locale.languageCode]; - String get infoRadiology => - localizedValues['info-radiology'][locale.languageCode]; String get termsService => localizedValues['TermsService'][locale.languageCode]; From 2095f2c62aa074ebac74be3e84232f25d3707d68 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Thu, 5 Nov 2020 10:28:59 +0200 Subject: [PATCH 04/20] fix merge issue --- lib/core/service/client/base_app_client.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index dba6181e..696489c6 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -142,7 +142,6 @@ class BaseAppClient { get(String endPoint, {Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, - bool isAllowAny = false, Map queryParams}) async { String url = BASE_URL + endPoint; if (queryParams != null) { From 939840bbe788af1df6fb7b535eeb423bea09c04b Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Sun, 22 Nov 2020 14:23:39 +0200 Subject: [PATCH 05/20] fix master --- lib/pages/landing/home_page.dart | 2 +- lib/pages/pharmacies/screens/pharmacy_module_page.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index 02e195c2..2bc30726 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -10,7 +10,7 @@ import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; -import 'file:///C:/Users/admin/AndroidStudioProjects/diplomatic-quarter/lib/pages/pharmacies/screens/pharmacy_module_page.dart'; +import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy_module_page.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; diff --git a/lib/pages/pharmacies/screens/pharmacy_module_page.dart b/lib/pages/pharmacies/screens/pharmacy_module_page.dart index f9c6cdeb..2ae2be65 100644 --- a/lib/pages/pharmacies/screens/pharmacy_module_page.dart +++ b/lib/pages/pharmacies/screens/pharmacy_module_page.dart @@ -5,9 +5,9 @@ import 'package:diplomaticquarterapp/pages/landing/home_page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/order-preview-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/widgets/BannerPager.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/widgets/ProductTileItem.dart'; -import 'file:///C:/Users/admin/AndroidStudioProjects/diplomatic-quarter/lib/widgets/buttons/borderedButton.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/widgets/manufacturerItem.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.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'; From 776b20ff67bcb246f0f5d4a4a1c4f9ca4a851d98 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Sun, 22 Nov 2020 14:25:19 +0200 Subject: [PATCH 06/20] fix master --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4b016310..ad2a55ec 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ app.*.map.json # Exceptions to above rules. !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages +/ios/Flutter/.last_build_id From eb5727ef8a068f7109c76d83ff434f9ad2b3987c Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Sun, 22 Nov 2020 14:26:20 +0200 Subject: [PATCH 07/20] fix master --- .gitignore | 1 - ios/Flutter/.last_build_id | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 ios/Flutter/.last_build_id diff --git a/.gitignore b/.gitignore index ad2a55ec..4b016310 100644 --- a/.gitignore +++ b/.gitignore @@ -42,4 +42,3 @@ app.*.map.json # Exceptions to above rules. !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages -/ios/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 From f70ca95a380e8bae4a08f174cffc71053d4552e8 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Sun, 22 Nov 2020 15:17:37 +0200 Subject: [PATCH 08/20] fix merge issues --- lib/config/config.dart | 4 +- lib/main.dart | 18 +- lib/pages/landing/home_page.dart | 2 +- lib/pages/medical/medical_profile_page.dart | 306 +++++++++++++++++--- 4 files changed, 275 insertions(+), 55 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index a614dbca..9b5edb2d 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -7,8 +7,8 @@ import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; const MAX_SMALL_SCREEN = 660; -//const BASE_URL = 'https://uat.hmgwebservices.com/'; - const BASE_URL = 'https://hmgwebservices.com/'; +const BASE_URL = 'https://uat.hmgwebservices.com/'; +// const BASE_URL = 'https://hmgwebservices.com/'; const GET_PROJECT = 'Services/Lists.svc/REST/GetProject'; ///Doctor diff --git a/lib/main.dart b/lib/main.dart index f44411a0..cedb2d58 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -75,24 +75,24 @@ class MyApp extends StatelessWidget { hintColor: Colors.grey[400], disabledColor: Colors.grey[300], errorColor: Color.fromRGBO(235, 80, 60, 1.0), - scaffoldBackgroundColor: Color(0xffEEEEEE), + scaffoldBackgroundColor: Color(0xffE9E9E9), // Colors.grey[100], textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), textSelectionHandleColor: Colors.grey, canvasColor: Colors.white, - backgroundColor: Colors.white, + backgroundColor: Color.fromRGBO(255, 255, 255, 1), highlightColor: Colors.grey[100].withOpacity(0.4), splashColor: Colors.transparent, - primaryColor: Color(0xff40ACC9), - bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)), + primaryColor: Colors.grey, + bottomSheetTheme: BottomSheetThemeData( + backgroundColor: HexColor('#E0E0E0')), cursorColor: Colors.grey, - cardColor: Colors.white, iconTheme: IconThemeData(), appBarTheme: AppBarTheme( - color: Color(0xff40ACC9), - brightness: Brightness.dark, - elevation: 10.0, + color: Colors.grey[700], + brightness: Brightness.light, + elevation: 0.0, actionsIconTheme: IconThemeData( - color: Color(0xff40ACC9), + color: Colors.grey[800], ), ), ), diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index 2bc30726..6654d36d 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -759,7 +759,7 @@ class _HomePageState extends State { ), ), SizedBox( - height: 80, + height: 120, ) ], ), diff --git a/lib/pages/medical/medical_profile_page.dart b/lib/pages/medical/medical_profile_page.dart index 41746f3c..741f2020 100644 --- a/lib/pages/medical/medical_profile_page.dart +++ b/lib/pages/medical/medical_profile_page.dart @@ -1,14 +1,19 @@ +import 'dart:math'; + import 'package:badges/badges.dart'; +import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.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'; @@ -16,14 +21,24 @@ import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profil 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 @@ -185,52 +200,48 @@ class _MedicalProfilePageState extends State { Navigator.push( context, FadePage( - page: DoctorHomePage(), + page: HomePrescriptionsPage(), ), ); }, child: MedicalProfileItem( title: TranslationBase.of(context) - .myDoctor, - imagePath: 'doctor_icon.png', + .medicines, + imagePath: 'prescription_icon.png', subTitle: TranslationBase.of(context) - .myDoctorSubtitle, + .medicinesSubtitle, ), ), ), Expanded( flex: 1, child: InkWell( - onTap: () { - Navigator.push( - context, - FadePage( - page: HomePrescriptionsPage(), - ), - ); - }, + onTap: () => Navigator.push( + context, + FadePage( + page: VitalSignDetailsScreen(), + ), + ), child: MedicalProfileItem( title: TranslationBase.of(context) - .medicines, - imagePath: 'prescription_icon.png', + .vitalSigns, + imagePath: 'vital_signs.png', subTitle: TranslationBase.of(context) - .medicinesSubtitle, + .vitalSignsSubtitle, ), ), ), Expanded( flex: 1, child: InkWell( - onTap: () { - Navigator.push(context, - FadePage(page: InsuranceCard())); - }, + onTap: () => Navigator.push(context, + FadePage(page: ActiveMedicationsPage())), child: MedicalProfileItem( title: TranslationBase.of(context) - .insurance, - imagePath: 'insurance_card_icon.png', + .myMedical, + imagePath: 'active_medications.png', subTitle: TranslationBase.of(context) - .insuranceSubtitle, + .myMedicalSubtitle, ), ), ), @@ -241,14 +252,20 @@ class _MedicalProfilePageState extends State { Expanded( flex: 1, child: InkWell( - onTap: () => Navigator.push(context, - FadePage(page: AllergiesPage())), + onTap: () { + Navigator.push( + context, + FadePage( + page: DoctorHomePage(), + ), + ); + }, child: MedicalProfileItem( title: TranslationBase.of(context) - .allergies, - imagePath: 'my_allergies_icon.png', + .myDoctor, + imagePath: 'doctor_icon.png', subTitle: TranslationBase.of(context) - .allergiesSubtitle, + .myDoctorSubtitle, ), ), ), @@ -259,13 +276,13 @@ class _MedicalProfilePageState extends State { Navigator.push( context, FadePage( - page: PatientSickLeavePage())); + page: EyeMeasurementsPage())); }, child: MedicalProfileItem( - title: TranslationBase.of(context).sick, - imagePath: 'sick_leaves_icons.png', + title: TranslationBase.of(context).eye, + imagePath: 'eye_measurement_icon.png', subTitle: TranslationBase.of(context) - .sickSubtitle, + .eyeSubtitle, ), ), ), @@ -273,24 +290,83 @@ class _MedicalProfilePageState extends State { flex: 1, child: InkWell( onTap: () { - Navigator.push( - context, - FadePage( - page: InsuranceApproval())); + Navigator.push(context, + FadePage(page: InsuranceCard())); }, child: MedicalProfileItem( title: TranslationBase.of(context) - .insuranceApproval, - imagePath: - 'insurance_approvals_icon.png', + .insurance, + imagePath: 'insurance_card_icon.png', subTitle: TranslationBase.of(context) - .insuranceApprovalSubtitle, + .insuranceSubtitle, ), ), ), ], ), 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( @@ -308,9 +384,153 @@ class _MedicalProfilePageState extends State { ), ), Expanded( - child: Container(), + 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, + ), + ), + ), + Expanded( + flex: 1, child: Container(), ), ]), From fa01d132c7b3596ff810f615697f5952faf59be1 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Thu, 26 Nov 2020 16:43:42 +0200 Subject: [PATCH 09/20] merger DQ live and fix some issues on Child Vaccines --- .../all_habib_medical_service_page.dart | 119 +++- .../ChildVaccines/ChidDetailsWidget.dart | 111 ++++ lib/pages/ChildVaccines/child_page.dart | 231 ++----- .../ChildVaccines/child_vaccines_page.dart | 307 ++++----- lib/pages/landing/home_page.dart | 581 ++++++++---------- 5 files changed, 680 insertions(+), 669 deletions(-) create mode 100644 lib/pages/ChildVaccines/ChidDetailsWidget.dart diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart index 7e3d4181..ea699381 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart @@ -123,7 +123,16 @@ class _AllHabibMedicalServiceState extends State { 'assets/images/new-design/my_file_bottom_bar.png', title: TranslationBase.of(context).myMedicalFile, ), - + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: LiveCareHome(), + ), + ), + imageLocation: 'assets/images/new-design/liveCare_ar_bg.png', + title: TranslationBase.of(context).livecare, + ), ServicesContainer( onTap: () => Navigator.push( context, @@ -148,7 +157,15 @@ class _AllHabibMedicalServiceState extends State { 'assets/images/al-habib_online_payment_service_icon.png', title: TranslationBase.of(context).onlinePaymentService, ), - + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage(), + ), + imageLocation: + 'assets/images/al-habib_online_payment_service_icon.png', + title: 'Covid-19- Drive-Thru Test', + ), ServicesContainer( onTap: () { Navigator.push( @@ -163,7 +180,37 @@ class _AllHabibMedicalServiceState extends State { imageLocation: 'assets/images/emergency_service_image.png', title: TranslationBase.of(context).emergencyService, ), - + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: ParkingPage(), + ), + ), + imageLocation: 'assets/images/pharmacy_logo.png', + title: 'Pharmacy'), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: InsuranceUpdate(), + ), + ), + imageLocation: + 'assets/images/medical/insurance_card_icon.png', + title: TranslationBase.of(context).updateInsurance, + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: authUser.patientID == null + ? EReferralIndexPage() + : EReferralPage()), + ), + imageLocation: 'assets/images/ereferral_service_icon.png', + title: 'E-Referral', + ), ServicesContainer( onTap: () => Navigator.push( context, @@ -175,7 +222,15 @@ class _AllHabibMedicalServiceState extends State { 'assets/images/new-design/family_menu_icon_red.png', title: 'My Family', ), - + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage(page: ChildVaccinesPage()), + ), + imageLocation: + 'assets/images/new-design/children_vaccines_icon.png', + title: 'Child Vaccines', + ), ServicesContainer( onTap: () => Navigator.push( context, @@ -187,7 +242,61 @@ class _AllHabibMedicalServiceState extends State { 'assets/images/new-design/upcoming_icon_bottom_bar.png', title: TranslationBase.of(context).todoList, ), - + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage(page: SymptomInfo()), + ), + imageLocation: 'assets/images/new-design/body_icon.png', + title: 'Symptom Checker'), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage(page: BloodDonationPage()), + ), + imageLocation: 'assets/images/new-design/blood_icon.png', + title: 'Blood Donation', + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: (HealthCalculators()), + ), + ), + imageLocation: + 'assets/images/new-design/health_calculator_icon.png', + title: 'Health Calculators', + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: HealthConverter(), + ), + ), + imageLocation: + 'assets/images/new-design/health_convertor_icon.png', + title: 'Health Converter', + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage( + page: H2OPageIndexPage(), + ), + ), + imageLocation: 'assets/images/new-design/water_icon.png', + title: 'H2O', + ), + ServicesContainer( + onTap: () => Navigator.push( + context, + FadePage(), + ), + imageLocation: 'assets/images/new-design/smartwatch_icon.png', + title: TranslationBase.of(context).smartWatches, + ), ServicesContainer( onTap: () => Navigator.push( context, diff --git a/lib/pages/ChildVaccines/ChidDetailsWidget.dart b/lib/pages/ChildVaccines/ChidDetailsWidget.dart new file mode 100644 index 00000000..7a7d52e2 --- /dev/null +++ b/lib/pages/ChildVaccines/ChidDetailsWidget.dart @@ -0,0 +1,111 @@ +import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; +import 'package:diplomaticquarterapp/pages/ChildVaccines/vaccinationtable_page.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class ChildDetailsWidget extends StatelessWidget { + final ChildVaccinesViewModel model; + final List_BabyInformationModel babyInfo; + DeleteBaby deleteBaby = DeleteBaby(); + + ChildDetailsWidget({this.model, this.babyInfo}); + + @override + Widget build(BuildContext context) { + return Container( + margin: EdgeInsets.only(left: 5, right: 5, bottom: 10), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + border: Border.all(color: Colors.white, width: 0.5), + borderRadius: BorderRadius.all(Radius.circular(5)), + color: Colors.white, + ), + padding: EdgeInsets.all(12), + width: 200, + //double.infinity, + child: Column( + children: [ + Row(children: [ + Texts("CHILD NAME"), + ]), + Row(children: [ + Texts(babyInfo.babyName.trim()), + ]), + Row(children: [ + IconButton( + icon: Image.asset(babyInfo.gender == 1 + ? 'assets/images/new-design/male.png' + : 'assets/images/new-design/female.png'), + tooltip: '', + onPressed: () { + // setState(() { + // // _volume += 10; + // // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); + // }); + }, + ), + Texts(babyInfo.genderDescription), + IconButton( + icon: Icon( + Icons.remove_red_eye, + color: Colors.red, + ), + tooltip: '', + onPressed: () { + Navigator.push( + context, + FadePage( + page: VaccinationTablePage(), + ), + ); + }, + ) + ]), + Row(children: [ + Texts("Birthday"), + ]), + Row( + children: [ + IconButton( + icon: new Image.asset( + 'assets/images/new-design/calender-secondary.png'), + tooltip: '', + ), + Texts( + DateUtil.yearMonthDay(babyInfo.dOB), + ), + ], + ), + Row(children: [ + IconButton( + icon: new Image.asset('assets/images/new-design/garbage.png'), + tooltip: '', + onPressed: () async { + await model.deleteBabyOrders(newChild: deleteBaby); + deleteBaby.babyID = babyInfo.babyID; + + await model.deleteBabyOrders(newChild: deleteBaby); + if (model.isDeleted) { + AppToast.showSuccessToast(message: "Record Deleted"); + Navigator.pop(context, model.isDeleted); + } else { + //TODO handling error + } + }, + ), + Texts("Delete"), + ]), + SizedBox( + height: 12, + ), + ], + ), + ); + } +} diff --git a/lib/pages/ChildVaccines/child_page.dart b/lib/pages/ChildVaccines/child_page.dart index 806a5b71..c2999ca2 100644 --- a/lib/pages/ChildVaccines/child_page.dart +++ b/lib/pages/ChildVaccines/child_page.dart @@ -13,6 +13,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'ChidDetailsWidget.dart'; import 'dialogs/delete_child.dart'; class ChildPage extends StatefulWidget { @@ -22,181 +23,75 @@ class ChildPage extends StatefulWidget { class _ChildPageState extends State with SingleTickerProviderStateMixin { - DeleteBaby deleteBaby = DeleteBaby(); @override Widget build(BuildContext context) { var checkedValue = true; return BaseView( - onModelReady: (model) => model.getNewUserOrders(), - builder: (_, model, widget) => AppScaffold( - isShowAppBar: true, - appBarTitle: " Vaccination", - baseViewModel: model, - body: SingleChildScrollView( - child: Container( - margin: EdgeInsets.only(left: 15, right: 15, top: 70), - child: Column( - children: [ - ...List.generate( - model.babyInformationModelList.length, - (index) => Container( - margin: EdgeInsets.only( - left: 0, right: 0, bottom: 20), - - decoration: BoxDecoration( - shape: BoxShape.rectangle, - border: Border.all( - color: Colors.white, width: 0.5), - borderRadius: - BorderRadius.all(Radius.circular(5)), - color: Colors.white, - ), - padding: EdgeInsets.all(12), - width: 200,//double.infinity, - child: Column( - children: [ - Row(children: [ - Texts("CHILD NAME"), - ]), - Row(children: [ - Texts(model - .babyInformationModelList[index] - .babyName - .trim()), - ]), - Row(children: [ - IconButton( - icon: Image.asset(model - .babyInformationModelList[ - index] - .gender == - 1 - ? 'assets/images/new-design/male.png' - : 'assets/images/new-design/female.png'), - tooltip: '', - onPressed: () { - setState(() { - // _volume += 10; - // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); - }); - }, - ), - Texts(model - .babyInformationModelList[index] - .genderDescription), - IconButton( - icon: Icon( - Icons.remove_red_eye, - color: Colors.red, - ), - tooltip: '', - onPressed: () { - Navigator.push( - context, - FadePage( - - - page: VaccinationTablePage(), - - - ), - ); - - }, - ) - ]), - Row(children: [ - Texts("Birthday"), - ]), - Row(children: [ - IconButton( - icon: new Image.asset( - 'assets/images/new-design/calender-secondary.png'), - tooltip: '', - onPressed: () { - setState(() { - - }); - }, - ), - Texts(DateUtil.yearMonthDay(model - .babyInformationModelList[index] - .dOB)), - ]), - Row(children: [ - IconButton( - icon: new Image.asset( - 'assets/images/new-design/garbage.png'), - tooltip: '', - onPressed: ()async { - - //===================== - await model.deleteBabyOrders(newChild:deleteBaby ); - - - deleteBaby.babyID=model.babyInformationModelList[index] - .babyID; - - await model.deleteBabyOrders(newChild:deleteBaby ); - if(model.isDeleted){ - AppToast.showSuccessToast(message: "Record Deleted"); - Navigator.pop(context,model.isDeleted); - }else{ - - //TODO handling error - } - - - - - - }, - ), - Texts("Delete"), - ]), - SizedBox( - height: 12, - ), - ], - ), - - ), - - - ) - ], - )) - ), - bottomSheet: Container( - height: MediaQuery.of(context).size.height * 0.12, - width: double.infinity, - padding: EdgeInsets.all(15), - child: SecondaryButton( - textColor: Colors.white, - color: checkedValue == false - ? Colors.white24 - : Color.fromRGBO( - 63, - 72, - 74, - 1, - ), - label: "ADD NEW CHILD ", - // - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => AddNewChildPage(), - ), - ).then((value) { - if (value) model.getNewUserOrders(); - }); + onModelReady: (model) => model.getNewUserOrders(), + builder: (_, model, widget) => AppScaffold( + isShowAppBar: true, + appBarTitle: " Vaccination", + baseViewModel: model, + body: SingleChildScrollView( + child: Container( + margin: EdgeInsets.only(left: 10, right: 10, top: 10), + child: Column( + children: [ + GridView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + childAspectRatio: MediaQuery.of(context).size.width / + (MediaQuery.of(context).size.height / 1.25), + ), + itemCount: model.babyInformationModelList.length, + itemBuilder: (BuildContext context, int index) { + return ChildDetailsWidget( + model: model, + babyInfo: model.babyInformationModelList[index], + ); }, ), - ), - )); + SizedBox( + height: 15, + ), + ], + ), + ), + ), + bottomSheet: Container( + height: MediaQuery.of(context).size.height * 0.10, + width: double.infinity, + padding: EdgeInsets.all(15), + child: SecondaryButton( + textColor: Colors.white, + color: checkedValue == false + ? Colors.white24 + : Color.fromRGBO( + 63, + 72, + 74, + 1, + ), + label: "ADD NEW CHILD ", + // + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => AddNewChildPage(), + ), + ).then((value) { + if (value) model.getNewUserOrders(); + }); + }, + ), + ), + ), + ); } } diff --git a/lib/pages/ChildVaccines/child_vaccines_page.dart b/lib/pages/ChildVaccines/child_vaccines_page.dart index 92f3a0be..14eae875 100644 --- a/lib/pages/ChildVaccines/child_vaccines_page.dart +++ b/lib/pages/ChildVaccines/child_vaccines_page.dart @@ -1,4 +1,3 @@ - import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; @@ -13,214 +12,150 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - - class ChildVaccinesPage extends StatefulWidget { @override _ChildVaccinesPageState createState() => _ChildVaccinesPageState(); } class _ChildVaccinesPageState extends State - with SingleTickerProviderStateMixin{ + with SingleTickerProviderStateMixin { TextEditingController titleController = TextEditingController(); - var checkedValue=false; - String addEmail=""; + var checkedValue = false; + String addEmail = ""; + @override Widget build(BuildContext context) { - return BaseView( onModelReady: (model) => model.getUserInformationRequestOrders(), builder: (_, model, w) => AppScaffold( - isShowAppBar: true, - baseViewModel: model, - appBarTitle: " Vaccination",//TranslationBase.of(context).advancePayment, - body: SingleChildScrollView( - physics: ScrollPhysics(), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - SizedBox( - height: 20, - ), + isShowAppBar: true, + baseViewModel: model, + appBarTitle: " Vaccination", + //TranslationBase.of(context).advancePayment, + body: SingleChildScrollView( + physics: ScrollPhysics(), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + SizedBox( + height: 20, + ), - Padding( - padding: const EdgeInsets.all(10.0), - child:Container( - child: Texts("Welcome back",fontSize: 20,), - ) , + Padding( + padding: const EdgeInsets.all(10.0), + child: Container( + child: Texts( + "Welcome back", + fontSize: 20, ), - Divider(color:Colors.black , indent: 10, - endIndent: 10,), - SizedBox( - height: 20, - ), - Padding( - padding: const EdgeInsets.all(10.0), - child:Container( - child: Texts("Please ensure that the email address is up-to-date and process to view the schedule",fontSize: 20,), - ) , - ), - - Divider(color:Colors.black , indent: 10, - endIndent: 10,), - Padding( - padding: const EdgeInsets.all(10.0), - child:Container( - - margin: EdgeInsets.only(left: 10, right: 10, top: 15), - child: TextFields( - fillColor: Colors.red, - - hintText: model.user.emailAddress, - controller: titleController, - fontSize: 20, - hintColor: Colors.black, - fontWeight: FontWeight.w600, - onChanged: (text) { - addEmail=text; - model.user.emailAddress==addEmail?checkedValue=false:checkedValue=true; - - - }, - validator: (value) { - - if (value == null) - { - return model.user.emailAddress; - - } - else - - { - return model.user.emailAddress;} - }, - ), - ), + ), + ), + Divider( + color: Colors.black, + indent: 10, + endIndent: 10, + ), + SizedBox( + height: 20, + ), + Padding( + padding: const EdgeInsets.all(10.0), + child: Container( + child: Texts( + "Please ensure that the email address is up-to-date and process to view the schedule", + fontSize: 20, ), - Container( - height: MediaQuery.of(context).size.height * 0.12, - width: double.infinity, - - padding: EdgeInsets.all(15), - child: SecondaryButton( - textColor: Colors.white, - color: checkedValue== false ?Colors.white24:Color.fromRGBO(63, 72, 74, 1,), - label: "UPDATE EMAIL", - // - onTap: (){ - model.user.emailAddress=addEmail.toString(); - AppToast.showSuccessToast( - message: "Email updated"); - // bloodDetails.city=_selectedHospital.toString(); - - // bloodDetails. - }, - + ), + ), - ), + Divider( + color: Colors.black, + indent: 10, + endIndent: 10, + ), + Padding( + padding: const EdgeInsets.all(10.0), + child: Container( + margin: EdgeInsets.only(left: 10, right: 10, top: 15), + child: TextFields( + fillColor: Colors.red, + hintText: model.user.emailAddress, + controller: titleController, + fontSize: 20, + hintColor: Colors.black, + fontWeight: FontWeight.w600, + onChanged: (text) { + addEmail = text; + model.user.emailAddress == addEmail + ? checkedValue = false + : checkedValue = true; + }, + validator: (value) { + if (value == null) { + return model.user.emailAddress; + } else { + return model.user.emailAddress; + } + }, ), - Container( - height: MediaQuery.of(context).size.height * 0.12, - width: double.infinity, - - padding: EdgeInsets.all(15), - child: SecondaryButton( - textColor: Colors.white, - color: Color.fromRGBO(63, 72, 74, 1,), - label: " VIEW LIST OF CHILDREN", - // - onTap: () => Navigator.push( - context, - FadePage( - page: ChildPage(), - - - - ), + ), + ), + Container( + height: MediaQuery.of(context).size.height * 0.10, + width: double.infinity, + padding: EdgeInsets.all(15), + child: SecondaryButton( + textColor: Colors.white, + color: checkedValue == false + ? Colors.white24 + : Color.fromRGBO( + 63, + 72, + 74, + 1, ), - - - ), - ), - - // Texts( - // // TranslationBase.of(context).advancePaymentLabel, - // model.user.emailAddress, - // textAlign: TextAlign.center, - // ), - SizedBox( - height: 12, - ), - SizedBox( - height: 12, - ), - SizedBox( - height: 12, - ), - - SizedBox( - height: 12, - ), - - SizedBox( - height: 12, + label: "UPDATE EMAIL", + // + onTap: () { + model.user.emailAddress = addEmail.toString(); + AppToast.showSuccessToast(message: "Email updated"); + // bloodDetails.city=_selectedHospital.toString(); + + // bloodDetails. + }, + ), + ), + Container( + height: MediaQuery.of(context).size.height * 0.10, + width: double.infinity, + padding: EdgeInsets.all(15), + child: SecondaryButton( + textColor: Colors.white, + color: Color.fromRGBO( + 63, + 72, + 74, + 1, ), - - SizedBox( - height: 10, + label: " VIEW LIST OF CHILDREN", + // + onTap: () => Navigator.push( + context, + FadePage( + page: ChildPage(), + ), ), - // Row( - // mainAxisAlignment: MainAxisAlignment.center, - // crossAxisAlignment: CrossAxisAlignment.center, - // children: [ - // Center( - // child: Container( - // color: Colors.white, - // width: 350, - // child: InkWell( - // onTap: () { - // showDialog( - // context: context, - // builder: (_) => - // AssetGiffyDialog( - // title: Text( - // "", - // style: TextStyle( - // fontSize: 22.0, - // fontWeight: - // FontWeight - // .w600), - // ), - // image: Image.asset( - // 'assets/images/BloodChrt_EN.png'), - // buttonCancelText: - // Text('cancel'), - // buttonCancelColor: - // Colors.grey, - // onlyCancelButton: true, - // )); - // }, - // child: Container( - // width: 250, - // height: 200, - // child:Image.asset( - // 'assets/images/BloodChrt_EN.png')), - // ), - // ), - // ), - // ], - // ), - - SizedBox( - height: MediaQuery.of(context).size.height * 0.15, - ) - ], + ), ), + SizedBox( + height: MediaQuery.of(context).size.height * 0.15, + ) + ], ), - ), + ), + ), ); } } - diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index 0aa109f4..79f8f7b1 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -1,8 +1,6 @@ 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/models/Appointments/toDoCountProviderModel.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/pages/AlHabibMedicalService/all_habib_medical_service_page.dart'; @@ -24,8 +22,6 @@ 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; @@ -36,22 +32,9 @@ class HomePage extends StatefulWidget { } class _HomePageState extends State { - ToDoCountProviderModel 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( @@ -72,7 +55,7 @@ class _HomePageState extends State { decoration: BoxDecoration( image: DecorationImage( image: ExactAssetImage( - 'assets/images/dq_home_page_bg_image.png'), + 'assets/images/dashboard_top_bg.png'), fit: BoxFit.cover), ), child: Stack( @@ -83,7 +66,7 @@ class _HomePageState extends State { right: 5, child: Container( width: - MediaQuery.of(context).size.width * 0.8, + MediaQuery.of(context).size.width * 0.8, child: Row( children: [ Expanded( @@ -98,7 +81,7 @@ class _HomePageState extends State { fit: BoxFit.fill, ), color: - Colors.white.withOpacity(0.3), + Colors.white.withOpacity(0.3), borderRadius: BorderRadius.all( Radius.circular(5))), child: Container( @@ -109,17 +92,17 @@ class _HomePageState extends State { style: TextStyle( color: Colors.white, fontWeight: - FontWeight.bold, + 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), + child: SvgPicture.asset( + 'assets/images/new-design/covid-19-car.svg', + width: 45.0, + height: 45.0), ), Container( margin: EdgeInsets.only( @@ -132,34 +115,34 @@ class _HomePageState extends State { color: Colors .white, fontWeight: - FontWeight - .bold, + FontWeight + .bold, fontSize: - 16.0)), + 16.0)), ButtonTheme( shape: - RoundedRectangleBorder( + RoundedRectangleBorder( borderRadius: - BorderRadius - .circular( - 5.0), + BorderRadius + .circular( + 5.0), ), minWidth: MediaQuery.of( - context) - .size - .width * + context) + .size + .width * 0.15, height: 25.0, child: RaisedButton( color: Colors .red[800], textColor: - Colors.white, + Colors.white, disabledTextColor: - Colors.white, + Colors.white, disabledColor: - new Color( - 0xFFbcc2c4), + new Color( + 0xFFbcc2c4), onPressed: () { navigateToCovidDriveThru(); }, @@ -167,7 +150,7 @@ class _HomePageState extends State { "BOOK NOW", style: TextStyle( fontSize: - 12.0)), + 12.0)), ), ), ], @@ -193,11 +176,11 @@ class _HomePageState extends State { .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: SvgPicture.asset( + projectViewModel.isArabic + ? 'assets/images/new-design/livecare_arabic_logo.svg' + : 'assets/images/new-design/liveCare_white_logo.svg', + ), ), ), ), @@ -215,245 +198,240 @@ class _HomePageState extends State { top: 155, left: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == - Orientation.landscape + Orientation.landscape ? 0.02 : 0.03), right: MediaQuery.of(context).size.width * (MediaQuery.of(context).orientation == - Orientation.landscape + Orientation.landscape ? 0.02 : 0.03), - child: (!model.isLogin ) + child: (!model.isLogin && projectViewModel.user == null) ? Container( - width: double.infinity, - height: 160, - decoration: BoxDecoration( - color: Theme.of(context).primaryColor, - shape: BoxShape.rectangle, - border: Border.all( - color: Colors.transparent, width: 0.5), - borderRadius: - BorderRadius.all(Radius.circular(9)), - image: DecorationImage( - image: ExactAssetImage( - 'assets/images/bg_graphic.png'), - fit: BoxFit.cover)), - child: Container( - margin: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 8, - ), - Texts( - TranslationBase.of(context).myMedicalFile, - color: Colors.black87, - bold: true, - fontSize: 23, - ), - SizedBox( - height: 5, + width: double.infinity, + height: 125, + decoration: BoxDecoration( + color: HexColor('#A59E9E'), + shape: BoxShape.rectangle, + border: Border.all( + color: Colors.transparent, width: 0.5), + borderRadius: + BorderRadius.all(Radius.circular(9)), + image: DecorationImage( + image: ExactAssetImage( + 'assets/images/bg_graphic.png'), + fit: BoxFit.cover)), + child: Container( + margin: EdgeInsets.all(5), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 8, + ), + Texts( + TranslationBase.of(context).myMedicalFile, + color: Colors.black87, + bold: true, + fontSize: 23, + ), + SizedBox( + height: 5, + ), + Texts( + TranslationBase.of(context) + .myMedicalFileSubTitle, + color: Colors.black, + fontSize: 16, + ), + Align( + alignment: projectViewModel.isArabic + ? Alignment.bottomRight + : Alignment.bottomLeft, + child: 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(9)), ), - Texts( - TranslationBase.of(context) - .myMedicalFileSubTitle, - color: Colors.black, - fontSize: 16, + child: Center( + child: Texts( + TranslationBase.of(context) + .viewMore, + color: Colors.white, + fontSize: 12, + ), ), - Align( - alignment: projectViewModel.isArabic - ? Alignment.bottomLeft - : Alignment.bottomRight, - child: InkWell( - onTap: () { - widget.goToMyProfile(); - }, - child: Container( - margin: EdgeInsets.all(2), - width: MediaQuery.of(context) - .size - .width * - 0.30, - height: 30, - decoration: BoxDecoration( + ), + ), + ) + ], + ), + ), + ) + : Container( + width: double.infinity, + height: 130, + decoration: BoxDecoration( + color: HexColor('#A59E9E'), + shape: BoxShape.rectangle, + border: Border.all( + color: Colors.transparent, width: 0.5), + borderRadius: + BorderRadius.all(Radius.circular(9)), + image: DecorationImage( + image: ExactAssetImage( + '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, + ), + Texts( + model.user.firstName + + " " + + model.user.lastName, + color: Colors.grey[100], + bold: true, + fontSize: 15, + ), + Texts( + '${model.user.patientID}', color: Colors.white, - shape: BoxShape.rectangle, - border: Border.all( - color: Colors.transparent, - width: 0.5), - borderRadius: BorderRadius.all( - Radius.circular(4)), + fontSize: 14, ), - child: Center( - child: Texts( - TranslationBase.of(context) - .viewMore, - color: Theme.of(context) - .primaryColor, - 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: 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), ), ), - ) - ], - ), - ), - ) - : Container( - width: double.infinity, - height: projectViewModel.isArabic ? 180 : 150, - decoration: BoxDecoration( - color: Theme.of(context).primaryColor, - shape: BoxShape.rectangle, - border: Border.all( - color: Colors.transparent, width: 0.5), - borderRadius: - BorderRadius.all(Radius.circular(9)), - image: DecorationImage( - image: ExactAssetImage( - 'assets/images/bg_graphic.png'), - fit: BoxFit.cover), + child: Center( + child: Texts( + TranslationBase.of(context) + .viewMore, + color: Colors.white, + fontSize: 12, + ), + ), + ), + ) + ], ), - child: Container( - margin: EdgeInsets.all(5), - child: Column( - children: [ - Row( + Row( + //crossAxisAlignment: CrossAxisAlignment.center, + //mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Expanded( + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, 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: 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, - ), - ), - ), + Image.asset( + 'assets/images/height_icon.png', + width: 35, + height: 40, + ), + Texts( + "${model.heightCm}", + color: Colors.white, ) ], ), - Row( - //crossAxisAlignment: CrossAxisAlignment.center, - //mainAxisAlignment: MainAxisAlignment.spaceAround, + ), + SizedBox( + width: 3, + ), + Expanded( + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, 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, - ) - ], - ), - ), - 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, - ) - ], - ), + Image.asset( + 'assets/images/weight_icon.png', + width: 25, + height: 40, ), - 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, - ) - ], - ), + Texts( + '${model.weightKg}', + color: Colors.white, + ) + ], + ), + ), + 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, + ) ], - ) - ], - ), - ), - ), + ), + ), + ], + ) + ], + ), + ), + ), ), ], ), @@ -652,8 +630,8 @@ class _HomePageState extends State { context, FadePage( page: ErOptions( - isAppbar: true, - ))), + isAppbar: true, + ))), child: Center( child: Padding( padding: const EdgeInsets.all(15.0), @@ -721,23 +699,25 @@ class _HomePageState extends State { child: Container(), ), Texts( - TranslationBase.of(context).viewAll, + TranslationBase.of(context).viewMore, color: Colors.white, - bold: true, + //fontWeight: FontWeight.normal, ) ], ), ), height: 100, - imageName: 'ask_doctor_bg.png', - //color: Colors.grey[700], + imageName: 'contact_us_bg.png', + opacity: 0.5, + color: Colors.grey[700], width: MediaQuery.of(context).size.width * 0.45, onTap: () => Navigator.push( context, FadePage(page: AllHabibMedicalService())), ), DashboardItem( - opacity:1.0, onTap: () { + // Navigator.push( + // context, FadePage(page: FeedbackHomePage())); Navigator.push( context, FadePage(page: ContactUsPage())); }, @@ -762,15 +742,16 @@ class _HomePageState extends State { child: Container(), ), Texts( - TranslationBase.of(context).viewAll, + TranslationBase.of(context).viewMore, color: Colors.white, - bold: true, + fontWeight: FontWeight.normal, ) ], ), ), height: 100, - imageName: 'rectangle.png', + imageName: 'contact_us_bg.png', + opacity: 0.5, color: Colors.grey[700], width: MediaQuery.of(context).size.width * 0.45, ), @@ -792,37 +773,20 @@ 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 { const DashboardItem( {this.hasBorder = false, - this.imageName, - @required this.child, - this.onTap, - Key key, - this.width, - this.height, - this.color, - this.opacity = 0.4, - this.hasColorFilter = true, this.margin, this.icon}) + this.imageName, + @required this.child, + this.onTap, + Key key, + this.width, + this.height, + this.color, + this.opacity = 0.4, + this.hasColorFilter = true}) : super(key: key); final bool hasBorder; final String imageName; @@ -832,8 +796,6 @@ class DashboardItem extends StatelessWidget { final double height; final Color color; final double opacity; - final double margin; - final Widget icon; final bool hasColorFilter; @override @@ -845,13 +807,13 @@ class DashboardItem extends StatelessWidget { height: height != null ? height : MediaQuery.of(context).orientation == Orientation.portrait - ? MediaQuery.of(context).size.height * 0.19 - : MediaQuery.of(context).size.height * 0.35, + ? MediaQuery.of(context).size.height * 0.19 + : MediaQuery.of(context).size.height * 0.35, decoration: BoxDecoration( color: !hasBorder ? color != null - ? color - : Colors.black.withOpacity(opacity) + ? color + : HexColor('#050705').withOpacity(opacity) : Colors.white, borderRadius: BorderRadius.circular(6.0), border: hasBorder @@ -859,14 +821,13 @@ class DashboardItem extends StatelessWidget { : Border.all(width: 0.0, color: Colors.transparent), image: imageName != null ? DecorationImage( - image: ExactAssetImage('assets/images/$imageName'), - fit: BoxFit.cover, - colorFilter: new ColorFilter.mode( - Colors.black.withOpacity(opacity), BlendMode.dstIn), - ) - : icon, + image: ExactAssetImage('assets/images/$imageName'), + fit: BoxFit.cover, + colorFilter: hasColorFilter ? new ColorFilter.mode( + Colors.black.withOpacity(0.2), BlendMode.dstIn) : null, + ) + : null, ), - margin: EdgeInsets.all(margin), child: Center( child: child, ), From 49974f81db2ccaf8a32297ac8a66458711b2ad12 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Sun, 29 Nov 2020 12:29:09 +0200 Subject: [PATCH 10/20] add translations to child Vaccination --- lib/config/localized_values.dart | 60 ++++++ .../ChildVaccines/ChidDetailsWidget.dart | 15 +- lib/pages/ChildVaccines/child_page.dart | 9 +- .../ChildVaccines/child_vaccines_page.dart | 18 +- .../dialogs/SelectGenderDialog.dart | 1 + .../ChildVaccines/vaccinationtable_page.dart | 191 +++++++++++------- lib/uitl/translations_delegate_base.dart | 14 ++ 7 files changed, 216 insertions(+), 92 deletions(-) diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 2f746c51..978d83af 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1069,4 +1069,64 @@ const Map localizedValues = { "ar": "أرسل التقرير" }, + "vaccination": { + "en": "Vaccination", + "ar": "جدول التطعيمات" + }, + "welcomeBack": { + "en": "Welcome back", + "ar": "مرحبا مرة أخرى" + }, + "instructions": { + "en": "Please ensure that the email address is up-to-date and process to view the schedule", + "ar": "يرجى التأكد من صحة عنوان البريد الالكتروني و المتابعة لعرض الجدول " + }, + "update-email": { + "en": "Update Email", + "ar": "تحديث البريد الالكتروني" + }, + + "updated-email": { + "en": "Updated email successfully", + "ar": "تم تحديث البريد الالكتروني" + }, + + "view-list-children": { + "en": "View List of Children", + "ar": "عرض قائمة الأطفال" + }, + + "add-child": { + "en": "Add New Child", + "ar": "اضافة طفل" + }, + "child-name": { + "en": "Child Name", + "ar": "اسم الطفل" + }, + "childDob": { + "en": "Birth Date", + "ar": "تاريخ الولادة" + }, + "delete": { + "en": "Delete", + "ar": "حذف" + }, + "deleted-child": { + "en": "The request was successful. The children have removed from the vaccination schedule subscription service.", + "ar": "تم حذف الطفل بنجاح" + }, + "visit": { + "en": "Visit", + "ar": "زيارة" + }, + "description-vaccination": { + "en": "Description", + "ar": "وصف" + }, + "due-date": { + "en": "Due date", + "ar": "تاريخ الاستحقاق" + }, + }; diff --git a/lib/pages/ChildVaccines/ChidDetailsWidget.dart b/lib/pages/ChildVaccines/ChidDetailsWidget.dart index 7a7d52e2..bce5d54e 100644 --- a/lib/pages/ChildVaccines/ChidDetailsWidget.dart +++ b/lib/pages/ChildVaccines/ChidDetailsWidget.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccin import 'package:diplomaticquarterapp/pages/ChildVaccines/vaccinationtable_page.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/text.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; @@ -32,7 +33,7 @@ class ChildDetailsWidget extends StatelessWidget { child: Column( children: [ Row(children: [ - Texts("CHILD NAME"), + Texts(TranslationBase.of(context).childName), ]), Row(children: [ Texts(babyInfo.babyName.trim()), @@ -44,10 +45,6 @@ class ChildDetailsWidget extends StatelessWidget { : 'assets/images/new-design/female.png'), tooltip: '', onPressed: () { - // setState(() { - // // _volume += 10; - // // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); - // }); }, ), Texts(babyInfo.genderDescription), @@ -61,14 +58,14 @@ class ChildDetailsWidget extends StatelessWidget { Navigator.push( context, FadePage( - page: VaccinationTablePage(), + page: VaccinationTablePage(babyInfo: babyInfo,), ), ); }, ) ]), Row(children: [ - Texts("Birthday"), + Texts(TranslationBase.of(context).childDob), ]), Row( children: [ @@ -92,14 +89,14 @@ class ChildDetailsWidget extends StatelessWidget { await model.deleteBabyOrders(newChild: deleteBaby); if (model.isDeleted) { - AppToast.showSuccessToast(message: "Record Deleted"); + AppToast.showSuccessToast(message: TranslationBase.of(context).deletedChild); Navigator.pop(context, model.isDeleted); } else { //TODO handling error } }, ), - Texts("Delete"), + Texts(TranslationBase.of(context).delete), ]), SizedBox( height: 12, diff --git a/lib/pages/ChildVaccines/child_page.dart b/lib/pages/ChildVaccines/child_page.dart index c2999ca2..7493a492 100644 --- a/lib/pages/ChildVaccines/child_page.dart +++ b/lib/pages/ChildVaccines/child_page.dart @@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/pages/ChildVaccines/add_newchild_page.dart' import 'package:diplomaticquarterapp/pages/ChildVaccines/vaccinationtable_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -20,7 +21,7 @@ class ChildPage extends StatefulWidget { @override _ChildPageState createState() => _ChildPageState(); } - +//TODO class _ChildPageState extends State with SingleTickerProviderStateMixin { DeleteBaby deleteBaby = DeleteBaby(); @@ -32,7 +33,7 @@ class _ChildPageState extends State onModelReady: (model) => model.getNewUserOrders(), builder: (_, model, widget) => AppScaffold( isShowAppBar: true, - appBarTitle: " Vaccination", + appBarTitle: TranslationBase.of(context).vaccination, baseViewModel: model, body: SingleChildScrollView( child: Container( @@ -46,7 +47,7 @@ class _ChildPageState extends State gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 2, childAspectRatio: MediaQuery.of(context).size.width / - (MediaQuery.of(context).size.height / 1.25), + (MediaQuery.of(context).size.height / 1.45), ), itemCount: model.babyInformationModelList.length, itemBuilder: (BuildContext context, int index) { @@ -77,7 +78,7 @@ class _ChildPageState extends State 74, 1, ), - label: "ADD NEW CHILD ", + label: TranslationBase.of(context).addChild, // onTap: () { Navigator.push( diff --git a/lib/pages/ChildVaccines/child_vaccines_page.dart b/lib/pages/ChildVaccines/child_vaccines_page.dart index 14eae875..4dd4c7f5 100644 --- a/lib/pages/ChildVaccines/child_vaccines_page.dart +++ b/lib/pages/ChildVaccines/child_vaccines_page.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_mod import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; @@ -30,8 +31,7 @@ class _ChildVaccinesPageState extends State builder: (_, model, w) => AppScaffold( isShowAppBar: true, baseViewModel: model, - appBarTitle: " Vaccination", - //TranslationBase.of(context).advancePayment, + appBarTitle: TranslationBase.of(context).vaccination, body: SingleChildScrollView( physics: ScrollPhysics(), child: Column( @@ -41,12 +41,11 @@ class _ChildVaccinesPageState extends State SizedBox( height: 20, ), - Padding( padding: const EdgeInsets.all(10.0), child: Container( child: Texts( - "Welcome back", + TranslationBase.of(context).welcomeBackV, fontSize: 20, ), ), @@ -63,12 +62,11 @@ class _ChildVaccinesPageState extends State padding: const EdgeInsets.all(10.0), child: Container( child: Texts( - "Please ensure that the email address is up-to-date and process to view the schedule", + TranslationBase.of(context).instructions, fontSize: 20, ), ), ), - Divider( color: Colors.black, indent: 10, @@ -115,11 +113,12 @@ class _ChildVaccinesPageState extends State 74, 1, ), - label: "UPDATE EMAIL", + label: TranslationBase.of(context).updateEmail, // onTap: () { model.user.emailAddress = addEmail.toString(); - AppToast.showSuccessToast(message: "Email updated"); + AppToast.showSuccessToast( + message: TranslationBase.of(context).updatedEmail); // bloodDetails.city=_selectedHospital.toString(); // bloodDetails. @@ -138,7 +137,7 @@ class _ChildVaccinesPageState extends State 74, 1, ), - label: " VIEW LIST OF CHILDREN", + label: TranslationBase.of(context).viewListChildren, // onTap: () => Navigator.push( context, @@ -148,7 +147,6 @@ class _ChildVaccinesPageState extends State ), ), ), - SizedBox( height: MediaQuery.of(context).size.height * 0.15, ) diff --git a/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart b/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart index 259bbdb7..33c11020 100644 --- a/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart +++ b/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart @@ -14,6 +14,7 @@ class SelectGenderDialog extends StatefulWidget { } class _SelectGenderDialogState extends State { + @override Widget build(BuildContext context) { return SimpleDialog( diff --git a/lib/pages/ChildVaccines/vaccinationtable_page.dart b/lib/pages/ChildVaccines/vaccinationtable_page.dart index c160acfb..4654c75a 100644 --- a/lib/pages/ChildVaccines/vaccinationtable_page.dart +++ b/lib/pages/ChildVaccines/vaccinationtable_page.dart @@ -1,101 +1,154 @@ +import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/vaccination_table_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_html/flutter_html.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; - +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'dialogs/SelectGenderDialog.dart'; class VaccinationTablePage extends StatelessWidget { + final List_BabyInformationModel babyInfo; + + const VaccinationTablePage({Key key, this.babyInfo}) : super(key: key); @override Widget build(BuildContext context) { var checkedValue; return BaseView( - onModelReady: (model) => model.getCreateVaccinationTable(),//getUserTermsAndConditions(), + onModelReady: (model) => model.getCreateVaccinationTable(), builder: (_, model, w) => AppScaffold( isShowAppBar: true, baseViewModel: model, - appBarTitle: "Vaccination", + appBarTitle: TranslationBase.of(context).vaccination, body: SingleChildScrollView( - child:Container( - margin: EdgeInsets.only(left: 15,right: 15,top: 70), + child: Container( + margin: EdgeInsets.only(left: 15, right: 15, top: 10), child: Column( - children: [//babyInformationModelList.length - ...List.generate(model.creteVaccinationTableModelList.length, (index) => - Container( - decoration: BoxDecoration( - shape: BoxShape.rectangle, - border: Border.all(color: Colors.white, width: 0.5), - borderRadius: BorderRadius.all(Radius.circular(5)), - color: Colors.white, - + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Expanded( + child: Column( + children: [ + Texts(TranslationBase.of(context).childName), + Texts(babyInfo.babyName??'',fontWeight: FontWeight.w600,), + ], + ), + ), + Expanded( + child: Column(children: [ + + Texts(TranslationBase.of(context).childDob), + Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon(FontAwesomeIcons.calendarCheck,color: Colors.red,), + SizedBox(width: 15,), + Texts(DateUtil.yearMonthDay(babyInfo.dOB)??''), + ], + ), + ], + ), + ), + ], + ), + SizedBox(height: 15,), + Divider(), + Column( + children: [ + Row( + children: [ + Texts(TranslationBase.of(context).visit), + SizedBox( + width: 10, + ), + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Texts(TranslationBase.of(context).descriptionVaccination), + ], + ), ), - padding: EdgeInsets.all(12), - width: double.infinity, - child: Column( + Texts(TranslationBase.of(context).dueDate), + ], + ), + ], + ), + ...List.generate( + model.creteVaccinationTableModelList.length, + (index) => Container( + // decoration: BoxDecoration( + // shape: BoxShape.rectangle, + // border: Border.all(color: Colors.white, width: 0.5), + // borderRadius: BorderRadius.all(Radius.circular(5)), + // // color: Colors.white, + // ), + padding: EdgeInsets.all(12), + width: double.infinity, + child: Column( + children: [ + Row( children: [ - Row(children: [ - Text(model.creteVaccinationTableModelList[index].visit), - SizedBox(width: 10,), - - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Html( - // data:"
BCG
HEPATITIS B
"//model.creteVaccinationTableModelList[index].vaccinesDescription - data:model.creteVaccinationTableModelList[index].vaccinesDescription, - - ), - ],), - ), - Text(model.creteVaccinationTableModelList[index].givenAt), - - - ],), - Divider(color:Colors.black ,), - + Texts(model + .creteVaccinationTableModelList[index].visit), + SizedBox( + width: 10, + ), + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Html( + data: model.creteVaccinationTableModelList[index].vaccinesDescription, + ), + ], + ), + ), + Texts(model.creteVaccinationTableModelList[index].givenAt), ], - ) - - - ) - + ), + Divider( + color: Colors.white,height: 3,thickness: 1.0, + ), + ], + ), + ), ) ], ), - + ), ), - ), - bottomSheet: Container( - height: MediaQuery.of(context).size.height * 0.12, - width: double.infinity, - - padding: EdgeInsets.all(12), - child: SecondaryButton( - textColor: Colors.white, - color: checkedValue== false ?Colors.white24:Color.fromRGBO(63, 72, 74, 1,), - label: "Send Email ", - // - onTap: () { - //SelectGenderDialog(); -//=============== - showDialog( - context: context, - child: SelectGenderDialog( - ), - ); - //========= - } - - + bottomSheet: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + height: MediaQuery.of(context).size.height * 0.10, + width: double.infinity, + padding: EdgeInsets.all(12), + child: SecondaryButton( + textColor: Colors.white, + color: checkedValue == false + ? Colors.white24 + : Color.fromRGBO(63, 72, 74, 1,), + label: TranslationBase.of(context).sendEmail, + onTap: () { + showDialog( + context: context, + child: SelectGenderDialog(), + ); + }, + ), ), ), ), diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index b1d2667d..b1162f5b 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -875,6 +875,20 @@ String get fileno => localizedValues['fileno'][locale.languageCode]; String get report => localizedValues['report'][locale.languageCode]; String get openRad => localizedValues['open-rad'][locale.languageCode]; String get sendCopyRad => localizedValues['send-copy'][locale.languageCode]; + String get vaccination => localizedValues['vaccination'][locale.languageCode]; + String get welcomeBackV => localizedValues['welcomeBack'][locale.languageCode]; + String get instructions => localizedValues['instructions'][locale.languageCode]; + String get updateEmail => localizedValues['update-email'][locale.languageCode]; + String get updatedEmail => localizedValues['updated-email'][locale.languageCode]; + String get viewListChildren => localizedValues['view-list-children'][locale.languageCode]; + String get addChild => localizedValues['add-child'][locale.languageCode]; + String get childName => localizedValues['child-name'][locale.languageCode]; + String get childDob => localizedValues['childDob'][locale.languageCode]; + String get delete => localizedValues['delete'][locale.languageCode]; + String get deletedChild => localizedValues['deleted-child'][locale.languageCode]; + String get visit => localizedValues['visit'][locale.languageCode]; + String get descriptionVaccination => localizedValues['description-vaccination'][locale.languageCode]; + String get dueDate => localizedValues['due-date'][locale.languageCode]; } From a87855f445e07761791a0173a28304e196a0171f Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Sun, 29 Nov 2020 12:31:52 +0200 Subject: [PATCH 11/20] Fix issues on hhc module --- lib/config/config.dart | 4 +- lib/config/localized_values.dart | 3 + .../home_health_care_service.dart | 5 +- .../home_health_care_index_page.dart | 69 ------------------- .../HomeHealthCare/home_health_care_page.dart | 2 + lib/pages/landing/home_page.dart | 4 +- lib/uitl/translations_delegate_base.dart | 2 + 7 files changed, 15 insertions(+), 74 deletions(-) delete mode 100644 lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index c67e2990..c034d2fc 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'; @@ -336,6 +336,8 @@ const PATIENT_ER_UPDATE_PRES_ORDER ="Services/Patients.svc/REST/PatientER_Update const GET_ORDER_DETAIL_BY_ID ="Services/Patients.svc/REST/PatientER_HHC_GetTransactionsForOrder"; const GET_CMC_ORDER_DETAIL_BY_ID ="Services/Patients.svc/REST/PatientER_CMC_GetTransactionsForOrder"; const GET_CHECK_UP_ITEMS ="Services/Patients.svc/REST/GetCheckUpItems"; +const GET_PATIENT_ALL_PRES_ORD= 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; + const TIMER_MIN = 10; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index fbdf2ab5..c92ad50e 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -667,5 +667,8 @@ const Map> localizedValues = { "drag-point": { "en": "Drag point to change your age", "ar": "اسحب لتغيير عمرك" + },"HHCNotAuthMsg": { + "en": "This service provides a set of home health care services, continuous and comprehensive follow-up in their places of residence for those who cannot access health facilities, such as (laboratory analyzes - radiology - vaccinations - physical therapy), etc.", + "ar": "من خلال هذه الخدمة يمكنك طلب مجموعة من الفحوصات التي تساعدك وتساعد طبيبك في فهم حالتك الصحية الحالية ومن ثم تحديد المخاطر المحتملة" }, }; diff --git a/lib/core/service/AlHabibMedicalService/home_health_care_service.dart b/lib/core/service/AlHabibMedicalService/home_health_care_service.dart index e636321b..2c8683f5 100644 --- a/lib/core/service/AlHabibMedicalService/home_health_care_service.dart +++ b/lib/core/service/AlHabibMedicalService/home_health_care_service.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/enum/OrderService.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_request_modle.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hHC_all_pres_orders_request_model.dart'; @@ -37,11 +38,11 @@ class HomeHealthCareService extends BaseService { GetHHCAllPresOrdersRequestModel getHHCAllPresOrdersRequestModel = GetHHCAllPresOrdersRequestModel(); hasError = false; - await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS, + await baseAppClient.post(GET_PATIENT_ALL_PRES_ORD, onSuccess: (dynamic response, int statusCode) { hhcAllPresOrdersList.clear(); response['PatientER_GetPatientAllPresOrdersList'].forEach((data) { - if (data['ServiceID'] == 2) + if (data['ServiceID'] == OrderService.HOME_HEALTH_CARE.getIdOrderService()) hhcAllPresOrdersList .add(GetHHCAllPresOrdersResponseModel.fromJson(data)); }); diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart deleted file mode 100644 index fa0799f9..00000000 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart +++ /dev/null @@ -1,69 +0,0 @@ -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.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:hexcolor/hexcolor.dart'; - -import 'home_health_care_page.dart'; - -class HomeHealthCareIndexPage extends StatelessWidget { - @override - Widget build(BuildContext context) { - return AppScaffold( - isShowAppBar: true, - appBarTitle: TranslationBase.of(context).serviceInformation, - body: SingleChildScrollView( - padding: EdgeInsets.all(12), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - TranslationBase.of(context).homeHealthCare, - fontWeight: FontWeight.normal, - fontSize: 25, - color: Color(0xff60686b), - ), - SizedBox( - height: 12, - ), - Texts( - TranslationBase.of(context).homeHealthCareText, - fontWeight: FontWeight.normal, - fontSize: 17, - ), - SizedBox( - height: 22, - ), - Center( - child: Image.asset( - 'assets/images/AlHabibMedicalService/Wifi-AR.png')), - SizedBox( - height: 77, - ), - ], - )), - bottomSheet: Container( - height: MediaQuery.of(context).size.height * 0.10, - width: double.infinity, - child: Column( - children: [ - Container( - width: MediaQuery.of(context).size.width * 0.9, - child: SecondaryButton( - onTap: () => Navigator.push( - context, - FadePage( - page: HomeHealthCarePage(), - ), - ), - label: TranslationBase.of(context).loginRegister, - textColor: Theme.of(context).backgroundColor), - ), - ], - ), - )); - } -} diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart index 8f4821f6..c249362b 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart @@ -42,7 +42,9 @@ class _HomeHealthCarePageState extends State }, builder: (_, model, widget) => AppScaffold( isShowAppBar: true, + description: TranslationBase.of(context).HHCNotAuthMsg, appBarTitle: TranslationBase.of(context).homeHealthCare, + // appBarTitle: TranslationBase.of(context).homeHealthCare, body: Scaffold( extendBodyBehindAppBar: true, appBar: PreferredSize( diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index 2744d3a6..d5bbe7c6 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -2,7 +2,7 @@ import 'package:diplomaticquarterapp/config/size_config.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/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.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'; @@ -444,7 +444,7 @@ class _HomePageState extends State { Navigator.push( context, FadePage( - page: HomeHealthCareIndexPage(), + page: HomeHealthCarePage(), ), ); }, diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 3e0e67e0..46fa82b2 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -689,6 +689,8 @@ class TranslationBase { localizedValues['ServiceInformation'][locale.languageCode]; String get homeHealthCare => localizedValues['HomeHealthCare'][locale.languageCode]; + String get HHCNotAuthMsg => + localizedValues['HHCNotAuthMsg'][locale.languageCode]; String get homeHealthCareText => localizedValues['HomeHealthCareText'][locale.languageCode]; String get loginRegister => From fd80afeb5a2c75d5508443e4fc6d63dffebdf6e6 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Sun, 29 Nov 2020 13:24:15 +0200 Subject: [PATCH 12/20] finish hhc module --- .../NewHomeHealthCare/new_Home_health_care_step_one_page.dart | 1 + .../NewHomeHealthCare/new_Home_health_care_step_three_page.dart | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart index 1dbee1b5..06cb7b69 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart @@ -139,6 +139,7 @@ class _NewHomeHealthCareStepOnePageState extends State Date: Sun, 29 Nov 2020 15:46:33 +0200 Subject: [PATCH 13/20] finish CMC module --- lib/config/config.dart | 1 + .../AlHabibMedicalService/cmc_service.dart | 6 +- .../NewCMC/new_cmc_page.dart | 2 +- .../NewCMC/new_cmc_step_one_page.dart | 24 +++++-- .../NewCMC/new_cmc_step_three_page.dart | 1 + .../cmc_index_page.dart | 68 ------------------- lib/pages/landing/home_page.dart | 4 +- 7 files changed, 27 insertions(+), 79 deletions(-) delete mode 100644 lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_index_page.dart diff --git a/lib/config/config.dart b/lib/config/config.dart index 39f90022..5259f1d7 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -372,6 +372,7 @@ const PUSH_NOTIFICATION_GET_ALL_NOTIFICATIONS = const PUSH_NOTIFICATION_SET_MESSAGES_FROM_POOL_AS_READ = 'Services/MobileNotifications.svc/REST/PushNotification_SetMessagesFromPoolAsRead'; const GET_PATIENT_ALL_PRES_ORD= 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; +const PATIENT_ER_INSERT_PRES_ORDER= 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; const TIMER_MIN = 10; diff --git a/lib/core/service/AlHabibMedicalService/cmc_service.dart b/lib/core/service/AlHabibMedicalService/cmc_service.dart index dffa6683..9e99f3ad 100644 --- a/lib/core/service/AlHabibMedicalService/cmc_service.dart +++ b/lib/core/service/AlHabibMedicalService/cmc_service.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/enum/OrderService.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_response_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart'; @@ -47,8 +48,9 @@ class CMCService extends BaseService { await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS, onSuccess: (dynamic response, int statusCode) { cmcAllPresOrdersList.clear(); + cmcAllOrderDetail.clear(); response['PatientER_GetPatientAllPresOrdersList'].forEach((data) { - if (data['ServiceID'] == 3) + if (data['ServiceID'] == OrderService.Comprehensive_Medical_Checkup.getIdOrderService()) cmcAllPresOrdersList .add(GetHHCAllPresOrdersResponseModel.fromJson(data)); }); @@ -104,7 +106,7 @@ class CMCService extends BaseService { Future insertPresPresOrder({CMCInsertPresOrderRequestModel order}) async { hasError = false; - await baseAppClient.post(PATIENT_ER_UPDATE_PRES_ORDER, + await baseAppClient.post(PATIENT_ER_INSERT_PRES_ORDER, onSuccess: (dynamic response, int statusCode) { isOrderUpdated = true; }, onFailure: (String error, int statusCode) { diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart index 532396cc..cedd4018 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart @@ -134,7 +134,7 @@ class _NewCMCPageState extends State children: [ widget.model.cmcAllOrderDetail.length != 0 ? FractionallySizedBox( - heightFactor: 0.8, + heightFactor: 0.9, widthFactor: 0.9, child: Container( width: double.infinity, diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart index 02d099b4..928444d6 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart @@ -199,18 +199,30 @@ class _NewCMCStepOnePageState extends State { child: SecondaryButton( label: "Next", textColor: Theme.of(context).backgroundColor, + color: Colors.grey[800], onTap: () { - if (widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList.length = null) { + if (widget.cMCInsertPresOrderRequestModel + .patientERCMCInsertServicesList.length != + 0 || + widget.cMCInsertPresOrderRequestModel + .patientERCMCInsertServicesList == + null) { int index = widget.model.cmcAllServicesList.length; PatientERCMCInsertServicesList patientERCMCInsertServicesList = new PatientERCMCInsertServicesList( - price: widget.model.cmcAllServicesList[index-1].price, - serviceID: widget.model.cmcAllServicesList[index-1].serviceID.toString(), - selectedServiceName: widget.model.cmcAllServicesList[index-1].description, - selectedServiceNameAR: widget.model.cmcAllServicesList[index-1].description, + price: widget + .model.cmcAllServicesList[index - 1].price, + serviceID: widget + .model.cmcAllServicesList[index - 1].serviceID + .toString(), + selectedServiceName: widget.model + .cmcAllServicesList[index - 1].description, + selectedServiceNameAR: widget.model + .cmcAllServicesList[index - 1].description, recordID: 1, - totalPrice: widget.model.cmcAllServicesList[index-1].totalPrice, + totalPrice: widget + .model.cmcAllServicesList[index - 1].totalPrice, vAT: widget.model.cmcAllServicesList[index-1].vAT); widget.cMCInsertPresOrderRequestModel diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart index e48bb5d5..893fbfa9 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_three_page.dart @@ -149,6 +149,7 @@ class _NewCMCStepThreePageState width: MediaQuery.of(context).size.width * 0.9, child: SecondaryButton( label: "Confirm", + color: Colors.grey[800], onTap: () async { await widget.model.insertPresPresOrder(order: widget.cmcInsertPresOrderRequestModel); if (widget.model.state != ViewState.ErrorLocal) { diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_index_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_index_page.dart deleted file mode 100644 index e8e9eccc..00000000 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_index_page.dart +++ /dev/null @@ -1,68 +0,0 @@ -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.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:hexcolor/hexcolor.dart'; -import 'cmc_page.dart'; - -class CMCIndexPage extends StatelessWidget { - @override - Widget build(BuildContext context) { - return AppScaffold( - isShowAppBar: true, - appBarTitle: TranslationBase.of(context).serviceInformation, - body: SingleChildScrollView( - padding: EdgeInsets.all(12), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - "CMC", - fontWeight: FontWeight.normal, - fontSize: 25, - color: Color(0xff60686b), - ), - SizedBox( - height: 12, - ), - Texts( - "This service is designed to help you to set drinking water goals and track the volume of water you are drinking on a daily basis. This service allows for schedule reminders and offers a basic statistical analysis of the amount of what you have consumed over the course of a day, week or month.", - fontWeight: FontWeight.normal, - fontSize: 17, - ), - SizedBox( - height: 22, - ), - Center( - child: Image.asset( - 'assets/images/AlHabibMedicalService/Wifi-AR.png')), - SizedBox( - height: 77, - ), - ], - )), - bottomSheet: Container( - height: MediaQuery.of(context).size.height * 0.10, - width: double.infinity, - child: Column( - children: [ - Container( - width: MediaQuery.of(context).size.width * 0.9, - child: SecondaryButton( - onTap: () => Navigator.push( - context, - FadePage( - page: CMCPage(), - ), - ), - label: "CMC", - textColor: Theme.of(context).backgroundColor), - ), - ], - ), - )); - } -} diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index ed538d27..fb2cc108 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -1,7 +1,7 @@ import 'package:diplomaticquarterapp/config/size_config.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/ComprehensiveMedicalCheckup/cmc_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart'; @@ -513,7 +513,7 @@ class _HomePageState extends State { Navigator.push( context, FadePage( - page: CMCIndexPage(), + page: CMCPage(), ), ); }, From 97b8aeeff52a77e2df169b46e6e065e3e6b73f36 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 30 Nov 2020 14:43:27 +0300 Subject: [PATCH 14/20] Version Control finished --- lib/config/localized_values.dart | 4 + lib/core/service/client/base_app_client.dart | 18 ++- lib/pages/appUpdatePage/app_update_page.dart | 109 ++++++++++++++++++ lib/pages/medical/medical_profile_page.dart | 4 +- lib/routes.dart | 5 +- lib/uitl/translations_delegate_base.dart | 1 + .../bottom_navigation_item.dart | 3 +- 7 files changed, 137 insertions(+), 7 deletions(-) create mode 100644 lib/pages/appUpdatePage/app_update_page.dart diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 978d83af..29a4203e 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1128,5 +1128,9 @@ const Map localizedValues = { "en": "Due date", "ar": "تاريخ الاستحقاق" }, + "appUpdate": { + "en": "UPDATE THE APP", + "ar": "تحديث التطبيق" + }, }; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index af8058b9..2201da3e 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -4,9 +4,11 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/appUpdatePage/app_update_page.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; import 'package:provider/provider.dart'; @@ -54,9 +56,9 @@ class BaseAppClient { : languageID == 'ar' ? 1 : 2 - : languageID == 'ar' - ? 1 - : 2; + : languageID == 'en' + ? 2 + : 1; body['IPAdress'] = IP_ADDRESS; body['generalid'] = GENERAL_ID; @@ -122,6 +124,9 @@ class BaseAppClient { if (parsed['Response_Message'] != null) { onSuccess(parsed, statusCode); } else { + if(parsed['ErrorType'] == 4) { + navigateToAppUpdate(AppGlobal.context, parsed['ErrorEndUserMessage']); + } if (isAllowAny) { onSuccess(parsed, statusCode); } else if (parsed['IsAuthenticated'] == null) { @@ -163,6 +168,13 @@ class BaseAppClient { } } + Future navigateToAppUpdate(context, String text) async { + Navigator.pushReplacement( + context, + MaterialPageRoute( + builder: (context) => AppUpdatePage(appUpdateText: text))); + } + get(String endPoint, {Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, diff --git a/lib/pages/appUpdatePage/app_update_page.dart b/lib/pages/appUpdatePage/app_update_page.dart new file mode 100644 index 00000000..7bcf2388 --- /dev/null +++ b/lib/pages/appUpdatePage/app_update_page.dart @@ -0,0 +1,109 @@ +import 'dart:io'; + +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class AppUpdatePage extends StatefulWidget { + String appUpdateText; + + AppUpdatePage({@required this.appUpdateText}); + + @override + _AppUpdatePageState createState() => _AppUpdatePageState(); +} + +class _AppUpdatePageState extends State { + @override + Widget build(BuildContext context) { + return AppScaffold( + appBarTitle: "App Update", + backgroundColor: Colors.white, + isShowAppBar: false, + isShowDecPage: false, + body: SingleChildScrollView( + child: Container( + child: Column( + children: [ + Stack( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + SvgPicture.asset( + "assets/images/new-design/update_rocket_image.svg", + fit: BoxFit.fill), + ]), + Container( + margin: EdgeInsets.only(top: 40.0), + width: MediaQuery.of(context).size.width, + child: Text(TranslationBase.of(context).appUpdate, + textAlign: TextAlign.center, + style: TextStyle( + color: Color(0xff2d6c90).withOpacity(1.0), + fontSize: 22.0, + fontWeight: FontWeight.bold))), + ], + ), + Container( + margin: EdgeInsets.only(top: 5.0, bottom: 5.0), + child: SvgPicture.asset("assets/images/new-design/HMG_logo.svg", + fit: BoxFit.fill), + ), + Container( + margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), + width: MediaQuery.of(context).size.width, + child: Text(widget.appUpdateText, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.grey[600], + fontSize: 16.0, + height: 1.5, + fontWeight: FontWeight.bold))), + Container( + margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 20.0), + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.width, + height: 45.0, + child: RaisedButton( + color: Colors.red[800], + textColor: Colors.white, + disabledTextColor: Colors.white, + disabledColor: new Color(0xFFbcc2c4), + onPressed: () { + openAppUpdateLink(); + }, + child: Text(TranslationBase.of(context).appUpdate, + style: TextStyle(fontSize: 18.0)), + ), + ), + ), + ], + ), + ), + ), + ); + } + + openAppUpdateLink() { + if (Platform.isAndroid) { + _launchURL("https://play.google.com/store/apps/details?id=com.ejada.hmg"); + } + if (Platform.isIOS) { + _launchURL("https://itunes.apple.com/app/id733503978"); + } + } + + _launchURL(String url) async { + if (await canLaunch(url)) { + await launch(url); + } else { + throw 'Could not launch $url'; + } + } +} diff --git a/lib/pages/medical/medical_profile_page.dart b/lib/pages/medical/medical_profile_page.dart index 741f2020..052b196e 100644 --- a/lib/pages/medical/medical_profile_page.dart +++ b/lib/pages/medical/medical_profile_page.dart @@ -134,8 +134,8 @@ class _MedicalProfilePageState extends State { position: BadgePosition.topEnd(), shape: BadgeShape.circle, - badgeColor: Color(0xFF40ACC9) - .withOpacity(1.0), + badgeColor: Colors + .red[800].withOpacity(1.0), borderRadius: BorderRadius.circular(8), badgeContent: Container( diff --git a/lib/routes.dart b/lib/routes.dart index b11025c2..1fdff27b 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -1,6 +1,7 @@ import 'package:diplomaticquarterapp/pages/DrawerPages/family/add-family-member.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/family/add-family_type.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; +import 'package:diplomaticquarterapp/pages/appUpdatePage/app_update_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/login/confirm-login.dart'; @@ -35,6 +36,7 @@ const String SYMPTOM_CHECKER = 'symptom-checker'; const String SYMPTOM_CHECKER_INFO = 'symptom-checker-info'; const String SELECT_GENDER = 'select-gender'; const String SETTINGS = 'settings'; +const String APP_UPDATE = 'app_update'; var routes = { SPLASH: (_) => SplashScreen(), HOME: (_) => LandingPage(), @@ -52,5 +54,6 @@ var routes = { SYMPTOM_CHECKER: (_) => SymptomChecker(), SYMPTOM_CHECKER_INFO: (_) => SymptomInfo(), SELECT_GENDER: (_) => SelectGender(), - SETTINGS: (_) => Settings() + SETTINGS: (_) => Settings(), + APP_UPDATE: (_) => AppUpdatePage() }; diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index b1162f5b..845fa869 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -889,6 +889,7 @@ String get fileno => localizedValues['fileno'][locale.languageCode]; String get visit => localizedValues['visit'][locale.languageCode]; String get descriptionVaccination => localizedValues['description-vaccination'][locale.languageCode]; String get dueDate => localizedValues['due-date'][locale.languageCode]; + String get appUpdate => localizedValues['appUpdate'][locale.languageCode]; } diff --git a/lib/widgets/bottom_navigation/bottom_navigation_item.dart b/lib/widgets/bottom_navigation/bottom_navigation_item.dart index ba35f3c6..31ed59dc 100644 --- a/lib/widgets/bottom_navigation/bottom_navigation_item.dart +++ b/lib/widgets/bottom_navigation/bottom_navigation_item.dart @@ -80,7 +80,8 @@ class BottomNavigationItem extends StatelessWidget { toAnimate: false, position: BadgePosition.topEnd(), shape: BadgeShape.circle, - badgeColor: Color(0xFF40ACC9).withOpacity(1.0), + badgeColor: Colors + .red[800].withOpacity(1.0), borderRadius: BorderRadius.circular(8), badgeContent: Container( padding: EdgeInsets.all(2.0), From 54d8965773f994b9722850f3a58289c3990271ab Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Mon, 30 Nov 2020 14:36:20 +0200 Subject: [PATCH 15/20] done child Vaccination --- lib/config/config.dart | 11 +- lib/config/localized_values.dart | 27 +- .../childvaccines/add_new_child_service.dart | 7 - .../childvaccines/delete_baby_service.dart | 43 +-- .../get_vaccinations_item_services.dart | 27 -- .../user_information_service.dart | 40 ++- .../vaccination_table_service.dart | 15 +- .../add_new_child_view_model.dart | 7 - .../child_vaccines_view_model.dart | 23 +- .../user_information_view_model.dart | 14 +- .../vaccination_table_view_model.dart | 25 +- .../ChildVaccines/ChidDetailsWidget.dart | 170 ++++++------ .../ChildVaccines/add_newchild_page.dart | 253 +++++++----------- lib/pages/ChildVaccines/child_page.dart | 30 ++- .../ChildVaccines/child_vaccines_page.dart | 77 +++--- ...ialog.dart => ConfirmSendEmailDialog.dart} | 43 +-- .../ChildVaccines/dialogs/delete_child.dart | 27 +- .../ChildVaccines/vaccinationtable_page.dart | 75 ++++-- lib/uitl/date_uitl.dart | 2 +- lib/uitl/translations_delegate_base.dart | 9 +- lib/widgets/input/text_field.dart | 6 +- 21 files changed, 436 insertions(+), 495 deletions(-) delete mode 100644 lib/core/service/childvaccines/get_vaccinations_item_services.dart rename lib/pages/ChildVaccines/dialogs/{SelectGenderDialog.dart => ConfirmSendEmailDialog.dart} (70%) diff --git a/lib/config/config.dart b/lib/config/config.dart index 1035e221..6203f62a 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -83,8 +83,11 @@ const GET_BABYINFORMATION_REQUEST = const GET_BABY_BY_USER_ID = 'Services/Community.svc/REST/GetBabyByUserID'; ///userInformation -const GET_USERINFORMATION_REQUEST = - 'Services/Community.svc/REST/GetUserInformation_New'; +const GET_USERINFORMATION_REQUEST = 'Services/Community.svc/REST/GetUserInformation_New'; + +///Update email +const UPDATE_PATENT_EMAIL = 'Services/Patients.svc/REST/UpdatePateintEmail'; +const UPDATE_PATENT_INFO = 'Services/Community.svc/REST/UpdateUserInfo_New'; ///addNewChild const GET_NEWCHILD_REQUEST = 'Services/Community.svc/REST/CreateNewBaby'; @@ -92,8 +95,8 @@ const GET_NEWCHILD_REQUEST = 'Services/Community.svc/REST/CreateNewBaby'; ///newUserId const GET_NEW_USER_REQUEST = 'Services/Community.svc/REST/CreateNewUser_New'; -///delteChild -const DELETE_CHILD_REQUEST = 'Services/Community.svc/REST/DeleteBaby'; +///delete Child +const DELETE_CHILD_REQUEST = '/Services/Community.svc/REST/DeleteBaby'; ///addNewTABLE const GET_TABLE_REQUEST = 'Services/Community.svc/REST/CreateVaccinationTable'; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 978d83af..ceea459e 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1112,10 +1112,14 @@ const Map localizedValues = { "en": "Delete", "ar": "حذف" }, - "deleted-child": { + "deleted-child-mes": { "en": "The request was successful. The children have removed from the vaccination schedule subscription service.", "ar": "تم حذف الطفل بنجاح" }, + "deleted-child":{ + "en":"Delete child", + "ar":"إالغاء الطفل" + }, "visit": { "en": "Visit", "ar": "زيارة" @@ -1128,5 +1132,24 @@ const Map localizedValues = { "en": "Due date", "ar": "تاريخ الاستحقاق" }, - + "valid-email": { + "en": "Please enter valid email", + "ar": "الرجاء إدخال عنوان بريد صحيح" + }, + "confirm-send": { + "en": "Send the child's schedule to the email?", + "ar": "ارسال جدول التطعيمات الى بريدك الالكتروني؟" + }, + "email-success": { + "en": " The request was successful. You will receive the Schedule in moments.", + "ar": "تم ارسال جدول التطعيمات " + }, + "add-instructions": { + "en": "Add the child's information below to recieve the schedule of vaccinations.", + "ar": "أضف معلومات الطفل لاستلام جدول التطعيمات" + }, + "added-child": { + "en": "The request was successful. You have added a child to the vaccination schedule subscription service.", + "ar": "تمت الاضافة بنجاح." + }, }; diff --git a/lib/core/service/childvaccines/add_new_child_service.dart b/lib/core/service/childvaccines/add_new_child_service.dart index 5e4a4d86..98e87100 100644 --- a/lib/core/service/childvaccines/add_new_child_service.dart +++ b/lib/core/service/childvaccines/add_new_child_service.dart @@ -14,19 +14,12 @@ class CreteNewBabyService extends BaseService { Future getCreateNewBabyOrders({CreateNewBaby newChild,int userID}) async { hasError = false; - await getUser(); Map body = Map.from(newChild.toJson()); body['CreatedBy'] = 102; body['EditedBy'] = 102; body['UserID'] = userID; body['AlertBy'] = 2; - body['EmailAddress'] = user.emailAddress; body['IsLogin'] = true; - body['LogInTokenID'] = await sharedPref.getString(TOKEN); - body['MobileNumber'] = user.mobileNumber; - body['NationalID'] = user.nationalityID; - body['ZipCode'] = user.zipCode; - body['isDentalAllowedBackend'] = false; await baseAppClient.post(GET_NEWCHILD_REQUEST, diff --git a/lib/core/service/childvaccines/delete_baby_service.dart b/lib/core/service/childvaccines/delete_baby_service.dart index 115d13c5..49cbd29e 100644 --- a/lib/core/service/childvaccines/delete_baby_service.dart +++ b/lib/core/service/childvaccines/delete_baby_service.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/create_new_user_model.dart'; @@ -17,22 +18,13 @@ class DeleteBabyService extends BaseService{ List deleteBabyModelList= List(); - Future getDeleteBabyOrder({DeleteBaby deleteChild,int babyID}) async { + Future getDeleteBabyOrder({List_BabyInformationModel babyInfo}) async { hasError = false; await getUser(); - Map body = Map.from(deleteChild.toJson()); - // body['CreatedBy'] = 102; + Map body = Map(); body['EditedBy'] = 102; - //body['BabyID'] = babyID; - //body['BabyID'] = createNewBabyModelList ; - // body['AlertBy'] = 2; - // body['EmailAddress'] = user.emailAddress; body['IsLogin'] = true; - body['LogInTokenID'] = await sharedPref.getString(TOKEN); - body['MobileNumber'] = user.mobileNumber; - body['NationalID'] = user.nationalityID; - body['ZipCode'] = user.zipCode; - + body['BabyID'] = babyInfo.babyID; body['isDentalAllowedBackend'] = false; await baseAppClient.post(DELETE_CHILD_REQUEST, @@ -45,31 +37,6 @@ class DeleteBabyService extends BaseService{ }, body: body); } - // Future getCreateNewBabyOrders({CreateNewBaby newChild,int userID}) async { - // hasError = false; - // await getUser(); - // Map body = Map.from(newChild.toJson()); - // body['CreatedBy'] = 102; - // body['EditedBy'] = 102; - // body['UserID'] = userID; - // body['AlertBy'] = 2; - // body['EmailAddress'] = user.emailAddress; - // body['IsLogin'] = true; - // body['LogInTokenID'] = await sharedPref.getString(TOKEN); - // body['MobileNumber'] = user.mobileNumber; - // body['NationalID'] = user.nationalityID; - // body['ZipCode'] = user.zipCode; - // - // body['isDentalAllowedBackend'] = false; - // - // await baseAppClient.post(GET_NEWCHILD_REQUEST, - // onSuccess: (dynamic response, int statusCode) { - // var asd =""; - // }, - // onFailure: (String error, int statusCode) { - // hasError = true; - // super.error = error; - // }, body: body); - // } + } \ No newline at end of file diff --git a/lib/core/service/childvaccines/get_vaccinations_item_services.dart b/lib/core/service/childvaccines/get_vaccinations_item_services.dart deleted file mode 100644 index 5ff936af..00000000 --- a/lib/core/service/childvaccines/get_vaccinations_item_services.dart +++ /dev/null @@ -1,27 +0,0 @@ -import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/core/model/childvaccines/get_vacainations_itemsmodel.dart'; - -import '../base_service.dart'; - -class GetVccinationsItemsService extends BaseService { - List getVaccinationsItemModelList = List(); - Map body = Map(); - - - - Future getaccinationsitemOrders() async { - hasError = false; - await baseAppClient.post(GET_TABLE_REQUEST, - onSuccess: (dynamic response, int statusCode) { - getVaccinationsItemModelList.clear(); - response['List_CreateVaccinationTableModel'].forEach((vital) { - getVaccinationsItemModelList.add( - GET_VACCINATIONS_ITEMSMODEL.fromJson(vital)); - }); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: body); - } - -} \ No newline at end of file diff --git a/lib/core/service/childvaccines/user_information_service.dart b/lib/core/service/childvaccines/user_information_service.dart index 0628920c..55ddc259 100644 --- a/lib/core/service/childvaccines/user_information_service.dart +++ b/lib/core/service/childvaccines/user_information_service.dart @@ -4,11 +4,11 @@ import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_m import '../base_service.dart'; class UserInformationService extends BaseService { - List userInformationModelList = List(); - Map body = Map(); + List_UserInformationModel userInformationModel = List_UserInformationModel(); Future getUserInformationOrders() async { hasError = false; + Map body = Map(); await getUser(); body['CreatedBy'] = 102; body['EditedBy'] = 102; @@ -22,14 +22,44 @@ class UserInformationService extends BaseService { await baseAppClient.post(GET_USERINFORMATION_REQUEST, onSuccess: (dynamic response, int statusCode) { - userInformationModelList.clear(); - response['List_UserInformationModel_New'].forEach((vital) { - userInformationModelList.add(List_UserInformationModel.fromJson(vital)); + userInformationModel = List_UserInformationModel.fromJson(vital); }); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; }, body: body); } + + Future updateEmail(String email) async { + hasError = false; + Map body = Map(); + body['IsInternalRequest'] = true; + body['EmailAddress'] = email; + body['IsLogin'] = true; + body['isDentalAllowedBackend'] = false; + await baseAppClient.post(UPDATE_PATENT_EMAIL, + onSuccess: (dynamic response, int statusCode) { + var asd = ""; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } + + Future updateUserInfo(String email) async { + hasError = false; + Map body = Map(); + body['IsInternalRequest'] = true; + body['EmailAddress'] = email; + body['IsLogin'] = true; + body['isDentalAllowedBackend'] = false; + await baseAppClient.post(UPDATE_PATENT_INFO, + onSuccess: (dynamic response, int statusCode) { + var asd = ""; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } } diff --git a/lib/core/service/childvaccines/vaccination_table_service.dart b/lib/core/service/childvaccines/vaccination_table_service.dart index 7f987b76..da3c8518 100644 --- a/lib/core/service/childvaccines/vaccination_table_service.dart +++ b/lib/core/service/childvaccines/vaccination_table_service.dart @@ -1,7 +1,9 @@ import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/create_vaccination_table.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import '../base_service.dart'; class VaccinationTableService extends BaseService { @@ -10,19 +12,16 @@ class VaccinationTableService extends BaseService { - Future getCreateVaccinationTableOrders() async { + Future getCreateVaccinationTableOrders({List_BabyInformationModel babyInfo, List_UserInformationModel informationModel, bool isSendEmail=false}) async { hasError = false; await getUser(); - body['BabyName']="fffffffffff eeeeeeeeeeeeee"; - body['DOB'] = "/Date(1585774800000+0300)/"; - body['EmailAddress'] = user.emailAddress; + body['BabyName']=babyInfo.babyName; + body['DOB'] = DateUtil.convertDateToString(babyInfo.dOB); + body['EmailAddress'] = informationModel.emailAddress; body['isDentalAllowedBackend'] = false; - body['SendEmail'] = false; + body['SendEmail'] = isSendEmail; body['IsLogin'] =true; - - - await baseAppClient.post(GET_TABLE_REQUEST, onSuccess: (dynamic response, int statusCode) { createVaccinationTableModelList.clear(); diff --git a/lib/core/viewModels/child_vaccines/add_new_child_view_model.dart b/lib/core/viewModels/child_vaccines/add_new_child_view_model.dart index eebaca02..2559c074 100644 --- a/lib/core/viewModels/child_vaccines/add_new_child_view_model.dart +++ b/lib/core/viewModels/child_vaccines/add_new_child_view_model.dart @@ -13,7 +13,6 @@ class AddNewChildViewModel extends BaseViewModel { CreteNewBabyService _creteNewBabyService = locator(); ChildVaccinesService _childVaccinesService = locator(); - // DeleteBabyService _deleteBabyService = locator(); bool isAdded = false; ///create new baby createNewBabyOrders({ CreateNewBaby newChild}) async { @@ -25,13 +24,7 @@ class AddNewChildViewModel extends BaseViewModel { } else { isAdded = true; setState(ViewState.Idle); - await _childVaccinesService.getAllBabyInformationOrders(); - if (_childVaccinesService.hasError) { - error = _childVaccinesService.error; - setState(ViewState.Error); - } else{ - } } } diff --git a/lib/core/viewModels/child_vaccines/child_vaccines_view_model.dart b/lib/core/viewModels/child_vaccines/child_vaccines_view_model.dart index 7c4af285..a713b6ec 100644 --- a/lib/core/viewModels/child_vaccines/child_vaccines_view_model.dart +++ b/lib/core/viewModels/child_vaccines/child_vaccines_view_model.dart @@ -16,14 +16,11 @@ class ChildVaccinesViewModel extends BaseViewModel{ List get babyInformationModelList=> _childVaccinesService.babyInformationModelList; - -//=========== CreteNewBabyService _creteNewBabyService = locator(); DeleteBabyService _deleteBabyService = locator(); bool isAdded = false; bool isDeleted = false; - //============ getNewUserOrders() async { @@ -48,25 +45,15 @@ class ChildVaccinesViewModel extends BaseViewModel{ ///delete baby - deleteBabyOrders({ DeleteBaby newChild}) async { + deleteBabyOrders({ List_BabyInformationModel babyInfo}) async { setState(ViewState.Busy); - //await _creteNewBabyService.getCreateNewBabyOrders(newChild: newChild, userID: _childVaccinesService.userID); - await _deleteBabyService.getDeleteBabyOrder(deleteChild: newChild,babyID: newChild.babyID); - //getDeleteBabyOrder(deleteChild: newChild,); - // getDeleteBabyOrder - if (_creteNewBabyService.hasError) { - error = _creteNewBabyService.error; + await _deleteBabyService.getDeleteBabyOrder(babyInfo: babyInfo); + if (_deleteBabyService.hasError) { + error = _deleteBabyService.error; setState(ViewState.Error); } else { isDeleted = true; - setState(ViewState.Idle); - await _childVaccinesService.getAllBabyInformationOrders(); - if (_childVaccinesService.hasError) { - error = _childVaccinesService.error; - setState(ViewState.Error); - } else{ - - } + getBabyInformatioRequestOrders(); } } diff --git a/lib/core/viewModels/child_vaccines/user_information_view_model.dart b/lib/core/viewModels/child_vaccines/user_information_view_model.dart index 43269f42..e183ee42 100644 --- a/lib/core/viewModels/child_vaccines/user_information_view_model.dart +++ b/lib/core/viewModels/child_vaccines/user_information_view_model.dart @@ -8,8 +8,7 @@ class UserInformationViewModel extends BaseViewModel { UserInformationService _userInformationService = locator(); - List get userInformationModelList => - _userInformationService.userInformationModelList; + List_UserInformationModel get userInformationModelList => _userInformationService.userInformationModel; getUserInformationRequestOrders() async { setState(ViewState.Busy); @@ -20,4 +19,15 @@ class UserInformationViewModel extends BaseViewModel { } else setState(ViewState.Idle); } + + updateEmail(String email)async{ + setState(ViewState.Busy); + await _userInformationService.updateEmail(email); + await _userInformationService.updateUserInfo(email); + if (_userInformationService.hasError) { + error = _userInformationService.error; + setState(ViewState.Error); + } else + await getUserInformationRequestOrders(); + } } diff --git a/lib/core/viewModels/child_vaccines/vaccination_table_view_model.dart b/lib/core/viewModels/child_vaccines/vaccination_table_view_model.dart index 3b72dd50..25559b81 100644 --- a/lib/core/viewModels/child_vaccines/vaccination_table_view_model.dart +++ b/lib/core/viewModels/child_vaccines/vaccination_table_view_model.dart @@ -1,30 +1,27 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; -import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/create_vaccination_table.dart'; -import 'package:diplomaticquarterapp/core/service/childvaccines/add_new_child_service.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; import 'package:diplomaticquarterapp/core/service/childvaccines/vaccination_table_service.dart'; import '../../../locator.dart'; import '../base_view_model.dart'; +class VaccinationTableViewModel extends BaseViewModel { + VaccinationTableService _creteVaccinationTableService = + locator(); -class VaccinationTableViewModel extends BaseViewModel{ + List get creteVaccinationTableModelList => + _creteVaccinationTableService.createVaccinationTableModelList; - VaccinationTableService _creteVaccinationTableService = locator(); - - // String get creteVaccinationTableContent => _creteVaccinationTableService.userAgreementContent; - //String get userAgreementContent => _creteNewBabyService.v//_reportsService.userAgreementContent; - List get creteVaccinationTableModelList=> _creteVaccinationTableService.createVaccinationTableModelList;//.createNewBabyModelList; - getCreateVaccinationTable() async { + getCreateVaccinationTable({List_BabyInformationModel babyInfo, List_UserInformationModel informationModel, bool isSendEmail =false}) async { setState(ViewState.Busy); - await _creteVaccinationTableService.getCreateVaccinationTableOrders();//getCreateNewBabyOrders(); - - if ( _creteVaccinationTableService.hasError) { - error = _creteVaccinationTableService.error; + await _creteVaccinationTableService.getCreateVaccinationTableOrders(babyInfo: babyInfo,informationModel: informationModel,isSendEmail: isSendEmail); + if (_creteVaccinationTableService.hasError) { + error = _creteVaccinationTableService.error; setState(ViewState.Error); } else setState(ViewState.Idle); } - } diff --git a/lib/pages/ChildVaccines/ChidDetailsWidget.dart b/lib/pages/ChildVaccines/ChidDetailsWidget.dart index bce5d54e..c06c5422 100644 --- a/lib/pages/ChildVaccines/ChidDetailsWidget.dart +++ b/lib/pages/ChildVaccines/ChidDetailsWidget.dart @@ -1,5 +1,6 @@ import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/vaccinationtable_page.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; @@ -9,99 +10,110 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_flexible_toast/flutter_flexible_toast.dart'; + +import 'dialogs/delete_child.dart'; class ChildDetailsWidget extends StatelessWidget { final ChildVaccinesViewModel model; final List_BabyInformationModel babyInfo; - DeleteBaby deleteBaby = DeleteBaby(); + final List_UserInformationModel informationModel; + final Function onTapDelete; - ChildDetailsWidget({this.model, this.babyInfo}); + ChildDetailsWidget({this.model, this.babyInfo, this.informationModel, this.onTapDelete}); @override Widget build(BuildContext context) { - return Container( - margin: EdgeInsets.only(left: 5, right: 5, bottom: 10), - decoration: BoxDecoration( - shape: BoxShape.rectangle, - border: Border.all(color: Colors.white, width: 0.5), - borderRadius: BorderRadius.all(Radius.circular(5)), - color: Colors.white, - ), - padding: EdgeInsets.all(12), - width: 200, - //double.infinity, - child: Column( - children: [ - Row(children: [ - Texts(TranslationBase.of(context).childName), - ]), - Row(children: [ - Texts(babyInfo.babyName.trim()), - ]), - Row(children: [ - IconButton( - icon: Image.asset(babyInfo.gender == 1 - ? 'assets/images/new-design/male.png' - : 'assets/images/new-design/female.png'), - tooltip: '', - onPressed: () { - }, + return InkWell( + onTap: (){ + Navigator.push( + context, + FadePage( + page: VaccinationTablePage( + babyInfo: babyInfo, + informationModel: informationModel, ), - Texts(babyInfo.genderDescription), - IconButton( - icon: Icon( - Icons.remove_red_eye, - color: Colors.red, - ), - tooltip: '', - onPressed: () { - Navigator.push( - context, - FadePage( - page: VaccinationTablePage(babyInfo: babyInfo,), - ), - ); - }, - ) - ]), - Row(children: [ - Texts(TranslationBase.of(context).childDob), - ]), - Row( - children: [ + ), + ); + }, + child: Container( + margin: EdgeInsets.only(left: 5, right: 5, bottom: 10), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + border: Border.all(color: Colors.white, width: 0.5), + borderRadius: BorderRadius.all(Radius.circular(5)), + color: Colors.white, + ), + padding: EdgeInsets.all(12), + width: 200, + //double.infinity, + child: Column( + children: [ + Row(children: [ + Texts(TranslationBase.of(context).childName), + ]), + Row(children: [ + Texts(babyInfo.babyName.trim()), + ]), + Row(children: [ IconButton( - icon: new Image.asset( - 'assets/images/new-design/calender-secondary.png'), + icon: Image.asset(babyInfo.gender == 1 + ? 'assets/images/new-design/male.png' + : 'assets/images/new-design/female.png'), tooltip: '', + onPressed: () { + }, ), - Texts( - DateUtil.yearMonthDay(babyInfo.dOB), + Texts(babyInfo.genderDescription), + IconButton( + icon: Icon( + Icons.remove_red_eye, + color: Colors.red, + ), + tooltip: '', + onPressed: () { + Navigator.push( + context, + FadePage( + page: VaccinationTablePage( + babyInfo: babyInfo, + informationModel: informationModel, + ), + ), + ); + }, + ) + ]), + Row(children: [ + Texts(TranslationBase.of(context).childDob), + ]), + Row( + children: [ + IconButton( + icon: new Image.asset( + 'assets/images/new-design/calender-secondary.png'), + tooltip: '', + ), + Texts( + DateUtil.yearMonthDay(babyInfo.dOB), + ), + ], + ), + Row(children: [ + IconButton( + icon: new Image.asset('assets/images/new-design/garbage.png'), + tooltip: '', + onPressed: () async { + onTapDelete(); + }, ), - ], - ), - Row(children: [ - IconButton( - icon: new Image.asset('assets/images/new-design/garbage.png'), - tooltip: '', - onPressed: () async { - await model.deleteBabyOrders(newChild: deleteBaby); - deleteBaby.babyID = babyInfo.babyID; - - await model.deleteBabyOrders(newChild: deleteBaby); - if (model.isDeleted) { - AppToast.showSuccessToast(message: TranslationBase.of(context).deletedChild); - Navigator.pop(context, model.isDeleted); - } else { - //TODO handling error - } - }, + Texts(TranslationBase.of(context).delete), + ]), + SizedBox( + height: 12, ), - Texts(TranslationBase.of(context).delete), - ]), - SizedBox( - height: 12, - ), - ], + ], + ), ), ); } diff --git a/lib/pages/ChildVaccines/add_newchild_page.dart b/lib/pages/ChildVaccines/add_newchild_page.dart index 51b89f98..10dea666 100644 --- a/lib/pages/ChildVaccines/add_newchild_page.dart +++ b/lib/pages/ChildVaccines/add_newchild_page.dart @@ -11,6 +11,7 @@ import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/active_medications/DayCheckBoxDialog.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -21,39 +22,16 @@ import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; enum Gender { Male, Female, NON } -enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON } class AddNewChildPage extends StatefulWidget { - final int frequency; - final int days; - final String itemDescription; String dateAdd; - List _scheduleList = List(); - List daysOfWeek = [ - DayOfWeek.Monday, - DayOfWeek.Tuesday, - DayOfWeek.Wednesday, - DayOfWeek.Thursday, - DayOfWeek.Friday, - DayOfWeek.Saturday, - DayOfWeek.Sunday - ]; - DateTime startDay; DateTime endDay; - //AddNewChildPage({Key key, this.frequency, this.days, this.itemDescription}) : super(key: key); - AddNewChildPage({Key key, this.frequency, this.days, this.itemDescription}) { + AddNewChildPage() { startDay = DateTime.now(); - endDay = - DateTime.now(); //endDay = DateTime.now().add(Duration(days: days)); - int hour = 24; //(24 / frequency).round(); - int durations = 24 ~/ hour; - for (int count = 0; count < durations; count++) { - _scheduleList.add(DateTime(DateTime.now().year, DateTime.now().month, - DateTime.now().day, (hour * count))); - } + endDay = DateTime.now(); } @override @@ -61,150 +39,140 @@ class AddNewChildPage extends StatefulWidget { } class _AddNewChildPageState extends State { - int tappedIndex; int checkedValue; - @override - void initState() { - super.initState(); - tappedIndex = -1; - } - TextEditingController _firstTextController = TextEditingController(); TextEditingController _secondTextController = TextEditingController(); - TextEditingController _notesTextController = TextEditingController(); - BeneficiaryType beneficiaryType = BeneficiaryType.NON; Gender gender = Gender.Male; CreateNewUser_New newUserChild = CreateNewUser_New(); - //ChildVaccinesViewModel addvancedModel = ChildVaccinesViewModel(); - List_BabyInformationModel addvancedModel = List_BabyInformationModel(); CreateNewBaby newChild = CreateNewBaby(); - List_UserInformationModel informationModel = List_UserInformationModel(); + + String firstName = ""; + String secondName = ""; @override Widget build(BuildContext context) { return BaseView( builder: (_, model, w) => AppScaffold( isShowAppBar: true, - appBarTitle: "Vaccintion", + appBarTitle: TranslationBase.of(context).vaccination, body: SingleChildScrollView( physics: ScrollPhysics(), child: Container( margin: EdgeInsets.all(12), child: Column( - // crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, children: [ SizedBox( - height: 50, - ), - Texts( - "Add the child's information below to recieve the schedule of vaccinations.", - //+model.user.firstName, - textAlign: TextAlign.center, + height: 25, ), + Texts(TranslationBase.of(context).addInstructions), SizedBox( - height: 12, + height: 20, ), NewTextFields( - hintText: "First Name", + hintText: TranslationBase.of(context).firstName, controller: _firstTextController, + onChanged: (value) { + setState(() { + firstName = value; + }); + }, ), SizedBox( height: 12, ), NewTextFields( - hintText: "Second Name", + hintText: TranslationBase.of(context).lastName, controller: _secondTextController, + onChanged: (value) { + secondName = value; + }, ), SizedBox( - height: 12, + height: 20, ), Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "Gender:", + TranslationBase.of(context).gender + " :", textAlign: TextAlign.end, ), ], ), + SizedBox( + height: 15, + ), Container( - height: MediaQuery.of(context).size.height * 0.12, + height: 60, width: double.infinity, - padding: EdgeInsets.all(12), - - child: Row( crossAxisAlignment: CrossAxisAlignment.stretch, mainAxisAlignment: MainAxisAlignment.center, children: [ - Container( - height: MediaQuery.of(context).size.height * 0.12, - width: 175, - color: Colors.white, - child: SecondaryButton( - textColor: - checkedValue == 1 ? Colors.white : Colors.black, - color: checkedValue == 1 ? Colors.red : Colors.white, - - label: "Male", - // - onTap: () { - - setState(() { - checkedValue = 1; - print("checkedValue=" + checkedValue.toString()); - }); - - // bloodDetails. - }, + Expanded( + child: AnimatedContainer( + duration: Duration(milliseconds: 400), + height: 60, + color: Colors.white, + child: SecondaryButton( + textColor: + checkedValue == 1 ? Colors.white : Colors.black, + color: + checkedValue == 1 ? Colors.red : Colors.white, + label: TranslationBase.of(context).male, + onTap: () { + setState(() { + checkedValue = 1; + }); + }, + ), ), ), - Container( - height: MediaQuery.of(context).size.height * 0.12, - width: 175, - color: Colors.white, - child: SecondaryButton( - textColor: - checkedValue == 2 ? Colors.white : Colors.black, - color: checkedValue == 2 ? Colors.red : Colors.white, - label: "Female", - // - onTap: () { - setState(() { - checkedValue = 2; - print("checkedValue=" + checkedValue.toString()); - }); - // bloodDetails.city=_selectedHospital.toString(); - - // bloodDetails. - }, + Expanded( + child: AnimatedContainer( + duration: Duration(milliseconds: 400), + height: 60, + color: Colors.white, + child: SecondaryButton( + textColor: + checkedValue == 2 ? Colors.white : Colors.black, + color: + checkedValue == 2 ? Colors.red : Colors.white, + label: TranslationBase.of(context).female, + onTap: () { + setState(() { + checkedValue = 2; + }); + }, + ), ), ) ], ), ), - //========== SizedBox( - height: 6, + height: 20, ), Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "Date Of Birth::", + TranslationBase.of(context).dob + " :", textAlign: TextAlign.end, ), ], ), + SizedBox( + height: 8, + ), InkWell( onTap: () { DatePicker.showDatePicker( context, showTitleActions: true, - // minTime: DateTime( - // DateTime.now().year, DateTime.now().month - 1, 1), minTime: DateTime(1, 1, 1), maxTime: DateTime.now(), onConfirm: (date) { @@ -213,7 +181,6 @@ class _AddNewChildPageState extends State { }); }, currentTime: widget.startDay, - // locale: projectViewModel.localeType ); }, child: Container( @@ -224,99 +191,63 @@ class _AddNewChildPageState extends State { borderRadius: BorderRadius.circular(12), color: Colors.white), child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + // mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Texts(//getStartDay() - // DateUtil.yearMonthDay(DateTime.now()) - getStartDay()), Icon( Icons.calendar_today, color: Colors.black, - ) + ), + SizedBox( + width: 25, + ), + Expanded(child: Texts(getStartDay())), ], ), ), ), SizedBox( - height: 12, + height: 25, ), Container( - height: MediaQuery.of(context).size.height * 0.12, + height: 60, width: double.infinity, - padding: EdgeInsets.all(15), child: SecondaryButton( textColor: Colors.white, - color: checkedValue == false - ? Colors.white24 - : Color.fromRGBO( - 63, - 72, - 74, - 1, - ), - label: "Add", - // - onTap: () async{ - newChild.babyName = _firstTextController.text + " " + _secondTextController.text; + color: Colors.grey[800], + disabled: (checkedValue == null || + firstName.isEmpty || + secondName.isEmpty), + label: TranslationBase.of(context).add, + onTap: () async { + newChild.babyName = _firstTextController.text + + " " + + _secondTextController.text; newChild.gender = checkedValue.toString(); - newChild.strDOB = getStartDay(); + newChild.strDOB = widget.startDay.toIso8601String(); newChild.tempValue = true; newChild.isLogin = true; await model.createNewBabyOrders(newChild: newChild); - if(model.isAdded){ - AppToast.showSuccessToast(message: "Record Added"); - Navigator.pop(context,model.isAdded); - }else{ - - //TODO handling error + if (model.isAdded) { + AppToast.showSuccessToast( + message: TranslationBase.of(context).addedChild); + Navigator.pop(context, model.isAdded); + } else { + AppToast.showSuccessToast(message: model.error); } - }, ), ), - //========= ], ), ), ), - // bottomSheet: + // bottomSheet: ), ); } String getStartDay() { - return "${DateUtil.getMonth(widget.startDay.month)} ${widget.startDay.day}, ${widget.startDay.year}"; - } - - String getEndDay() { - return "${DateUtil.getMonth(widget.endDay.month)} ${widget.endDay.day}, ${widget.endDay.year}"; - } - - String getDateTime(DateTime dateTime) { - return '${dateTime.hour}:${dateTime.minute}'; - } - - String getDays() { - String days = ""; - widget.daysOfWeek.forEach((element) { - days += "${DateUtil.getDay(element)},"; - }); - return days; - } - - void confirmSelectDayDialog() { - showDialog( - context: context, - child: DayCheckBoxDialog( - title: 'Select Day', - selectedDaysOfWeek: widget.daysOfWeek, - onValueSelected: (value) { - setState(() { - widget.daysOfWeek = value; - }); - }, - ), - ); + return "${widget.startDay.day}-${widget.startDay.month}-${widget.startDay.year}"; } } diff --git a/lib/pages/ChildVaccines/child_page.dart b/lib/pages/ChildVaccines/child_page.dart index 7493a492..45020f79 100644 --- a/lib/pages/ChildVaccines/child_page.dart +++ b/lib/pages/ChildVaccines/child_page.dart @@ -1,5 +1,6 @@ import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/add_newchild_page.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/vaccinationtable_page.dart'; @@ -13,15 +14,20 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:flutter_flexible_toast/flutter_flexible_toast.dart'; import 'ChidDetailsWidget.dart'; import 'dialogs/delete_child.dart'; class ChildPage extends StatefulWidget { + final List_UserInformationModel informationModel; + + const ChildPage({Key key, this.informationModel}) : super(key: key); + @override _ChildPageState createState() => _ChildPageState(); } -//TODO + class _ChildPageState extends State with SingleTickerProviderStateMixin { DeleteBaby deleteBaby = DeleteBaby(); @@ -31,7 +37,7 @@ class _ChildPageState extends State var checkedValue = true; return BaseView( onModelReady: (model) => model.getNewUserOrders(), - builder: (_, model, widget) => AppScaffold( + builder: (_, model, w) => AppScaffold( isShowAppBar: true, appBarTitle: TranslationBase.of(context).vaccination, baseViewModel: model, @@ -54,6 +60,23 @@ class _ChildPageState extends State return ChildDetailsWidget( model: model, babyInfo: model.babyInformationModelList[index], + informationModel: widget.informationModel, + onTapDelete: () { + showDialog( + context: context, + child: DeleteChild(onTap: () async { + await model.deleteBabyOrders(babyInfo: model.babyInformationModelList[index]); + if (model.isDeleted) { + AppToast.showSuccessToast( + message: + TranslationBase.of(context).emailSuccess, + toastLength: Toast.LENGTH_LONG); + } else { + AppToast.showSuccessToast(message: model.error); + } + }), + ); + }, ); }, ), @@ -87,7 +110,8 @@ class _ChildPageState extends State builder: (context) => AddNewChildPage(), ), ).then((value) { - if (value) model.getNewUserOrders(); + if (value!=null) + model.getNewUserOrders(); }); }, ), diff --git a/lib/pages/ChildVaccines/child_vaccines_page.dart b/lib/pages/ChildVaccines/child_vaccines_page.dart index 4dd4c7f5..e3503894 100644 --- a/lib/pages/ChildVaccines/child_vaccines_page.dart +++ b/lib/pages/ChildVaccines/child_vaccines_page.dart @@ -23,6 +23,7 @@ class _ChildVaccinesPageState extends State TextEditingController titleController = TextEditingController(); var checkedValue = false; String addEmail = ""; + final updateEmailFormKey = GlobalKey(); @override Widget build(BuildContext context) { @@ -72,30 +73,31 @@ class _ChildVaccinesPageState extends State indent: 10, endIndent: 10, ), - Padding( - padding: const EdgeInsets.all(10.0), - child: Container( - margin: EdgeInsets.only(left: 10, right: 10, top: 15), - child: TextFields( - fillColor: Colors.red, - hintText: model.user.emailAddress, - controller: titleController, - fontSize: 20, - hintColor: Colors.black, - fontWeight: FontWeight.w600, - onChanged: (text) { - addEmail = text; - model.user.emailAddress == addEmail - ? checkedValue = false - : checkedValue = true; - }, - validator: (value) { - if (value == null) { - return model.user.emailAddress; - } else { - return model.user.emailAddress; - } - }, + Form( + key: updateEmailFormKey, + child: Padding( + padding: const EdgeInsets.all(10.0), + child: Container( + margin: EdgeInsets.only(left: 10, right: 10, top: 15), + child: TextFields( + fillColor: Colors.red, + initialValue: model.userInformationModelList.emailAddress, + fontSize: 20, + hintColor: Colors.black, + fontWeight: FontWeight.w600, + onChanged: (text) { + setState(() { + addEmail = text; + }); + }, + validator: (value) { + if (value.isEmpty) + return TranslationBase.of(context).enterEmail; + else if (!RegExp(r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+").hasMatch(value)) + return TranslationBase.of(context).validEmail; + return null; + }, + ), ), ), ), @@ -105,23 +107,17 @@ class _ChildVaccinesPageState extends State padding: EdgeInsets.all(15), child: SecondaryButton( textColor: Colors.white, - color: checkedValue == false - ? Colors.white24 - : Color.fromRGBO( - 63, - 72, - 74, - 1, - ), + color: model.userInformationModelList.emailAddress == addEmail ? Colors.white24 : Color.fromRGBO(63, 72, 74, 1,), + disabled: addEmail.isEmpty, label: TranslationBase.of(context).updateEmail, - // - onTap: () { - model.user.emailAddress = addEmail.toString(); - AppToast.showSuccessToast( - message: TranslationBase.of(context).updatedEmail); - // bloodDetails.city=_selectedHospital.toString(); + onTap: () async{ + final form = updateEmailFormKey.currentState; + if (form.validate()) { + form.save(); + await model.updateEmail(addEmail); + AppToast.showSuccessToast(message: TranslationBase.of(context).updatedEmail); + } - // bloodDetails. }, ), ), @@ -138,11 +134,10 @@ class _ChildVaccinesPageState extends State 1, ), label: TranslationBase.of(context).viewListChildren, - // onTap: () => Navigator.push( context, FadePage( - page: ChildPage(), + page: ChildPage(informationModel: model.userInformationModelList,), ), ), ), diff --git a/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart b/lib/pages/ChildVaccines/dialogs/ConfirmSendEmailDialog.dart similarity index 70% rename from lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart rename to lib/pages/ChildVaccines/dialogs/ConfirmSendEmailDialog.dart index 33c11020..2279dd51 100644 --- a/lib/pages/ChildVaccines/dialogs/SelectGenderDialog.dart +++ b/lib/pages/ChildVaccines/dialogs/ConfirmSendEmailDialog.dart @@ -5,16 +5,18 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -class SelectGenderDialog extends StatefulWidget { - final Email; +class ConfirmSendEmailDialog extends StatefulWidget { + final email; + final Function onTap; + + const ConfirmSendEmailDialog({Key key, this.email, this.onTap}) + : super(key: key); - const SelectGenderDialog({Key key, this.Email}) : super(key: key); @override - _SelectGenderDialogState createState() => _SelectGenderDialogState(); + _ConfirmSendEmailDialogState createState() => _ConfirmSendEmailDialogState(); } -class _SelectGenderDialogState extends State { - +class _ConfirmSendEmailDialogState extends State { @override Widget build(BuildContext context) { return SimpleDialog( @@ -22,22 +24,15 @@ class _SelectGenderDialogState extends State { Container( child: Column( children: [ + Texts(TranslationBase.of(context).confirm), Divider(), Row( children: [ Expanded( flex: 1, - child: InkWell( - onTap: () { - setState(() { - //beneficiaryType = Gender.Male; - }); - }, - child: ListTile( - title: Text("Send the child's schedule to the email\n Tamer.dasdasdas@gmail.com "), - - - ), + child: ListTile( + title: Text(TranslationBase.of(context).confirmSend + + "\n ${widget.email} "), ), ) ], @@ -45,15 +40,7 @@ class _SelectGenderDialogState extends State { SizedBox( height: 5.0, ), - - SizedBox( - height: 5.0, - ), - SizedBox( - height: 5.0, - ), Row( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Expanded( flex: 1, @@ -83,8 +70,7 @@ class _SelectGenderDialogState extends State { flex: 1, child: InkWell( onTap: () { - AppToast.showSuccessToast(message: "Email Sended"); - // widget.onValueSelected(beneficiaryType); + widget.onTap(); Navigator.pop(context); }, child: Padding( @@ -106,7 +92,4 @@ class _SelectGenderDialogState extends State { ], ); } - - - } diff --git a/lib/pages/ChildVaccines/dialogs/delete_child.dart b/lib/pages/ChildVaccines/dialogs/delete_child.dart index 250f40d3..41b02bd5 100644 --- a/lib/pages/ChildVaccines/dialogs/delete_child.dart +++ b/lib/pages/ChildVaccines/dialogs/delete_child.dart @@ -6,6 +6,10 @@ import 'package:flutter/material.dart'; class DeleteChild extends StatefulWidget { + final Function onTap; + + const DeleteChild({Key key, this.onTap}) : super(key: key); + @override _DeleteChildState createState() => _DeleteChildState(); } @@ -18,21 +22,14 @@ class _DeleteChildState extends State { Container( child: Column( children: [ + Texts(TranslationBase.of(context).confirm), Divider(), Row( children: [ Expanded( - flex: 1, - child: InkWell( - onTap: () { - setState(() { - //beneficiaryType = Gender.Male; - }); - }, - child: ListTile( - title: Text("Delete the child "), + child: ListTile( + title: Texts(TranslationBase.of(context).deletedChild), - ), ), ) ], @@ -40,15 +37,7 @@ class _DeleteChildState extends State { SizedBox( height: 5.0, ), - - SizedBox( - height: 5.0, - ), - SizedBox( - height: 5.0, - ), Row( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Expanded( flex: 1, @@ -78,7 +67,7 @@ class _DeleteChildState extends State { flex: 1, child: InkWell( onTap: () { - // widget.onValueSelected(beneficiaryType); + widget.onTap(); Navigator.pop(context); }, child: Padding( diff --git a/lib/pages/ChildVaccines/vaccinationtable_page.dart b/lib/pages/ChildVaccines/vaccinationtable_page.dart index 4654c75a..68734c9a 100644 --- a/lib/pages/ChildVaccines/vaccinationtable_page.dart +++ b/lib/pages/ChildVaccines/vaccinationtable_page.dart @@ -1,7 +1,9 @@ import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart'; +import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/vaccination_table_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.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/buttons/secondary_button.dart'; @@ -9,19 +11,23 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_flexible_toast/flutter_flexible_toast.dart'; import 'package:flutter_html/flutter_html.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; -import 'dialogs/SelectGenderDialog.dart'; +import 'dialogs/ConfirmSendEmailDialog.dart'; class VaccinationTablePage extends StatelessWidget { final List_BabyInformationModel babyInfo; + final List_UserInformationModel informationModel; + + const VaccinationTablePage({Key key, this.babyInfo, this.informationModel}) + : super(key: key); - const VaccinationTablePage({Key key, this.babyInfo}) : super(key: key); @override Widget build(BuildContext context) { var checkedValue; return BaseView( - onModelReady: (model) => model.getCreateVaccinationTable(), + onModelReady: (model) => model.getCreateVaccinationTable(babyInfo: babyInfo, informationModel: informationModel), builder: (_, model, w) => AppScaffold( isShowAppBar: true, baseViewModel: model, @@ -37,22 +43,30 @@ class VaccinationTablePage extends StatelessWidget { Expanded( child: Column( children: [ - Texts(TranslationBase.of(context).childName), - Texts(babyInfo.babyName??'',fontWeight: FontWeight.w600,), + Texts(TranslationBase.of(context).childName), + Texts( + babyInfo.babyName ?? '', + fontWeight: FontWeight.w600, + ), ], ), ), Expanded( - child: Column(children: [ - + child: Column( + children: [ Texts(TranslationBase.of(context).childDob), Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ - Icon(FontAwesomeIcons.calendarCheck,color: Colors.red,), - SizedBox(width: 15,), - Texts(DateUtil.yearMonthDay(babyInfo.dOB)??''), + Icon( + FontAwesomeIcons.calendarCheck, + color: Colors.red, + ), + SizedBox( + width: 15, + ), + Texts(DateUtil.yearMonthDay(babyInfo.dOB) ?? ''), ], ), ], @@ -60,7 +74,9 @@ class VaccinationTablePage extends StatelessWidget { ), ], ), - SizedBox(height: 15,), + SizedBox( + height: 15, + ), Divider(), Column( children: [ @@ -75,25 +91,19 @@ class VaccinationTablePage extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ - Texts(TranslationBase.of(context).descriptionVaccination), + Texts(TranslationBase.of(context) + .descriptionVaccination), ], ), ), Texts(TranslationBase.of(context).dueDate), ], ), - ], ), ...List.generate( model.creteVaccinationTableModelList.length, (index) => Container( - // decoration: BoxDecoration( - // shape: BoxShape.rectangle, - // border: Border.all(color: Colors.white, width: 0.5), - // borderRadius: BorderRadius.all(Radius.circular(5)), - // // color: Colors.white, - // ), padding: EdgeInsets.all(12), width: double.infinity, child: Column( @@ -111,16 +121,21 @@ class VaccinationTablePage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Html( - data: model.creteVaccinationTableModelList[index].vaccinesDescription, + data: model + .creteVaccinationTableModelList[index] + .vaccinesDescription, ), ], ), ), - Texts(model.creteVaccinationTableModelList[index].givenAt), + Texts(model + .creteVaccinationTableModelList[index].givenAt), ], ), Divider( - color: Colors.white,height: 3,thickness: 1.0, + color: Colors.white, + height: 3, + thickness: 1.0, ), ], ), @@ -140,12 +155,24 @@ class VaccinationTablePage extends StatelessWidget { textColor: Colors.white, color: checkedValue == false ? Colors.white24 - : Color.fromRGBO(63, 72, 74, 1,), + : Color.fromRGBO( + 63, + 72, + 74, + 1, + ), label: TranslationBase.of(context).sendEmail, onTap: () { showDialog( context: context, - child: SelectGenderDialog(), + child: ConfirmSendEmailDialog( + email: informationModel.emailAddress, + onTap: () async { + await model.getCreateVaccinationTable(babyInfo: babyInfo, informationModel: informationModel,isSendEmail: true); + AppToast.showSuccessToast(message: TranslationBase.of(context).emailSuccess,toastLength: Toast.LENGTH_LONG); + + }, + ), ); }, ), diff --git a/lib/uitl/date_uitl.dart b/lib/uitl/date_uitl.dart index 1068dc74..34c7bf87 100644 --- a/lib/uitl/date_uitl.dart +++ b/lib/uitl/date_uitl.dart @@ -21,7 +21,7 @@ class DateUtil { static String convertDateToString(DateTime date) { const start = "/Date("; - const end = "+0300)"; + const end = "+0300)/"; int milliseconds = date.millisecondsSinceEpoch; return start + "$milliseconds" + end; diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index b1162f5b..ae6ae844 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -1,7 +1,6 @@ import 'dart:async'; import 'package:diplomaticquarterapp/config/localized_values.dart'; -import 'package:diplomaticquarterapp/pages/symptom-checker/select-gender.dart'; import 'package:flutter/foundation.dart' show SynchronousFuture; import 'package:flutter/material.dart'; @@ -885,10 +884,16 @@ String get fileno => localizedValues['fileno'][locale.languageCode]; String get childName => localizedValues['child-name'][locale.languageCode]; String get childDob => localizedValues['childDob'][locale.languageCode]; String get delete => localizedValues['delete'][locale.languageCode]; - String get deletedChild => localizedValues['deleted-child'][locale.languageCode]; + String get deletedChildMes => localizedValues['deleted-child-mes'][locale.languageCode]; String get visit => localizedValues['visit'][locale.languageCode]; String get descriptionVaccination => localizedValues['description-vaccination'][locale.languageCode]; String get dueDate => localizedValues['due-date'][locale.languageCode]; + String get validEmail => localizedValues['valid-email'][locale.languageCode]; + String get confirmSend => localizedValues['confirm-send'][locale.languageCode]; + String get emailSuccess => localizedValues['email-success'][locale.languageCode]; + String get deletedChild => localizedValues['deleted-child'][locale.languageCode]; + String get addInstructions => localizedValues['add-instructions'][locale.languageCode]; + String get addedChild => localizedValues['added-child'][locale.languageCode]; } diff --git a/lib/widgets/input/text_field.dart b/lib/widgets/input/text_field.dart index 6e740fc8..e31ae88a 100644 --- a/lib/widgets/input/text_field.dart +++ b/lib/widgets/input/text_field.dart @@ -47,7 +47,7 @@ class TextFields extends StatefulWidget { this.autoFocus, this.onChanged, - // this.initialValue, + this.initialValue, this.minLines, this.maxLines, this.inputFormatters, @@ -79,7 +79,7 @@ class TextFields extends StatefulWidget { final String hintText; - // final String initialValue; + final String initialValue; final String type; final bool autoFocus; final IconData suffixIcon; @@ -230,7 +230,7 @@ class _TextFieldsState extends State { minLines: widget.minLines ?? 1, maxLines: widget.maxLines ?? 1, maxLengthEnforced: widget.maxLengthEnforced, - // initialValue: widget.initialValue, + initialValue: widget.initialValue, onChanged: widget.onChanged, focusNode: _focusNode, maxLength: widget.maxLength ?? null, From ed56476d816a01c3bb7aab7c326ed8e988c75f42 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Mon, 30 Nov 2020 19:17:19 +0200 Subject: [PATCH 16/20] second step from location fixes --- .../home_health_care_service.dart | 165 ++++++++++++++- lib/core/service/client/base_app_client.dart | 18 +- .../home_health_care_view_model.dart | 28 +++ .../Dialog/select_location_dialog.dart | 140 +++++++++++++ .../NewHomeHealthCare/location_page.dart | 108 ++++++++++ .../new_Home_health_care_step_one_page.dart | 6 +- .../new_Home_health_care_step_tow_page.dart | 193 +++++++++++++----- 7 files changed, 598 insertions(+), 60 deletions(-) create mode 100644 lib/pages/AlHabibMedicalService/HomeHealthCare/Dialog/select_location_dialog.dart create mode 100644 lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart diff --git a/lib/core/service/AlHabibMedicalService/home_health_care_service.dart b/lib/core/service/AlHabibMedicalService/home_health_care_service.dart index 2c8683f5..9933b83d 100644 --- a/lib/core/service/AlHabibMedicalService/home_health_care_service.dart +++ b/lib/core/service/AlHabibMedicalService/home_health_care_service.dart @@ -16,9 +16,10 @@ class HomeHealthCareService extends BaseService { List hhcAllPresOrdersList = List(); List hhcAllOrderDetail = List(); + List addressesList = List(); bool isOrderUpdated; - + CustomerInfo customerInfo; Future getHHCAllServices( HHCGetAllServicesRequestModel hHCGetAllServicesRequestModel) async { hasError = false; @@ -91,4 +92,166 @@ class HomeHealthCareService extends BaseService { super.error = error; }, body: order.toJson()); } + + Future getCustomerAddresses() async { + Map queryParams = { + 'fields':'addresses' + }; + hasError = false; + await baseAppClient.get("https://mdlaboratories.com/exacartapi/api/Customers/${customerInfo.customerId}", + onSuccess: (dynamic response, int statusCode) { + addressesList.clear(); + response["customers"][0]["addresses"].forEach((data) { + addressesList + .add(AddressInfo.fromJson(data)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams, isExternal: true); + } + + + Future getCustomerInfo() async { + Map queryParams = { + 'FileNumber':'${user.patientID}' + }; + + hasError = false; + await baseAppClient.get("https://mdlaboratories.com/exacartapi/api/VerifyCustomer", + onSuccess: (dynamic response, int statusCode) { + customerInfo= CustomerInfo.fromJson(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams, isExternal: true); + } +} + + +class CustomerInfo { + bool isRegistered; + String userName; + Null password; + String email; + Null errorMessage; + String mobileNumber; + int customerId; + + CustomerInfo( + {this.isRegistered, + this.userName, + this.password, + this.email, + this.errorMessage, + this.mobileNumber, + this.customerId}); + + CustomerInfo.fromJson(Map json) { + isRegistered = json['IsRegistered']; + userName = json['UserName']; + password = json['Password']; + email = json['Email']; + errorMessage = json['ErrorMessage']; + mobileNumber = json['MobileNumber']; + customerId = json['CustomerId']; + } + + Map toJson() { + final Map data = new Map(); + data['IsRegistered'] = this.isRegistered; + data['UserName'] = this.userName; + data['Password'] = this.password; + data['Email'] = this.email; + data['ErrorMessage'] = this.errorMessage; + data['MobileNumber'] = this.mobileNumber; + data['CustomerId'] = this.customerId; + return data; + } +} + + +class AddressInfo { + String id; + String firstName; + String lastName; + String email; + Null company; + int countryId; + String country; + Null stateProvinceId; + String city; + String address1; + String address2; + String zipPostalCode; + String phoneNumber; + Null faxNumber; + String customerAttributes; + String createdOnUtc; + Null province; + String latLong; + + AddressInfo( + {this.id, + this.firstName, + this.lastName, + this.email, + this.company, + this.countryId, + this.country, + this.stateProvinceId, + this.city, + this.address1, + this.address2, + this.zipPostalCode, + this.phoneNumber, + this.faxNumber, + this.customerAttributes, + this.createdOnUtc, + this.province, + this.latLong}); + + AddressInfo.fromJson(Map json) { + id = json['id']; + firstName = json['first_name']; + lastName = json['last_name']; + email = json['email']; + company = json['company']; + countryId = json['country_id']; + country = json['country']; + stateProvinceId = json['state_province_id']; + city = json['city']; + address1 = json['address1']; + address2 = json['address2']; + zipPostalCode = json['zip_postal_code']; + phoneNumber = json['phone_number']; + faxNumber = json['fax_number']; + customerAttributes = json['customer_attributes']; + createdOnUtc = json['created_on_utc']; + province = json['province']; + latLong = json['lat_long']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['first_name'] = this.firstName; + data['last_name'] = this.lastName; + data['email'] = this.email; + data['company'] = this.company; + data['country_id'] = this.countryId; + data['country'] = this.country; + data['state_province_id'] = this.stateProvinceId; + data['city'] = this.city; + data['address1'] = this.address1; + data['address2'] = this.address2; + data['zip_postal_code'] = this.zipPostalCode; + data['phone_number'] = this.phoneNumber; + data['fax_number'] = this.faxNumber; + data['customer_attributes'] = this.customerAttributes; + data['created_on_utc'] = this.createdOnUtc; + data['province'] = this.province; + data['lat_long'] = this.latLong; + return data; + } } diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index af8058b9..5baef20e 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -166,8 +166,14 @@ class BaseAppClient { get(String endPoint, {Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, - Map queryParams}) async { - String url = BASE_URL + endPoint; + Map queryParams, + bool isExternal = false}) async { + String url; + if (isExternal) { + url = endPoint; + } else { + url = BASE_URL + endPoint; + } if (queryParams != null) { String queryString = Uri(queryParameters: queryParams).query; url += '?' + queryString; @@ -176,9 +182,11 @@ class BaseAppClient { print("URL : $url"); if (await Utils.checkConnection()) { - final response = await http.get(url.trim(), headers: { - 'Content-Type': 'application/json', - 'Accept': 'application/json' + final response = await http.get( + url.trim(), + headers: { + 'Content-Type': 'application/json', + 'Accept': 'application/json' },); final int statusCode = response.statusCode; print("statusCode :$statusCode"); diff --git a/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart index 031d0a0c..adde9224 100644 --- a/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart +++ b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart @@ -20,6 +20,10 @@ class HomeHealthCareViewModel extends BaseViewModel { List get hhcAllServicesList => _homeHealthCareService.hhcAllServicesList; + + List get addressesList => + _homeHealthCareService.addressesList; + List get hhcAllPresOrders => _homeHealthCareService.hhcAllPresOrdersList; @@ -93,5 +97,29 @@ class HomeHealthCareViewModel extends BaseViewModel { } + Future getCustomerAddresses() async { + setState(ViewState.Busy); + await _homeHealthCareService.getCustomerAddresses( + ); + if (_homeHealthCareService.hasError) { + error = _homeHealthCareService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + Future getCustomerInfo() async { + setState(ViewState.Busy); + await _homeHealthCareService.getCustomerInfo( + ); + if (_homeHealthCareService.hasError) { + error = _homeHealthCareService.error; + setState(ViewState.ErrorLocal); + } else { + await getCustomerAddresses(); + } + } + } \ No newline at end of file diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/Dialog/select_location_dialog.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/Dialog/select_location_dialog.dart new file mode 100644 index 00000000..7adc52d5 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/Dialog/select_location_dialog.dart @@ -0,0 +1,140 @@ +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_cities_response_model.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/home_health_care_service.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +// ignore: must_be_immutable +class SelectLocationDialog extends StatefulWidget { + final List addresses; + final Function(AddressInfo) onValueSelected; + AddressInfo selectedAddress; + + SelectLocationDialog( + {Key key, this.addresses, this.onValueSelected, this.selectedAddress}); + + @override + _SelectLocationDialogState createState() => _SelectLocationDialogState(); +} + +class _SelectLocationDialogState extends State { + @override + void initState() { + super.initState(); + widget.selectedAddress = widget.selectedAddress ?? widget.addresses[0]; + } + + @override + Widget build(BuildContext context) { + return SimpleDialog( + title: Texts("sdsdsd"), + children: [ + Column( + children: [ + Container( + height: 150, + child: SingleChildScrollView( + child: Column( + children: [ + Divider(), + ...List.generate( + widget.addresses.length, + (index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 2, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + widget.selectedAddress = widget.addresses[index]; + }); + }, + child: ListTile( + title: Text(widget.addresses[index].address1), + leading: Radio( + value: widget.addresses[index], + groupValue: widget.selectedAddress, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + widget.selectedAddress = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + ], + ), + ), + SizedBox( + height: 5.0, + ), + ], + ), + ), + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.onValueSelected(widget.selectedAddress); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + )), + ), + ), + ), + ], + ) + ], + ) + ], + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart new file mode 100644 index 00000000..5f93571a --- /dev/null +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart @@ -0,0 +1,108 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:google_maps_place_picker/google_maps_place_picker.dart'; +import 'package:provider/provider.dart'; + +class LocationPage extends StatefulWidget { + final Function(PickResult) onPick; + final double latitude; + final double longitude; + + const LocationPage( + {Key key, + this.onPick, + this.latitude, + this.longitude, + }) + : super(key: key); + + @override + _LocationPageState createState() => + _LocationPageState(); +} + +class _LocationPageState + extends State { + double latitude = 0; + double longitude = 0; + + @override + void initState() { + + latitude = widget.latitude; + longitude = widget.longitude; + super.initState(); + } + + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return AppScaffold( + isShowDecPage: false, + isShowAppBar: true, + body: PlacePicker( + apiKey: GOOGLE_API_KEY, + enableMyLocationButton: true, + automaticallyImplyAppBarLeading: false, + autocompleteOnTrailingWhitespace: true, + selectInitialPosition: true, + autocompleteLanguage: projectViewModel.currentLanguage, + enableMapTypeButton: true, + searchForInitialValue: false, + onPlacePicked: (PickResult result) { + print(result.adrAddress); + + }, + selectedPlaceWidgetBuilder: + (_, selectedPlace, state, isSearchBarFocused) { + print("state: $state, isSearchBarFocused: $isSearchBarFocused"); + return isSearchBarFocused + ? Container() + : FloatingCard( + bottomPosition: 0.0, + leftPosition: 0.0, + rightPosition: 0.0, + width: 500, + borderRadius: BorderRadius.circular(12.0), + child: state == SearchingState.Searching + ? Center(child: CircularProgressIndicator()) + : Container( + margin: EdgeInsets.all(12), + child: Column( + children: [ + SecondaryButton( + color: Colors.grey[800], + textColor: Colors.white, + onTap: () { + print(selectedPlace); + // setState(() { + // widget.patientERInsertPresOrderRequestModel + // .latitude = + // selectedPlace.geometry.location.lat; + // widget.patientERInsertPresOrderRequestModel + // .longitude = + // selectedPlace.geometry.location.lng; + // }); + }, + label: " Add New Address ", + ), + ], + ), + ), + ); + }, + initialPosition: LatLng(latitude, longitude), + useCurrentLocation: false, + ), + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart index 06cb7b69..c41892d3 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart @@ -138,9 +138,11 @@ class _NewHomeHealthCareStepOnePageState extends State { double latitude = 0; double longitude = 0; + AddressInfo _selectedAddress; @override void initState() { + print(widget.model.addressesList); if (widget.patientERInsertPresOrderRequestModel.latitude == null) { - latitude = widget.latitude; - longitude = widget.longitude; + setLatitudeAndLongitude(); } else { latitude = widget.patientERInsertPresOrderRequestModel.latitude; longitude = widget.patientERInsertPresOrderRequestModel.longitude; } + super.initState(); } + setLatitudeAndLongitude({bool isSetState = false, String latLong}) { + if (latLong == null) + latLong = widget.model.addressesList[widget.model.addressesList + .length - 1].latLong; + List latLongArr = latLong.split(','); + + latitude = double.parse(latLongArr[0]); + longitude = double.parse(latLongArr[1]); + } + @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); return AppScaffold( isShowDecPage: false, - body: PlacePicker( - apiKey: GOOGLE_API_KEY, - enableMyLocationButton: true, - automaticallyImplyAppBarLeading: false, - autocompleteOnTrailingWhitespace: true, - selectInitialPosition: true, - autocompleteLanguage: projectViewModel.currentLanguage, - enableMapTypeButton: true, - onPlacePicked: (PickResult result) { - print(result.adrAddress); - widget.changePageViewIndex(3); - }, - selectedPlaceWidgetBuilder: - (_, selectedPlace, state, isSearchBarFocused) { - print("state: $state, isSearchBarFocused: $isSearchBarFocused"); - return isSearchBarFocused - ? Container() - : FloatingCard( - bottomPosition: 0.0, - leftPosition: 0.0, - rightPosition: 0.0, - width: 500, - borderRadius: BorderRadius.circular(12.0), - child: state == SearchingState.Searching - ? Center(child: CircularProgressIndicator()) - : Container( - margin: EdgeInsets.all(12), - child: SecondaryButton( - color: Colors.grey[800], - textColor: Colors.white, - onTap: () { - setState(() { - widget.patientERInsertPresOrderRequestModel - .latitude = - selectedPlace.geometry.location.lat; - widget.patientERInsertPresOrderRequestModel - .longitude = - selectedPlace.geometry.location.lng; - }); - widget.changePageViewIndex(3); - }, - label: TranslationBase.of(context).next, - ), - ), - ); + body: Stack( + children: [ + PlacePicker( + apiKey: GOOGLE_API_KEY, + enableMyLocationButton: true, + automaticallyImplyAppBarLeading: false, + autocompleteOnTrailingWhitespace: true, + selectInitialPosition: true, + autocompleteLanguage: projectViewModel.currentLanguage, + enableMapTypeButton: true, + searchForInitialValue: false, + + onPlacePicked: (PickResult result) { + print(result.adrAddress); + widget.changePageViewIndex(3); + }, + selectedPlaceWidgetBuilder: + (_, selectedPlace, state, isSearchBarFocused) { + print("state: $state, isSearchBarFocused: $isSearchBarFocused"); + return isSearchBarFocused + ? Container() + : FloatingCard( + bottomPosition: 0.0, + leftPosition: 0.0, + rightPosition: 0.0, + width: 500, + borderRadius: BorderRadius.circular(12.0), + child: state == SearchingState.Searching + ? Center(child: CircularProgressIndicator()) + : Container( + margin: EdgeInsets.all(12), + child: Column( + children: [ + SecondaryButton( + color: Colors.grey[800], + textColor: Colors.white, + onTap: () { + Navigator.pushReplacement( + context, MaterialPageRoute( + builder: (BuildContext context) => + LocationPage(latitude: latitude, + longitude: longitude,))); + }, + label: " Add New Address ", + ), + SizedBox(height: 10,), + SecondaryButton( + color: Colors.red[800], + textColor: Colors.white, + onTap: () { + setState(() { + widget.patientERInsertPresOrderRequestModel + .latitude = + selectedPlace.geometry.location.lat; + widget.patientERInsertPresOrderRequestModel + .longitude = + selectedPlace.geometry.location.lng; + }); + widget.changePageViewIndex(3); + }, + label: " Continue ", + ), + ], + ), + ), + ); + }, + initialPosition: LatLng(latitude, longitude), + useCurrentLocation: false, + ), + Container( + child: InkWell( + onTap: () => + confirmSelectLocationDialog(widget.model.addressesList), + child: Container( + padding: EdgeInsets.all(10), + width: double.infinity, + // height: 65, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white), + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Expanded(child: Texts(getAddressName(), fontSize: 14,),), + Icon(Icons.arrow_drop_down) + ], + ), + ), + ), + height: 56, width: double.infinity, color: Theme + .of(context) + .scaffoldBackgroundColor, + + ) + ], + ), + ); + } + + + void confirmSelectLocationDialog(List addresses) { + showDialog( + context: context, + child: SelectLocationDialog( + addresses: addresses, + selectedAddress: _selectedAddress + , + onValueSelected: (value) { + setLatitudeAndLongitude(latLong: value.latLong); + setState(() { + _selectedAddress = value; + }); }, - initialPosition: LatLng(latitude, longitude), - useCurrentLocation: true, ), ); } + + String getAddressName() { + if (_selectedAddress != null) + return _selectedAddress.address1; + else + return "Select Address" /*TranslationBase.of(context).selectHospital*/; + } } From 68e4b92717791abbc15cde0ce9691b1a054fe6ad Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 1 Dec 2020 14:36:05 +0200 Subject: [PATCH 17/20] Address Added Successfully --- .../home_health_care_service.dart | 17 +++ lib/core/service/client/base_app_client.dart | 137 +++++++++--------- .../add_new_address_Request_Model.dart | 136 +++++++++++++++++ .../home_health_care_view_model.dart | 29 ++++ .../NewHomeHealthCare/location_page.dart | 111 +++++++++----- .../new_Home_health_care_step_tow_page.dart | 18 ++- 6 files changed, 339 insertions(+), 109 deletions(-) create mode 100644 lib/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart diff --git a/lib/core/service/AlHabibMedicalService/home_health_care_service.dart b/lib/core/service/AlHabibMedicalService/home_health_care_service.dart index 9933b83d..c444eff9 100644 --- a/lib/core/service/AlHabibMedicalService/home_health_care_service.dart +++ b/lib/core/service/AlHabibMedicalService/home_health_care_service.dart @@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart'; import '../base_service.dart'; @@ -93,6 +94,22 @@ class HomeHealthCareService extends BaseService { }, body: order.toJson()); } + Future addAddressInfo({ AddNewAddressRequestModel + addNewAddressRequestModel }) async { + hasError = false; + await baseAppClient.post("https://mdlaboratories.com/exacartapi/api/addcustomeraddress", + onSuccess: (dynamic response, int statusCode) { + addressesList.clear(); + response["customers"][0]["addresses"].forEach((data) { + addressesList + .add(AddressInfo.fromJson(data)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: addNewAddressRequestModel.toJson(), isExternal: true, isAllowAny: true); + } + Future getCustomerAddresses() async { Map queryParams = { 'fields':'addresses' diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 5baef20e..814eb249 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -31,74 +31,81 @@ class BaseAppClient { {Map body, Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, - bool isAllowAny = false}) async { - String url = BASE_URL + endPoint; + bool isAllowAny = false, bool isExternal = false}) async { + String url; + if(isExternal) { + url = endPoint; + }else{ + url = BASE_URL + endPoint; + } try { //Map profile = await sharedPref.getObj(DOCTOR_PROFILE); - String token = await sharedPref.getString(TOKEN); - var languageID = - await sharedPref.getString(APP_LANGUAGE); - var user = await sharedPref.getObject(USER_PROFILE); - if (body.containsKey('SetupID')) { - body['SetupID'] = body.containsKey('SetupID') - ? body['SetupID'] != null - ? body['SetupID'] - : SETUP_ID - : SETUP_ID; - } - body['VersionID'] = VERSION_ID; - body['Channel'] = CHANNEL; - body['LanguageID'] = body.containsKey('LanguageID') - ? body['LanguageID'] != null - ? body['LanguageID'] - : languageID == 'ar' - ? 1 - : 2 - : languageID == 'ar' - ? 1 - : 2; - - body['IPAdress'] = IP_ADDRESS; - body['generalid'] = GENERAL_ID; - body['PatientOutSA'] = body.containsKey('PatientOutSA') - ? body['PatientOutSA'] != null - ? body['PatientOutSA'] - : PATIENT_OUT_SA - : PATIENT_OUT_SA; - - if (body.containsKey('isDentalAllowedBackend')) { - body['isDentalAllowedBackend'] = - body.containsKey('isDentalAllowedBackend') - ? body['isDentalAllowedBackend'] != null - ? body['isDentalAllowedBackend'] - : IS_DENTAL_ALLOWED_BACKEND - : IS_DENTAL_ALLOWED_BACKEND; - } + if (!isExternal) { + String token = await sharedPref.getString(TOKEN); + var languageID = + await sharedPref.getString(APP_LANGUAGE); + var user = await sharedPref.getObject(USER_PROFILE); + if (body.containsKey('SetupID')) { + body['SetupID'] = body.containsKey('SetupID') + ? body['SetupID'] != null + ? body['SetupID'] + : SETUP_ID + : SETUP_ID; + } + body['VersionID'] = VERSION_ID; + body['Channel'] = CHANNEL; + body['LanguageID'] = body.containsKey('LanguageID') + ? body['LanguageID'] != null + ? body['LanguageID'] + : languageID == 'ar' + ? 1 + : 2 + : languageID == 'ar' + ? 1 + : 2; + + body['IPAdress'] = IP_ADDRESS; + body['generalid'] = GENERAL_ID; + body['PatientOutSA'] = body.containsKey('PatientOutSA') + ? body['PatientOutSA'] != null + ? body['PatientOutSA'] + : PATIENT_OUT_SA + : PATIENT_OUT_SA; + + if (body.containsKey('isDentalAllowedBackend')) { + body['isDentalAllowedBackend'] = + body.containsKey('isDentalAllowedBackend') + ? body['isDentalAllowedBackend'] != null + ? body['isDentalAllowedBackend'] + : IS_DENTAL_ALLOWED_BACKEND + : IS_DENTAL_ALLOWED_BACKEND; + } - body['DeviceTypeID'] = DeviceTypeID; - - if (!body.containsKey('IsPublicRequest')) { - body['PatientType'] = body.containsKey('PatientType') - ? body['PatientType'] != null - ? body['PatientType'] - : user['PatientType'] != null - ? user['PatientType'] - : PATIENT_TYPE - : PATIENT_TYPE; - - body['PatientTypeID'] = body.containsKey('PatientTypeID') - ? body['PatientTypeID'] != null - ? body['PatientTypeID'] - :user['PatientType'] != null - ? user['PatientType'] - : PATIENT_TYPE_ID - : PATIENT_TYPE_ID; - if (user != null) { - body['TokenID'] = token; - body['PatientID'] = - body['PatientID'] != null ? body['PatientID'] : user['PatientID']; - body['PatientOutSA'] = user['OutSA']; - body['SessionID'] = SESSION_ID; //getSessionId(token); + body['DeviceTypeID'] = DeviceTypeID; + + if (!body.containsKey('IsPublicRequest')) { + body['PatientType'] = body.containsKey('PatientType') + ? body['PatientType'] != null + ? body['PatientType'] + : user['PatientType'] != null + ? user['PatientType'] + : PATIENT_TYPE + : PATIENT_TYPE; + + body['PatientTypeID'] = body.containsKey('PatientTypeID') + ? body['PatientTypeID'] != null + ? body['PatientTypeID'] + :user['PatientType'] != null + ? user['PatientType'] + : PATIENT_TYPE_ID + : PATIENT_TYPE_ID; + if (user != null) { + body['TokenID'] = token; + body['PatientID'] = + body['PatientID'] != null ? body['PatientID'] : user['PatientID']; + body['PatientOutSA'] = user['OutSA']; + body['SessionID'] = SESSION_ID; //getSessionId(token); + } } } diff --git a/lib/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart b/lib/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart new file mode 100644 index 00000000..5bde5a5f --- /dev/null +++ b/lib/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart @@ -0,0 +1,136 @@ +class AddNewAddressRequestModel { + Customer customer; + + AddNewAddressRequestModel({this.customer}); + + AddNewAddressRequestModel.fromJson(Map json) { + customer = json['customer'] != null + ? new Customer.fromJson(json['customer']) + : null; + } + + Map toJson() { + final Map data = new Map(); + if (this.customer != null) { + data['customer'] = this.customer.toJson(); + } + return data; + } +} + +class Customer { + List addresses; + int id; + String email; + List roleIds; + + Customer({this.addresses, this.id, this.email, this.roleIds}); + + Customer.fromJson(Map json) { + if (json['addresses'] != null) { + addresses = new List(); + json['addresses'].forEach((v) { + addresses.add(new Addresses.fromJson(v)); + }); + } + id = json['id']; + email = json['email']; + roleIds = json['role_ids'].cast(); + } + + Map toJson() { + final Map data = new Map(); + if (this.addresses != null) { + data['addresses'] = this.addresses.map((v) => v.toJson()).toList(); + } + data['id'] = this.id; + data['email'] = this.email; + data['role_ids'] = this.roleIds; + return data; + } +} + +class Addresses { + int id; + String firstName; + String lastName; + String email; + Null company; + int countryId; + String country; + Null stateProvinceId; + String city; + String address1; + String address2; + String zipPostalCode; + String phoneNumber; + Null faxNumber; + String customerAttributes; + String createdOnUtc; + Null province; + String latLong; + + Addresses( + {this.id, + this.firstName, + this.lastName, + this.email, + this.company, + this.countryId, + this.country, + this.stateProvinceId, + this.city, + this.address1, + this.address2, + this.zipPostalCode, + this.phoneNumber, + this.faxNumber, + this.customerAttributes, + this.createdOnUtc, + this.province, + this.latLong}); + + Addresses.fromJson(Map json) { + id = json['id']; + firstName = json['first_name']; + lastName = json['last_name']; + email = json['email']; + company = json['company']; + countryId = json['country_id']; + country = json['country']; + stateProvinceId = json['state_province_id']; + city = json['city']; + address1 = json['address1']; + address2 = json['address2']; + zipPostalCode = json['zip_postal_code']; + phoneNumber = json['phone_number']; + faxNumber = json['fax_number']; + customerAttributes = json['customer_attributes']; + createdOnUtc = json['created_on_utc']; + province = json['province']; + latLong = json['lat_long']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['first_name'] = this.firstName; + data['last_name'] = this.lastName; + data['email'] = this.email; + data['company'] = this.company; + data['country_id'] = this.countryId; + data['country'] = this.country; + data['state_province_id'] = this.stateProvinceId; + data['city'] = this.city; + data['address1'] = this.address1; + data['address2'] = this.address2; + data['zip_postal_code'] = this.zipPostalCode; + data['phone_number'] = this.phoneNumber; + data['fax_number'] = this.faxNumber; + data['customer_attributes'] = this.customerAttributes; + data['created_on_utc'] = this.createdOnUtc; + data['province'] = this.province; + data['lat_long'] = this.latLong; + return data; + } +} diff --git a/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart index adde9224..7859cdcf 100644 --- a/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart +++ b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart @@ -10,8 +10,10 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/home_health_care_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:intl/intl.dart'; import '../../../locator.dart'; +import 'add_new_address_Request_Model.dart'; class HomeHealthCareViewModel extends BaseViewModel { HomeHealthCareService _homeHealthCareService = @@ -121,5 +123,32 @@ class HomeHealthCareViewModel extends BaseViewModel { } } + Future addAddressInfo( + {AddNewAddressRequestModel addNewAddressRequestModel}) async { + addNewAddressRequestModel.customer.email = _homeHealthCareService.customerInfo.email; + addNewAddressRequestModel.customer.id = _homeHealthCareService.customerInfo.customerId; + addNewAddressRequestModel.customer.roleIds = [3]; + addNewAddressRequestModel.customer.addresses[0].email = _homeHealthCareService.customerInfo.email; + addNewAddressRequestModel.customer.addresses[0].phoneNumber = _homeHealthCareService.customerInfo.mobileNumber; + addNewAddressRequestModel.customer.addresses[0].firstName = user.firstName; + addNewAddressRequestModel.customer.addresses[0].lastName = user.lastName; + addNewAddressRequestModel.customer.addresses[0].countryId = 69; + + var f = DateFormat('E, d MMM yyyy HH:mm:ss'); + var date = f.format(DateTime.now().toUtc()) + " GMT"; + addNewAddressRequestModel.customer.addresses[0].createdOnUtc = date; + + setState(ViewState.Busy); + await _homeHealthCareService.addAddressInfo( + addNewAddressRequestModel: addNewAddressRequestModel + ); + if (_homeHealthCareService.hasError) { + error = _homeHealthCareService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + } \ No newline at end of file diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart index 5f93571a..14824532 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart @@ -1,8 +1,11 @@ import 'package:diplomaticquarterapp/config/config.dart'; -import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; @@ -16,12 +19,7 @@ class LocationPage extends StatefulWidget { final double latitude; final double longitude; - const LocationPage( - {Key key, - this.onPick, - this.latitude, - this.longitude, - }) + const LocationPage({Key key, this.onPick, this.latitude, this.longitude}) : super(key: key); @override @@ -46,20 +44,23 @@ class _LocationPageState @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); - return AppScaffold( - isShowDecPage: false, - isShowAppBar: true, - body: PlacePicker( - apiKey: GOOGLE_API_KEY, - enableMyLocationButton: true, - automaticallyImplyAppBarLeading: false, - autocompleteOnTrailingWhitespace: true, - selectInitialPosition: true, - autocompleteLanguage: projectViewModel.currentLanguage, - enableMapTypeButton: true, - searchForInitialValue: false, - onPlacePicked: (PickResult result) { - print(result.adrAddress); + return BaseView( + onModelReady: (model) {}, + builder: (_, model, widget) => AppScaffold( + isShowDecPage: false, + isShowAppBar: true, + baseViewModel: model, + body: PlacePicker( + apiKey: GOOGLE_API_KEY, + enableMyLocationButton: true, + automaticallyImplyAppBarLeading: false, + autocompleteOnTrailingWhitespace: true, + selectInitialPosition: true, + autocompleteLanguage: projectViewModel.currentLanguage, + enableMapTypeButton: true, + searchForInitialValue: false, + onPlacePicked: (PickResult result) { + print(result.adrAddress); }, selectedPlaceWidgetBuilder: @@ -82,27 +83,63 @@ class _LocationPageState SecondaryButton( color: Colors.grey[800], textColor: Colors.white, - onTap: () { + onTap: () async { print(selectedPlace); - // setState(() { - // widget.patientERInsertPresOrderRequestModel - // .latitude = - // selectedPlace.geometry.location.lat; - // widget.patientERInsertPresOrderRequestModel - // .longitude = - // selectedPlace.geometry.location.lng; - // }); + AddNewAddressRequestModel + addNewAddressRequestModel = + new AddNewAddressRequestModel( + customer: Customer(addresses: [ + Addresses( + address1: + selectedPlace.formattedAddress, + address2: selectedPlace + .formattedAddress, + customerAttributes: "", + city: "", + createdOnUtc: "", + id: 0, + latLong: "$latitude,$longitude", + email: "") + ]), + ); + + selectedPlace.addressComponents.forEach((e) { + if (e.types.contains("country")) { + addNewAddressRequestModel.customer + .addresses[0].country = e.longName; + } + if (e.types.contains("postal_code")) { + addNewAddressRequestModel.customer + .addresses[0].zipPostalCode = + e.longName; + } + if (e.types.contains("locality")) { + addNewAddressRequestModel.customer + .addresses[0].city = + e.longName; + } + }); + + await model.addAddressInfo( + addNewAddressRequestModel: addNewAddressRequestModel); + if (model.state == ViewState.ErrorLocal) { + Utils.showErrorToast(model.error); + } else { + AppToast.showSuccessToast( + message: "Address Added Successfully"); + } + Navigator.of(context).pop(); }, label: " Add New Address ", ), ], ), - ), - ); + ), + ); }, - initialPosition: LatLng(latitude, longitude), - useCurrentLocation: false, - ), - ); + initialPosition: LatLng(latitude, longitude), + useCurrentLocation: false, + ), + )); } } diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart index 83f42f20..759fb697 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart @@ -47,7 +47,6 @@ class _NewHomeHealthCareStepTowPageState @override void initState() { - print(widget.model.addressesList); if (widget.patientERInsertPresOrderRequestModel.latitude == null) { setLatitudeAndLongitude(); } else { @@ -110,12 +109,17 @@ class _NewHomeHealthCareStepTowPageState color: Colors.grey[800], textColor: Colors.white, onTap: () { - Navigator.pushReplacement( - context, MaterialPageRoute( - builder: (BuildContext context) => - LocationPage(latitude: latitude, - longitude: longitude,))); - }, + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => + LocationPage( + latitude: latitude, + longitude: longitude, + ), + ), + ); + }, label: " Add New Address ", ), SizedBox(height: 10,), From 05deaa632237576b11e013f0f8607c8aa839d650 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 1 Dec 2020 18:35:45 +0200 Subject: [PATCH 18/20] Address Added Successfully --- lib/config/config.dart | 6 + .../customer_addresses_service.dart | 211 ++++++++++++++++++ .../home_health_care_service.dart | 177 +-------------- .../AlHabibMedicalService/cmc_view_model.dart | 48 +++- .../home_health_care_view_model.dart | 36 ++- lib/locator.dart | 5 +- .../NewCMC/cmc_location_page.dart | 147 ++++++++++++ .../NewCMC/new_cmc_step_one_page.dart | 12 +- .../NewCMC/new_cmc_step_tow_page.dart | 202 ++++++++++++----- .../ComprehensiveMedicalCheckup/cmc_page.dart | 1 + .../NewHomeHealthCare/location_page.dart | 4 +- .../new_Home_health_care_step_one_page.dart | 8 +- .../new_Home_health_care_step_tow_page.dart | 4 +- .../dialogs}/select_location_dialog.dart | 3 +- 14 files changed, 598 insertions(+), 266 deletions(-) create mode 100644 lib/core/service/AlHabibMedicalService/customer_addresses_service.dart create mode 100644 lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart rename lib/{pages/AlHabibMedicalService/HomeHealthCare/Dialog => widgets/dialogs}/select_location_dialog.dart (96%) diff --git a/lib/config/config.dart b/lib/config/config.dart index 5259f1d7..859e25be 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -375,6 +375,12 @@ const GET_PATIENT_ALL_PRES_ORD= 'Services/Patients.svc/REST/PatientER_GetPatient const PATIENT_ER_INSERT_PRES_ORDER= 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; +// External API +const ADD_ADDRESS_INFO= "https://mdlaboratories.com/exacartapi/api/addcustomeraddress"; +const GET_CUSTOMER_ADDRESSES= "https://mdlaboratories.com/exacartapi/api/Customers/"; +const GET_CUSTOMER_INFO = "https://mdlaboratories.com/exacartapi/api/VerifyCustomer"; + + const TIMER_MIN = 10; const GOOGLE_API_KEY = "AIzaSyCmevVlr2Bh-c8W1VUzo8gt8JRY7n5PANw"; diff --git a/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart b/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart new file mode 100644 index 00000000..cb457735 --- /dev/null +++ b/lib/core/service/AlHabibMedicalService/customer_addresses_service.dart @@ -0,0 +1,211 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/enum/OrderService.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_request_modle.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hHC_all_pres_orders_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart'; +import 'package:intl/intl.dart'; + +import '../base_service.dart'; + +class CustomerAddressesService extends BaseService { + + List addressesList = List(); + CustomerInfo customerInfo; + + Future addAddressInfo({ AddNewAddressRequestModel + addNewAddressRequestModel }) async { + + addNewAddressRequestModel.customer.email = customerInfo.email; + addNewAddressRequestModel.customer.id = customerInfo.customerId; + addNewAddressRequestModel.customer.roleIds = [3]; + addNewAddressRequestModel.customer.addresses[0].email = customerInfo.email; + addNewAddressRequestModel.customer.addresses[0].phoneNumber = customerInfo.mobileNumber; + addNewAddressRequestModel.customer.addresses[0].firstName = user.firstName; + addNewAddressRequestModel.customer.addresses[0].lastName = user.lastName; + addNewAddressRequestModel.customer.addresses[0].countryId = 69; + + var f = DateFormat('E, d MMM yyyy HH:mm:ss'); + var date = f.format(DateTime.now().toUtc()) + " GMT"; + addNewAddressRequestModel.customer.addresses[0].createdOnUtc = date; + hasError = false; + await baseAppClient.post(ADD_ADDRESS_INFO, + onSuccess: (dynamic response, int statusCode) { + addressesList.clear(); + response["customers"][0]["addresses"].forEach((data) { + addressesList + .add(AddressInfo.fromJson(data)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: addNewAddressRequestModel.toJson(), isExternal: true, isAllowAny: true); + } + + Future getCustomerAddresses() async { + Map queryParams = { + 'fields':'addresses' + }; + hasError = false; + await baseAppClient.get("$GET_CUSTOMER_ADDRESSES${customerInfo.customerId}", + onSuccess: (dynamic response, int statusCode) { + addressesList.clear(); + response["customers"][0]["addresses"].forEach((data) { + addressesList + .add(AddressInfo.fromJson(data)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams, isExternal: true); + } + + + Future getCustomerInfo() async { + Map queryParams = { + 'FileNumber':'${user.patientID}' + }; + + hasError = false; + await baseAppClient.get(GET_CUSTOMER_INFO, + onSuccess: (dynamic response, int statusCode) { + customerInfo= CustomerInfo.fromJson(response); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, queryParams: queryParams, isExternal: true); + } +} + + +class CustomerInfo { + bool isRegistered; + String userName; + Null password; + String email; + Null errorMessage; + String mobileNumber; + int customerId; + + CustomerInfo( + {this.isRegistered, + this.userName, + this.password, + this.email, + this.errorMessage, + this.mobileNumber, + this.customerId}); + + CustomerInfo.fromJson(Map json) { + isRegistered = json['IsRegistered']; + userName = json['UserName']; + password = json['Password']; + email = json['Email']; + errorMessage = json['ErrorMessage']; + mobileNumber = json['MobileNumber']; + customerId = json['CustomerId']; + } + + Map toJson() { + final Map data = new Map(); + data['IsRegistered'] = this.isRegistered; + data['UserName'] = this.userName; + data['Password'] = this.password; + data['Email'] = this.email; + data['ErrorMessage'] = this.errorMessage; + data['MobileNumber'] = this.mobileNumber; + data['CustomerId'] = this.customerId; + return data; + } +} + + +class AddressInfo { + String id; + String firstName; + String lastName; + String email; + Null company; + int countryId; + String country; + Null stateProvinceId; + String city; + String address1; + String address2; + String zipPostalCode; + String phoneNumber; + Null faxNumber; + String customerAttributes; + String createdOnUtc; + Null province; + String latLong; + + AddressInfo( + {this.id, + this.firstName, + this.lastName, + this.email, + this.company, + this.countryId, + this.country, + this.stateProvinceId, + this.city, + this.address1, + this.address2, + this.zipPostalCode, + this.phoneNumber, + this.faxNumber, + this.customerAttributes, + this.createdOnUtc, + this.province, + this.latLong}); + + AddressInfo.fromJson(Map json) { + id = json['id']; + firstName = json['first_name']; + lastName = json['last_name']; + email = json['email']; + company = json['company']; + countryId = json['country_id']; + country = json['country']; + stateProvinceId = json['state_province_id']; + city = json['city']; + address1 = json['address1']; + address2 = json['address2']; + zipPostalCode = json['zip_postal_code']; + phoneNumber = json['phone_number']; + faxNumber = json['fax_number']; + customerAttributes = json['customer_attributes']; + createdOnUtc = json['created_on_utc']; + province = json['province']; + latLong = json['lat_long']; + } + + Map toJson() { + final Map data = new Map(); + data['id'] = this.id; + data['first_name'] = this.firstName; + data['last_name'] = this.lastName; + data['email'] = this.email; + data['company'] = this.company; + data['country_id'] = this.countryId; + data['country'] = this.country; + data['state_province_id'] = this.stateProvinceId; + data['city'] = this.city; + data['address1'] = this.address1; + data['address2'] = this.address2; + data['zip_postal_code'] = this.zipPostalCode; + data['phone_number'] = this.phoneNumber; + data['fax_number'] = this.faxNumber; + data['customer_attributes'] = this.customerAttributes; + data['created_on_utc'] = this.createdOnUtc; + data['province'] = this.province; + data['lat_long'] = this.latLong; + return data; + } +} diff --git a/lib/core/service/AlHabibMedicalService/home_health_care_service.dart b/lib/core/service/AlHabibMedicalService/home_health_care_service.dart index c444eff9..2ec1e310 100644 --- a/lib/core/service/AlHabibMedicalService/home_health_care_service.dart +++ b/lib/core/service/AlHabibMedicalService/home_health_care_service.dart @@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart'; import '../base_service.dart'; @@ -93,182 +94,6 @@ class HomeHealthCareService extends BaseService { super.error = error; }, body: order.toJson()); } - - Future addAddressInfo({ AddNewAddressRequestModel - addNewAddressRequestModel }) async { - hasError = false; - await baseAppClient.post("https://mdlaboratories.com/exacartapi/api/addcustomeraddress", - onSuccess: (dynamic response, int statusCode) { - addressesList.clear(); - response["customers"][0]["addresses"].forEach((data) { - addressesList - .add(AddressInfo.fromJson(data)); - }); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, body: addNewAddressRequestModel.toJson(), isExternal: true, isAllowAny: true); - } - - Future getCustomerAddresses() async { - Map queryParams = { - 'fields':'addresses' - }; - hasError = false; - await baseAppClient.get("https://mdlaboratories.com/exacartapi/api/Customers/${customerInfo.customerId}", - onSuccess: (dynamic response, int statusCode) { - addressesList.clear(); - response["customers"][0]["addresses"].forEach((data) { - addressesList - .add(AddressInfo.fromJson(data)); - }); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, queryParams: queryParams, isExternal: true); - } - - - Future getCustomerInfo() async { - Map queryParams = { - 'FileNumber':'${user.patientID}' - }; - - hasError = false; - await baseAppClient.get("https://mdlaboratories.com/exacartapi/api/VerifyCustomer", - onSuccess: (dynamic response, int statusCode) { - customerInfo= CustomerInfo.fromJson(response); - }, onFailure: (String error, int statusCode) { - hasError = true; - super.error = error; - }, queryParams: queryParams, isExternal: true); - } } -class CustomerInfo { - bool isRegistered; - String userName; - Null password; - String email; - Null errorMessage; - String mobileNumber; - int customerId; - - CustomerInfo( - {this.isRegistered, - this.userName, - this.password, - this.email, - this.errorMessage, - this.mobileNumber, - this.customerId}); - - CustomerInfo.fromJson(Map json) { - isRegistered = json['IsRegistered']; - userName = json['UserName']; - password = json['Password']; - email = json['Email']; - errorMessage = json['ErrorMessage']; - mobileNumber = json['MobileNumber']; - customerId = json['CustomerId']; - } - - Map toJson() { - final Map data = new Map(); - data['IsRegistered'] = this.isRegistered; - data['UserName'] = this.userName; - data['Password'] = this.password; - data['Email'] = this.email; - data['ErrorMessage'] = this.errorMessage; - data['MobileNumber'] = this.mobileNumber; - data['CustomerId'] = this.customerId; - return data; - } -} - - -class AddressInfo { - String id; - String firstName; - String lastName; - String email; - Null company; - int countryId; - String country; - Null stateProvinceId; - String city; - String address1; - String address2; - String zipPostalCode; - String phoneNumber; - Null faxNumber; - String customerAttributes; - String createdOnUtc; - Null province; - String latLong; - - AddressInfo( - {this.id, - this.firstName, - this.lastName, - this.email, - this.company, - this.countryId, - this.country, - this.stateProvinceId, - this.city, - this.address1, - this.address2, - this.zipPostalCode, - this.phoneNumber, - this.faxNumber, - this.customerAttributes, - this.createdOnUtc, - this.province, - this.latLong}); - - AddressInfo.fromJson(Map json) { - id = json['id']; - firstName = json['first_name']; - lastName = json['last_name']; - email = json['email']; - company = json['company']; - countryId = json['country_id']; - country = json['country']; - stateProvinceId = json['state_province_id']; - city = json['city']; - address1 = json['address1']; - address2 = json['address2']; - zipPostalCode = json['zip_postal_code']; - phoneNumber = json['phone_number']; - faxNumber = json['fax_number']; - customerAttributes = json['customer_attributes']; - createdOnUtc = json['created_on_utc']; - province = json['province']; - latLong = json['lat_long']; - } - - Map toJson() { - final Map data = new Map(); - data['id'] = this.id; - data['first_name'] = this.firstName; - data['last_name'] = this.lastName; - data['email'] = this.email; - data['company'] = this.company; - data['country_id'] = this.countryId; - data['country'] = this.country; - data['state_province_id'] = this.stateProvinceId; - data['city'] = this.city; - data['address1'] = this.address1; - data['address2'] = this.address2; - data['zip_postal_code'] = this.zipPostalCode; - data['phone_number'] = this.phoneNumber; - data['fax_number'] = this.faxNumber; - data['customer_attributes'] = this.customerAttributes; - data['created_on_utc'] = this.createdOnUtc; - data['province'] = this.province; - data['lat_long'] = this.latLong; - return data; - } -} diff --git a/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart index bf3404a9..0774e5a7 100644 --- a/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart +++ b/lib/core/viewModels/AlHabibMedicalService/cmc_view_model.dart @@ -9,14 +9,19 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/cmc_service.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import '../../../locator.dart'; +import 'add_new_address_Request_Model.dart'; class CMCViewModel extends BaseViewModel { CMCService _cMCService = locator(); - + CustomerAddressesService _customerAddressesService = + locator(); + List get addressesList => + _customerAddressesService.addressesList; List get cmcAllServicesList => _cMCService.cmcAllServicesList; @@ -94,7 +99,6 @@ class CMCViewModel extends BaseViewModel { await _cMCService .getOrderDetailByOrderID(getOrderDetailByOrderIDRequestModel); } - //TODO check it in uat Future insertPresPresOrder({CMCInsertPresOrderRequestModel order}) async { setState(ViewState.Busy); order.createdBy = user.patientID; @@ -107,4 +111,44 @@ class CMCViewModel extends BaseViewModel { getCmcAllPresOrders(); } } + + Future getCustomerAddresses() async { + setState(ViewState.Busy); + await _customerAddressesService.getCustomerAddresses( + ); + if (_customerAddressesService.hasError) { + error = _customerAddressesService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + + Future getCustomerInfo() async { + setState(ViewState.Busy); + await _customerAddressesService.getCustomerInfo( + ); + if (_customerAddressesService.hasError) { + error = _customerAddressesService.error; + setState(ViewState.ErrorLocal); + } else { + await getCustomerAddresses(); + } + } + + Future addAddressInfo( + {AddNewAddressRequestModel addNewAddressRequestModel}) async { + + + setState(ViewState.Busy); + await _customerAddressesService.addAddressInfo( + addNewAddressRequestModel: addNewAddressRequestModel + ); + if (_customerAddressesService.hasError) { + error = _customerAddressesService.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } } \ No newline at end of file diff --git a/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart index 7859cdcf..20a19b23 100644 --- a/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart +++ b/lib/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart @@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/home_health_care_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:intl/intl.dart'; @@ -19,12 +20,15 @@ class HomeHealthCareViewModel extends BaseViewModel { HomeHealthCareService _homeHealthCareService = locator(); + CustomerAddressesService _customerAddressesService = + locator(); + List get hhcAllServicesList => _homeHealthCareService.hhcAllServicesList; List get addressesList => - _homeHealthCareService.addressesList; + _customerAddressesService.addressesList; List get hhcAllPresOrders => _homeHealthCareService.hhcAllPresOrdersList; @@ -101,10 +105,10 @@ class HomeHealthCareViewModel extends BaseViewModel { Future getCustomerAddresses() async { setState(ViewState.Busy); - await _homeHealthCareService.getCustomerAddresses( + await _customerAddressesService.getCustomerAddresses( ); - if (_homeHealthCareService.hasError) { - error = _homeHealthCareService.error; + if (_customerAddressesService.hasError) { + error = _customerAddressesService.error; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); @@ -113,10 +117,10 @@ class HomeHealthCareViewModel extends BaseViewModel { Future getCustomerInfo() async { setState(ViewState.Busy); - await _homeHealthCareService.getCustomerInfo( + await _customerAddressesService.getCustomerInfo( ); - if (_homeHealthCareService.hasError) { - error = _homeHealthCareService.error; + if (_customerAddressesService.hasError) { + error = _customerAddressesService.error; setState(ViewState.ErrorLocal); } else { await getCustomerAddresses(); @@ -125,25 +129,13 @@ class HomeHealthCareViewModel extends BaseViewModel { Future addAddressInfo( {AddNewAddressRequestModel addNewAddressRequestModel}) async { - addNewAddressRequestModel.customer.email = _homeHealthCareService.customerInfo.email; - addNewAddressRequestModel.customer.id = _homeHealthCareService.customerInfo.customerId; - addNewAddressRequestModel.customer.roleIds = [3]; - addNewAddressRequestModel.customer.addresses[0].email = _homeHealthCareService.customerInfo.email; - addNewAddressRequestModel.customer.addresses[0].phoneNumber = _homeHealthCareService.customerInfo.mobileNumber; - addNewAddressRequestModel.customer.addresses[0].firstName = user.firstName; - addNewAddressRequestModel.customer.addresses[0].lastName = user.lastName; - addNewAddressRequestModel.customer.addresses[0].countryId = 69; - - var f = DateFormat('E, d MMM yyyy HH:mm:ss'); - var date = f.format(DateTime.now().toUtc()) + " GMT"; - addNewAddressRequestModel.customer.addresses[0].createdOnUtc = date; setState(ViewState.Busy); - await _homeHealthCareService.addAddressInfo( + await _customerAddressesService.addAddressInfo( addNewAddressRequestModel: addNewAddressRequestModel ); - if (_homeHealthCareService.hasError) { - error = _homeHealthCareService.error; + if (_customerAddressesService.hasError) { + error = _customerAddressesService.error; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); diff --git a/lib/locator.dart b/lib/locator.dart index 6b7bb076..d02d647f 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/uitl/navigation_service.dart'; import 'package:get_it/get_it.dart'; import 'core/service/AlHabibMedicalService/cmc_service.dart'; +import 'core/service/AlHabibMedicalService/customer_addresses_service.dart'; import 'core/service/AlHabibMedicalService/e_referral_service.dart'; import 'core/service/AlHabibMedicalService/home_health_care_service.dart'; import 'core/service/AuthenticatedUserObject.dart'; @@ -135,13 +136,11 @@ void setupLocator() { locator.registerLazySingleton(() => UserInformationService()); locator.registerLazySingleton(() => CreteNewBabyService()); locator.registerLazySingleton(() => DeleteBabyService()); - locator.registerLazySingleton(() => VaccinationTableService()); locator.registerLazySingleton(() => NotificationService()); - - locator.registerLazySingleton(() => PharmacyModuleService()); locator.registerLazySingleton(() => OrderPreviewService()); + locator.registerLazySingleton(() => CustomerAddressesService()); /// View Model diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart new file mode 100644 index 00000000..ee32bcb6 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/cmc_location_page.dart @@ -0,0 +1,147 @@ +import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:google_maps_place_picker/google_maps_place_picker.dart'; +import 'package:provider/provider.dart'; + +class CMCLocationPage extends StatefulWidget { + final Function(PickResult) onPick; + final double latitude; + final double longitude; + final dynamic model; + + const CMCLocationPage({Key key, this.onPick, this.latitude, this.longitude, this.model}) + : super(key: key); + + @override + _CMCLocationPageState createState() => + _CMCLocationPageState(); +} + +class _CMCLocationPageState + extends State { + double latitude = 0; + double longitude = 0; + + @override + void initState() { + + latitude = widget.latitude; + longitude = widget.longitude; + super.initState(); + } + + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return BaseView( + onModelReady: (model) {}, + builder: (_, model, widget) => AppScaffold( + isShowDecPage: false, + isShowAppBar: true, + baseViewModel: model, + body: PlacePicker( + apiKey: GOOGLE_API_KEY, + enableMyLocationButton: true, + automaticallyImplyAppBarLeading: false, + autocompleteOnTrailingWhitespace: true, + selectInitialPosition: true, + autocompleteLanguage: projectViewModel.currentLanguage, + enableMapTypeButton: true, + searchForInitialValue: false, + onPlacePicked: (PickResult result) { + print(result.adrAddress); + + }, + selectedPlaceWidgetBuilder: + (_, selectedPlace, state, isSearchBarFocused) { + print("state: $state, isSearchBarFocused: $isSearchBarFocused"); + return isSearchBarFocused + ? Container() + : FloatingCard( + bottomPosition: 0.0, + leftPosition: 0.0, + rightPosition: 0.0, + width: 500, + borderRadius: BorderRadius.circular(12.0), + child: state == SearchingState.Searching + ? Center(child: CircularProgressIndicator()) + : Container( + margin: EdgeInsets.all(12), + child: Column( + children: [ + SecondaryButton( + color: Colors.grey[800], + textColor: Colors.white, + onTap: () async { + print(selectedPlace); + AddNewAddressRequestModel + addNewAddressRequestModel = + new AddNewAddressRequestModel( + customer: Customer(addresses: [ + Addresses( + address1: + selectedPlace.formattedAddress, + address2: selectedPlace + .formattedAddress, + customerAttributes: "", + city: "", + createdOnUtc: "", + id: 0, + latLong: "$latitude,$longitude", + email: "") + ]), + ); + + selectedPlace.addressComponents.forEach((e) { + if (e.types.contains("country")) { + addNewAddressRequestModel.customer + .addresses[0].country = e.longName; + } + if (e.types.contains("postal_code")) { + addNewAddressRequestModel.customer + .addresses[0].zipPostalCode = + e.longName; + } + if (e.types.contains("locality")) { + addNewAddressRequestModel.customer + .addresses[0].city = + e.longName; + } + }); + + await model.addAddressInfo( + addNewAddressRequestModel: addNewAddressRequestModel); + if (model.state == ViewState.ErrorLocal) { + Utils.showErrorToast(model.error); + } else { + AppToast.showSuccessToast( + message: "Address Added Successfully"); + } + Navigator.of(context).pop(); + }, + label: " Add New Address ", + ), + ], + ), + ), + ); + }, + initialPosition: LatLng(latitude, longitude), + useCurrentLocation: false, + ), + )); + } +} diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart index 928444d6..7da00dee 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart @@ -1,6 +1,8 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -200,7 +202,7 @@ class _NewCMCStepOnePageState extends State { label: "Next", textColor: Theme.of(context).backgroundColor, color: Colors.grey[800], - onTap: () { + onTap: () async { if (widget.cMCInsertPresOrderRequestModel .patientERCMCInsertServicesList.length != 0 || @@ -229,8 +231,12 @@ class _NewCMCStepOnePageState extends State { .patientERCMCInsertServicesList = [ patientERCMCInsertServicesList ]; - - widget.changePageViewIndex(1); + await widget.model.getCustomerInfo(); + if(widget.model.state == ViewState.ErrorLocal){ + Utils.showErrorToast(); + } else { + widget.changePageViewIndex(1); + } } }, ), diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart index 27cddfe3..c1ec952f 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_tow_page.dart @@ -1,19 +1,22 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart'; -import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; +import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart'; -import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/others/close_back.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:google_maps_place_picker/google_maps_place_picker.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:google_maps_place_picker/google_maps_place_picker.dart'; import 'package:provider/provider.dart'; +import 'cmc_location_page.dart'; + class NewCMCStepTowPage extends StatefulWidget { final Function(PickResult) onPick; final double latitude; @@ -41,12 +44,13 @@ class _NewCMCStepTowPageState extends State { double latitude = 0; double longitude = 0; + AddressInfo _selectedAddress; + @override void initState() { if (widget.cmcInsertPresOrderRequestModel.latitude == null) { - latitude = widget.latitude; - longitude = widget.longitude; + setLatitudeAndLongitude(); } else { latitude = widget.cmcInsertPresOrderRequestModel.latitude; longitude = widget.cmcInsertPresOrderRequestModel.longitude; @@ -54,60 +58,152 @@ class _NewCMCStepTowPageState super.initState(); } + setLatitudeAndLongitude({bool isSetState = false, String latLong}) { + if (latLong == null) + latLong = widget.model.addressesList[widget.model.addressesList + .length - 1].latLong; + List latLongArr = latLong.split(','); + + latitude = double.parse(latLongArr[0]); + longitude = double.parse(latLongArr[1]); + } @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); - return AppScaffold( + return AppScaffold( isShowDecPage: false, - body: PlacePicker( - apiKey: GOOGLE_API_KEY, - enableMyLocationButton: true, - automaticallyImplyAppBarLeading: false, - autocompleteOnTrailingWhitespace: true, - selectInitialPosition: true, - autocompleteLanguage: projectViewModel.currentLanguage, - enableMapTypeButton: true, - onPlacePicked: (PickResult result) { - print(result.adrAddress); - widget.changePageViewIndex(3); - }, - selectedPlaceWidgetBuilder: - (_, selectedPlace, state, isSearchBarFocused) { - print("state: $state, isSearchBarFocused: $isSearchBarFocused"); - return isSearchBarFocused - ? Container() - : FloatingCard( - bottomPosition: 0.0, - leftPosition: 0.0, - rightPosition: 0.0, - width: 500, - borderRadius: BorderRadius.circular(12.0), - child: state == SearchingState.Searching - ? Center(child: CircularProgressIndicator()) - : Container( - margin: EdgeInsets.all(12), - child: SecondaryButton( - color: Colors.grey[800], - textColor: Colors.white, - onTap: () { - setState(() { - widget.cmcInsertPresOrderRequestModel - .latitude = - selectedPlace.geometry.location.lat; - widget.cmcInsertPresOrderRequestModel - .longitude = - selectedPlace.geometry.location.lng; - }); - widget.changePageViewIndex(3); - }, - label: TranslationBase.of(context).next, - ), + body: Stack( + children: [ + PlacePicker( + apiKey: GOOGLE_API_KEY, + enableMyLocationButton: true, + automaticallyImplyAppBarLeading: false, + autocompleteOnTrailingWhitespace: true, + selectInitialPosition: true, + autocompleteLanguage: projectViewModel.currentLanguage, + enableMapTypeButton: true, + searchForInitialValue: false, + + onPlacePicked: (PickResult result) { + print(result.adrAddress); + widget.changePageViewIndex(3); + }, + selectedPlaceWidgetBuilder: + (_, selectedPlace, state, isSearchBarFocused) { + print("state: $state, isSearchBarFocused: $isSearchBarFocused"); + return isSearchBarFocused + ? Container() + : FloatingCard( + bottomPosition: 0.0, + leftPosition: 0.0, + rightPosition: 0.0, + width: 500, + borderRadius: BorderRadius.circular(12.0), + child: state == SearchingState.Searching + ? Center(child: CircularProgressIndicator()) + : Container( + margin: EdgeInsets.all(12), + child: Column( + children: [ + SecondaryButton( + color: Colors.grey[800], + textColor: Colors.white, + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => + CMCLocationPage( + latitude: latitude, + longitude: longitude, + + ), + ), + ); + }, + label: " Add New Address ", + ), + SizedBox(height: 10,), + SecondaryButton( + color: Colors.red + [800], + textColor: Colors.white, + onTap: () { + setState(() { + widget.cmcInsertPresOrderRequestModel + .latitude = + selectedPlace.geometry.location.lat; + widget.cmcInsertPresOrderRequestModel + .longitude = + selectedPlace.geometry.location.lng; + }); + widget.changePageViewIndex(3); + }, + label: TranslationBase.of(context).confirm, ), - ); + ], + ) + ), + ); + }, + initialPosition: LatLng(latitude, longitude), + useCurrentLocation: false, + ), + Container( + child: InkWell( + onTap: () => + confirmSelectLocationDialog(widget.model.addressesList), + child: Container( + padding: EdgeInsets.all(10), + width: double.infinity, + // height: 65, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white), + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Expanded(child: Texts(getAddressName(), fontSize: 14,),), + Icon(Icons.arrow_drop_down) + ], + ), + ), + ), + height: 56, width: double.infinity, color: Theme + .of(context) + .scaffoldBackgroundColor, + + ) + ], + ), + ); + + + } + + + void confirmSelectLocationDialog(List addresses) { + showDialog( + context: context, + child: SelectLocationDialog( + addresses: addresses, + selectedAddress: _selectedAddress + , + onValueSelected: (value) { + setLatitudeAndLongitude(latLong: value.latLong); + setState(() { + _selectedAddress = value; + }); }, - initialPosition: LatLng(latitude, longitude), - useCurrentLocation: true, ), ); } + + String getAddressName() { + if (_selectedAddress != null) + return _selectedAddress.address1; + else + return "Select Address" /*TranslationBase.of(context).selectHospital*/; + } } diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart index 385d0da3..01e2a14d 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart @@ -40,6 +40,7 @@ class _CMCPageState extends State }, builder: (_, model, widget) => AppScaffold( isShowAppBar: true, + description: TranslationBase.of(context).HHCNotAuthMsg, appBarTitle: TranslationBase.of(context).homeHealthCare, body: Scaffold( extendBodyBehindAppBar: true, diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart index 14824532..8592cb34 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart @@ -18,8 +18,9 @@ class LocationPage extends StatefulWidget { final Function(PickResult) onPick; final double latitude; final double longitude; + final dynamic model; - const LocationPage({Key key, this.onPick, this.latitude, this.longitude}) + const LocationPage({Key key, this.onPick, this.latitude, this.longitude, this.model}) : super(key: key); @override @@ -84,7 +85,6 @@ class _LocationPageState color: Colors.grey[800], textColor: Colors.white, onTap: () async { - print(selectedPlace); AddNewAddressRequestModel addNewAddressRequestModel = new AddNewAddressRequestModel( diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart index c41892d3..bc5a4a99 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_one_page.dart @@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -143,7 +144,12 @@ class _NewHomeHealthCareStepOnePageState extends State Date: Tue, 1 Dec 2020 18:43:29 +0200 Subject: [PATCH 19/20] naming issue fix --- .../ComprehensiveMedicalCheckup/cmc_page.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart index 01e2a14d..04d8ea36 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart @@ -41,7 +41,7 @@ class _CMCPageState extends State builder: (_, model, widget) => AppScaffold( isShowAppBar: true, description: TranslationBase.of(context).HHCNotAuthMsg, - appBarTitle: TranslationBase.of(context).homeHealthCare, + appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup, body: Scaffold( extendBodyBehindAppBar: true, appBar: PreferredSize( From 0181043da802816a0b7ff5b89b09ea4a9ddbadd4 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 2 Dec 2020 10:28:39 +0300 Subject: [PATCH 20/20] Ereferral fixes, smartwatch health data integration --- lib/config/localized_values.dart | 4 + .../get_all_projects_response_model.dart | 76 ++++++++++ .../e_referral_service.dart | 26 +++- .../e_referral_view_model.dart | 55 +++++-- .../new_e_referral_index_page.dart | 54 ++++--- .../new_e_referral_step_one_page.dart | 78 +++++----- .../new_e_referral_step_three_page.dart | 135 +++++++++++------- .../new_e_referral_step_two_page.dart | 2 +- .../dialogs/select_project_dialog.dart | 129 +++++++++++++++++ .../E-Referral/e_referral_page.dart | 4 +- .../health_data_list.dart | 38 ++++- .../smart_watch_instructions.dart | 19 ++- .../medical/vital_sign/vital_sign_item.dart | 6 +- lib/theme/theme_value.dart | 1 + lib/uitl/translations_delegate_base.dart | 1 + lib/widgets/bottom_options/BottomSheet.dart | 2 +- 16 files changed, 484 insertions(+), 146 deletions(-) create mode 100644 lib/core/model/AlHabibMedicalService/EReferral/get_all_projects_response_model.dart create mode 100644 lib/pages/AlHabibMedicalService/E-Referral/dialogs/select_project_dialog.dart diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 29a4203e..ab0ac7bb 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1132,5 +1132,9 @@ const Map localizedValues = { "en": "UPDATE THE APP", "ar": "تحديث التطبيق" }, + "ereferralSaveSuccess": { + "en": "The referral request has been submitted successfully, you will be contacted ASAP to complete the process. Referral request no is ", + "ar": " تم إرسال طلب الإحالة بنجاح ، وسيتم الاتصال بك في أسرع وقت ممكن لإكمال العملية. رقم طلب الإحالة" + }, }; diff --git a/lib/core/model/AlHabibMedicalService/EReferral/get_all_projects_response_model.dart b/lib/core/model/AlHabibMedicalService/EReferral/get_all_projects_response_model.dart new file mode 100644 index 00000000..438f1630 --- /dev/null +++ b/lib/core/model/AlHabibMedicalService/EReferral/get_all_projects_response_model.dart @@ -0,0 +1,76 @@ +class GetAllProjectsResponseModel { + String desciption; + Null desciptionN; + int iD; + String legalName; + String legalNameN; + String name; + Null nameN; + String phoneNumber; + String setupID; + int distanceInKilometers; + bool isActive; + String latitude; + String longitude; + int mainProjectID; + Null projectOutSA; + bool usingInDoctorApp; + + GetAllProjectsResponseModel( + {this.desciption, + this.desciptionN, + this.iD, + this.legalName, + this.legalNameN, + this.name, + this.nameN, + this.phoneNumber, + this.setupID, + this.distanceInKilometers, + this.isActive, + this.latitude, + this.longitude, + this.mainProjectID, + this.projectOutSA, + this.usingInDoctorApp}); + + GetAllProjectsResponseModel.fromJson(Map json) { + desciption = json['Desciption']; + desciptionN = json['DesciptionN']; + iD = json['ID']; + legalName = json['LegalName']; + legalNameN = json['LegalNameN']; + name = json['Name']; + nameN = json['NameN']; + phoneNumber = json['PhoneNumber']; + setupID = json['SetupID']; + distanceInKilometers = json['DistanceInKilometers']; + isActive = json['IsActive']; + latitude = json['Latitude']; + longitude = json['Longitude']; + mainProjectID = json['MainProjectID']; + projectOutSA = json['ProjectOutSA']; + usingInDoctorApp = json['UsingInDoctorApp']; + } + + Map toJson() { + final Map data = new Map(); + data['Desciption'] = this.desciption; + data['DesciptionN'] = this.desciptionN; + data['ID'] = this.iD; + data['LegalName'] = this.legalName; + data['LegalNameN'] = this.legalNameN; + data['Name'] = this.name; + data['NameN'] = this.nameN; + data['PhoneNumber'] = this.phoneNumber; + data['SetupID'] = this.setupID; + data['DistanceInKilometers'] = this.distanceInKilometers; + data['IsActive'] = this.isActive; + data['Latitude'] = this.latitude; + data['Longitude'] = this.longitude; + data['MainProjectID'] = this.mainProjectID; + data['ProjectOutSA'] = this.projectOutSA; + data['UsingInDoctorApp'] = this.usingInDoctorApp; + return data; + } +} diff --git a/lib/core/service/AlHabibMedicalService/e_referral_service.dart b/lib/core/service/AlHabibMedicalService/e_referral_service.dart index 6c356f5c..6e8da51b 100644 --- a/lib/core/service/AlHabibMedicalService/e_referral_service.dart +++ b/lib/core/service/AlHabibMedicalService/e_referral_service.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/check_activation_code_for_e_referral_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/create_e_referral_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_cities_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_projects_response_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_relationship_types_response_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_e_referral_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_e_referral_response_model.dart'; @@ -14,6 +15,9 @@ class EReferralService extends BaseService { List _allCities = List(); List get allCities => _allCities; + List _allProjects = List(); + List get allProjects => _allProjects; + List _allReferral = List(); List get allReferral => _allReferral; String _activationCode; @@ -53,6 +57,20 @@ class EReferralService extends BaseService { }, body: {}); } + Future getAllProjects() async { + await baseAppClient.post(GET_PROJECT, + onSuccess: (dynamic response, int statusCode) { + _allProjects.clear(); + response['ListProject'].forEach((city) { + _allProjects + .add(GetAllProjectsResponseModel.fromJson(city)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: {}); + } + Future sendActivationCodeForEReferral( SendActivationCodeForEReferralRequestModel @@ -60,6 +78,7 @@ class EReferralService extends BaseService { hasError = false; await baseAppClient.post(SEND_ACTIVATION_CODE_FOR_E_REFERRAL, onSuccess: (dynamic response, int statusCode) { + print(response["VerificationCode"]); _activationCode = response["VerificationCode"]; _logInTokenID = response["LogInTokenID"]; @@ -86,19 +105,20 @@ class EReferralService extends BaseService { }, body: checkActivationCodeForEReferralRequestModel.toJson()); } - Future createEReferral( + Future createEReferral( CreateEReferralRequestModel createEReferralRequestModel ) async { hasError = false; + dynamic localRes; await baseAppClient.post(CREATE_E_REFERRAL/*'Services/Patients.svc/REST/CreateEReferral'*/, onSuccess: (dynamic response, int statusCode) { // TODO Waiting for fix service - var asd= ("EEEEEE"); - + localRes = response; }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; }, body: createEReferralRequestModel.toJson()); + return Future.value(localRes); } Future getEReferrals( diff --git a/lib/core/viewModels/all_habib_medical_services/e_referral_view_model.dart b/lib/core/viewModels/all_habib_medical_services/e_referral_view_model.dart index 1972e08f..45adb6d3 100644 --- a/lib/core/viewModels/all_habib_medical_services/e_referral_view_model.dart +++ b/lib/core/viewModels/all_habib_medical_services/e_referral_view_model.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/check_activation_code_for_e_referral_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/create_e_referral_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_cities_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_projects_response_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_relationship_types_response_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_e_referral_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_e_referral_response_model.dart'; @@ -18,64 +19,92 @@ class EReferralViewModel extends BaseViewModel { List get relationTypes => _eReferralService.relationTypes; + List get allCities => _eReferralService.allCities; - List get allReferral => _eReferralService.allReferral; + List get allHospitals => + _eReferralService.allProjects; + List get allReferral => + _eReferralService.allReferral; - void getRelationTypes() async { + void getRelationTypes() async { setState(ViewState.Busy); await _eReferralService.getRelationTypes(); if (_eReferralService.hasError) { error = _eReferralService.error; setState(ViewState.Error); - } else{ + } else { setState(ViewState.Idle); } } - void getAllCities() async { + + void getAllCities() async { setState(ViewState.Busy); await _eReferralService.getAllCities(); if (_eReferralService.hasError) { error = _eReferralService.error; setState(ViewState.Error); - } else{ + } else { setState(ViewState.Idle); } } - void sendActivationCodeForEReferral(SendActivationCodeForEReferralRequestModel sendActivationCodeForEReferralRequestModel) async { + void getAllProjects() async { + setState(ViewState.Busy); + await _eReferralService.getAllProjects(); + if (_eReferralService.hasError) { + error = _eReferralService.error; + setState(ViewState.Error); + } else { + setState(ViewState.Idle); + } + } + + void sendActivationCodeForEReferral( + SendActivationCodeForEReferralRequestModel + sendActivationCodeForEReferralRequestModel) async { setState(ViewState.BusyLocal); - await _eReferralService.sendActivationCodeForEReferral(sendActivationCodeForEReferralRequestModel); + await _eReferralService.sendActivationCodeForEReferral( + sendActivationCodeForEReferralRequestModel); if (_eReferralService.hasError) { error = _eReferralService.error; setState(ViewState.ErrorLocal); - } else{ + } else { setState(ViewState.Idle); } } - checkActivationCodeForEReferral(CheckActivationCodeForEReferralResponseModel checkActivationCodeForEReferralRequestModel) async { + checkActivationCodeForEReferral( + CheckActivationCodeForEReferralResponseModel + checkActivationCodeForEReferralRequestModel) async { setState(ViewState.BusyLocal); - await _eReferralService.checkActivationCodeForEReferral(checkActivationCodeForEReferralRequestModel); + await _eReferralService.checkActivationCodeForEReferral( + checkActivationCodeForEReferralRequestModel); if (_eReferralService.hasError) { error = _eReferralService.error; setState(ViewState.ErrorLocal); - } else{ + } else { setState(ViewState.Idle); } } - void createEReferral( + Future createEReferral( CreateEReferralRequestModel createEReferralRequestModel) async { + dynamic localRes; setState(ViewState.BusyLocal); - await _eReferralService.createEReferral(createEReferralRequestModel); + await _eReferralService + .createEReferral(createEReferralRequestModel) + .then((response) { + localRes = response; + }); if (_eReferralService.hasError) { error = _eReferralService.error; setState(ViewState.ErrorLocal); } else { setState(ViewState.Idle); } + return Future.value(localRes); } getEReferrals(SearchEReferralRequestModel searchEReferralRequestModel) async { diff --git a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_index_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_index_page.dart index fb2b94c6..2cb179b8 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_index_page.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_index_page.dart @@ -40,34 +40,32 @@ class _StartIndexForNewEReferralState extends State @override Widget build(BuildContext context) { return Scaffold( - body: SafeArea( - child: SingleChildScrollView( - child: Container( - height: MediaQuery.of(context).size.height * 0.9, - child: PageView( - physics: NeverScrollableScrollPhysics(), - controller: _controller, - onPageChanged: (index) { - setState(() { - _currentIndex = index; - }); - }, - scrollDirection: Axis.horizontal, - children: [ - NewEReferralStepOnePage( - changePageViewIndex: changePageViewIndex, - createEReferralRequestModel: createEReferralRequestModel, - ), - NewEReferralStepTowPage( - changePageViewIndex: changePageViewIndex, - createEReferralRequestModel: createEReferralRequestModel, - ), - NewEReferralStepThreePage( - changePageViewIndex: changePageViewIndex, - createEReferralRequestModel: createEReferralRequestModel, - ), - ], - ), + body: SingleChildScrollView( + child: Container( + height: MediaQuery.of(context).size.height * 0.9, + child: PageView( + physics: NeverScrollableScrollPhysics(), + controller: _controller, + onPageChanged: (index) { + setState(() { + _currentIndex = index; + }); + }, + scrollDirection: Axis.horizontal, + children: [ + NewEReferralStepOnePage( + changePageViewIndex: changePageViewIndex, + createEReferralRequestModel: createEReferralRequestModel, + ), + NewEReferralStepTowPage( + changePageViewIndex: changePageViewIndex, + createEReferralRequestModel: createEReferralRequestModel, + ), + NewEReferralStepThreePage( + changePageViewIndex: changePageViewIndex, + createEReferralRequestModel: createEReferralRequestModel, + ), + ], ), ), ), diff --git a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart index 62799c6d..db549626 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_one_page.dart @@ -6,28 +6,29 @@ import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; -import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_confirm_sms_dialog.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/dialogs/select_country_ingo_Dialog.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/dialogs/select_relation_type_dialog.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_confirm_sms_dialog.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - class NewEReferralStepOnePage extends StatefulWidget { final CreateEReferralRequestModel createEReferralRequestModel; final Function changePageViewIndex; - const NewEReferralStepOnePage({Key key, this.createEReferralRequestModel, this.changePageViewIndex}) : super(key: key); + const NewEReferralStepOnePage( + {Key key, this.createEReferralRequestModel, this.changePageViewIndex}) + : super(key: key); @override - _NewEReferralStepOnePageState createState() => _NewEReferralStepOnePageState(); + _NewEReferralStepOnePageState createState() => + _NewEReferralStepOnePageState(); } class _NewEReferralStepOnePageState extends State { @@ -64,27 +65,25 @@ class _NewEReferralStepOnePageState extends State { context: context, barrierDismissible: false, child: EReferralConfirmSMSDialog( - phoneNumber: _selectedCountry['code']+_mobileTextController.text, - onSucces: (){ - Navigator.of(context).pop(); - widget.changePageViewIndex(1); - widget.createEReferralRequestModel.requesterName=_nameTextController.text; - widget.createEReferralRequestModel.requesterContactNo = _selectedCountry['code'].toString().substring(1)+_mobileTextController.text; - widget.createEReferralRequestModel.requesterRelationship=_selectedRelation.iD; - - - } - - - ), + phoneNumber: _selectedCountry['code'] + _mobileTextController.text, + onSucces: () { + Navigator.of(context).pop(); + widget.changePageViewIndex(1); + widget.createEReferralRequestModel.requesterName = + _nameTextController.text; + widget.createEReferralRequestModel.requesterContactNo = + _selectedCountry['code'].toString().substring(1) + + _mobileTextController.text; + widget.createEReferralRequestModel.requesterRelationship = + _selectedRelation.iD; + }), ).then((value) { print("dialog dismissed"); print(value); - if (value != null && value) { - - } + if (value != null && value) {} }); } + return BaseView( onModelReady: (model) => model.getRelationTypes(), builder: (_, model, widget) => AppScaffold( @@ -92,7 +91,7 @@ class _NewEReferralStepOnePageState extends State { body: SingleChildScrollView( physics: ScrollPhysics(), child: Container( - margin: EdgeInsets.all(12), + margin: EdgeInsets.all(10), child: Center( child: FractionallySizedBox( widthFactor: 0.9, @@ -100,11 +99,10 @@ class _NewEReferralStepOnePageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ SizedBox( - height: 20, + height: 80, ), Center( child: Texts( -// TranslationBase.of(context).advancePaymentLabel, "Referral requester information", textAlign: TextAlign.center, ), @@ -185,34 +183,30 @@ class _NewEReferralStepOnePageState extends State { ), ), bottomSheet: Container( - height: MediaQuery - .of(context) - .size - .height * 0.1, + height: MediaQuery.of(context).size.height * 0.1, width: double.infinity, padding: EdgeInsets.all(9), child: SecondaryButton( textColor: Colors.white, label: "Next", - onTap: () async { - SendActivationCodeForEReferralRequestModel sendActivationCodeForEReferralRequestModel = - SendActivationCodeForEReferralRequestModel( + onTap: () async { + SendActivationCodeForEReferralRequestModel + sendActivationCodeForEReferralRequestModel = + SendActivationCodeForEReferralRequestModel( zipCode: _selectedCountry['code'], - patientMobileNumber: int.parse( - _mobileTextController.text),); - await model.sendActivationCodeForEReferral(sendActivationCodeForEReferralRequestModel); + patientMobileNumber: int.parse(_mobileTextController.text), + ); + await model.sendActivationCodeForEReferral( + sendActivationCodeForEReferralRequestModel); showSMSDialog(); }, loading: model.state == ViewState.BusyLocal, - disabled: - _nameTextController.text.isEmpty || + disabled: _nameTextController.text.isEmpty || _selectedRelation == null || _mobileTextController.text.isEmpty, ), ))); - - } void confirmSelectRelationTypeDialog( @@ -261,12 +255,8 @@ class _NewEReferralStepOnePageState extends State { } class MobileNumberTextFiled extends StatelessWidget { - const MobileNumberTextFiled({ - Key key, - this.controller, - this.code - }) : super(key: key); - + const MobileNumberTextFiled({Key key, this.controller, this.code}) + : super(key: key); final TextEditingController controller; final String code; diff --git a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart index d84b9d61..cb9f03df 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_three_page.dart @@ -1,21 +1,23 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/create_e_referral_request_model.dart'; -import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_cities_response_model.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_projects_response_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; +import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/dialogs/select_project_dialog.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; -import '../dialogs/select_city_dialog.dart'; - class NewEReferralStepThreePage extends StatefulWidget { final CreateEReferralRequestModel createEReferralRequestModel; final Function changePageViewIndex; @@ -32,7 +34,8 @@ class NewEReferralStepThreePage extends StatefulWidget { class _NewEReferralStepThreePageState extends State { TextEditingController _nameTextController = TextEditingController(); TextEditingController _mobileTextController = TextEditingController(); - GetAllCitiesResponseModel _selectedCity; + + GetAllProjectsResponseModel _selectedHospital; GetAllSharedRecordsByStatusList selectedPatientFamily; List medicalReportImages = []; @@ -50,6 +53,7 @@ class _NewEReferralStepThreePageState extends State { @override Widget build(BuildContext context) { return BaseView( + onModelReady: (model) => model.getAllProjects(), builder: (_, model, widget) => AppScaffold( isShowAppBar: false, body: SingleChildScrollView( @@ -64,7 +68,7 @@ class _NewEReferralStepThreePageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ SizedBox( - height: 20, + height: 80, ), Center( child: Texts( @@ -103,8 +107,13 @@ class _NewEReferralStepThreePageState extends State { ImageOptions.showImageOptions(context, (String image) { setState(() { - EReferralAttachment eReferralAttachment = new EReferralAttachment(fileName: 'image ${ medicalReportImages.length +1}.png',base64String: image ); - medicalReportImages.add(eReferralAttachment); + EReferralAttachment eReferralAttachment = + new EReferralAttachment( + fileName: + 'image ${medicalReportImages.length + 1}.png', + base64String: image); + medicalReportImages + .add(eReferralAttachment); }); }); }, @@ -158,15 +167,17 @@ class _NewEReferralStepThreePageState extends State { width: 8, ), Texts( - medicalReportImages[index].fileName, + medicalReportImages[index] + .fileName, ), ], ), InkWell( onTap: () { setState(() { - medicalReportImages - .remove(medicalReportImages[index]); + medicalReportImages.remove( + medicalReportImages[ + index]); }); }, child: Icon( @@ -205,7 +216,7 @@ class _NewEReferralStepThreePageState extends State { ), InkWell( onTap: () => - confirmSelectCityDialog(model.allCities), + confirmSelectHospital(model.allHospitals), child: Container( padding: EdgeInsets.all(12), width: double.infinity, @@ -262,12 +273,12 @@ class _NewEReferralStepThreePageState extends State { ], ), ), - if(isPatientInsured) - SizedBox( - height: 12, - ), + if (isPatientInsured) + SizedBox( + height: 12, + ), Opacity( - opacity: isPatientInsured?1:0, + opacity: isPatientInsured ? 1 : 0, child: Container( padding: EdgeInsets.only(top: 10), decoration: BoxDecoration( @@ -276,16 +287,21 @@ class _NewEReferralStepThreePageState extends State { ), child: Column( children: [ - InkWell( onTap: () { ImageOptions.showImageOptions(context, (String image) { setState(() { + EReferralAttachment + eReferralAttachment = + new EReferralAttachment( + fileName: + 'image ${medicalReportImages.length + 1}.png', + base64String: image); - EReferralAttachment eReferralAttachment = new EReferralAttachment(fileName: 'image ${ medicalReportImages.length +1}.png',base64String: image ); - - insuredPatientImages=[eReferralAttachment]; + insuredPatientImages = [ + eReferralAttachment + ]; }); }); }, @@ -333,8 +349,8 @@ class _NewEReferralStepThreePageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ - Icon( - FontAwesomeIcons.paperclip), + Icon(FontAwesomeIcons + .paperclip), SizedBox( width: 8, ), @@ -346,8 +362,9 @@ class _NewEReferralStepThreePageState extends State { InkWell( onTap: () { setState(() { - insuredPatientImages - .remove(insuredPatientImages[index]); + insuredPatientImages.remove( + insuredPatientImages[ + index]); }); }, child: Icon( @@ -378,50 +395,72 @@ class _NewEReferralStepThreePageState extends State { textColor: Colors.white, label: "Submit", onTap: () async { - this.widget.createEReferralRequestModel.medicalReportAttachment = medicalReportImages; - this.widget.createEReferralRequestModel.insuranceCardAttachment = insuredPatientImages.length !=0?insuredPatientImages[0]:null; - this.widget.createEReferralRequestModel.isInsuredPatient = isPatientInsured; + this + .widget + .createEReferralRequestModel + .medicalReportAttachment = medicalReportImages; + this + .widget + .createEReferralRequestModel + .insuranceCardAttachment = + insuredPatientImages.length != 0 + ? insuredPatientImages[0] + : null; + this.widget.createEReferralRequestModel.isInsuredPatient = + isPatientInsured; // ToDo make the preferred Branch info dynamic - this.widget.createEReferralRequestModel.preferredBranchCode = 15; - this.widget.createEReferralRequestModel. preferredBranchName= "Arryan Hospital"; - + this.widget.createEReferralRequestModel.preferredBranchCode = + _selectedHospital.iD; + this.widget.createEReferralRequestModel.preferredBranchName = + _selectedHospital.desciption; + this.widget.createEReferralRequestModel.otherRelationship = + ""; - // this.widget.createEReferralRequestModel.fullName= ""; - this.widget.createEReferralRequestModel.otherRelationship= ""; - // this.widget.createEReferralRequestModel.; - // this.widget.createEReferralRequestModel. preferredBranchName= "Arryan Hospital"; - // this.widget.createEReferralRequestModel. preferredBranchName= "Arryan Hospital"; - - await model.createEReferral(this.widget.createEReferralRequestModel); + await model + .createEReferral(this.widget.createEReferralRequestModel) + .then((value) { + AlertDialogBox( + context: context, + confirmMessage: + TranslationBase.of(context).ereferralSaveSuccess + + value['ReferralNumber'].toString(), + okText: TranslationBase.of(context).ok, + okFunction: () { + AlertDialogBox.closeAlertDialog(context); + navigateToHome(context); + }).showAlertDialog(context); + }); }, loading: model.state == ViewState.BusyLocal, - disabled: medicalReportImages.length == 0 , + disabled: medicalReportImages.length == 0, ), ))); } - void confirmSelectCityDialog(List cities) { + Future navigateToHome(context) async { + Navigator.of(context).popAndPushNamed(HOME); + } + + void confirmSelectHospital(List projects) { showDialog( context: context, - child: SelectCityDialog( - cities: cities, - selectedCity: _selectedCity, + child: SelectHospitalDialog( + hospitals: projects, + selectedHospital: _selectedHospital, onValueSelected: (value) { setState(() { - _selectedCity = value; + _selectedHospital = value; }); }, ), ); } - String getRelationName() { - if (_selectedCity != null) - return _selectedCity.description; + if (_selectedHospital != null) + return _selectedHospital.desciption; else - return "Select Relationship" /*TranslationBase.of(context).selectHospital*/; + return "Select Hospital*" /*TranslationBase.of(context).selectHospital*/; } - } diff --git a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_two_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_two_page.dart index 5f85fe12..34616def 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_two_page.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/New_E_Referral/new_e_referral_step_two_page.dart @@ -71,7 +71,7 @@ class _NewEReferralStepTowPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ SizedBox( - height: 30, + height: 80, ), Center( child: Texts( diff --git a/lib/pages/AlHabibMedicalService/E-Referral/dialogs/select_project_dialog.dart b/lib/pages/AlHabibMedicalService/E-Referral/dialogs/select_project_dialog.dart new file mode 100644 index 00000000..3a3cc083 --- /dev/null +++ b/lib/pages/AlHabibMedicalService/E-Referral/dialogs/select_project_dialog.dart @@ -0,0 +1,129 @@ +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_projects_response_model.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/material.dart'; + +class SelectHospitalDialog extends StatefulWidget { + + final List hospitals; + final Function(GetAllProjectsResponseModel) onValueSelected; + GetAllProjectsResponseModel selectedHospital; + + SelectHospitalDialog( + {Key key, this.hospitals, this.onValueSelected, this.selectedHospital}); + + @override + _SelectHospitalDialogState createState() => _SelectHospitalDialogState(); +} + +class _SelectHospitalDialogState extends State { + + @override + void initState() { + super.initState(); + widget.selectedHospital = widget.selectedHospital ?? widget.hospitals[0]; + } + + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Column( + children: [ + Divider(), + ...List.generate( + widget.hospitals.length, + (index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 2, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + widget.selectedHospital = widget.hospitals[index]; + }); + }, + child: ListTile( + title: Text(widget.hospitals[index].desciption), + leading: Radio( + value: widget.hospitals[index], + groupValue: widget.selectedHospital, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + widget.selectedHospital = value; + }); + }, + ), + ), + ), + ) + ], + ), + SizedBox( + height: 5.0, + ), + ], + ), + ), + SizedBox( + height: 5.0, + ), + Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: Center( + child: Texts( + TranslationBase.of(context).cancel.toUpperCase(), + color: Colors.red, + ), + ), + ), + ), + ), + ), + Container( + width: 1, + height: 30, + color: Colors.grey[500], + ), + Expanded( + flex: 1, + child: InkWell( + onTap: () { + widget.onValueSelected(widget.selectedHospital); + Navigator.pop(context); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Center( + child: Texts( + TranslationBase.of(context).ok, + fontWeight: FontWeight.w400, + )), + ), + ), + ), + ], + ) + ], + ) + ], + ); + } +} diff --git a/lib/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart b/lib/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart index 9f836860..f50e67fa 100644 --- a/lib/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart +++ b/lib/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart @@ -88,13 +88,13 @@ class _EReferralPageState extends State Container( width: MediaQuery.of(context).size.width * 0.37, child: Center( - child: Texts("New Referral"), + child: Texts("New Referral", fontSize: 14.0), ), ), Container( width: MediaQuery.of(context).size.width * 0.37, child: Center( - child: Texts("Search for Referrals"), + child: Texts("Search for Referrals", fontSize: 14.0), ), ), ], diff --git a/lib/pages/medical/smart_watch_health_data/health_data_list.dart b/lib/pages/medical/smart_watch_health_data/health_data_list.dart index 2f9a3e60..763948c0 100644 --- a/lib/pages/medical/smart_watch_health_data/health_data_list.dart +++ b/lib/pages/medical/smart_watch_health_data/health_data_list.dart @@ -1,5 +1,6 @@ import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:fit_kit/fit_kit.dart'; import 'package:flutter/material.dart'; class HealthDataList extends StatefulWidget { @@ -8,6 +9,19 @@ class HealthDataList extends StatefulWidget { } class _HealthDataListState extends State { + List dataTypes = List(); + + @override + void initState() { + dataTypes.add(DataType.DISTANCE); + dataTypes.add(DataType.STEP_COUNT); + dataTypes.add(DataType.HEART_RATE); + dataTypes.add(DataType.SLEEP); + dataTypes.add(DataType.ENERGY); + + super.initState(); + } + @override Widget build(BuildContext context) { return AppScaffold( @@ -132,7 +146,7 @@ class _HealthDataListState extends State { width: MediaQuery.of(context).size.width * 0.8, child: Button( onTap: () { -// launch(model.radImageURL); + readAll(); }, label: 'Sync Health Data', backgroundColor: Colors.grey[800], @@ -142,4 +156,26 @@ class _HealthDataListState extends State { ), )); } + + void readLast() async { + final result = await FitKit.readLast(DataType.DISTANCE); + print(result); + print(result); + } + + void readAll() async { + if (await FitKit.requestPermissions(dataTypes)) { + for (DataType type in dataTypes) { + final results = await FitKit.read( + type, + dateFrom: DateTime.now().subtract(Duration(days: 15)), + dateTo: DateTime.now(), + limit: 100, + ); + print(results); + print(results.length); + } + readLast(); + } + } } diff --git a/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart b/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart index eb0c1675..3f07693b 100644 --- a/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart +++ b/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart @@ -31,6 +31,7 @@ class _SmartWatchInstructionsState extends State { return AppScaffold( appBarTitle: "Sync Health Data", isShowAppBar: true, + isShowDecPage: false, body: Container( child: Platform.isIOS ? _getAppleWatchInstructions() @@ -88,6 +89,8 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( + margin: EdgeInsets.only(left: 5.0), + width: 105.0, child: Text( "Apple Watch Series 1", style: TextStyle( @@ -108,8 +111,12 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( + margin: EdgeInsets.only(left: 5.0), + width: 105.0, child: Text( "Apple Watch Series 2", + overflow: TextOverflow.clip, + softWrap: true, style: TextStyle( fontSize: 12.0)), ) @@ -135,6 +142,8 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( + margin: EdgeInsets.only(left: 5.0), + width: 105.0, child: Text( "Apple Watch Series 3", style: TextStyle( @@ -155,6 +164,8 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( + margin: EdgeInsets.only(left: 5.0), + width: 105.0, child: Text( "Apple Watch Series 4", style: TextStyle( @@ -182,6 +193,8 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( + margin: EdgeInsets.only(left: 5.0), + width: 105.0, child: Text( "Apple Watch Series 5", style: TextStyle( @@ -202,6 +215,8 @@ class _SmartWatchInstructionsState extends State { width: 70.0, height: 70.0), Container( + margin: EdgeInsets.only(left: 5.0), + width: 105.0, child: Text( "Apple Watch Series 6", style: TextStyle( @@ -427,7 +442,7 @@ class _SmartWatchInstructionsState extends State { width: MediaQuery.of(context).size.width, margin: EdgeInsets.symmetric(horizontal: 5.0), child: Card( - margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), + margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 0.0), color: Colors.white.withOpacity(1.0), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10), @@ -657,7 +672,7 @@ class _SmartWatchInstructionsState extends State { style: TextStyle(fontSize: 17.0)), ), Container( - margin: EdgeInsets.all(15.0), + margin: EdgeInsets.all(12.0), child: ButtonTheme( shape: RoundedRectangleBorder( borderRadius: diff --git a/lib/pages/medical/vital_sign/vital_sign_item.dart b/lib/pages/medical/vital_sign/vital_sign_item.dart index fb44772d..a42e26d5 100644 --- a/lib/pages/medical/vital_sign/vital_sign_item.dart +++ b/lib/pages/medical/vital_sign/vital_sign_item.dart @@ -46,7 +46,7 @@ class VitalSignItem extends StatelessWidget { des, style: TextStyle( fontSize: 1.7 * SizeConfig.textMultiplier, - color: HexColor('#B8382C'), + color: Theme.of(context).textTheme.headline1.color, fontWeight: FontWeight.bold, ), ), @@ -76,11 +76,11 @@ class VitalSignItem extends StatelessWidget { text: TextSpan( style: TextStyle(color: Colors.black), children: [ - TextSpan(text: lastVal), + TextSpan(text: lastVal + " "), TextSpan( text: unit, style: TextStyle( - color: HexColor('#B8382C'), + color: Theme.of(context).textTheme.headline1.color, ), ), ]), diff --git a/lib/theme/theme_value.dart b/lib/theme/theme_value.dart index bc80f47c..aedd0fbf 100644 --- a/lib/theme/theme_value.dart +++ b/lib/theme/theme_value.dart @@ -65,6 +65,7 @@ final blueBackground = Color(0xFFFFFFFF); }, ), hintColor: Colors.grey[400], + accentColor: Color(0xffB8382C), disabledColor: Colors.grey[300], errorColor: Color.fromRGBO(235, 80, 60, 1.0), scaffoldBackgroundColor: Color(0xffEEEEEE), diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 845fa869..4e0edcfd 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -890,6 +890,7 @@ String get fileno => localizedValues['fileno'][locale.languageCode]; String get descriptionVaccination => localizedValues['description-vaccination'][locale.languageCode]; String get dueDate => localizedValues['due-date'][locale.languageCode]; String get appUpdate => localizedValues['appUpdate'][locale.languageCode]; + String get ereferralSaveSuccess => localizedValues['ereferralSaveSuccess'][locale.languageCode]; } diff --git a/lib/widgets/bottom_options/BottomSheet.dart b/lib/widgets/bottom_options/BottomSheet.dart index 66ee36c4..f8a99c17 100644 --- a/lib/widgets/bottom_options/BottomSheet.dart +++ b/lib/widgets/bottom_options/BottomSheet.dart @@ -15,7 +15,7 @@ class ImageOptions { return _BottomSheet( children: [ _BottomSheetItem( - title: "Select file souse", + title: "Select file source", ), _BottomSheetItem( title: "Gallery",