diff --git a/assets/images/new/body_parts/female/abdomin.svg b/assets/images/new/body_parts/female/abdomin.svg new file mode 100644 index 00000000..cc1dd1d0 --- /dev/null +++ b/assets/images/new/body_parts/female/abdomin.svg @@ -0,0 +1,345 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/anal.svg b/assets/images/new/body_parts/female/anal.svg new file mode 100644 index 00000000..96c9734d --- /dev/null +++ b/assets/images/new/body_parts/female/anal.svg @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/axilla.svg b/assets/images/new/body_parts/female/axilla.svg new file mode 100644 index 00000000..257b1c08 --- /dev/null +++ b/assets/images/new/body_parts/female/axilla.svg @@ -0,0 +1,346 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/back.svg b/assets/images/new/body_parts/female/back.svg new file mode 100644 index 00000000..96eba049 --- /dev/null +++ b/assets/images/new/body_parts/female/back.svg @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/bikini.svg b/assets/images/new/body_parts/female/bikini.svg new file mode 100644 index 00000000..24892c80 --- /dev/null +++ b/assets/images/new/body_parts/female/bikini.svg @@ -0,0 +1,345 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/bikini_line.svg b/assets/images/new/body_parts/female/bikini_line.svg new file mode 100644 index 00000000..f1f94b7f --- /dev/null +++ b/assets/images/new/body_parts/female/bikini_line.svg @@ -0,0 +1,345 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/buttocks.svg b/assets/images/new/body_parts/female/buttocks.svg new file mode 100644 index 00000000..59cd0071 --- /dev/null +++ b/assets/images/new/body_parts/female/buttocks.svg @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/cheeks.svg b/assets/images/new/body_parts/female/cheeks.svg new file mode 100644 index 00000000..6305ce65 --- /dev/null +++ b/assets/images/new/body_parts/female/cheeks.svg @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/chest.svg b/assets/images/new/body_parts/female/chest.svg new file mode 100644 index 00000000..3b681f90 --- /dev/null +++ b/assets/images/new/body_parts/female/chest.svg @@ -0,0 +1,345 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/chest_line.svg b/assets/images/new/body_parts/female/chest_line.svg new file mode 100644 index 00000000..dc4f8b25 --- /dev/null +++ b/assets/images/new/body_parts/female/chest_line.svg @@ -0,0 +1,345 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/chin.svg b/assets/images/new/body_parts/female/chin.svg new file mode 100644 index 00000000..37da45b4 --- /dev/null +++ b/assets/images/new/body_parts/female/chin.svg @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/ears.svg b/assets/images/new/body_parts/female/ears.svg new file mode 100644 index 00000000..758a69e6 --- /dev/null +++ b/assets/images/new/body_parts/female/ears.svg @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/eyebrows.svg b/assets/images/new/body_parts/female/eyebrows.svg new file mode 100644 index 00000000..9657daa7 --- /dev/null +++ b/assets/images/new/body_parts/female/eyebrows.svg @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/full_leg.svg b/assets/images/new/body_parts/female/full_leg.svg new file mode 100644 index 00000000..e1a5e46d --- /dev/null +++ b/assets/images/new/body_parts/female/full_leg.svg @@ -0,0 +1,348 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/full_neck.svg b/assets/images/new/body_parts/female/full_neck.svg new file mode 100644 index 00000000..f73f07f8 --- /dev/null +++ b/assets/images/new/body_parts/female/full_neck.svg @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/half_neck.svg b/assets/images/new/body_parts/female/half_neck.svg new file mode 100644 index 00000000..78e4cfab --- /dev/null +++ b/assets/images/new/body_parts/female/half_neck.svg @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/hydra_facial.svg b/assets/images/new/body_parts/female/hydra_facial.svg new file mode 100644 index 00000000..6a468211 --- /dev/null +++ b/assets/images/new/body_parts/female/hydra_facial.svg @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/lower_arm.svg b/assets/images/new/body_parts/female/lower_arm.svg new file mode 100644 index 00000000..6d5d2f39 --- /dev/null +++ b/assets/images/new/body_parts/female/lower_arm.svg @@ -0,0 +1,346 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/lower_leg.svg b/assets/images/new/body_parts/female/lower_leg.svg new file mode 100644 index 00000000..4961af4b --- /dev/null +++ b/assets/images/new/body_parts/female/lower_leg.svg @@ -0,0 +1,346 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/shoulder.svg b/assets/images/new/body_parts/female/shoulder.svg new file mode 100644 index 00000000..ce611e29 --- /dev/null +++ b/assets/images/new/body_parts/female/shoulder.svg @@ -0,0 +1,346 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/side_burn.svg b/assets/images/new/body_parts/female/side_burn.svg new file mode 100644 index 00000000..123216e7 --- /dev/null +++ b/assets/images/new/body_parts/female/side_burn.svg @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/upper_arm.svg b/assets/images/new/body_parts/female/upper_arm.svg new file mode 100644 index 00000000..ec126ffd --- /dev/null +++ b/assets/images/new/body_parts/female/upper_arm.svg @@ -0,0 +1,346 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/upper_leg.svg b/assets/images/new/body_parts/female/upper_leg.svg new file mode 100644 index 00000000..b1fd3a95 --- /dev/null +++ b/assets/images/new/body_parts/female/upper_leg.svg @@ -0,0 +1,346 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/female/upper_lips.svg b/assets/images/new/body_parts/female/upper_lips.svg new file mode 100644 index 00000000..72043376 --- /dev/null +++ b/assets/images/new/body_parts/female/upper_lips.svg @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/abdomin.svg b/assets/images/new/body_parts/male/abdomin.svg new file mode 100644 index 00000000..82e2d556 --- /dev/null +++ b/assets/images/new/body_parts/male/abdomin.svg @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/axilla.svg b/assets/images/new/body_parts/male/axilla.svg new file mode 100644 index 00000000..85abbfda --- /dev/null +++ b/assets/images/new/body_parts/male/axilla.svg @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/back.svg b/assets/images/new/body_parts/male/back.svg new file mode 100644 index 00000000..7d9aeb46 --- /dev/null +++ b/assets/images/new/body_parts/male/back.svg @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/bikini.svg b/assets/images/new/body_parts/male/bikini.svg new file mode 100644 index 00000000..1c545916 --- /dev/null +++ b/assets/images/new/body_parts/male/bikini.svg @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/bikini_line.svg b/assets/images/new/body_parts/male/bikini_line.svg new file mode 100644 index 00000000..7fdc51d1 --- /dev/null +++ b/assets/images/new/body_parts/male/bikini_line.svg @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/cheek.svg b/assets/images/new/body_parts/male/cheek.svg new file mode 100644 index 00000000..984a59f8 --- /dev/null +++ b/assets/images/new/body_parts/male/cheek.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/chest.svg b/assets/images/new/body_parts/male/chest.svg new file mode 100644 index 00000000..85a761fe --- /dev/null +++ b/assets/images/new/body_parts/male/chest.svg @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/chest_line.svg b/assets/images/new/body_parts/male/chest_line.svg new file mode 100644 index 00000000..806ddb0c --- /dev/null +++ b/assets/images/new/body_parts/male/chest_line.svg @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/chin.svg b/assets/images/new/body_parts/male/chin.svg new file mode 100644 index 00000000..9fdee93e --- /dev/null +++ b/assets/images/new/body_parts/male/chin.svg @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/ears.svg b/assets/images/new/body_parts/male/ears.svg new file mode 100644 index 00000000..1c9600c3 --- /dev/null +++ b/assets/images/new/body_parts/male/ears.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/eyebrows.svg b/assets/images/new/body_parts/male/eyebrows.svg new file mode 100644 index 00000000..ea385230 --- /dev/null +++ b/assets/images/new/body_parts/male/eyebrows.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/full_leg.svg b/assets/images/new/body_parts/male/full_leg.svg new file mode 100644 index 00000000..b5755167 --- /dev/null +++ b/assets/images/new/body_parts/male/full_leg.svg @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/full_neck.svg b/assets/images/new/body_parts/male/full_neck.svg new file mode 100644 index 00000000..43183598 --- /dev/null +++ b/assets/images/new/body_parts/male/full_neck.svg @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/half_neck.svg b/assets/images/new/body_parts/male/half_neck.svg new file mode 100644 index 00000000..4e57b51c --- /dev/null +++ b/assets/images/new/body_parts/male/half_neck.svg @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/hydra_facial.svg b/assets/images/new/body_parts/male/hydra_facial.svg new file mode 100644 index 00000000..10516304 --- /dev/null +++ b/assets/images/new/body_parts/male/hydra_facial.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/lower_arm.svg b/assets/images/new/body_parts/male/lower_arm.svg new file mode 100644 index 00000000..c8dbf48d --- /dev/null +++ b/assets/images/new/body_parts/male/lower_arm.svg @@ -0,0 +1,312 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/lower_leg.svg b/assets/images/new/body_parts/male/lower_leg.svg new file mode 100644 index 00000000..091c29a4 --- /dev/null +++ b/assets/images/new/body_parts/male/lower_leg.svg @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/shoulders.svg b/assets/images/new/body_parts/male/shoulders.svg new file mode 100644 index 00000000..bd6cac52 --- /dev/null +++ b/assets/images/new/body_parts/male/shoulders.svg @@ -0,0 +1,312 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/side_burn.svg b/assets/images/new/body_parts/male/side_burn.svg new file mode 100644 index 00000000..156b30f1 --- /dev/null +++ b/assets/images/new/body_parts/male/side_burn.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/upper_arm.svg b/assets/images/new/body_parts/male/upper_arm.svg new file mode 100644 index 00000000..7d959a0d --- /dev/null +++ b/assets/images/new/body_parts/male/upper_arm.svg @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/upper_leg.svg b/assets/images/new/body_parts/male/upper_leg.svg new file mode 100644 index 00000000..342cfd84 --- /dev/null +++ b/assets/images/new/body_parts/male/upper_leg.svg @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/new/body_parts/male/upper_lips.svg b/assets/images/new/body_parts/male/upper_lips.svg new file mode 100644 index 00000000..b7ae6e0f --- /dev/null +++ b/assets/images/new/body_parts/male/upper_lips.svg @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/config/config.dart b/lib/config/config.dart index 75de78f4..92cafb4b 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -15,8 +15,8 @@ const PACKAGES_CUSTOMER = '/api/customers'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_ORDERS = '/api/orders'; const PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; -// const BASE_URL = 'https://uat.hmgwebservices.com/'; -const BASE_URL = 'https://hmgwebservices.com/'; +const BASE_URL = 'https://uat.hmgwebservices.com/'; +// const BASE_URL = 'https://hmgwebservices.com/'; // Pharmacy UAT URLs // const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; @@ -362,6 +362,8 @@ const SEND_CHECK_IN_NFC_REQUEST = const HAS_DENTAL_PLAN = 'Services/Doctors.svc/REST/Dental_IsPatientHasOnGoingEstimation'; +const LASER_BODY_PARTS = 'Services/Patients.svc/REST/Laser_GetBodyPartsByCategory'; + //URL to get medicine and pharmacies list const CHANNEL = 3; const GENERAL_ID = 'Cs2020@2016\$2958'; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index ae7d045d..b52db706 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -64,6 +64,7 @@ const Map localizedValues = { 'appointmentSuccess': {'en': 'Appointment is successfully booked', 'ar': 'تم حجز الموعد بنجاح'}, 'docQualifications': {'en': 'Doctor Qualifications', 'ar': 'مؤهلات الطبيب'}, 'pressAgain': {'en': 'Press again to exit the app', 'ar': 'اضغط مرة أخرى للخروج من التطبيق'}, + 'laserMaxLimitReach': {'en': "Maximum limit is 90 minutes", 'ar': "الحد الأقصى هو 90 دقيقة"}, 'confirmAppoHeading': {'en': 'Kindly review your Appointment', 'ar': 'يرجى تأكيد موعدك'}, 'patientInfo': {'en': 'Patient Information', 'ar': 'معلومات المريض'}, 'doctorFilter': {'en': 'Doctors will be filtered based on your gender and age', 'ar': 'سيتم تصفية الأطباء بناءً على جنسك وعمرك'}, @@ -170,6 +171,7 @@ const Map localizedValues = { "minute": {"en": "Minutes", "ar": "دقيقة"}, "hour": {"en": "Hour", "ar": "ساعة"}, "reminderSuccess": {"en": "The reminder has been added successfully", "ar": "تمت إضافة التذكير بنجاح"}, + "reminderCancelSuccess": {"en": "The reminder has been cancelled successfully", "ar": "تم إلغاء التذكير بنجاح"}, "patientShareToDo": {"en": "Amount before tax: ", "ar": "المبلغ قبل الضريبة:"}, "patientTaxToDo": {"en": "Tax amount: ", "ar": "قيمة الضريبة:"}, "patientShareTotalToDo": {"en": "Total amount Due: ", "ar": "المبلغ الإجمالي المستحق:"}, @@ -448,6 +450,7 @@ const Map localizedValues = { "Frequency": {"en": "Frequency", "ar": "المعدل"}, "DailyQuantity": {"en": "Daily Quantity :", "ar": "جرعات يومية"}, "AddReminder": {"en": "Add Reminder", "ar": "إضافة تذكير"}, + "CancelReminder": {"en": "Cancel Reminder", "ar": "إلغاء تذكير"}, "reminderDes": { "en": "Please select treatment start day and time to be notified when it\'s time to take the medicine", "ar": "يرجى تحديد يوم بدء العلاج والوقت ليتم ارسال تنبيه عندما يحين الوقت لتناول الدواء" @@ -816,6 +819,11 @@ const Map localizedValues = { "respiration-signs": {"en": "Respiration", "ar": "تنفس"}, "sys-dias": {"en": "SBP/DBP", "ar": "إنقباض/إنبساط"}, "body": {"en": "Body Mass", "ar": "كتلة\nالجسم"}, + "body_string": {"en": "Body", "ar": "الجسم"}, + "face": {"en": "Face", "ar": "وجه"}, + "retouch": {"en": "Retouch", "ar": "تنميق"}, + "bikini": {"en": "Bikini", "ar": "بيكيني"}, + "totalMinutes": {"en": "Total Minutes", "ar": "إجمالي الدقائق"}, "feedback": {"en": "Feedback", "ar": "رأيك يهمنا"}, "send": {"en": "Send", "ar": "أرسل"}, "status": {"en": "Status", "ar": "الحالة"}, diff --git a/lib/core/viewModels/pharmacyModule/lacum-viewmodel.dart b/lib/core/viewModels/pharmacyModule/lacum-viewmodel.dart index c03e8e87..1bd0d542 100644 --- a/lib/core/viewModels/pharmacyModule/lacum-viewmodel.dart +++ b/lib/core/viewModels/pharmacyModule/lacum-viewmodel.dart @@ -1,5 +1,5 @@ import 'dart:async'; -import 'dart:convert' as convert; +import 'dart:convert'; import 'dart:typed_data'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; @@ -92,8 +92,8 @@ class LacumViewModel extends BaseViewModel { Uint8List convertBase64ToBarCodeImage() { try { - final _byteImage = convert.base64Decode( - lacumGroupInformation.lakumInquiryInformationObjVersion.barCode); + final _byteImage = base64Decode( + lacumGroupInformation.lakumInquiryInformationObjVersion.barCode.split(',').last); return _byteImage; } catch (e) { print(e); diff --git a/lib/models/Appointments/laser_body_parts.dart b/lib/models/Appointments/laser_body_parts.dart new file mode 100644 index 00000000..99896868 --- /dev/null +++ b/lib/models/Appointments/laser_body_parts.dart @@ -0,0 +1,64 @@ +class LaserBodyPart { + int id; + int category; + String bodyPart; + bool fullBoadyPart; + bool isRetouch; + String timeDuration; + String bodyPartN; + bool isActive; + String mappingCode; + int procedureID; + int orderNum; + String categoryName; + String categoryNameN; + + LaserBodyPart( + {this.id, + this.category, + this.bodyPart, + this.fullBoadyPart, + this.isRetouch, + this.timeDuration, + this.bodyPartN, + this.isActive, + this.mappingCode, + this.procedureID, + this.orderNum, + this.categoryName, + this.categoryNameN}); + + LaserBodyPart.fromJson(Map json) { + id = json['Id']; + category = json['Category']; + bodyPart = json['BodyPart']; + fullBoadyPart = json['FullBoadyPart']; + isRetouch = json['IsRetouch']; + timeDuration = json['TimeDuration']; + bodyPartN = json['BodyPartN']; + isActive = json['IsActive']; + mappingCode = json['MappingCode']; + procedureID = json['ProcedureID']; + orderNum = json['OrderNum']; + categoryName = json['CategoryName']; + categoryNameN = json['CategoryNameN']; + } + + Map toJson() { + final Map data = new Map(); + data['Id'] = this.id; + data['Category'] = this.category; + data['BodyPart'] = this.bodyPart; + data['FullBoadyPart'] = this.fullBoadyPart; + data['IsRetouch'] = this.isRetouch; + data['TimeDuration'] = this.timeDuration; + data['BodyPartN'] = this.bodyPartN; + data['IsActive'] = this.isActive; + data['MappingCode'] = this.mappingCode; + data['ProcedureID'] = this.procedureID; + data['OrderNum'] = this.orderNum; + data['CategoryName'] = this.categoryName; + data['CategoryNameN'] = this.categoryNameN; + return data; + } +} diff --git a/lib/pages/Blood/blood_donation.dart b/lib/pages/Blood/blood_donation.dart index c5e0f714..b61cd4fc 100644 --- a/lib/pages/Blood/blood_donation.dart +++ b/lib/pages/Blood/blood_donation.dart @@ -134,26 +134,33 @@ class _BloodDonationPageState extends State { ), SizedBox(height: 12), if (projectProvider.isLogin && model.state != ViewState.Busy) - CommonDropDownView(TranslationBase.of(context).city, projectProvider.isArabic ? _selectedHospital.descriptionN : _selectedHospital.description, () { - List list = [ - for (int i = 0; i < model.CitiesModelList.length; i++) - RadioSelectionDialogModel(projectProvider.isArabic ? model.CitiesModelList[i].descriptionN : model.CitiesModelList[i].description, i), - ]; - showDialog( - context: context, - child: RadioSelectionDialog( - listData: list, - selectedIndex: _selectedHospitalIndex, - isScrollable: true, - onValueSelected: (index) { - _selectedHospitalIndex = index; - _selectedHospital = model.CitiesModelList[index]; - setState(() {}); - }, - ), - ); - }).withBorderedContainer, + CommonDropDownView( + TranslationBase.of(context).city, + model.CitiesModelList.isNotEmpty + ? projectProvider.isArabic + ? model.CitiesModelList[_selectedHospitalIndex].descriptionN + : model.CitiesModelList[_selectedHospitalIndex].description + : "", () { + List list = [ + for (int i = 0; i < model.CitiesModelList.length; i++) + RadioSelectionDialogModel(projectProvider.isArabic ? model.CitiesModelList[i].descriptionN : model.CitiesModelList[i].description, i), + ]; + + showDialog( + context: context, + child: RadioSelectionDialog( + listData: list, + selectedIndex: _selectedHospitalIndex, + isScrollable: true, + onValueSelected: (index) { + _selectedHospitalIndex = index; + _selectedHospital = model.CitiesModelList[index]; + setState(() {}); + }, + ), + ); + }).withBorderedContainer, SizedBox(height: 12), CommonDropDownView(TranslationBase.of(context).gender, _selectedGenderIndex == 1 ? TranslationBase.of(context).male : TranslationBase.of(context).female, () { List list = [ diff --git a/lib/pages/BookAppointment/components/LaserClinic.dart b/lib/pages/BookAppointment/components/LaserClinic.dart new file mode 100644 index 00000000..37ec070a --- /dev/null +++ b/lib/pages/BookAppointment/components/LaserClinic.dart @@ -0,0 +1,523 @@ +import 'dart:collection'; + +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; +import 'package:diplomaticquarterapp/models/Appointments/laser_body_parts.dart'; +import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; +import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; +import 'package:diplomaticquarterapp/uitl/laser_body_parts_data.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class LaserClinic extends StatefulWidget { + LaserClinic({Key key}) : super(key: key); + + @override + _LaserClinicState createState() { + return _LaserClinicState(); + } +} + +class _LaserClinicState extends State with SingleTickerProviderStateMixin { + List _laserCategoryList = [1, 2, 11]; + List _selectedBodyPartList = []; + bool _isFullBody = false; + LaserBodyPart fullBody; + int _selectedCategoryIndex = 0; + List laserBodyPartsList = []; + + TabController _tabController; + int _duration = 0; + + List maleLaserCategory = []; + List femaleLaserCategory = []; + + @override + void initState() { + super.initState(); + _tabController = TabController(length: 2, vsync: this); + _tabController.addListener(() { + if (_tabController.indexIsChanging) { + } else { + _selectedBodyPartList = List(); + laserBodyPartsList = List(); + _selectedCategoryIndex = 0; + setState(() {}); + if (_tabController.index == 0) { + callLaserBodyPartsAPI(maleLaserCategory[_selectedCategoryIndex].laserCategoryID); + } else { + callLaserBodyPartsAPI(femaleLaserCategory[_selectedCategoryIndex].laserCategoryID); + } + } + }); + Future.delayed(Duration.zero, () { + callLaserBodyPartsAPI(maleLaserCategory[_selectedCategoryIndex].laserCategoryID); + }); + } + + callLaserBodyPartsAPI(int laserCategoryId) async { + GifLoaderDialogUtils.showMyDialog(context); + + DoctorsListService service = new DoctorsListService(); + service.getLaserBodyPartsList(laserCategoryId).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + if (res['Laser_GetBodyPartsByCategoryList'].length != 0) { + List _tempList = List(); + res['Laser_GetBodyPartsByCategoryList'].forEach((v) { + _tempList.add(LaserBodyPart.fromJson(v)); + }); + if (_tempList[0].category == 1 || _tempList[0].category == 11 || _tempList[0].category == 2 || _tempList[0].category == 10) { + fullBody = _tempList[0]; + _tempList.removeAt(0); + } + laserBodyPartsList = _tempList; + } else {} + setState(() {}); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err); + }); + } + + bool lastIndexIsFirst = false; + bool isLastIndexIsBack = false; + ProjectViewModel projectViewModel; + + bool get isMale => _tabController.index == 0; + + @override + void dispose() { + super.dispose(); + _tabController.dispose(); + } + + @override + Widget build(BuildContext context) { + projectViewModel = Provider.of(context); + maleLaserCategory = [ + LaserCategoryType(1, TranslationBase.of(context).bodyString), + LaserCategoryType(2, TranslationBase.of(context).face), + LaserCategoryType(11, TranslationBase.of(context).retouch), + ]; + femaleLaserCategory = [ + LaserCategoryType(1, TranslationBase.of(context).bodyString), + LaserCategoryType(2, TranslationBase.of(context).face), + LaserCategoryType(10, TranslationBase.of(context).bikini), + LaserCategoryType(11, TranslationBase.of(context).retouch), + ]; + return AppScaffold( + appBarTitle: TranslationBase.of(context).laserClinic, + showNewAppBar: true, + showNewAppBarTitle: true, + isShowDecPage: false, + backgroundColor: Color(0xfff7f7f7), + body: Column( + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + letterSpacing: -0.48, + ), + tabs: [Text(TranslationBase.of(context).male), Text(TranslationBase.of(context).female)], + ), + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [male(), female()], + ), + ), + Row( + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + TranslationBase.of(context).totalMinutes + ":", + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff575757), + letterSpacing: -0.48, + ), + ), + Text( + "${getDuration()} / 90", + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + color: Color(0xff2E303A), + letterSpacing: -0.64, + ), + ), + ], + ), + ), + Expanded( + child: DefaultButton( + TranslationBase.of(context).continues, + getDuration() != 0 ? () { + callDoctorsSearchAPI(); + } : null, + color: CustomColors.green, + disabledColor: CustomColors.grey2, + ), + ), + ], + ).insideContainer, + ], + ), + ); + } + + callDoctorsSearchAPI() { + GifLoaderDialogUtils.showMyDialog(context); + List doctorsList = []; + List arr = []; + List arrDistance = []; + List result; + int numAll; + List _patientDoctorAppointmentListHospital = List(); + + DoctorsListService service = new DoctorsListService(); + service.getDoctorsList(253, 0, false, context).then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + setState(() { + if (res['DoctorList'].length != 0) { + doctorsList.clear(); + res['DoctorList'].forEach((v) { + doctorsList.add(new DoctorList.fromJson(v)); + }); + doctorsList.forEach((element) { + List doctorByHospital = _patientDoctorAppointmentListHospital + .where( + (elementClinic) => elementClinic.filterName == element.projectName, + ) + .toList(); + + if (doctorByHospital.length != 0) { + _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element); + } else { + _patientDoctorAppointmentListHospital + .add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); + } + }); + } else {} + }); + + result = LinkedHashSet.from(arr).toList(); + numAll = result.length; + navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage']); + } + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + AppToast.showErrorToast(message: err); + }); + } + + Future navigateToSearchResults(context, List docList, List patientDoctorAppointmentListHospital) async { + Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital))) + .then((value) { + setState(() { + // dropdownValue = null; + }); + // getProjectsList(); + }); + } + + int getDuration() { + int duration = 0; + if (_isFullBody) { + _duration = int.parse(fullBody.timeDuration); + return _duration; + } + + var lowerUpperLegsList = _selectedBodyPartList.where((element) => element.mappingCode == "47" || element.mappingCode == "48")?.toList() ?? []; + var upperLowerArmsList = _selectedBodyPartList.where((element) => element.mappingCode == "40" || element.mappingCode == "41")?.toList() ?? []; + + if (_selectedBodyPartList.length > 0) { + duration = _selectedBodyPartList.fold(0, (previousValue, element) => previousValue + int.parse(element.timeDuration)); + } + print("duration:$duration"); + if (lowerUpperLegsList.length == 2) { + duration -= 30; + } + print("duration1:$duration"); + if (upperLowerArmsList.length == 2) { + duration -= 15; + } + print("duration2:$duration"); + // for (int i = 0; i < _selectedBodyPartList.length; i++) { + // if ( + // + // (lowerUpperLegsList.length == 2 && (_selectedBodyPartList[i].mappingCode == "47" || _selectedBodyPartList[i].mappingCode == "48")) || + // (upperLowerArmsList.length == 2 && (_selectedBodyPartList[i].mappingCode == "40" || _selectedBodyPartList[i].mappingCode == "41")) + // + // + // ) { + // print("duration:$duration"); + // + // duration += 15; + // print("duration1:$duration"); + // } else { + // duration += int.parse(_selectedBodyPartList[i].timeDuration); + // } + // } + print(duration); + _duration = duration; + return duration; + } + + Widget laserCategoryWidget(List list, VoidCallback onTap) { + return SizedBox( + height: 40, + child: ListView.separated( + itemCount: list.length, + physics: BouncingScrollPhysics(), + scrollDirection: Axis.horizontal, + separatorBuilder: (cxt, index) => SizedBox(width: 8), + itemBuilder: (cxt, index) { + return InkWell( + onTap: () { + // setState(() { + _selectedCategoryIndex = index; + // }); + onTap(); + }, + child: Container( + decoration: BoxDecoration( + color: _selectedCategoryIndex == index ? Color(0xffD02127) : Colors.white, + borderRadius: BorderRadius.circular(36), + border: Border.all( + width: 1, + color: _selectedCategoryIndex == index ? Colors.transparent : Color(0xffEAEAEA), + ), + ), + padding: EdgeInsets.symmetric(vertical: 8, horizontal: 26), + child: Text( + list[index].title, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: _selectedCategoryIndex == index ? Colors.white : Color(0xff535353), + letterSpacing: -0.48, + ), + ), + ), + ); + }, + ), + ); + } + + Widget bodyPartsGridView() { + return Container( + padding: EdgeInsets.symmetric(vertical: 21, horizontal: 14), + margin: EdgeInsets.only(top: 16), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all( + Radius.circular(15.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + if (fullBody != null) + Row( + children: [ + SizedBox( + width: 22, + height: 22, + child: Theme( + data: Theme.of(context).copyWith( + unselectedWidgetColor: Color(0xffEAEAEA), + ), + child: Checkbox( + value: _isFullBody, + onChanged: (value) { + setState(() { + if (value) { + _selectedBodyPartList.clear(); + } + _isFullBody = !_isFullBody; + }); + }, + activeColor: Color(0xffD02127), + ), + ), + ), + SizedBox(width: 12), + Text( + projectViewModel.isArabic ? fullBody.bodyPartN : fullBody.bodyPart, + style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.6, height: 21 / 14), + ), + ], + ), + GridView.builder( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 85 / 107, crossAxisSpacing: 4, mainAxisSpacing: 21), + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemCount: laserBodyPartsList.length, + padding: fullBody != null ? EdgeInsets.only(top: 16) : EdgeInsets.zero, + itemBuilder: (BuildContext context, int index) { + bool _isSelected = _selectedBodyPartList.any((file) => file.id == laserBodyPartsList[index].id); + return InkWell( + onTap: _isFullBody + ? null + : () { + if (_duration >= 90) { + if (_isSelected) { + _selectedBodyPartList.removeWhere((element) => element.id == laserBodyPartsList[index].id); + + // _selectedBodyPartList.remove(laserBodyPartsList[index]); + setState(() {}); + return; + } + AppToast.showToast(message: TranslationBase.of(context).laserMaxLimitReach); + return; + } + if (_isSelected) { + _selectedBodyPartList.removeWhere((element) => element.id == laserBodyPartsList[index].id); + // _selectedBodyPartList.remove(laserBodyPartsList[index]); + } else { + if (_duration + int.parse(laserBodyPartsList[index].timeDuration) > 90) { + AppToast.showToast(message: TranslationBase.of(context).laserMaxLimitReach); + return; + } + _selectedBodyPartList.add(laserBodyPartsList[index]); + } + setState(() {}); + }, + child: AnimatedOpacity( + opacity: _isFullBody ? 0.25 : 1.0, + duration: Duration(milliseconds: 200), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AspectRatio( + aspectRatio: 97 / 97, + child: FittedBox( + fit: BoxFit.fitWidth, + child: Stack( + alignment: Alignment.topRight, + children: [ + Container( + margin: EdgeInsets.only(top: 5, right: 5), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15.0), + border: Border.all(color: _isSelected ? Color(0xffD02127) : Color(0xffEAEAEA), width: 2), + ), + child: LaserBodyParts() + .getCategoryImage(isMale, (isMale ? maleLaserCategory : femaleLaserCategory)[_selectedCategoryIndex].laserCategoryID, laserBodyPartsList[index].mappingCode), + ), + if (_isSelected) + Container( + width: 18, + height: 18, + child: Icon(Icons.done, color: Colors.white, size: 12), + decoration: BoxDecoration( + color: Color(0xffD02127), + borderRadius: BorderRadius.circular(30.0), + ), + ), + ], + ), + ), + ), + SizedBox(height: 6), + Expanded( + child: Text( + projectViewModel.isArabic ? laserBodyPartsList[index].bodyPartN : laserBodyPartsList[index].bodyPart, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff2B353E), + letterSpacing: -0.48, + ), + maxLines: 1, + ), + ), + ], + ), + ), + ); + }, + ), + ], + ), + ); + } + + Widget male() { + return ListView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + children: [ + laserCategoryWidget(maleLaserCategory, () { + callLaserBodyPartsAPI(maleLaserCategory[_selectedCategoryIndex].laserCategoryID); + }), + if (laserBodyPartsList.isNotEmpty) bodyPartsGridView() + ], + ); + } + + Widget female() { + return ListView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + children: [ + laserCategoryWidget(femaleLaserCategory, () { + callLaserBodyPartsAPI(femaleLaserCategory[_selectedCategoryIndex].laserCategoryID); + }), + if (laserBodyPartsList.isNotEmpty) bodyPartsGridView() + ], + ); + } +} + +class LaserCategoryType { + int laserCategoryID; + String title; + + LaserCategoryType(this.laserCategoryID, this.title); +} diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index c2f667c2..1703f183 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -25,6 +25,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:provider/provider.dart'; +import 'LaserClinic.dart'; import 'LiveCareBookAppointment.dart'; class SearchByClinic extends StatefulWidget { @@ -100,7 +101,9 @@ class _SearchByClinicState extends State { top: 20, ), child: Text( - TranslationBase.of(context).doctorFilter, + TranslationBase + .of(context) + .doctorFilter, style: TextStyle( fontSize: 16, fontWeight: FontWeight.w600, @@ -115,7 +118,9 @@ class _SearchByClinicState extends State { Padding( padding: const EdgeInsets.only(left: 20, right: 20), child: Text( - TranslationBase.of(context).gender, + TranslationBase + .of(context) + .gender, style: TextStyle( fontSize: 12, letterSpacing: -0.48, @@ -130,48 +135,56 @@ class _SearchByClinicState extends State { children: [ Flexible( child: Row( - children: [ - Radio( - value: TranslationBase.of(context).female, - groupValue: radioValue, - onChanged: (v) { - setState(() { - radioValue = v; - }); - }, - ), - Text( - TranslationBase.of(context).female, - style: TextStyle( - fontSize: 12, - letterSpacing: -0.48, - fontWeight: FontWeight.w600, - ), - ), - ], - )), + children: [ + Radio( + value: TranslationBase + .of(context) + .female, + groupValue: radioValue, + onChanged: (v) { + setState(() { + radioValue = v; + }); + }, + ), + Text( + TranslationBase + .of(context) + .female, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + )), Flexible( child: Row( - children: [ - Radio( - value: TranslationBase.of(context).male, - groupValue: radioValue, - onChanged: (v) { - setState(() { - radioValue = v; - }); - }, - ), - Text( - TranslationBase.of(context).male, - style: TextStyle( - fontSize: 12, - letterSpacing: -0.48, - fontWeight: FontWeight.w600, - ), - ), - ], - )), + children: [ + Radio( + value: TranslationBase + .of(context) + .male, + groupValue: radioValue, + onChanged: (v) { + setState(() { + radioValue = v; + }); + }, + ), + Text( + TranslationBase + .of(context) + .male, + style: TextStyle( + fontSize: 12, + letterSpacing: -0.48, + fontWeight: FontWeight.w600, + ), + ), + ], + )), ], ), ), @@ -201,164 +214,173 @@ class _SearchByClinicState extends State { }); }, ), - Text(TranslationBase.of(context).nearestAppo, style: TextStyle(fontSize: 14.0, letterSpacing: -0.56)), + Text(TranslationBase + .of(context) + .nearestAppo, style: TextStyle(fontSize: 14.0, letterSpacing: -0.56)), ], ), ), widget.clnicIds != null && widget.clnicIds.length > 1 && isLoaded == true ? Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: clinicsList.map((result) { - return RoundedContainer( - child: ListTile( - onTap: () { - // setState(() { - dropdownValue = result.clinicID.toString(); - setState(() { - if (!isDentalSelectedAndSupported()) { - projectDropdownValue = ""; - getDoctorsList(context); - } else {} - }); - }, - title: Text(result.clinicDescription, style: TextStyle(fontSize: 14.0, color: Colors.grey[700], letterSpacing: 1.0)))); - }).toList()) + crossAxisAlignment: CrossAxisAlignment.start, + children: clinicsList.map((result) { + return RoundedContainer( + child: ListTile( + onTap: () { + // setState(() { + dropdownValue = result.clinicID.toString(); + setState(() { + if (!isDentalSelectedAndSupported()) { + projectDropdownValue = ""; + getDoctorsList(context); + } else {} + }); + }, + title: Text(result.clinicDescription, style: TextStyle(fontSize: 14.0, color: Colors.grey[700], letterSpacing: 1.0)))); + }).toList()) : InkWell( - onTap: () { - // dropdownKey.currentState; - openDropdown(clinicDropdownKey); - }, - child: Container( - width: double.infinity, - decoration: containerRadius(Colors.white, 12), - margin: EdgeInsets.only(left: 20, right: 20), - padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12), - child: Row( + onTap: () { + // dropdownKey.currentState; + openDropdown(clinicDropdownKey); + }, + child: Container( + width: double.infinity, + decoration: containerRadius(Colors.white, 12), + margin: EdgeInsets.only(left: 20, right: 20), + padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12), + child: Row( + children: [ + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Flexible( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - TranslationBase.of(context).selectClinic, - style: TextStyle( - fontSize: 11, - letterSpacing: -0.44, - fontWeight: FontWeight.w600, - ), - ), - Container( - height: 18, - child: DropdownButtonHideUnderline( - child: DropdownButton( - onTap: () { - print("Clicked"); - }, - key: clinicDropdownKey, - hint: new Text( - TranslationBase.of(context).selectClinic, - ), - value: dropdownValue, - iconSize: 0, - isExpanded: true, - style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'), - items: clinicsList.map((item) { - return new DropdownMenuItem( - value: item.clinicID.toString() + - "-" + - item.isLiveCareClinicAndOnline.toString() + - "-" + - item.liveCareClinicID.toString() + - "-" + - item.liveCareServiceID.toString(), - child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text(item.clinicDescription), - item.isLiveCareClinicAndOnline - ? SvgPicture.asset('assets/images/new-design/video_icon_green_right.svg', height: 12, width: 12, fit: BoxFit.cover) - : Container(), - ]), - ); - }).toList(), - onChanged: (newValue) { - setState(() { - print(newValue); - dropdownValue = newValue; - if (!isDentalSelectedAndSupported() && !nearestAppo) { - projectDropdownValue = ""; - getDoctorsList(context); - } else { - print("Dental"); - } - }); - }, - ), - ), + Text( + TranslationBase + .of(context) + .selectClinic, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Container( + height: 18, + child: DropdownButtonHideUnderline( + child: DropdownButton( + onTap: () { + print("Clicked"); + }, + key: clinicDropdownKey, + hint: new Text( + TranslationBase + .of(context) + .selectClinic, ), - ], + value: dropdownValue, + iconSize: 0, + isExpanded: true, + style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'), + items: clinicsList.map((item) { + return new DropdownMenuItem( + value: item.clinicID.toString() + + "-" + + item.isLiveCareClinicAndOnline.toString() + + "-" + + item.liveCareClinicID.toString() + + "-" + + item.liveCareServiceID.toString(), + child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ + Text(item.clinicDescription), + item.isLiveCareClinicAndOnline + ? SvgPicture.asset('assets/images/new-design/video_icon_green_right.svg', height: 12, width: 12, fit: BoxFit.cover) + : Container(), + ]), + ); + }).toList(), + onChanged: (newValue) { + setState(() { + print(newValue); + dropdownValue = newValue; + if (dropdownValue == "253-false-0-0") { + Navigator.push(context, FadePage(page: LaserClinic())); + } else + if (!isDentalSelectedAndSupported() && !nearestAppo) { + projectDropdownValue = ""; + getDoctorsList(context); + } else { + print("Dental"); + } + }); + }, + ), ), ), - Icon(Icons.keyboard_arrow_down), ], ), ), - ), + Icon(Icons.keyboard_arrow_down), + ], + ), + ), + ), mHeight(20), isDentalSelectedAndSupported() == true || (nearestAppo && isProjectLoaded) ? InkWell( - onTap: () { - openDropdown(projectDropdownKey); - }, - child: Container( - width: double.infinity, - decoration: containerRadius(Colors.white, 12), - margin: EdgeInsets.only(left: 20, right: 20), - padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12), - child: Row( + onTap: () { + openDropdown(projectDropdownKey); + }, + child: Container( + width: double.infinity, + decoration: containerRadius(Colors.white, 12), + margin: EdgeInsets.only(left: 20, right: 20), + padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12), + child: Row( + children: [ + Flexible( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Flexible( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - TranslationBase.of(context).selectHospital, - style: TextStyle( - fontSize: 11, - letterSpacing: -0.44, - fontWeight: FontWeight.w600, - ), - ), - Container( - height: 18, - child: DropdownButtonHideUnderline( - child: DropdownButton( - key: projectDropdownKey, - hint: new Text(TranslationBase.of(context).selectHospital), - value: projectDropdownValue, - iconSize: 0, - isExpanded: true, - style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black), - items: projectsList.map((item) { - return new DropdownMenuItem( - value: item.mainProjectID.toString(), - child: new Text(item.name), - ); - }).toList(), - onChanged: (newValue) { - setState(() { - projectDropdownValue = newValue; - getDoctorsList(context); - }); - }, - ), - ), - ), - ], + Text( + TranslationBase.of(context).selectHospital, + style: TextStyle( + fontSize: 11, + letterSpacing: -0.44, + fontWeight: FontWeight.w600, + ), + ), + Container( + height: 18, + child: DropdownButtonHideUnderline( + child: DropdownButton( + key: projectDropdownKey, + hint: new Text(TranslationBase.of(context).selectHospital), + value: projectDropdownValue, + iconSize: 0, + isExpanded: true, + style: TextStyle(fontSize: 14, letterSpacing: -0.56, color: Colors.black), + items: projectsList.map((item) { + return new DropdownMenuItem( + value: item.mainProjectID.toString(), + child: new Text(item.name), + ); + }).toList(), + onChanged: (newValue) { + setState(() { + projectDropdownValue = newValue; + getDoctorsList(context); + }); + }, + ), ), ), - Icon(Icons.keyboard_arrow_down), ], - )), - ) + ), + ), + Icon(Icons.keyboard_arrow_down), + ], + )), + ) : Container(), ], ), @@ -590,7 +612,7 @@ class _SearchByClinicState extends State { List doctorByHospital = _patientDoctorAppointmentListHospital .where( (elementClinic) => elementClinic.filterName == element.projectName, - ) + ) .toList(); if (doctorByHospital.length != 0) { diff --git a/lib/pages/BookAppointment/widgets/reminder_dialog.dart b/lib/pages/BookAppointment/widgets/reminder_dialog.dart index 43038658..723bf538 100644 --- a/lib/pages/BookAppointment/widgets/reminder_dialog.dart +++ b/lib/pages/BookAppointment/widgets/reminder_dialog.dart @@ -14,13 +14,15 @@ Future> requestPermissions() async { } showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted, - {Function onSuccess, String title, String description}) async { + {Function onSuccess, String title, String description, Function(int) onMultiDateSuccess}) async { if (await Permission.calendar.request().isGranted) { - _showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted, onSuccess: onSuccess, title: title, description: description); + _showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted, + onSuccess: onSuccess, title: title, description: description, onMultiDateSuccess: onMultiDateSuccess); } else { requestPermissions().then((results) { if (results[Permission.calendar].isGranted) { - _showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted, onSuccess: onSuccess, title: title, description: description); + _showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted, + onSuccess: onSuccess, title: title, description: description, onMultiDateSuccess: onMultiDateSuccess); } }); } @@ -29,7 +31,7 @@ showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, S final CalendarPlugin _myPlugin = CalendarPlugin(); Future _showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted, - {Function onSuccess, String title, String description}) async { + {Function onSuccess, String title, String description, Function(int) onMultiDateSuccess}) async { return showDialog( context: context, barrierDismissible: true, // user must tap button! @@ -56,16 +58,20 @@ Future _showReminderDialog(BuildContext context, DateTime dateTime, String // dateTime.add(new Duration(minutes: -120)); dateTime = Jiffy(dateTime).subtract(hours: 2); } - CalendarUtils calendarUtils = await CalendarUtils.getInstance(); - calendarUtils - .createOrUpdateEvent( - title: title ?? TranslationBase.of(context).reminderTitle + " " + doctorName, - description: description ?? "At " + appoDateFormatted + " " + appoTimeFormatted, - scheduleDateTime: dateTime, - eventId: eventId) - .then((value) {}); + if (onMultiDateSuccess == null) { + CalendarUtils calendarUtils = await CalendarUtils.getInstance(); + calendarUtils + .createOrUpdateEvent( + title: title ?? TranslationBase.of(context).reminderTitle + " " + doctorName, + description: description ?? "At " + appoDateFormatted + " " + appoTimeFormatted, + scheduleDateTime: dateTime, + eventId: eventId) + .then((value) {}); - onSuccess(); + onSuccess(); + } else { + onMultiDateSuccess(i); + } }, ), ); @@ -144,12 +150,14 @@ class _ReminderDialogState extends State { }); }, ), - Text(TranslationBase.of(context).appoReminder30, + Text( + TranslationBase.of(context).appoReminder30, style: TextStyle( fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.48, - ),), + ), + ), ], ), Row( @@ -163,12 +171,14 @@ class _ReminderDialogState extends State { }); }, ), - Text(TranslationBase.of(context).appoReminder60, + Text( + TranslationBase.of(context).appoReminder60, style: TextStyle( fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.48, - ),), + ), + ), ], ), Row( @@ -182,12 +192,14 @@ class _ReminderDialogState extends State { }); }, ), - Text(TranslationBase.of(context).appoReminder90, + Text( + TranslationBase.of(context).appoReminder90, style: TextStyle( fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.48, - ),), + ), + ), ], ), Row( diff --git a/lib/pages/DrawerPages/notifications/notification_details_page.dart b/lib/pages/DrawerPages/notifications/notification_details_page.dart index 6a24a52f..4e249e53 100644 --- a/lib/pages/DrawerPages/notifications/notification_details_page.dart +++ b/lib/pages/DrawerPages/notifications/notification_details_page.dart @@ -58,48 +58,48 @@ class NotificationsDetailsPage extends StatelessWidget { fontSize: 18.0, color: Colors.black, fontWeight: FontWeight.w600 + ), ), ), ), - ), - SizedBox( - height: 15, - ), - if (notification.messageTypeData.length != 0) - FractionallySizedBox( - widthFactor: 0.9, - child: Image.network(notification.messageTypeData, - loadingBuilder: (BuildContext context, Widget child, - ImageChunkEvent loadingProgress) { - if (loadingProgress == null) return child; - return Center( - child: SizedBox( - width: 40.0, - height: 40.0, - child: AppCircularProgressIndicator(), - ), - ); - }, - fit: BoxFit - .fill) //Image.network(notification.messageTypeData), + SizedBox( + height: 15, ), - SizedBox( - height: 15, - ), - Row( - children: [ - Expanded( - child: Center( - child: Text(notification.message), + if (notification.messageTypeData.length != 0) + FractionallySizedBox( + widthFactor: 0.9, + child: Image.network(notification.messageTypeData, + loadingBuilder: (BuildContext context, Widget child, + ImageChunkEvent loadingProgress) { + if (loadingProgress == null) return child; + return Center( + child: SizedBox( + width: 40.0, + height: 40.0, + child: AppCircularProgressIndicator(), + ), + ); + }, + fit: BoxFit + .fill) //Image.network(notification.messageTypeData), + ), + SizedBox( + height: 15, + ), + Row( + children: [ + Expanded( + child: Center( + child: Text(notification.message), + ), ), - ), - ], - ), - ], + ], + ), + ], + ), ), ), ), - ), ); } } diff --git a/lib/pages/DrawerPages/notifications/notifications_page.dart b/lib/pages/DrawerPages/notifications/notifications_page.dart index 498afde8..fc34dbfe 100644 --- a/lib/pages/DrawerPages/notifications/notifications_page.dart +++ b/lib/pages/DrawerPages/notifications/notifications_page.dart @@ -25,156 +25,128 @@ class NotificationsPage extends StatelessWidget { AppGlobal.context = context; return BaseView( onModelReady: (model) { - GetNotificationsRequestModel getNotificationsRequestModel = - new GetNotificationsRequestModel( - currentPage: currentIndex, - pagingSize: 14, - notificationStatusID: 2); + GetNotificationsRequestModel getNotificationsRequestModel = new GetNotificationsRequestModel(currentPage: currentIndex, pagingSize: 14, notificationStatusID: 2); model.getNotifications(getNotificationsRequestModel, context); }, builder: (_, model, widget) => AppScaffold( - isShowAppBar: true, - showNewAppBar: true, - showNewAppBarTitle: true, - appBarTitle: TranslationBase.of(context).notifications, - baseViewModel: model, - body: ListView.separated( - itemBuilder: (context, index) { - if (index == model.notifications.length) { - return InkWell( - onTap: () async { - GifLoaderDialogUtils.showMyDialog(context); - currentIndex++; - GetNotificationsRequestModel - getNotificationsRequestModel = - new GetNotificationsRequestModel( - currentPage: currentIndex, - pagingSize: 14, - notificationStatusID: 2); - - await model.getNotifications( - getNotificationsRequestModel, context); - GifLoaderDialogUtils.hideDialog(context); - }, - child: Center( - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - // Image.asset('assets/images/notf.png'), - Icon( - Icons.notifications_active, - color: CustomColors.accentColor, - size: 40, - ), - Padding( - padding: const EdgeInsets.only(left: 10.0, right: 10.0), - child: Text(TranslationBase.of(context).moreNotifications, style: TextStyle( - color: CustomColors.accentColor, - fontWeight: FontWeight.w600, - letterSpacing: -0.64, - decoration: TextDecoration.underline - )), - ), - ], - ), - ), - ); - } - + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + appBarTitle: TranslationBase.of(context).notifications, + baseViewModel: model, + body: ListView.separated( + itemBuilder: (context, index) { + if (index == model.notifications.length) { return InkWell( onTap: () async { - if (!model.notifications[index].isRead) { - model.markAsRead(model.notifications[index].id); - } - Navigator.push( - context, - FadePage( - page: NotificationsDetailsPage( - notification: model.notifications[index], - ))); + GifLoaderDialogUtils.showMyDialog(context); + currentIndex++; + GetNotificationsRequestModel getNotificationsRequestModel = new GetNotificationsRequestModel(currentPage: currentIndex, pagingSize: 14, notificationStatusID: 2); + + await model.getNotifications(getNotificationsRequestModel, context); + GifLoaderDialogUtils.hideDialog(context); }, - child: Container( - width: double.infinity, - padding: EdgeInsets.all(8.0), - decoration: BoxDecoration( - color: model.notifications[index].isRead - ? Theme.of(context).scaffoldBackgroundColor - : CustomColors.accentColor.withOpacity(0.05), - border: projectViewModel.isArabic - ? Border( - right: BorderSide( - color: model.notifications[index].isRead - ? Theme.of(context).scaffoldBackgroundColor - : CustomColors.accentColor, - width: 5.0, - ), - ) - : Border( - left: BorderSide( - color: model.notifications[index].isRead - ? Theme.of(context).scaffoldBackgroundColor - : CustomColors.accentColor, - width: 5.0, - ), - ), - ), + child: Center( child: Row( - children: [ - Expanded( - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts(DateUtil.getDayMonthYearDateFormatted( - DateUtil.convertStringToDate(model - .notifications[index].createdOn)) + - " " + - DateUtil.formatDateToTimeLang( - DateUtil.convertStringToDate(model - .notifications[index].createdOn), - false)), - SizedBox( - height: 5, - ), - Row( - children: [ - Expanded( - child: Texts(model - .notifications[index].message)), - if (model - .notifications[index].messageType == - "image") - Icon( - FontAwesomeIcons.images, - color: CustomColors.grey, - ) - ], - ), - SizedBox( - height: 5, - ), - ], - ), - ), + mainAxisAlignment: MainAxisAlignment.center, + children: [ + // Image.asset('assets/images/notf.png'), + Icon( + Icons.notifications_active, + color: CustomColors.accentColor, + size: 40, + ), + Padding( + padding: const EdgeInsets.only(left: 10.0, right: 10.0), + child: Text(TranslationBase.of(context).moreNotifications, + style: TextStyle(color: CustomColors.accentColor, fontWeight: FontWeight.w600, letterSpacing: -0.64, decoration: TextDecoration.underline)), ), ], ), ), ); - }, - separatorBuilder: (context, index) { - return Column( - children: [ - Divider( - color: Colors.grey[300], - thickness: 2.0, - ), - ], - ); - }, - itemCount: model.notifications.length + 1)), + } + + return InkWell( + onTap: () async { + if (!model.notifications[index].isRead) { + model.markAsRead(model.notifications[index].id); + } + Navigator.push( + context, + FadePage( + page: NotificationsDetailsPage( + notification: model.notifications[index], + ))); + }, + child: Container( + width: double.infinity, + padding: EdgeInsets.all(8.0), + decoration: BoxDecoration( + color: model.notifications[index].isRead ? Theme.of(context).scaffoldBackgroundColor : CustomColors.accentColor.withOpacity(0.05), + border: projectViewModel.isArabic + ? Border( + right: BorderSide( + color: model.notifications[index].isRead ? Theme.of(context).scaffoldBackgroundColor : CustomColors.accentColor, + width: 5.0, + ), + ) + : Border( + left: BorderSide( + color: model.notifications[index].isRead ? Theme.of(context).scaffoldBackgroundColor : CustomColors.accentColor, + width: 5.0, + ), + ), + ), + child: Row( + children: [ + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(model.notifications[index].createdOn)) + + " " + + DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(model.notifications[index].createdOn), false)), + SizedBox( + height: 5, + ), + Row( + children: [ + Expanded(child: Texts(model.notifications[index].message)), + if (model.notifications[index].messageType == "image") + Icon( + FontAwesomeIcons.images, + color: CustomColors.grey, + ) + ], + ), + SizedBox( + height: 5, + ), + ], + ), + ), + ), + ], + ), + ), + ); + }, + separatorBuilder: (context, index) { + return Column( + children: [ + Divider( + color: Colors.grey[300], + thickness: 2.0, + ), + ], + ); + }, + itemCount: model.notifications.length + 1), + ), ); } } diff --git a/lib/pages/landing/landing_page_pharmcy.dart b/lib/pages/landing/landing_page_pharmcy.dart index 9e650966..c90a317a 100644 --- a/lib/pages/landing/landing_page_pharmcy.dart +++ b/lib/pages/landing/landing_page_pharmcy.dart @@ -76,7 +76,7 @@ class _LandingPagePharmacyState extends State { children: [ PharmacyPage(), PharmacyCategorisePage(), - PharmacyProfilePage(), + PharmacyProfilePage(moveToOrder: false), CartOrderPage(changeTab: changeCurrentTab), ], ), diff --git a/lib/pages/medical/prescriptions/prescription_details_page.dart b/lib/pages/medical/prescriptions/prescription_details_page.dart index 5a47ec3b..6460e87c 100644 --- a/lib/pages/medical/prescriptions/prescription_details_page.dart +++ b/lib/pages/medical/prescriptions/prescription_details_page.dart @@ -1,13 +1,17 @@ +import 'dart:collection'; + +import 'package:device_calendar/device_calendar.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/extensions/string_extensions.dart'; import 'package:diplomaticquarterapp/models/header_model.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart'; -import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog_prescription.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart'; +import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; @@ -18,21 +22,34 @@ import 'package:diplomaticquarterapp/widgets/show_zoom_image_dialog.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:jiffy/jiffy.dart'; import 'package:provider/provider.dart'; -class PrescriptionDetailsPage extends StatelessWidget { +class PrescriptionDetailsPage extends StatefulWidget { final PrescriptionReport prescriptionReport; final Prescriptions prescriptions; PrescriptionDetailsPage({Key key, this.prescriptionReport, this.prescriptions}); + @override + _PrescriptionDetailsPageState createState() => _PrescriptionDetailsPageState(); +} + +class _PrescriptionDetailsPageState extends State { + bool hasReminder = false; + + @override + void initState() { + checkIfHasReminder(); + super.initState(); + } + @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); return AppScaffold( isShowAppBar: true, showNewAppBar: true, - backgroundColor: Color(0xffF8F8F8), showNewAppBarTitle: true, appBarTitle: TranslationBase.of(context).prescriptions, body: Column( @@ -40,18 +57,18 @@ class PrescriptionDetailsPage extends StatelessWidget { children: [ DoctorHeader( headerModel: HeaderModel( - prescriptions.doctorName, - prescriptions.doctorID, - prescriptions.doctorImageURL, - prescriptions.speciality, + widget.prescriptions.doctorName, + widget.prescriptions.doctorID, + widget.prescriptions.doctorImageURL, + widget.prescriptions.speciality, "", - prescriptions.name, - DateUtil.convertStringToDate(prescriptions.appointmentDate), - DateUtil.formatDateToTime(DateUtil.convertStringToDate(prescriptions.appointmentDate)), - prescriptions.nationalityFlagURL, - prescriptions.doctorRate, - prescriptions.actualDoctorRate, - prescriptions.noOfPatientsRate, + widget.prescriptions.name, + DateUtil.convertStringToDate(widget.prescriptions.appointmentDate), + DateUtil.formatDateToTime(DateUtil.convertStringToDate(widget.prescriptions.appointmentDate)), + widget.prescriptions.nationalityFlagURL, + widget.prescriptions.doctorRate, + widget.prescriptions.actualDoctorRate, + widget.prescriptions.noOfPatientsRate, "", ), isNeedToShowButton: false, @@ -102,7 +119,7 @@ class PrescriptionDetailsPage extends StatelessWidget { children: [ Container( child: Image.network( - prescriptionReport.imageSRCUrl, + widget.prescriptionReport.imageSRCUrl, fit: BoxFit.cover, width: 48, height: 49, @@ -123,13 +140,15 @@ class PrescriptionDetailsPage extends StatelessWidget { ], ), onTap: () { - showZoomImageDialog(context, prescriptionReport.imageSRCUrl); + showZoomImageDialog(context, widget.prescriptionReport.imageSRCUrl); }, ), SizedBox(width: 12), Expanded( child: Text( - (prescriptionReport.itemDescription.isNotEmpty ? prescriptionReport.itemDescription : prescriptionReport.itemDescriptionN ?? '').toLowerCase().capitalizeFirstofEach, + (widget.prescriptionReport.itemDescription.isNotEmpty ? widget.prescriptionReport.itemDescription : widget.prescriptionReport.itemDescriptionN ?? '') + .toLowerCase() + .capitalizeFirstofEach, style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64), ), ) @@ -147,10 +166,10 @@ class PrescriptionDetailsPage extends StatelessWidget { ), TableRow( children: [ - Utils.tableColumnValue(prescriptionReport?.routeN ?? '', isLast: true, mProjectViewModel: projectViewModel), - Utils.tableColumnValue(prescriptionReport?.frequencyN ?? '', isLast: true, mProjectViewModel: projectViewModel), - Utils.tableColumnValue(prescriptionReport?.doseDailyQuantity.toString() ?? '', isLast: true, mProjectViewModel: projectViewModel), - Utils.tableColumnValue(prescriptionReport?.days.toString() ?? '', isLast: true, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(widget.prescriptionReport?.routeN ?? '', isLast: true, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(widget.prescriptionReport?.frequencyN ?? '', isLast: true, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(widget.prescriptionReport?.doseDailyQuantity.toString() ?? '', isLast: true, mProjectViewModel: projectViewModel), + Utils.tableColumnValue(widget.prescriptionReport?.days.toString() ?? '', isLast: true, mProjectViewModel: projectViewModel), ], ), ]), @@ -159,7 +178,7 @@ class PrescriptionDetailsPage extends StatelessWidget { style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48), ), Text( - prescriptionReport.remarks, + widget.prescriptionReport.remarks, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), ), ], @@ -182,8 +201,8 @@ class PrescriptionDetailsPage extends StatelessWidget { context, FadePage( page: PharmacyForPrescriptionsPage( - itemID: prescriptionReport.itemID, - prescriptionReport: prescriptionReport, + itemID: widget.prescriptionReport.itemID, + prescriptionReport: widget.prescriptionReport, ), ), ); @@ -195,54 +214,35 @@ class PrescriptionDetailsPage extends StatelessWidget { SizedBox(width: 10), Expanded( child: DefaultButton( - TranslationBase.of(context).addReminder, + hasReminder ? TranslationBase.of(context).cancelReminder : TranslationBase.of(context).addReminder, () { - DateTime startDate = DateTime.now(); - DateTime endDate = DateTime(startDate.year, startDate.month, startDate.day + prescriptionReport.days); - - showReminderDialog( - context, - endDate, - "", - prescriptionReport.itemID.toString(), - "", - "", - title: "${prescriptionReport.itemDescriptionN} Prescription Reminder", - description: "${prescriptionReport.itemDescriptionN} ${prescriptionReport.frequencyN} ${prescriptionReport.routeN} ", - onSuccess: () { - AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess); - }, - ); - return; - - 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: PrescriptionReminderDialog( - eventId: prescriptionReport.itemID.toString(), - title: "${prescriptionReport.itemDescriptionN} Prescription Reminder", - description: "${prescriptionReport.itemDescriptionN} ${prescriptionReport.frequencyN} ${prescriptionReport.routeN} ", - startDate: startDate, - endDate: endDate, - location: prescriptionReport.remarks, - days: 1, - ), - ), - ); + if (hasReminder) { + cancelReminders(); + } else { + DateTime startDate = DateTime.now(); + DateTime endDate = DateTime(startDate.year, startDate.month, startDate.day + widget.prescriptionReport.days); + showReminderDialog( + context, + endDate, + "", + widget.prescriptionReport.itemID.toString(), + "", + "", + title: "${widget.prescriptionReport.itemDescriptionN} Prescription Reminder", + description: "${widget.prescriptionReport.itemDescriptionN} ${widget.prescriptionReport.frequencyN} ${widget.prescriptionReport.routeN} ", + onSuccess: () { + AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess); + }, + onMultiDateSuccess: (int selectedIndex) { + setCalender(context, widget.prescriptionReport.itemID.toString(), selectedIndex); }, - transitionDuration: Duration(milliseconds: 500), - barrierDismissible: true, - barrierLabel: '', - context: context, - pageBuilder: (context, animation1, animation2) {}); + ); + return; + } }, iconData: Icons.notifications_active, color: Color(0xffD02127), + fontSize: 13.0, //textColor: Color(0xff2B353E), ), ), @@ -253,4 +253,100 @@ class PrescriptionDetailsPage extends StatelessWidget { ), ); } + + checkIfHasReminder() async { + CalendarUtils calendarUtils = await CalendarUtils.getInstance(); + + DateTime startEventsDate = Jiffy(DateTime.now()).subtract(days: 30); + DateTime endEventsDate = Jiffy(DateTime.now()).add(days: 120); + + RetrieveEventsParams params = new RetrieveEventsParams(startDate: startEventsDate, endDate: endEventsDate); + + await calendarUtils.retrieveEvents(calendarUtils.calendars[0].id, params).then((value) { + Result> events = value; + events.data.forEach((element) { + if (element.title.contains(widget.prescriptionReport.itemDescriptionN)) + setState(() { + hasReminder = true; + }); + }); + }); + print("Has Reminder: " + hasReminder.toString()); + } + + cancelReminders() async { + CalendarUtils calendarUtils = await CalendarUtils.getInstance(); + + DateTime startEventsDate = Jiffy(DateTime.now()).subtract(days: 30); + DateTime endEventsDate = Jiffy(DateTime.now()).add(days: 120); + + RetrieveEventsParams params = new RetrieveEventsParams(startDate: startEventsDate, endDate: endEventsDate); + + await calendarUtils.retrieveEvents(calendarUtils.calendars[0].id, params).then((value) { + Result> events = value; + events.data.forEach((element) { + if (element.title.contains(widget.prescriptionReport.itemDescriptionN)) calendarUtils.deleteEvent(calendarUtils.calendars[0], element); + }); + }); + AppToast.showSuccessToast(message: TranslationBase.of(context).reminderCancelSuccess); + setState(() { + hasReminder = false; + }); + } + + setCalender(BuildContext context, String eventId, int reminderIndex) async { + CalendarUtils calendarUtils = await CalendarUtils.getInstance(); + + DateTime startDate = DateUtil.convertStringToDate(widget.prescriptionReport.startDate); + DateTime actualDate = DateTime(startDate.year, startDate.month, startDate.day, 8, 0); //Time will start at 8:00 AM from starting date + if (widget.prescriptionReport?.frequencyNumber == null) widget.prescriptionReport.frequencyNumber = 1; //Some time frequency number is null so by default will be 2 + + GifLoaderDialogUtils.showMyDialog(context); + + for (int i = 0; i < widget.prescriptionReport.days; i++) { + //event for number of days. + for (int j = 0; j < widget.prescriptionReport.frequencyNumber ?? 1; j++) { + // event for number of times per day. + + if (j != 0) { + actualDate.add(new Duration(hours: 8)); // 8 hours addition for daily dose. + } + + //Time subtraction from actual reminder time. like before 30, or 1 hour. + if (reminderIndex == 0) { + // Before 30 mints + actualDate = Jiffy(actualDate).subtract(minutes: 30); + // dateTime.add(new Duration(minutes: -30)); + } else if (reminderIndex == 1) { + // Before 1 hour + // dateTime.add(new Duration(minutes: -60)); + actualDate = Jiffy(actualDate).subtract(hours: 1); + } else if (reminderIndex == 2) { + // Before 1 hour and 30 mints + // dateTime.add(new Duration(minutes: -90)); + actualDate = Jiffy(actualDate).subtract(hours: 1, minutes: 30); + } else if (reminderIndex == 3) { + // Before 2 hours + // dateTime.add(new Duration(minutes: -120)); + actualDate = Jiffy(actualDate).subtract(hours: 2); + } + calendarUtils + .createOrUpdateEvent( + title: "${widget.prescriptionReport.itemDescriptionN} Prescription Reminder", + description: "${widget.prescriptionReport.itemDescriptionN} ${widget.prescriptionReport.frequencyN} ${widget.prescriptionReport.routeN} ", + scheduleDateTime: actualDate, + eventId: eventId + (i.toString() + j.toString()), //event id with varitions + ) + .then((value) {}); + actualDate = DateTime(actualDate.year, actualDate.month, actualDate.day, 8, 0); + } + actualDate = Jiffy(actualDate).add(days: 1); + print(actualDate); + } + AppToast.showSuccessToast(message: TranslationBase.of(context).reminderSuccess); + GifLoaderDialogUtils.hideDialog(context); + setState(() { + hasReminder = true; + }); + } } diff --git a/lib/pages/pharmacies/screens/lakum-main-page.dart b/lib/pages/pharmacies/screens/lakum-main-page.dart index c4415852..dcee8398 100644 --- a/lib/pages/pharmacies/screens/lakum-main-page.dart +++ b/lib/pages/pharmacies/screens/lakum-main-page.dart @@ -69,16 +69,15 @@ class LakumMainPage extends StatelessWidget { ], ), SizedBox( - width: 8, + height: 12, ), - LacumPointsWidget(mediaQuery, 2, TranslationBase.of(context).gained, model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount, - model.lacumGroupInformation.lakumInquiryInformationObjVersion.gainedPoints, model.lacumGroupInformation.lakumInquiryInformationObjVersion.gainedPointsAmountPerYear), + LakumHomeButtons(mediaQuery, model), SizedBox( - height: 20, + height: 12, ), Container( - height: 125, - margin: EdgeInsets.symmetric(horizontal: 16), + height: 100, + margin: EdgeInsets.symmetric(horizontal: 16, vertical: 12.0), child: ListView( scrollDirection: Axis.horizontal, children: [ @@ -109,15 +108,15 @@ class LakumMainPage extends StatelessWidget { ], ), ), - LacumPointsWidget( - mediaQuery, - 3, - TranslationBase.of(context).consumed, - model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmount != null - ? int.parse(model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmount) - : 0, - model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPoints, - model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmountPerYear), + // LacumPointsWidget( + // mediaQuery, + // 3, + // TranslationBase.of(context).consumed, + // model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmount != null + // ? int.parse(model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmount) + // : 0, + // model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPoints, + // model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmountPerYear), SizedBox( width: 8, ), diff --git a/lib/pages/pharmacies/screens/payment-method-select-page.dart b/lib/pages/pharmacies/screens/payment-method-select-page.dart index 978afae3..53b0357e 100644 --- a/lib/pages/pharmacies/screens/payment-method-select-page.dart +++ b/lib/pages/pharmacies/screens/payment-method-select-page.dart @@ -16,13 +16,10 @@ class PaymentMethodSelectPage extends StatefulWidget { final bool isUpdating; final Function changeMainState; - const PaymentMethodSelectPage( - {Key key, this.model, this.isUpdating = false, this.changeMainState}) - : super(key: key); + const PaymentMethodSelectPage({Key key, this.model, this.isUpdating = false, this.changeMainState}) : super(key: key); @override - _PaymentMethodSelectPageState createState() => - _PaymentMethodSelectPageState(); + _PaymentMethodSelectPageState createState() => _PaymentMethodSelectPageState(); } class _PaymentMethodSelectPageState extends State { @@ -85,16 +82,17 @@ class _PaymentMethodSelectPageState extends State { selectedPaymentOption = PaymentOption.mastercard; }) }), - PaymentMethodCard( - cardWidth, - selectedPaymentOption, - PaymentOption.installments, - () => { - setState(() { - selectedPaymentOption = - PaymentOption.installments; - }) - }), + widget.model.cartResponse.totalAmount > 1000 + ? PaymentMethodCard( + cardWidth, + selectedPaymentOption, + PaymentOption.installments, + () => { + setState(() { + selectedPaymentOption = PaymentOption.installments; + }) + }) + : Container(), if (Platform.isIOS) PaymentMethodCard( cardWidth, @@ -118,8 +116,7 @@ class _PaymentMethodSelectPageState extends State { TranslationBase.of(context).next, selectedPaymentOption != null ? () { - widget.model.paymentCheckoutData.paymentOption = - selectedPaymentOption; + widget.model.paymentCheckoutData.paymentOption = selectedPaymentOption; if (widget.isUpdating) { widget.changeMainState(); Navigator.pop(context); @@ -150,14 +147,12 @@ class PaymentMethodCard extends StatelessWidget { final PaymentOption paymentOption; final Function selectMethod; - PaymentMethodCard(this.cardWidth, this.selectedPaymentOption, - this.paymentOption, this.selectMethod); + PaymentMethodCard(this.cardWidth, this.selectedPaymentOption, this.paymentOption, this.selectMethod); @override Widget build(BuildContext context) { bool isSelected = false; - if (selectedPaymentOption != null && - selectedPaymentOption == paymentOption) { + if (selectedPaymentOption != null && selectedPaymentOption == paymentOption) { isSelected = true; } @@ -171,9 +166,7 @@ class PaymentMethodCard extends StatelessWidget { color: Colors.white, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10), - side: isSelected - ? BorderSide(color: Colors.green, width: 2.0) - : BorderSide(color: Colors.transparent, width: 0.0), + side: isSelected ? BorderSide(color: Colors.green, width: 2.0) : BorderSide(color: Colors.transparent, width: 0.0), ), child: Padding( padding: const EdgeInsets.all(12.0), @@ -182,13 +175,7 @@ class PaymentMethodCard extends StatelessWidget { Container( width: 24, height: 24, - decoration: containerColorRadiusBorderWidth( - isSelected - ? CustomColors.accentColor - : Colors.transparent, - 100, - Colors.grey, - 0.5), + decoration: containerColorRadiusBorderWidth(isSelected ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5), ), mWidth(12), Container( @@ -200,8 +187,7 @@ class PaymentMethodCard extends StatelessWidget { if (isSelected) Container( decoration: containerRadius(CustomColors.green, 200), - padding: - EdgeInsets.only(top: 6, bottom: 6, left: 12, right: 12), + padding: EdgeInsets.only(top: 6, bottom: 6, left: 12, right: 12), child: Text( TranslationBase.of(context).paymentSelected, style: TextStyle( diff --git a/lib/pages/pharmacies/widgets/lacum-banner-widget.dart b/lib/pages/pharmacies/widgets/lacum-banner-widget.dart index 7d10b886..60ca4693 100644 --- a/lib/pages/pharmacies/widgets/lacum-banner-widget.dart +++ b/lib/pages/pharmacies/widgets/lacum-banner-widget.dart @@ -229,13 +229,15 @@ class _LakumBannerWidgetState extends State { width: widget.mediaQuery.size.width * 1.0, height: widget.mediaQuery.size.width * 1.0, ), - Container( - margin: EdgeInsets.fromLTRB(12, 70, 12, 4), - child: widget.model.convertBase64ToBarCodeImage() != - null - ? Image.memory( - widget.model.convertBase64ToBarCodeImage()) - : Container(), + Center( + child: Container( + margin: EdgeInsets.fromLTRB(12, 70, 12, 4), + child: widget.model.convertBase64ToBarCodeImage() != + null + ? Image.memory( + widget.model.convertBase64ToBarCodeImage()) + : Container(), + ), ), ], ), diff --git a/lib/pages/pharmacy/order/Order.dart b/lib/pages/pharmacy/order/Order.dart index 19a6a22b..c8ee395f 100644 --- a/lib/pages/pharmacy/order/Order.dart +++ b/lib/pages/pharmacy/order/Order.dart @@ -25,8 +25,7 @@ class OrderPage extends StatefulWidget { _OrderPageState createState() => _OrderPageState(); } -class _OrderPageState extends State - with SingleTickerProviderStateMixin { +class _OrderPageState extends State with SingleTickerProviderStateMixin { String pageID = "1"; String customerId = ""; String order = ""; @@ -54,8 +53,6 @@ class _OrderPageState extends State _tabController = new TabController( length: 4, vsync: this, - - // initialIndex: 1 ); } @@ -220,12 +217,10 @@ class _OrderPageState extends State ), Container( margin: EdgeInsets.all(8.0), - child: SvgPicture.asset( - projectViewModel.isArabic - ? 'assets/images/pharmacy/arrow_left.svg' - : 'assets/images/pharmacy/arrow_right.svg', - height: 20, - width: 20, + child: Icon( + Icons.arrow_forward, + size: 18, + color: Colors.grey[500], ), ), ], @@ -506,12 +501,10 @@ class _OrderPageState extends State ), Container( margin: EdgeInsets.all(8.0), - child: SvgPicture.asset( - projectViewModel.isArabic - ? 'assets/images/pharmacy/arrow_left.svg' - : 'assets/images/pharmacy/arrow_right.svg', - height: 20, - width: 20, + child: Icon( + Icons.arrow_forward, + size: 18, + color: Colors.grey[500], ), ), ], @@ -972,12 +965,10 @@ class _OrderPageState extends State ), Container( margin: EdgeInsets.all(8.0), - child: SvgPicture.asset( - projectViewModel.isArabic - ? 'assets/images/pharmacy/arrow_left.svg' - : 'assets/images/pharmacy/arrow_right.svg', - height: 20, - width: 20, + child: Icon( + Icons.arrow_forward, + size: 18, + color: Colors.grey[500], ), ), ], @@ -1171,14 +1162,7 @@ class _OrderPageState extends State orderModel: cancelledOrderList[ index]))) - .then((value) { - model - .getOrder(widget.customerID, - widget.customerGUID, pageID) - .then((value) { - getCancelledOrder(model); - }); - }); + ; }, child: Row( mainAxisAlignment: @@ -1253,12 +1237,10 @@ class _OrderPageState extends State ), Container( margin: EdgeInsets.all(8.0), - child: SvgPicture.asset( - projectViewModel.isArabic - ? 'assets/images/pharmacy/arrow_left.svg' - : 'assets/images/pharmacy/arrow_right.svg', - height: 20, - width: 20, + child: Icon( + Icons.arrow_forward, + size: 18, + color: Colors.grey[500], ), ), ], diff --git a/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart b/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart index 514ea1a5..5e55d537 100644 --- a/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart +++ b/lib/pages/pharmacy/pharmacyAddresses/AddAddress.dart @@ -62,7 +62,7 @@ class _AddAddressPageState extends State { return BaseView( builder: (_, model, wi) => AppScaffold( appBarTitle: TranslationBase.of(context).changeAddress, - isShowAppBar: true, + isShowAppBar: false, isPharmacy: true, backgroundColor: Colors.white, body: Container( diff --git a/lib/pages/pharmacy/profile/profile.dart b/lib/pages/pharmacy/profile/profile.dart index ad3014e6..74f4662d 100644 --- a/lib/pages/pharmacy/profile/profile.dart +++ b/lib/pages/pharmacy/profile/profile.dart @@ -29,6 +29,10 @@ import 'package:flutter_svg/flutter_svg.dart'; dynamic languageID; class PharmacyProfilePage extends StatefulWidget { + final bool moveToOrder; + + PharmacyProfilePage({@required this.moveToOrder}); + @override _ProfilePageState createState() => _ProfilePageState(); } @@ -89,17 +93,20 @@ class _ProfilePageState extends State { getLanguageID(); super.initState(); getUser(); + if (widget.moveToOrder) { + Navigator.push(context, FadePage(page: OrderPage(customerID: customerId, customerGUID: customerGUID))); + } } @override Widget build(BuildContext context) { return BaseView( onModelReady: (model) async { - var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); - var customerGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID); - GifLoaderDialogUtils.showMyDialog(context); - model.getOrder(customerId, customerGUID, page_id); - GifLoaderDialogUtils.hideDialog(context); + // var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID); + // var customerGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID); + // GifLoaderDialogUtils.showMyDialog(context); + // model.getOrder(customerId, customerGUID, page_id); + // GifLoaderDialogUtils.hideDialog(context); }, builder: (_, model, wi) => AppScaffold( appBarTitle: TranslationBase.of(context).myAccount, @@ -220,9 +227,7 @@ class _ProfilePageState extends State { ), Text( TranslationBase.of(context).lakum, - style: TextStyle( - fontSize: 13.0, - fontWeight: FontWeight.bold), + style: TextStyle(fontSize: 13.0, fontWeight: FontWeight.bold), ), ], ), @@ -231,8 +236,7 @@ class _ProfilePageState extends State { Expanded( child: InkWell( onTap: () { - Navigator.push(context, - FadePage(page: WishlistPage())); + Navigator.push(context, FadePage(page: WishlistPage())); }, child: Column( children: [ @@ -258,8 +262,7 @@ class _ProfilePageState extends State { Expanded( child: InkWell( onTap: () { - Navigator.push(context, - FadePage(page: MyReviewsPage())); + Navigator.push(context, FadePage(page: MyReviewsPage())); }, child: Column( children: [ @@ -304,9 +307,7 @@ class _ProfilePageState extends State { children: [ Text( TranslationBase.of(context).myAccount, - style: TextStyle( - fontSize: 16.0, - fontWeight: FontWeight.bold), + style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold), ), SizedBox( height: 10, @@ -317,10 +318,7 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push( - context, - FadePage( - page: HomePrescriptionsPage())); + Navigator.push(context, FadePage(page: HomePrescriptionsPage())); }, child: Row( children: [ @@ -333,8 +331,7 @@ class _ProfilePageState extends State { width: 15, ), Text( - TranslationBase.of(context) - .myPrescription, + TranslationBase.of(context).myPrescription, style: TextStyle( fontSize: 13.0, ), @@ -351,15 +348,11 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push(context, - FadePage(page: ComparePage())); + Navigator.push(context, FadePage(page: ComparePage())); }, child: Row( children: [ - Image.asset( - 'assets/images/pharmacy/compare.png', - width: 35, - height: 35), + Image.asset('assets/images/pharmacy/compare.png', width: 35, height: 35), SizedBox( width: 15, ), @@ -381,10 +374,7 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push( - context, - FadePage( - page: HomePrescriptionsPage())); + Navigator.push(context, FadePage(page: HomePrescriptionsPage())); }, child: Row( children: [ @@ -397,8 +387,7 @@ class _ProfilePageState extends State { width: 20, ), Text( - TranslationBase.of(context) - .medicationsRefill, + TranslationBase.of(context).medicationsRefill, style: TextStyle( fontSize: 13.0, ), @@ -415,8 +404,7 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push( - context, FadePage(page: MyFamily())); + Navigator.push(context, FadePage(page: MyFamily())); }, child: Row( children: [ @@ -446,10 +434,7 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push( - context, - FadePage( - page: PharmacyAddressesPage())); + Navigator.push(context, FadePage(page: PharmacyAddressesPage())); }, child: Row( children: [ @@ -462,8 +447,7 @@ class _ProfilePageState extends State { width: 20, ), Text( - TranslationBase.of(context) - .shippingAddresses, + TranslationBase.of(context).shippingAddresses, style: TextStyle( fontSize: 13.0, ), @@ -480,10 +464,7 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push( - context, - FadePage( - page: PharmacyTermsConditions())); + Navigator.push(context, FadePage(page: PharmacyTermsConditions())); }, child: Row( children: [ @@ -496,8 +477,7 @@ class _ProfilePageState extends State { width: 10, ), Text( - TranslationBase.of(context) - .conditionsHMG, + TranslationBase.of(context).conditionsHMG, style: TextStyle( fontSize: 13.0, ), @@ -514,15 +494,7 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push( - context, - FadePage( - page: LakumTermsConditions( - this.identificationNo, - this.firstName, - this.lastName, - this.mobileNo, - this.languageId))); + Navigator.push(context, FadePage(page: LakumTermsConditions(this.identificationNo, this.firstName, this.lastName, this.mobileNo, this.languageId))); }, child: Row( children: [ @@ -537,8 +509,7 @@ class _ProfilePageState extends State { width: 10, ), Text( - TranslationBase.of(context) - .conditions, + TranslationBase.of(context).conditions, style: TextStyle( fontSize: 13.0, ), @@ -569,9 +540,7 @@ class _ProfilePageState extends State { children: [ Text( TranslationBase.of(context).reachUs, - style: TextStyle( - fontSize: 16.0, - fontWeight: FontWeight.bold), + style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold), ), SizedBox( height: 5, @@ -582,8 +551,7 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push(context, - FadePage(page: LiveChatPage())); + Navigator.push(context, FadePage(page: LiveChatPage())); }, child: Row( children: [ @@ -611,8 +579,7 @@ class _ProfilePageState extends State { ), InkWell( onTap: () { - Navigator.push(context, - FadePage(page: FindUsPage())); + Navigator.push(context, FadePage(page: FindUsPage())); }, child: Row( children: [ @@ -625,8 +592,7 @@ class _ProfilePageState extends State { width: 20, ), Text( - TranslationBase.of(context) - .ourLocations, + TranslationBase.of(context).ourLocations, style: TextStyle(fontSize: 13.0), ), ], diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index 3986c8e4..80039ece 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -1317,4 +1317,19 @@ class DoctorsListService extends BaseService { }, body: request); return Future.value(localRes); } + + Future getLaserBodyPartsList(int laserCategoryID) async { + Map request; + + request = { + "LaserCategoryID": laserCategoryID, + }; + dynamic localRes; + await baseAppClient.post(LASER_BODY_PARTS, onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } } diff --git a/lib/services/pharmacy_services/product_detail_service.dart b/lib/services/pharmacy_services/product_detail_service.dart index e3e0fb7f..5599fc87 100644 --- a/lib/services/pharmacy_services/product_detail_service.dart +++ b/lib/services/pharmacy_services/product_detail_service.dart @@ -58,8 +58,8 @@ class ProductDetailService extends BaseService { _stockAvailability = response['products'][0]['stock_availability']; _stockAvailabilityn = response['products'][0]['stock_availabilityn']; - // _isStockAvailable = response['products'][0]['IsStockAvailable']; - _isStockAvailable = _stockAvailability == "In stock" ? true : false; + _isStockAvailable = response['products'][0]['IsStockAvailable']; + // _isStockAvailable = _stockAvailability == "In stock" ? true : false; }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; diff --git a/lib/uitl/LocalNotification.dart b/lib/uitl/LocalNotification.dart index f1c6442f..5488d39b 100644 --- a/lib/uitl/LocalNotification.dart +++ b/lib/uitl/LocalNotification.dart @@ -10,15 +10,17 @@ final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = FlutterL class LocalNotification { Function(String payload) _onNotificationClick; static LocalNotification _instance; - static LocalNotification getInstance(){ + + static LocalNotification getInstance() { return _instance; } - static init({Function(String payload) onNotificationClick}){ - if(_instance == null){ + + static init({Function(String payload) onNotificationClick}) { + if (_instance == null) { _instance = LocalNotification(); _instance._onNotificationClick = onNotificationClick; _instance._initialize(); - }else{ + } else { // assert(false,(){ // //TODO fix it // "LocalNotification Already Initialized"; @@ -26,7 +28,7 @@ class LocalNotification { } } - _initialize(){ + _initialize() { var initializationSettingsAndroid = new AndroidInitializationSettings('app_icon'); var initializationSettingsIOS = IOSInitializationSettings(onDidReceiveLocalNotification: null); var initializationSettings = InitializationSettings(initializationSettingsAndroid, initializationSettingsIOS); @@ -34,11 +36,12 @@ class LocalNotification { } var _random = new Random(); - _randomNumber({int from = 100000}){ + + _randomNumber({int from = 100000}) { return _random.nextInt(from); } - _vibrationPattern(){ + _vibrationPattern() { var vibrationPattern = Int64List(4); vibrationPattern[0] = 0; vibrationPattern[1] = 1000; @@ -50,10 +53,11 @@ class LocalNotification { Future showNow({@required String title, @required String subtitle, String payload}) { Future.delayed(Duration(seconds: 1)).then((result) async { - var androidPlatformChannelSpecifics = AndroidNotificationDetails('com.hmg.local_notification', 'HMG', 'HMG', importance: Importance.Max, priority: Priority.High, ticker: 'ticker', vibrationPattern: _vibrationPattern()); + var androidPlatformChannelSpecifics = + AndroidNotificationDetails('com.hmg.local_notification', 'HMG', 'HMG', importance: Importance.Max, priority: Priority.High, ticker: 'ticker', vibrationPattern: _vibrationPattern()); var iOSPlatformChannelSpecifics = IOSNotificationDetails(); var platformChannelSpecifics = NotificationDetails(androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics); - await flutterLocalNotificationsPlugin.show(_randomNumber(), title, subtitle, platformChannelSpecifics, payload: payload).catchError((err){ + await flutterLocalNotificationsPlugin.show(_randomNumber(), title, subtitle, platformChannelSpecifics, payload: payload).catchError((err) { print(err); }); }); @@ -81,11 +85,9 @@ class LocalNotification { ledOffMs: 500); var iOSPlatformChannelSpecifics = IOSNotificationDetails(sound: 'slow_spring_board.aiff'); - ///change it to be as ionic - // var platformChannelSpecifics = NotificationDetails( - // androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics); - // await flutterLocalNotificationsPlugin.schedule(0, title, description, - // scheduledNotificationDateTime, platformChannelSpecifics); + // /change it to be as ionic + var platformChannelSpecifics = NotificationDetails(androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics); + await flutterLocalNotificationsPlugin.schedule(0, title, description, scheduledNotificationDateTime, platformChannelSpecifics); } ///Repeat notification every day at approximately 10:00:00 am diff --git a/lib/uitl/laser_body_parts_data.dart b/lib/uitl/laser_body_parts_data.dart new file mode 100644 index 00000000..b8e8e58e --- /dev/null +++ b/lib/uitl/laser_body_parts_data.dart @@ -0,0 +1,129 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter_svg/svg.dart'; + +class LaserBodyParts { + static final LaserBodyParts _instance = LaserBodyParts._internal(); + + LaserBodyParts._internal(); + + factory LaserBodyParts() => _instance; + + static Widget image(String assetUri) { + return new SvgPicture.asset(assetUri, fit: BoxFit.cover,width: 97,height: 97,); + } + + Map maleBodyMap = { + "40": image("assets/images/new/body_parts/male/upper_arm.svg"), + "41": image("assets/images/new/body_parts/male/lower_arm.svg"), + "42": image("assets/images/new/body_parts/male/chest.svg"), + "43": image("assets/images/new/body_parts/male/chest_line.svg"), + "44": image("assets/images/new/body_parts/male/shoulders.svg"), + "45": image("assets/images/new/body_parts/male/back.svg"), + "46": image("assets/images/new/body_parts/male/abdomin.svg"), + "47": image("assets/images/new/body_parts/male/upper_leg.svg"), + "48": image("assets/images/new/body_parts/male/lower_leg.svg"), + "49": image("assets/images/new/body_parts/male/axilla.svg") + }; + + Map maleFaceMap = { + "62": image("assets/images/new/body_parts/male/hydra_facial.svg"), + "5": image("assets/images/new/body_parts/male/upper_lips.svg"), + "6": image("assets/images/new/body_parts/male/chin.svg"), + "7": image("assets/images/new/body_parts/male/cheek.svg"), + "8": image("assets/images/new/body_parts/male/side_burn.svg"), + "9": image("assets/images/new/body_parts/male/ears.svg"), + "10": image("assets/images/new/body_parts/male/full_neck.svg"), + "11": image("assets/images/new/body_parts/male/half_neck.svg"), + "12": image("assets/images/new/body_parts/male/eyebrows.svg") + }; + + Map maleBodyRetouchMap = { + "51": image("assets/images/new/body_parts/male/upper_arm.svg"), + "52": image("assets/images/new/body_parts/male/lower_arm.svg"), + "53": image("assets/images/new/body_parts/male/chest.svg"), + "54": image("assets/images/new/body_parts/male/shoulders.svg"), + "55": image("assets/images/new/body_parts/male/back.svg"), + "56": image("assets/images/new/body_parts/male/abdomin.svg"), + "57": image("assets/images/new/body_parts/male/full_leg.svg"), + "58": image("assets/images/new/body_parts/male/upper_leg.svg"), + "59": image("assets/images/new/body_parts/male/lower_leg.svg"), + "60": image("assets/images/new/body_parts/male/bikini.svg"), + "61": image("assets/images/new/body_parts/male/bikini_line.svg") + }; + + Map femaleBodyMap = { + "40": image("assets/images/new/body_parts/female/upper_arm.svg"), + "41": image("assets/images/new/body_parts/female/lower_arm.svg"), + "42": image("assets/images/new/body_parts/female/chest.svg"), + "43": image("assets/images/new/body_parts/female/chest_line.svg"), + "44": image("assets/images/new/body_parts/female/shoulder.svg"), + "45": image("assets/images/new/body_parts/female/back.svg"), + "46": image("assets/images/new/body_parts/female/abdomin.svg"), + "47": image("assets/images/new/body_parts/female/upper_leg.svg"), + "48": image("assets/images/new/body_parts/female/lower_leg.svg"), + "49": image("assets/images/new/body_parts/female/axilla.svg") + }; + + Map femaleFaceMap = { + "62": image("assets/images/new/body_parts/female/hydra_facial.svg"), + "5": image("assets/images/new/body_parts/female/upper_lips.svg"), + "6": image("assets/images/new/body_parts/female/chin.svg"), + "7": image("assets/images/new/body_parts/female/cheeks.svg"), + "8": image("assets/images/new/body_parts/female/side_burn.svg"), + "9": image("assets/images/new/body_parts/female/ears.svg"), + "10": image("assets/images/new/body_parts/female/full_neck.svg"), + "11": image("assets/images/new/body_parts/female/half_neck.svg"), + "12": image("assets/images/new/body_parts/female/eyebrows.svg") + }; + + Map femaleBodyBikiniMap = { + "34": image("assets/images/new/body_parts/female/bikini.svg"), + "36": image("assets/images/new/body_parts/female/bikini_line.svg"), + "38": image("assets/images/new/body_parts/female/buttocks.svg"), + "39": image("assets/images/new/body_parts/female/anal.svg") + }; + + Map femaleBodyRetouchMap = { + "51": image("assets/images/new/body_parts/female/upper_arm.svg"), + "52": image("assets/images/new/body_parts/female/lower_arm.svg"), + "53": image("assets/images/new/body_parts/female/chest.svg"), + "54": image("assets/images/new/body_parts/female/shoulder.svg"), + "55": image("assets/images/new/body_parts/female/back.svg"), + "56": image("assets/images/new/body_parts/female/abdomin.svg"), + "57": image("assets/images/new/body_parts/female/full_leg.svg"), + "58": image("assets/images/new/body_parts/female/upper_leg.svg"), + "59": image("assets/images/new/body_parts/female/lower_leg.svg"), + "60": image("assets/images/new/body_parts/female/bikini.svg"), + "61": image("assets/images/new/body_parts/female/bikini_line.svg") + }; + + + Widget getCategoryImage(bool isMale, int category, String mappingCode) { + if (isMale) { + if (category == 1) { + return maleBodyMap[mappingCode]; + } + if (category == 2) { + return maleFaceMap[mappingCode]; + } + if (category == 11) { + return maleBodyRetouchMap[mappingCode]; + } + } else { + if (category == 1) { + return femaleBodyMap[mappingCode]; + } + if (category == 2) { + return femaleFaceMap[mappingCode]; + } + if (category == 10) { + return femaleBodyBikiniMap[mappingCode]; + } + if (category == 11) { + return femaleBodyRetouchMap[mappingCode]; + } + } + return null; + } +} diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 80e961b7..b04cbd93 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -121,6 +121,8 @@ class TranslationBase { String get pressAgain => localizedValues['pressAgain'][locale.languageCode]; + String get laserMaxLimitReach => localizedValues['laserMaxLimitReach'][locale.languageCode]; + String get confirmLiveCare => localizedValues['confirmLiveCare'][locale.languageCode]; String get doctorFilter => localizedValues['doctorFilter'][locale.languageCode]; @@ -1384,6 +1386,16 @@ class TranslationBase { String get body => localizedValues['body'][locale.languageCode]; + String get bodyString => localizedValues['body_string'][locale.languageCode]; + + String get bikini => localizedValues['bikini'][locale.languageCode]; + + String get totalMinutes => localizedValues['totalMinutes'][locale.languageCode]; + + String get face => localizedValues['face'][locale.languageCode]; + + String get retouch => localizedValues['retouch'][locale.languageCode]; + String get feedbackTitle => localizedValues['feedback'][locale.languageCode]; String get send => localizedValues['send'][locale.languageCode]; @@ -2777,8 +2789,9 @@ class TranslationBase { String get gr => localizedValues["gr"][locale.languageCode]; String get gramsPerMeal => localizedValues["gramsPerMeal"][locale.languageCode]; + String get cancelReminder => localizedValues["CancelReminder"][locale.languageCode]; - + String get reminderCancelSuccess => localizedValues["reminderCancelSuccess"][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/buttons/defaultButton.dart b/lib/widgets/buttons/defaultButton.dart index 274ef651..14e93d66 100644 --- a/lib/widgets/buttons/defaultButton.dart +++ b/lib/widgets/buttons/defaultButton.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -extension WithContainer on DefaultButton { +extension WithContainer on Widget { Widget get insideContainer => Container(color: Colors.white, padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), child: this); } diff --git a/pubspec.yaml b/pubspec.yaml index 73c9cea9..dba94038 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -230,6 +230,9 @@ flutter: - assets/images/new/services/ - assets/images/new/appointment-rating/ - assets/images/new/payment/ + - assets/images/new/body_parts/ + - assets/images/new/body_parts/male/ + - assets/images/new/body_parts/female/ fonts: - family: WorkSans