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..c4fabca6 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -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..56113044 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': 'سيتم تصفية الأطباء بناءً على جنسك وعمرك'}, @@ -816,6 +817,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/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/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/pharmacy/order/Order.dart b/lib/pages/pharmacy/order/Order.dart index a9ef2d1f..d1afd5a8 100644 --- a/lib/pages/pharmacy/order/Order.dart +++ b/lib/pages/pharmacy/order/Order.dart @@ -1,6 +1,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/orders_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/pharmacy/order/OrderDetails.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; @@ -8,6 +9,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; +import 'package:provider/provider.dart'; dynamic languageID; @@ -57,7 +59,8 @@ class _OrderPageState extends State with SingleTickerProviderStateMix @override Widget build(BuildContext context) { return BaseView( - onModelReady: (model) => model.getOrder(widget.customerID, widget.customerGUID, pageID), + onModelReady: (model) => + model.getOrder(widget.customerID, widget.customerGUID, pageID), builder: (_, model, wi) => AppScaffold( appBarTitle: TranslationBase.of(context).order, baseViewModel: model, @@ -105,9 +108,12 @@ class _OrderPageState extends State with SingleTickerProviderStateMix } Widget getDeliveredOrder(OrderModelViewModel model) { + ProjectViewModel projectViewModel = Provider.of(context); deliveredOrderList.clear(); for (int i = 0; i < model.orders.length; i++) { - if (model.orders[i].orderStatusId == 30 || model.orders[i].orderStatusId == 997 || model.orders[i].orderStatusId == 994) { + if (model.orders[i].orderStatusId == 30 || + model.orders[i].orderStatusId == 997 || + model.orders[i].orderStatusId == 994) { deliveredOrderList.add(model.orders[i]); } } @@ -131,26 +137,33 @@ class _OrderPageState extends State with SingleTickerProviderStateMix Navigator.push( context, FadePage( - page: OrderDetailsPage(orderModel: deliveredOrderList[index]), + page: OrderDetailsPage( + orderModel: + deliveredOrderList[index]), )).then((value) { - model.getOrder(widget.customerID, widget.customerGUID, pageID); + model.getOrder(widget.customerID, + widget.customerGUID, pageID); getDeliveredOrder(model); }); }, child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ Container( margin: EdgeInsets.all(8.0), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ Row( children: [ Container( - margin: EdgeInsets.only(right: 5), + margin: + EdgeInsets.only(right: 5), child: Text( - TranslationBase.of(context).orderNumber, + TranslationBase.of(context) + .orderNumber, style: TextStyle( fontSize: 16.0, fontWeight: FontWeight.bold, @@ -159,7 +172,9 @@ class _OrderPageState extends State with SingleTickerProviderStateMix ), Container( child: Text( - deliveredOrderList[index].id.toString(), + deliveredOrderList[index] + .id + .toString(), style: TextStyle( fontSize: 16.0, fontWeight: FontWeight.bold, @@ -174,9 +189,11 @@ class _OrderPageState extends State with SingleTickerProviderStateMix Row( children: [ Container( - margin: EdgeInsets.only(right: 5), + margin: + EdgeInsets.only(right: 5), child: Text( - TranslationBase.of(context).orderDate, + TranslationBase.of(context) + .orderDate, style: TextStyle( fontSize: 14.0, ), @@ -184,7 +201,10 @@ class _OrderPageState extends State with SingleTickerProviderStateMix ), Container( child: Text( - deliveredOrderList[index].createdOnUtc.toString().substring(0, 10), + deliveredOrderList[index] + .createdOnUtc + .toString() + .substring(0, 10), style: TextStyle( fontSize: 14.0, ), @@ -198,7 +218,9 @@ class _OrderPageState extends State with SingleTickerProviderStateMix Container( margin: EdgeInsets.all(8.0), child: SvgPicture.asset( - languageID == "ar" ? 'assets/images/pharmacy/arrow_left.svg' : 'assets/images/pharmacy/arrow_right.svg', + projectViewModel.isArabic + ? 'assets/images/pharmacy/arrow_left.svg' + : 'assets/images/pharmacy/arrow_right.svg', height: 20, width: 20, ), @@ -214,11 +236,14 @@ class _OrderPageState extends State with SingleTickerProviderStateMix endIndent: 0, ), Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ Container( - margin: EdgeInsets.only(left: 8, right: 8, top: 1, bottom: 8), - padding: EdgeInsets.only(left: 13.0, right: 13.0), + margin: EdgeInsets.only( + left: 8, right: 8, top: 1, bottom: 8), + padding: EdgeInsets.only( + left: 13.0, right: 13.0), decoration: BoxDecoration( border: Border.all( color: Colors.blue[700], @@ -226,12 +251,23 @@ class _OrderPageState extends State with SingleTickerProviderStateMix width: 5.0, ), color: Colors.blue[700], - borderRadius: BorderRadius.circular(30.0)), - child: deliveredOrderList[index].orderStatusId == 30 || deliveredOrderList[index].orderStatusId == 997 || deliveredOrderList[index].orderStatusId == 994 + borderRadius: BorderRadius.circular( + 30.0)), + child: deliveredOrderList[ + index] + .orderStatusId == + 30 || + deliveredOrderList[index] + .orderStatusId == + 997 || + deliveredOrderList[index] + .orderStatusId == + 994 // deliveredOrderList[index].orderStatusId == 30 ? Text( // deliveredOrderList[0].orderStatus.toString().substring(12), - TranslationBase.of(context).deliveredOrder, + TranslationBase.of(context) + .deliveredOrder, style: TextStyle( color: Colors.white, fontSize: 15.0, @@ -239,7 +275,13 @@ class _OrderPageState extends State with SingleTickerProviderStateMix ), ) : Text( - languageID == "ar" ? deliveredOrderList[index].orderStatusn.toString() : deliveredOrderList[index].orderStatus.toString(), + languageID == "ar" + ? deliveredOrderList[index] + .orderStatusn + .toString() + : deliveredOrderList[index] + .orderStatus + .toString(), style: TextStyle( color: Colors.white, fontSize: 15.0, @@ -247,7 +289,8 @@ class _OrderPageState extends State with SingleTickerProviderStateMix ), )), Container( - margin: EdgeInsets.only(left: 8, right: 8, top: 1, bottom: 8), + margin: EdgeInsets.only( + left: 8, right: 8, top: 1, bottom: 8), child: Column( // crossAxisAlignment: CrossAxisAlignment.end, children: [ @@ -256,7 +299,9 @@ class _OrderPageState extends State with SingleTickerProviderStateMix Container( margin: EdgeInsets.only(left: 5), child: Text( - deliveredOrderList[index].orderTotal.toString(), + deliveredOrderList[index] + .orderTotal + .toString(), style: TextStyle( fontSize: 16.0, fontWeight: FontWeight.bold, @@ -282,7 +327,9 @@ class _OrderPageState extends State with SingleTickerProviderStateMix children: [ Container( child: Text( - deliveredOrderList[index].productCount.toString(), + deliveredOrderList[index] + .productCount + .toString(), style: TextStyle( fontSize: 14.0, ), @@ -291,7 +338,8 @@ class _OrderPageState extends State with SingleTickerProviderStateMix Container( margin: EdgeInsets.only(left: 5), child: Text( - TranslationBase.of(context).itemsNo, + TranslationBase.of(context) + .itemsNo, style: TextStyle( fontSize: 14.0, ), @@ -340,12 +388,17 @@ class _OrderPageState extends State with SingleTickerProviderStateMix } Widget getProcessingOrder(OrderModelViewModel model) { + ProjectViewModel projectViewModel = Provider.of(context); processingOrderList.clear(); for (int i = 0; i < model.orders.length; i++) { - if (model.orders[i].orderStatusId == 20 || model.orders[i].orderStatusId == 995 || model.orders[i].orderStatusId == 998 || model.orders[i].orderStatusId == 999) { + if (model.orders[i].orderStatusId == 20 || + model.orders[i].orderStatusId == 995 || + model.orders[i].orderStatusId == 998 || + model.orders[i].orderStatusId == 999) { processingOrderList.add(model.orders[i]); } } + _tabController.index = 1; return Container( width: MediaQuery.of(context).size.width, child: processingOrderList.length != 0 @@ -363,26 +416,40 @@ class _OrderPageState extends State with SingleTickerProviderStateMix children: [ InkWell( onTap: () { - Navigator.push(context, FadePage(page: OrderDetailsPage(orderModel: processingOrderList[index]))).then((value) { - model.getOrder(widget.customerID, widget.customerGUID, pageID).then((value) { + Navigator.push( + context, + FadePage( + page: OrderDetailsPage( + orderModel: + processingOrderList[ + index]))) + .then((value) { + model + .getOrder(widget.customerID, + widget.customerGUID, pageID) + .then((value) { getProcessingOrder(model); }); }); }, child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ Container( margin: EdgeInsets.all(8.0), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ Row( children: [ Container( - margin: EdgeInsets.only(right: 5), + margin: + EdgeInsets.only(right: 5), child: Text( - TranslationBase.of(context).orderNumber, + TranslationBase.of(context) + .orderNumber, style: TextStyle( fontSize: 16.0, fontWeight: FontWeight.bold, @@ -391,7 +458,9 @@ class _OrderPageState extends State with SingleTickerProviderStateMix ), Container( child: Text( - processingOrderList[index].id.toString(), + processingOrderList[index] + .id + .toString(), style: TextStyle( fontSize: 16.0, fontWeight: FontWeight.bold, @@ -406,9 +475,11 @@ class _OrderPageState extends State with SingleTickerProviderStateMix Row( children: [ Container( - margin: EdgeInsets.only(right: 5), + margin: + EdgeInsets.only(right: 5), child: Text( - TranslationBase.of(context).orderDate, + TranslationBase.of(context) + .orderDate, style: TextStyle( fontSize: 14.0, ), @@ -416,7 +487,10 @@ class _OrderPageState extends State with SingleTickerProviderStateMix ), Container( child: Text( - processingOrderList[index].createdOnUtc.toString().substring(0, 10), + processingOrderList[index] + .createdOnUtc + .toString() + .substring(0, 10), style: TextStyle( fontSize: 14.0, ), @@ -430,7 +504,9 @@ class _OrderPageState extends State with SingleTickerProviderStateMix Container( margin: EdgeInsets.all(8.0), child: SvgPicture.asset( - languageID == "ar" ? 'assets/images/pharmacy/arrow_left.svg' : 'assets/images/pharmacy/arrow_right.svg', + projectViewModel.isArabic + ? 'assets/images/pharmacy/arrow_left.svg' + : 'assets/images/pharmacy/arrow_right.svg', height: 20, width: 20, ), @@ -446,11 +522,14 @@ class _OrderPageState extends State with SingleTickerProviderStateMix endIndent: 0, ), Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ Container( - margin: EdgeInsets.only(left: 8, right: 8, top: 1, bottom: 8), - padding: EdgeInsets.only(left: 13.0, right: 13.0), + margin: EdgeInsets.only( + left: 8, right: 8, top: 1, bottom: 8), + padding: EdgeInsets.only( + left: 13.0, right: 13.0), decoration: BoxDecoration( border: Border.all( color: Colors.green, @@ -458,15 +537,26 @@ class _OrderPageState extends State with SingleTickerProviderStateMix width: 5.0, ), color: Colors.green, - borderRadius: BorderRadius.circular(30.0)), - child: processingOrderList[index].orderStatusId == 20 || - processingOrderList[index].orderStatusId == 995 || - processingOrderList[index].orderStatusId == 998 || - processingOrderList[index].orderStatusId == 999 + borderRadius: BorderRadius.circular( + 30.0)), + child: processingOrderList[ + index] + .orderStatusId == + 20 || + processingOrderList[index] + .orderStatusId == + 995 || + processingOrderList[index] + .orderStatusId == + 998 || + processingOrderList[index] + .orderStatusId == + 999 // processingOrderList[index].orderStatusId == 20 ? Text( // deliveredOrderList[0].orderStatus.toString().substring(12), - TranslationBase.of(context).processingOrder, + TranslationBase.of(context) + .processingOrder, style: TextStyle( color: Colors.white, fontSize: 15.0, @@ -474,7 +564,13 @@ class _OrderPageState extends State with SingleTickerProviderStateMix ), ) : Text( - languageID == "ar" ? processingOrderList[index].orderStatusn.toString() : processingOrderList[index].orderStatus.toString(), + languageID == "ar" + ? processingOrderList[index] + .orderStatusn + .toString() + : processingOrderList[index] + .orderStatus + .toString(), style: TextStyle( color: Colors.white, fontSize: 15.0, @@ -482,7 +578,8 @@ class _OrderPageState extends State with SingleTickerProviderStateMix ), )), Container( - margin: EdgeInsets.only(left: 8, right: 8, top: 1, bottom: 8), + margin: EdgeInsets.only( + left: 8, right: 8, top: 1, bottom: 8), child: Column( // crossAxisAlignment: CrossAxisAlignment.end, children: [ @@ -491,7 +588,9 @@ class _OrderPageState extends State with SingleTickerProviderStateMix Container( margin: EdgeInsets.only(left: 5), child: Text( - processingOrderList[index].orderTotal.toString(), + processingOrderList[index] + .orderTotal + .toString(), style: TextStyle( fontSize: 16.0, fontWeight: FontWeight.bold, @@ -517,7 +616,9 @@ class _OrderPageState extends State with SingleTickerProviderStateMix children: [ Container( child: Text( - processingOrderList[index].productCount.toString(), + processingOrderList[index] + .productCount + .toString(), style: TextStyle( fontSize: 14.0, ), @@ -526,7 +627,8 @@ class _OrderPageState extends State with SingleTickerProviderStateMix Container( margin: EdgeInsets.only(left: 5), child: Text( - TranslationBase.of(context).itemsNo, + TranslationBase.of(context) + .itemsNo, style: TextStyle( fontSize: 14.0, ), @@ -754,6 +856,7 @@ class _OrderPageState extends State with SingleTickerProviderStateMix } Widget getPendingOrder(OrderModelViewModel model) { + ProjectViewModel projectViewModel = Provider.of(context); pendingOrderList.clear(); for (int i = 0; i < model.orders.length; i++) { if (model.orders[i].orderStatusId == 10) { @@ -777,38 +880,56 @@ class _OrderPageState extends State with SingleTickerProviderStateMix children: [ InkWell( onTap: () { - Navigator.push(context, FadePage(page: OrderDetailsPage(orderModel: pendingOrderList[index]))).then((value) { - model.getOrder(widget.customerID, widget.customerGUID, pageID).then((value) { + Navigator.push( + context, + FadePage( + page: OrderDetailsPage( + orderModel: + pendingOrderList[ + index]))) + .then((value) { + model + .getOrder(widget.customerID, + widget.customerGUID, pageID) + .then((value) { getPendingOrder(model); }); }); }, child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ Container( margin: EdgeInsets.all(8.0), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ Row( children: [ Container( - margin: EdgeInsets.only(right: 5), + margin: + EdgeInsets.only(right: 5), child: Text( - TranslationBase.of(context).orderNumber, + TranslationBase.of(context) + .orderNumber, style: TextStyle( fontSize: 16.0, - fontWeight: FontWeight.bold, + fontWeight: + FontWeight.bold, ), ), ), Container( child: Text( - pendingOrderList[index].id.toString(), + pendingOrderList[index] + .id + .toString(), style: TextStyle( fontSize: 16.0, - fontWeight: FontWeight.bold, + fontWeight: + FontWeight.bold, ), ), ), @@ -820,9 +941,11 @@ class _OrderPageState extends State with SingleTickerProviderStateMix Row( children: [ Container( - margin: EdgeInsets.only(right: 5), + margin: + EdgeInsets.only(right: 5), child: Text( - TranslationBase.of(context).orderDate, + TranslationBase.of(context) + .orderDate, style: TextStyle( fontSize: 14.0, ), @@ -830,7 +953,10 @@ class _OrderPageState extends State with SingleTickerProviderStateMix ), Container( child: Text( - pendingOrderList[index].createdOnUtc.toString().substring(0, 10), + pendingOrderList[index] + .createdOnUtc + .toString() + .substring(0, 10), style: TextStyle( fontSize: 14.0, ), @@ -844,7 +970,9 @@ class _OrderPageState extends State with SingleTickerProviderStateMix Container( margin: EdgeInsets.all(8.0), child: SvgPicture.asset( - languageID == "ar" ? 'assets/images/pharmacy/arrow_left.svg' : 'assets/images/pharmacy/arrow_right.svg', + projectViewModel.isArabic + ? 'assets/images/pharmacy/arrow_left.svg' + : 'assets/images/pharmacy/arrow_right.svg', height: 20, width: 20, ), @@ -860,11 +988,13 @@ class _OrderPageState extends State with SingleTickerProviderStateMix endIndent: 0, ), Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ Container( margin: EdgeInsets.all(8.0), - padding: EdgeInsets.only(left: 13.0, right: 13.0), + padding: EdgeInsets.only( + left: 13.0, right: 13.0), decoration: BoxDecoration( border: Border.all( color: Colors.orange[300], @@ -872,11 +1002,15 @@ class _OrderPageState extends State with SingleTickerProviderStateMix width: 5.0, ), color: Colors.orange[300], - borderRadius: BorderRadius.circular(30.0)), - child: pendingOrderList[index].orderStatusId == 10 + borderRadius: + BorderRadius.circular(30.0)), + child: pendingOrderList[index] + .orderStatusId == + 10 ? Text( // deliveredOrderList[0].orderStatus.toString().substring(12), - TranslationBase.of(context).pendingOrder, + TranslationBase.of(context) + .pendingOrder, style: TextStyle( color: Colors.white, fontSize: 15.0, @@ -884,7 +1018,13 @@ class _OrderPageState extends State with SingleTickerProviderStateMix ), ) : Text( - languageID == "ar" ? pendingOrderList[index].orderStatusn.toString() : pendingOrderList[index].orderStatus.toString(), + languageID == "ar" + ? pendingOrderList[index] + .orderStatusn + .toString() + : pendingOrderList[index] + .orderStatus + .toString(), style: TextStyle( color: Colors.white, fontSize: 15.0, @@ -899,9 +1039,12 @@ class _OrderPageState extends State with SingleTickerProviderStateMix Row( children: [ Container( - margin: EdgeInsets.only(left: 5), + margin: + EdgeInsets.only(left: 5), child: Text( - pendingOrderList[index].orderTotal.toString(), + pendingOrderList[index] + .orderTotal + .toString(), style: TextStyle( fontSize: 16.0, fontWeight: FontWeight.bold, @@ -909,9 +1052,11 @@ class _OrderPageState extends State with SingleTickerProviderStateMix ), ), Container( - margin: EdgeInsets.only(left: 5), + margin: + EdgeInsets.only(left: 5), child: Text( - TranslationBase.of(context).sar, + TranslationBase.of(context) + .sar, style: TextStyle( fontSize: 16.0, fontWeight: FontWeight.bold, @@ -927,16 +1072,20 @@ class _OrderPageState extends State with SingleTickerProviderStateMix children: [ Container( child: Text( - pendingOrderList[index].productCount.toString(), + pendingOrderList[index] + .productCount + .toString(), style: TextStyle( fontSize: 14.0, ), ), ), Container( - margin: EdgeInsets.only(left: 5), + margin: + EdgeInsets.only(left: 5), child: Text( - TranslationBase.of(context).itemsNo, + TranslationBase.of(context) + .itemsNo, style: TextStyle( fontSize: 14.0, ), @@ -986,9 +1135,12 @@ class _OrderPageState extends State with SingleTickerProviderStateMix } Widget getCancelledOrder(OrderModelViewModel model) { + ProjectViewModel projectViewModel = Provider.of(context); cancelledOrderList.clear(); for (int i = 0; i < model.orders.length; i++) { - if (model.orders[i].orderStatusId == 40 || model.orders[i].orderStatus == 996 || model.orders[i].orderStatusId == 200) { + if (model.orders[i].orderStatusId == 40 || + model.orders[i].orderStatus == 996 || + model.orders[i].orderStatusId == 200) { cancelledOrderList.add(model.orders[i]); } } @@ -1009,34 +1161,49 @@ class _OrderPageState extends State with SingleTickerProviderStateMix children: [ InkWell( onTap: () { - Navigator.push(context, FadePage(page: OrderDetailsPage(orderModel: cancelledOrderList[index]))); + Navigator.push( + context, + FadePage( + page: OrderDetailsPage( + orderModel: + cancelledOrderList[ + index]))) + ; }, child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ Container( margin: EdgeInsets.all(8.0), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ Row( children: [ Container( - margin: EdgeInsets.only(right: 5), + margin: + EdgeInsets.only(right: 5), child: Text( - TranslationBase.of(context).orderNumber, + TranslationBase.of(context) + .orderNumber, style: TextStyle( fontSize: 16.0, - fontWeight: FontWeight.bold, + fontWeight: + FontWeight.bold, ), ), ), Container( child: Text( - cancelledOrderList[index].id.toString(), + cancelledOrderList[index] + .id + .toString(), style: TextStyle( fontSize: 16.0, - fontWeight: FontWeight.bold, + fontWeight: + FontWeight.bold, ), ), ), @@ -1048,9 +1215,11 @@ class _OrderPageState extends State with SingleTickerProviderStateMix Row( children: [ Container( - margin: EdgeInsets.only(right: 5), + margin: + EdgeInsets.only(right: 5), child: Text( - TranslationBase.of(context).orderDate, + TranslationBase.of(context) + .orderDate, style: TextStyle( fontSize: 14.0, ), @@ -1058,7 +1227,10 @@ class _OrderPageState extends State with SingleTickerProviderStateMix ), Container( child: Text( - cancelledOrderList[index].createdOnUtc.toString().substring(0, 10), + cancelledOrderList[index] + .createdOnUtc + .toString() + .substring(0, 10), style: TextStyle( fontSize: 14.0, ), @@ -1072,7 +1244,9 @@ class _OrderPageState extends State with SingleTickerProviderStateMix Container( margin: EdgeInsets.all(8.0), child: SvgPicture.asset( - languageID == "ar" ? 'assets/images/pharmacy/arrow_left.svg' : 'assets/images/pharmacy/arrow_right.svg', + projectViewModel.isArabic + ? 'assets/images/pharmacy/arrow_left.svg' + : 'assets/images/pharmacy/arrow_right.svg', height: 20, width: 20, ), @@ -1088,11 +1262,17 @@ class _OrderPageState extends State with SingleTickerProviderStateMix endIndent: 0, ), Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ Container( - margin: EdgeInsets.only(left: 8, right: 8, top: 1, bottom: 8), - padding: EdgeInsets.only(left: 10.0, right: 10.0), + margin: EdgeInsets.only( + left: 8, + right: 8, + top: 1, + bottom: 8), + padding: EdgeInsets.only( + left: 10.0, right: 10.0), decoration: BoxDecoration( border: Border.all( color: Colors.red[900], @@ -1100,11 +1280,15 @@ class _OrderPageState extends State with SingleTickerProviderStateMix width: 5.0, ), color: Colors.red[900], - borderRadius: BorderRadius.circular(30.0)), - child: cancelledOrderList[index].orderStatusId == 40 + borderRadius: + BorderRadius.circular(30.0)), + child: cancelledOrderList[index] + .orderStatusId == + 40 ? Text( // deliveredOrderList[0].orderStatus.toString().substring(12), - TranslationBase.of(context).cancelledOrder, + TranslationBase.of(context) + .cancelledOrder, style: TextStyle( color: Colors.white, fontSize: 15.0, @@ -1112,7 +1296,13 @@ class _OrderPageState extends State with SingleTickerProviderStateMix ), ) : Text( - languageID == "ar" ? cancelledOrderList[index].orderStatusn.toString() : cancelledOrderList[index].orderStatus.toString(), + languageID == "ar" + ? cancelledOrderList[index] + .orderStatusn + .toString() + : cancelledOrderList[index] + .orderStatus + .toString(), style: TextStyle( color: Colors.white, fontSize: 15.0, @@ -1120,16 +1310,20 @@ class _OrderPageState extends State with SingleTickerProviderStateMix ), )), Container( - margin: EdgeInsets.only(left: 8, right: 8, top: 1, bottom: 8), + margin: EdgeInsets.only( + left: 8, right: 8, top: 1, bottom: 8), child: Column( // crossAxisAlignment: CrossAxisAlignment.end, children: [ Row( children: [ Container( - margin: EdgeInsets.only(left: 5), + margin: + EdgeInsets.only(left: 5), child: Text( - cancelledOrderList[index].orderTotal.toString(), + cancelledOrderList[index] + .orderTotal + .toString(), style: TextStyle( fontSize: 16.0, fontWeight: FontWeight.bold, @@ -1137,9 +1331,11 @@ class _OrderPageState extends State with SingleTickerProviderStateMix ), ), Container( - margin: EdgeInsets.only(left: 5), + margin: + EdgeInsets.only(left: 5), child: Text( - TranslationBase.of(context).sar, + TranslationBase.of(context) + .sar, style: TextStyle( fontSize: 16.0, fontWeight: FontWeight.bold, @@ -1155,16 +1351,20 @@ class _OrderPageState extends State with SingleTickerProviderStateMix children: [ Container( child: Text( - cancelledOrderList[index].productCount.toString(), + cancelledOrderList[index] + .productCount + .toString(), style: TextStyle( fontSize: 14.0, ), ), ), Container( - margin: EdgeInsets.only(left: 5), + margin: + EdgeInsets.only(left: 5), child: Text( - TranslationBase.of(context).itemsNo, + TranslationBase.of(context) + .itemsNo, style: TextStyle( fontSize: 14.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/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..fb13232b 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]; 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