Merge branch 'master' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into vital_sign
Conflicts: ios/Podfile ios/Runner.xcodeproj/project.pbxproj lib/config/config.dart lib/uitl/translations_delegate_base.dartmerge-requests/34/merge
@ -0,0 +1,122 @@
|
||||
{
|
||||
"name": "DQIcons",
|
||||
"css_prefix_text": "",
|
||||
"css_use_suffix": false,
|
||||
"hinting": true,
|
||||
"units_per_em": 1000,
|
||||
"ascent": 850,
|
||||
"glyphs": [
|
||||
{
|
||||
"uid": "ff411ee29329279e60e33c8fe13b69cf",
|
||||
"css": "blood-pressure",
|
||||
"code": 59392,
|
||||
"src": "custom_icons",
|
||||
"selected": true,
|
||||
"svg": {
|
||||
"path": "M479.2 354.2V423.1A41.1 41.1 0 0 0 458.3 458.4 41.8 41.8 0 0 0 541.7 458.4 41.1 41.1 0 0 0 520.9 423.1V354.2A20.8 20.8 0 1 0 479.1 354.2ZM854.2 0C772.4 0 708.3 73.2 708.3 166.7 708.3 233.8 758.9 352.6 833.3 372V770.9A187.1 187.1 0 0 1 459.5 782.2C524.8 773.9 583.4 758.4 583.4 729.2V649A207.9 207.9 0 0 0 583.4 267.6V145.8C583.4 86.3 340.4 83.3 291.7 83.3S0 86.3 0 145.8V729.3C0 788.8 243 791.8 291.7 791.8 311.4 791.8 363.1 791.2 417.4 786.7A229 229 0 0 0 875 771V372C949.4 352.7 1000 233.8 1000 166.7 1000 73.2 935.9 0 854.2 0ZM666.7 458.3A166.7 166.7 0 1 1 500 291.7 166.8 166.8 0 0 1 666.7 458.3ZM291.7 125A1092.4 1092.4 0 0 1 519.3 145.8 1092.6 1092.6 0 0 1 291.7 166.7 1092.4 1092.4 0 0 1 64 145.8 1092.7 1092.7 0 0 1 291.7 125ZM125 739.8A343.8 343.8 0 0 1 41.8 721.9V181.6A427 427 0 0 0 125 199.2ZM291.7 750C246.4 750 203.7 747.8 166.7 744.4V203.3C220.8 207.8 272.1 208.4 291.7 208.4 327.7 208.4 470.1 206.7 541.7 181.6V254.2A208.3 208.3 0 1 0 541.7 662.5V721.9A850.6 850.6 0 0 1 291.7 750ZM854.2 333.3C801.5 333.3 750 227.9 750 166.7 750 96.5 795.8 41.6 854.2 41.6S958.3 96.5 958.3 166.7C958.4 227.9 906.9 333.3 854.2 333.3Z",
|
||||
"width": 1000
|
||||
},
|
||||
"search": [
|
||||
"blood-pressure"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uid": "f06e0a60c298fe46fcd558db3c9103e6",
|
||||
"css": "blood",
|
||||
"code": 59393,
|
||||
"src": "custom_icons",
|
||||
"selected": true,
|
||||
"svg": {
|
||||
"path": "M902.3 687.5A19.5 19.5 0 1 0 921.9 707 19.6 19.6 0 0 0 902.3 687.5ZM902.3 687.5M332 429.6A19.5 19.5 0 1 0 312.5 410.1 19.6 19.6 0 0 0 332 429.6ZM332 429.6M214.9 625A214.7 214.7 0 0 0 401.1 303.2L231.8 9.8A19.5 19.5 0 0 0 197.9 9.8L28.6 303.1A214.7 214.7 0 0 0 214.9 625ZM62.4 322.7L214.9 58.6 367.3 322.7A175.8 175.8 0 1 1 62.4 322.7ZM62.4 322.7M214.8 546.9A136.2 136.2 0 0 0 321.1 496.1 19.5 19.5 0 0 0 290.7 471.5 97.4 97.4 0 0 1 214.8 507.8 19.5 19.5 0 1 0 214.8 546.9ZM214.8 546.9M1000 726.4A272.4 272.4 0 0 0 954.8 575.6L723.8 189A19.6 19.6 0 0 0 689.6 190.3L487.1 594.3A273.5 273.5 0 1 0 999.9 726.4ZM726.6 960.7A234.4 234.4 0 0 1 521.5 612.9L521.8 612.1 708.6 239.5 921.5 596 921.9 596.7A234.4 234.4 0 0 1 726.4 960.6ZM726.6 960.7M898.9 766.2A19.5 19.5 0 0 0 874 778.2 156.5 156.5 0 0 1 726.4 882.9 19.5 19.5 0 0 0 726.4 922 195.5 195.5 0 0 0 910.9 791.1 19.5 19.5 0 0 0 898.9 766.2ZM898.9 766.2",
|
||||
"width": 1000
|
||||
},
|
||||
"search": [
|
||||
"blood"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uid": "8bc572f19109474e3c88db0439fd2dcc",
|
||||
"css": "bmi",
|
||||
"code": 59394,
|
||||
"src": "custom_icons",
|
||||
"selected": true,
|
||||
"svg": {
|
||||
"path": "M937.8 231.3H846.3V80.5A80.6 80.6 0 0 0 765.8 0H80.3A80.5 80.5 0 0 0 0 80.5V686.2A80.5 80.5 0 0 0 80.3 766.6H456V948.3A51.7 51.7 0 0 0 507.7 1000H937.8A51.7 51.7 0 0 0 989.3 948.3V283A51.7 51.7 0 0 0 937.8 231.3ZM80.3 733.3A47.1 47.1 0 0 1 33.3 686.2V80.5A47.1 47.1 0 0 1 80.3 33.3H765.8A47.2 47.2 0 0 1 813 80.5V231.3H634A216.5 216.5 0 0 0 210.3 240 40.5 40.5 0 0 0 249.9 288.3H455.9V733.3ZM464.2 255H457.9L451.6 229.5A76.5 76.5 0 0 1 472.2 245.5 51.4 51.4 0 0 0 464.2 255ZM415.1 220.1L423.8 255H348.6A78.3 78.3 0 0 1 414.2 220L414.9 220ZM507.7 231.3C506.5 231.3 505.3 231.6 504.1 231.7A109.7 109.7 0 0 0 442 190.3L431.2 146.7 444.5 153.1A16.7 16.7 0 0 0 458.8 122.9L413.7 101.6H413.4A16.2 16.2 0 0 0 409 100.2C408.6 100.2 408.3 100.2 407.9 100.2A17.5 17.5 0 0 0 406 100.2 16.2 16.2 0 0 0 402.1 100.9 13.6 13.6 0 0 0 400.5 101.3 17.6 17.6 0 0 0 395.7 104.2L395.7 104.2A16.7 16.7 0 0 0 392.5 108.1L365.6 152.8A16.7 16.7 0 0 0 394.2 170L400.3 159.8 407.2 187.5A112.5 112.5 0 0 0 311.3 255H250A6.8 6.8 0 0 1 244.5 252.5 7.4 7.4 0 0 1 243 246.3 183.3 183.3 0 0 1 599.8 231.3ZM956 948.3A18.4 18.4 0 0 1 937.7 966.6H507.7A18.4 18.4 0 0 1 489.3 948.3V283A18.4 18.4 0 0 1 507.7 264.7H937.8A18.4 18.4 0 0 1 956.2 283ZM878.7 300H566.6A44 44 0 0 0 522.7 344V506.2A44 44 0 0 0 566.6 550.2H878.7A44 44 0 0 0 922.6 506.2V344A44 44 0 0 0 878.7 300ZM889.3 506A10.7 10.7 0 0 1 878.7 516.6H566.6A10.7 10.7 0 0 1 556 506V343.8A10.7 10.7 0 0 1 566.6 333.1H878.7A10.7 10.7 0 0 1 889.3 343.8V506ZM631 566.7H547.7A16.7 16.7 0 0 0 531 583.3V666.7A16.7 16.7 0 0 0 547.7 683.3H631A16.7 16.7 0 0 0 647.7 666.7V583.3A16.7 16.7 0 0 0 631 566.7ZM614.3 650H564.2V600H614.3ZM764.3 566.7H681A16.7 16.7 0 0 0 664.3 583.3V666.7A16.7 16.7 0 0 0 681 683.3H764.3A16.7 16.7 0 0 0 781 666.7V583.3A16.7 16.7 0 0 0 764.3 566.7ZM747.7 650H697.6V600H747.6ZM897.7 566.7H814.3A16.7 16.7 0 0 0 797.7 583.3V666.7A16.7 16.7 0 0 0 814.3 683.3H897.7A16.7 16.7 0 0 0 914.3 666.7V583.3A16.7 16.7 0 0 0 897.7 566.7ZM881 650H830.9V600H880.9ZM631 700H547.7A16.7 16.7 0 0 0 531 716.7V800A16.7 16.7 0 0 0 547.7 816.7H631A16.7 16.7 0 0 0 647.7 800V716.7A16.7 16.7 0 0 0 631 700ZM614.3 783.3H564.2V733.3H614.3ZM764.3 700H681A16.7 16.7 0 0 0 664.3 716.7V800A16.7 16.7 0 0 0 681 816.7H764.3A16.7 16.7 0 0 0 781 800V716.7A16.7 16.7 0 0 0 764.3 700ZM747.7 783.3H697.6V733.3H747.6ZM897.7 700H814.3A16.7 16.7 0 0 0 797.7 716.7V800A16.7 16.7 0 0 0 814.3 816.7H897.7A16.7 16.7 0 0 0 914.3 800V716.7A16.7 16.7 0 0 0 897.7 700ZM881 783.3H830.9V733.3H880.9ZM631 833.3H547.7A16.7 16.7 0 0 0 531 850V933.3A16.7 16.7 0 0 0 547.7 950H631A16.7 16.7 0 0 0 647.7 933.3V850A16.7 16.7 0 0 0 631 833.3ZM614.3 916.7H564.2V866.6H614.3ZM764.3 833.3H681A16.7 16.7 0 0 0 664.3 850V933.3A16.7 16.7 0 0 0 681 950H764.3A16.7 16.7 0 0 0 781 933.3V850A16.7 16.7 0 0 0 764.3 833.3ZM747.7 916.7H697.6V866.6H747.6ZM897.7 833.3H814.3A16.7 16.7 0 0 0 797.7 850V933.3A16.7 16.7 0 0 0 814.3 950H897.7A16.7 16.7 0 0 0 914.3 933.3V850A16.7 16.7 0 0 0 897.7 833.3ZM881 916.7H830.9V866.6H880.9ZM626.8 350H593.5A16.7 16.7 0 0 0 576.9 366.7V483.3A16.7 16.7 0 0 0 593.5 500H626.8A41.7 41.7 0 0 0 668.5 458.3V450A41.2 41.2 0 0 0 660 425 41.3 41.3 0 0 0 668.5 399.9V391.6A41.7 41.7 0 0 0 626.8 350ZM610.2 383.3H626.8A8.3 8.3 0 0 1 635.2 391.7V400A8.3 8.3 0 0 1 626.8 408.4H610.2ZM635.2 458.5A8.3 8.3 0 0 1 626.8 466.9H610.2V441.9H626.8A8.3 8.3 0 0 1 635.2 450.2ZM802.9 350.8A16.7 16.7 0 0 0 784.3 356.7L747.7 405.4 711 356.5A16.7 16.7 0 0 0 681 366.5V499.8H714.2V416.7L734.2 443.4A17.3 17.3 0 0 0 760.9 443.4L780.9 416.7V500H814.2V366.7A16.7 16.7 0 0 0 802.9 350.8ZM831 350H864.2V500H831Z",
|
||||
"width": 989
|
||||
},
|
||||
"search": [
|
||||
"bmi"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uid": "66a5ea0b6227f324a7bcce70c85374a9",
|
||||
"css": "heart",
|
||||
"code": 59395,
|
||||
"src": "custom_icons",
|
||||
"selected": true,
|
||||
"svg": {
|
||||
"path": "M1308.4 475H1204.8A726.6 726.6 0 0 0 1225.9 394C1251.4 266.6 1234.4 162.5 1177.2 92.3A269.9 269.9 0 0 0 962.4 0.3 417.3 417.3 0 0 0 651.3 143.5 417.3 417.3 0 0 0 340.2 0.3 269.9 269.9 0 0 0 124.3 92.3C67 163 50.1 266.6 75.5 394A725.7 725.7 0 0 0 98.3 476.7H23.6A23.6 23.6 0 1 0 23.6 523.8H115.9C259.5 877 640.3 997.8 644.4 999A23.6 23.6 0 0 0 658.1 999C662.3 997.8 1044.3 877 1187.5 522.1H1308.3A23.6 23.6 0 0 0 1308.3 475.1ZM651.4 951.7H651.4C601.4 934.5 296 818.6 166.7 523.8H423.2L501.2 715.2A23.6 23.6 0 0 0 522.9 729.8H524.8A23.6 23.6 0 0 0 546 711.9L626 384.4 691.8 605.9A24.1 24.1 0 0 0 737.3 607L803.9 422.9 874.5 513.1A23.6 23.6 0 0 0 892.9 522H1136.9C1007.7 817.7 701 934.5 651.4 951.7ZM1179.8 384.8A673.4 673.4 0 0 1 1154.7 475.3H904.5L814.3 360.7A23.6 23.6 0 0 0 773.6 367.3L716.8 523.6 646.2 288.3A23.9 23.9 0 0 0 600.2 289.5L517.6 630.2 460.6 491.3A23.6 23.6 0 0 0 438.7 476.7H147.9A676.1 676.1 0 0 1 122.8 384.8H122.8C99.3 271.8 113.6 181.2 161.9 122.3A223.9 223.9 0 0 1 340.1 47.3 362.4 362.4 0 0 1 631.7 195.7 23.6 23.6 0 0 0 670.8 195.7 362.4 362.4 0 0 1 962.4 47.3 223.9 223.9 0 0 1 1140.7 122.2C1187.8 181.2 1202.4 271.8 1179.8 384.8Z",
|
||||
"width": 1332
|
||||
},
|
||||
"search": [
|
||||
"heart"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uid": "4131eb4c890febf6ff3d52e759eed4d4",
|
||||
"css": "height",
|
||||
"code": 59396,
|
||||
"src": "custom_icons",
|
||||
"selected": true,
|
||||
"svg": {
|
||||
"path": "M518 285.7H508.4A107.1 107.1 0 1 0 349.1 285.7H339.4A89.4 89.4 0 0 0 250.3 374.9V624.9A17.9 17.9 0 0 0 268.1 642.7H321.7V982.2A17.9 17.9 0 0 0 339.6 1000H446.7A89.4 89.4 0 0 0 535.9 910.9V643H589.5A17.9 17.9 0 0 0 607.4 625.1V375A89.4 89.4 0 0 0 518 285.7ZM428.8 142.9A71.4 71.4 0 1 1 357.4 214.3 71.5 71.5 0 0 1 428.6 142.9ZM439.8 321.4L428.8 354.2 417.9 321.4ZM571.7 607.1H536V375H500.3V910.8A53.6 53.6 0 0 1 446.7 964.3V642.9H411V964.3H357.1V375H321.4V607.1H285.7V375A53.6 53.6 0 0 1 339.3 321.4H380L411.7 416.3A17.8 17.8 0 0 0 445.5 416.3L477.2 321.4H518A53.6 53.6 0 0 1 571.6 375V607.1ZM196.4 0H17.9A17.9 17.9 0 0 0 0 17.9V982.2A17.9 17.9 0 0 0 17.9 1000H196.5A17.9 17.9 0 0 0 214.3 982.2V17.9A17.9 17.9 0 0 0 196.4 0ZM178.6 107.1H142.9V142.9H178.6V214.3H107.1V250H178.6V321.4H142.9V357.1H178.6V428.7H107.1V464.4H178.6V535.9H142.9V571.6H178.6V643H107.1V678.7H178.6V750.2H142.9V785.9H178.6V857.3H107.1V893H178.6V964.5H35.7V35.7H178.6Z",
|
||||
"width": 804
|
||||
},
|
||||
"search": [
|
||||
"height"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uid": "7da96eaf449227b65b25e28f024492a7",
|
||||
"css": "outline",
|
||||
"code": 59397,
|
||||
"src": "custom_icons",
|
||||
"selected": true,
|
||||
"svg": {
|
||||
"path": "M295.8 216.2L303.6 183.8C300.3 183 222.5 165.2 167.6 293.5L198.2 306.8C241.3 206 293.6 215.8 295.8 216.2ZM147.9 1000C279.8 1000 416.2 671.4 416.2 583.3A102.5 102.5 0 0 0 399.1 524L499.6 423.6 600 524A102.5 102.5 0 0 0 582.9 583.3C582.9 671.4 719.4 1000 851.2 1000A94.7 94.7 0 0 0 928.2 950.1C1001.6 841.4 1023 563 968.4 427.4A1298.8 1298.8 0 0 0 893.8 267C832.1 156.3 772.7 100.2 717.3 100.2 692.2 100.2 667.5 118.5 646.3 153.3A349.4 349.4 0 0 0 604 380.8L566.2 343.1V16.6A16.6 16.6 0 0 0 549.6 0H449.6A16.6 16.6 0 0 0 432.9 16.6V343L395.2 380.8A349.4 349.4 0 0 0 352.9 153.1C331.6 118.3 307 99.9 281.9 99.9 156.3 99.9 43.6 392.7 30.7 427.2-23.9 562.8-2.5 841.2 70.9 949.9A94.7 94.7 0 0 0 147.9 1000ZM674.5 170.6C688.9 147.3 704.9 133.3 717.3 133.3 804.4 133.3 905.6 354.1 937.3 439.1L937.3 439.5C987.9 564.8 968 831.4 900.5 931.4 884.7 954.6 868.1 966.6 851.1 966.6 749.5 966.6 616.1 669.5 616.1 583.3A77.3 77.3 0 0 1 640.4 526 140.2 140.2 0 0 0 657 503 213.7 213.7 0 0 0 688.8 530.9 126.6 126.6 0 0 0 649.4 633.3H682.6A97.1 97.1 0 0 1 709.2 557.1 373 373 0 0 1 732.6 700C732.6 746.1 753.5 833.3 832.6 833.3V800.1C767 800.1 765.9 704.1 765.9 700.1A433 433 0 0 0 745.5 559 185.9 185.9 0 0 0 783.7 565.9 302.4 302.4 0 0 0 870.8 745.2L894.4 721.6A272.8 272.8 0 0 1 817.6 568 93.1 93.1 0 0 1 899.7 636.6L932.4 629.9A128.5 128.5 0 0 0 799.5 533.2 153.6 153.6 0 0 1 722.1 512.6 152.4 152.4 0 0 0 731.5 493.5 117.5 117.5 0 0 0 773.1 501.2 122.7 122.7 0 0 0 861.2 461.7L837.7 438.1A84.3 84.3 0 0 1 740.6 461 100.7 100.7 0 0 0 711.3 371.5L687.7 395A78.9 78.9 0 0 1 694.7 493.1 172.2 172.2 0 0 1 665.3 460.3 155.7 155.7 0 0 0 648 409.1C616.1 345.9 636.4 232.6 674.5 170.6ZM630.5 454.6A42.4 42.4 0 0 1 620.8 497.8L573.1 450 599.7 423.4ZM576 400L549.4 426.6 516.2 393.4V366.8H542.7ZM466.2 33.2H532.9V66.5H466.2ZM466.2 99.9H532.9V133.1H466.2ZM466.2 166.6H532.9V199.8H466.2ZM466.2 233.2H532.9V266.5H466.2ZM466.2 299.9H532.9V333.1H466.2ZM456.5 366.6H483.1V393.2L449.8 426.4 423.2 399.8ZM399.6 423.6L426.2 450.1 378.3 497.7A42.4 42.4 0 0 1 368.5 454.5ZM61.7 439.6L61.7 439.1C93.4 354.1 194.6 133.4 281.7 133.4 294.1 133.4 310 147.3 324.4 170.7 362.6 232.7 382.8 345.9 351 409.2A155.7 155.7 0 0 0 333.7 460.5 172.4 172.4 0 0 1 304.2 493.3 78.7 78.7 0 0 1 311.3 395.2L287.7 371.6A100.7 100.7 0 0 0 258.4 461.3 84.3 84.3 0 0 1 161.3 438.5L137.8 462A122.8 122.8 0 0 0 225.9 501.6 117.5 117.5 0 0 0 267.6 493.8 152.3 152.3 0 0 0 277 512.9 153.6 153.6 0 0 1 199.6 533.5 128.6 128.6 0 0 0 66.6 630.2L99.3 636.9A91.8 91.8 0 0 1 181.2 567.9 273 273 0 0 1 104.4 721.5L128 745.1A302.4 302.4 0 0 0 215.1 565.9 185.9 185.9 0 0 0 253.3 558.9 432.9 432.9 0 0 0 232.9 700C232.9 704.1 231.8 800 166.2 800V833.2C245.3 833.2 266.2 746 266.2 699.9A373.6 373.6 0 0 1 289.5 557 97.4 97.4 0 0 1 316.1 633.1H349.3A126.7 126.7 0 0 0 309.9 530.8 213.8 213.8 0 0 0 341.6 502.9 140.2 140.2 0 0 0 358.3 525.8 77.3 77.3 0 0 1 382.6 583.1C382.6 669.3 249.1 966.4 147.6 966.4 130.6 966.4 114 954.6 98.2 931.2 31 831.5 11.1 565 61.7 439.6ZM800.9 306.6L831.5 293.3C776.5 165 698.8 182.9 695.5 183.6L703.3 216C705.5 215.8 757.9 206.1 800.9 306.6Z",
|
||||
"width": 999
|
||||
},
|
||||
"search": [
|
||||
"outline"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uid": "9ad94ca188c9245ce61a2023913176f8",
|
||||
"css": "thermometer",
|
||||
"code": 59398,
|
||||
"src": "custom_icons",
|
||||
"selected": true,
|
||||
"svg": {
|
||||
"path": "M183.4 0A116.7 116.7 0 0 0 66.7 116.6V675.1A183.3 183.3 0 1 0 366.6 816.3 181.6 181.6 0 0 0 300 675.1V116.6A116.7 116.7 0 0 0 183.4 0ZM333.3 816.3A150 150 0 1 1 93.4 696.6 16.7 16.7 0 0 0 100.1 683.2V633.1H133.3V599.9H100.1V549.8H133.3V516.6H100.1V466.5H133.3V433.3H100.1V383.2H133.3V350H100.1V299.9H133.3V266.6H100.1V216.6H133.3V183.3H100.1V116.6A83.3 83.3 0 0 1 266.7 116.6V683.3A16.6 16.6 0 0 0 273.3 696.6 148.8 148.8 0 0 1 333.3 816.3ZM333.3 816.3M200.1 734.7V150H166.9V734.7A83.3 83.3 0 1 0 200.1 734.7ZM183.4 866.3A50 50 0 1 1 233.4 816.3 50 50 0 0 1 183.4 866.3ZM183.4 866.3",
|
||||
"width": 367
|
||||
},
|
||||
"search": [
|
||||
"thermometer"
|
||||
]
|
||||
},
|
||||
{
|
||||
"uid": "dc83d16b71561f6b582663f6b4d604ec",
|
||||
"css": "weight-scale",
|
||||
"code": 59399,
|
||||
"src": "custom_icons",
|
||||
"selected": true,
|
||||
"svg": {
|
||||
"path": "M912.1 0H87.9A88 88 0 0 0 0 87.9V912.1A88 88 0 0 0 87.9 1000H912.1A88 88 0 0 0 1000 912.1V87.9A88 88 0 0 0 912.1 0ZM941.4 912.1A29.3 29.3 0 0 1 912.1 941.4H87.9A29.3 29.3 0 0 1 58.6 912.1V87.9A29.3 29.3 0 0 1 87.9 58.6H912.1A29.3 29.3 0 0 1 941.4 87.9ZM941.4 912.1M837.9 233.7A563.3 563.3 0 0 0 162.2 233.7 29.3 29.3 0 0 0 156.4 274.9L311.1 480.7A29.3 29.3 0 0 0 352.2 486.5 246.9 246.9 0 0 1 648.4 486.5 29.3 29.3 0 0 0 689.5 480.7L844.2 274.9A29.3 29.3 0 0 0 838.4 233.7ZM659 422.9A302 302 0 0 0 529.3 379.8V290.6A29.3 29.3 0 0 0 470.7 290.6V379.8A302 302 0 0 0 341 422.9L221.2 263.6A504.8 504.8 0 0 1 778.8 263.6ZM659 422.9",
|
||||
"width": 1000
|
||||
},
|
||||
"search": [
|
||||
"weight-scale"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 81 KiB |
@ -0,0 +1,310 @@
|
||||
PODS:
|
||||
- barcode_scan (0.0.1):
|
||||
- Flutter
|
||||
- MTBBarcodeScanner
|
||||
- SwiftProtobuf
|
||||
- connectivity (0.0.1):
|
||||
- Flutter
|
||||
- Reachability
|
||||
- connectivity_for_web (0.1.0):
|
||||
- Flutter
|
||||
- connectivity_macos (0.0.1):
|
||||
- Flutter
|
||||
- device_info (0.0.1):
|
||||
- Flutter
|
||||
- Firebase/Core (6.23.0):
|
||||
- Firebase/CoreOnly
|
||||
- FirebaseAnalytics (= 6.4.2)
|
||||
- Firebase/CoreOnly (6.23.0):
|
||||
- FirebaseCore (= 6.6.7)
|
||||
- Firebase/Messaging (6.23.0):
|
||||
- Firebase/CoreOnly
|
||||
- FirebaseMessaging (~> 4.3.1)
|
||||
- firebase_messaging (0.0.1):
|
||||
- Firebase/Core
|
||||
- Firebase/Messaging
|
||||
- Flutter
|
||||
- FirebaseAnalytics (6.4.2):
|
||||
- FirebaseCore (~> 6.6)
|
||||
- FirebaseInstallations (~> 1.2)
|
||||
- GoogleAppMeasurement (= 6.4.2)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 6.0)
|
||||
- GoogleUtilities/MethodSwizzler (~> 6.0)
|
||||
- GoogleUtilities/Network (~> 6.0)
|
||||
- "GoogleUtilities/NSData+zlib (~> 6.0)"
|
||||
- nanopb (= 0.3.9011)
|
||||
- FirebaseAnalyticsInterop (1.5.0)
|
||||
- FirebaseCore (6.6.7):
|
||||
- FirebaseCoreDiagnostics (~> 1.2)
|
||||
- FirebaseCoreDiagnosticsInterop (~> 1.2)
|
||||
- GoogleUtilities/Environment (~> 6.5)
|
||||
- GoogleUtilities/Logger (~> 6.5)
|
||||
- FirebaseCoreDiagnostics (1.2.4):
|
||||
- FirebaseCoreDiagnosticsInterop (~> 1.2)
|
||||
- GoogleDataTransportCCTSupport (~> 3.0)
|
||||
- GoogleUtilities/Environment (~> 6.5)
|
||||
- GoogleUtilities/Logger (~> 6.5)
|
||||
- nanopb (~> 0.3.901)
|
||||
- FirebaseCoreDiagnosticsInterop (1.2.0)
|
||||
- FirebaseInstallations (1.2.0):
|
||||
- FirebaseCore (~> 6.6)
|
||||
- GoogleUtilities/Environment (~> 6.6)
|
||||
- GoogleUtilities/UserDefaults (~> 6.6)
|
||||
- PromisesObjC (~> 1.2)
|
||||
- FirebaseInstanceID (4.3.4):
|
||||
- FirebaseCore (~> 6.6)
|
||||
- FirebaseInstallations (~> 1.0)
|
||||
- GoogleUtilities/Environment (~> 6.5)
|
||||
- GoogleUtilities/UserDefaults (~> 6.5)
|
||||
- FirebaseMessaging (4.3.1):
|
||||
- FirebaseAnalyticsInterop (~> 1.5)
|
||||
- FirebaseCore (~> 6.6)
|
||||
- FirebaseInstanceID (~> 4.3)
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 6.5)
|
||||
- GoogleUtilities/Environment (~> 6.5)
|
||||
- GoogleUtilities/Reachability (~> 6.5)
|
||||
- GoogleUtilities/UserDefaults (~> 6.5)
|
||||
- Protobuf (>= 3.9.2, ~> 3.9)
|
||||
- Flutter (1.0.0)
|
||||
- flutter_flexible_toast (0.0.1):
|
||||
- Flutter
|
||||
- flutter_inappwebview (0.0.1):
|
||||
- Flutter
|
||||
- flutter_local_notifications (0.0.1):
|
||||
- Flutter
|
||||
- flutter_plugin_android_lifecycle (0.0.1):
|
||||
- Flutter
|
||||
- GoogleAppMeasurement (6.4.2):
|
||||
- GoogleUtilities/AppDelegateSwizzler (~> 6.0)
|
||||
- GoogleUtilities/MethodSwizzler (~> 6.0)
|
||||
- GoogleUtilities/Network (~> 6.0)
|
||||
- "GoogleUtilities/NSData+zlib (~> 6.0)"
|
||||
- nanopb (= 0.3.9011)
|
||||
- GoogleDataTransport (6.0.0)
|
||||
- GoogleDataTransportCCTSupport (3.0.0):
|
||||
- GoogleDataTransport (~> 6.0)
|
||||
- nanopb (~> 0.3.901)
|
||||
- GoogleUtilities/AppDelegateSwizzler (6.6.0):
|
||||
- GoogleUtilities/Environment
|
||||
- GoogleUtilities/Logger
|
||||
- GoogleUtilities/Network
|
||||
- GoogleUtilities/Environment (6.6.0):
|
||||
- PromisesObjC (~> 1.2)
|
||||
- GoogleUtilities/Logger (6.6.0):
|
||||
- GoogleUtilities/Environment
|
||||
- GoogleUtilities/MethodSwizzler (6.6.0):
|
||||
- GoogleUtilities/Logger
|
||||
- GoogleUtilities/Network (6.6.0):
|
||||
- GoogleUtilities/Logger
|
||||
- "GoogleUtilities/NSData+zlib"
|
||||
- GoogleUtilities/Reachability
|
||||
- "GoogleUtilities/NSData+zlib (6.6.0)"
|
||||
- GoogleUtilities/Reachability (6.6.0):
|
||||
- GoogleUtilities/Logger
|
||||
- GoogleUtilities/UserDefaults (6.6.0):
|
||||
- GoogleUtilities/Logger
|
||||
- hexcolor (0.0.1):
|
||||
- Flutter
|
||||
- image_cropper (0.0.2):
|
||||
- Flutter
|
||||
- TOCropViewController (~> 2.5.2)
|
||||
- image_picker (0.0.1):
|
||||
- Flutter
|
||||
- local_auth (0.0.1):
|
||||
- Flutter
|
||||
- manage_calendar_events (0.0.1):
|
||||
- Flutter
|
||||
- map_launcher (0.0.1):
|
||||
- Flutter
|
||||
- MTBBarcodeScanner (5.0.11)
|
||||
- nanopb (0.3.9011):
|
||||
- nanopb/decode (= 0.3.9011)
|
||||
- nanopb/encode (= 0.3.9011)
|
||||
- nanopb/decode (0.3.9011)
|
||||
- nanopb/encode (0.3.9011)
|
||||
- path_provider_linux (0.0.1):
|
||||
- Flutter
|
||||
- "permission_handler (5.0.1+1)":
|
||||
- Flutter
|
||||
- PromisesObjC (1.2.8)
|
||||
- Protobuf (3.11.4)
|
||||
- Reachability (3.2)
|
||||
- shared_preferences (0.0.1):
|
||||
- Flutter
|
||||
- shared_preferences_linux (0.0.1):
|
||||
- Flutter
|
||||
- shared_preferences_macos (0.0.1):
|
||||
- Flutter
|
||||
- shared_preferences_web (0.0.1):
|
||||
- Flutter
|
||||
- SwiftProtobuf (1.10.2)
|
||||
- TOCropViewController (2.5.4)
|
||||
- url_launcher (0.0.1):
|
||||
- Flutter
|
||||
- url_launcher_linux (0.0.1):
|
||||
- Flutter
|
||||
- url_launcher_macos (0.0.1):
|
||||
- Flutter
|
||||
- url_launcher_web (0.0.1):
|
||||
- Flutter
|
||||
|
||||
DEPENDENCIES:
|
||||
- barcode_scan (from `.symlinks/plugins/barcode_scan/ios`)
|
||||
- connectivity (from `.symlinks/plugins/connectivity/ios`)
|
||||
- connectivity_for_web (from `.symlinks/plugins/connectivity_for_web/ios`)
|
||||
- connectivity_macos (from `.symlinks/plugins/connectivity_macos/ios`)
|
||||
- device_info (from `.symlinks/plugins/device_info/ios`)
|
||||
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
|
||||
- Flutter (from `Flutter`)
|
||||
- flutter_flexible_toast (from `.symlinks/plugins/flutter_flexible_toast/ios`)
|
||||
- flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`)
|
||||
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
|
||||
- flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`)
|
||||
- hexcolor (from `.symlinks/plugins/hexcolor/ios`)
|
||||
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
|
||||
- image_picker (from `.symlinks/plugins/image_picker/ios`)
|
||||
- local_auth (from `.symlinks/plugins/local_auth/ios`)
|
||||
- manage_calendar_events (from `.symlinks/plugins/manage_calendar_events/ios`)
|
||||
- map_launcher (from `.symlinks/plugins/map_launcher/ios`)
|
||||
- path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`)
|
||||
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
|
||||
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
|
||||
- shared_preferences_linux (from `.symlinks/plugins/shared_preferences_linux/ios`)
|
||||
- shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`)
|
||||
- shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`)
|
||||
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
|
||||
- url_launcher_linux (from `.symlinks/plugins/url_launcher_linux/ios`)
|
||||
- url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`)
|
||||
- url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`)
|
||||
|
||||
SPEC REPOS:
|
||||
trunk:
|
||||
- Firebase
|
||||
- FirebaseAnalytics
|
||||
- FirebaseAnalyticsInterop
|
||||
- FirebaseCore
|
||||
- FirebaseCoreDiagnostics
|
||||
- FirebaseCoreDiagnosticsInterop
|
||||
- FirebaseInstallations
|
||||
- FirebaseInstanceID
|
||||
- FirebaseMessaging
|
||||
- GoogleAppMeasurement
|
||||
- GoogleDataTransport
|
||||
- GoogleDataTransportCCTSupport
|
||||
- GoogleUtilities
|
||||
- MTBBarcodeScanner
|
||||
- nanopb
|
||||
- PromisesObjC
|
||||
- Protobuf
|
||||
- Reachability
|
||||
- SwiftProtobuf
|
||||
- TOCropViewController
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
barcode_scan:
|
||||
:path: ".symlinks/plugins/barcode_scan/ios"
|
||||
connectivity:
|
||||
:path: ".symlinks/plugins/connectivity/ios"
|
||||
connectivity_for_web:
|
||||
:path: ".symlinks/plugins/connectivity_for_web/ios"
|
||||
connectivity_macos:
|
||||
:path: ".symlinks/plugins/connectivity_macos/ios"
|
||||
device_info:
|
||||
:path: ".symlinks/plugins/device_info/ios"
|
||||
firebase_messaging:
|
||||
:path: ".symlinks/plugins/firebase_messaging/ios"
|
||||
Flutter:
|
||||
:path: Flutter
|
||||
flutter_flexible_toast:
|
||||
:path: ".symlinks/plugins/flutter_flexible_toast/ios"
|
||||
flutter_inappwebview:
|
||||
:path: ".symlinks/plugins/flutter_inappwebview/ios"
|
||||
flutter_local_notifications:
|
||||
:path: ".symlinks/plugins/flutter_local_notifications/ios"
|
||||
flutter_plugin_android_lifecycle:
|
||||
:path: ".symlinks/plugins/flutter_plugin_android_lifecycle/ios"
|
||||
hexcolor:
|
||||
:path: ".symlinks/plugins/hexcolor/ios"
|
||||
image_cropper:
|
||||
:path: ".symlinks/plugins/image_cropper/ios"
|
||||
image_picker:
|
||||
:path: ".symlinks/plugins/image_picker/ios"
|
||||
local_auth:
|
||||
:path: ".symlinks/plugins/local_auth/ios"
|
||||
manage_calendar_events:
|
||||
:path: ".symlinks/plugins/manage_calendar_events/ios"
|
||||
map_launcher:
|
||||
:path: ".symlinks/plugins/map_launcher/ios"
|
||||
path_provider_linux:
|
||||
:path: ".symlinks/plugins/path_provider_linux/ios"
|
||||
permission_handler:
|
||||
:path: ".symlinks/plugins/permission_handler/ios"
|
||||
shared_preferences:
|
||||
:path: ".symlinks/plugins/shared_preferences/ios"
|
||||
shared_preferences_linux:
|
||||
:path: ".symlinks/plugins/shared_preferences_linux/ios"
|
||||
shared_preferences_macos:
|
||||
:path: ".symlinks/plugins/shared_preferences_macos/ios"
|
||||
shared_preferences_web:
|
||||
:path: ".symlinks/plugins/shared_preferences_web/ios"
|
||||
url_launcher:
|
||||
:path: ".symlinks/plugins/url_launcher/ios"
|
||||
url_launcher_linux:
|
||||
:path: ".symlinks/plugins/url_launcher_linux/ios"
|
||||
url_launcher_macos:
|
||||
:path: ".symlinks/plugins/url_launcher_macos/ios"
|
||||
url_launcher_web:
|
||||
:path: ".symlinks/plugins/url_launcher_web/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
barcode_scan: a5c27959edfafaa0c771905bad0b29d6d39e4479
|
||||
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
|
||||
connectivity_for_web: 2b8584556930d4bd490d82b836bcf45067ce345b
|
||||
connectivity_macos: e2e9731b6b22dda39eb1b128f6969d574460e191
|
||||
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
|
||||
Firebase: 585ae467b3edda6a5444e788fda6888f024d8d6f
|
||||
firebase_messaging: 21344b3b3a7d9d325d63a70e3750c0c798fe1e03
|
||||
FirebaseAnalytics: 558f7a03d19de451093032c806f39d5f9dff096e
|
||||
FirebaseAnalyticsInterop: 3f86269c38ae41f47afeb43ebf32a001f58fcdae
|
||||
FirebaseCore: a2788a0d5f6c1dff17b8f79b4a73654a8d4bfdbd
|
||||
FirebaseCoreDiagnostics: b59c024493a409f8aecba02c99928d0d8431d159
|
||||
FirebaseCoreDiagnosticsInterop: 296e2c5f5314500a850ad0b83e9e7c10b011a850
|
||||
FirebaseInstallations: 2119fb3e46b0a88bfdbf12562f855ee3252462fa
|
||||
FirebaseInstanceID: cef67c4967c7cecb56ea65d8acbb4834825c587b
|
||||
FirebaseMessaging: 828e66eb357a893e3cebd9ee0f6bc1941447cc94
|
||||
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
|
||||
flutter_flexible_toast: 0547e740cae0c33bb7c51bcd931233f4584e1143
|
||||
flutter_inappwebview: 69dfbac46157b336ffbec19ca6dfd4638c7bf189
|
||||
flutter_local_notifications: 9e4738ce2471c5af910d961a6b7eadcf57c50186
|
||||
flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35
|
||||
GoogleAppMeasurement: 2253e99c1f22638cf234c059144660c338ad76c3
|
||||
GoogleDataTransport: 061fe7d9b476710e3cd8ea51e8e07d8b67c2b420
|
||||
GoogleDataTransportCCTSupport: 0f39025e8cf51f168711bd3fb773938d7e62ddb5
|
||||
GoogleUtilities: 39530bc0ad980530298e9c4af8549e991fd033b1
|
||||
hexcolor: fdfb9c4258ad96e949c2dbcdf790a62194b8aa89
|
||||
image_cropper: 3c16d7651730ffe85897f5a1c4e2547e6b54989a
|
||||
image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09
|
||||
local_auth: 25938960984c3a7f6e3253e3f8d962fdd16852bd
|
||||
manage_calendar_events: 0338d505ea26cdfd20cd883279bc28afa11eca34
|
||||
map_launcher: e325db1261d029ff33e08e03baccffe09593ffea
|
||||
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
|
||||
nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd
|
||||
path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4
|
||||
permission_handler: eac8e15b4a1a3fba55b761d19f3f4e6b005d15b6
|
||||
PromisesObjC: c119f3cd559f50b7ae681fa59dc1acd19173b7e6
|
||||
Protobuf: 176220c526ad8bd09ab1fb40a978eac3fef665f7
|
||||
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
|
||||
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
|
||||
shared_preferences_linux: afefbfe8d921e207f01ede8b60373d9e3b566b78
|
||||
shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087
|
||||
shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9
|
||||
SwiftProtobuf: bec1ae7d686ff73dd09d79866154f4970b891410
|
||||
TOCropViewController: 2a1ae1242600b1f2d996fd91a5268b2309a33b5c
|
||||
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
|
||||
url_launcher_linux: ac237cb7a8058736e4aae38bdbcc748a4b394cc0
|
||||
url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313
|
||||
url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c
|
||||
|
||||
PODFILE CHECKSUM: 2609452b760cd11039b14039a86564367a3d8ab9
|
||||
|
||||
COCOAPODS: 1.9.1
|
||||
@ -0,0 +1,32 @@
|
||||
/// Flutter icons DQIcons
|
||||
/// Copyright (C) 2020 by original authors @ fluttericon.com, fontello.com
|
||||
/// This font was generated by FlutterIcon.com, which is derived from Fontello.
|
||||
///
|
||||
/// To use this font, place it in your fonts/ directory and include the
|
||||
/// following in your pubspec.yaml
|
||||
///
|
||||
/// flutter:
|
||||
/// fonts:
|
||||
/// - family: DQIcons
|
||||
/// fonts:
|
||||
/// - asset: fonts/DQIcons.ttf
|
||||
///
|
||||
///
|
||||
///
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class DQIcons {
|
||||
DQIcons._();
|
||||
|
||||
static const _kFontFam = 'DQIcons';
|
||||
static const _kFontPkg = null;
|
||||
|
||||
static const IconData blood_pressure = IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData blood = IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData bmi = IconData(0xe802, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData heart = IconData(0xe803, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData height = IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData outline = IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData thermometer = IconData(0xe806, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
static const IconData weight_scale = IconData(0xe807, fontFamily: _kFontFam, fontPackage: _kFontPkg);
|
||||
}
|
||||
@ -0,0 +1,274 @@
|
||||
class AppoitmentAllHistoryResultList {
|
||||
String setupID;
|
||||
int projectID;
|
||||
int appointmentNo;
|
||||
String appointmentDate;
|
||||
dynamic appointmentDateN;
|
||||
int appointmentType;
|
||||
String bookDate;
|
||||
int patientType;
|
||||
int patientID;
|
||||
int clinicID;
|
||||
int doctorID;
|
||||
String endDate;
|
||||
String startTime;
|
||||
String endTime;
|
||||
int status;
|
||||
int visitType;
|
||||
int visitFor;
|
||||
int patientStatusType;
|
||||
int companyID;
|
||||
int bookedBy;
|
||||
String bookedOn;
|
||||
dynamic confirmedBy;
|
||||
dynamic confirmedOn;
|
||||
dynamic arrivalChangedBy;
|
||||
dynamic arrivedOn;
|
||||
dynamic editedBy;
|
||||
dynamic editedOn;
|
||||
dynamic doctorName;
|
||||
dynamic doctorNameN;
|
||||
String statusDesc;
|
||||
dynamic statusDescN;
|
||||
bool vitalStatus;
|
||||
dynamic vitalSignAppointmentNo;
|
||||
int episodeID;
|
||||
int actualDoctorRate;
|
||||
String clinicName;
|
||||
bool complainExists;
|
||||
String doctorImageURL;
|
||||
String doctorNameObj;
|
||||
int doctorRate;
|
||||
List<String> doctorSpeciality;
|
||||
String doctorTitle;
|
||||
int gender;
|
||||
String genderDescription;
|
||||
bool iSAllowOnlineCheckedIN;
|
||||
bool isActiveDoctor;
|
||||
bool isActiveDoctorProfile;
|
||||
bool isDoctorAllowVedioCall;
|
||||
bool isExecludeDoctor;
|
||||
int isFollowup;
|
||||
bool isLiveCareAppointment;
|
||||
bool isMedicalReportRequested;
|
||||
bool isOnlineCheckedIN;
|
||||
String latitude;
|
||||
dynamic listHISGetContactLensPerscription;
|
||||
dynamic listHISGetGlassPerscription;
|
||||
String longitude;
|
||||
int nextAction;
|
||||
int noOfPatientsRate;
|
||||
int originalClinicID;
|
||||
int originalProjectID;
|
||||
String projectName;
|
||||
String qR;
|
||||
int remaniningHoursTocanPay;
|
||||
bool sMSButtonVisable;
|
||||
|
||||
AppoitmentAllHistoryResultList(
|
||||
{this.setupID,
|
||||
this.projectID,
|
||||
this.appointmentNo,
|
||||
this.appointmentDate,
|
||||
this.appointmentDateN,
|
||||
this.appointmentType,
|
||||
this.bookDate,
|
||||
this.patientType,
|
||||
this.patientID,
|
||||
this.clinicID,
|
||||
this.doctorID,
|
||||
this.endDate,
|
||||
this.startTime,
|
||||
this.endTime,
|
||||
this.status,
|
||||
this.visitType,
|
||||
this.visitFor,
|
||||
this.patientStatusType,
|
||||
this.companyID,
|
||||
this.bookedBy,
|
||||
this.bookedOn,
|
||||
this.confirmedBy,
|
||||
this.confirmedOn,
|
||||
this.arrivalChangedBy,
|
||||
this.arrivedOn,
|
||||
this.editedBy,
|
||||
this.editedOn,
|
||||
this.doctorName,
|
||||
this.doctorNameN,
|
||||
this.statusDesc,
|
||||
this.statusDescN,
|
||||
this.vitalStatus,
|
||||
this.vitalSignAppointmentNo,
|
||||
this.episodeID,
|
||||
this.actualDoctorRate,
|
||||
this.clinicName,
|
||||
this.complainExists,
|
||||
this.doctorImageURL,
|
||||
this.doctorNameObj,
|
||||
this.doctorRate,
|
||||
this.doctorSpeciality,
|
||||
this.doctorTitle,
|
||||
this.gender,
|
||||
this.genderDescription,
|
||||
this.iSAllowOnlineCheckedIN,
|
||||
this.isActiveDoctor,
|
||||
this.isActiveDoctorProfile,
|
||||
this.isDoctorAllowVedioCall,
|
||||
this.isExecludeDoctor,
|
||||
this.isFollowup,
|
||||
this.isLiveCareAppointment,
|
||||
this.isMedicalReportRequested,
|
||||
this.isOnlineCheckedIN,
|
||||
this.latitude,
|
||||
this.listHISGetContactLensPerscription,
|
||||
this.listHISGetGlassPerscription,
|
||||
this.longitude,
|
||||
this.nextAction,
|
||||
this.noOfPatientsRate,
|
||||
this.originalClinicID,
|
||||
this.originalProjectID,
|
||||
this.projectName,
|
||||
this.qR,
|
||||
this.remaniningHoursTocanPay,
|
||||
this.sMSButtonVisable});
|
||||
|
||||
AppoitmentAllHistoryResultList.fromJson(Map<String, dynamic> json) {
|
||||
setupID = json['SetupID'];
|
||||
projectID = json['ProjectID'];
|
||||
appointmentNo = json['AppointmentNo'];
|
||||
appointmentDate = json['AppointmentDate'];
|
||||
appointmentDateN = json['AppointmentDateN'];
|
||||
appointmentType = json['AppointmentType'];
|
||||
bookDate = json['BookDate'];
|
||||
patientType = json['PatientType'];
|
||||
patientID = json['PatientID'];
|
||||
clinicID = json['ClinicID'];
|
||||
doctorID = json['DoctorID'];
|
||||
endDate = json['EndDate'];
|
||||
startTime = json['StartTime'];
|
||||
endTime = json['EndTime'];
|
||||
status = json['Status'];
|
||||
visitType = json['VisitType'];
|
||||
visitFor = json['VisitFor'];
|
||||
patientStatusType = json['PatientStatusType'];
|
||||
companyID = json['CompanyID'];
|
||||
bookedBy = json['BookedBy'];
|
||||
bookedOn = json['BookedOn'];
|
||||
confirmedBy = json['ConfirmedBy'];
|
||||
confirmedOn = json['ConfirmedOn'];
|
||||
arrivalChangedBy = json['ArrivalChangedBy'];
|
||||
arrivedOn = json['ArrivedOn'];
|
||||
editedBy = json['EditedBy'];
|
||||
editedOn = json['EditedOn'];
|
||||
doctorName = json['DoctorName'];
|
||||
doctorNameN = json['DoctorNameN'];
|
||||
statusDesc = json['StatusDesc'];
|
||||
statusDescN = json['StatusDescN'];
|
||||
vitalStatus = json['VitalStatus'];
|
||||
vitalSignAppointmentNo = json['VitalSignAppointmentNo'];
|
||||
episodeID = json['EpisodeID'];
|
||||
actualDoctorRate = json['ActualDoctorRate'];
|
||||
clinicName = json['ClinicName'];
|
||||
complainExists = json['ComplainExists'];
|
||||
doctorImageURL = json['DoctorImageURL'];
|
||||
doctorNameObj = json['DoctorNameObj'];
|
||||
doctorRate = json['DoctorRate'];
|
||||
doctorSpeciality = json['DoctorSpeciality'] != null ?json['DoctorSpeciality'].cast<String>() : ["null"];
|
||||
doctorTitle = json['DoctorTitle'];
|
||||
gender = json['Gender'];
|
||||
genderDescription = json['GenderDescription'];
|
||||
iSAllowOnlineCheckedIN = json['ISAllowOnlineCheckedIN'];
|
||||
isActiveDoctor = json['IsActiveDoctor'];
|
||||
isActiveDoctorProfile = json['IsActiveDoctorProfile'];
|
||||
isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
|
||||
isExecludeDoctor = json['IsExecludeDoctor'];
|
||||
isFollowup = json['IsFollowup'];
|
||||
isLiveCareAppointment = json['IsLiveCareAppointment'];
|
||||
isMedicalReportRequested = json['IsMedicalReportRequested'];
|
||||
isOnlineCheckedIN = json['IsOnlineCheckedIN'];
|
||||
latitude = json['Latitude'];
|
||||
listHISGetContactLensPerscription =
|
||||
json['List_HIS_GetContactLensPerscription'];
|
||||
listHISGetGlassPerscription = json['List_HIS_GetGlassPerscription'];
|
||||
longitude = json['Longitude'];
|
||||
nextAction = json['NextAction'];
|
||||
noOfPatientsRate = json['NoOfPatientsRate'];
|
||||
originalClinicID = json['OriginalClinicID'];
|
||||
originalProjectID = json['OriginalProjectID'];
|
||||
projectName = json['ProjectName'];
|
||||
qR = json['QR'];
|
||||
remaniningHoursTocanPay = json['RemaniningHoursTocanPay'];
|
||||
sMSButtonVisable = json['SMSButtonVisable'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['SetupID'] = this.setupID;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['AppointmentNo'] = this.appointmentNo;
|
||||
data['AppointmentDate'] = this.appointmentDate;
|
||||
data['AppointmentDateN'] = this.appointmentDateN;
|
||||
data['AppointmentType'] = this.appointmentType;
|
||||
data['BookDate'] = this.bookDate;
|
||||
data['PatientType'] = this.patientType;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['ClinicID'] = this.clinicID;
|
||||
data['DoctorID'] = this.doctorID;
|
||||
data['EndDate'] = this.endDate;
|
||||
data['StartTime'] = this.startTime;
|
||||
data['EndTime'] = this.endTime;
|
||||
data['Status'] = this.status;
|
||||
data['VisitType'] = this.visitType;
|
||||
data['VisitFor'] = this.visitFor;
|
||||
data['PatientStatusType'] = this.patientStatusType;
|
||||
data['CompanyID'] = this.companyID;
|
||||
data['BookedBy'] = this.bookedBy;
|
||||
data['BookedOn'] = this.bookedOn;
|
||||
data['ConfirmedBy'] = this.confirmedBy;
|
||||
data['ConfirmedOn'] = this.confirmedOn;
|
||||
data['ArrivalChangedBy'] = this.arrivalChangedBy;
|
||||
data['ArrivedOn'] = this.arrivedOn;
|
||||
data['EditedBy'] = this.editedBy;
|
||||
data['EditedOn'] = this.editedOn;
|
||||
data['DoctorName'] = this.doctorName;
|
||||
data['DoctorNameN'] = this.doctorNameN;
|
||||
data['StatusDesc'] = this.statusDesc;
|
||||
data['StatusDescN'] = this.statusDescN;
|
||||
data['VitalStatus'] = this.vitalStatus;
|
||||
data['VitalSignAppointmentNo'] = this.vitalSignAppointmentNo;
|
||||
data['EpisodeID'] = this.episodeID;
|
||||
data['ActualDoctorRate'] = this.actualDoctorRate;
|
||||
data['ClinicName'] = this.clinicName;
|
||||
data['ComplainExists'] = this.complainExists;
|
||||
data['DoctorImageURL'] = this.doctorImageURL;
|
||||
data['DoctorNameObj'] = this.doctorNameObj;
|
||||
data['DoctorRate'] = this.doctorRate;
|
||||
data['DoctorSpeciality'] = this.doctorSpeciality;
|
||||
data['DoctorTitle'] = this.doctorTitle;
|
||||
data['Gender'] = this.gender;
|
||||
data['GenderDescription'] = this.genderDescription;
|
||||
data['ISAllowOnlineCheckedIN'] = this.iSAllowOnlineCheckedIN;
|
||||
data['IsActiveDoctor'] = this.isActiveDoctor;
|
||||
data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
|
||||
data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
|
||||
data['IsExecludeDoctor'] = this.isExecludeDoctor;
|
||||
data['IsFollowup'] = this.isFollowup;
|
||||
data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
|
||||
data['IsMedicalReportRequested'] = this.isMedicalReportRequested;
|
||||
data['IsOnlineCheckedIN'] = this.isOnlineCheckedIN;
|
||||
data['Latitude'] = this.latitude;
|
||||
data['List_HIS_GetContactLensPerscription'] =
|
||||
this.listHISGetContactLensPerscription;
|
||||
data['List_HIS_GetGlassPerscription'] = this.listHISGetGlassPerscription;
|
||||
data['Longitude'] = this.longitude;
|
||||
data['NextAction'] = this.nextAction;
|
||||
data['NoOfPatientsRate'] = this.noOfPatientsRate;
|
||||
data['OriginalClinicID'] = this.originalClinicID;
|
||||
data['OriginalProjectID'] = this.originalProjectID;
|
||||
data['ProjectName'] = this.projectName;
|
||||
data['QR'] = this.qR;
|
||||
data['RemaniningHoursTocanPay'] = this.remaniningHoursTocanPay;
|
||||
data['SMSButtonVisable'] = this.sMSButtonVisable;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,168 @@
|
||||
class DoctorList {
|
||||
int clinicID;
|
||||
String clinicName;
|
||||
String doctorTitle;
|
||||
int iD;
|
||||
String name;
|
||||
int projectID;
|
||||
String projectName;
|
||||
int actualDoctorRate;
|
||||
int clinicRoomNo;
|
||||
dynamic date;
|
||||
dynamic dayName;
|
||||
int doctorID;
|
||||
String doctorImageURL;
|
||||
dynamic doctorProfile;
|
||||
dynamic doctorProfileInfo;
|
||||
int doctorRate;
|
||||
int gender;
|
||||
String genderDescription;
|
||||
bool isAppointmentAllowed;
|
||||
bool isDoctorAllowVedioCall;
|
||||
bool isDoctorDummy;
|
||||
bool isLiveCare;
|
||||
String latitude;
|
||||
String longitude;
|
||||
String nationalityFlagURL;
|
||||
String nationalityID;
|
||||
String nationalityName;
|
||||
dynamic nearestFreeSlot;
|
||||
int noOfPatientsRate;
|
||||
int originalClinicID;
|
||||
int personRate;
|
||||
int projectDistanceInKiloMeters;
|
||||
String qR;
|
||||
dynamic qRString;
|
||||
int rateNumber;
|
||||
dynamic serviceID;
|
||||
String setupID;
|
||||
List<String> speciality;
|
||||
dynamic workingHours;
|
||||
|
||||
DoctorList(
|
||||
{this.clinicID,
|
||||
this.clinicName,
|
||||
this.doctorTitle,
|
||||
this.iD,
|
||||
this.name,
|
||||
this.projectID,
|
||||
this.projectName,
|
||||
this.actualDoctorRate,
|
||||
this.clinicRoomNo,
|
||||
this.date,
|
||||
this.dayName,
|
||||
this.doctorID,
|
||||
this.doctorImageURL,
|
||||
this.doctorProfile,
|
||||
this.doctorProfileInfo,
|
||||
this.doctorRate,
|
||||
this.gender,
|
||||
this.genderDescription,
|
||||
this.isAppointmentAllowed,
|
||||
this.isDoctorAllowVedioCall,
|
||||
this.isDoctorDummy,
|
||||
this.isLiveCare,
|
||||
this.latitude,
|
||||
this.longitude,
|
||||
this.nationalityFlagURL,
|
||||
this.nationalityID,
|
||||
this.nationalityName,
|
||||
this.nearestFreeSlot,
|
||||
this.noOfPatientsRate,
|
||||
this.originalClinicID,
|
||||
this.personRate,
|
||||
this.projectDistanceInKiloMeters,
|
||||
this.qR,
|
||||
this.qRString,
|
||||
this.rateNumber,
|
||||
this.serviceID,
|
||||
this.setupID,
|
||||
this.speciality,
|
||||
this.workingHours});
|
||||
|
||||
DoctorList.fromJson(Map<String, dynamic> json) {
|
||||
clinicID = json['ClinicID'];
|
||||
clinicName = json['ClinicName'];
|
||||
doctorTitle = json['DoctorTitle'];
|
||||
iD = json['ID'];
|
||||
name = json['Name'];
|
||||
projectID = json['ProjectID'];
|
||||
projectName = json['ProjectName'];
|
||||
actualDoctorRate = json['ActualDoctorRate'];
|
||||
clinicRoomNo = json['ClinicRoomNo'];
|
||||
date = json['Date'];
|
||||
dayName = json['DayName'];
|
||||
doctorID = json['DoctorID'];
|
||||
doctorImageURL = json['DoctorImageURL'];
|
||||
doctorProfile = json['DoctorProfile'];
|
||||
doctorProfileInfo = json['DoctorProfileInfo'];
|
||||
doctorRate = json['DoctorRate'];
|
||||
gender = json['Gender'];
|
||||
genderDescription = json['GenderDescription'];
|
||||
isAppointmentAllowed = json['IsAppointmentAllowed'];
|
||||
isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
|
||||
isDoctorDummy = json['IsDoctorDummy'];
|
||||
isLiveCare = json['IsLiveCare'];
|
||||
latitude = json['Latitude'];
|
||||
longitude = json['Longitude'];
|
||||
nationalityFlagURL = json['NationalityFlagURL'];
|
||||
nationalityID = json['NationalityID'];
|
||||
nationalityName = json['NationalityName'];
|
||||
nearestFreeSlot = json['NearestFreeSlot'];
|
||||
noOfPatientsRate = json['NoOfPatientsRate'];
|
||||
originalClinicID = json['OriginalClinicID'];
|
||||
personRate = json['PersonRate'];
|
||||
projectDistanceInKiloMeters = json['ProjectDistanceInKiloMeters'];
|
||||
qR = json['QR'];
|
||||
qRString = json['QRString'];
|
||||
rateNumber = json['RateNumber'];
|
||||
serviceID = json['ServiceID'];
|
||||
setupID = json['SetupID'];
|
||||
speciality = json['Speciality'].cast<String>();
|
||||
workingHours = json['WorkingHours'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['ClinicID'] = this.clinicID;
|
||||
data['ClinicName'] = this.clinicName;
|
||||
data['DoctorTitle'] = this.doctorTitle;
|
||||
data['ID'] = this.iD;
|
||||
data['Name'] = this.name;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['ProjectName'] = this.projectName;
|
||||
data['ActualDoctorRate'] = this.actualDoctorRate;
|
||||
data['ClinicRoomNo'] = this.clinicRoomNo;
|
||||
data['Date'] = this.date;
|
||||
data['DayName'] = this.dayName;
|
||||
data['DoctorID'] = this.doctorID;
|
||||
data['DoctorImageURL'] = this.doctorImageURL;
|
||||
data['DoctorProfile'] = this.doctorProfile;
|
||||
data['DoctorProfileInfo'] = this.doctorProfileInfo;
|
||||
data['DoctorRate'] = this.doctorRate;
|
||||
data['Gender'] = this.gender;
|
||||
data['GenderDescription'] = this.genderDescription;
|
||||
data['IsAppointmentAllowed'] = this.isAppointmentAllowed;
|
||||
data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
|
||||
data['IsDoctorDummy'] = this.isDoctorDummy;
|
||||
data['IsLiveCare'] = this.isLiveCare;
|
||||
data['Latitude'] = this.latitude;
|
||||
data['Longitude'] = this.longitude;
|
||||
data['NationalityFlagURL'] = this.nationalityFlagURL;
|
||||
data['NationalityID'] = this.nationalityID;
|
||||
data['NationalityName'] = this.nationalityName;
|
||||
data['NearestFreeSlot'] = this.nearestFreeSlot;
|
||||
data['NoOfPatientsRate'] = this.noOfPatientsRate;
|
||||
data['OriginalClinicID'] = this.originalClinicID;
|
||||
data['PersonRate'] = this.personRate;
|
||||
data['ProjectDistanceInKiloMeters'] = this.projectDistanceInKiloMeters;
|
||||
data['QR'] = this.qR;
|
||||
data['QRString'] = this.qRString;
|
||||
data['RateNumber'] = this.rateNumber;
|
||||
data['ServiceID'] = this.serviceID;
|
||||
data['SetupID'] = this.setupID;
|
||||
data['Speciality'] = this.speciality;
|
||||
data['WorkingHours'] = this.workingHours;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,176 @@
|
||||
class DoctorProfileList {
|
||||
int doctorID;
|
||||
String doctorName;
|
||||
Null doctorNameN;
|
||||
int clinicID;
|
||||
String clinicDescription;
|
||||
Null clinicDescriptionN;
|
||||
Null licenseExpiry;
|
||||
int employmentType;
|
||||
Null setupID;
|
||||
int projectID;
|
||||
String projectName;
|
||||
String nationalityID;
|
||||
String nationalityName;
|
||||
Null nationalityNameN;
|
||||
int gender;
|
||||
String genderDescription;
|
||||
Null genderDescriptionN;
|
||||
Null doctorTitle;
|
||||
Null projectNameN;
|
||||
bool isAllowWaitList;
|
||||
String titleDescription;
|
||||
Null titleDescriptionN;
|
||||
Null isRegistered;
|
||||
Null isDoctorDummy;
|
||||
bool isActive;
|
||||
Null isDoctorAppointmentDisplayed;
|
||||
bool doctorClinicActive;
|
||||
Null isbookingAllowed;
|
||||
String doctorCases;
|
||||
Null doctorPicture;
|
||||
String doctorProfileInfo;
|
||||
List<String> specialty;
|
||||
int actualDoctorRate;
|
||||
String doctorImageURL;
|
||||
int doctorRate;
|
||||
String doctorTitleForProfile;
|
||||
bool isAppointmentAllowed;
|
||||
String nationalityFlagURL;
|
||||
int noOfPatientsRate;
|
||||
String qR;
|
||||
int serviceID;
|
||||
|
||||
DoctorProfileList(
|
||||
{this.doctorID,
|
||||
this.doctorName,
|
||||
this.doctorNameN,
|
||||
this.clinicID,
|
||||
this.clinicDescription,
|
||||
this.clinicDescriptionN,
|
||||
this.licenseExpiry,
|
||||
this.employmentType,
|
||||
this.setupID,
|
||||
this.projectID,
|
||||
this.projectName,
|
||||
this.nationalityID,
|
||||
this.nationalityName,
|
||||
this.nationalityNameN,
|
||||
this.gender,
|
||||
this.genderDescription,
|
||||
this.genderDescriptionN,
|
||||
this.doctorTitle,
|
||||
this.projectNameN,
|
||||
this.isAllowWaitList,
|
||||
this.titleDescription,
|
||||
this.titleDescriptionN,
|
||||
this.isRegistered,
|
||||
this.isDoctorDummy,
|
||||
this.isActive,
|
||||
this.isDoctorAppointmentDisplayed,
|
||||
this.doctorClinicActive,
|
||||
this.isbookingAllowed,
|
||||
this.doctorCases,
|
||||
this.doctorPicture,
|
||||
this.doctorProfileInfo,
|
||||
this.specialty,
|
||||
this.actualDoctorRate,
|
||||
this.doctorImageURL,
|
||||
this.doctorRate,
|
||||
this.doctorTitleForProfile,
|
||||
this.isAppointmentAllowed,
|
||||
this.nationalityFlagURL,
|
||||
this.noOfPatientsRate,
|
||||
this.qR,
|
||||
this.serviceID});
|
||||
|
||||
DoctorProfileList.fromJson(Map<String, dynamic> json) {
|
||||
doctorID = json['DoctorID'];
|
||||
doctorName = json['DoctorName'];
|
||||
doctorNameN = json['DoctorNameN'];
|
||||
clinicID = json['ClinicID'];
|
||||
clinicDescription = json['ClinicDescription'];
|
||||
clinicDescriptionN = json['ClinicDescriptionN'];
|
||||
licenseExpiry = json['LicenseExpiry'];
|
||||
employmentType = json['EmploymentType'];
|
||||
setupID = json['SetupID'];
|
||||
projectID = json['ProjectID'];
|
||||
projectName = json['ProjectName'];
|
||||
nationalityID = json['NationalityID'];
|
||||
nationalityName = json['NationalityName'];
|
||||
nationalityNameN = json['NationalityNameN'];
|
||||
gender = json['Gender'];
|
||||
genderDescription = json['Gender_Description'];
|
||||
genderDescriptionN = json['Gender_DescriptionN'];
|
||||
doctorTitle = json['DoctorTitle'];
|
||||
projectNameN = json['ProjectNameN'];
|
||||
isAllowWaitList = json['IsAllowWaitList'];
|
||||
titleDescription = json['Title_Description'];
|
||||
titleDescriptionN = json['Title_DescriptionN'];
|
||||
isRegistered = json['IsRegistered'];
|
||||
isDoctorDummy = json['IsDoctorDummy'];
|
||||
isActive = json['IsActive'];
|
||||
isDoctorAppointmentDisplayed = json['IsDoctorAppointmentDisplayed'];
|
||||
doctorClinicActive = json['DoctorClinicActive'];
|
||||
isbookingAllowed = json['IsbookingAllowed'];
|
||||
doctorCases = json['DoctorCases'];
|
||||
doctorPicture = json['DoctorPicture'];
|
||||
doctorProfileInfo = json['DoctorProfileInfo'];
|
||||
specialty = json['Specialty'].cast<String>();
|
||||
actualDoctorRate = json['ActualDoctorRate'];
|
||||
doctorImageURL = json['DoctorImageURL'];
|
||||
doctorRate = json['DoctorRate'];
|
||||
doctorTitleForProfile = json['DoctorTitleForProfile'];
|
||||
isAppointmentAllowed = json['IsAppointmentAllowed'];
|
||||
nationalityFlagURL = json['NationalityFlagURL'];
|
||||
noOfPatientsRate = json['NoOfPatientsRate'];
|
||||
qR = json['QR'];
|
||||
serviceID = json['ServiceID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['DoctorID'] = this.doctorID;
|
||||
data['DoctorName'] = this.doctorName;
|
||||
data['DoctorNameN'] = this.doctorNameN;
|
||||
data['ClinicID'] = this.clinicID;
|
||||
data['ClinicDescription'] = this.clinicDescription;
|
||||
data['ClinicDescriptionN'] = this.clinicDescriptionN;
|
||||
data['LicenseExpiry'] = this.licenseExpiry;
|
||||
data['EmploymentType'] = this.employmentType;
|
||||
data['SetupID'] = this.setupID;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['ProjectName'] = this.projectName;
|
||||
data['NationalityID'] = this.nationalityID;
|
||||
data['NationalityName'] = this.nationalityName;
|
||||
data['NationalityNameN'] = this.nationalityNameN;
|
||||
data['Gender'] = this.gender;
|
||||
data['Gender_Description'] = this.genderDescription;
|
||||
data['Gender_DescriptionN'] = this.genderDescriptionN;
|
||||
data['DoctorTitle'] = this.doctorTitle;
|
||||
data['ProjectNameN'] = this.projectNameN;
|
||||
data['IsAllowWaitList'] = this.isAllowWaitList;
|
||||
data['Title_Description'] = this.titleDescription;
|
||||
data['Title_DescriptionN'] = this.titleDescriptionN;
|
||||
data['IsRegistered'] = this.isRegistered;
|
||||
data['IsDoctorDummy'] = this.isDoctorDummy;
|
||||
data['IsActive'] = this.isActive;
|
||||
data['IsDoctorAppointmentDisplayed'] = this.isDoctorAppointmentDisplayed;
|
||||
data['DoctorClinicActive'] = this.doctorClinicActive;
|
||||
data['IsbookingAllowed'] = this.isbookingAllowed;
|
||||
data['DoctorCases'] = this.doctorCases;
|
||||
data['DoctorPicture'] = this.doctorPicture;
|
||||
data['DoctorProfileInfo'] = this.doctorProfileInfo;
|
||||
data['Specialty'] = this.specialty;
|
||||
data['ActualDoctorRate'] = this.actualDoctorRate;
|
||||
data['DoctorImageURL'] = this.doctorImageURL;
|
||||
data['DoctorRate'] = this.doctorRate;
|
||||
data['DoctorTitleForProfile'] = this.doctorTitleForProfile;
|
||||
data['IsAppointmentAllowed'] = this.isAppointmentAllowed;
|
||||
data['NationalityFlagURL'] = this.nationalityFlagURL;
|
||||
data['NoOfPatientsRate'] = this.noOfPatientsRate;
|
||||
data['QR'] = this.qR;
|
||||
data['ServiceID'] = this.serviceID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
import 'package:diplomaticquarterapp/models/Request.dart';
|
||||
|
||||
class InsertAppointmentRequest extends Request {
|
||||
String AppointmentDate; // ???? "/Date(1577750400000)/"
|
||||
int DoctorID;
|
||||
int InitialSlotDuration;
|
||||
String SelectedTime;
|
||||
String StartTime;
|
||||
String EndTime;
|
||||
String TempValue;
|
||||
int VisitFor;
|
||||
int VisitType;
|
||||
bool IsVirtual;
|
||||
List<String> GeneralProcedureList;
|
||||
String DeviceToken;
|
||||
String DeviceType;
|
||||
bool IsForLiveCare;
|
||||
String OriginalClinicID;
|
||||
String OriginalProjectID;
|
||||
|
||||
}
|
||||
@ -0,0 +1,204 @@
|
||||
class PatientShareResponse {
|
||||
int advanceNumber;
|
||||
String appointmentDate;
|
||||
int appointmentNo;
|
||||
int cashPrice;
|
||||
int cashPriceTax;
|
||||
int cashPriceWithTax;
|
||||
int clinicID;
|
||||
String clinicName;
|
||||
int companyId;
|
||||
String companyName;
|
||||
int companyShareWithTax;
|
||||
String doctorImageURL;
|
||||
String doctorNameObj;
|
||||
List<String> doctorSpeciality;
|
||||
Null errCode;
|
||||
int groupID;
|
||||
bool iSAllowOnlineCheckedIN;
|
||||
Null insurancePolicyNo;
|
||||
bool isExcludedForOnlineCheckin;
|
||||
int isFollowup;
|
||||
bool isLiveCareAppointment;
|
||||
bool isOnlineCheckedIN;
|
||||
String message;
|
||||
int nextAction;
|
||||
Null patientCardID;
|
||||
int patientID;
|
||||
dynamic patientShare;
|
||||
dynamic patientShareWithTax;
|
||||
int patientStatusType;
|
||||
dynamic patientTaxAmount;
|
||||
String patientType;
|
||||
int paymentAmount;
|
||||
String paymentDate;
|
||||
Null paymentMethodName;
|
||||
Null paymentReferenceNumber;
|
||||
int policyId;
|
||||
String policyName;
|
||||
String procedureName;
|
||||
int projectID;
|
||||
String projectName;
|
||||
Null setupID;
|
||||
int sourceType;
|
||||
String startTime;
|
||||
int status;
|
||||
int statusCode;
|
||||
Null statusDesc;
|
||||
Null subPolicyNo;
|
||||
int userID;
|
||||
|
||||
PatientShareResponse(
|
||||
{this.advanceNumber,
|
||||
this.appointmentDate,
|
||||
this.appointmentNo,
|
||||
this.cashPrice,
|
||||
this.cashPriceTax,
|
||||
this.cashPriceWithTax,
|
||||
this.clinicID,
|
||||
this.clinicName,
|
||||
this.companyId,
|
||||
this.companyName,
|
||||
this.companyShareWithTax,
|
||||
this.doctorImageURL,
|
||||
this.doctorNameObj,
|
||||
this.doctorSpeciality,
|
||||
this.errCode,
|
||||
this.groupID,
|
||||
this.iSAllowOnlineCheckedIN,
|
||||
this.insurancePolicyNo,
|
||||
this.isExcludedForOnlineCheckin,
|
||||
this.isFollowup,
|
||||
this.isLiveCareAppointment,
|
||||
this.isOnlineCheckedIN,
|
||||
this.message,
|
||||
this.nextAction,
|
||||
this.patientCardID,
|
||||
this.patientID,
|
||||
this.patientShare,
|
||||
this.patientShareWithTax,
|
||||
this.patientStatusType,
|
||||
this.patientTaxAmount,
|
||||
this.patientType,
|
||||
this.paymentAmount,
|
||||
this.paymentDate,
|
||||
this.paymentMethodName,
|
||||
this.paymentReferenceNumber,
|
||||
this.policyId,
|
||||
this.policyName,
|
||||
this.procedureName,
|
||||
this.projectID,
|
||||
this.projectName,
|
||||
this.setupID,
|
||||
this.sourceType,
|
||||
this.startTime,
|
||||
this.status,
|
||||
this.statusCode,
|
||||
this.statusDesc,
|
||||
this.subPolicyNo,
|
||||
this.userID});
|
||||
|
||||
PatientShareResponse.fromJson(Map<String, dynamic> json) {
|
||||
advanceNumber = json['AdvanceNumber'];
|
||||
appointmentDate = json['AppointmentDate'];
|
||||
appointmentNo = json['AppointmentNo'];
|
||||
cashPrice = json['CashPrice'];
|
||||
cashPriceTax = json['CashPriceTax'];
|
||||
cashPriceWithTax = json['CashPriceWithTax'];
|
||||
clinicID = json['ClinicID'];
|
||||
clinicName = json['ClinicName'];
|
||||
companyId = json['CompanyId'];
|
||||
companyName = json['CompanyName'];
|
||||
companyShareWithTax = json['CompanyShareWithTax'];
|
||||
doctorImageURL = json['DoctorImageURL'];
|
||||
doctorNameObj = json['DoctorNameObj'];
|
||||
doctorSpeciality = json['DoctorSpeciality'].cast<String>();
|
||||
errCode = json['ErrCode'];
|
||||
groupID = json['GroupID'];
|
||||
iSAllowOnlineCheckedIN = json['ISAllowOnlineCheckedIN'];
|
||||
insurancePolicyNo = json['InsurancePolicyNo'];
|
||||
isExcludedForOnlineCheckin = json['IsExcludedForOnlineCheckin'];
|
||||
isFollowup = json['IsFollowup'];
|
||||
isLiveCareAppointment = json['IsLiveCareAppointment'];
|
||||
isOnlineCheckedIN = json['IsOnlineCheckedIN'];
|
||||
message = json['Message'];
|
||||
nextAction = json['NextAction'];
|
||||
patientCardID = json['PatientCardID'];
|
||||
patientID = json['PatientID'];
|
||||
patientShare = json['PatientShare'];
|
||||
patientShareWithTax = json['PatientShareWithTax'];
|
||||
patientStatusType = json['PatientStatusType'];
|
||||
patientTaxAmount = json['PatientTaxAmount'];
|
||||
patientType = json['PatientType'];
|
||||
paymentAmount = json['PaymentAmount'];
|
||||
paymentDate = json['PaymentDate'];
|
||||
paymentMethodName = json['PaymentMethodName'];
|
||||
paymentReferenceNumber = json['PaymentReferenceNumber'];
|
||||
policyId = json['PolicyId'];
|
||||
policyName = json['PolicyName'];
|
||||
procedureName = json['ProcedureName'];
|
||||
projectID = json['ProjectID'];
|
||||
projectName = json['ProjectName'];
|
||||
setupID = json['SetupID'];
|
||||
sourceType = json['SourceType'];
|
||||
startTime = json['StartTime'];
|
||||
status = json['Status'];
|
||||
statusCode = json['StatusCode'];
|
||||
statusDesc = json['StatusDesc'];
|
||||
subPolicyNo = json['SubPolicyNo'];
|
||||
userID = json['UserID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['AdvanceNumber'] = this.advanceNumber;
|
||||
data['AppointmentDate'] = this.appointmentDate;
|
||||
data['AppointmentNo'] = this.appointmentNo;
|
||||
data['CashPrice'] = this.cashPrice;
|
||||
data['CashPriceTax'] = this.cashPriceTax;
|
||||
data['CashPriceWithTax'] = this.cashPriceWithTax;
|
||||
data['ClinicID'] = this.clinicID;
|
||||
data['ClinicName'] = this.clinicName;
|
||||
data['CompanyId'] = this.companyId;
|
||||
data['CompanyName'] = this.companyName;
|
||||
data['CompanyShareWithTax'] = this.companyShareWithTax;
|
||||
data['DoctorImageURL'] = this.doctorImageURL;
|
||||
data['DoctorNameObj'] = this.doctorNameObj;
|
||||
data['DoctorSpeciality'] = this.doctorSpeciality;
|
||||
data['ErrCode'] = this.errCode;
|
||||
data['GroupID'] = this.groupID;
|
||||
data['ISAllowOnlineCheckedIN'] = this.iSAllowOnlineCheckedIN;
|
||||
data['InsurancePolicyNo'] = this.insurancePolicyNo;
|
||||
data['IsExcludedForOnlineCheckin'] = this.isExcludedForOnlineCheckin;
|
||||
data['IsFollowup'] = this.isFollowup;
|
||||
data['IsLiveCareAppointment'] = this.isLiveCareAppointment;
|
||||
data['IsOnlineCheckedIN'] = this.isOnlineCheckedIN;
|
||||
data['Message'] = this.message;
|
||||
data['NextAction'] = this.nextAction;
|
||||
data['PatientCardID'] = this.patientCardID;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['PatientShare'] = this.patientShare;
|
||||
data['PatientShareWithTax'] = this.patientShareWithTax;
|
||||
data['PatientStatusType'] = this.patientStatusType;
|
||||
data['PatientTaxAmount'] = this.patientTaxAmount;
|
||||
data['PatientType'] = this.patientType;
|
||||
data['PaymentAmount'] = this.paymentAmount;
|
||||
data['PaymentDate'] = this.paymentDate;
|
||||
data['PaymentMethodName'] = this.paymentMethodName;
|
||||
data['PaymentReferenceNumber'] = this.paymentReferenceNumber;
|
||||
data['PolicyId'] = this.policyId;
|
||||
data['PolicyName'] = this.policyName;
|
||||
data['ProcedureName'] = this.procedureName;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['ProjectName'] = this.projectName;
|
||||
data['SetupID'] = this.setupID;
|
||||
data['SourceType'] = this.sourceType;
|
||||
data['StartTime'] = this.startTime;
|
||||
data['Status'] = this.status;
|
||||
data['StatusCode'] = this.statusCode;
|
||||
data['StatusDesc'] = this.statusDesc;
|
||||
data['SubPolicyNo'] = this.subPolicyNo;
|
||||
data['UserID'] = this.userID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
class TimeSlot {
|
||||
String isoTime;
|
||||
DateTime start;
|
||||
DateTime end;
|
||||
|
||||
TimeSlot({@required this.isoTime, @required this.start, @required this.end});
|
||||
|
||||
}
|
||||
@ -0,0 +1,297 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
|
||||
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
|
||||
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
|
||||
import 'package:diplomaticquarterapp/routes.dart';
|
||||
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class QRCode extends StatefulWidget {
|
||||
PatientShareResponse patientShareResponse;
|
||||
String appoQR;
|
||||
AuthenticatedUser authUser;
|
||||
AppSharedPreferences sharedPref = AppSharedPreferences();
|
||||
|
||||
QRCode({@required this.patientShareResponse, @required this.appoQR});
|
||||
|
||||
@override
|
||||
_QRCodeState createState() => _QRCodeState();
|
||||
}
|
||||
|
||||
class _QRCodeState extends State<QRCode> {
|
||||
Uint8List _bytes;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
_bytes = base64.decode(widget.appoQR.split(',').last);
|
||||
widget.authUser = new AuthenticatedUser();
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
appBarTitle: TranslationBase.of(context).attendRegisterCode,
|
||||
isShowAppBar: true,
|
||||
body: SingleChildScrollView(
|
||||
child: Container(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 30.0),
|
||||
alignment: Alignment.center,
|
||||
child: Image.memory(_bytes, scale: 0.5),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 20.0, left: 20.0, right: 20.0),
|
||||
child: Divider(
|
||||
color: Colors.red[700],
|
||||
thickness: 0.8,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Container(
|
||||
margin:
|
||||
EdgeInsets.only(top: 10.0, left: 40.0, bottom: 10.0),
|
||||
child: Image.asset(
|
||||
"assets/images/new-design/device_icon.png",
|
||||
width: 120.0,
|
||||
height: 120.0),
|
||||
),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.5,
|
||||
margin: EdgeInsets.only(
|
||||
top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
|
||||
child: Text(TranslationBase.of(context).scanQRHospital,
|
||||
style: TextStyle(
|
||||
color: Colors.red[700],
|
||||
fontSize: 20.0,
|
||||
fontWeight: FontWeight.bold)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0),
|
||||
child: Divider(
|
||||
color: Colors.red[700],
|
||||
thickness: 0.8,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
|
||||
child: Text(TranslationBase.of(context).appoInfo,
|
||||
style: TextStyle(
|
||||
fontSize: 18.0,
|
||||
color: Colors.grey[700],
|
||||
fontWeight: FontWeight.bold)),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 20.0, bottom: 20.0),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
color: Colors.grey[200],
|
||||
boxShadow: [
|
||||
BoxShadow(color: Colors.grey, spreadRadius: 2),
|
||||
],
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
|
||||
child: Text(widget.patientShareResponse.doctorNameObj,
|
||||
style: TextStyle(
|
||||
fontSize: 18.0,
|
||||
color: Colors.grey[700],
|
||||
fontWeight: FontWeight.bold)),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
bottom: 10.0, left: 20.0, right: 20.0),
|
||||
child: Text(
|
||||
getDoctorSpeciality(
|
||||
widget.patientShareResponse.doctorSpeciality),
|
||||
style: TextStyle(
|
||||
fontSize: 18.0, color: Colors.grey[700])),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 0.0, bottom: 10.0, left: 20.0, right: 20.0),
|
||||
child: Text(widget.patientShareResponse.projectName,
|
||||
style: TextStyle(
|
||||
fontSize: 18.0, color: Colors.grey[700])),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 0.0, bottom: 10.0, left: 20.0, right: 20.0),
|
||||
child: Text(
|
||||
getDate(widget.patientShareResponse.appointmentDate),
|
||||
style: TextStyle(
|
||||
fontSize: 18.0, color: Colors.grey[700])),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
ButtonTheme(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),
|
||||
minWidth: MediaQuery.of(context).size.width * 0.7,
|
||||
height: 45.0,
|
||||
child: RaisedButton(
|
||||
color: new Color(0xFF60686b),
|
||||
textColor: Colors.white,
|
||||
disabledTextColor: Colors.white,
|
||||
disabledColor: new Color(0xFFbcc2c4),
|
||||
onPressed: () {
|
||||
// navigateToQR(context);
|
||||
// getAppoQR(context);
|
||||
sendEmail();
|
||||
},
|
||||
child: Text(
|
||||
TranslationBase.of(context).sendEmail.toUpperCase(),
|
||||
style: TextStyle(fontSize: 18.0)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.bottomCenter,
|
||||
height: MediaQuery.of(context).size.height * 0.1,
|
||||
margin: EdgeInsets.only(bottom: 20.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
ButtonTheme(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),
|
||||
minWidth: MediaQuery.of(context).size.width * 0.7,
|
||||
height: 45.0,
|
||||
child: RaisedButton(
|
||||
color: new Color(0xFF60686b),
|
||||
textColor: Colors.white,
|
||||
disabledTextColor: Colors.white,
|
||||
disabledColor: new Color(0xFFbcc2c4),
|
||||
onPressed: () {
|
||||
navigateToHome(context);
|
||||
},
|
||||
child: Text(
|
||||
TranslationBase.of(context).close.toUpperCase(),
|
||||
style: TextStyle(fontSize: 18.0)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
sendEmail() async {
|
||||
DoctorsListService service = new DoctorsListService();
|
||||
|
||||
if (await widget.sharedPref.getObject(USER_PROFILE) != null) {
|
||||
var data = AuthenticatedUser.fromJson(
|
||||
await widget.sharedPref.getObject(USER_PROFILE));
|
||||
setState(() {
|
||||
widget.authUser = data;
|
||||
});
|
||||
}
|
||||
|
||||
ConfirmDialog dialog = new ConfirmDialog(
|
||||
context: context,
|
||||
confirmMessage: "Send a copy of this QR to the email " +
|
||||
widget.authUser.emailAddress +
|
||||
"?",
|
||||
okText: TranslationBase.of(context).confirm,
|
||||
cancelText: TranslationBase.of(context).cancel_nocaps,
|
||||
okFunction: () {
|
||||
service
|
||||
.sendAppointmentQREmail(
|
||||
widget.authUser.emailAddress,
|
||||
widget.patientShareResponse.appointmentDate,
|
||||
widget.patientShareResponse.appointmentNo.toString(),
|
||||
widget.patientShareResponse.doctorNameObj,
|
||||
widget.patientShareResponse.projectName,
|
||||
widget.appoQR,
|
||||
getDoctorSpeciality(
|
||||
widget.patientShareResponse.doctorSpeciality),
|
||||
context)
|
||||
.then((res) {
|
||||
print(res);
|
||||
ConfirmDialog.closeAlertDialog(context);
|
||||
}).catchError((err) {
|
||||
ConfirmDialog.closeAlertDialog(context);
|
||||
AppToast.showErrorToast(message: err);
|
||||
print(err);
|
||||
});
|
||||
},
|
||||
cancelFunction: () => {});
|
||||
dialog.showAlertDialog(context);
|
||||
}
|
||||
|
||||
Future navigateToHome(context) async {
|
||||
Navigator.of(context).pushNamed(HOME);
|
||||
}
|
||||
|
||||
getPatientShare(context, String appointmentNo, int clinicID, int projectID,
|
||||
DoctorList docObject) {}
|
||||
|
||||
String getDate(String appoDate) {
|
||||
var appoDateFormatted = "";
|
||||
|
||||
var dateObj = DateUtil.convertStringToDate(appoDate);
|
||||
|
||||
setState(() {
|
||||
appoDateFormatted = DateUtil.getWeekDay(dateObj.weekday) +
|
||||
", " +
|
||||
dateObj.day.toString() +
|
||||
" " +
|
||||
DateUtil.getMonth(dateObj.month) +
|
||||
" " +
|
||||
dateObj.year.toString() +
|
||||
", " +
|
||||
dateObj.hour.toString() +
|
||||
":" +
|
||||
dateObj.minute.toString() +
|
||||
":00";
|
||||
});
|
||||
|
||||
return appoDateFormatted;
|
||||
}
|
||||
|
||||
String getDoctorSpeciality(List<String> docSpecial) {
|
||||
String docSpeciality = "";
|
||||
docSpecial.forEach((v) {
|
||||
docSpeciality = docSpeciality + v + "\n";
|
||||
});
|
||||
return docSpeciality;
|
||||
}
|
||||
}
|
||||
@ -1,272 +0,0 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart';
|
||||
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentModel.dart';
|
||||
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
|
||||
import 'package:diplomaticquarterapp/pages/MyAppointments/models/BookedButtons.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AppointmentActions extends StatefulWidget {
|
||||
@override
|
||||
_AppointmentActionsState createState() => _AppointmentActionsState();
|
||||
}
|
||||
|
||||
class _AppointmentActionsState extends State<AppointmentActions> {
|
||||
List<AppoDetailsButton> appoButtonsList = [];
|
||||
var appointment = new AppointmentModel();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
appointment.PatientStatusType = 0;
|
||||
appointment.IsOnlineCheckedIN = true;
|
||||
|
||||
_getAppointmentActionButtons();
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var size = MediaQuery.of(context).size;
|
||||
final double itemHeight = ((size.height - kToolbarHeight - 24) * 0.42) / 2;
|
||||
final double itemWidth = size.width / 2;
|
||||
|
||||
return Container(
|
||||
margin: EdgeInsets.all(5.0),
|
||||
child: CustomScrollView(
|
||||
primary: false,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
slivers: <Widget>[
|
||||
SliverPadding(
|
||||
padding: const EdgeInsets.fromLTRB(15, 0, 15, 0),
|
||||
sliver: SliverGrid.count(
|
||||
crossAxisCount: 2,
|
||||
childAspectRatio: (itemWidth / itemHeight),
|
||||
children: appoButtonsList
|
||||
.map((e) => GestureDetector(
|
||||
onTap: () {
|
||||
_handleButtonClicks(e);
|
||||
},
|
||||
child: Container(
|
||||
height: 100.0,
|
||||
margin: EdgeInsets.all(9.0),
|
||||
decoration: BoxDecoration(
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey[400],
|
||||
blurRadius: 2.0,
|
||||
spreadRadius: 0.0)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
color: Colors.white),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
margin:
|
||||
EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
|
||||
child: Text(e.title,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
color: new Color(0xFFc5272d),
|
||||
letterSpacing: 1.0,
|
||||
fontSize: 20.0)),
|
||||
),
|
||||
Container(
|
||||
margin:
|
||||
EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0),
|
||||
child: Text(e.subtitle,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
letterSpacing: 1.0,
|
||||
fontSize: 15.0)),
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.bottomRight,
|
||||
margin:
|
||||
EdgeInsets.fromLTRB(0.0, 20.0, 10.0, 8.0),
|
||||
child: Image.asset(e.icon,
|
||||
width: 40.0, height: 40.0),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
))
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
_handleButtonClicks(AppoDetailsButton) {
|
||||
print(AppoDetailsButton.caller);
|
||||
}
|
||||
|
||||
_getAppointmentActionButtons() {
|
||||
if (appointment != null) {
|
||||
if (isConfirmed()) {
|
||||
if (appointment.IsOnlineCheckedIN) {
|
||||
_getConfirmedCheckInAppoActionsList();
|
||||
} else {
|
||||
_getConfirmedAppoActionsList();
|
||||
}
|
||||
} else {
|
||||
print("isConfirmed Null");
|
||||
}
|
||||
if (isBooked()) {
|
||||
if (appointment.IsOnlineCheckedIN) {
|
||||
_getBookedCheckInAppoActionsList();
|
||||
} else {
|
||||
_getBookedAppoActionsList();
|
||||
}
|
||||
} else {
|
||||
print("isBooked Null");
|
||||
}
|
||||
if (isArrived()) {
|
||||
if (appointment.ClinicID == 17) {
|
||||
_getArrivedInvoiceAppoActionsList();
|
||||
} else {
|
||||
_getArrivedAppoActionsList();
|
||||
}
|
||||
} else {
|
||||
print("isArrived Null");
|
||||
}
|
||||
} else {
|
||||
print("Appo Null");
|
||||
}
|
||||
}
|
||||
|
||||
bool isConfirmed() {
|
||||
return AppointmentType.isConfirmed(this.appointment);
|
||||
}
|
||||
|
||||
bool isArrived() {
|
||||
return AppointmentType.isArrived(this.appointment);
|
||||
}
|
||||
|
||||
bool isCheckedIn() {
|
||||
return this.appointment.IsOnlineCheckedIN;
|
||||
}
|
||||
|
||||
bool isBooked() {
|
||||
return AppointmentType.isBooked(this.appointment);
|
||||
}
|
||||
|
||||
Future<List<AppoDetailsButton>> _getBookedAppoActionsList() async {
|
||||
print("_getBookedAppoActionsList");
|
||||
var bookButtonsJson;
|
||||
List<AppoDetailsButton> buttonsList = [];
|
||||
String data = await DefaultAssetBundle.of(context)
|
||||
.loadString("assets/json/bookedButtons.json");
|
||||
bookButtonsJson = json.decode(data);
|
||||
for (var i = 0; i < bookButtonsJson.length; i++) {
|
||||
buttonsList.add(AppoDetailsButton(
|
||||
title: bookButtonsJson[i]['title'],
|
||||
subtitle: bookButtonsJson[i]['subtitle'],
|
||||
icon: bookButtonsJson[i]['icon'],
|
||||
caller: bookButtonsJson[i]['caller'],
|
||||
));
|
||||
}
|
||||
setState(() {
|
||||
appoButtonsList = buttonsList;
|
||||
});
|
||||
}
|
||||
|
||||
Future<List<AppoDetailsButton>> _getBookedCheckInAppoActionsList() async {
|
||||
// BookedButtons.getContext(context);
|
||||
print("_getBookedCheckInAppoActionsList");
|
||||
List<AppoDetailsButton> buttonsList = [];
|
||||
for (var i = 0; i < BookedButtons.buttons.length; i++) {
|
||||
buttonsList.add(AppoDetailsButton(
|
||||
title: BookedButtons.buttons[i]['title'],
|
||||
subtitle: BookedButtons.buttons[i]['subtitle'],
|
||||
icon: BookedButtons.buttons[i]['icon'],
|
||||
caller: BookedButtons.buttons[i]['caller'],
|
||||
));
|
||||
}
|
||||
setState(() {
|
||||
appoButtonsList = buttonsList;
|
||||
});
|
||||
}
|
||||
|
||||
Future<List<AppoDetailsButton>> _getConfirmedAppoActionsList() async {
|
||||
var bookButtonsJson;
|
||||
List<AppoDetailsButton> buttonsList = [];
|
||||
String data = await DefaultAssetBundle.of(context)
|
||||
.loadString("assets/json/bookedButtons.json");
|
||||
bookButtonsJson = json.decode(data);
|
||||
for (var i = 0; i < bookButtonsJson.length; i++) {
|
||||
buttonsList.add(AppoDetailsButton(
|
||||
title: bookButtonsJson[i]['title'],
|
||||
subtitle: bookButtonsJson[i]['subtitle'],
|
||||
icon: bookButtonsJson[i]['icon'],
|
||||
caller: bookButtonsJson[i]['caller'],
|
||||
));
|
||||
}
|
||||
setState(() {
|
||||
appoButtonsList = buttonsList;
|
||||
});
|
||||
}
|
||||
|
||||
Future<List<AppoDetailsButton>> _getConfirmedCheckInAppoActionsList() async {
|
||||
var bookButtonsJson;
|
||||
List<AppoDetailsButton> buttonsList = [];
|
||||
String data = await DefaultAssetBundle.of(context)
|
||||
.loadString("assets/json/bookedButtons.json");
|
||||
bookButtonsJson = json.decode(data);
|
||||
for (var i = 0; i < bookButtonsJson.length; i++) {
|
||||
buttonsList.add(AppoDetailsButton(
|
||||
title: bookButtonsJson[i]['title'],
|
||||
subtitle: bookButtonsJson[i]['subtitle'],
|
||||
icon: bookButtonsJson[i]['icon'],
|
||||
caller: bookButtonsJson[i]['caller'],
|
||||
));
|
||||
}
|
||||
setState(() {
|
||||
appoButtonsList = buttonsList;
|
||||
});
|
||||
}
|
||||
|
||||
Future<List<AppoDetailsButton>> _getArrivedAppoActionsList() async {
|
||||
var bookButtonsJson;
|
||||
List<AppoDetailsButton> buttonsList = [];
|
||||
String data = await DefaultAssetBundle.of(context)
|
||||
.loadString("assets/json/bookedButtons.json");
|
||||
bookButtonsJson = json.decode(data);
|
||||
for (var i = 0; i < bookButtonsJson.length; i++) {
|
||||
buttonsList.add(AppoDetailsButton(
|
||||
title: bookButtonsJson[i]['title'],
|
||||
subtitle: bookButtonsJson[i]['subtitle'],
|
||||
icon: bookButtonsJson[i]['icon'],
|
||||
caller: bookButtonsJson[i]['caller'],
|
||||
));
|
||||
}
|
||||
setState(() {
|
||||
appoButtonsList = buttonsList;
|
||||
});
|
||||
}
|
||||
|
||||
Future<List<AppoDetailsButton>> _getArrivedInvoiceAppoActionsList() async {
|
||||
var bookButtonsJson;
|
||||
List<AppoDetailsButton> buttonsList = [];
|
||||
String data = await DefaultAssetBundle.of(context)
|
||||
.loadString("assets/json/bookedButtons.json");
|
||||
bookButtonsJson = json.decode(data);
|
||||
for (var i = 0; i < bookButtonsJson.length; i++) {
|
||||
buttonsList.add(AppoDetailsButton(
|
||||
title: bookButtonsJson[i]['title'],
|
||||
subtitle: bookButtonsJson[i]['subtitle'],
|
||||
icon: bookButtonsJson[i]['icon'],
|
||||
caller: bookButtonsJson[i]['caller'],
|
||||
));
|
||||
}
|
||||
setState(() {
|
||||
appoButtonsList = buttonsList;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,237 @@
|
||||
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
||||
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
|
||||
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/AppointmentCardView.dart';
|
||||
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class MyAppointments extends StatefulWidget {
|
||||
List<AppoitmentAllHistoryResultList> appoList = [];
|
||||
|
||||
List<AppoitmentAllHistoryResultList> bookedAppoList = [];
|
||||
List<AppoitmentAllHistoryResultList> confirmedAppoList = [];
|
||||
List<AppoitmentAllHistoryResultList> arrivedAppoList = [];
|
||||
|
||||
@override
|
||||
_MyAppointmentsState createState() => _MyAppointmentsState();
|
||||
}
|
||||
|
||||
class _MyAppointmentsState extends State<MyAppointments>
|
||||
with SingleTickerProviderStateMixin {
|
||||
TabController _tabController;
|
||||
|
||||
bool isDataLoaded = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_tabController = new TabController(length: 3, vsync: this);
|
||||
WidgetsBinding.instance
|
||||
.addPostFrameCallback((_) => getPatientAppointmentHistory());
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
appBarTitle: "My Appointments",
|
||||
isShowAppBar: true,
|
||||
body: Container(
|
||||
child: Column(children: [
|
||||
/// this is will not colored with theme data
|
||||
TabBar(
|
||||
tabs: [
|
||||
Tab(text: TranslationBase.of(context).booked),
|
||||
Tab(text: TranslationBase.of(context).confirmed),
|
||||
Tab(text: TranslationBase.of(context).arrived),
|
||||
],
|
||||
controller: _tabController,
|
||||
),
|
||||
Divider(
|
||||
color: Colors.grey[600],
|
||||
thickness: 0.5,
|
||||
),
|
||||
Expanded(
|
||||
child: new TabBarView(
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
children: [
|
||||
isDataLoaded ? getBookedAppointments() : Container(),
|
||||
isDataLoaded ? getConfirmedAppointments() : Container(),
|
||||
isDataLoaded ? getArrivedAppointments() : Container()
|
||||
],
|
||||
controller: _tabController,
|
||||
),
|
||||
),
|
||||
]),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
getPatientAppointmentHistory() {
|
||||
DoctorsListService service = new DoctorsListService();
|
||||
widget.appoList.clear();
|
||||
widget.bookedAppoList.clear();
|
||||
widget.confirmedAppoList.clear();
|
||||
widget.arrivedAppoList.clear();
|
||||
service.getPatientAppointmentHistory(false, context).then((res) {
|
||||
print(res['AppoimentAllHistoryResultList'].length);
|
||||
if (res['MessageStatus'] == 1) {
|
||||
setState(() {
|
||||
if (res['AppoimentAllHistoryResultList'].length != 0) {
|
||||
res['AppoimentAllHistoryResultList'].forEach((v) {
|
||||
widget.appoList
|
||||
.add(new AppoitmentAllHistoryResultList.fromJson(v));
|
||||
});
|
||||
sortAppointmentList();
|
||||
openAppointmentsTab();
|
||||
isDataLoaded = true;
|
||||
} else {}
|
||||
});
|
||||
} else {
|
||||
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
|
||||
}
|
||||
}).catchError((err) {
|
||||
print(err);
|
||||
});
|
||||
}
|
||||
|
||||
bool isConfirmed(AppoitmentAllHistoryResultList appo) {
|
||||
return AppointmentType.isConfirmed(appo);
|
||||
}
|
||||
|
||||
bool isArrived(AppoitmentAllHistoryResultList appo) {
|
||||
return AppointmentType.isArrived(appo);
|
||||
}
|
||||
|
||||
bool isBooked(AppoitmentAllHistoryResultList appo) {
|
||||
return AppointmentType.isBooked(appo);
|
||||
}
|
||||
|
||||
sortAppointmentList() {
|
||||
widget.appoList.forEach((v) {
|
||||
if (isBooked(v)) {
|
||||
widget.bookedAppoList.add(v);
|
||||
}
|
||||
|
||||
if (isConfirmed(v)) {
|
||||
widget.confirmedAppoList.add(v);
|
||||
}
|
||||
|
||||
if (isArrived(v)) {
|
||||
widget.arrivedAppoList.add(v);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
openAppointmentsTab() {
|
||||
if (widget.bookedAppoList.length != 0) {
|
||||
_tabController.animateTo((_tabController.index + 1) % 1);
|
||||
} else if (widget.confirmedAppoList.length != 0) {
|
||||
_tabController.animateTo((_tabController.index + 1) % 2);
|
||||
} else if (widget.arrivedAppoList.length != 0) {
|
||||
_tabController.animateTo((_tabController.index + 1) % 3);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Widget getBookedAppointments() {
|
||||
return Container(
|
||||
child: widget.bookedAppoList.length != 0
|
||||
? new ListView.builder(
|
||||
itemCount: widget.bookedAppoList.length,
|
||||
itemBuilder: (context, i) {
|
||||
return AppointmentCard(
|
||||
appo: widget.bookedAppoList[i],
|
||||
onReloadAppointmentHistory: getPatientAppointmentHistory,
|
||||
);
|
||||
},
|
||||
)
|
||||
: Container(
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Image.asset(
|
||||
"assets/images/new-design/noAppointmentIcon.png"),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.0),
|
||||
child: Text("No Booked Appointments",
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget getConfirmedAppointments() {
|
||||
return widget.confirmedAppoList.length != 0
|
||||
? Container(
|
||||
child: new ListView.builder(
|
||||
itemCount: widget.confirmedAppoList.length,
|
||||
itemBuilder: (context, i) {
|
||||
return AppointmentCard(
|
||||
appo: widget.confirmedAppoList[i],
|
||||
onReloadAppointmentHistory: getPatientAppointmentHistory,
|
||||
);
|
||||
},
|
||||
),
|
||||
)
|
||||
: Container(
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Image.asset("assets/images/new-design/noAppointmentIcon.png"),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.0),
|
||||
child: Text("No Confirmed Appointments",
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget getArrivedAppointments() {
|
||||
return widget.arrivedAppoList.length != 0
|
||||
? Container(
|
||||
child: new ListView.builder(
|
||||
itemCount: widget.arrivedAppoList.length,
|
||||
itemBuilder: (context, i) {
|
||||
return AppointmentCard(
|
||||
appo: widget.arrivedAppoList[i],
|
||||
onReloadAppointmentHistory: getPatientAppointmentHistory,
|
||||
);
|
||||
},
|
||||
),
|
||||
)
|
||||
: Container(
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Image.asset("assets/images/new-design/noAppointmentIcon.png"),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.0),
|
||||
child: Text("No Arrived Appointments",
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
|
||||
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
|
||||
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class VisitTicket extends StatefulWidget {
|
||||
List<DoctorList> appoList = [];
|
||||
|
||||
@override
|
||||
_VisitTicketState createState() => _VisitTicketState();
|
||||
}
|
||||
|
||||
class _VisitTicketState extends State<VisitTicket> {
|
||||
bool isLoading = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
getPatientAppointmentCurfewHistory(context);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
appBarTitle: TranslationBase.of(context).todoList,
|
||||
body: isLoading == false
|
||||
? SingleChildScrollView(
|
||||
child: ListView.builder(
|
||||
scrollDirection: Axis.vertical,
|
||||
shrinkWrap: true,
|
||||
physics: ScrollPhysics(),
|
||||
padding: EdgeInsets.all(0.0),
|
||||
itemCount: widget.appoList.length,
|
||||
itemBuilder: (context, index) {
|
||||
return DoctorView(
|
||||
doctor: widget.appoList[index],
|
||||
);
|
||||
},
|
||||
),
|
||||
)
|
||||
: AppCircularProgressIndicator(),
|
||||
);
|
||||
}
|
||||
|
||||
getPatientAppointmentCurfewHistory(BuildContext context) {
|
||||
loading(true);
|
||||
DoctorsListService service = new DoctorsListService();
|
||||
service.getPatientAppointmentHistory(true, context).then((res) {
|
||||
print(res['AppoimentAllHistoryResultList']);
|
||||
if (res['MessageStatus'] == 1) {
|
||||
setState(() {
|
||||
if (res['AppoimentAllHistoryResultList'].length != 0) {
|
||||
widget.appoList.clear();
|
||||
res['AppoimentAllHistoryResultList'].forEach((v) {
|
||||
widget.appoList.add(new DoctorList.fromJson(v));
|
||||
});
|
||||
} else {}
|
||||
});
|
||||
loading(false);
|
||||
} else {
|
||||
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
|
||||
loading(false);
|
||||
}
|
||||
}).catchError((err) {
|
||||
print(err);
|
||||
loading(false);
|
||||
});
|
||||
}
|
||||
|
||||
loading(bool flag) {
|
||||
setState(() {
|
||||
isLoading = flag;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
|
||||
class ArrivedButtons {
|
||||
static var buttons = [
|
||||
{
|
||||
"title": "Arrived",
|
||||
"subtitle": "Status",
|
||||
"icon": "assets/images/new-design/waiting-room.png",
|
||||
"caller": "openReschedule"
|
||||
},
|
||||
{
|
||||
"title": "Medicines",
|
||||
"subtitle": "Prescriptions",
|
||||
"icon": "assets/images/new-design/medicine_prescriptions_icon.png",
|
||||
"caller": "onCancelAppointment"
|
||||
},
|
||||
{
|
||||
"title": "Radiology",
|
||||
"subtitle": "Services",
|
||||
"icon": "assets/images/new-design/radiology_service_icon.png",
|
||||
"caller": "radiology"
|
||||
},
|
||||
{
|
||||
"title": "Lab",
|
||||
"subtitle": "Result",
|
||||
"icon": "assets/images/new-design/lab_result_icon.png",
|
||||
"caller": "addReminder"
|
||||
},
|
||||
{
|
||||
"title": "Vital Signs",
|
||||
"subtitle": "Values",
|
||||
"icon": "assets/images/new-design/location_icon.png",
|
||||
"caller": "navigateToProject"
|
||||
},
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).raise,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).complaint,
|
||||
"icon": "assets/images/new-design/Complaint_icon.png",
|
||||
"caller": "insertComplaint"
|
||||
},
|
||||
{
|
||||
"title": "Insurance",
|
||||
"subtitle": "Approvals",
|
||||
"icon": "assets/images/new-design/insurance_approvals_icon.png",
|
||||
"caller": "goToTodoList"
|
||||
},
|
||||
{
|
||||
"title": "Ask Your",
|
||||
"subtitle": "Doctor",
|
||||
"icon": "assets/images/new-design/ask_doctor_icon.png",
|
||||
"caller": "askDoc"
|
||||
},
|
||||
{
|
||||
"title": "Survey",
|
||||
"subtitle": "Service",
|
||||
"icon": "assets/images/new-design/survey.png",
|
||||
"caller": "goToTodoList"
|
||||
}
|
||||
];
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
|
||||
class ArrivedButtons {
|
||||
static var buttons = [
|
||||
{
|
||||
"title": "Arrived",
|
||||
"subtitle": "Status",
|
||||
"icon": "assets/images/new-design/waiting-room.png",
|
||||
"caller": "openReschedule"
|
||||
},
|
||||
{
|
||||
"title": "Medicines",
|
||||
"subtitle": "Prescriptions",
|
||||
"icon": "assets/images/new-design/medicine_prescriptions_icon.png",
|
||||
"caller": "onCancelAppointment"
|
||||
},
|
||||
{
|
||||
"title": "Radiology",
|
||||
"subtitle": "Services",
|
||||
"icon": "assets/images/new-design/radiology_service_icon.png",
|
||||
"caller": "insertComplaint"
|
||||
},
|
||||
{
|
||||
"title": "Lab",
|
||||
"subtitle": "Result",
|
||||
"icon": "assets/images/new-design/lab_result_icon.png",
|
||||
"caller": "addReminder"
|
||||
},
|
||||
{
|
||||
"title": "Vital Signs",
|
||||
"subtitle": "Values",
|
||||
"icon": "assets/images/new-design/location_icon.png",
|
||||
"caller": "navigateToProject"
|
||||
},
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).raise,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).complaint,
|
||||
"icon": "assets/images/new-design/Complaint_icon.png",
|
||||
"caller": "insertComplaint"
|
||||
},
|
||||
{
|
||||
"title": "Insurance",
|
||||
"subtitle": "Approvals",
|
||||
"icon": "assets/images/new-design/insurance_approvals_icon.png",
|
||||
"caller": "goToTodoList"
|
||||
},
|
||||
{
|
||||
"title": "Ask Your",
|
||||
"subtitle": "Doctor",
|
||||
"icon": "assets/images/new-design/ask_doctor_icon.png",
|
||||
"caller": "goToTodoList"
|
||||
},
|
||||
{
|
||||
"title": "Survey",
|
||||
"subtitle": "Service",
|
||||
"icon": "assets/images/new-design/survey.png",
|
||||
"caller": "goToTodoList"
|
||||
}
|
||||
];
|
||||
}
|
||||
@ -1,60 +1,43 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
|
||||
class BookedButtons {
|
||||
static var context;
|
||||
|
||||
static var buttons = [
|
||||
{
|
||||
"title": TranslationBase.of(context).confirm,
|
||||
"subtitle": TranslationBase.of(context).appointment,
|
||||
"title": TranslationBase.of(AppGlobal.context).confirm,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
|
||||
"icon": "assets/images/new-design/confirm_icon.png",
|
||||
"caller": "confirmAppointment"
|
||||
},
|
||||
// {
|
||||
// "title": "confirm",
|
||||
// "subtitle": "Appointment",
|
||||
// "icon": "assets/images/new-design/confirm_icon.png",
|
||||
// "caller": "confirmAppointment"
|
||||
// },
|
||||
{
|
||||
"title": "reschedule",
|
||||
"subtitle": "appointment",
|
||||
"title": TranslationBase.of(AppGlobal.context).reschedule,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
|
||||
"icon": "assets/images/new-design/reschedule_icon.png",
|
||||
"caller": "openReschedule"
|
||||
},
|
||||
{
|
||||
"title": "cancel",
|
||||
"subtitle": "appointment",
|
||||
"title": TranslationBase.of(AppGlobal.context).cancel_nocaps,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
|
||||
"icon": "assets/images/new-design/cancel_icon.png",
|
||||
"caller": "onCancelAppointment"
|
||||
},
|
||||
{
|
||||
"title": "raise",
|
||||
"subtitle": "complaint",
|
||||
"title": TranslationBase.of(AppGlobal.context).raise,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).complaint,
|
||||
"icon": "assets/images/new-design/Complaint_icon.png",
|
||||
"caller": "insertComplaint"
|
||||
},
|
||||
{
|
||||
"title": "add",
|
||||
"subtitle": "reminder",
|
||||
"title": TranslationBase.of(AppGlobal.context).add,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).reminder,
|
||||
"icon": "assets/images/new-design/reminder_icon.png",
|
||||
"caller": "addReminder"
|
||||
},
|
||||
{
|
||||
"title": "hospital",
|
||||
"subtitle": "locations",
|
||||
"title": TranslationBase.of(AppGlobal.context).hospital,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).location,
|
||||
"icon": "assets/images/new-design/location_icon.png",
|
||||
"caller": "navigateToProject"
|
||||
},
|
||||
{
|
||||
"title": "online",
|
||||
"subtitle": "payment",
|
||||
"icon": "assets/images/new-design/check-in.png",
|
||||
"caller": "goToTodoList(31)"
|
||||
}
|
||||
];
|
||||
|
||||
static setContext(context) {
|
||||
BookedButtons.context = context;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,49 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
|
||||
class BookedButtonsAllowCheckIn {
|
||||
static var buttons = [
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).confirm,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
|
||||
"icon": "assets/images/new-design/confirm_icon.png",
|
||||
"caller": "confirmAppointment"
|
||||
},
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).reschedule,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
|
||||
"icon": "assets/images/new-design/reschedule_icon.png",
|
||||
"caller": "openReschedule"
|
||||
},
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).cancel_nocaps,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
|
||||
"icon": "assets/images/new-design/cancel_icon.png",
|
||||
"caller": "onCancelAppointment"
|
||||
},
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).raise,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).complaint,
|
||||
"icon": "assets/images/new-design/Complaint_icon.png",
|
||||
"caller": "insertComplaint"
|
||||
},
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).add,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).reminder,
|
||||
"icon": "assets/images/new-design/reminder_icon.png",
|
||||
"caller": "addReminder"
|
||||
},
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).hospital,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).location,
|
||||
"icon": "assets/images/new-design/location_icon.png",
|
||||
"caller": "navigateToProject"
|
||||
},
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).online,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).payment,
|
||||
"icon": "assets/images/new-design/check-in.png",
|
||||
"caller": "goToTodoList"
|
||||
}
|
||||
];
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
|
||||
class ConfirmedButtons {
|
||||
static var buttons = [
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).reschedule,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
|
||||
"icon": "assets/images/new-design/reschedule_icon.png",
|
||||
"caller": "openReschedule"
|
||||
},
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).cancel_nocaps,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
|
||||
"icon": "assets/images/new-design/cancel_icon.png",
|
||||
"caller": "onCancelAppointment"
|
||||
},
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).raise,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).complaint,
|
||||
"icon": "assets/images/new-design/Complaint_icon.png",
|
||||
"caller": "insertComplaint"
|
||||
},
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).add,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).reminder,
|
||||
"icon": "assets/images/new-design/reminder_icon.png",
|
||||
"caller": "addReminder"
|
||||
},
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).hospital,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).location,
|
||||
"icon": "assets/images/new-design/location_icon.png",
|
||||
"caller": "navigateToProject"
|
||||
},
|
||||
// {
|
||||
// "title": "Generate",
|
||||
// "subtitle": "Visit Ticket",
|
||||
// "icon": "assets/images/new-design/generate_visit_ticket.png",
|
||||
// "caller": "visitTicket"
|
||||
// },
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).online,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).payment,
|
||||
"icon": "assets/images/new-design/check-in.png",
|
||||
"caller": "goToTodoList"
|
||||
}
|
||||
];
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
|
||||
class ConfirmedButtonsAllowCheckIn {
|
||||
static var buttons = [
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).reschedule,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
|
||||
"icon": "assets/images/new-design/reschedule_icon.png",
|
||||
"caller": "openReschedule"
|
||||
},
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).cancel_nocaps,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).appointment,
|
||||
"icon": "assets/images/new-design/cancel_icon.png",
|
||||
"caller": "onCancelAppointment"
|
||||
},
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).raise,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).complaint,
|
||||
"icon": "assets/images/new-design/Complaint_icon.png",
|
||||
"caller": "insertComplaint"
|
||||
},
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).add,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).reminder,
|
||||
"icon": "assets/images/new-design/reminder_icon.png",
|
||||
"caller": "addReminder"
|
||||
},
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).hospital,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).location,
|
||||
"icon": "assets/images/new-design/location_icon.png",
|
||||
"caller": "navigateToProject"
|
||||
},
|
||||
{
|
||||
"title": TranslationBase.of(AppGlobal.context).online,
|
||||
"subtitle": TranslationBase.of(AppGlobal.context).payment,
|
||||
"icon": "assets/images/new-design/check-in.png",
|
||||
"caller": "goToTodoList"
|
||||
}
|
||||
];
|
||||
}
|
||||
@ -0,0 +1,430 @@
|
||||
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
|
||||
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
||||
import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart';
|
||||
import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
|
||||
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
|
||||
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ArrivedButtons.dart';
|
||||
import 'package:diplomaticquarterapp/pages/MyAppointments/models/BookedButtons.dart';
|
||||
import 'package:diplomaticquarterapp/pages/MyAppointments/models/BookedButtonsAllowCheckIn.dart';
|
||||
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtons.dart';
|
||||
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart';
|
||||
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart';
|
||||
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class AppointmentActions extends StatefulWidget {
|
||||
AppoitmentAllHistoryResultList appo;
|
||||
TabController tabController;
|
||||
final Function enableFooterButton;
|
||||
|
||||
AppointmentActions({@required this.appo,
|
||||
@required this.tabController,
|
||||
@required this.enableFooterButton});
|
||||
|
||||
@override
|
||||
_AppointmentActionsState createState() => _AppointmentActionsState();
|
||||
}
|
||||
|
||||
class _AppointmentActionsState extends State<AppointmentActions> {
|
||||
List<AppoDetailsButton> appoButtonsList = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_getAppointmentActionButtons();
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var size = MediaQuery
|
||||
.of(context)
|
||||
.size;
|
||||
final double itemHeight = ((size.height - kToolbarHeight - 24) * 0.42) / 2;
|
||||
final double itemWidth = size.width / 2;
|
||||
|
||||
return Container(
|
||||
margin: EdgeInsets.all(5.0),
|
||||
child: CustomScrollView(
|
||||
primary: false,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
slivers: <Widget>[
|
||||
SliverPadding(
|
||||
padding: const EdgeInsets.fromLTRB(15, 0, 15, 0),
|
||||
sliver: SliverGrid.count(
|
||||
crossAxisCount: 2,
|
||||
childAspectRatio: (itemWidth / itemHeight),
|
||||
children: appoButtonsList
|
||||
.map((e) =>
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
_handleButtonClicks(e);
|
||||
},
|
||||
child: Container(
|
||||
height: 100.0,
|
||||
margin: EdgeInsets.all(9.0),
|
||||
decoration: BoxDecoration(
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey[400],
|
||||
blurRadius: 2.0,
|
||||
spreadRadius: 0.0)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
color: Colors.white),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
margin:
|
||||
EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
|
||||
child: Text(e.title,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
color: new Color(0xFFc5272d),
|
||||
letterSpacing: 1.0,
|
||||
fontSize: 20.0)),
|
||||
),
|
||||
Container(
|
||||
margin:
|
||||
EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0),
|
||||
child: Text(e.subtitle,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
letterSpacing: 1.0,
|
||||
fontSize: 15.0)),
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.bottomRight,
|
||||
margin:
|
||||
EdgeInsets.fromLTRB(0.0, 10.0, 10.0, 7.0),
|
||||
child: Image.asset(e.icon,
|
||||
width: 45.0, height: 45.0),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
))
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
_handleButtonClicks(AppoDetailsButton) {
|
||||
print(AppoDetailsButton.caller);
|
||||
|
||||
switch (AppoDetailsButton.caller) {
|
||||
case "openReschedule":
|
||||
widget.tabController.animateTo((widget.tabController.index + 1) % 2);
|
||||
setState(() {
|
||||
print("Reschedule");
|
||||
widget.enableFooterButton();
|
||||
});
|
||||
break;
|
||||
|
||||
case "onCancelAppointment":
|
||||
ConfirmDialog dialog = new ConfirmDialog(
|
||||
context: context,
|
||||
confirmMessage: TranslationBase
|
||||
.of(context)
|
||||
.cancelAppoMsg,
|
||||
okText: TranslationBase
|
||||
.of(context)
|
||||
.confirm,
|
||||
cancelText: TranslationBase
|
||||
.of(context)
|
||||
.cancel_nocaps,
|
||||
okFunction: () => {cancelAppointment()},
|
||||
cancelFunction: () => {});
|
||||
dialog.showAlertDialog(context);
|
||||
break;
|
||||
|
||||
case "confirmAppointment":
|
||||
confirmAppointment();
|
||||
break;
|
||||
|
||||
case "navigateToProject":
|
||||
openMap(double.parse(widget.appo.latitude),
|
||||
double.parse(widget.appo.longitude));
|
||||
break;
|
||||
|
||||
case "addReminder":
|
||||
showReminderDialog(widget.appo);
|
||||
break;
|
||||
|
||||
case "goToTodoList":
|
||||
Navigator.of(context).pop();
|
||||
break;
|
||||
|
||||
case "askDoc":
|
||||
askYourDoc();
|
||||
break;
|
||||
|
||||
case "radiology":
|
||||
openAppointmentRadiology();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
_getAppointmentActionButtons() {
|
||||
if (widget.appo != null) {
|
||||
if (isConfirmed()) {
|
||||
if (widget.appo.isOnlineCheckedIN) {
|
||||
_getConfirmedCheckInAppoActionsList();
|
||||
} else {
|
||||
_getConfirmedAppoActionsList();
|
||||
}
|
||||
} else {
|
||||
print("isConfirmed Null");
|
||||
}
|
||||
if (isBooked()) {
|
||||
if (widget.appo.isOnlineCheckedIN) {
|
||||
_getBookedCheckInAppoActionsList();
|
||||
} else {
|
||||
_getBookedAppoActionsList();
|
||||
}
|
||||
} else {
|
||||
print("isBooked Null");
|
||||
}
|
||||
if (isArrived()) {
|
||||
if (widget.appo.clinicID == 17) {
|
||||
_getArrivedInvoiceAppoActionsList();
|
||||
} else {
|
||||
_getArrivedAppoActionsList();
|
||||
}
|
||||
} else {
|
||||
print("isArrived Null");
|
||||
}
|
||||
} else {
|
||||
print("Appo Null");
|
||||
}
|
||||
}
|
||||
|
||||
bool isConfirmed() {
|
||||
return AppointmentType.isConfirmed(widget.appo);
|
||||
}
|
||||
|
||||
bool isArrived() {
|
||||
return AppointmentType.isArrived(widget.appo);
|
||||
}
|
||||
|
||||
bool isCheckedIn() {
|
||||
return widget.appo.isOnlineCheckedIN;
|
||||
}
|
||||
|
||||
bool isBooked() {
|
||||
return AppointmentType.isBooked(widget.appo);
|
||||
}
|
||||
|
||||
Future<List<AppoDetailsButton>> _getBookedAppoActionsList() async {
|
||||
print("_getBookedAppoActionsList");
|
||||
print(BookedButtons.buttons);
|
||||
List<AppoDetailsButton> buttonsList = [];
|
||||
for (var i = 0; i < BookedButtons.buttons.length; i++) {
|
||||
buttonsList.add(AppoDetailsButton(
|
||||
title: BookedButtons.buttons[i]['title'],
|
||||
subtitle: BookedButtons.buttons[i]['subtitle'],
|
||||
icon: BookedButtons.buttons[i]['icon'],
|
||||
caller: BookedButtons.buttons[i]['caller'],
|
||||
));
|
||||
}
|
||||
setState(() {
|
||||
appoButtonsList = buttonsList;
|
||||
});
|
||||
}
|
||||
|
||||
Future<List<AppoDetailsButton>> _getBookedCheckInAppoActionsList() async {
|
||||
print("_getBookedCheckInAppoActionsList");
|
||||
print(BookedButtonsAllowCheckIn.buttons);
|
||||
List<AppoDetailsButton> buttonsList = [];
|
||||
for (var i = 0; i < BookedButtonsAllowCheckIn.buttons.length; i++) {
|
||||
buttonsList.add(AppoDetailsButton(
|
||||
title: BookedButtonsAllowCheckIn.buttons[i]['title'],
|
||||
subtitle: BookedButtonsAllowCheckIn.buttons[i]['subtitle'],
|
||||
icon: BookedButtonsAllowCheckIn.buttons[i]['icon'],
|
||||
caller: BookedButtonsAllowCheckIn.buttons[i]['caller'],
|
||||
));
|
||||
}
|
||||
setState(() {
|
||||
appoButtonsList = buttonsList;
|
||||
});
|
||||
}
|
||||
|
||||
Future<List<AppoDetailsButton>> _getConfirmedAppoActionsList() async {
|
||||
print("_getConfirmedAppoActionsList");
|
||||
print(ConfirmedButtons.buttons);
|
||||
List<AppoDetailsButton> buttonsList = [];
|
||||
for (var i = 0; i < ConfirmedButtons.buttons.length; i++) {
|
||||
buttonsList.add(AppoDetailsButton(
|
||||
title: ConfirmedButtons.buttons[i]['title'],
|
||||
subtitle: ConfirmedButtons.buttons[i]['subtitle'],
|
||||
icon: ConfirmedButtons.buttons[i]['icon'],
|
||||
caller: ConfirmedButtons.buttons[i]['caller'],
|
||||
));
|
||||
}
|
||||
setState(() {
|
||||
appoButtonsList = buttonsList;
|
||||
});
|
||||
}
|
||||
|
||||
Future<List<AppoDetailsButton>> _getConfirmedCheckInAppoActionsList() async {
|
||||
print("_getConfirmedAllowCheckInAppoActionsList");
|
||||
print(ConfirmedButtonsAllowCheckIn.buttons);
|
||||
List<AppoDetailsButton> buttonsList = [];
|
||||
for (var i = 0; i < ConfirmedButtonsAllowCheckIn.buttons.length; i++) {
|
||||
buttonsList.add(AppoDetailsButton(
|
||||
title: ConfirmedButtonsAllowCheckIn.buttons[i]['title'],
|
||||
subtitle: ConfirmedButtonsAllowCheckIn.buttons[i]['subtitle'],
|
||||
icon: ConfirmedButtonsAllowCheckIn.buttons[i]['icon'],
|
||||
caller: ConfirmedButtonsAllowCheckIn.buttons[i]['caller'],
|
||||
));
|
||||
}
|
||||
setState(() {
|
||||
appoButtonsList = buttonsList;
|
||||
});
|
||||
}
|
||||
|
||||
Future<List<AppoDetailsButton>> _getArrivedAppoActionsList() async {
|
||||
print("_getArrivedAppoActionsList");
|
||||
print(ArrivedButtons.buttons);
|
||||
List<AppoDetailsButton> buttonsList = [];
|
||||
for (var i = 0; i < ArrivedButtons.buttons.length; i++) {
|
||||
buttonsList.add(AppoDetailsButton(
|
||||
title: ArrivedButtons.buttons[i]['title'],
|
||||
subtitle: ArrivedButtons.buttons[i]['subtitle'],
|
||||
icon: ArrivedButtons.buttons[i]['icon'],
|
||||
caller: ArrivedButtons.buttons[i]['caller'],
|
||||
));
|
||||
}
|
||||
setState(() {
|
||||
appoButtonsList = buttonsList;
|
||||
});
|
||||
}
|
||||
|
||||
Future<List<AppoDetailsButton>> _getArrivedInvoiceAppoActionsList() async {
|
||||
print("_getArrivedInvoiceAppoActionsList");
|
||||
print(ArrivedButtons.buttons);
|
||||
List<AppoDetailsButton> buttonsList = [];
|
||||
for (var i = 0; i < ArrivedButtons.buttons.length; i++) {
|
||||
buttonsList.add(AppoDetailsButton(
|
||||
title: ArrivedButtons.buttons[i]['title'],
|
||||
subtitle: ArrivedButtons.buttons[i]['subtitle'],
|
||||
icon: ArrivedButtons.buttons[i]['icon'],
|
||||
caller: ArrivedButtons.buttons[i]['caller'],
|
||||
));
|
||||
}
|
||||
setState(() {
|
||||
appoButtonsList = buttonsList;
|
||||
});
|
||||
}
|
||||
|
||||
cancelAppointment() {
|
||||
ConfirmDialog.closeAlertDialog(context);
|
||||
DoctorsListService service = new DoctorsListService();
|
||||
service.cancelAppointment(widget.appo, context).then((res) {
|
||||
print(res);
|
||||
if (res['MessageStatus'] == 1) {
|
||||
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
|
||||
Navigator.of(context).pop();
|
||||
} else {
|
||||
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
|
||||
}
|
||||
}).catchError((err) {
|
||||
print(err);
|
||||
});
|
||||
}
|
||||
|
||||
openAppointmentRadiology() {
|
||||
DoctorsListService service = new DoctorsListService();
|
||||
FinalRadiology finalRadiology = new FinalRadiology();
|
||||
service.getPatientRadOrders(widget.appo.appointmentNo.toString(), context)
|
||||
.then((res) {
|
||||
if (res['MessageStatus'] == 1) {
|
||||
print(res['FinalRadiologyList']);
|
||||
} else {
|
||||
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
|
||||
}
|
||||
}).catchError((err) {
|
||||
print(err);
|
||||
});
|
||||
}
|
||||
|
||||
static Future<void> openMap(double latitude, double longitude) async {
|
||||
String googleUrl =
|
||||
'https://www.google.com/maps/search/?api=1&query=$latitude,$longitude';
|
||||
if (await canLaunch(googleUrl)) {
|
||||
await launch(googleUrl);
|
||||
} else {
|
||||
throw 'Could not open the map.';
|
||||
}
|
||||
}
|
||||
|
||||
showReminderDialog(AppoitmentAllHistoryResultList appo) {
|
||||
showGeneralDialog(
|
||||
barrierColor: Colors.black.withOpacity(0.5),
|
||||
transitionBuilder: (context, a1, a2, widget) {
|
||||
final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
|
||||
return Transform(
|
||||
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
|
||||
child: Opacity(
|
||||
opacity: a1.value,
|
||||
child: ReminderDialog(appo: appo),
|
||||
),
|
||||
);
|
||||
},
|
||||
transitionDuration: Duration(milliseconds: 500),
|
||||
barrierDismissible: true,
|
||||
barrierLabel: '',
|
||||
context: context,
|
||||
pageBuilder: (context, animation1, animation2) {});
|
||||
}
|
||||
|
||||
askYourDoc() {
|
||||
DoctorsListService service = new DoctorsListService();
|
||||
service
|
||||
.isAllowedToAskDoctor(widget.appo.doctorID, context)
|
||||
.then((res) {
|
||||
print(res['PatientDoctorAppointmentResultList']);
|
||||
if (res['PatientDoctorAppointmentResultList'].length != 0) {
|
||||
|
||||
} else {
|
||||
AppToast.showErrorToast(message: TranslationBase
|
||||
.of(context)
|
||||
.askDocNotAllowed);
|
||||
}
|
||||
}).catchError((err) {
|
||||
print(err);
|
||||
});
|
||||
}
|
||||
|
||||
confirmAppointment() {
|
||||
DoctorsListService service = new DoctorsListService();
|
||||
service
|
||||
.confirmAppointment(widget.appo.appointmentNo, widget.appo.clinicID,
|
||||
widget.appo.projectID, context)
|
||||
.then((res) {
|
||||
if (res['MessageStatus'] == 1) {
|
||||
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
|
||||
Navigator.of(context).pop();
|
||||
} else {
|
||||
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
|
||||
}
|
||||
}).catchError((err) {
|
||||
print(err);
|
||||
});
|
||||
}
|
||||
|
||||
loading(bool flag) {
|
||||
setState(() {
|
||||
AppointmentDetails.isLoading = flag;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,144 @@
|
||||
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rating_bar/rating_bar.dart';
|
||||
|
||||
import '../AppointmentDetails.dart';
|
||||
|
||||
class AppointmentCard extends StatefulWidget {
|
||||
AppoitmentAllHistoryResultList appo;
|
||||
final Function onReloadAppointmentHistory;
|
||||
|
||||
AppointmentCard(
|
||||
{@required this.appo, @required this.onReloadAppointmentHistory});
|
||||
|
||||
@override
|
||||
_ApointmentCardState createState() => _ApointmentCardState();
|
||||
}
|
||||
|
||||
class _ApointmentCardState extends State<AppointmentCard> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
navigateToAppointmentDetails(context, widget.appo);
|
||||
},
|
||||
child: Card(
|
||||
margin: EdgeInsets.fromLTRB(20.0, 16.0, 20.0, 8.0),
|
||||
color: Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(),
|
||||
padding: EdgeInsets.all(7.0),
|
||||
width: MediaQuery.of(context).size.width,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(100.0),
|
||||
child: Image.network(widget.appo.doctorImageURL,
|
||||
fit: BoxFit.fill, height: 60.0, width: 60.0),
|
||||
),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.6,
|
||||
margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
widget.appo.doctorTitle +
|
||||
" " +
|
||||
widget.appo.doctorNameObj,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: Colors.grey[700],
|
||||
letterSpacing: 1.0)),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 3.0),
|
||||
child: Text(widget.appo.clinicName,
|
||||
style: TextStyle(
|
||||
fontSize: 12.0,
|
||||
color: Colors.grey[600],
|
||||
letterSpacing: 1.0)),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 3.0),
|
||||
child: Text(widget.appo.projectName,
|
||||
style: TextStyle(
|
||||
fontSize: 12.0,
|
||||
color: Colors.grey[600],
|
||||
letterSpacing: 1.0)),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
|
||||
child: Text(getDate(widget.appo.appointmentDate).trim(),
|
||||
style: TextStyle(
|
||||
fontSize: 12.0,
|
||||
color: Colors.grey[600],
|
||||
letterSpacing: 1.0)),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: <Widget>[
|
||||
RatingBar.readOnly(
|
||||
initialRating:
|
||||
widget.appo.actualDoctorRate.toDouble(),
|
||||
size: 20.0,
|
||||
filledColor: Colors.yellow[700],
|
||||
emptyColor: Colors.grey[500],
|
||||
isHalfAllowed: true,
|
||||
halfFilledIcon: Icons.star_half,
|
||||
filledIcon: Icons.star,
|
||||
emptyIcon: Icons.star,
|
||||
),
|
||||
Container(
|
||||
transform: Matrix4.translationValues(0.0, -40.0, 0.0),
|
||||
child: Image.asset(
|
||||
"assets/images/new-design/arrow.png",
|
||||
width: 25.0,
|
||||
height: 25.0),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
String getDate(String date) {
|
||||
DateTime dateObj = DateUtil.convertStringToDate(date);
|
||||
return DateUtil.getWeekDay(dateObj.weekday) +
|
||||
", " +
|
||||
dateObj.day.toString() +
|
||||
" " +
|
||||
DateUtil.getMonth(dateObj.month) +
|
||||
" " +
|
||||
dateObj.year.toString();
|
||||
}
|
||||
|
||||
String getDoctorSpeciality(List<String> docSpecial) {
|
||||
String docSpeciality = "";
|
||||
docSpecial.forEach((v) {
|
||||
docSpeciality = docSpeciality + v + "\n";
|
||||
});
|
||||
return docSpeciality;
|
||||
}
|
||||
|
||||
Future navigateToAppointmentDetails(context, appo) async {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => AppointmentDetails(appo: appo)))
|
||||
.then((value) {
|
||||
widget.onReloadAppointmentHistory();
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,94 @@
|
||||
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CustomRadio extends StatefulWidget {
|
||||
@override
|
||||
createState() {
|
||||
return new CustomRadioState();
|
||||
}
|
||||
}
|
||||
|
||||
class CustomRadioState extends State<CustomRadio> {
|
||||
List<RadioModel> sampleData = new List<RadioModel>();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
sampleData.add(new RadioModel(false, "Before 30 Mins", 30));
|
||||
sampleData.add(new RadioModel(false, 'Before 1 Hour', 60));
|
||||
sampleData.add(new RadioModel(false, 'Before 2 Hours', 120));
|
||||
sampleData.add(new RadioModel(false, 'Before 4 Hours', 240));
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemCount: sampleData.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return new InkWell(
|
||||
//highlightColor: Colors.red,
|
||||
splashColor: Colors.transparent,
|
||||
onTap: () {
|
||||
setState(() {
|
||||
sampleData.forEach((element) => element.isSelected = false);
|
||||
sampleData[index].isSelected = true;
|
||||
ReminderDialog.selectedDuration =
|
||||
sampleData[index].duration * 60000;
|
||||
});
|
||||
},
|
||||
child: new RadioItem(sampleData[index]),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class RadioItem extends StatelessWidget {
|
||||
final RadioModel _item;
|
||||
|
||||
RadioItem(this._item);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return new Container(
|
||||
margin: new EdgeInsets.all(15.0),
|
||||
child: new Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: <Widget>[
|
||||
new Container(
|
||||
height: 30.0,
|
||||
width: 30.0,
|
||||
child: new Center(
|
||||
child: Image.asset("assets/images/new-design/check_icon.png",
|
||||
width: 15.0, height: 15.0),
|
||||
),
|
||||
decoration: new BoxDecoration(
|
||||
color: _item.isSelected ? Colors.blue : Colors.transparent,
|
||||
border: new Border.all(
|
||||
width: 1.0,
|
||||
color: _item.isSelected ? Colors.blue : Colors.grey),
|
||||
borderRadius: const BorderRadius.all(const Radius.circular(50.0)),
|
||||
),
|
||||
),
|
||||
new Container(
|
||||
margin: new EdgeInsets.only(left: 15.0),
|
||||
child: new Text(_item.text, style: TextStyle(fontSize: 16.0)),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class RadioModel {
|
||||
bool isSelected;
|
||||
final String text;
|
||||
final int duration;
|
||||
|
||||
RadioModel(this.isSelected, this.text, this.duration);
|
||||
}
|
||||
@ -0,0 +1,134 @@
|
||||
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
||||
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/custom_radio.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:flutter/material.dart';
|
||||
import 'package:manage_calendar_events/manage_calendar_events.dart';
|
||||
|
||||
class ReminderDialog extends StatefulWidget {
|
||||
static var selectedDuration;
|
||||
|
||||
AppoitmentAllHistoryResultList appo;
|
||||
|
||||
ReminderDialog({@required this.appo});
|
||||
|
||||
@override
|
||||
_ReminderDialogState createState() => _ReminderDialogState();
|
||||
}
|
||||
|
||||
class _ReminderDialogState extends State<ReminderDialog> {
|
||||
final CalendarPlugin _myPlugin = CalendarPlugin();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
child: Dialog(
|
||||
shape:
|
||||
RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)),
|
||||
child: Container(
|
||||
height: MediaQuery.of(context).size.height * 0.57,
|
||||
width: 450.0,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
margin: EdgeInsets.all(20.0),
|
||||
child: Text(TranslationBase.of(context).setReminder,
|
||||
style: TextStyle(
|
||||
fontSize: 20.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontFamily: "Open-Sans-Bold")),
|
||||
),
|
||||
Container(
|
||||
transform: Matrix4.translationValues(0.0, -30.0, 0.0),
|
||||
child: CustomRadio(),
|
||||
),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 40.0,
|
||||
margin: EdgeInsets.only(left: 30.0, top: 0.0, right: 30.0),
|
||||
child: RaisedButton(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
side: BorderSide(color: Colors.blue)),
|
||||
color: Colors.blue,
|
||||
onPressed: () {
|
||||
print(ReminderDialog.selectedDuration);
|
||||
createCalendarEvent();
|
||||
},
|
||||
child: Text(TranslationBase.of(context).confirm,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontFamily: 'Open-Sans-Bold')),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
margin: EdgeInsets.only(left: 100.0, top: 20.0, right: 100.0),
|
||||
child: OutlineButton(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10.0)),
|
||||
color: Colors.red,
|
||||
borderSide: BorderSide(color: Colors.red),
|
||||
highlightColor: Colors.red,
|
||||
highlightedBorderColor: Colors.red,
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text(TranslationBase.of(context).cancel_nocaps,
|
||||
style: TextStyle(
|
||||
color: Colors.red,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontFamily: 'Open-Sans-Bold')),
|
||||
),
|
||||
),
|
||||
]),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
createCalendarEvent() {
|
||||
_myPlugin.hasPermissions().then((value) {
|
||||
if (!value) {
|
||||
_myPlugin.requestPermissions();
|
||||
} else {
|
||||
_myPlugin.getCalendars().then((value) => {print(value.length)});
|
||||
}
|
||||
});
|
||||
|
||||
CalendarEvent calendarEvent = new CalendarEvent(
|
||||
eventId: widget.appo.appointmentNo.toString(),
|
||||
title: "Doctor Appointment",
|
||||
description: "You have an appointment with " +
|
||||
widget.appo.doctorTitle +
|
||||
" " +
|
||||
widget.appo.doctorNameObj,
|
||||
startDate: DateUtil.convertStringToDate(widget.appo.appointmentDate)
|
||||
.subtract(
|
||||
new Duration(microseconds: ReminderDialog.selectedDuration)),
|
||||
endDate: DateUtil.convertStringToDate(widget.appo.appointmentDate),
|
||||
location: widget.appo.projectName,
|
||||
duration: new Duration(minutes: 15).inMinutes,
|
||||
isAllDay: false,
|
||||
hasAlarm: true);
|
||||
|
||||
_myPlugin
|
||||
.createEvent(calendarId: "207749556", event: calendarEvent)
|
||||
.then((value) {
|
||||
print("Cal event");
|
||||
print(value);
|
||||
if (int.parse(value) == widget.appo.appointmentNo) {
|
||||
AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess);
|
||||
}
|
||||
Navigator.of(context).pop();
|
||||
}).catchError((err) {
|
||||
print("Cal Error");
|
||||
print(err);
|
||||
Navigator.of(context).pop();
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -1,31 +1,675 @@
|
||||
import 'package:diplomaticquarterapp/pages/ToDoList/widgets/upcomingCard.dart';
|
||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
||||
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
|
||||
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
|
||||
import 'package:diplomaticquarterapp/pages/BookAppointment/QRCode.dart';
|
||||
import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
|
||||
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
|
||||
import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart';
|
||||
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
|
||||
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/utils.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rating_bar/rating_bar.dart';
|
||||
|
||||
class ToDo extends StatefulWidget {
|
||||
PatientShareResponse patientShareResponse;
|
||||
List<AppoitmentAllHistoryResultList> appoList = [];
|
||||
var languageID;
|
||||
MyInAppBrowser browser;
|
||||
|
||||
@override
|
||||
_ToDoState createState() => _ToDoState();
|
||||
}
|
||||
|
||||
class _ToDoState extends State<ToDo> {
|
||||
AppSharedPreferences sharedPref = AppSharedPreferences();
|
||||
|
||||
AuthenticatedUser authUser;
|
||||
AuthProvider authProvider = new AuthProvider();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// authUser = authProvider.getAuthenticatedUser();
|
||||
print("initState!!!!!");
|
||||
widget.patientShareResponse = new PatientShareResponse();
|
||||
WidgetsBinding.instance
|
||||
.addPostFrameCallback((_) => getPatientAppointmentHistory());
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(TranslationBase.of(context).todoList),
|
||||
),
|
||||
return AppScaffold(
|
||||
appBarTitle: TranslationBase.of(context).todoList,
|
||||
body: SingleChildScrollView(
|
||||
child: Container(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
TodoListCard(),
|
||||
TodoListCard(),
|
||||
TodoListCard(),
|
||||
TodoListCard(),
|
||||
],
|
||||
child: ListView.builder(
|
||||
scrollDirection: Axis.vertical,
|
||||
shrinkWrap: true,
|
||||
physics: ScrollPhysics(),
|
||||
padding: EdgeInsets.all(0.0),
|
||||
itemCount: widget.appoList.length,
|
||||
itemBuilder: (context, index) {
|
||||
return Container(
|
||||
margin: EdgeInsets.all(10.0),
|
||||
child: Card(
|
||||
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 8.0),
|
||||
color: Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
padding: EdgeInsets.all(10.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: <Widget>[
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Image.asset(
|
||||
"assets/images/new-design/time_icon.png",
|
||||
width: 20.0,
|
||||
height: 20.0),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 10.0, right: 30.0),
|
||||
child: Text(
|
||||
getDate(
|
||||
widget.appoList[index].appointmentDate),
|
||||
style: TextStyle(fontSize: 12.0)),
|
||||
),
|
||||
Image.asset(
|
||||
"assets/images/new-design/hospital_address_icon.png",
|
||||
width: 20.0,
|
||||
height: 20.0),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 10.0, right: 10.0),
|
||||
child: Text(widget.appoList[index].projectName,
|
||||
style: TextStyle(fontSize: 12.0)),
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 5.0),
|
||||
child: Divider(
|
||||
color: Colors.grey[500],
|
||||
),
|
||||
),
|
||||
Flex(
|
||||
direction: Axis.horizontal,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Container(
|
||||
height:
|
||||
MediaQuery.of(context).size.height * 0.1,
|
||||
margin: EdgeInsets.only(top: 5.0),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(100.0),
|
||||
child: Image.network(
|
||||
widget.appoList[index].doctorImageURL,
|
||||
fit: BoxFit.fill),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 20.0, left: 20.0, right: 20.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
widget.appoList[index].doctorTitle +
|
||||
" " +
|
||||
widget
|
||||
.appoList[index].doctorNameObj,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
letterSpacing: 1.0)),
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 3.0, bottom: 3.0),
|
||||
child: Text(
|
||||
getDoctorSpeciality(widget
|
||||
.appoList[index]
|
||||
.doctorSpeciality)
|
||||
.trim(),
|
||||
style: TextStyle(
|
||||
fontSize: 12.0,
|
||||
color: Colors.grey[600],
|
||||
letterSpacing: 1.0)),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: <Widget>[
|
||||
RatingBar.readOnly(
|
||||
initialRating: widget
|
||||
.appoList[index].actualDoctorRate
|
||||
.toDouble(),
|
||||
size: 20.0,
|
||||
filledColor: Colors.yellow[700],
|
||||
emptyColor: Colors.grey[500],
|
||||
isHalfAllowed: true,
|
||||
halfFilledIcon: Icons.star_half,
|
||||
filledIcon: Icons.star,
|
||||
emptyIcon: Icons.star,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () =>
|
||||
performNextAction(widget.appoList[index]),
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 20.0),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Image.asset(
|
||||
getNextActionImage(widget
|
||||
.appoList[index].nextAction),
|
||||
width: 50.0,
|
||||
height: 50.0),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 5.0),
|
||||
child: Text(
|
||||
getNextActionText(widget
|
||||
.appoList[index].nextAction),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 12.0)),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
Divider(
|
||||
color: Colors.grey[500],
|
||||
),
|
||||
Flex(
|
||||
direction: Axis.horizontal,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Container(
|
||||
child: Text(
|
||||
getNextActionDescription(
|
||||
widget.appoList[index].nextAction),
|
||||
style: TextStyle(
|
||||
fontSize: 12.0,
|
||||
color: Colors.grey[700])),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
navigateToAppointmentDetails(
|
||||
context, widget.appoList[index]);
|
||||
},
|
||||
child: Container(
|
||||
child: Text(
|
||||
TranslationBase.of(context)
|
||||
.upcomingDetails,
|
||||
textAlign: TextAlign.end,
|
||||
style: TextStyle(
|
||||
fontSize: 12.0,
|
||||
color: Colors.red[600],
|
||||
decoration:
|
||||
TextDecoration.underline)),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
String getNextActionImage(nextAction) {
|
||||
switch (nextAction) {
|
||||
case 0:
|
||||
return "No Action";
|
||||
break;
|
||||
case 10:
|
||||
return "assets/images/new-design/confirm_button.png";
|
||||
break;
|
||||
|
||||
case 15:
|
||||
return widget.languageID == 'ar'
|
||||
? "assets/images/new-design/pay_online_button_arabic_disabled.png"
|
||||
: "assets/images/new-design/pay_online_button_disabled.png";
|
||||
break;
|
||||
|
||||
case 20:
|
||||
return widget.languageID == 'ar'
|
||||
? "assets/images/new-design/pay_online_button_arabic.png"
|
||||
: "assets/images/new-design/pay_online_button.png";
|
||||
break;
|
||||
|
||||
case 30:
|
||||
return "assets/images/new-design/qr_code_button.png";
|
||||
break;
|
||||
|
||||
case 40:
|
||||
return "assets/images/new-design/video_call_instruction.png";
|
||||
break;
|
||||
|
||||
case 50:
|
||||
return "assets/images/new-design/liveCare_logo_icon.png";
|
||||
break;
|
||||
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
performNextAction(AppoitmentAllHistoryResultList appo) {
|
||||
switch (appo.nextAction) {
|
||||
case 10:
|
||||
confirmAppointment(appo);
|
||||
break;
|
||||
|
||||
case 20:
|
||||
getPatientShare(context, appo);
|
||||
break;
|
||||
|
||||
case 30:
|
||||
getAppoQR(context, appo);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
String getNextActionText(nextAction) {
|
||||
switch (nextAction) {
|
||||
case 0:
|
||||
return "No Action";
|
||||
break;
|
||||
case 10:
|
||||
return TranslationBase.of(context).confirm;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
return TranslationBase.of(context).pendingPayment;
|
||||
break;
|
||||
|
||||
case 20:
|
||||
return TranslationBase.of(context).payNow;
|
||||
break;
|
||||
|
||||
case 30:
|
||||
return TranslationBase.of(context).viewQR;
|
||||
break;
|
||||
|
||||
case 40:
|
||||
return TranslationBase.of(context).instruction;
|
||||
break;
|
||||
|
||||
case 50:
|
||||
return TranslationBase.of(context).livecare;
|
||||
break;
|
||||
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
String getNextActionDescription(nextAction) {
|
||||
switch (nextAction) {
|
||||
case 0:
|
||||
return "No Action";
|
||||
break;
|
||||
case 10:
|
||||
return TranslationBase.of(context).upcomingConfirm;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
return TranslationBase.of(context).upcomingPaymentPending;
|
||||
break;
|
||||
|
||||
case 20:
|
||||
return TranslationBase.of(context).upcomingPaymentNow;
|
||||
break;
|
||||
|
||||
case 30:
|
||||
return TranslationBase.of(context).upcomingQR;
|
||||
break;
|
||||
|
||||
case 40:
|
||||
return TranslationBase.of(context).upcomingVirtual;
|
||||
break;
|
||||
|
||||
case 50:
|
||||
return TranslationBase.of(context).upcomingLivecare;
|
||||
break;
|
||||
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
getLanguageID() async {
|
||||
var languageID = await sharedPref.getString(APP_LANGUAGE);
|
||||
setState(() {
|
||||
widget.languageID = languageID;
|
||||
});
|
||||
}
|
||||
|
||||
String getDate(String date) {
|
||||
DateTime dateObj = DateUtil.convertStringToDate(date);
|
||||
return DateUtil.getWeekDay(dateObj.weekday) +
|
||||
", " +
|
||||
dateObj.day.toString() +
|
||||
" " +
|
||||
DateUtil.getMonth(dateObj.month) +
|
||||
" " +
|
||||
dateObj.year.toString() +
|
||||
" " +
|
||||
dateObj.hour.toString() +
|
||||
":" +
|
||||
getMinute(dateObj);
|
||||
}
|
||||
|
||||
String getMinute(DateTime dateObj) {
|
||||
if (dateObj.minute == 0) {
|
||||
return dateObj.minute.toString() + "0";
|
||||
} else {
|
||||
return dateObj.minute.toString();
|
||||
}
|
||||
}
|
||||
|
||||
String getDoctorSpeciality(List<String> docSpecial) {
|
||||
String docSpeciality = "";
|
||||
docSpecial.forEach((v) {
|
||||
docSpeciality = docSpeciality + v + "\n";
|
||||
});
|
||||
return docSpeciality;
|
||||
}
|
||||
|
||||
Future navigateToAppointmentDetails(context, appo) async {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => AppointmentDetails(appo: appo)))
|
||||
.then((value) {
|
||||
getPatientAppointmentHistory();
|
||||
});
|
||||
}
|
||||
|
||||
getPatientAppointmentHistory() {
|
||||
DoctorsListService service = new DoctorsListService();
|
||||
service.getPatientAppointmentHistory(true, context).then((res) {
|
||||
print(res['AppoimentAllHistoryResultList']);
|
||||
if (res['MessageStatus'] == 1) {
|
||||
setState(() {
|
||||
if (res['AppoimentAllHistoryResultList'].length != 0) {
|
||||
widget.appoList.clear();
|
||||
res['AppoimentAllHistoryResultList'].forEach((v) {
|
||||
widget.appoList
|
||||
.add(new AppoitmentAllHistoryResultList.fromJson(v));
|
||||
});
|
||||
} else {}
|
||||
});
|
||||
} else {
|
||||
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
|
||||
}
|
||||
}).catchError((err) {
|
||||
print(err);
|
||||
});
|
||||
}
|
||||
|
||||
getPatientShare(context, AppoitmentAllHistoryResultList appo) {
|
||||
DoctorsListService service = new DoctorsListService();
|
||||
service
|
||||
.getPatientShare(appo.appointmentNo.toString(), appo.clinicID,
|
||||
appo.projectID, context)
|
||||
.then((res) {
|
||||
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
|
||||
openPaymentDialog(appo, widget.patientShareResponse);
|
||||
}).catchError((err) {
|
||||
print(err);
|
||||
});
|
||||
}
|
||||
|
||||
getAppoQR(context, AppoitmentAllHistoryResultList appo) {
|
||||
PatientShareResponse patientShareResponse = new PatientShareResponse();
|
||||
|
||||
patientShareResponse.doctorNameObj = appo.doctorNameObj;
|
||||
patientShareResponse.doctorSpeciality = appo.doctorSpeciality;
|
||||
patientShareResponse.projectName = appo.projectName;
|
||||
patientShareResponse.appointmentDate = appo.appointmentDate;
|
||||
patientShareResponse.appointmentNo = appo.appointmentNo;
|
||||
patientShareResponse.clinicID = appo.clinicID;
|
||||
patientShareResponse.projectID = appo.projectID;
|
||||
patientShareResponse.isFollowup = appo.isFollowup;
|
||||
|
||||
DoctorsListService service = new DoctorsListService();
|
||||
service.generateAppointmentQR(patientShareResponse, context).then((res) {
|
||||
print(res);
|
||||
navigateToQR(context, res['AppointmentQR'], patientShareResponse);
|
||||
}).catchError((err) {
|
||||
print(err);
|
||||
});
|
||||
}
|
||||
|
||||
Future navigateToQR(
|
||||
context, String appoQR, PatientShareResponse patientShareResponse) async {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => QRCode(
|
||||
patientShareResponse: patientShareResponse,
|
||||
appoQR: appoQR,
|
||||
))).then((value) {
|
||||
getPatientAppointmentHistory();
|
||||
});
|
||||
}
|
||||
|
||||
openPaymentDialog(AppoitmentAllHistoryResultList appo,
|
||||
PatientShareResponse patientShareResponse) {
|
||||
showGeneralDialog(
|
||||
barrierColor: Colors.black.withOpacity(0.5),
|
||||
transitionBuilder: (context, a1, a2, widget) {
|
||||
final curvedValue =
|
||||
Curves.easeInOutBack.transform(a1.value) - 1.0;
|
||||
return Transform(
|
||||
transform:
|
||||
Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
|
||||
child: Opacity(
|
||||
opacity: a1.value,
|
||||
child: PaymentDialog(
|
||||
appo: appo, patientShareResponse: patientShareResponse),
|
||||
),
|
||||
);
|
||||
},
|
||||
transitionDuration: Duration(milliseconds: 500),
|
||||
barrierDismissible: false,
|
||||
barrierLabel: '',
|
||||
context: context,
|
||||
pageBuilder: (context, animation1, animation2) {})
|
||||
.then((value) {
|
||||
print(value);
|
||||
|
||||
if (value != null) {
|
||||
navigateToPaymentMethod(context, value, appo);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
openPayment(
|
||||
String paymentMethod,
|
||||
AuthenticatedUser authenticatedUser,
|
||||
double amount,
|
||||
PatientShareResponse patientShareResponse,
|
||||
AppoitmentAllHistoryResultList appo) {
|
||||
widget.browser = new MyInAppBrowser(
|
||||
onExitCallback: onBrowserExit,
|
||||
appo: appo,
|
||||
onLoadStartCallback: onBrowserLoadStart);
|
||||
|
||||
widget.browser.openPaymentBrowser(
|
||||
amount,
|
||||
"Appointment check in",
|
||||
Utils.getAppointmentTransID(
|
||||
appo.projectID, appo.clinicID, appo.appointmentNo),
|
||||
appo.projectID.toString(),
|
||||
authenticatedUser.emailAddress,
|
||||
paymentMethod,
|
||||
authenticatedUser,
|
||||
widget.browser);
|
||||
}
|
||||
|
||||
onBrowserLoadStart(String url) {
|
||||
print("onBrowserLoadStart");
|
||||
print(url);
|
||||
|
||||
MyInAppBrowser.successURLS.forEach((element) {
|
||||
if (url.contains(element)) {
|
||||
if (widget.browser.isOpened()) widget.browser.close();
|
||||
MyInAppBrowser.isPaymentDone = true;
|
||||
Utils.hideProgressDialog();
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
MyInAppBrowser.errorURLS.forEach((element) {
|
||||
if (url.contains(element)) {
|
||||
if (widget.browser.isOpened()) widget.browser.close();
|
||||
MyInAppBrowser.isPaymentDone = false;
|
||||
Utils.hideProgressDialog();
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onBrowserExit(AppoitmentAllHistoryResultList appo, bool isPaymentMade) {
|
||||
print("onBrowserExit Called!!!!");
|
||||
if (isPaymentMade) checkPaymentStatus(appo);
|
||||
}
|
||||
|
||||
checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
|
||||
DoctorsListService service = new DoctorsListService();
|
||||
service
|
||||
.checkPaymentStatus(
|
||||
Utils.getAppointmentTransID(
|
||||
appo.projectID, appo.clinicID, appo.appointmentNo),
|
||||
context)
|
||||
.then((res) {
|
||||
print("Printing Payment Status Reponse!!!!");
|
||||
print(res);
|
||||
String paymentInfo = res['Response_Message'];
|
||||
if (paymentInfo == 'Success') {
|
||||
createAdvancePayment(res, appo);
|
||||
} else {
|
||||
AppToast.showErrorToast(message: res['Response_Message']);
|
||||
}
|
||||
}).catchError((err) {
|
||||
print(err);
|
||||
});
|
||||
}
|
||||
|
||||
createAdvancePayment(res, AppoitmentAllHistoryResultList appo) {
|
||||
DoctorsListService service = new DoctorsListService();
|
||||
String paymentReference = res['Fort_id'].toString();
|
||||
service
|
||||
.createAdvancePayment(
|
||||
appo, res['Amount'], res['Fort_id'], res['PaymentMethod'], context)
|
||||
.then((res) {
|
||||
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
|
||||
addAdvancedNumberRequest(
|
||||
res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(),
|
||||
paymentReference,
|
||||
appo.appointmentNo.toString(),
|
||||
appo);
|
||||
}).catchError((err) {
|
||||
print(err);
|
||||
});
|
||||
}
|
||||
|
||||
addAdvancedNumberRequest(String advanceNumber, String paymentReference,
|
||||
String appointmentID, AppoitmentAllHistoryResultList appo) {
|
||||
DoctorsListService service = new DoctorsListService();
|
||||
service
|
||||
.addAdvancedNumberRequest(
|
||||
advanceNumber, paymentReference, appointmentID, context)
|
||||
.then((res) {
|
||||
print(res);
|
||||
getAppoQR(context, appo);
|
||||
}).catchError((err) {
|
||||
print(err);
|
||||
});
|
||||
}
|
||||
|
||||
Future navigateToPaymentMethod(
|
||||
context,
|
||||
PatientShareResponse patientShareResponse,
|
||||
AppoitmentAllHistoryResultList appo) async {
|
||||
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
|
||||
var data = AuthenticatedUser.fromJson(
|
||||
await this.sharedPref.getObject(USER_PROFILE));
|
||||
setState(() {
|
||||
authUser = data;
|
||||
});
|
||||
}
|
||||
|
||||
Navigator.push(
|
||||
context, MaterialPageRoute(builder: (context) => PaymentMethod()))
|
||||
.then((value) {
|
||||
print(value);
|
||||
getPatientAppointmentHistory();
|
||||
|
||||
if (value != null) {
|
||||
openPayment(
|
||||
value,
|
||||
authUser,
|
||||
double.parse(patientShareResponse.patientShareWithTax.toString()),
|
||||
patientShareResponse,
|
||||
appo);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
confirmAppointment(AppoitmentAllHistoryResultList appo) {
|
||||
DoctorsListService service = new DoctorsListService();
|
||||
service
|
||||
.confirmAppointment(
|
||||
appo.appointmentNo, appo.clinicID, appo.projectID, context)
|
||||
.then((res) {
|
||||
if (res['MessageStatus'] == 1) {
|
||||
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
|
||||
getPatientAppointmentHistory();
|
||||
} else {
|
||||
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
|
||||
}
|
||||
}).catchError((err) {
|
||||
print(err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,239 @@
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PaymentMethod extends StatefulWidget {
|
||||
@override
|
||||
_PaymentMethodState createState() => _PaymentMethodState();
|
||||
}
|
||||
|
||||
class _PaymentMethodState extends State<PaymentMethod> {
|
||||
String selectedPaymentMethod = "MADA";
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
appBarTitle: TranslationBase.of(context).paymentMethod,
|
||||
isShowAppBar: true,
|
||||
body: Container(
|
||||
margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
|
||||
child: SingleChildScrollView(
|
||||
child: Container(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(0.0, 15.0, 0.0, 0.0),
|
||||
alignment: Alignment.center,
|
||||
child: Text("Select Payment Method",
|
||||
style: TextStyle(
|
||||
fontSize: 26.0, fontWeight: FontWeight.bold)),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 25.0),
|
||||
child: Flex(
|
||||
direction: Axis.horizontal,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Container(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
updateSelectedPaymentMethod("MADA");
|
||||
},
|
||||
child: Card(
|
||||
elevation: 3.0,
|
||||
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
|
||||
color: Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
side: selectedPaymentMethod == "MADA"
|
||||
? BorderSide(
|
||||
color: Colors.green, width: 5.0)
|
||||
: BorderSide(
|
||||
color: Colors.transparent, width: 0.0),
|
||||
),
|
||||
child: Container(
|
||||
height: 120.0,
|
||||
padding: EdgeInsets.all(7.0),
|
||||
width: MediaQuery.of(context).size.width * 0.45,
|
||||
child: Image.asset(
|
||||
"assets/images/new-design/mada.png"),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
updateSelectedPaymentMethod("SADAD");
|
||||
},
|
||||
child: Card(
|
||||
elevation: 3.0,
|
||||
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
|
||||
color: Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
side: selectedPaymentMethod == "SADAD"
|
||||
? BorderSide(
|
||||
color: Colors.green, width: 5.0)
|
||||
: BorderSide(
|
||||
color: Colors.transparent, width: 0.0),
|
||||
),
|
||||
child: Container(
|
||||
height: 120.0,
|
||||
padding: EdgeInsets.all(7.0),
|
||||
width: MediaQuery.of(context).size.width * 0.45,
|
||||
child: Image.asset(
|
||||
"assets/images/new-design/sadad.png"),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 25.0),
|
||||
child: Flex(
|
||||
direction: Axis.horizontal,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Container(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
updateSelectedPaymentMethod("VISA");
|
||||
},
|
||||
child: Card(
|
||||
elevation: 3.0,
|
||||
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
|
||||
color: Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
side: selectedPaymentMethod == "VISA"
|
||||
? BorderSide(
|
||||
color: Colors.green, width: 5.0)
|
||||
: BorderSide(
|
||||
color: Colors.transparent, width: 0.0),
|
||||
),
|
||||
child: Container(
|
||||
height: 120.0,
|
||||
padding: EdgeInsets.all(7.0),
|
||||
width: MediaQuery.of(context).size.width * 0.45,
|
||||
child: Image.asset(
|
||||
"assets/images/new-design/visa.png"),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
updateSelectedPaymentMethod("MASTERCARD");
|
||||
},
|
||||
child: Card(
|
||||
elevation: 3.0,
|
||||
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
|
||||
color: Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
side: selectedPaymentMethod == "MASTERCARD"
|
||||
? BorderSide(
|
||||
color: Colors.green, width: 5.0)
|
||||
: BorderSide(
|
||||
color: Colors.transparent, width: 0.0),
|
||||
),
|
||||
child: Container(
|
||||
height: 120.0,
|
||||
padding: EdgeInsets.all(7.0),
|
||||
width: MediaQuery.of(context).size.width * 0.45,
|
||||
child: Image.asset(
|
||||
"assets/images/new-design/mastercard.png"),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 25.0),
|
||||
child: Flex(
|
||||
direction: Axis.horizontal,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Container(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
updateSelectedPaymentMethod("Installment");
|
||||
},
|
||||
child: Card(
|
||||
elevation: 3.0,
|
||||
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
|
||||
color: Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
side: selectedPaymentMethod == "Installment"
|
||||
? BorderSide(
|
||||
color: Colors.green, width: 5.0)
|
||||
: BorderSide(
|
||||
color: Colors.transparent, width: 0.0),
|
||||
),
|
||||
child: Container(
|
||||
height: 120.0,
|
||||
padding: EdgeInsets.all(7.0),
|
||||
width: MediaQuery.of(context).size.width * 0.45,
|
||||
child: Image.asset(
|
||||
"assets/images/new-design/installment.png"),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
bottomSheet: Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 50.0,
|
||||
margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 20.0),
|
||||
child: ButtonTheme(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),
|
||||
minWidth: MediaQuery.of(context).size.width * 0.7,
|
||||
height: 45.0,
|
||||
child: RaisedButton(
|
||||
color: new Color(0xFF60686b),
|
||||
textColor: Colors.white,
|
||||
disabledTextColor: Colors.white,
|
||||
disabledColor: new Color(0xFFbcc2c4),
|
||||
onPressed: () {
|
||||
Navigator.pop(context, selectedPaymentMethod);
|
||||
},
|
||||
child: Text(TranslationBase.of(context).confirm,
|
||||
style: TextStyle(fontSize: 18.0)),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
updateSelectedPaymentMethod(String selectedMethod) {
|
||||
setState(() {
|
||||
selectedPaymentMethod = selectedMethod;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,227 @@
|
||||
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
||||
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PaymentDialog extends StatefulWidget {
|
||||
AppoitmentAllHistoryResultList appo;
|
||||
PatientShareResponse patientShareResponse;
|
||||
|
||||
final Function onPaymentMethodSelected;
|
||||
|
||||
PaymentDialog({@required this.appo, @required this.onPaymentMethodSelected, this.patientShareResponse});
|
||||
|
||||
@override
|
||||
_PaymentDialogState createState() => _PaymentDialogState();
|
||||
}
|
||||
|
||||
class _PaymentDialogState extends State<PaymentDialog> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
child: Dialog(
|
||||
shape:
|
||||
RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)),
|
||||
child: Container(
|
||||
height: MediaQuery.of(context).size.height * 0.67,
|
||||
width: 450.0,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 5.0),
|
||||
child: Text("Invoice Detail",
|
||||
style: TextStyle(
|
||||
fontSize: 25.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontFamily: "Open-Sans-Bold")),
|
||||
),
|
||||
Divider(
|
||||
color: Colors.grey,
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0),
|
||||
child: Text("Appointment Details",
|
||||
style: TextStyle(
|
||||
fontSize: 15.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontFamily: "Open-Sans-Bold")),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0),
|
||||
child: Text(
|
||||
widget.appo.doctorTitle + " " + widget.appo.doctorNameObj,
|
||||
style: TextStyle(
|
||||
color: Colors.grey[700],
|
||||
fontSize: 15.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontFamily: "Open-Sans-Bold")),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0),
|
||||
child: Text(getDate(widget.appo.appointmentDate),
|
||||
style: getTextStyle()),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0),
|
||||
child: Text(widget.appo.projectName, style: getTextStyle()),
|
||||
),
|
||||
Divider(
|
||||
color: Colors.grey,
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 5.0),
|
||||
child: Table(
|
||||
children: [
|
||||
TableRow(children: [
|
||||
TableCell(
|
||||
child: _getNormalText(
|
||||
TranslationBase.of(context).patientShareToDo)),
|
||||
TableCell(
|
||||
child: _getNormalText(widget
|
||||
.patientShareResponse.patientShare
|
||||
.toString())),
|
||||
]),
|
||||
TableRow(children: [
|
||||
TableCell(
|
||||
child: _getNormalText(
|
||||
TranslationBase.of(context).patientTaxToDo)),
|
||||
TableCell(
|
||||
child: _getNormalText(widget
|
||||
.patientShareResponse.patientTaxAmount
|
||||
.toString())),
|
||||
]),
|
||||
TableRow(children: [
|
||||
TableCell(
|
||||
child: _getNormalText(TranslationBase.of(context)
|
||||
.patientShareTotalToDo)),
|
||||
TableCell(
|
||||
child: _getNormalText(widget
|
||||
.patientShareResponse.patientShareWithTax
|
||||
.toString())),
|
||||
]),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
margin: EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 5.0),
|
||||
child: Text("You can pay by following options: ",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontFamily: "Open-Sans")),
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 5.0),
|
||||
child: Image.asset(
|
||||
"assets/images/new-design/payment_options_invoice_confirmation.png",
|
||||
width: 300),
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 15.0),
|
||||
child: Text(
|
||||
"Are You Sure You Want To Make payment for this Appointment?",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: Colors.red[700],
|
||||
fontFamily: "Open-Sans")),
|
||||
),
|
||||
Divider(
|
||||
color: Colors.grey,
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
height: 40.0,
|
||||
child: Flex(
|
||||
direction: Axis.horizontal,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navigator.pop(context, null);
|
||||
},
|
||||
child: Container(
|
||||
child: Text("Cancel",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 18.0, color: Colors.red[700])),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navigator.pop(context, widget.patientShareResponse);
|
||||
// widget.onPaymentMethodSelected();
|
||||
},
|
||||
child: Container(
|
||||
child: Text("Ok",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 18.0,
|
||||
)),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
]),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
_getNormalText(text) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(top: 10.0, right: 10.0),
|
||||
child: Text(text,
|
||||
textAlign: TextAlign.end,
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
fontFamily: 'Open-Sans',
|
||||
letterSpacing: 0.5,
|
||||
color: Colors.grey[700])),
|
||||
);
|
||||
}
|
||||
|
||||
TextStyle getTextStyle() {
|
||||
return TextStyle(
|
||||
color: Colors.grey[700], fontSize: 15.0, fontFamily: "Open-Sans-Bold");
|
||||
}
|
||||
|
||||
// Future navigateToPaymentMethod(context) async {
|
||||
// Navigator.push(
|
||||
// context, MaterialPageRoute(builder: (context) => PaymentMethod()));
|
||||
// }
|
||||
|
||||
String getDate(String date) {
|
||||
DateTime dateObj = DateUtil.convertStringToDate(date);
|
||||
return DateUtil.getWeekDay(dateObj.weekday) +
|
||||
", " +
|
||||
dateObj.day.toString() +
|
||||
" " +
|
||||
DateUtil.getMonth(dateObj.month) +
|
||||
" " +
|
||||
dateObj.year.toString() +
|
||||
" " +
|
||||
dateObj.hour.toString() +
|
||||
":" +
|
||||
getMinute(dateObj);
|
||||
}
|
||||
|
||||
String getMinute(DateTime dateObj) {
|
||||
if (dateObj.minute == 0) {
|
||||
return dateObj.minute.toString() + "0";
|
||||
} else {
|
||||
return dateObj.minute.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ConfirmDialog {
|
||||
final BuildContext context;
|
||||
|
||||
final confirmMessage;
|
||||
final okText;
|
||||
final cancelText;
|
||||
final Function okFunction;
|
||||
final Function cancelFunction;
|
||||
|
||||
ConfirmDialog(
|
||||
{@required this.context,
|
||||
@required this.confirmMessage,
|
||||
@required this.okText,
|
||||
@required this.cancelText,
|
||||
@required this.okFunction,
|
||||
@required this.cancelFunction});
|
||||
|
||||
showAlertDialog(BuildContext context) {
|
||||
// set up the buttons
|
||||
Widget cancelButton = FlatButton(
|
||||
child: Text(this.cancelText),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
});
|
||||
Widget continueButton =
|
||||
FlatButton(child: Text(this.okText), onPressed: this.okFunction);
|
||||
|
||||
// set up the AlertDialog
|
||||
AlertDialog alert = AlertDialog(
|
||||
title: Text(TranslationBase.of(context).confirm),
|
||||
content: Text(this.confirmMessage),
|
||||
actions: [
|
||||
cancelButton,
|
||||
continueButton,
|
||||
],
|
||||
);
|
||||
|
||||
// show the dialog
|
||||
showDialog(
|
||||
barrierDismissible: false,
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return alert;
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
static closeAlertDialog(BuildContext context) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,270 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
||||
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
|
||||
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/utils.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
|
||||
|
||||
class MyInAppBrowser extends InAppBrowser {
|
||||
// static String SERVICE_URL =
|
||||
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
|
||||
// ignore: non_constant_identifier_names
|
||||
|
||||
static String SERVICE_URL =
|
||||
'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
|
||||
|
||||
// static String PREAUTH_SERVICE_URL =
|
||||
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
|
||||
|
||||
static String PREAUTH_SERVICE_URL =
|
||||
'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
|
||||
|
||||
static List<String> successURLS = [
|
||||
'success',
|
||||
'PayFortResponse',
|
||||
'PayFortSucess'
|
||||
];
|
||||
|
||||
static List<String> errorURLS = ['PayfortCancel'];
|
||||
|
||||
final Function onExitCallback;
|
||||
final Function onLoadStartCallback;
|
||||
|
||||
AppSharedPreferences sharedPref = AppSharedPreferences();
|
||||
AuthProvider authProvider = new AuthProvider();
|
||||
InAppBrowser browser = new InAppBrowser();
|
||||
|
||||
AuthenticatedUser authUser;
|
||||
AppoitmentAllHistoryResultList appo;
|
||||
|
||||
static bool isPaymentDone = false;
|
||||
|
||||
MyInAppBrowser({this.onExitCallback, this.appo, this.onLoadStartCallback});
|
||||
|
||||
Future onBrowserCreated() async {
|
||||
print("\n\nBrowser Created!\n\n");
|
||||
}
|
||||
|
||||
@override
|
||||
Future onLoadStart(String url) async {
|
||||
onLoadStartCallback(url);
|
||||
// print("\n\nStarted $url\n\n");
|
||||
|
||||
// if (successURLS.length != 0) {
|
||||
// successURLS.forEach((element) {
|
||||
// if (url.contains(element)) {
|
||||
// try {
|
||||
// if (browser.isOpened()) browser.close();
|
||||
// isPaymentDone = true;
|
||||
// Utils.hideProgressDialog();
|
||||
// return;
|
||||
// } on MissingPluginException catch (exception) {
|
||||
// Utils.hideProgressDialog();
|
||||
// } catch (error) {
|
||||
// Utils.hideProgressDialog();
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// if (errorURLS.length != 0) {
|
||||
// errorURLS.forEach((element) {
|
||||
// if (url.contains(element)) {
|
||||
// try {
|
||||
// if (browser.isOpened()) browser.close();
|
||||
// isPaymentDone = false;
|
||||
// Utils.hideProgressDialog();
|
||||
// return;
|
||||
// } on MissingPluginException catch (exception) {
|
||||
// Utils.hideProgressDialog();
|
||||
// } catch (error) {
|
||||
// Utils.hideProgressDialog();
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
||||
@override
|
||||
Future onLoadStop(String url) async {
|
||||
print("\n\nStopped $url\n\n");
|
||||
}
|
||||
|
||||
@override
|
||||
void onLoadError(String url, int code, String message) {
|
||||
print("Can't load $url.. Error: $message");
|
||||
}
|
||||
|
||||
@override
|
||||
void onProgressChanged(int progress) {
|
||||
print("Progress: $progress");
|
||||
}
|
||||
|
||||
@override
|
||||
void onExit() {
|
||||
print("\n\nBrowser closed!\n\n");
|
||||
onExitCallback(appo, isPaymentDone);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<ShouldOverrideUrlLoadingAction> shouldOverrideUrlLoading(
|
||||
ShouldOverrideUrlLoadingRequest shouldOverrideUrlLoadingRequest) async {
|
||||
print("\n\n override ${shouldOverrideUrlLoadingRequest.url}\n\n");
|
||||
return ShouldOverrideUrlLoadingAction.ALLOW;
|
||||
}
|
||||
|
||||
getLanguageID() async {
|
||||
return await sharedPref.getString(APP_LANGUAGE);
|
||||
}
|
||||
|
||||
Future<String> getDeviceToken() async {
|
||||
String deviceToken = await sharedPref.getString(PUSH_TOKEN);
|
||||
return deviceToken;
|
||||
}
|
||||
|
||||
getPatientData() async {
|
||||
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
|
||||
var data = AuthenticatedUser.fromJson(
|
||||
await this.sharedPref.getObject(USER_PROFILE));
|
||||
authUser = data;
|
||||
}
|
||||
}
|
||||
|
||||
openPaymentBrowser(
|
||||
double amount,
|
||||
String orderDesc,
|
||||
String transactionID,
|
||||
String projId,
|
||||
String emailId,
|
||||
String paymentMethod,
|
||||
AuthenticatedUser authenticatedUser,
|
||||
InAppBrowser browser,
|
||||
) {
|
||||
this.browser = browser;
|
||||
this.browser.openUrl(
|
||||
url: generateURL(amount, orderDesc, transactionID, projId, emailId,
|
||||
paymentMethod, authenticatedUser));
|
||||
|
||||
// this.browser.openData(
|
||||
// data: generateURL(amount, orderDesc, transactionID, projId, emailId,
|
||||
// paymentMethod, authenticatedUser),
|
||||
// baseUrl:
|
||||
// "https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx");
|
||||
}
|
||||
|
||||
String generateURL(
|
||||
double amount,
|
||||
String orderDesc,
|
||||
String transactionID,
|
||||
String projId,
|
||||
String emailId,
|
||||
String paymentMethod,
|
||||
AuthenticatedUser authUser,
|
||||
[var patientData,
|
||||
var servID,
|
||||
var LiveServID]) {
|
||||
getPatientData();
|
||||
String currentLanguageID = getLanguageID() == 'ar' ? 'AR' : 'EN';
|
||||
String form = getForm();
|
||||
String deviceToken;
|
||||
|
||||
getDeviceToken().then((value) {
|
||||
print(value);
|
||||
deviceToken = value;
|
||||
});
|
||||
|
||||
if (authUser != null) {
|
||||
form = form.replaceFirst("EMAIL_VALUE", authUser.emailAddress);
|
||||
} else {
|
||||
form = form.replaceFirst("EMAIL_VALUE", emailId);
|
||||
}
|
||||
|
||||
form = form.replaceFirst('AMOUNT_VALUE', amount.toString());
|
||||
form = form.replaceFirst('ORDER_DESCRIPTION_VALUE', orderDesc);
|
||||
form = form.replaceFirst('ORDER_ID_VALUE', transactionID);
|
||||
form = form.replaceFirst('REQUEST_ID_VALUE', transactionID);
|
||||
form = form.replaceFirst('PROJECT_ID_VALUE', projId);
|
||||
form = form.replaceFirst('PAYMENT_OPTION_VALUE', paymentMethod);
|
||||
form = form.replaceFirst('LANG_VALUE', currentLanguageID);
|
||||
form = form.replaceFirst('PATIENT_OUT_SA',
|
||||
authUser.outSA == 0 ? false.toString() : true.toString());
|
||||
form = form.replaceFirst(
|
||||
'PATIENT_TYPE_ID',
|
||||
patientData == null
|
||||
? authUser.patientType.toString()
|
||||
: patientData.PatientType);
|
||||
|
||||
// form = form.replaceFirst('DEVICE_TOKEN', this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false) + "," + this.cs.sharedService.getSharedData(AuthenticationService.APNS_TOKEN, false));
|
||||
// form = form.replaceFirst('LATITUDE_VALUE', this.cs.sharedService.getSharedData('userLat', false));
|
||||
// form = form.replaceFirst('LONGITUDE_VALUE', this.cs.sharedService.getSharedData('userLong', false));
|
||||
|
||||
form = form.replaceFirst('LATITUDE_VALUE', "24.708488");
|
||||
form = form.replaceFirst('LONGITUDE_VALUE', "46.665925");
|
||||
form = form.replaceFirst('DEVICE_TOKEN',
|
||||
"e8wKxa4EGK8:APA91bGtygxh5E22pSARVKlngyi0iQbyRUvvUWiCIsaAcbE0hiffhUR094WVx22O5bsvwc706LspzIuJthUyK_748jzuaedD-ZwDm9BX_yyYV2K2YnuFBlHQ9pOKy65RfoprtvqyTN1O");
|
||||
|
||||
if (servID == "4")
|
||||
form = form.replaceFirst(
|
||||
'SERVICE_URL_VALUE', MyInAppBrowser.PREAUTH_SERVICE_URL);
|
||||
else
|
||||
form = form.replaceFirst('SERVICE_URL_VALUE', MyInAppBrowser.SERVICE_URL);
|
||||
|
||||
if (servID != null) {
|
||||
form = form.replaceFirst('SERV_ID', servID);
|
||||
form = form.replaceFirst('LIVE_SERVICE_ID', LiveServID);
|
||||
} else {
|
||||
form = form.replaceFirst('SERV_ID', "2");
|
||||
form = form.replaceFirst('LIVE_SERVICE_ID', "2");
|
||||
}
|
||||
|
||||
if (patientData == null) {
|
||||
form = form.replaceFirst('CUSTNAME_VALUE', authUser.firstName);
|
||||
form = form.replaceFirst('CUSTID_VALUE', authUser.patientID.toString());
|
||||
} else {
|
||||
form = form.replaceFirst('CUSTNAME_VALUE', patientData.FirstName);
|
||||
form = form.replaceFirst('CUSTID_VALUE', patientData.PatientID);
|
||||
}
|
||||
|
||||
var bytes = utf8.encode(form);
|
||||
var base64Str = base64.encode(bytes);
|
||||
print(form);
|
||||
print('data:text/html;base64,' + base64Str);
|
||||
return 'data:text/html;base64,' + base64Str;
|
||||
}
|
||||
|
||||
String getForm() {
|
||||
return '<html> ' +
|
||||
'<head></head>' +
|
||||
'<body>' +
|
||||
'<form id="paymentForm" action="SERVICE_URL_VALUE" method="post">' +
|
||||
'<input type="hidden" name="Amount" value="AMOUNT_VALUE">' +
|
||||
'<input type="hidden" name="ProjID" value="PROJECT_ID_VALUE">' +
|
||||
'<input type="hidden" name="Order_Desc" value="ORDER_DESCRIPTION_VALUE">' +
|
||||
'<input type="hidden" name="OrderID" value="ORDER_ID_VALUE">' +
|
||||
// '<input type="hidden" name="reqID" value="REQUEST_ID_VALUE">' +
|
||||
'<input type="hidden" name="PaymentOption" value="PAYMENT_OPTION_VALUE">' +
|
||||
'<input type="hidden" name="Email" value="EMAIL_VALUE">' +
|
||||
'<input type="hidden" name="ServID" value="SERV_ID" >' +
|
||||
'<input type="hidden" name="ChannelID" value="2" >' +
|
||||
'<input type="hidden" name="Lang" value="LANG_VALUE" >' +
|
||||
'<input type="hidden" name="ReturnURL" value="" >' +
|
||||
'<input type="hidden" name="CustName" value="CUSTNAME_VALUE" >' +
|
||||
'<input type="hidden" name="PatientOutSA" value="PATIENT_OUT_SA" >' +
|
||||
'<input type="hidden" name="PatientTypeID" value="PATIENT_TYPE_ID" >' +
|
||||
'<input type="hidden" name="DeviceToken" value="DEVICE_TOKEN" >' +
|
||||
'<input type="hidden" name="Longitude" value="LONGITUDE_VALUE" >' +
|
||||
'<input type="hidden" name="Latitude" value="LATITUDE_VALUE" >' +
|
||||
'<input type="hidden" name="Live_ServiceID" value="LIVE_SERVICE_ID" >' +
|
||||
'<input type="hidden" name="CustID" value="CUSTID_VALUE" >' +
|
||||
'<input type="hidden" name="ResponseContinueURL" value="http://hmg.com/Documents/success.html" >' +
|
||||
'<input type="hidden" name="BackClickUrl" value="http://hmg.com/Documents/success.html" >' +
|
||||
'</form>' +
|
||||
'<script type="text/javascript"> document.getElementById("paymentForm").submit(); </script>' +
|
||||
'</body>' +
|
||||
'</html>';
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.2 KiB |