diff --git a/assets/cmsu_medicalInsight.json b/assets/cmsu_medicalInsight.json new file mode 100644 index 0000000..d1e9f61 --- /dev/null +++ b/assets/cmsu_medicalInsight.json @@ -0,0 +1,231 @@ +{ + "data": [ + { + "id": "CMSUMedInsight", + "name": "ADD CMSU INSIGHT(SHARED WITH SALESFORCE)", + "form-fields": [ + { + "sectionName": "CMSU Insight", + "multiple": false, + "sectionList": [ + { + "name": "HCP Name", + "id": "hcpname", + "depid": "", + "widget": "label", + "input": "label", + "validation": { + "isRequired": false + } + }, + { + "name": "Insight Open Date", + "id": "date", + "depid": "", + "widget": "text", + "input": "Date", + "validation": { + "isRequired": true + } + }, + { + "name": "Insight Modality", + "param": "insight_modality", + "id": "insight_modality", + "selectedValue": [], + "depid": "", + "widget": "dropdown", + "input": "dropdown", + "inputList": [ + { + "id": "CT", + "name": "CT" + }, + { + "id": "HIT", + "name": "HIT" + }, + { + "id": "MI", + "name": "MI" + }, + { + "id": "MR", + "name": "MR" + }, + { + "id": "Postdoc", + "name": "Postdoc" + }, + { + "id": "UL", + "name": "UL" + }, + { + "id": "VL", + "name": "VL" + }, + { + "id": "XR", + "name": "XR" + } + ], + "validation": { + "isRequired": true + } + }, + { + "name": "Discussion Type", + "id": "discussion_type", + "depid": "", + "widget": "dropdown", + "input": "dropdown", + "inputList": [ + { + "id": "Proactive", + + "name": "Proactive" + }, + { + "id": "Reactive", + + "name": "Reactive" + } + ], + "validation": { + "isRequired": true + } + }, + { + "name": "Insight Temperature", + "id": "insight_temperature", + "depid": "", + "widget": "dropdown", + "input": "dropdown", + "inputList": [ + { + "id": "Green", + "name": "Green" + }, + { + "id": "Red", + "name": "Red" + }, + { + "id": "Yellow", + "name": "Yellow " + } + ], + "validation": { + "isRequired": true + } + }, + { + "name": "Insight Owners", + "id": "insight_owners", + "depid": "", + "widget": "dropdown", + "input": "dropdown", + "inputList": [ + { + "id": "Applications", + + "name": "Applications" + }, + { + "id": "BU", + + "name": "BU" + }, + { + "id": "Commercial", + + "name": "Commercial" + }, + { + "id": "Service", + + "name": "Service" + } + ], + "validation": { + "isRequired": true + } + }, + { + "name": "Initiate Alert", + "id": "initiate_alert", + "depid": "", + "widget": "dropdown", + "input": "dropdown", + "inputList": [ + { + "id": "No", + + "name": "No" + }, + { + "id": "Yes", + + "name": "Yes" + } + + ], + "validation": { + "isRequired": true + } + }, + { + "name": "Status", + "id": "status", + "depid": "sourcetype", + "widget": "dropdown", + "input": "dropdown", + "inputList": [ + { + "id": "Open", + + "name": "Open" + }, + { + "id": "Closed", + + "name": "Closed" + }, + { + "id": "Cancelled", + + "name": "Cancelled" + } + + ], + "validation": { + "isRequired": true + } + } + + ] + }, + + { + "sectionName": "Comments", + "multiple": false, + "sectionList": [ + { + "name": "Insight Comments", + "id": "insight_comments", + "depid": "", + "widget": "text", + "input": "textArea", + "validation": { + "isRequired": true, + "maxchars": "300" + } + } + + ] + } + ] + } + ] + } \ No newline at end of file diff --git a/assets/images/a2sc2.svg b/assets/images/a2sc2.svg new file mode 100644 index 0000000..30c5a7f --- /dev/null +++ b/assets/images/a2sc2.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/assets/images/konectar.png b/assets/images/konectar.png deleted file mode 100644 index 17e6198..0000000 Binary files a/assets/images/konectar.png and /dev/null differ diff --git a/assets/images/konectar_logo.svg b/assets/images/konectar_logo.svg new file mode 100644 index 0000000..6ff15ee --- /dev/null +++ b/assets/images/konectar_logo.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/images/newa2sc2.svg b/assets/images/newa2sc2.svg new file mode 100644 index 0000000..5dff07e --- /dev/null +++ b/assets/images/newa2sc2.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/assets/images/newsc2img.svg b/assets/images/newsc2img.svg new file mode 100644 index 0000000..8cfece6 --- /dev/null +++ b/assets/images/newsc2img.svg @@ -0,0 +1,2400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/newsc2iphone.svg b/assets/images/newsc2iphone.svg new file mode 100644 index 0000000..5e2d803 --- /dev/null +++ b/assets/images/newsc2iphone.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/assets/images/sc1bg.svg b/assets/images/sc1bg.svg new file mode 100644 index 0000000..47b7e12 --- /dev/null +++ b/assets/images/sc1bg.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/assets/images/sc1bg1500.svg b/assets/images/sc1bg1500.svg new file mode 100644 index 0000000..e72261e --- /dev/null +++ b/assets/images/sc1bg1500.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/assets/images/sc1devices.png b/assets/images/sc1devices.png new file mode 100644 index 0000000..c9eb4ff Binary files /dev/null and b/assets/images/sc1devices.png differ diff --git a/assets/images/sc1img.svg b/assets/images/sc1img.svg new file mode 100644 index 0000000..191c9df --- /dev/null +++ b/assets/images/sc1img.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/images/sc1img2x.png b/assets/images/sc1img2x.png new file mode 100644 index 0000000..c9eb4ff Binary files /dev/null and b/assets/images/sc1img2x.png differ diff --git a/assets/images/sc2bg500.svg b/assets/images/sc2bg500.svg new file mode 100644 index 0000000..d33abc1 --- /dev/null +++ b/assets/images/sc2bg500.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/assets/images/sc2img.svg b/assets/images/sc2img.svg new file mode 100644 index 0000000..db75729 --- /dev/null +++ b/assets/images/sc2img.svg @@ -0,0 +1,2400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/sc2img2x.png b/assets/images/sc2img2x.png new file mode 100644 index 0000000..6dcb058 Binary files /dev/null and b/assets/images/sc2img2x.png differ diff --git a/assets/images/sc3img2x.png b/assets/images/sc3img2x.png new file mode 100644 index 0000000..450508d Binary files /dev/null and b/assets/images/sc3img2x.png differ diff --git a/assets/images/screen1bg.svg b/assets/images/screen1bg.svg new file mode 100644 index 0000000..83f6612 --- /dev/null +++ b/assets/images/screen1bg.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/assets/images/screen2.svg b/assets/images/screen2.svg new file mode 100644 index 0000000..d8ab821 --- /dev/null +++ b/assets/images/screen2.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/assets/images/screen2bg.svg b/assets/images/screen2bg.svg new file mode 100644 index 0000000..a397664 --- /dev/null +++ b/assets/images/screen2bg.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/assets/medicalinsightform.json b/assets/medicalinsightform.json index aee1992..76af1c9 100644 --- a/assets/medicalinsightform.json +++ b/assets/medicalinsightform.json @@ -38,11 +38,11 @@ "input": "dropdown", "inputList": [ { - "id": "1", + "id": "Acute Neurology1", "name": "Acute Neurology1" }, { - "id": "2", + "id": "Cystic Fibrosis", "name": "Cystic Fibrosis" } ], @@ -58,18 +58,18 @@ "input": "dropdown", "inputList": [ { - "id": "11", - "pid": "1", + "id": "Prometra Pump", + "pid": "Acute Neurology1", "name": "Prometra Pump" }, { - "id": "12", - "pid": "2", + "id": "Prometra Pump", + "pid": "Cystic Fibrosis", "name": "Prometra Pump" }, { - "id": "13", - "pid": "2", + "id": "Prometra Catheter", + "pid": "Cystic Fibrosis", "name": "Prometra Catheter" } ], @@ -85,15 +85,15 @@ "input": "dropdown", "inputList": [ { - "id": "21", + "id": "Advisory Board/Expert Committee", "name": "Advisory Board/Expert Committee" }, { - "id": "22", + "id": "Congress", "name": "Congress" }, { - "id": "23", + "id": "Industry professional direct knowledge ", "name": "Industry professional direct knowledge " } ], @@ -109,13 +109,13 @@ "input": "dropdown", "inputList": [ { - "id": "31", - "pid": "22", + "id": "Industry professional", + "pid": "Congress", "name": "Industry professional" }, { - "id": "32", - "pid": "22", + "id": "Symposium", + "pid": "Congress", "name": "Symposium" } @@ -149,7 +149,7 @@ "input": "dropdown", "inputList": [ { - "id": "41", + "id": "Data Gap", "name": "Data Gap" } diff --git a/assets/sarepta_medicalinsights.json b/assets/sarepta_medicalinsights.json new file mode 100644 index 0000000..30ae302 --- /dev/null +++ b/assets/sarepta_medicalinsights.json @@ -0,0 +1,216 @@ +{ + "data": [ + { + "id": "MedInsight", + "name": "Medical Insights Form", + "form-fields": [ + { + "sectionName": "Medical Insight", + "multiple": false, + "sectionList": [ + { + "name": "HCP Name", + "id": "hcpname", + "depid": "", + "widget": "label", + "input": "label", + "validation": { + "isRequired": false + } + }, + { + "name": "Date", + "id": "date", + "depid": "", + "widget": "text", + "input": "Date", + "validation": { + "isRequired": true + } + }, + { + "name": "Therapeutic Area", + "param": "therapeutic_area", + "id": "therapeutic", + "selectedValue": [], + "depid": "", + "widget": "dropdown", + "input": "dropdown", + "inputList": [ + { + "id": "Acute Neurology1", + "name": "Acute Neurology1" + }, + { + "id": "Cystic Fibrosis", + "name": "Cystic Fibrosis" + } + ], + "validation": { + "isRequired": true + } + }, + { + "name": "Product", + "id": "product", + "depid": "therapeutic", + "widget": "dropdown", + "input": "dropdown", + "inputList": [ + { + "id": "Prometra Pump", + "pid": "Acute Neurology1", + "name": "Prometra Pump" + }, + { + "id": "Prometra Pump", + "pid": "Cystic Fibrosis", + "name": "Prometra Pump" + }, + { + "id": "Prometra Catheter", + "pid": "Cystic Fibrosis", + "name": "Prometra Catheter" + } + ], + "validation": { + "isRequired": true + } + }, + { + "name": "Source Type", + "id": "sourcetype", + "depid": "", + "widget": "dropdown", + "input": "dropdown", + "inputList": [ + { + "id": "Advisory Board/Expert Committee", + "name": "Advisory Board/Expert Committee" + }, + { + "id": "Congress", + "name": "Congress" + }, + { + "id": "Industry professional direct knowledge ", + "name": "Industry professional direct knowledge " + } + ], + "validation": { + "isRequired": true + } + }, + { + "name": "Congress Source", + "id": "congresssource", + "depid": "sourcetype", + "widget": "dropdown", + "input": "dropdown", + "inputList": [ + { + "id": "Industry professional", + "pid": "Congress", + "name": "Industry professional" + }, + { + "id": "Symposium", + "pid": "Congress", + "name": "Symposium" + } + + ], + "validation": { + "isRequired": false + } + }, + { + "name": "Congress Name", + "id": "congressName", + "depid": "sourcetype", + "widget": "text", + "input": "text", + "validation": { + "isRequired": false + } + } + ] + }, + + { + "sectionName": "Medical Insights Details", + "multiple": false, + "sectionList": [ + { + "name": "Key Insight Topics", + "id": "keyinsighttopics", + "depid": "", + "param": "keyinsighttopics", + "widget": "multiselect", + "input": "multiselect", + "inputList": [ + { + "id": "Data Gap", + "name": "Data Gap" + } + + ], + "validation": { + "isRequired": true + } + }, + { + "name": "Medical Insight Summary", + "id": "summary", + "depid": "", + "widget": "text", + "input": "textArea", + "validation": { + "isRequired": true, + "maxchars": "300" + } + } + + ] + }, + { + "sectionName": "Attach Document(s)", + "multiple": true, + "sectionList": [ + { + "name": "Document Name", + "id": "documentName_21", + "depid": "", + "widget": "text", + "input": "text", + "validation": { + "isRequired": true + } + }, + { + "name": "Description", + "id": "documentDescription_21", + "depid": "", + "widget": "text", + "input": "text", + "validation": { + "isRequired": true + } + }, + { + "name": "Choose file", + "id": "chooseFile_22", + "depid": "", + "widget": "button", + "input": "chooseFile", + "validation": { + "isRequired": true, + "multipleFiles": true + } + } + ] + } + ] + } + ] + } \ No newline at end of file diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 4622697..05fec41 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -490,7 +490,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 44SNAJ6T8L; + DEVELOPMENT_TEAM = 69ERN967NS; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -671,7 +671,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 44SNAJ6T8L; + DEVELOPMENT_TEAM = 69ERN967NS; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( diff --git a/lib/contacts_module/ui_screen/interactionform/configprovider.dart b/lib/contacts_module/ui_screen/interactionform/configprovider.dart index 5b32eee..f7ce8a7 100644 --- a/lib/contacts_module/ui_screen/interactionform/configprovider.dart +++ b/lib/contacts_module/ui_screen/interactionform/configprovider.dart @@ -209,7 +209,7 @@ class ConfigDataProvider extends ChangeNotifier { Future> fetchLocalMedicalInsight() async { dynamic jsonResult = jsonDecode( - await rootBundle.loadString("assets/medicalinsightform.json")); + await rootBundle.loadString("assets/sarepta_medicalinsights.json")); //dynamic jsonResult = await MockApiCall().getConfigDataMedical(); List interactionConfigData = []; diff --git a/lib/model/events_details.dart b/lib/model/events_details.dart index 05640d6..9667a3e 100644 --- a/lib/model/events_details.dart +++ b/lib/model/events_details.dart @@ -4,6 +4,10 @@ import 'dart:convert'; +import 'package:hive_flutter/hive_flutter.dart'; +import 'package:konectar_events/utils/hivetypeids.dart'; +part 'events_details.g.dart'; + EventsOverviewDetails eventsOverviewDetailsFromJson(String str) => EventsOverviewDetails.fromJson(json.decode(str)); @@ -11,7 +15,7 @@ String eventsOverviewDetailsToJson(EventsOverviewDetails data) => json.encode(data.toJson()); class EventsOverviewDetails { - OverviewData? data; + EventsOverviewData? data; EventsOverviewDetails({ this.data, @@ -19,7 +23,9 @@ class EventsOverviewDetails { factory EventsOverviewDetails.fromJson(Map json) => EventsOverviewDetails( - data: json["data"] == null ? null : OverviewData.fromJson(json["data"]), + data: json["data"] == null + ? null + : EventsOverviewData.fromJson(json["data"]), ); Map toJson() => { @@ -27,13 +33,13 @@ class EventsOverviewDetails { }; } -class OverviewData { +class EventsOverviewData { int? projectKolAttendee; bool? cal; int? grid; String? eventFor; String? eventId; - List? eventData; + List? topSpeakers; dynamic eventTopics; List? eventSponsers; bool? eventUserAttendee; @@ -41,13 +47,13 @@ class OverviewData { List? arrEvents; int? attendeeCount; - OverviewData({ + EventsOverviewData({ this.projectKolAttendee, this.cal, this.grid, this.eventFor, this.eventId, - this.eventData, + this.topSpeakers, this.eventTopics, this.eventSponsers, this.eventUserAttendee, @@ -56,13 +62,14 @@ class OverviewData { this.attendeeCount, }); - factory OverviewData.fromJson(Map json) => OverviewData( + factory EventsOverviewData.fromJson(Map json) => + EventsOverviewData( projectKolAttendee: json["project_kol_attendee"], cal: json["cal"], grid: json["grid"], eventFor: json["eventFor"], eventId: json["eventId"], - eventData: json["eventData"] == null + topSpeakers: json["eventData"] == null ? [] : List.from( json["eventData"]!.map((x) => TopSpeakers.fromJson(x))), @@ -86,9 +93,9 @@ class OverviewData { "grid": grid, "eventFor": eventFor, "eventId": eventId, - "eventData": eventData == null + "eventData": topSpeakers == null ? [] - : List.from(eventData!.map((x) => x.toJson())), + : List.from(topSpeakers!.map((x) => x.toJson())), "eventTopics": eventTopics, "eventSponsers": eventSponsers == null ? [] @@ -290,10 +297,15 @@ class ArrEvent { }; } +@HiveType(typeId: HiveTypeIdConstants.topspeakersHiveId) class TopSpeakers { + @HiveField(0) String? firstName; + @HiveField(1) dynamic middleName; + @HiveField(2) dynamic lastName; + @HiveField(3) String? numSess; TopSpeakers({ @@ -318,10 +330,15 @@ class TopSpeakers { }; } +@HiveType(typeId: HiveTypeIdConstants.topSponsorsHiveId) class EventSponser { + @HiveField(0) String? numSess; + @HiveField(1) String? sessionSponsor; + @HiveField(2) String? type; + @HiveField(3) String? sponsorsType; EventSponser({ diff --git a/lib/model/events_details.g.dart b/lib/model/events_details.g.dart new file mode 100644 index 0000000..f8b8d80 --- /dev/null +++ b/lib/model/events_details.g.dart @@ -0,0 +1,93 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'events_details.dart'; + +// ************************************************************************** +// TypeAdapterGenerator +// ************************************************************************** + +class TopSpeakersAdapter extends TypeAdapter { + @override + final int typeId = 103; + + @override + TopSpeakers read(BinaryReader reader) { + final numOfFields = reader.readByte(); + final fields = { + for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), + }; + return TopSpeakers( + firstName: fields[0] as String?, + middleName: fields[1] as dynamic, + lastName: fields[2] as dynamic, + numSess: fields[3] as String?, + ); + } + + @override + void write(BinaryWriter writer, TopSpeakers obj) { + writer + ..writeByte(4) + ..writeByte(0) + ..write(obj.firstName) + ..writeByte(1) + ..write(obj.middleName) + ..writeByte(2) + ..write(obj.lastName) + ..writeByte(3) + ..write(obj.numSess); + } + + @override + int get hashCode => typeId.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is TopSpeakersAdapter && + runtimeType == other.runtimeType && + typeId == other.typeId; +} + +class EventSponserAdapter extends TypeAdapter { + @override + final int typeId = 104; + + @override + EventSponser read(BinaryReader reader) { + final numOfFields = reader.readByte(); + final fields = { + for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), + }; + return EventSponser( + numSess: fields[0] as String?, + sessionSponsor: fields[1] as String?, + type: fields[2] as String?, + sponsorsType: fields[3] as String?, + ); + } + + @override + void write(BinaryWriter writer, EventSponser obj) { + writer + ..writeByte(4) + ..writeByte(0) + ..write(obj.numSess) + ..writeByte(1) + ..write(obj.sessionSponsor) + ..writeByte(2) + ..write(obj.type) + ..writeByte(3) + ..write(obj.sponsorsType); + } + + @override + int get hashCode => typeId.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is EventSponserAdapter && + runtimeType == other.runtimeType && + typeId == other.typeId; +} diff --git a/lib/model/events_speakers_k1.dart b/lib/model/events_speakers_k1.dart new file mode 100644 index 0000000..428b654 --- /dev/null +++ b/lib/model/events_speakers_k1.dart @@ -0,0 +1,211 @@ +// To parse this JSON data, do +// +// final eventSpeakersResponse = eventSpeakersResponseFromJson(jsonString); + +import 'dart:convert'; + +EventSpeakersResponse eventSpeakersResponseFromJson(String str) => + EventSpeakersResponse.fromJson(json.decode(str)); + +String eventSpeakersResponseToJson(EventSpeakersResponse data) => + json.encode(data.toJson()); + +class EventSpeakersResponse { + List? data; + + EventSpeakersResponse({ + this.data, + }); + + factory EventSpeakersResponse.fromJson(Map json) => + EventSpeakersResponse( + data: json["data"] == null + ? [] + : List.from( + json["data"]!.map((x) => EventSpeakersData.fromJson(x))), + ); + + Map toJson() => { + "data": data == null + ? [] + : List.from(data!.map((x) => x.toJson())), + }; +} + +class EventSpeakersData { + String? eid; + dynamic eventTopics; + String? npiNum; + String? hcpPinAlias; + String? sessionName; + String? name; + String? kolId; + String? firstName; + dynamic middleName; + dynamic lastName; + String? orgName; + String? country; + String? region; + String? city; + String? numSess; + dynamic optInOutStatus; + String? url1; + dynamic sessionNote; + String? cntNotes; + String? eventAttendeesId; + dynamic medicalInsightId; + String? cntMedicalInsight; + String? kId; + String? id; + int? projKolId; + String? eventsSession; + int? restEventsSessionCount; + String? restEventsSession; + String? eventsTopic; + int? restEventsTopicCount; + String? restEventsTopic; + String? kolName; + String? kolFullName; + + EventSpeakersData({ + this.eid, + this.eventTopics, + this.npiNum, + this.hcpPinAlias, + this.sessionName, + this.name, + this.kolId, + this.firstName, + this.middleName, + this.lastName, + this.orgName, + this.country, + this.region, + this.city, + this.numSess, + this.optInOutStatus, + this.url1, + this.sessionNote, + this.cntNotes, + this.eventAttendeesId, + this.medicalInsightId, + this.cntMedicalInsight, + this.kId, + this.id, + this.projKolId, + this.eventsSession, + this.restEventsSessionCount, + this.restEventsSession, + this.eventsTopic, + this.restEventsTopicCount, + this.restEventsTopic, + this.kolName, + this.kolFullName, + }); + + factory EventSpeakersData.fromJson(Map json) => + EventSpeakersData( + eid: json["eid"], + eventTopics: json["event_topics"], + npiNum: json["npi_num"], + hcpPinAlias: json["hcp_pin_alias"], + sessionName: json["session_name"], + name: json["name"], + kolId: json["kol_id"], + firstName: json["first_name"], + middleName: json["middle_name"], + lastName: json["last_name"], + orgName: json["org_name"], + country: json["Country"], + region: json["Region"], + city: json["City"], + numSess: json["num_sess"], + optInOutStatus: json["opt_in_out_status"], + url1: json["url1"], + sessionNote: json["session_note"], + cntNotes: json["cnt_notes"], + eventAttendeesId: json["event_attendees_id"], + medicalInsightId: json["medical_insight_id"], + cntMedicalInsight: json["cnt_medical_insight"], + kId: json["k_id"], + id: json["id"], + projKolId: json["proj_kol_id"], + eventsSession: json["events_session"], + restEventsSessionCount: json["rest_events_session_count"], + restEventsSession: json["rest_events_session"], + eventsTopic: json["events_topic"], + restEventsTopicCount: json["rest_events_topic_count"], + restEventsTopic: json["rest_events_topic"], + kolName: json["kol_name"], + kolFullName: json["kol_full_name"], + ); + + Map toJson() => { + "eid": eid, + "event_topics": eventTopics, + "npi_num": npiNum, + "hcp_pin_alias": hcpPinAlias, + "session_name": sessionName, + "name": nameValues.reverse[name], + "kol_id": kolId, + "first_name": firstName, + "middle_name": middleName, + "last_name": lastName, + "org_name": orgName, + "Country": countryValues.reverse[country], + "Region": region, + "City": city, + "num_sess": numSess, + "opt_in_out_status": optInOutStatus, + "url1": url1, + "session_note": sessionNote, + "cnt_notes": cntNotes, + "event_attendees_id": eventAttendeesId, + "medical_insight_id": medicalInsightId, + "cnt_medical_insight": cntMedicalInsight, + "k_id": kId, + "id": id, + "proj_kol_id": projKolId, + "events_session": eventsSession, + "rest_events_session_count": restEventsSessionCount, + "rest_events_session": restEventsSession, + "events_topic": eventsTopic, + "rest_events_topic_count": restEventsTopicCount, + "rest_events_topic": restEventsTopic, + "kol_name": kolName, + "kol_full_name": kolFullName, + }; +} + +enum Country { BELGIUM, GERMANY, UNITED_STATES } + +final countryValues = EnumValues({ + "Belgium": Country.BELGIUM, + "Germany": Country.GERMANY, + "United States": Country.UNITED_STATES +}); + +enum Name { THE_2036_AMERICAN_ACADEMY_OF_AAI } + +final nameValues = EnumValues({ + "2036 American Academy of (AAI)": Name.THE_2036_AMERICAN_ACADEMY_OF_AAI +}); + +enum RestEventsSession { BUSINESS_MEETING_AND_FORUM, EMPTY } + +final restEventsSessionValues = EnumValues({ + " Business Meeting and Forum": RestEventsSession.BUSINESS_MEETING_AND_FORUM, + "": RestEventsSession.EMPTY +}); + +class EnumValues { + Map map; + late Map reverseMap; + + EnumValues(this.map); + + Map get reverse { + reverseMap = map.map((k, v) => MapEntry(v, k)); + return reverseMap; + } +} diff --git a/lib/model/neweventsmodel.dart b/lib/model/neweventsmodel.dart index fe1fbd0..6f5d0db 100644 --- a/lib/model/neweventsmodel.dart +++ b/lib/model/neweventsmodel.dart @@ -250,7 +250,7 @@ class EventsList { @HiveField(62) String? sponsors; @HiveField(63) - bool? eventUserInterest = false; + late bool? eventUserInterest; EventsList({ this.city, diff --git a/lib/model/neweventsmodel.g.dart b/lib/model/neweventsmodel.g.dart index 99652ee..ca95532 100644 --- a/lib/model/neweventsmodel.g.dart +++ b/lib/model/neweventsmodel.g.dart @@ -80,13 +80,14 @@ class EventsListAdapter extends TypeAdapter { url1: fields[54] as String?, url2: fields[55] as String?, userCount: fields[56] as String?, + eventUserInterest: fields[63] as bool?, ); } @override void write(BinaryWriter writer, EventsList obj) { writer - ..writeByte(63) + ..writeByte(64) ..writeByte(0) ..write(obj.city) ..writeByte(1) @@ -212,7 +213,9 @@ class EventsListAdapter extends TypeAdapter { ..writeByte(61) ..write(obj.topSpeakers) ..writeByte(62) - ..write(obj.sponsors); + ..write(obj.sponsors) + ..writeByte(63) + ..write(obj.eventUserInterest); } @override diff --git a/lib/model/sessionstopics_model.dart b/lib/model/sessionstopics_model.dart new file mode 100644 index 0000000..cd9dc33 --- /dev/null +++ b/lib/model/sessionstopics_model.dart @@ -0,0 +1,102 @@ +// To parse this JSON data, do +// +// final sessionTopicsResponse = sessionTopicsResponseFromJson(jsonString); + +import 'dart:convert'; + +SessionTopicsResponse sessionTopicsResponseFromJson(String str) => + SessionTopicsResponse.fromJson(json.decode(str)); + +String sessionTopicsResponseToJson(SessionTopicsResponse data) => + json.encode(data.toJson()); + +class SessionTopicsResponse { + List? data; + + SessionTopicsResponse({ + this.data, + }); + + factory SessionTopicsResponse.fromJson(Map json) => + SessionTopicsResponse( + data: json["data"] == null + ? [] + : List.from( + json["data"]!.map((x) => SessionsTopicsData.fromJson(x))), + ); + + Map toJson() => { + "data": data == null + ? [] + : List.from(data!.map((x) => x.toJson())), + }; +} + +class SessionsTopicsData { + String? sessionName; + String? eventTopics; + String? kolEventsId; + String? eventAttendeesId; + String? myEventId; + String? note; + String? kolId; + String? id; + bool? canEditNotes; + bool? canAddNotes; + String? noteCount; + String? projKolId; + bool? canAddInsights; + bool? canEditInsights; + + SessionsTopicsData({ + this.sessionName, + this.eventTopics, + this.kolEventsId, + this.eventAttendeesId, + this.myEventId, + this.note, + this.kolId, + this.id, + this.canEditNotes, + this.canAddNotes, + this.noteCount, + this.projKolId, + this.canAddInsights, + this.canEditInsights, + }); + + factory SessionsTopicsData.fromJson(Map json) => + SessionsTopicsData( + sessionName: json["session_name"], + eventTopics: json["event_topics"], + kolEventsId: json["kol_events_id"], + eventAttendeesId: json["event_attendees_id"], + myEventId: json["my_event_id"], + note: json["note"], + kolId: json["kol_id"], + id: json["id"], + canEditNotes: json["can_edit_notes"], + canAddNotes: json["can_add_notes"], + noteCount: json["note_count"], + projKolId: json["proj_kol_id"], + canAddInsights: json["can_add_insights"], + canEditInsights: json["can_edit_insights"], + ); + + Map toJson() => { + "session_name": sessionName, + "event_topics": eventTopics, + "kol_events_id": kolEventsId, + "event_attendees_id": eventAttendeesId, + "my_event_id": myEventId, + "note": note, + "kol_id": kolId, + "id": id, + "can_edit_notes": canEditNotes, + "can_add_notes": canAddNotes, + "note_count": noteCount, + "proj_kol_id": projKolId, + "can_add_insights": canAddInsights, + "can_edit_insights": canEditInsights, + }; +} diff --git a/lib/utils/apicall.dart b/lib/utils/apicall.dart index fd0f49f..e2cef62 100644 --- a/lib/utils/apicall.dart +++ b/lib/utils/apicall.dart @@ -5,7 +5,9 @@ import 'package:dio/dio.dart'; import 'package:dio/io.dart'; import 'package:flutter/services.dart'; import 'package:konectar_events/model/affiliationsmodel.dart'; +import 'package:konectar_events/model/events_details.dart'; import 'package:konectar_events/model/events_list_resp_2.dart'; +import 'package:konectar_events/model/events_speakers_k1.dart'; import 'package:konectar_events/model/eventsdetailmodel.dart'; import 'package:konectar_events/model/eventsmodel.dart'; import 'package:konectar_events/model/eventsoverview.dart'; @@ -14,6 +16,7 @@ import 'package:konectar_events/model/keywords_model.dart'; import 'package:konectar_events/model/neweventsmodel.dart'; import 'package:konectar_events/model/scope_model.dart'; import 'package:konectar_events/model/sessionnotesmodel.dart'; +import 'package:konectar_events/model/sessionstopics_model.dart'; import 'package:konectar_events/model/specialtymodel.dart'; import 'package:konectar_events/model/topics_cloud_model.dart'; import 'package:konectar_events/utils/constants.dart'; @@ -113,22 +116,22 @@ class ApiCall { var formData = FormData.fromMap({ "user_email": "vinodh@aissel.com", "project_id": "", - "start": DateTime.now().toString, - "end": "", - "order_by": "7", - "type": type ?? "1" + "start": DateTime(2024, 10, 14).toIso8601String(), + "end": DateTime(2024, 12, 14).toIso8601String(), + "order_by": 7, + "type": type ?? 1 }); response = await dio.post( '${EventsConstants.devUrl}${EventsConstants.eventslistapi}', options: Options(), - queryParameters: { - "user_email": "vinodh@aissel.com", - "project_id": "", - "start": DateTime.now().toString, - "end": "", - "order_by": "7", - "type": type ?? "1" - }, + // queryParameters: { + // "user_email": "vinodh@aissel.com", + // "project_id": "", + // "start": 2024 - 11 - 22, + // "end": "", + // "order_by": 7, + // "type": 1, + // }, data: formData); print("response user eventssssss here!!!!!!!!!!!!!!!!!!!!! "); print(response.data.toString()); @@ -196,6 +199,7 @@ class ApiCall { required String startDate, required String endDate, }) async { + print("CHECK_DATE $startDate $endDate $eventid"); Dio dio = Dio(); (dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate = (HttpClient client) { @@ -204,12 +208,13 @@ class ApiCall { return client; }; Response response; + //ventId=4937&type='1'&sd=2024-07-30&ed=2024-08-03&user_email=vinodh@aissel.com var formData = FormData.fromMap({ "user_email": "vinodh@aissel.com", "eventId": eventid, - "sd": "\"$startDate\"", - "ed": "\"$endDate\"", - "type": "\"1\"", + "sd": startDate, + "ed": endDate, + "type": 1, }); print("FORMDATA:${formData.toString()},$startDate,$endDate"); response = await dio.post( @@ -314,7 +319,7 @@ class ApiCall { return data; } - Future getEventsOverview( + Future getEventsOverview( String eventid, String startDate, String endDate) async { Dio dio = Dio(); (dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate = @@ -326,26 +331,125 @@ class ApiCall { Response response; var formData = FormData.fromMap({ "user_email": "vinodh@aissel.com", - "start": startDate, - "end": endDate, "event_id": eventid, }); response = await dio.post( - '${EventsConstants.stagingUrl}${EventsConstants.eventslistapi}', + '${EventsConstants.devUrl}${EventsConstants.eventdetailsapi}', options: Options(), queryParameters: { "user_email": "vinodh@aissel.com", + "event_id": eventid, }, data: formData); print("response user eventssssss here!!!!!!!!!!!!!!!!!!!!! "); print(response.data.toString()); Map jsondata = json.decode(response.data); - EventsDetailsResp? eventdata = EventsDetailsResp.fromJson(jsondata); - OverviewData overviewData = eventdata.data; + EventsOverviewDetails? eventdata = EventsOverviewDetails.fromJson(jsondata); + EventsOverviewData overviewData = eventdata.data!; return overviewData; } + Future> getEventsSpeakersFromK1( + String eventid) async { + Dio dio = Dio(); + (dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate = + (HttpClient client) { + client.badCertificateCallback = + (X509Certificate cert, String host, int port) => true; + return client; + }; + Response response; + var formData = FormData.fromMap({ + "user_email": "vinodh@aissel.com", + "event_id": eventid, + "sd": "2024-07-30", + "ed": "2024-08-03", + }); + response = await dio.post( + '${EventsConstants.devUrl}${EventsConstants.speakerslistapi}', + options: Options(), + queryParameters: { + "user_email": "vinodh@aissel.com", + "event_id": eventid, + }, + data: formData); + print("response user eventssssss here!!!!!!!!!!!!!!!!!!!!! "); + print(response.data.toString()); + Map jsondata = json.decode(response.data); + EventSpeakersResponse? eventdata = EventSpeakersResponse.fromJson(jsondata); + List data = eventdata.data!; + + return data; + } + + Future> getSessionsTopics( + String eventid, String kolid, String kid) async { + Dio dio = Dio(); + (dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate = + (HttpClient client) { + client.badCertificateCallback = + (X509Certificate cert, String host, int port) => true; + return client; + }; + Response response; + print("formdata : eventid:$eventid kolid:$kolid kid:$kid"); + var formData = FormData.fromMap({ + "user_email": "vinodh@aissel.com", + "event_id": "eventid", + "kol_id": kolid, + "k_id": kid, + "proj_kol_id": 0, + }); + response = await dio.post( + '${EventsConstants.devUrl}${EventsConstants.showEventsTopicsAndSession}', + options: Options(), + queryParameters: { + "user_email": "vinodh@aissel.com", + "event_id": eventid, + }, + data: formData); + print("response user SESSIONTOPICS here!!!!!!!!!!!!!!!!!!!!! "); + print(response.data.toString()); + Map jsondata = json.decode(response.data); + SessionTopicsResponse sessionTopicsResponse = + SessionTopicsResponse.fromJson(jsondata); + List data = sessionTopicsResponse.data!; + + return data; + } + + Future addSessionNotes(String eventid, String kolid, + String event_attendees_id, String kid, String notes) async { + Dio dio = Dio(); + (dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate = + (HttpClient client) { + client.badCertificateCallback = + (X509Certificate cert, String host, int port) => true; + return client; + }; + Response response; + var formData = FormData.fromMap({ + "user_email": "vinodh@aissel.com", + "kol_events_id": eventid, + "kol_id": kolid, + "event_attendees_id": event_attendees_id, + "notes": notes, + }); + response = await dio.post( + '${EventsConstants.devUrl}${EventsConstants.showEventsTopicsAndSession}', + options: Options(), + data: formData); + print("response user ADDSESSION here!!!!!!!!!!!!!!!!!!!!! "); + print(response.data.toString()); + Map jsondata = json.decode(response.data); + // SessionTopicsResponse sessionTopicsResponse = + // SessionTopicsResponse.fromJson(jsondata); + // List data = sessionTopicsResponse.data!; + + return jsondata; + } + //************ K2 API CALLS *********************************************************************************************************************************** Future> getEventsFromK2(int page, String search, @@ -646,8 +750,8 @@ class ApiCall { var formData = { "page": page, "limit": 40, - "id": eventid, - "event_id": event_unique_id, + "id": "da8cb02cdeddd174bf0fd0ae08247ca1", + "event_id": "1a0029ea72bf4adc5e6bbfd91ace364a", "hcp_full_name": searchkey // "conditions": [ // {"field": eventfield, "type": "like", "value": searchkey} diff --git a/lib/utils/appcolors.dart b/lib/utils/appcolors.dart index bb35a28..f934e97 100644 --- a/lib/utils/appcolors.dart +++ b/lib/utils/appcolors.dart @@ -22,6 +22,8 @@ class AppColors { static const Color contentColorPink = Color(0xFFFF3AF2); static const Color contentColorRed = Color(0xFFE80054); static const Color contentColorCyan = Color(0xFF50E4FF); + //background: #F3F3F3; + List appcolors = [ contentColorYellow, contentColorBlue, diff --git a/lib/utils/constants.dart b/lib/utils/constants.dart index a1dd382..c859ef1 100644 --- a/lib/utils/constants.dart +++ b/lib/utils/constants.dart @@ -12,23 +12,33 @@ class EventsConstants { static const Color fonttopic = Color.fromARGB(255, 68, 68, 68); static const Color btnGreenColor = Color.fromARGB(255, 46, 166, 100); static const Color btnBlueColor = Color.fromARGB(255, 0, 102, 204); + static const Color homeCardBackgound = + Color.fromRGBO(229, 229, 229, 1); //rgba(243, 243, 243, 1) + static const Color onboardButtonColor = Color.fromRGBO(3, 126, 238, 1); // static const String domainUrl = "http://192.0.0.2:8007/api/method/"; static const String domainUrl = "http://192.168.2.109:8007/api/method/"; //192.0.0.2:8007 - iphone // 192.168.2.109:8007 - office - +//K1 API~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static const String stagingUrl = "https://cardio-staging.konectar.io/reports/"; - static const String devUrl = "http://192.168.2.130/konectar-sandbox/reports/"; - static const String eventslistapi = "load_future_events"; - static const String followUnfollowEvent = "save_user_interested_event/"; - static const String attendNotAttendEvent = "save_user_attending_event/"; - static const String specialtyOfSpeakers = "get_top_specialities_donut_chart"; - static const String insightsTopicsCloud = "get_topic_clouds_chart/"; - static const String insightsBarChart = "get_top_affiliation_bar_chart/"; - static const String speakerslistapi = "view_micro_event_data"; - static const String eventdetailsapi = "view_micro_event"; + static const String devUrl = + "http://192.168.2.130/konectar-sandbox/eventapis/"; + static const String eventslistapi = "loadFutureEvents/"; + static const String followUnfollowEvent = "saveUserInterestedEvent/"; + static const String attendNotAttendEvent = "saveUserAttendingEvent/"; + static const String specialtyOfSpeakers = "getSpecialitiesDonutChart"; + static const String insightsTopicsCloud = "getTopicCloudChart/"; + static const String insightsBarChart = "getTopAffiliationBarChart/"; + static const String speakerslistapi = "eventSpeakers"; + static const String eventdetailsapi = "eventOverview"; + static const String showEventsTopicsAndSession = "showEventsTopicsAndSession"; + static const String getTopicNotes = "getTopicNotes"; + static const String saveEventsTopicNote = "saveEventsTopicNote"; + static const String eventUserAnalytics = "eventUserAnalytics"; + +//K1 API END~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ static const String eventslistapifromk2 = "http://192.168.2.130:8888/api/kolevents/v1/en/fetch"; diff --git a/lib/utils/hivetypeids.dart b/lib/utils/hivetypeids.dart new file mode 100644 index 0000000..8994e0a --- /dev/null +++ b/lib/utils/hivetypeids.dart @@ -0,0 +1,5 @@ +class HiveTypeIdConstants { + static const int topspeakersHiveId = 103; + static const int topSponsorsHiveId = 104; + static const int topTopicsHiveId = 105; +} diff --git a/lib/view/eventslist.dart b/lib/view/eventslist.dart index 0dbc047..d62b30e 100644 --- a/lib/view/eventslist.dart +++ b/lib/view/eventslist.dart @@ -3,6 +3,14 @@ import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; import 'package:infinite_scroll_pagination/infinite_scroll_pagination.dart'; +import 'package:konectar_events/contacts_module/ui_screen/interactionform/configprovider.dart'; +import 'package:konectar_events/contacts_module/ui_screen/interactionform/interactionprovider.dart'; +import 'package:konectar_events/contacts_module/ui_screen/interactionform/new_dynamicform.dart'; +import 'package:konectar_events/contacts_module/ui_screen/interactionform/viewinteractionprovider.dart'; +import 'package:konectar_events/contacts_module/ui_screen/medical_insight.dart'; +import 'package:konectar_events/contacts_module/ui_screen/new_editinteraction.dart'; +import 'package:konectar_events/contacts_module/ui_screen/new_viewinteraction.dart'; +import 'package:konectar_events/model/events_speakers_k1.dart'; import 'package:konectar_events/model/eventsdetailmodel.dart'; import 'package:konectar_events/model/eventspeakers.dart'; import 'package:konectar_events/model/neweventsmodel.dart'; @@ -36,22 +44,30 @@ class _EventsListingScreenState extends State bool isExtended = false; bool isExtendedInterested = false; final ScrollController _scrollController = ScrollController(); - final PagingController pagingController = - PagingController(firstPageKey: 1); + final PagingController pagingController = + PagingController(firstPageKey: 0); static const _pageSize = 20; + int lastIndex = 0; String searchSpeaker = ""; @override void initState() { super.initState(); _tabController = TabController(length: 2, vsync: this); + final provider = Provider.of(context, listen: false); + WidgetsBinding.instance.addPostFrameCallback((timeStamp) { init(); }); pagingController.addPageRequestListener((pageKey) { - _fetchPage(pageKey); + _fetchPages(pageKey, provider); }); } + @override + void didChangeDependencies() { + super.didChangeDependencies(); + } + Future _fetchPage(int pageKey) async { //await initConnectivity(); // if (connectionStatus.toString().contains("ConnectivityResult.none")) { @@ -70,10 +86,12 @@ class _EventsListingScreenState extends State // _pagingController.error = error; // } // } else { + print("FIRST PAGINATION"); try { final newItems = await Provider.of(context, listen: false) - .getSpeakersDetails(pageKey, widget.event.eventId!, - widget.event.eventUniqueId!, searchSpeaker); + .getSpeakersDetails(pageKey, widget.event.id!, + widget.event.eventUniqueId!, searchSpeaker, lastIndex); + lastIndex = newItems.length - 1; final isLastPage = newItems.isEmpty; if (isLastPage) { pagingController.appendLastPage(newItems); @@ -88,14 +106,27 @@ class _EventsListingScreenState extends State // } } + Future _fetchPages(int pageKey, EventsProvider provider) async { + List list = await provider + .getInitialSpeakersDetails("47336", searchkey: searchSpeaker); + print("CHECK LENGTH ${list.length}"); + final isLastPage = pageKey + _pageSize >= list.length; + final nextItems = + list.skip(pageKey).take(_pageSize).toList(); // Get next batch of items + + if (isLastPage) { + pagingController.appendLastPage(nextItems); + } else { + final nextPageKey = pageKey + nextItems.length; + pagingController.appendPage(nextItems, nextPageKey); + } + } + init() async { String start = CustomDateFormatter().formatYearDate( CustomDateFormatter().convertStringToDate(widget.event.start!)); String end = CustomDateFormatter().formatYearDate( CustomDateFormatter().convertStringToDate(widget.event.end!)); - // await Provider.of(context, listen: false) - // .getSessionCount(widget.event.eventId!, widget.event.eventUniqueId!); - final provider = Provider.of(context, listen: false); // pagingController.addPageRequestListener((pageKey) { // _fetchPage(pageKey); @@ -103,14 +134,20 @@ class _EventsListingScreenState extends State // await Provider.of(context, listen: false) // .getEventsDetails(widget.event.eventId!); // await Provider.of(context, listen: false).getSessionCount(); + // await Provider.of(context, listen: false) + // .getTopicsCloud(widget.event); + print("FIRST INITIAL"); await Provider.of(context, listen: false) - .getTopicsCloud(widget.event); + .getInitialSpeakersDetails(widget.event.id!, searchkey: searchSpeaker); + Provider.of(context, listen: false).getSessionCount(); + + await Provider.of(context, listen: false) + .getOverviewData(widget.event.id!, start, end); await Provider.of(context, listen: false) .getSpecialtyData(widget.event); await Provider.of(context, listen: false) .getAffiliations(widget.event); - // await Provider.of(context, listen: false) - // .getOverviewData(widget.event.eventId!, start, end); + setState(() {}); } @@ -206,6 +243,159 @@ class _EventsListingScreenState extends State ); } + Widget medicalInsights() { + return Consumer( + builder: (BuildContext context, provider, Widget? child) { + return Container( + color: EventsConstants.bgcolor, + child: Column( + children: [ + SizedBox( + height: 20, + ), + Center( + child: FloatingActionButton.extended( + backgroundColor: Colors.green, + onPressed: () async { + final ConfigDataProvider configDataProvider = + ConfigDataProvider(); + + await configDataProvider.initConfigUIDataMediccalInsight(); + await Provider.of(context, listen: false) + .initConfigData(); + + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => InteractionScreen1( + index: 0, + form: Provider.of(context, + listen: false) + .intConfigDataList[0] + .name, + title: "Hope Nueman", + ))); + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => const InteractionListScreen())); + }, + heroTag: 'medicalinsights', + elevation: 0, + label: const Text("Add Medical Insights", + style: TextStyle( + color: Colors.white, + )), + icon: const Icon( + Icons.add, + color: Colors.white, + ), + ), + ), + SizedBox( + height: 20, + ), + provider.savedList.isEmpty + ? SizedBox.shrink() + : ListView.builder( + itemCount: provider.savedList.length, + shrinkWrap: true, + cacheExtent: + double.parse(provider.savedList.length.toString()), + itemBuilder: (context, index) { + return Column( + children: [ + ListTile( + subtitle: Text( + 'Updated on ${CustomDateFormatter().convertDateTimeToDate(provider.savedList[index].updatedTime!)}', + //style: TextStyle(fontStyle: FontStyle.italic), + ), + title: Text( + provider.savedList[index].id, + ), + trailing: SizedBox( + width: 100, + child: Row(children: [ + IconButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => + ViewInteractionScreen1( + saveInteraction: + provider.savedList[index], + ))); + }, + icon: const Icon( + Icons.info_outline, + size: 24, + color: Color.fromARGB(255, 8, 39, 92), + ), + ), + IconButton( + onPressed: () async { + await provider.initConfigData().then({ + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (BuildContext context) => + // EditInteractionScreen( + // saveInteraction: provider + // .savedList[index], + // ))) + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => + EditInteractionScreen1( + saveInteraction: provider + .savedList[index], + ))) + }); + }, + icon: const Icon( + Icons.edit, + size: 24, + color: Color.fromARGB(255, 8, 39, 92), + ), + ), + // IconButton( + // onPressed: () { + // showDeleteRecordAlertDialog( + // context, + // provider.savedList[index].id, + // provider.savedList[index]); + // }, + // icon: const Icon( + // Icons.delete, + // size: 24, + // color: Color.fromARGB(255, 8, 39, 92), + // ), + // ), + ]), + ), + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => + ViewInteractionScreen1( + saveInteraction: + provider.savedList[index], + ))); + }, + ), + const Divider(), + ], + ); + }), + ], + ), + ); + }); + } + Widget headerview(BuildContext context, EventsProvider provider) { //return SafeArea( return Container( @@ -535,7 +725,7 @@ class _EventsListingScreenState extends State ProfileInfoItem( "Session(s)", provider.eventSessionCount), ProfileInfoItem( - "Speaker(s)", provider.speakercount), + "Speaker(s)", provider.speakersList.length), //ProfileInfoItem("Note(s)", 1), ], widget.event, provider), SizedBox( @@ -549,7 +739,7 @@ class _EventsListingScreenState extends State pinned: true, floating: true, delegate: ContestTabHeader( - const TabBar( + TabBar( indicatorSize: TabBarIndicatorSize.tab, labelColor: Colors.black, tabAlignment: TabAlignment.fill, @@ -559,6 +749,17 @@ class _EventsListingScreenState extends State fontWeight: FontWeight.bold, ), labelPadding: EdgeInsets.all(2), + onTap: (index) { + // print(controller.index); + // print(index); + if (index == 1) { + print('Same Tab Clicked'); + // await provider + // .getInitialSpeakersDetails(widget.event.id!); + + pagingController.refresh(); + } + }, tabs: _tabs, ), ), @@ -568,7 +769,7 @@ class _EventsListingScreenState extends State body: TabBarView( //controller: _tabController, children: [ - expandableDetails(), + expandableDetails(provider), speakersList(context, provider), EventsInsights( eventid: widget.event.eventId!, @@ -576,6 +777,7 @@ class _EventsListingScreenState extends State specialtyList: provider.specialtyList, affiliations: provider.affiliations, ), + // medicalInsights(), //SocialMedia(), ], ), @@ -1305,7 +1507,22 @@ class _EventsListingScreenState extends State ); } - Widget expandableDetails() { + Widget expandableDetails(EventsProvider provider) { + List topSpeakers = []; + List topSponsors = []; + List topTopics = []; + + if (provider.overviewData!.topSpeakers!.length != 0) { + for (var obj in provider.overviewData!.topSpeakers!) { + topSpeakers.add(obj.firstName!); + } + } + if (provider.overviewData!.eventSponsers!.length != 0) { + for (var obj in provider.overviewData!.eventSponsers!) { + topSponsors.add(obj.sessionSponsor!); + } + } + return // isTablet // ? Container( @@ -1328,21 +1545,22 @@ class _EventsListingScreenState extends State color: EventsConstants.bgcolor, padding: EdgeInsets.only(left: 8, right: 8), child: SingleChildScrollView( - child: Column(children: [ - SizedBox( - height: 5, - ), - listViewTopicCard("Top 3 topics", widget.event.topTopics ?? "", true), - SizedBox( - height: 3, - ), - listViewTopicCard("Speakers with most sessions", - widget.event.topSpeakers ?? "", true), - SizedBox( - height: 3, - ), - listViewTopicCard("Sponsors", widget.event.sponsors ?? "", true) - ]), + child: Expanded( + child: Column(children: [ + SizedBox( + height: 5, + ), + listViewTopicCard("Top 3 topics", topTopics, true), + SizedBox( + height: 3, + ), + listViewTopicCard("Speakers with most sessions", topSpeakers, true), + SizedBox( + height: 3, + ), + listViewTopicCard("Sponsors", topSponsors, true) + ]), + ), ), ); } @@ -1378,7 +1596,7 @@ class _EventsListingScreenState extends State ); } - Widget listViewTopicCard(String title, String content, bool visible) { + Widget listViewTopicCard(String title, List content, bool visible) { return Visibility( visible: visible, child: Card( @@ -1407,13 +1625,24 @@ class _EventsListingScreenState extends State SizedBox( height: 5, ), - Text( - content, - style: TextStyle( - fontSize: isTablet ? 22 : 14, - color: Colors.grey[900], - ), - ), + content.isNotEmpty + ? SizedBox( + height: 70, + child: ListView.builder( + shrinkWrap: true, + itemCount: content.length, + itemBuilder: (context, index) { + return Text( + "${index + 1}. ${content[index]}", + style: TextStyle( + fontSize: isTablet ? 22 : 14, + color: Colors.grey[900], + ), + ); + }, + ), + ) + : SizedBox.shrink(), ], ), ), @@ -1488,9 +1717,9 @@ class _EventsListingScreenState extends State ), ), Expanded( - child: PagedListView.separated( + child: PagedListView.separated( pagingController: pagingController, - builderDelegate: PagedChildBuilderDelegate( + builderDelegate: PagedChildBuilderDelegate( //padding: const EdgeInsets.all(8), // itemCount: provider.isSearchSpeakers // ? provider.srcheventdetailList.length @@ -1502,15 +1731,24 @@ class _EventsListingScreenState extends State return GestureDetector( onTap: () { - Navigator.of(context).push( - MaterialPageRoute( - builder: (context) => HCPProfileScreen( - eventsdetail: detail, - eventid: widget.event.eventId!, - title: widget.event.name1!, + if (widget.event.eventUserInterest!) { + Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => HCPProfileScreen( + eventsdetail: detail, + eventid: "47336", + title: widget.event.name1!, + sessionNames: detail.sessionName != "" + ? detail.sessionName!.split(",") + : [], + topics: detail.eventTopics != "" + ? detail.eventTopics!.split("|") + : [], + kolFullName: detail.kolFullName!, + ), ), - ), - ); + ); + } }, child: Container( // height: double.infinity, @@ -1528,7 +1766,7 @@ class _EventsListingScreenState extends State // color: Colors.white, // ), child: Text( - detail.hcpFullName![0], + detail.kolFullName![0], style: TextStyle( fontWeight: FontWeight.bold, color: Colors.white), @@ -1557,7 +1795,7 @@ class _EventsListingScreenState extends State crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "$index : ${detail.hcpFullName!}", + "$index : ${detail.kolFullName!}", style: TextStyle( fontWeight: FontWeight.bold, fontSize: 14, @@ -1573,7 +1811,7 @@ class _EventsListingScreenState extends State : MediaQuery.of(context).size.width * 0.5, child: Text( - detail.topics!.join(" | "), + detail.eventTopics ?? "", maxLines: 3, style: TextStyle( // decoration: TextDecoration.underline, @@ -1767,7 +2005,7 @@ const _tabs = [ Tab(text: "Details"), Tab(text: "Speakers"), Tab(text: "Insights"), - //Tab(text: "Social Media"), +// Tab(text: "Medical Insights"), ]; class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate { diff --git a/lib/view/home.dart b/lib/view/home.dart index e3f31af..b9b759e 100644 --- a/lib/view/home.dart +++ b/lib/view/home.dart @@ -155,6 +155,7 @@ class _HomeScreenState extends State with TickerProviderStateMixin { // final newItems = // await Provider.of(context, listen: false) // .getOfflineMyEvents(); + //OLD final isLastPage = newItems.length < _pageSize; if (isLastPage) { pagingController.appendLastPage(newItems); @@ -162,6 +163,19 @@ class _HomeScreenState extends State with TickerProviderStateMixin { final nextPageKey = pageKey + newItems.length; pagingController.appendPage(newItems, nextPageKey); } + //NEW + // final isLastPage = pageKey + _pageSize >= newItems.length; + // final nextItems = newItems + // .skip(pageKey) + // .take(_pageSize) + // .toList(); // Get next batch of items + + // if (isLastPage) { + // pagingController.appendLastPage(nextItems); + // } else { + // final nextPageKey = pageKey + nextItems.length; + // pagingController.appendPage(nextItems, nextPageKey); + // } } catch (error) { pagingController.error = error; } @@ -441,7 +455,8 @@ class _HomeScreenState extends State with TickerProviderStateMixin { ]; }, body: Container( - color: EventsConstants.bgcolor, + //color: EventsConstants.bgcolor, + color: Colors.white, child: buildPaginationListView(context, provider)), ), ), @@ -474,7 +489,8 @@ class _HomeScreenState extends State with TickerProviderStateMixin { ), ), Container( - color: EventsConstants.bgcolor, + //color: EventsConstants.bgcolor, + color: Colors.white, child: Padding( padding: const EdgeInsets.only(left: 16, right: 16, top: 8, bottom: 4), @@ -1449,8 +1465,11 @@ class _HomeScreenState extends State with TickerProviderStateMixin { onRefresh: () async => pagingController.refresh(), child: PagedListView( pagingController: pagingController, + padding: EdgeInsets.zero, builderDelegate: PagedChildBuilderDelegate( itemBuilder: (BuildContext context, item, int index) { + print( + "VALUE RENDER ${item.eventId} - ${item.name1}- ${item.eventUserInterest}"); final int count = provider.eventList.length > 10 ? 10 : provider.eventList.length; @@ -1499,7 +1518,9 @@ class _HomeScreenState extends State with TickerProviderStateMixin { }, child: Card( elevation: 4, + //color: EventsConstants.homeCardBackgound, surfaceTintColor: Colors.white, + //surfaceTintColor: EventsConstants.homeCardBackgound, // shadowColor: Constants.bgcolor, child: buildCardView(context, eventsList, provider), ), @@ -1563,7 +1584,7 @@ class _HomeScreenState extends State with TickerProviderStateMixin { // fullscreenDialog: true)); }, child: Card( - elevation: 2, + elevation: 1, shadowColor: EventsConstants.bgcolor, child: buildCardView( context, provider.eventList[index], provider))); @@ -1576,7 +1597,10 @@ class _HomeScreenState extends State with TickerProviderStateMixin { ); } - buildCardView(BuildContext context, dynamic event, EventsProvider provider) { + buildCardView( + BuildContext context, EventsList event, EventsProvider provider) { + print( + "CHECK EVENT INTERESTED : ${provider.checkIfUserInterested(event.eventId!)}}"); double height = isTablet ? MediaQuery.of(context).size.height * 0.35 : MediaQuery.of(context).size.height * 0.65; @@ -1587,8 +1611,10 @@ class _HomeScreenState extends State with TickerProviderStateMixin { // color: Color.fromARGB(179, 248, 238, 238), color: Colors.white, + // color: EventsConstants.homeCardBackgound, borderRadius: BorderRadius.all(Radius.circular(20))), // height: MediaQuery.of(context).size.height * 0.2, + // height: 136, // height: double.minPositive, padding: isTablet ? EdgeInsets.symmetric(horizontal: 8.0, vertical: 2.0) @@ -1641,7 +1667,7 @@ class _HomeScreenState extends State with TickerProviderStateMixin { ), ])), ), - + //const Spacer(), SizedBox( height: 14, ), @@ -1650,7 +1676,7 @@ class _HomeScreenState extends State with TickerProviderStateMixin { Align( alignment: FractionalOffset.bottomLeft, child: Row( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Column( @@ -1665,7 +1691,7 @@ class _HomeScreenState extends State with TickerProviderStateMixin { ), TextSpan( text: - ' ${CustomDateFormatter().formatYearDate(CustomDateFormatter().convertStringToDate(event.start))} to ${CustomDateFormatter().formatYearDate(CustomDateFormatter().convertStringToDate(event.end))}', + ' ${CustomDateFormatter().formatYearDate(CustomDateFormatter().convertStringToDate(event.start!))} to ${CustomDateFormatter().formatYearDate(CustomDateFormatter().convertStringToDate(event.end!))}', style: TextStyle( color: Colors.black, //fontStyle: FontStyle.italic, @@ -1722,10 +1748,11 @@ class _HomeScreenState extends State with TickerProviderStateMixin { elevation: 1, shape: CircleBorder(), backgroundColor: EventsConstants.bgcolor, + //backgroundColor: EventsConstants.homeCardBackgound, onPressed: () async { // event.isfav = !event.isfav; - if (event.isfav) { + if (event.eventUserInterest!) { //If event is added to fav then unfollow String msg = await provider .removeEventsToFavs(event.eventId!); @@ -1776,7 +1803,7 @@ class _HomeScreenState extends State with TickerProviderStateMixin { SizedBox( height: 2, ), - event.eventUserInterest + event.eventUserInterest! ? RichText( text: TextSpan( children: [ diff --git a/lib/view/login.dart b/lib/view/login.dart index a56a1cb..81589f6 100644 --- a/lib/view/login.dart +++ b/lib/view/login.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; +import 'package:flutter_svg/svg.dart'; import 'package:konectar_events/firebaseexample.dart'; import 'package:konectar_events/model/userdata_model.dart'; import 'package:konectar_events/utils/apicall.dart'; @@ -87,26 +88,35 @@ class _LoginScreenState extends State { return OrientationBuilder( builder: (BuildContext context, Orientation orientation) { return Scaffold( - appBar: CustomAppBar( - backgroundcolor: EventsConstants.blueColor, - title: "Sign In", - ), + // appBar: CustomAppBar( + // backgroundcolor: EventsConstants.blueColor, + // title: "Sign In", + // ), // resizeToAvoidBottomInset: true, - body: Container( - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage("assets/images/background_login.jpg"), - fit: BoxFit.fitHeight, - ), - ), - child: orientation == Orientation.portrait - ? Column( - children: _buildBody(orientation, provider), - ) - : Row( - children: _buildBody(orientation, provider), - ), - )); + body: Stack(children: [ + SvgPicture.asset( + 'assets/images/sc2bg500.svg', + fit: BoxFit.cover, + // width: MediaQuery.of(context).size.width, + // height: MediaQuery.of(context).size.height, + ), + Container( + // decoration: BoxDecoration( + // image: DecorationImage( + // image: AssetImage("assets/images/background_login.jpg"), + // fit: BoxFit.fitHeight, + // ), + // ), + child: orientation == Orientation.portrait + ? Column( + mainAxisAlignment: MainAxisAlignment.center, + children: _buildBody(orientation, provider), + ) + : Row( + children: _buildBody(orientation, provider), + ), + ), + ])); }); }); } @@ -155,202 +165,243 @@ class _LoginScreenState extends State { // ), // ), // ), + SizedBox( + height: 10, + ), + SvgPicture.asset( + "assets/images/konectar_logo.svg", + fit: BoxFit.cover, + ), Expanded( flex: 2, - child: Container( - // decoration: const BoxDecoration( - // gradient: LinearGradient( - // begin: Alignment.topRight, - // end: Alignment.bottomLeft, - // colors: [ - // Color.fromARGB(255, 126, 134, 147), - // Color.fromARGB(255, 193, 198, 209), - // Color.fromARGB(255, 214, 217, 223), - // ], - // )), - padding: EdgeInsets.symmetric( - horizontal: 30, - vertical: orientation == Orientation.portrait ? 20 : 0), - // decoration: const BoxDecoration( - // gradient: LinearGradient( - // begin: Alignment.topRight, - // end: Alignment.bottomLeft, - // colors: [ - // Color.fromARGB(255, 126, 134, 147), - // Color.fromARGB(255, 193, 198, 209), - // Color.fromARGB(255, 214, 217, 223), - // ], - // )), - child: _buildform(provider), + child: Center( + child: Container( + // decoration: const BoxDecoration( + // gradient: LinearGradient( + // begin: Alignment.topRight, + // end: Alignment.bottomLeft, + // colors: [ + // Color.fromARGB(255, 126, 134, 147), + // Color.fromARGB(255, 193, 198, 209), + // Color.fromARGB(255, 214, 217, 223), + // ], + // )), + padding: EdgeInsets.symmetric( + horizontal: 30, + vertical: orientation == Orientation.portrait ? 20 : 0), + // decoration: const BoxDecoration( + // gradient: LinearGradient( + // begin: Alignment.topRight, + // end: Alignment.bottomLeft, + // colors: [ + // Color.fromARGB(255, 126, 134, 147), + // Color.fromARGB(255, 193, 198, 209), + // Color.fromARGB(255, 214, 217, 223), + // ], + // )), + child: _buildform(provider), + ), ), - ) + ), + Padding( + padding: const EdgeInsets.all(20.0), + child: Align( + alignment: Alignment.center, + child: Column( + children: [ + Center( + child: Text( + "By continuing, you agree to the Aissel Conditions of Use Privacy Notice.", + textAlign: TextAlign.center, + style: TextStyle(fontSize: 14), + ), + ), + SizedBox( + height: 20, + ), + Text( + "Contact Helpdesk : Support@aissel.com", + textAlign: TextAlign.center, + style: TextStyle(fontSize: 14), + ), + ], + ), + ), + ), ]; } Widget _buildform(LoginProvider provider) { return SingleChildScrollView( - child: Column(mainAxisAlignment: MainAxisAlignment.start, children: [ - // Text( - // 'Please fill the details', - // style: TextStyle( - // fontSize: isTablet ? 22.0 : 16, - // fontWeight: FontWeight.bold, - // color: Colors.blue[900]), - // ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Text( + // 'Please fill the details', + // style: TextStyle( + // fontSize: isTablet ? 22.0 : 16, + // fontWeight: FontWeight.bold, + // color: Colors.blue[900]), + // ), - SizedBox( - height: 30, - child: Image.asset( - "assets/images/konector_image_logo.png", - fit: BoxFit.cover, - ), - ), - const SizedBox( - height: 40, - ), - // CustomTextField(labelText: "Name", controller: nameTextController), - // const SizedBox( - // height: 20, - // ), + // const SizedBox( + // height: 40, + // ), + // CustomTextField(labelText: "Name", controller: nameTextController), + // const SizedBox( + // height: 20, + // ), - CustomTextField(labelText: "Email", controller: emailTextController), - // const SizedBox(), - // CustomTextField( - // labelText: "Application url", controller: domainTextConrtroller), - provider.showCodeField - ? Column( - children: [ - const SizedBox( - height: 20, - ), - CustomTextField( - labelText: "Enter code", - obscure: true, - controller: secretKeyTextConrtroller), - ], - ) - : SizedBox.shrink(), - - SizedBox( - height: isTablet ? 40 : 20, - ), - CustomButton( - backgroundColor: EventsConstants.blueColor, - onPressed: () async { - setState(() { - print("loading"); - provider.loading = true; - }); - - if (textFieldsValidation(provider).isEmpty) { - print("email:${emailTextController.text}"); - // if (await _logout) { - // print("LOGOUT"); - // provider.code = secretKeyTextConrtroller.text; - // Map resp = await provider.verifyCode( - // emailTextController.text, secretKeyTextConrtroller.text); - // if (resp["code"] == "1200") { - // provider.loading = false; - // provider.showCodeField = false; - // provider.showMessage = true; - // _displaySnackBar("You have logged in successfully"); - // _saveprefs(resp["token"], emailTextController.text, - // secretKeyTextConrtroller.text, true) - // .then((value) { - // Navigator.of(context).pushReplacement( - // MaterialPageRoute( - // builder: (context) => NavigationHomeScreen()), - // ); - // }); - // } else { - // provider.message = resp["message"]; - // } - // } else { - print("FIRST LOGIN"); - if (!provider.showCodeField) { - provider.email = emailTextController.text; - String encoded = - base64.encode(utf8.encode(provider.deviceId)); - - Map resp = await provider.verifyEmail( - emailTextController.text, encoded, platform); - print("resp:${resp["code"]}"); - if (resp.isEmpty) { - print("isEmplty"); - } - - if (resp["code"] == "1200") { - provider.loading = false; - provider.showCodeField = true; - provider.showMessage = true; - } else { - provider.loading = false; - provider.showCodeField = false; - provider.showMessage = true; - } - - provider.message = resp["message"]; - setState(() { - emailTextController.text = provider.email!; - }); - } else { - provider.code = secretKeyTextConrtroller.text; - Map resp = await provider.verifyCode( - emailTextController.text, secretKeyTextConrtroller.text); - if (resp["code"] == "1200") { - provider.loading = false; - provider.showCodeField = false; - provider.showMessage = true; - _displaySnackBar("You have logged in successfully"); - _saveprefs(resp["token"], emailTextController.text, - secretKeyTextConrtroller.text, true) - .then((value) { - Navigator.of(context).pushReplacement( - MaterialPageRoute( - builder: (context) => NavigationHomeScreen()), - ); - }); - } else { - provider.message = resp["message"]; - } - setState(() { - emailTextController.text = provider.email!; - secretKeyTextConrtroller.text = provider.code!; - }); - } - // } - - //_joinMeeting(roomText.text, "demo meet2"); - // _saveprefs( - - // emailTextController.text, - - // true) - // .then((value) { - // Navigator.of(context).pushReplacement( - // MaterialPageRoute( - // builder: (context) => FirebaseExample( - // title: secretKeyTextConrtroller.text, - // )), - // ); - // } - // ); - } else { - _displaySnackBar(textFieldsValidation(provider)); - } - }, - textColor: Colors.white, - fontsize: isTablet ? 22 : 18, - title: provider.showCodeField ? "Verify" : "Submit"), - SizedBox( - height: 10, - ), - provider.showMessage - ? Text(provider.message!) - : provider.loading - ? Center(child: CircularProgressIndicator()) + Text( + "Sign-In to your account", + style: TextStyle(fontSize: 20), + ), + const SizedBox( + height: 20, + ), + CustomTextField( + labelText: "Email", controller: emailTextController), + // const SizedBox(), + // CustomTextField( + // labelText: "Application url", controller: domainTextConrtroller), + provider.showCodeField + ? Column( + children: [ + const SizedBox( + height: 20, + ), + CustomTextField( + labelText: "Enter code", + obscure: true, + controller: secretKeyTextConrtroller), + ], + ) : SizedBox.shrink(), - ]), + + SizedBox( + height: isTablet ? 40 : 20, + ), + Center( + child: CustomButton( + backgroundColor: EventsConstants.onboardButtonColor, + onPressed: () async { + setState(() { + print("loading"); + provider.loading = true; + }); + + if (textFieldsValidation(provider).isEmpty) { + print("email:${emailTextController.text}"); + // if (await _logout) { + // print("LOGOUT"); + // provider.code = secretKeyTextConrtroller.text; + // Map resp = await provider.verifyCode( + // emailTextController.text, secretKeyTextConrtroller.text); + // if (resp["code"] == "1200") { + // provider.loading = false; + // provider.showCodeField = false; + // provider.showMessage = true; + // _displaySnackBar("You have logged in successfully"); + // _saveprefs(resp["token"], emailTextController.text, + // secretKeyTextConrtroller.text, true) + // .then((value) { + // Navigator.of(context).pushReplacement( + // MaterialPageRoute( + // builder: (context) => NavigationHomeScreen()), + // ); + // }); + // } else { + // provider.message = resp["message"]; + // } + // } else { + print("FIRST LOGIN"); + if (!provider.showCodeField) { + provider.email = emailTextController.text; + String encoded = + base64.encode(utf8.encode(provider.deviceId)); + + Map resp = await provider.verifyEmail( + emailTextController.text, encoded, platform); + print("resp:${resp["code"]}"); + if (resp.isEmpty) { + print("isEmplty"); + } + + if (resp["code"] == "1200") { + provider.loading = false; + provider.showCodeField = true; + provider.showMessage = true; + } else { + provider.loading = false; + provider.showCodeField = false; + provider.showMessage = true; + } + + provider.message = resp["message"]; + setState(() { + emailTextController.text = provider.email!; + }); + } else { + provider.code = secretKeyTextConrtroller.text; + Map resp = await provider.verifyCode( + emailTextController.text, + secretKeyTextConrtroller.text); + if (resp["code"] == "1200") { + provider.loading = false; + provider.showCodeField = false; + provider.showMessage = true; + _displaySnackBar("You have logged in successfully"); + _saveprefs(resp["token"], emailTextController.text, + secretKeyTextConrtroller.text, true) + .then((value) { + Navigator.of(context).pushReplacement( + MaterialPageRoute( + builder: (context) => NavigationHomeScreen()), + ); + }); + } else { + provider.message = resp["message"]; + } + setState(() { + emailTextController.text = provider.email!; + secretKeyTextConrtroller.text = provider.code!; + }); + } + // } + + //_joinMeeting(roomText.text, "demo meet2"); + // _saveprefs( + + // emailTextController.text, + + // true) + // .then((value) { + // Navigator.of(context).pushReplacement( + // MaterialPageRoute( + // builder: (context) => FirebaseExample( + // title: secretKeyTextConrtroller.text, + // )), + // ); + // } + // ); + } else { + _displaySnackBar(textFieldsValidation(provider)); + } + }, + textColor: Colors.white, + fontsize: isTablet ? 22 : 18, + title: provider.showCodeField ? "Verify" : "Sign In"), + ), + SizedBox( + height: 10, + ), + provider.showMessage + ? Text(provider.message!) + : provider.loading + ? Center(child: CircularProgressIndicator()) + : SizedBox.shrink(), + ]), ); } diff --git a/lib/view/login_components/care_view.dart b/lib/view/login_components/care_view.dart index 80d3eb2..dca50ae 100644 --- a/lib/view/login_components/care_view.dart +++ b/lib/view/login_components/care_view.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; class CareView extends StatelessWidget { final AnimationController animationController; @@ -74,46 +75,64 @@ class CareView extends StatelessWidget { position: _firstHalfAnimation, child: SlideTransition( position: _secondHalfAnimation, - child: Padding( - padding: const EdgeInsets.only(bottom: 100), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - SlideTransition( - position: _relaxFirstHalfAnimation, - child: SlideTransition( - position: _relaxSecondHalfAnimation, - child: Text( - "Track Events Everywhere", - style: - TextStyle(fontSize: 26.0, fontWeight: FontWeight.bold), - ), - ), - ), - Padding( - padding: - EdgeInsets.only(left: 64, right: 64, bottom: 16, top: 16), - child: Text( - "Available on your phone,tablet and laptop", - textAlign: TextAlign.center, - ), - ), - SlideTransition( - position: _imageFirstHalfAnimation, - child: SlideTransition( - position: _imageSecondHalfAnimation, - child: Container( - constraints: BoxConstraints(maxWidth: 350, maxHeight: 250), - child: Image.asset( - 'assets/introduction_animation/events3.jpg', - fit: BoxFit.contain, + child: Stack(children: [ + SvgPicture.asset( + 'assets/images/sc2bg500.svg', + fit: BoxFit.fill, + // width: MediaQuery.of(context).size.width, + // height: MediaQuery.of(context).size.height, + ), + Container( + padding: const EdgeInsets.only(bottom: 100), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SlideTransition( + position: _relaxFirstHalfAnimation, + child: SlideTransition( + position: _relaxSecondHalfAnimation, + child: Center( + //child: Padding( + // padding: EdgeInsets.only( + // left: 34, right: 64, bottom: 16, top: 30), + child: Text( + "Discover, Profile & Engage Top HCPs! ", + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 22.0, + fontWeight: FontWeight.bold, + ), + //), + ), ), ), ), - ), - ], + Padding( + padding: + EdgeInsets.only(left: 64, right: 64, bottom: 16, top: 30), + child: Text( + "Tier & segment top HCPs, access detailed profiles for effective engagement.", + textAlign: TextAlign.center, + ), + ), + SlideTransition( + position: _imageFirstHalfAnimation, + child: SlideTransition( + position: _imageSecondHalfAnimation, + child: Container( + constraints: + BoxConstraints(maxWidth: 350, maxHeight: 250), + child: Image.asset( + 'assets/images/sc2img2x.png', + fit: BoxFit.cover, + ), + ), + ), + ), + ], + ), ), - ), + ]), ), ); } diff --git a/lib/view/login_components/center_next_button.dart b/lib/view/login_components/center_next_button.dart index 9d9cc7f..d35f431 100644 --- a/lib/view/login_components/center_next_button.dart +++ b/lib/view/login_components/center_next_button.dart @@ -1,5 +1,6 @@ import 'package:animations/animations.dart'; import 'package:flutter/material.dart'; +import 'package:konectar_events/utils/constants.dart'; class CenterNextButton extends StatelessWidget { final AnimationController animationController; @@ -42,7 +43,7 @@ class CenterNextButton extends StatelessWidget { return Padding( padding: - EdgeInsets.only(bottom: 16 + MediaQuery.of(context).padding.bottom), + EdgeInsets.only(bottom: 2 + MediaQuery.of(context).padding.bottom), child: Column( mainAxisAlignment: MainAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.center, @@ -74,7 +75,8 @@ class CenterNextButton extends StatelessWidget { decoration: BoxDecoration( borderRadius: BorderRadius.circular( 8 + 32 * (1 - _signUpMoveAnimation.value)), - color: Color(0xff132137), + //color: Color(0xff132137), + color: EventsConstants.onboardButtonColor, ), child: PageTransitionSwitcher( duration: Duration(milliseconds: 480), @@ -92,7 +94,7 @@ class CenterNextButton extends StatelessWidget { transitionType: SharedAxisTransitionType.vertical, ); }, - child: _signUpMoveAnimation.value > 0.7 + child: _signUpMoveAnimation.value > 0.5 ? InkWell( key: ValueKey('Sign Up button'), onTap: onNextClick, @@ -103,7 +105,7 @@ class CenterNextButton extends StatelessWidget { MainAxisAlignment.spaceBetween, children: [ Text( - 'Sign In', + 'Sign Up', style: TextStyle( color: Colors.white, fontSize: 18, @@ -165,9 +167,10 @@ class CenterNextButton extends StatelessWidget { Widget _pageView() { int _selectedIndex = 0; - if (animationController.value >= 0.7) { - _selectedIndex = 3; - } else if (animationController.value >= 0.5) { + // if (animationController.value >= 0.7) { + // _selectedIndex = 3; + // } else + if (animationController.value >= 0.5) { _selectedIndex = 2; } else if (animationController.value >= 0.3) { _selectedIndex = 1; @@ -180,7 +183,7 @@ class CenterNextButton extends StatelessWidget { child: Row( mainAxisSize: MainAxisSize.min, children: [ - for (var i = 0; i < 4; i++) + for (var i = 0; i < 3; i++) Padding( padding: const EdgeInsets.all(4), child: AnimatedContainer( diff --git a/lib/view/login_components/intropaging.dart b/lib/view/login_components/intropaging.dart index 89cbcef..bba5479 100644 --- a/lib/view/login_components/intropaging.dart +++ b/lib/view/login_components/intropaging.dart @@ -1,5 +1,7 @@ import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; import 'package:konectar_events/utils/constants.dart'; +import 'package:konectar_events/view/home.dart'; import 'package:konectar_events/view/login.dart'; import 'package:konectar_events/view/login_components/care_view.dart'; import 'package:konectar_events/view/login_components/center_next_button.dart'; @@ -9,6 +11,7 @@ import 'package:konectar_events/view/login_components/splash_view.dart'; import 'package:konectar_events/view/login_components/top_back_skip_view.dart'; import 'package:konectar_events/view/login_components/welcome_view.dart'; import 'package:konectar_events/view/navigation_home_screen.dart'; +import 'package:konectar_events/widgets/home_drawer.dart'; class IntroductionAnimationScreen extends StatefulWidget { const IntroductionAnimationScreen({Key? key}) : super(key: key); @@ -39,51 +42,55 @@ class _IntroductionAnimationScreenState @override Widget build(BuildContext context) { print(_animationController?.value); - return Scaffold( - appBar: AppBar( - backgroundColor: EventsConstants.bgcolor, - title: Container( - // constraints: BoxConstraints(maxWidth: 350, maxHeight: 350), - child: Image.asset( - 'assets/introduction_animation/introduction_image1.png', - fit: BoxFit.contain, + return SafeArea( + top: true, + child: Scaffold( + // appBar: AppBar( + // backgroundColor: EventsConstants.bgcolor, + // title: Container( + // // constraints: BoxConstraints(maxWidth: 350, maxHeight: 350), + // child: Image.asset( + // 'assets/images/onboardklogo.png', + // fit: BoxFit.contain, + // ), + // ), + // centerTitle: true, + // ), + backgroundColor: Colors.white, + body: ClipRect( + child: Stack( + children: [ + SplashView( + animationController: _animationController!, + ), + + CareView( + animationController: _animationController!, + ), + RelaxView( + animationController: _animationController!, + ), + // CareView( + // animationController: _animationController!, + // ), + MoodDiaryVew( + animationController: _animationController!, + ), + // WelcomeView( + // animationController: _animationController!, + // ), + TopBackSkipView( + onBackClick: _onBackClick, + onSkipClick: _onSkipClick, + animationController: _animationController!, + ), + CenterNextButton( + animationController: _animationController!, + onNextClick: _onNextClick, + ), + ], ), ), - centerTitle: true, - ), - backgroundColor: EventsConstants.bgcolor, - body: ClipRect( - child: Stack( - children: [ - // SplashView( - // animationController: _animationController!, - // ), - CareView( - animationController: _animationController!, - ), - RelaxView( - animationController: _animationController!, - ), - CareView( - animationController: _animationController!, - ), - // MoodDiaryVew( - // animationController: _animationController!, - // ), - WelcomeView( - animationController: _animationController!, - ), - TopBackSkipView( - onBackClick: _onBackClick, - onSkipClick: _onSkipClick, - animationController: _animationController!, - ), - CenterNextButton( - animationController: _animationController!, - onNextClick: _onNextClick, - ), - ], - ), ), ); } @@ -97,20 +104,24 @@ class _IntroductionAnimationScreenState // if (_animationController!.value >= 0 && // _animationController!.value <= 0.2) { // _animationController?.animateTo(0.0); - // } else + // } + // else if (_animationController!.value > 0.2 && _animationController!.value <= 0.4) { _animationController?.animateTo(0.2); } else if (_animationController!.value > 0.4 && _animationController!.value <= 0.6) { _animationController?.animateTo(0.4); - } else if (_animationController!.value > 0.6 && - _animationController!.value <= 0.8) { - _animationController?.animateTo(0.6); - } else if (_animationController!.value > 0.8 && - _animationController!.value <= 1.0) { - _animationController?.animateTo(0.8); } + //else + // if (_animationController!.value > 0.6 && + // _animationController!.value <= 0.8) { + // _animationController?.animateTo(0.6); + // } else + // if (_animationController!.value > 0.8 && + // _animationController!.value <= 1.0) { + // _animationController?.animateTo(0.8); + // } } void _onNextClick() { @@ -122,11 +133,12 @@ class _IntroductionAnimationScreenState _animationController?.animateTo(0.6); } else if (_animationController!.value > 0.4 && _animationController!.value <= 0.6) { - _animationController?.animateTo(0.8); - } else if (_animationController!.value > 0.6 && - _animationController!.value <= 0.8) { _signUpClick(); } + // else if (_animationController!.value > 0.4 && + // _animationController!.value <= 0.8) { + // _signUpClick(); + // } } void _signUpClick() { @@ -135,3 +147,65 @@ class _IntroductionAnimationScreenState ); } } + +// void _onSkipClick() { +// _animationController?.animateTo(0.8, +// duration: Duration(milliseconds: 1200)); +// } + +// void _onBackClick() { +// // if (_animationController!.value >= 0 && +// // _animationController!.value <= 0.2) { +// // _animationController?.animateTo(0.0); +// // } else +// // if (_animationController!.value > 0.2 && +// // _animationController!.value <= 0.4) { +// // _animationController?.animateTo(0.2); +// // } else +// if (_animationController!.value > 0.4 && +// _animationController!.value <= 0.6) { +// _animationController?.animateTo(0.4); +// } else if (_animationController!.value > 0.6 && +// _animationController!.value <= 0.8) { +// _animationController?.animateTo(0.6); +// } else if (_animationController!.value > 0.8 && +// _animationController!.value <= 1.0) { +// _animationController?.animateTo(0.8); +// } +// } + +// void _onNextClick() { +// // if (_animationController!.value <= 0.2) { +// // _animationController?.animateTo(0.0); +// // } else +// // if (_animationController!.value > 0.2 && +// // _animationController!.value <= 0.4) { +// // _animationController?.animateTo(0.2); +// // } else +// if (_animationController!.value > 0.4 && +// _animationController!.value <= 0.6) { +// _animationController?.animateTo(0.4); +// } else if (_animationController!.value > 0.6 && +// _animationController!.value <= 0.8) { +// _animationController?.animateTo(0.6); +// } else if (_animationController!.value > 0.8 && +// _animationController!.value <= 1.0) { +// _signUpClick(); +// } + +// if (_animationController!.value >= 0 && +// _animationController!.value <= 0.2) { +// _animationController?.animateTo(0.4); +// } else if (_animationController!.value > 0.2 && +// _animationController!.value <= 0.4) { +// _animationController?.animateTo(0.6); +// } else if (_animationController!.value > 0.4 && +// _animationController!.value <= 0.6) { +// _animationController?.animateTo(0.8); +// } else if (_animationController!.value > 0.6 && +// _animationController!.value <= 0.8) { +// _signUpClick(); +// } +// } + +// } diff --git a/lib/view/login_components/mood_diary_vew.dart b/lib/view/login_components/mood_diary_vew.dart index 207657c..688f34e 100644 --- a/lib/view/login_components/mood_diary_vew.dart +++ b/lib/view/login_components/mood_diary_vew.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; class MoodDiaryVew extends StatelessWidget { final AnimationController animationController; @@ -15,7 +16,7 @@ class MoodDiaryVew extends StatelessWidget { curve: Interval( 0.4, 0.6, - curve: Curves.fastOutSlowIn, + curve: Curves.fastEaseInToSlowEaseOut, ), )); final _secondHalfAnimation = @@ -74,45 +75,72 @@ class MoodDiaryVew extends StatelessWidget { position: _firstHalfAnimation, child: SlideTransition( position: _secondHalfAnimation, - child: Padding( - padding: const EdgeInsets.only(bottom: 100), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - "Mood Dairy", - style: TextStyle(fontSize: 26.0, fontWeight: FontWeight.bold), - ), - SlideTransition( - position: _moodFirstHalfAnimation, - child: SlideTransition( - position: _moodSecondHalfAnimation, + child: Stack(children: [ + Padding( + padding: const EdgeInsets.only(left: 4.0), + child: SvgPicture.asset( + 'assets/images/sc1bg1500.svg', + fit: BoxFit.cover, + // width: MediaQuery.of(context).size.width, + // height: MediaQuery.of(context).size.height, + ), + ), + Container( + padding: const EdgeInsets.only(bottom: 100), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + // SlideTransition( + // position: _relaxAnimation, + // child: Container( + // constraints: BoxConstraints(maxWidth: 350, maxHeight: 350), + // child: Image.asset( + // 'assets/introduction_animation/introduction_image1.png', + // fit: BoxFit.contain, + // ), + // ), + // ), + + Center( + child: SlideTransition( + position: _secondHalfAnimation, + child: Padding( + padding: EdgeInsets.only( + left: 20, + ), + child: Text( + "Stay updated on medical events tailored to your areas of interest", + style: TextStyle( + fontSize: 18.0, fontWeight: FontWeight.bold), + ), + ), + ), + ), + SlideTransition( + position: _secondHalfAnimation, child: Padding( padding: EdgeInsets.only( - left: 64, right: 64, top: 16, bottom: 16), + left: 64, right: 64, top: 30, bottom: 16), child: Text( - "Lorem ipsum dolor sit amet,consectetur adipiscing elit,sed do eiusmod tempor incididunt ut labore", + "Get curated conference listings to optimize event participation, KOL strategies and outreach.", textAlign: TextAlign.center, ), ), ), - ), - SlideTransition( - position: _imageFirstHalfAnimation, - child: SlideTransition( + SlideTransition( position: _imageSecondHalfAnimation, child: Container( constraints: BoxConstraints(maxWidth: 350, maxHeight: 250), child: Image.asset( - 'assets/introduction_animation/mood_dairy_image.png', - fit: BoxFit.contain, + 'assets/images/sc3img2x.png', + fit: BoxFit.cover, ), ), ), - ), - ], + ], + ), ), - ), + ]), ), ); } diff --git a/lib/view/login_components/relax_view.dart b/lib/view/login_components/relax_view.dart index fa7a796..deef445 100644 --- a/lib/view/login_components/relax_view.dart +++ b/lib/view/login_components/relax_view.dart @@ -1,4 +1,6 @@ import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:flutter_svg_provider/flutter_svg_provider.dart'; class RelaxView extends StatelessWidget { final AnimationController animationController; @@ -68,52 +70,64 @@ class RelaxView extends StatelessWidget { position: _firstHalfAnimation, child: SlideTransition( position: _secondHalfAnimation, - child: Padding( - padding: const EdgeInsets.only(bottom: 100), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - // SlideTransition( - // position: _relaxAnimation, - // child: Container( - // constraints: BoxConstraints(maxWidth: 350, maxHeight: 350), - // child: Image.asset( - // 'assets/introduction_animation/introduction_image1.png', - // fit: BoxFit.contain, - // ), - // ), - // ), - SlideTransition( - position: _relaxAnimation, - child: Text( - "There's a plan for every event ", - style: TextStyle(fontSize: 26.0, fontWeight: FontWeight.bold), - ), - ), - SlideTransition( - position: _textAnimation, - child: Padding( - padding: - EdgeInsets.only(left: 64, right: 64, top: 16, bottom: 16), - child: Text( - "Single solution for more impactful event experience", - textAlign: TextAlign.center, - ), - ), - ), - SlideTransition( - position: _imageAnimation, - child: Container( - constraints: BoxConstraints(maxWidth: 350, maxHeight: 250), - child: Image.asset( - 'assets/introduction_animation/events3.jpg', - fit: BoxFit.contain, - ), - ), - ), - ], + child: Stack(children: [ + SvgPicture.asset( + 'assets/images/sc1bg1500.svg', + fit: BoxFit.cover, + // width: MediaQuery.of(context).size.width, + // height: MediaQuery.of(context).size.height, ), - ), + Container( + padding: const EdgeInsets.only(bottom: 100), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + // SlideTransition( + // position: _relaxAnimation, + // child: Container( + // constraints: BoxConstraints(maxWidth: 350, maxHeight: 350), + // child: Image.asset( + // 'assets/introduction_animation/introduction_image1.png', + // fit: BoxFit.contain, + // ), + // ), + // ), + + Center( + child: SlideTransition( + position: _relaxAnimation, + child: Text( + "Welcome!", + style: TextStyle( + fontSize: 30.0, fontWeight: FontWeight.bold), + ), + ), + ), + SlideTransition( + position: _textAnimation, + child: Padding( + padding: EdgeInsets.only( + left: 64, right: 64, top: 30, bottom: 16), + child: Text( + "An AI-powered platform that offers intelligent, data-driven insights into the HCP landscape.", + textAlign: TextAlign.center, + ), + ), + ), + SlideTransition( + position: _imageAnimation, + child: Container( + constraints: BoxConstraints(maxWidth: 350, maxHeight: 250), + child: Image.asset( + 'assets/images/sc1img2x.png', + fit: BoxFit.cover, + ), + ), + ), + ], + ), + ), + ]), ), ); } diff --git a/lib/view/login_components/splash_view.dart b/lib/view/login_components/splash_view.dart index db5d6f4..798b957 100644 --- a/lib/view/login_components/splash_view.dart +++ b/lib/view/login_components/splash_view.dart @@ -1,5 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; class SplashView extends StatefulWidget { final AnimationController animationController; @@ -31,71 +32,68 @@ class _SplashViewState extends State { padding: const EdgeInsets.only(bottom: 100.0), child: Column( children: [ - SizedBox( - height: 40, - ), // Padding( // padding: EdgeInsets.all(8.0), // child: SizedBox( // //width: MediaQuery.of(context).size.width, - // child: Image.asset( - // 'assets/introduction_animation/introduction_image1.png', + // child: SvgPicture.asset( + // 'assets/klogo.svg', // fit: BoxFit.cover, // ), // ), // ), - SizedBox( - height: 80, - ), - Padding( - padding: EdgeInsets.only(top: 8.0, bottom: 8.0), - child: Text( - "Track Events Everywhere", - style: TextStyle(fontSize: 25.0, fontWeight: FontWeight.bold), - ), - ), - Align( - alignment: Alignment.bottomCenter, - child: Padding( - padding: EdgeInsets.only(left: 64, right: 64), - child: Text( - "Available on your phone,tablet and laptop", - textAlign: TextAlign.center, - ), - ), - ), - SizedBox( - height: 100, - ), - Padding( - padding: EdgeInsets.only( - bottom: MediaQuery.of(context).padding.bottom), - child: InkWell( - onTap: () { - widget.animationController.animateTo(0.2); - }, - child: Container( - height: 58, - padding: EdgeInsets.only( - left: 56.0, - right: 56.0, - top: 16, - bottom: 16, - ), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(38.0), - color: Color(0xff132137), - ), - child: Text( - "Let's begin", - style: TextStyle( - fontSize: 18, - color: Colors.white, - ), - ), - ), - ), - ), + // SizedBox( + // height: 80, + // ), + // Padding( + // padding: EdgeInsets.only(top: 8.0, bottom: 8.0), + // child: Text( + // "Track Events Everywhere", + // style: TextStyle(fontSize: 25.0, fontWeight: FontWeight.bold), + // ), + // ), + // Align( + // alignment: Alignment.bottomCenter, + // child: Padding( + // padding: EdgeInsets.only(left: 64, right: 64), + // child: Text( + // "Available on your phone,tablet and laptop", + // textAlign: TextAlign.center, + // ), + // ), + // ), + // SizedBox( + // height: 100, + // ), + // Padding( + // padding: EdgeInsets.only( + // bottom: MediaQuery.of(context).padding.bottom + 16), + // child: InkWell( + // onTap: () { + // widget.animationController.animateTo(0.2); + // }, + // child: Container( + // height: 58, + // padding: EdgeInsets.only( + // left: 56.0, + // right: 56.0, + // top: 16, + // bottom: 16, + // ), + // decoration: BoxDecoration( + // borderRadius: BorderRadius.circular(38.0), + // color: Color(0xff132137), + // ), + // child: Text( + // "Let's begin", + // style: TextStyle( + // fontSize: 18, + // color: Colors.white, + // ), + // ), + // ), + // ), + // ), ], ), ), diff --git a/lib/view/login_components/top_back_skip_view.dart b/lib/view/login_components/top_back_skip_view.dart index 5afde6f..815af50 100644 --- a/lib/view/login_components/top_back_skip_view.dart +++ b/lib/view/login_components/top_back_skip_view.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; class TopBackSkipView extends StatelessWidget { final AnimationController animationController; @@ -50,7 +51,7 @@ class TopBackSkipView extends StatelessWidget { child: Padding( padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top), child: Container( - height: 58, + height: 80, child: Padding( padding: const EdgeInsets.only(left: 8, right: 16), child: Row( @@ -62,8 +63,19 @@ class TopBackSkipView extends StatelessWidget { IconButton( onPressed: onBackClick, icon: Icon(Icons.arrow_back_ios_new_rounded), + color: Colors.white, // ), ), + Container( + padding: EdgeInsets.only(top: 20), + // constraints: BoxConstraints(maxWidth: 350, maxHeight: 350), + child: SvgPicture.asset('assets/images/konectar_logo.svg') + // Image.asset( + // 'assets/klogo.svg', + // fit: BoxFit.contain, + // ), + ), + SlideTransition( position: _skipAnimation, child: IconButton( diff --git a/lib/view/login_components/welcome_view.dart b/lib/view/login_components/welcome_view.dart index 649ed25..ae33962 100644 --- a/lib/view/login_components/welcome_view.dart +++ b/lib/view/login_components/welcome_view.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; class WelcomeView extends StatelessWidget { final AnimationController animationController; @@ -55,42 +56,51 @@ class WelcomeView extends StatelessWidget { position: _firstHalfAnimation, child: SlideTransition( position: _secondHalfAnimation, - child: Padding( - padding: const EdgeInsets.only(bottom: 100), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - // SlideTransition( - // position: _welcomeFirstHalfAnimation, - // child: Container( - // constraints: BoxConstraints(maxWidth: 350, maxHeight: 350), - // child: Image.asset( - // 'assets/introduction_animation/introduction_image1.png', - // fit: BoxFit.contain, - // ), - // ), - // ), - SizedBox( - height: 50, - ), - SlideTransition( - position: _welcomeFirstHalfAnimation, - child: Text( - "Welcome", - style: TextStyle(fontSize: 25.0, fontWeight: FontWeight.bold), - ), - ), - Padding( - padding: - EdgeInsets.only(left: 64, right: 64, top: 16, bottom: 16), - child: Text( - "HCP Management Platform Aissel's Cutting-Edge Product Solutions", - textAlign: TextAlign.center, - ), - ), - ], + child: Stack(children: [ + SvgPicture.asset( + 'assets/images/sc2bg500.svg', + fit: BoxFit.cover, + // width: MediaQuery.of(context).size.width, + // height: MediaQuery.of(context).size.height, ), - ), + Container( + padding: const EdgeInsets.only(bottom: 100), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + // SlideTransition( + // position: _welcomeFirstHalfAnimation, + // child: Container( + // constraints: BoxConstraints(maxWidth: 350, maxHeight: 350), + // child: Image.asset( + // 'assets/introduction_animation/introduction_image1.png', + // fit: BoxFit.contain, + // ), + // ), + // ), + SizedBox( + height: 50, + ), + SlideTransition( + position: _welcomeFirstHalfAnimation, + child: Text( + "Sign In", + style: + TextStyle(fontSize: 25.0, fontWeight: FontWeight.bold), + ), + ), + Padding( + padding: + EdgeInsets.only(left: 64, right: 64, top: 16, bottom: 16), + child: Text( + "", + textAlign: TextAlign.center, + ), + ), + ], + ), + ), + ]), ), ); } diff --git a/lib/view/navigation_home_screen.dart b/lib/view/navigation_home_screen.dart index 77ba8b6..53e101a 100644 --- a/lib/view/navigation_home_screen.dart +++ b/lib/view/navigation_home_screen.dart @@ -1,10 +1,20 @@ import 'package:flutter/material.dart'; +import 'package:konectar_events/contacts_module/ui_screen/interactionform/interactionprovider.dart'; +import 'package:konectar_events/contacts_module/ui_screen/interactionform/new_dynamicform.dart'; +import 'package:konectar_events/contacts_module/ui_screen/interactionform/viewinteractionprovider.dart'; import 'package:konectar_events/contacts_module/ui_screen/new_contacts.dart'; +import 'package:konectar_events/contacts_module/ui_screen/new_editinteraction.dart'; +import 'package:konectar_events/contacts_module/ui_screen/new_viewinteraction.dart'; import 'package:konectar_events/utils/app_theme.dart'; +import 'package:konectar_events/utils/constants.dart'; +import 'package:konectar_events/utils/dateformater.dart'; import 'package:konectar_events/view/helpdesk.dart'; import 'package:konectar_events/view/home.dart'; import 'package:konectar_events/widgets/drawerusercontroller.dart'; import 'package:konectar_events/widgets/home_drawer.dart'; +import 'package:provider/provider.dart'; + +import '../contacts_module/ui_screen/interactionform/configprovider.dart'; class NavigationHomeScreen extends StatefulWidget { @override @@ -46,6 +56,159 @@ class _NavigationHomeScreenState extends State { ); } + Widget medicalInsights() { + return Consumer( + builder: (BuildContext context, provider, Widget? child) { + return Container( + color: EventsConstants.bgcolor, + child: Column( + children: [ + SizedBox( + height: 20, + ), + Center( + child: FloatingActionButton.extended( + backgroundColor: Colors.green, + onPressed: () async { + final ConfigDataProvider configDataProvider = + ConfigDataProvider(); + + await configDataProvider.initConfigUIDataMediccalInsight(); + await Provider.of(context, listen: false) + .initConfigData(); + + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => InteractionScreen1( + index: 0, + form: Provider.of(context, + listen: false) + .intConfigDataList[0] + .name, + title: "Hope Neuman", + ))); + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => const InteractionListScreen())); + }, + heroTag: 'medicalinsights', + elevation: 0, + label: const Text("Add Medical Insights", + style: TextStyle( + color: Colors.white, + )), + icon: const Icon( + Icons.add, + color: Colors.white, + ), + ), + ), + SizedBox( + height: 20, + ), + provider.savedList.isEmpty + ? SizedBox.shrink() + : ListView.builder( + itemCount: provider.savedList.length, + shrinkWrap: true, + cacheExtent: + double.parse(provider.savedList.length.toString()), + itemBuilder: (context, index) { + return Column( + children: [ + ListTile( + subtitle: Text( + 'Updated on ${CustomDateFormatter().convertDateTimeToDate(provider.savedList[index].updatedTime!)}', + //style: TextStyle(fontStyle: FontStyle.italic), + ), + title: Text( + provider.savedList[index].id, + ), + trailing: SizedBox( + width: 100, + child: Row(children: [ + IconButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => + ViewInteractionScreen1( + saveInteraction: + provider.savedList[index], + ))); + }, + icon: const Icon( + Icons.info_outline, + size: 24, + color: Color.fromARGB(255, 8, 39, 92), + ), + ), + IconButton( + onPressed: () async { + await provider.initConfigData().then({ + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (BuildContext context) => + // EditInteractionScreen( + // saveInteraction: provider + // .savedList[index], + // ))) + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => + EditInteractionScreen1( + saveInteraction: provider + .savedList[index], + ))) + }); + }, + icon: const Icon( + Icons.edit, + size: 24, + color: Color.fromARGB(255, 8, 39, 92), + ), + ), + // IconButton( + // onPressed: () { + // showDeleteRecordAlertDialog( + // context, + // provider.savedList[index].id, + // provider.savedList[index]); + // }, + // icon: const Icon( + // Icons.delete, + // size: 24, + // color: Color.fromARGB(255, 8, 39, 92), + // ), + // ), + ]), + ), + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => + ViewInteractionScreen1( + saveInteraction: + provider.savedList[index], + ))); + }, + ), + const Divider(), + ], + ); + }), + ], + ), + ); + }); + } + void changeIndex(DrawerIndex drawerIndexdata) { if (drawerIndex != drawerIndexdata) { drawerIndex = drawerIndexdata; @@ -67,7 +230,7 @@ class _NavigationHomeScreenState extends State { break; case DrawerIndex.Invite: setState(() { - screenView = HomeScreen(); + screenView = medicalInsights(); }); break; default: diff --git a/lib/view/profileview.dart b/lib/view/profileview.dart index bc1b9fc..2b039a6 100644 --- a/lib/view/profileview.dart +++ b/lib/view/profileview.dart @@ -1,9 +1,13 @@ +import 'dart:convert'; +import 'dart:io'; import 'dart:math'; import 'package:avatar_stack/avatar_stack.dart'; +import 'package:file_picker/file_picker.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; +import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; import 'package:intl/intl.dart'; import 'package:konectar_events/contacts_module/model_class/speaker.dart'; @@ -12,26 +16,39 @@ import 'package:konectar_events/contacts_module/ui_screen/interactionform/intera import 'package:konectar_events/contacts_module/ui_screen/interactionform/interactionprovider.dart'; import 'package:konectar_events/contacts_module/ui_screen/interactionform/new_dynamicform.dart'; import 'package:konectar_events/contacts_module/ui_screen/interactionform/viewinteractionprovider.dart'; +import 'package:konectar_events/contacts_module/ui_screen/interactionform/widget/custombutton.dart'; import 'package:konectar_events/contacts_module/ui_screen/new_editinteraction.dart'; import 'package:konectar_events/contacts_module/ui_screen/new_viewinteraction.dart'; +import 'package:konectar_events/model/events_speakers_k1.dart'; import 'package:konectar_events/model/eventsdetailmodel.dart'; import 'package:konectar_events/model/eventspeakers.dart'; import 'package:konectar_events/model/sessionnotesmodel.dart'; +import 'package:konectar_events/model/sessionstopics_model.dart'; import 'package:konectar_events/utils/constants.dart'; import 'package:konectar_events/utils/dateformater.dart'; import 'package:konectar_events/utils/util.dart'; import 'package:konectar_events/viewmodel/hcpprofprovider.dart'; import 'package:konectar_events/widgets/customdropdown.dart'; +import 'package:path_provider/path_provider.dart'; +import 'package:permission_handler/permission_handler.dart'; import 'package:provider/provider.dart'; +import 'package:path/path.dart' as p; class HCPProfileScreen extends StatefulWidget { - SpeakersList eventsdetail; + EventSpeakersData eventsdetail; String eventid; String title; + List sessionNames; + List topics; + String kolFullName; + HCPProfileScreen( {super.key, required this.eventsdetail, required this.eventid, + required this.kolFullName, + required this.sessionNames, + required this.topics, required this.title}); @override @@ -40,8 +57,10 @@ class HCPProfileScreen extends StatefulWidget { class _HCPProfileScreenState extends State { String? _selectedFruit; + SessionsTopicsData? sessionsTopicsData; bool isExtended = false; List sessionList = []; + String attachedFileName = ''; final List _fruits = ['Events', 'Sessions']; final List topics = [ " Admin. & Managemente", @@ -53,7 +72,8 @@ class _HCPProfileScreenState extends State { ]; TextEditingController notesController = TextEditingController(text: ""); List sessionNotesList = []; - Future dialogBuilder(BuildContext context, Eventsdetail eventsdetail) { + Future dialogBuilder(BuildContext context, Eventsdetail eventsdetail, + HcpProfileProvider provider) { return showDialog( context: context, builder: (BuildContext context) { @@ -67,7 +87,7 @@ class _HCPProfileScreenState extends State { decoration: BoxDecoration( border: Border.all(color: Colors.grey), borderRadius: BorderRadius.circular(8.0)), - child: dropDown(underline: Container())), + child: dropDown(underline: Container(), provider: provider)), TextFormField( validator: (value) { // add email validation @@ -118,15 +138,15 @@ class _HCPProfileScreenState extends State { ); } - Widget dropDown({ - Widget? underline, - Widget? icon, - TextStyle? style, - TextStyle? hintStyle, - Color? dropdownColor, - }) => - DropdownButton( - value: _selectedFruit, + Widget dropDown( + {Widget? underline, + Widget? icon, + TextStyle? style, + TextStyle? hintStyle, + Color? dropdownColor, + required HcpProfileProvider provider}) => + DropdownButton( + value: sessionsTopicsData, underline: underline, icon: Align(alignment: Alignment.centerRight, child: icon), dropdownColor: dropdownColor, @@ -137,15 +157,16 @@ class _HCPProfileScreenState extends State { fontSize: 14.0, ), // iconEnabledColor: iconEnabledColor, - onChanged: (String? newValue) { + onChanged: (SessionsTopicsData? newValue) { setState(() { - _selectedFruit = newValue; + _selectedFruit = newValue!.sessionName; + sessionsTopicsData = newValue; }); }, hint: Text("Select Session", style: hintStyle), - items: sessionList - .map((session) => DropdownMenuItem( - value: session, child: Text(session))) + items: provider.sessionTopics + .map((session) => DropdownMenuItem( + value: session, child: Text(session.sessionName!))) .toList()); @override @@ -160,6 +181,8 @@ class _HCPProfileScreenState extends State { init() async { await Provider.of(context, listen: false) .getSessionData(); + await Provider.of(context, listen: false) + .getSessionTopics(widget.eventsdetail); // await Provider.of(context, listen: false) // .getCounts(widget.eventsdetail); @@ -172,7 +195,8 @@ class _HCPProfileScreenState extends State { .name; await Provider.of(context, listen: false) - .getRecords(formname, hcp: widget.eventsdetail.hcpFullName); + .getRecords(formname, hcp: widget.kolFullName); + setState(() {}); } @@ -285,7 +309,7 @@ class _HCPProfileScreenState extends State { ]; }, body: TabBarView(children: [ - topicsTab(widget.eventsdetail), + topicsTab(widget.eventsdetail, provider), sessionNotes(context, widget.eventsdetail, provider), medicalInsights(), // sessionNotes(context) @@ -310,7 +334,8 @@ class _HCPProfileScreenState extends State { }); } - buildprofile(BuildContext context, SpeakersList eventsdetail, String title) { + buildprofile( + BuildContext context, EventSpeakersData eventsdetail, String title) { MediaQuery.of(context).size.height * 0.35; return Container( @@ -343,7 +368,7 @@ class _HCPProfileScreenState extends State { SizedBox( height: 15, ), - Text(eventsdetail.hcpFullName!, + Text(eventsdetail.kolFullName!, style: TextStyle( fontSize: 20, // fontFamily: "SourceSerif", @@ -355,7 +380,7 @@ class _HCPProfileScreenState extends State { // // fontFamily: "SourceSerif", // )), Text( - "${eventsdetail.organization ?? ""} ${eventsdetail.countryName ?? ""} ${eventsdetail.cityName ?? ""}", + "${eventsdetail.orgName ?? ""} ${eventsdetail.country ?? ""} ${eventsdetail.city ?? ""}", softWrap: true, maxLines: 2, textAlign: TextAlign.center, @@ -429,7 +454,7 @@ class _HCPProfileScreenState extends State { )); } - Widget buildCardView(BuildContext context, SpeakersList eventsdetail, + Widget buildCardView(BuildContext context, EventSpeakersData eventsdetail, HcpProfileProvider provider) { return Container( // color: Constants.bgcolor, @@ -439,7 +464,7 @@ class _HCPProfileScreenState extends State { // title: eventsdetail.kolFullName!, // eventsdetail: eventsdetail, // ), - buildprofile(context, eventsdetail, eventsdetail.hcpFullName!), + buildprofile(context, eventsdetail, eventsdetail.kolFullName!), // Padding( // padding: const EdgeInsets.all(8.0), // child: Column( @@ -539,9 +564,8 @@ class _HCPProfileScreenState extends State { // const Spacer(), Center( child: _ProfileInfoRow(items: [ - ProfileInfoItem("Topic(s)", widget.eventsdetail.topics!.length), - ProfileInfoItem( - "Session(s)", widget.eventsdetail.sessionNames!.length), + ProfileInfoItem("Topic(s)", widget.topics.length), + ProfileInfoItem("Session(s)", widget.sessionNames.length), ProfileInfoItem("Note(s)", provider.totalNotes), ])), // SizedBox( @@ -552,9 +576,10 @@ class _HCPProfileScreenState extends State { ); } - Widget sessionNotes(BuildContext context, SpeakersList eventsdetail, + Widget sessionNotes(BuildContext context, EventSpeakersData eventsdetail, HcpProfileProvider provider) { - sessionList = eventsdetail.sessionNames!; + // sessionList = eventsdetail.sessionName!.split(','); + sessionList = widget.sessionNames; return Container( color: EventsConstants.bgcolor, child: Column( @@ -575,7 +600,8 @@ class _HCPProfileScreenState extends State { decoration: BoxDecoration( border: Border.all(color: Colors.grey), borderRadius: BorderRadius.circular(4.0)), - child: dropDown(underline: Container())), + child: + dropDown(underline: Container(), provider: provider)), SizedBox( height: 15, ), @@ -605,6 +631,43 @@ class _HCPProfileScreenState extends State { focusedBorder: OutlineInputBorder(), ), ), + SizedBox( + height: 10, + ), + Row( + children: [ + // Text("Attach a file :"), + // SizedBox( + // width: 10, + // ), + CustomButton( + backgroundColor: + const Color.fromARGB(255, 233, 229, 229), + onPressed: () async { + // sectionItem.selectedValue = []; + // sectionItem.extension = []; + // sectionItem.fileName = []; + await getEncodedFile(); + + setState(() {}); + }, + width: 120, + height: 40, + fontsize: 12, + textColor: Colors.black, + title: "Upload file"), + SizedBox( + width: 5, + ), + Text( + attachedFileName != "" ? attachedFileName : "", + style: TextStyle( + color: attachedFileName != "" + ? Colors.green + : Colors.red), + ), + ], + ), ], )), Align( @@ -617,27 +680,32 @@ class _HCPProfileScreenState extends State { onPressed: () async { //"Program Committee Admin. & Management" //setState(() { + print("ADD : ${_selectedFruit} ${notesController.text}"); if (notesController.text.length != 0 || - notesController.text != "" || - _selectedFruit != "" || - _selectedFruit != null) { + notesController.text != "") { sessionNotesList .add("${_selectedFruit} \n\n ${notesController.text}"); // }); - print( - " eventid:${widget.eventid},hcp:${widget.eventsdetail.uniqueId}"); + print(" eventid:${widget.eventid},hcp:${widget.eventid}"); + + await provider.submitSessionNotes(eventsdetail, + sessionsTopicsData!, notesController.text); + SessionNotesModel notesModel = SessionNotesModel( notes: notesController.text, addedBy: "user", addedDate: CustomDateFormatter().formatDate(), eventid: widget.eventid, - hcpid: widget.eventsdetail.uniqueId, + hcpid: widget.eventid, selectedSession: _selectedFruit); print( "${notesModel.addedBy},${notesModel.notes},${notesModel.addedDate},${notesModel.eventid},${notesModel.hcpid},${notesModel.selectedSession}"); await provider.addSessionNotes(notesModel); _selectedFruit = null; + sessionsTopicsData = null; notesController.clear(); + } else { + print("something went wrong"); } }, heroTag: 'addnotes', @@ -744,9 +812,72 @@ class _HCPProfileScreenState extends State { ); } - Widget topicsTab(SpeakersList eventsdetail) { - print("${eventsdetail.sessionNames!.join(",").length} @@@lengtg"); - List sessions = eventsdetail.sessionNames!; + Future getEncodedFile() async { + String base64Image = ''; + var status = Platform.isAndroid + ? await Permission.manageExternalStorage.status + : await Permission.storage.status; + if (status.isGranted) { + FilePickerResult? result = + await FilePicker.platform.pickFiles(allowMultiple: true); + + if (result != null) { + print(result.files.first.path); + print(result.files.last.path); + for (var files in result.files) { + File file = File(files.path!); + print("check file path : ${file.path}"); + var fileName = file.path.split('/').last; + // Get the application folder directory + Directory? directory = Platform.isAndroid + ? await getExternalStorageDirectory() //FOR ANDROID + : await getApplicationDocumentsDirectory(); + String newPath = ""; //FOR ios + String convertedDirectoryPath = (directory?.path).toString(); + + print("see the converted directory path $convertedDirectoryPath"); + + newPath = "$convertedDirectoryPath/konectar/files"; + print("new path :$newPath"); + directory = Directory(newPath); + if (!await directory.exists()) { + await directory.create(recursive: true); + } + File newFile = await file.copy('${directory.path}/$fileName'); + print("new path is ${newFile.path}"); + final extension = p.extension(newFile.path); + List imageBytes = await newFile.readAsBytes(); + Uint8List imageUint8List = Uint8List.fromList(imageBytes); + base64Image = base64Encode(imageUint8List); + attachedFileName = fileName; + // sectionItem.selectedValue!.add(base64Image); + // sectionItem.extension!.add(extension); + // sectionItem.fileName!.add(fileName); + } + } + } else { + print("not permitted"); + await requestPermission(Platform.isAndroid + ? Permission.manageExternalStorage + : Permission.storage); + } + } + + Future requestPermission(Permission permission) async { + final status = await permission.request(); + + setState(() { + print(status); + // _permissionStatus = status; + // print(_permissionStatus); + }); + } + + Widget topicsTab( + EventSpeakersData eventsdetail, HcpProfileProvider provider) { + //print("${eventsdetail.sessionName!.join(",").length} @@@lengtg"); + // List sessions = eventsdetail.sessionName!.split(","); + return Container( width: double.maxFinite, padding: EdgeInsets.only(left: 8), @@ -756,9 +887,10 @@ class _HCPProfileScreenState extends State { ), child: ListView.separated( padding: EdgeInsets.only(top: 10.0, left: 4.0), - itemCount: sessions.length, + itemCount: provider.sessionTopics.length, itemBuilder: (context, index) { - List topics = eventsdetail.topics!; + List topics = + provider.sessionTopics[index].eventTopics!.split('|'); return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -774,7 +906,7 @@ class _HCPProfileScreenState extends State { // overflow: TextOverflow.ellipsis, // ), Text( - "${index + 1}.${sessions[index]}", + "${index + 1}.${provider.sessionTopics[index].sessionName}", style: TextStyle( // fontFamily: "SourceSerif", @@ -906,7 +1038,7 @@ class _HCPProfileScreenState extends State { listen: false) .intConfigDataList[0] .name, - title: "${widget.eventsdetail.hcpFullName}", + title: "${widget.kolFullName}", ))); // Navigator.push( // context, diff --git a/lib/viewmodel/eventsprovider.dart b/lib/viewmodel/eventsprovider.dart index 19c11af..c63a832 100644 --- a/lib/viewmodel/eventsprovider.dart +++ b/lib/viewmodel/eventsprovider.dart @@ -7,7 +7,9 @@ import 'package:flutter/services.dart'; import 'package:hive_flutter/hive_flutter.dart'; import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_event_k2.dart'; import 'package:konectar_events/model/affiliationsmodel.dart'; +import 'package:konectar_events/model/events_details.dart'; import 'package:konectar_events/model/events_list_resp_2.dart'; +import 'package:konectar_events/model/events_speakers_k1.dart'; import 'package:konectar_events/model/eventsdetailmodel.dart'; import 'package:konectar_events/model/eventsmodel.dart'; import 'package:konectar_events/model/eventsoverview.dart'; @@ -35,7 +37,7 @@ class EventsProvider extends ChangeNotifier { List srcheventdetailList = []; List selectedTherapeutic = []; List addedSessionNotes = []; - List speakersList = []; + List speakersList = []; List myEventids = []; bool showCheckbox = false; bool offlineExists = false; @@ -52,7 +54,7 @@ class EventsProvider extends ChangeNotifier { List kFlutterHashtags = []; List topics = []; List specialtyList = []; - OverviewData? overviewData; + EventsOverviewData? overviewData; List affiliations = []; late StreamSubscription> connectivitySubscription; @@ -73,33 +75,48 @@ class EventsProvider extends ChangeNotifier { notifyListeners(); } - OnSearch(String searchtxt) async { - print("Searching......."); - // searchtxt = searchtxt.toLowerCase(); - isSearch = true; - if (isFavSeleted) { - searchList = eventList - .where((element) => element.name1!.toLowerCase().contains(searchtxt)) - // (element.city != "" && - // element.city!.toLowerCase().contains(searchtxt)) || - // (element.region != "" && - // element.region!.toLowerCase().contains(searchtxt)) || - // (element.country != "" && - // element.country!.toLowerCase().contains(searchtxt))) - .toList(); - } else { - eventList = - await ApiCall().getSearchedEventsFromK2(1, "event_name", searchtxt); - // searchList = eventList - // .where((element) => element.name1!.toLowerCase().contains(searchtxt)) - // // element.city!.toLowerCase().contains(searchtxt) || - // // element.region!.toLowerCase().contains(searchtxt) || - // // element.country!.toLowerCase().contains(searchtxt)) - // .toList(); + bool checkIfUserInterested(String eventid) { + bool user = false; + if (eventList.isNotEmpty) { + int index = eventList.indexWhere( + (element) => element.eventId == eventid, + ); + print("FOR EVENT ID :$eventid : ${eventList[index].eventUserInterest}"); + user = eventList[index].eventUserInterest ?? false; } + return user; + } - print("###$searchList@@@"); - notifyListeners(); + List OnSearch(String searchtxt) { + print("Searching......."); + // // searchtxt = searchtxt.toLowerCase(); + // isSearch = true; + // if (isFavSeleted) { + // searchList = eventList + // .where((element) => element.name1!.toLowerCase().contains(searchtxt)) + // // (element.city != "" && + // // element.city!.toLowerCase().contains(searchtxt)) || + // // (element.region != "" && + // // element.region!.toLowerCase().contains(searchtxt)) || + // // (element.country != "" && + // // element.country!.toLowerCase().contains(searchtxt))) + // .toList(); + // } else { + // eventList = + // await ApiCall().getSearchedEventsFromK2(1, "event_name", searchtxt); + // // searchList = eventList + // // .where((element) => element.name1!.toLowerCase().contains(searchtxt)) + // // // element.city!.toLowerCase().contains(searchtxt) || + // // // element.region!.toLowerCase().contains(searchtxt) || + // // // element.country!.toLowerCase().contains(searchtxt)) + // // .toList(); + // } + + List searchList = eventList + ..where((element) => element.name1!.toLowerCase().contains(searchtxt)); + return searchList; + // print("###$searchList@@@"); + // notifyListeners(); } bool ifOfflineExists(String eventid) { @@ -118,15 +135,12 @@ class EventsProvider extends ChangeNotifier { return offlineExists; } - Future getSessionCount(String eventid, String event_unique_id) async { + getSessionCount() { List sessions = []; eventSessionCount = 0; - Map data = - (await ApiCall().getSpeakersFromK2(0, eventid, event_unique_id)); - speakercount = data["count"]; - List speakersList = data["list"]; + for (var obj in speakersList) { - sessions.addAll(obj.sessionNames!); + sessions.addAll(obj.sessionName!.split(',')); } print("Count ${sessions.toSet().toList().length}"); print("Count2 ${sessions.toList().length}"); @@ -235,6 +249,11 @@ class EventsProvider extends ChangeNotifier { await saveEventsData(events); } } + + if (searchtxt != "") { + return OnSearch(searchtxt!); + } + //add to favs old if (myEventids.isNotEmpty) { for (var events in eventList) { if (myEventids.contains(events.eventId)) { @@ -288,15 +307,61 @@ class EventsProvider extends ChangeNotifier { //notifyListeners(); } - Future> getSpeakersDetails(int page, String eventid, - String event_unique_id, String searchkey) async { - Map data = (await ApiCall().getSpeakersFromK2( - page, eventid, event_unique_id, - searchkey: searchkey)); + Future> getInitialSpeakersDetails(String eventid, + {required String searchkey}) async { + speakersList = (await ApiCall().getEventsSpeakersFromK1(eventid)); + getSessionCount(); + if (searchkey.length != 0) { + List searchspeakers = speakersList + .where((element) => + element.kolFullName!.toLowerCase().contains(searchkey)) + .toList(); + + if (searchspeakers.isEmpty) { + searchspeakers = speakersList + .where((element) => + element.eventTopics!.toLowerCase().contains(searchkey)) + .toList(); + } + + return searchspeakers; + } else { + return await ApiCall().getEventsSpeakersFromK1(eventid); + } + + //return speakersList = (await ApiCall().getEventsSpeakersFromK1(eventid)); + // notifyListeners(); + } + + Future> getSpeakersDetails(int page, String eventid, + String event_unique_id, String searchkey, int lastIndex) async { // speakercount = data["count"]; - speakersList = data["list"]; + speakersList = (await ApiCall().getEventsSpeakersFromK1(eventid)); // getSessionCount(); + // if (speakersList.isEmpty) { + // + // } + if (page == 0) { + speakersList = speakersList.getRange(0, lastIndex).toList(); + } else if (page > 0) { + int nextIndex = lastIndex + 40; + if (nextIndex < speakersList.length) { + speakersList = speakersList.getRange(lastIndex, nextIndex).toList(); + } else { + speakersList = + speakersList.getRange(lastIndex, speakersList.length - 1).toList(); + } + } + + // if (searchkey.length != 0) { + // List searchspeakers = speakersList + // .where((element) => + // element.kolFullName!.toLowerCase().contains(searchkey)) + // .toList(); + // return searchspeakers; + // } else { return speakersList; + // } //notifyListeners(); } @@ -434,7 +499,11 @@ class EventsProvider extends ChangeNotifier { FutureOr getSpecialtyData(EventsList event) async { specialtyList = (await ApiCall().specialtyOfSpeakers( - eventid: event.eventId!, startDate: event.start!, endDate: event.end!)); + eventid: event.eventId!, + startDate: CustomDateFormatter().formatYearDate( + CustomDateFormatter().convertStringToDate(event.start!)), + endDate: CustomDateFormatter().formatYearDate( + CustomDateFormatter().convertStringToDate(event.end!)))); notifyListeners(); } diff --git a/lib/viewmodel/hcpprofprovider.dart b/lib/viewmodel/hcpprofprovider.dart index 28d5a0f..2c6aedf 100644 --- a/lib/viewmodel/hcpprofprovider.dart +++ b/lib/viewmodel/hcpprofprovider.dart @@ -1,11 +1,14 @@ import 'dart:async'; + import 'dart:math'; import 'package:flutter/cupertino.dart'; import 'package:hive_flutter/hive_flutter.dart'; +import 'package:konectar_events/model/events_speakers_k1.dart'; import 'package:konectar_events/model/eventsdetailmodel.dart'; import 'package:konectar_events/model/eventspeakers.dart'; import 'package:konectar_events/model/sessionnotesmodel.dart'; +import 'package:konectar_events/model/sessionstopics_model.dart'; import 'package:konectar_events/model/topics_cloud_model.dart'; import 'package:konectar_events/utils/apicall.dart'; import 'package:konectar_events/widgets/word_cloud.dart'; @@ -16,8 +19,27 @@ class HcpProfileProvider extends ChangeNotifier { int totalTopics = 0; int totalSessions = 0; int totalNotes = 0; + List sessionTopics = []; late Box box; + Future getSessionTopics(EventSpeakersData detail) async { + sessionTopics = await ApiCall().getSessionsTopics(detail.eid!, + detail.kolId == "0" ? detail.hcpPinAlias! : detail.kolId!, detail.kId!); + totalSessions = sessionTopics.length; + notifyListeners(); + } + + Future submitSessionNotes(EventSpeakersData detail, + SessionsTopicsData sessionsTopicsData, String notes) async { + var data = await ApiCall().addSessionNotes( + sessionsTopicsData.kolEventsId!, + detail.kolId == "0" ? detail.hcpPinAlias! : detail.kolId!, + detail.eventAttendeesId!, + detail.kId!, + notes); + return data; + } + getCounts(Eventsdetail eventsdetail) { List topics = eventsdetail.eventTopics!.split("|"); totalTopics = topics.length; @@ -34,9 +56,9 @@ class HcpProfileProvider extends ChangeNotifier { } List getSessionNotesList( - String eid, SpeakersList eventsdetail) { + String eid, EventSpeakersData eventsdetail) { print("Check hcp id"); - print("$eid,${eventsdetail.uniqueId}"); + print("$eid,${eventsdetail.id}"); sessionNotesList = sessionNotesList .where( (element) => element.eventid == eid, @@ -51,10 +73,10 @@ class HcpProfileProvider extends ChangeNotifier { String fname = element.hcpname!.split(" ")[0]; String lname = element.hcpname!.split(" ").last; print("${element.hcpname}"); - return fname.toLowerCase() == eventsdetail.hcpFullName!.toLowerCase() && - lname.toLowerCase() == eventsdetail.hcpFullName!.toLowerCase(); + return fname.toLowerCase() == eventsdetail.kolFullName!.toLowerCase() && + lname.toLowerCase() == eventsdetail.kolFullName!.toLowerCase(); } else { - return element.hcpid == eventsdetail.uniqueId; + return element.hcpid == eventsdetail.id; } }).toList(); totalNotes = sessionNotesList.length; diff --git a/lib/widgets/home_drawer.dart b/lib/widgets/home_drawer.dart index 5f33f3f..075b9e0 100644 --- a/lib/widgets/home_drawer.dart +++ b/lib/widgets/home_drawer.dart @@ -60,11 +60,11 @@ class _HomeDrawerState extends State { labelName: 'HelpDesk', icon: Icon(Icons.help), ), - // DrawerList( - // index: DrawerIndex.Invite, - // labelName: 'Invite Friend', - // icon: Icon(Icons.group), - // ), + DrawerList( + index: DrawerIndex.Invite, + labelName: 'Medical Insight', + icon: Icon(Icons.group), + ), // DrawerList( // index: DrawerIndex.Share, // labelName: 'Rate the app', diff --git a/pubspec.lock b/pubspec.lock index 9bab846..42f78e6 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -598,6 +598,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.10+1" + flutter_svg_provider: + dependency: "direct main" + description: + name: flutter_svg_provider + sha256: cda47ab350671ba51ae4605d48f4c82fa5a2c399d22ebda367c1b407234c5048 + url: "https://pub.dev" + source: hosted + version: "1.0.7" flutter_test: dependency: "direct dev" description: flutter diff --git a/pubspec.yaml b/pubspec.yaml index 263fe7c..7b3b702 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -93,6 +93,7 @@ dependencies: infinite_scroll_pagination: ^4.0.0 animations: ^2.0.11 overlay_support: ^2.1.0 + flutter_svg_provider: ^1.0.7 dev_dependencies: @@ -146,7 +147,7 @@ flutter: - assets/icon/ - assets/introduction_animation/ - assets/response.json - - shorebird.yaml + # - shorebird.yaml - assets/ # - assets/events.json # - images/a_dot_ham.jpeg