session notes crud,insights client specific ,updates #4
|
@ -3,6 +3,7 @@
|
||||||
{
|
{
|
||||||
"id": "Form1",
|
"id": "Form1",
|
||||||
"name": "Interaction Form",
|
"name": "Interaction Form",
|
||||||
|
|
||||||
"form-fields": [
|
"form-fields": [
|
||||||
{
|
{
|
||||||
"sectionName": "Interaction Details",
|
"sectionName": "Interaction Details",
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
{
|
{
|
||||||
"id": "MedInsight",
|
"id": "MedInsight",
|
||||||
"name": "Medical Insights Form",
|
"name": "Medical Insights Form",
|
||||||
|
|
||||||
"form-fields": [
|
"form-fields": [
|
||||||
|
|
||||||
{
|
{
|
||||||
"sectionName": "Medical Insight",
|
"sectionName": "Medical Insight",
|
||||||
"multiple": false,
|
"multiple": false,
|
||||||
|
|
|
@ -6,6 +6,8 @@ import 'dart:convert';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hive_flutter/hive_flutter.dart';
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
import 'package:konectar_events/widgets/eventdetailscontainer.dart';
|
||||||
|
import 'package:konectar_events/widgets/gridview.dart';
|
||||||
part 'interaction_data.g.dart';
|
part 'interaction_data.g.dart';
|
||||||
|
|
||||||
// InteractionResultData welcomeFromJson(String str) =>
|
// InteractionResultData welcomeFromJson(String str) =>
|
||||||
|
@ -43,6 +45,11 @@ class InteractionResultData {
|
||||||
String id;
|
String id;
|
||||||
@HiveField(2)
|
@HiveField(2)
|
||||||
String name;
|
String name;
|
||||||
|
|
||||||
|
//For MEd Insight required fields to send for syncing this data
|
||||||
|
//eventid,speakerid,session name,...
|
||||||
|
//For Int required fields to send for syncing this data
|
||||||
|
//hcpid,medin id ,/.....
|
||||||
InteractionResultData(
|
InteractionResultData(
|
||||||
{required this.result, required this.id, required this.name});
|
{required this.result, required this.id, required this.name});
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ class InteractionScreen1 extends StatefulWidget {
|
||||||
int index;
|
int index;
|
||||||
String form;
|
String form;
|
||||||
String? title;
|
String? title;
|
||||||
|
dynamic formdata;
|
||||||
InteractionScreen1(
|
InteractionScreen1(
|
||||||
{super.key, required this.index, required this.form, this.title});
|
{super.key, required this.index, required this.form, this.title});
|
||||||
|
|
||||||
|
|
|
@ -853,7 +853,7 @@ class ViewInteractionProvider extends ChangeNotifier {
|
||||||
await getRecords(saveInteraction.form!);
|
await getRecords(saveInteraction.form!);
|
||||||
// box.close();
|
// box.close();
|
||||||
|
|
||||||
// await MockApiCall().postFormData(data);
|
/// await MockApiCall().postFormData(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> deleteRecord(SaveInteraction saveInteraction) async {
|
Future<void> deleteRecord(SaveInteraction saveInteraction) async {
|
||||||
|
|
|
@ -47,54 +47,54 @@ class AffiliationsResp {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Affiliations> affiliationsFromJson(String str) => List<Affiliations>.from(
|
Affiliations affiliationsResponseFromJson(String str) =>
|
||||||
json.decode(str).map((x) => Affiliations.fromJson(x)));
|
Affiliations.fromJson(json.decode(str));
|
||||||
|
|
||||||
String affiliationsToJson(List<Affiliations> data) =>
|
String affiliationsResponseToJson(Affiliations data) =>
|
||||||
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
json.encode(data.toJson());
|
||||||
|
|
||||||
class Affiliations {
|
|
||||||
String? id;
|
|
||||||
String? orgCount;
|
|
||||||
String? orgName;
|
|
||||||
|
|
||||||
Affiliations({
|
|
||||||
this.id,
|
|
||||||
this.orgCount,
|
|
||||||
this.orgName,
|
|
||||||
});
|
|
||||||
|
|
||||||
factory Affiliations.fromJson(Map<String, dynamic> json) => Affiliations(
|
|
||||||
id: json["id"],
|
|
||||||
orgCount: json["org_count"],
|
|
||||||
orgName: json["org_name"],
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => {
|
|
||||||
"id": id,
|
|
||||||
"org_count": orgCount,
|
|
||||||
"org_name": orgName,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// class Affiliations {
|
// class Affiliations {
|
||||||
// List<String> affiliationNames;
|
// String? id;
|
||||||
// List<String> affiliationCount;
|
// String? orgCount;
|
||||||
|
// String? orgName;
|
||||||
|
|
||||||
// Affiliations({
|
// Affiliations({
|
||||||
// required this.affiliationNames,
|
// this.id,
|
||||||
// required this.affiliationCount,
|
// this.orgCount,
|
||||||
|
// this.orgName,
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// factory Affiliations.fromJson(Map<String, dynamic> json) => Affiliations(
|
// factory Affiliations.fromJson(Map<String, dynamic> json) => Affiliations(
|
||||||
// affiliationNames:
|
// id: json["id"],
|
||||||
// List<String>.from(json["affiliationNames"].map((x) => x)),
|
// orgCount: json["org_count"],
|
||||||
// affiliationCount:
|
// orgName: json["org_name"],
|
||||||
// List<String>.from(json["affiliationCount"].map((x) => x)),
|
|
||||||
// );
|
// );
|
||||||
|
|
||||||
// Map<String, dynamic> toJson() => {
|
// Map<String, dynamic> toJson() => {
|
||||||
// "affiliationNames": List<dynamic>.from(affiliationNames.map((x) => x)),
|
// "id": id,
|
||||||
// "affiliationCount": List<dynamic>.from(affiliationCount.map((x) => x)),
|
// "org_count": orgCount,
|
||||||
|
// "org_name": orgName,
|
||||||
// };
|
// };
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
class Affiliations {
|
||||||
|
List<String> affiliationNames;
|
||||||
|
List<String> affiliationCount;
|
||||||
|
|
||||||
|
Affiliations({
|
||||||
|
required this.affiliationNames,
|
||||||
|
required this.affiliationCount,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Affiliations.fromJson(Map<String, dynamic> json) => Affiliations(
|
||||||
|
affiliationNames:
|
||||||
|
List<String>.from(json["affiliationNames"].map((x) => x)),
|
||||||
|
affiliationCount:
|
||||||
|
List<String>.from(json["affiliationCount"].map((x) => x)),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"affiliationNames": List<dynamic>.from(affiliationNames.map((x) => x)),
|
||||||
|
"affiliationCount": List<dynamic>.from(affiliationCount.map((x) => x)),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,96 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final allSessionNotesResponse = allSessionNotesResponseFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
String allSessionNotesResponseToJson(List<AllSessionNotesResponse> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
List<AllSessionNotesResponse> AllSessionNotesResponseFromJson(String str) {
|
||||||
|
final jsonData = json.decode(str);
|
||||||
|
return new List<AllSessionNotesResponse>.from(
|
||||||
|
jsonData.map((x) => AllSessionNotesResponse.fromJson(x)));
|
||||||
|
}
|
||||||
|
|
||||||
|
class AllSessionNotesResponse {
|
||||||
|
List<List<dynamic>>? eventTopicNotesId;
|
||||||
|
String? note;
|
||||||
|
String? sessionName;
|
||||||
|
String? eventTopics;
|
||||||
|
String? userName;
|
||||||
|
String? users;
|
||||||
|
List<String>? notes;
|
||||||
|
List<String>? createdOn;
|
||||||
|
String? firstName;
|
||||||
|
String? middleName;
|
||||||
|
String? lastName;
|
||||||
|
DateTime? notesCreatedOn;
|
||||||
|
List<String>? addedBy;
|
||||||
|
|
||||||
|
AllSessionNotesResponse({
|
||||||
|
this.eventTopicNotesId,
|
||||||
|
this.note,
|
||||||
|
this.sessionName,
|
||||||
|
this.eventTopics,
|
||||||
|
this.userName,
|
||||||
|
this.users,
|
||||||
|
this.notes,
|
||||||
|
this.createdOn,
|
||||||
|
this.firstName,
|
||||||
|
this.middleName,
|
||||||
|
this.lastName,
|
||||||
|
this.notesCreatedOn,
|
||||||
|
this.addedBy,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory AllSessionNotesResponse.fromJson(Map<String, dynamic> json) =>
|
||||||
|
AllSessionNotesResponse(
|
||||||
|
eventTopicNotesId: json["event_topic_notes_id"] == null
|
||||||
|
? []
|
||||||
|
: List<List<dynamic>>.from(json["event_topic_notes_id"]!
|
||||||
|
.map((x) => List<dynamic>.from(x.map((x) => x)))),
|
||||||
|
note: json["note"],
|
||||||
|
sessionName: json["session_name"],
|
||||||
|
eventTopics: json["event_topics"],
|
||||||
|
userName: json["user_name"]!,
|
||||||
|
users: json["users"],
|
||||||
|
notes: json["notes"] == null
|
||||||
|
? []
|
||||||
|
: List<String>.from(json["notes"]!.map((x) => x)),
|
||||||
|
createdOn: json["created_on"] == null
|
||||||
|
? []
|
||||||
|
: List<String>.from(json["created_on"]!.map((x) => x)),
|
||||||
|
firstName: json["first_name"],
|
||||||
|
middleName: json["middle_name"],
|
||||||
|
lastName: json["last_name"],
|
||||||
|
notesCreatedOn: json["notes_created_on"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["notes_created_on"]),
|
||||||
|
addedBy: json["added_by"] == null
|
||||||
|
? []
|
||||||
|
: List<String>.from(json["added_by"]!.map((x) => x)),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"event_topic_notes_id": eventTopicNotesId == null
|
||||||
|
? []
|
||||||
|
: List<dynamic>.from(eventTopicNotesId!
|
||||||
|
.map((x) => List<dynamic>.from(x.map((x) => x)))),
|
||||||
|
"note": note,
|
||||||
|
"session_name": sessionName,
|
||||||
|
"event_topics": eventTopics,
|
||||||
|
"user_name": userName,
|
||||||
|
"users": users,
|
||||||
|
"notes": notes == null ? [] : List<dynamic>.from(notes!.map((x) => x)),
|
||||||
|
"created_on": createdOn == null
|
||||||
|
? []
|
||||||
|
: List<dynamic>.from(createdOn!.map((x) => x)),
|
||||||
|
"first_name": firstName,
|
||||||
|
"middle_name": middleName,
|
||||||
|
"last_name": lastName,
|
||||||
|
"notes_created_on": notesCreatedOn?.toIso8601String(),
|
||||||
|
"added_by":
|
||||||
|
addedBy == null ? [] : List<dynamic>.from(addedBy!.map((x) => x)),
|
||||||
|
};
|
||||||
|
}
|
|
@ -40,7 +40,7 @@ class EventsOverviewData {
|
||||||
String? eventFor;
|
String? eventFor;
|
||||||
String? eventId;
|
String? eventId;
|
||||||
List<TopSpeakers>? topSpeakers;
|
List<TopSpeakers>? topSpeakers;
|
||||||
dynamic eventTopics;
|
List<EventTopic>? eventTopics;
|
||||||
List<EventSponser>? eventSponsers;
|
List<EventSponser>? eventSponsers;
|
||||||
bool? eventUserAttendee;
|
bool? eventUserAttendee;
|
||||||
bool? eventUserInterest;
|
bool? eventUserInterest;
|
||||||
|
@ -73,8 +73,11 @@ class EventsOverviewData {
|
||||||
? []
|
? []
|
||||||
: List<TopSpeakers>.from(
|
: List<TopSpeakers>.from(
|
||||||
json["eventData"]!.map((x) => TopSpeakers.fromJson(x))),
|
json["eventData"]!.map((x) => TopSpeakers.fromJson(x))),
|
||||||
eventTopics: json["eventTopics"],
|
eventTopics: json["eventTopics"] == null
|
||||||
eventSponsers: json["eventSponsers"] == null
|
? []
|
||||||
|
: List<EventTopic>.from(
|
||||||
|
json["eventTopics"]!.map((x) => EventTopic.fromJson(x))),
|
||||||
|
eventSponsers: json["eventTopics"] == null
|
||||||
? []
|
? []
|
||||||
: List<EventSponser>.from(
|
: List<EventSponser>.from(
|
||||||
json["eventSponsers"]!.map((x) => EventSponser.fromJson(x))),
|
json["eventSponsers"]!.map((x) => EventSponser.fromJson(x))),
|
||||||
|
@ -297,6 +300,26 @@ class ArrEvent {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class EventTopic {
|
||||||
|
String? numTopics;
|
||||||
|
String? eventTopics;
|
||||||
|
|
||||||
|
EventTopic({
|
||||||
|
this.numTopics,
|
||||||
|
this.eventTopics,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory EventTopic.fromJson(Map<String, dynamic> json) => EventTopic(
|
||||||
|
numTopics: json["num_topics"],
|
||||||
|
eventTopics: json["event_topics"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"num_topics": numTopics,
|
||||||
|
"event_topics": eventTopics,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@HiveType(typeId: HiveTypeIdConstants.topspeakersHiveId)
|
@HiveType(typeId: HiveTypeIdConstants.topspeakersHiveId)
|
||||||
class TopSpeakers {
|
class TopSpeakers {
|
||||||
@HiveField(0)
|
@HiveField(0)
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
import 'package:konectar_events/utils/hivetypeids.dart';
|
||||||
|
|
||||||
|
@HiveType(typeId: HiveTypeIdConstants.hiveApiConstantsId)
|
||||||
|
class HiveApiConstants {
|
||||||
|
@HiveField(0)
|
||||||
|
String? functionName;
|
||||||
|
@HiveField(1)
|
||||||
|
int? interval;
|
||||||
|
|
||||||
|
HiveApiConstants({this.functionName, this.interval});
|
||||||
|
}
|
|
@ -10,6 +10,19 @@ SessionTopicsResponse sessionTopicsResponseFromJson(String str) =>
|
||||||
String sessionTopicsResponseToJson(SessionTopicsResponse data) =>
|
String sessionTopicsResponseToJson(SessionTopicsResponse data) =>
|
||||||
json.encode(data.toJson());
|
json.encode(data.toJson());
|
||||||
|
|
||||||
|
List<SessionsTopicsData> showSessionNotesResponseFromJson(String str) =>
|
||||||
|
List<SessionsTopicsData>.from(
|
||||||
|
json.decode(str).map((x) => SessionsTopicsData.fromJson(x)));
|
||||||
|
|
||||||
|
String showSessionNotesResponseToJson(List<SessionsTopicsData> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
List<SessionsTopicsData> SessionsTopicsDataFromJson(String str) {
|
||||||
|
final jsonData = json.decode(str);
|
||||||
|
return new List<SessionsTopicsData>.from(
|
||||||
|
jsonData.map((x) => SessionsTopicsData.fromJson(x)));
|
||||||
|
}
|
||||||
|
|
||||||
class SessionTopicsResponse {
|
class SessionTopicsResponse {
|
||||||
List<SessionsTopicsData>? data;
|
List<SessionsTopicsData>? data;
|
||||||
|
|
||||||
|
@ -44,7 +57,7 @@ class SessionsTopicsData {
|
||||||
bool? canEditNotes;
|
bool? canEditNotes;
|
||||||
bool? canAddNotes;
|
bool? canAddNotes;
|
||||||
String? noteCount;
|
String? noteCount;
|
||||||
String? projKolId;
|
dynamic projKolId;
|
||||||
bool? canAddInsights;
|
bool? canAddInsights;
|
||||||
bool? canEditInsights;
|
bool? canEditInsights;
|
||||||
|
|
||||||
|
|
|
@ -46,12 +46,18 @@ class Specialtyresp {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Specialty> specialtyFromJson(String str) =>
|
// List<Specialty> specialtyFromJson(String str) =>
|
||||||
List<Specialty>.from(json.decode(str).map((x) => Specialty.fromJson(x)));
|
// List<Specialty>.from(json.decode(str).map((x) => Specialty.fromJson(x)));
|
||||||
|
// List<AllSessionNotesResponse>.from(json.decode(str).map((x) => AllSessionNotesResponse.fromJson(x)));
|
||||||
|
|
||||||
String specialtyToJson(List<Specialty> data) =>
|
String specialtyToJson(List<Specialty> data) =>
|
||||||
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
List<Specialty> specialtyFromJson(String str) {
|
||||||
|
final jsonData = json.decode(str);
|
||||||
|
return new List<Specialty>.from(jsonData.map((x) => Specialty.fromJson(x)));
|
||||||
|
}
|
||||||
|
|
||||||
class Specialty {
|
class Specialty {
|
||||||
String? specialtyCount;
|
String? specialtyCount;
|
||||||
String? specialtyName;
|
String? specialtyName;
|
||||||
|
|
|
@ -61,6 +61,34 @@ List<TopicsCloudData> topicsCloudDataFromJson(String str) =>
|
||||||
String topicsCloudDataToJson(List<TopicsCloudData> data) =>
|
String topicsCloudDataToJson(List<TopicsCloudData> data) =>
|
||||||
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
TopicCloudResponse topicCloudResponseFromJson(String str) =>
|
||||||
|
TopicCloudResponse.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String topicCloudResponseToJson(TopicCloudResponse data) =>
|
||||||
|
json.encode(data.toJson());
|
||||||
|
|
||||||
|
class TopicCloudResponse {
|
||||||
|
List<TopicsCloudData>? resultData;
|
||||||
|
|
||||||
|
TopicCloudResponse({
|
||||||
|
this.resultData,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory TopicCloudResponse.fromJson(Map<String, dynamic> json) =>
|
||||||
|
TopicCloudResponse(
|
||||||
|
resultData: json["resultData"] == null
|
||||||
|
? []
|
||||||
|
: List<TopicsCloudData>.from(
|
||||||
|
json["resultData"]!.map((x) => TopicsCloudData.fromJson(x))),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"resultData": resultData == null
|
||||||
|
? []
|
||||||
|
: List<dynamic>.from(resultData!.map((x) => x.toJson())),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
class TopicsCloudData {
|
class TopicsCloudData {
|
||||||
String? total;
|
String? total;
|
||||||
String? topic;
|
String? topic;
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
import 'dart:ffi';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
import 'package:dio/io.dart';
|
import 'package:dio/io.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:konectar_events/model/affiliationsmodel.dart';
|
import 'package:konectar_events/model/affiliationsmodel.dart';
|
||||||
|
import 'package:konectar_events/model/allsessionnotesmodel.dart';
|
||||||
import 'package:konectar_events/model/events_details.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_list_resp_2.dart';
|
||||||
import 'package:konectar_events/model/events_speakers_k1.dart';
|
import 'package:konectar_events/model/events_speakers_k1.dart';
|
||||||
|
@ -104,7 +106,7 @@ class ApiCall {
|
||||||
return keywordList;
|
return keywordList;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<EventsList>> getEventsFromK1({String? type}) async {
|
Future<List<EventsList>> getEventsFromK1({int? type}) async {
|
||||||
Dio dio = Dio();
|
Dio dio = Dio();
|
||||||
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
||||||
(HttpClient client) {
|
(HttpClient client) {
|
||||||
|
@ -115,24 +117,24 @@ class ApiCall {
|
||||||
Response response;
|
Response response;
|
||||||
var formData = FormData.fromMap({
|
var formData = FormData.fromMap({
|
||||||
"user_email": "vinodh@aissel.com",
|
"user_email": "vinodh@aissel.com",
|
||||||
"project_id": "",
|
"start": "2024-12-05",
|
||||||
"start": DateTime(2024, 10, 14).toIso8601String(),
|
"end": "2024-12-31",
|
||||||
"end": DateTime(2024, 12, 14).toIso8601String(),
|
"order_by": 8,
|
||||||
"order_by": 7,
|
'type': type ?? 1
|
||||||
"type": type ?? 1
|
|
||||||
});
|
});
|
||||||
response = await dio.post(
|
// "end": DateTime(2024, 12, 14).toIso8601String(),
|
||||||
'${EventsConstants.devUrl}${EventsConstants.eventslistapi}',
|
response =
|
||||||
options: Options(),
|
await dio.post('${EventsConstants.url}${EventsConstants.eventslistapi}',
|
||||||
// queryParameters: {
|
options: Options(),
|
||||||
// "user_email": "vinodh@aissel.com",
|
// queryParameters: {
|
||||||
// "project_id": "",
|
// "user_email": "vinodh@aissel.com",
|
||||||
// "start": 2024 - 11 - 22,
|
// "project_id": "",
|
||||||
// "end": "",
|
// "start": 2024 - 11 - 22,
|
||||||
// "order_by": 7,
|
// "end": "",
|
||||||
// "type": 1,
|
// "order_by": 7,
|
||||||
// },
|
// "type": 1,
|
||||||
data: formData);
|
// },
|
||||||
|
data: formData);
|
||||||
print("response user eventssssss here!!!!!!!!!!!!!!!!!!!!! ");
|
print("response user eventssssss here!!!!!!!!!!!!!!!!!!!!! ");
|
||||||
print(response.data.toString());
|
print(response.data.toString());
|
||||||
Map<String, dynamic> jsondata = json.decode(response.data);
|
Map<String, dynamic> jsondata = json.decode(response.data);
|
||||||
|
@ -154,7 +156,7 @@ class ApiCall {
|
||||||
var formData = FormData.fromMap(
|
var formData = FormData.fromMap(
|
||||||
{"user_email": "vinodh@aissel.com", "eid": eventid, "flag": flag});
|
{"user_email": "vinodh@aissel.com", "eid": eventid, "flag": flag});
|
||||||
response = await dio.post(
|
response = await dio.post(
|
||||||
'${EventsConstants.devUrl}${EventsConstants.followUnfollowEvent}',
|
'${EventsConstants.url}${EventsConstants.followUnfollowEvent}',
|
||||||
options: Options(),
|
options: Options(),
|
||||||
queryParameters: {
|
queryParameters: {
|
||||||
"user_email": "vinodh@aissel.com",
|
"user_email": "vinodh@aissel.com",
|
||||||
|
@ -180,7 +182,7 @@ class ApiCall {
|
||||||
var formData = FormData.fromMap(
|
var formData = FormData.fromMap(
|
||||||
{"user_email": "vinodh@aissel.com", "eid": eventid, "flag": flag});
|
{"user_email": "vinodh@aissel.com", "eid": eventid, "flag": flag});
|
||||||
response = await dio.post(
|
response = await dio.post(
|
||||||
'${EventsConstants.devUrl}${EventsConstants.attendNotAttendEvent}',
|
'${EventsConstants.url}${EventsConstants.attendNotAttendEvent}',
|
||||||
options: Options(),
|
options: Options(),
|
||||||
queryParameters: {
|
queryParameters: {
|
||||||
"user_email": "vinodh@aissel.com",
|
"user_email": "vinodh@aissel.com",
|
||||||
|
@ -198,8 +200,10 @@ class ApiCall {
|
||||||
required String eventid,
|
required String eventid,
|
||||||
required String startDate,
|
required String startDate,
|
||||||
required String endDate,
|
required String endDate,
|
||||||
|
required bool client,
|
||||||
}) async {
|
}) async {
|
||||||
print("CHECK_DATE $startDate $endDate $eventid");
|
print(
|
||||||
|
"FORMAT_CHECK_DATE $startDate $endDate $eventid ${DateTime(2024, 12, 03).toIso8601String()}");
|
||||||
Dio dio = Dio();
|
Dio dio = Dio();
|
||||||
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
||||||
(HttpClient client) {
|
(HttpClient client) {
|
||||||
|
@ -209,39 +213,48 @@ class ApiCall {
|
||||||
};
|
};
|
||||||
Response response;
|
Response response;
|
||||||
//ventId=4937&type='1'&sd=2024-07-30&ed=2024-08-03&user_email=vinodh@aissel.com
|
//ventId=4937&type='1'&sd=2024-07-30&ed=2024-08-03&user_email=vinodh@aissel.com
|
||||||
var formData = FormData.fromMap({
|
var formData;
|
||||||
"user_email": "vinodh@aissel.com",
|
if (client) {
|
||||||
"eventId": eventid,
|
formData = FormData.fromMap({
|
||||||
"sd": startDate,
|
"user_email": "vinodh@aissel.com",
|
||||||
"ed": endDate,
|
"eventId": eventid,
|
||||||
"type": 1,
|
"sd": startDate,
|
||||||
});
|
"ed": endDate,
|
||||||
|
"type": 1,
|
||||||
|
"chart_type": "client"
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
formData = FormData.fromMap({
|
||||||
|
"user_email": "vinodh@aissel.com",
|
||||||
|
"eventId": eventid,
|
||||||
|
"sd": startDate,
|
||||||
|
"ed": endDate,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
print("FORMDATA:${formData.toString()},$startDate,$endDate");
|
print("FORMDATA:${formData.toString()},$startDate,$endDate");
|
||||||
response = await dio.post(
|
response = await dio.post(
|
||||||
'${EventsConstants.devUrl}${EventsConstants.specialtyOfSpeakers}',
|
'${EventsConstants.url}${EventsConstants.specialtyOfSpeakers}',
|
||||||
options: Options(),
|
options: Options(),
|
||||||
queryParameters: {
|
|
||||||
"user_email": "vinodh@aissel.com",
|
|
||||||
"eventId": eventid,
|
|
||||||
"sd": "\"$startDate\"",
|
|
||||||
"ed": "\"$endDate\"",
|
|
||||||
"type": "\"1\"",
|
|
||||||
},
|
|
||||||
data: formData);
|
data: formData);
|
||||||
print("response SPECIALTY SPEAKERS here!!!!!!!!!!!!!!!!!!!!! ");
|
print("response SPECIALTY SPEAKERS here!!!!!!!!!!!!!!!!!!!!! ");
|
||||||
print(response.data.toString());
|
|
||||||
// Map<String, dynamic> jsondata = json.decode(response.data);
|
// Map<String, dynamic> jsondata = json.decode(response.data);
|
||||||
|
|
||||||
// Specialtyresp resp = Specialtyresp.fromJson(jsondata);
|
// Specialtyresp resp = Specialtyresp.fromJson(jsondata);
|
||||||
List<Specialty> data = specialtyFromJson(response.data);
|
List<Specialty> sdata = [];
|
||||||
return data;
|
if (response.data != "null") {
|
||||||
|
print(response.data.toString());
|
||||||
|
sdata = specialtyFromJson(response.data.toString());
|
||||||
|
}
|
||||||
|
return sdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<TopicsCloudData>> insightsTopicsCloud({
|
Future<List<TopicsCloudData>> insightsTopicsCloud(
|
||||||
required String eventid,
|
{required String eventid,
|
||||||
required String startDate,
|
required String startDate,
|
||||||
required String endDate,
|
required String endDate,
|
||||||
}) async {
|
required bool client}) async {
|
||||||
Dio dio = Dio();
|
Dio dio = Dio();
|
||||||
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
||||||
(HttpClient client) {
|
(HttpClient client) {
|
||||||
|
@ -250,39 +263,50 @@ class ApiCall {
|
||||||
return client;
|
return client;
|
||||||
};
|
};
|
||||||
Response response;
|
Response response;
|
||||||
var formData = FormData.fromMap({
|
var formData;
|
||||||
"user_email": "vinodh@aissel.com",
|
if (client) {
|
||||||
"eventId": eventid,
|
formData = FormData.fromMap({
|
||||||
"sd": "\"$startDate\"",
|
"user_email": "vinodh@aissel.com",
|
||||||
"ed": "\"$endDate\"",
|
"eventId": eventid,
|
||||||
"type": "\"1\"",
|
"sd": startDate,
|
||||||
});
|
"ed": endDate,
|
||||||
|
"type": 1,
|
||||||
|
"chart_type": "client"
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
formData = FormData.fromMap({
|
||||||
|
"user_email": "vinodh@aissel.com",
|
||||||
|
"eventId": eventid,
|
||||||
|
"sd": startDate,
|
||||||
|
"ed": endDate,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
print("FORMDATA:${formData.toString()},$startDate,$endDate");
|
print("FORMDATA:${formData.toString()},$startDate,$endDate");
|
||||||
response = await dio.post(
|
response = await dio.post(
|
||||||
'${EventsConstants.devUrl}${EventsConstants.insightsTopicsCloud}',
|
'${EventsConstants.url}${EventsConstants.insightsTopicsCloud}',
|
||||||
options: Options(),
|
options: Options(),
|
||||||
queryParameters: {
|
|
||||||
"user_email": "vinodh@aissel.com",
|
|
||||||
"eventId": eventid,
|
|
||||||
"sd": "\"$startDate\"",
|
|
||||||
"ed": "\"$endDate\"",
|
|
||||||
"type": "\"1\"",
|
|
||||||
},
|
|
||||||
data: formData);
|
data: formData);
|
||||||
print("response SPECIALTY SPEAKERS here!!!!!!!!!!!!!!!!!!!!! ");
|
print("response SPECIALTY SPEAKERS here!!!!!!!!!!!!!!!!!!!!! ");
|
||||||
print(response.data.toString());
|
|
||||||
// Map<String, dynamic> jsondata = json.decode(response.data);
|
// Map<String, dynamic> jsondata = json.decode(response.data);
|
||||||
|
|
||||||
// Specialtyresp resp = Specialtyresp.fromJson(jsondata);
|
// Specialtyresp resp = Specialtyresp.fromJson(jsondata);
|
||||||
List<TopicsCloudData> data = topicsCloudDataFromJson(response.data);
|
List<TopicsCloudData> data = [];
|
||||||
|
if (response.data != "null") {
|
||||||
|
print(response.data.toString());
|
||||||
|
TopicCloudResponse topicCloudResponse =
|
||||||
|
topicCloudResponseFromJson(response.data);
|
||||||
|
data = topicCloudResponse.resultData!;
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<Affiliations>> insightsBarChart({
|
Future<Affiliations> insightsBarChart(
|
||||||
required String eventid,
|
{required String eventid,
|
||||||
required String startDate,
|
required String startDate,
|
||||||
required String endDate,
|
required String endDate,
|
||||||
}) async {
|
required bool client}) async {
|
||||||
Dio dio = Dio();
|
Dio dio = Dio();
|
||||||
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
||||||
(HttpClient client) {
|
(HttpClient client) {
|
||||||
|
@ -291,31 +315,41 @@ class ApiCall {
|
||||||
return client;
|
return client;
|
||||||
};
|
};
|
||||||
Response response;
|
Response response;
|
||||||
var formData = FormData.fromMap({
|
var formData;
|
||||||
"user_email": "vinodh@aissel.com",
|
if (client) {
|
||||||
"eventId": eventid,
|
formData = FormData.fromMap({
|
||||||
"sd": "\"$startDate\"",
|
"user_email": "vinodh@aissel.com",
|
||||||
"ed": "\"$endDate\"",
|
"eventId": eventid,
|
||||||
"type": "\"1\"",
|
"sd": startDate,
|
||||||
});
|
"ed": endDate,
|
||||||
|
"type": 1,
|
||||||
|
"chart_type": "client"
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
formData = FormData.fromMap({
|
||||||
|
"user_email": "vinodh@aissel.com",
|
||||||
|
"eventId": eventid,
|
||||||
|
"sd": startDate,
|
||||||
|
"ed": endDate,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
print("FORMDATA:${formData.toString()},$startDate,$endDate");
|
print("FORMDATA:${formData.toString()},$startDate,$endDate");
|
||||||
response = await dio.post(
|
response = await dio.post(
|
||||||
'${EventsConstants.devUrl}${EventsConstants.insightsBarChart}',
|
'${EventsConstants.url}${EventsConstants.insightsBarChart}',
|
||||||
options: Options(),
|
options: Options(),
|
||||||
queryParameters: {
|
|
||||||
"user_email": "vinodh@aissel.com",
|
|
||||||
"eventId": eventid,
|
|
||||||
"sd": "\"$startDate\"",
|
|
||||||
"ed": "\"$endDate\"",
|
|
||||||
"type": "\"1\"",
|
|
||||||
},
|
|
||||||
data: formData);
|
data: formData);
|
||||||
print("response SPECIALTY SPEAKERS here!!!!!!!!!!!!!!!!!!!!! ");
|
print("response SPECIALTY SPEAKERS here!!!!!!!!!!!!!!!!!!!!! ");
|
||||||
print(response.data.toString());
|
|
||||||
// Map<String, dynamic> jsondata = json.decode(response.data);
|
// Map<String, dynamic> jsondata = json.decode(response.data);
|
||||||
|
|
||||||
// Specialtyresp resp = Specialtyresp.fromJson(jsondata);
|
// Specialtyresp resp = Specialtyresp.fromJson(jsondata);
|
||||||
List<Affiliations> data = affiliationsFromJson(response.data);
|
Affiliations data =
|
||||||
|
Affiliations(affiliationCount: [], affiliationNames: []);
|
||||||
|
if (response.data != "null") {
|
||||||
|
print(response.data.toString());
|
||||||
|
data = affiliationsResponseFromJson(response.data);
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -334,7 +368,7 @@ class ApiCall {
|
||||||
"event_id": eventid,
|
"event_id": eventid,
|
||||||
});
|
});
|
||||||
response = await dio.post(
|
response = await dio.post(
|
||||||
'${EventsConstants.devUrl}${EventsConstants.eventdetailsapi}',
|
'${EventsConstants.url}${EventsConstants.eventdetailsapi}',
|
||||||
options: Options(),
|
options: Options(),
|
||||||
queryParameters: {
|
queryParameters: {
|
||||||
"user_email": "vinodh@aissel.com",
|
"user_email": "vinodh@aissel.com",
|
||||||
|
@ -363,11 +397,12 @@ class ApiCall {
|
||||||
var formData = FormData.fromMap({
|
var formData = FormData.fromMap({
|
||||||
"user_email": "vinodh@aissel.com",
|
"user_email": "vinodh@aissel.com",
|
||||||
"event_id": eventid,
|
"event_id": eventid,
|
||||||
"sd": "2024-07-30",
|
"project_id": 1,
|
||||||
"ed": "2024-08-03",
|
|
||||||
});
|
});
|
||||||
|
// "sd": "2024-07-30",
|
||||||
|
// "ed": "2024-08-03",
|
||||||
response = await dio.post(
|
response = await dio.post(
|
||||||
'${EventsConstants.devUrl}${EventsConstants.speakerslistapi}',
|
'${EventsConstants.url}${EventsConstants.speakerslistapi}',
|
||||||
options: Options(),
|
options: Options(),
|
||||||
queryParameters: {
|
queryParameters: {
|
||||||
"user_email": "vinodh@aissel.com",
|
"user_email": "vinodh@aissel.com",
|
||||||
|
@ -396,13 +431,13 @@ class ApiCall {
|
||||||
print("formdata : eventid:$eventid kolid:$kolid kid:$kid");
|
print("formdata : eventid:$eventid kolid:$kolid kid:$kid");
|
||||||
var formData = FormData.fromMap({
|
var formData = FormData.fromMap({
|
||||||
"user_email": "vinodh@aissel.com",
|
"user_email": "vinodh@aissel.com",
|
||||||
"event_id": "eventid",
|
"event_id": eventid,
|
||||||
"kol_id": kolid,
|
"kol_id": kolid,
|
||||||
"k_id": kid,
|
"k_id": kid,
|
||||||
"proj_kol_id": 0,
|
|
||||||
});
|
});
|
||||||
|
// "proj_kol_id": 0,
|
||||||
response = await dio.post(
|
response = await dio.post(
|
||||||
'${EventsConstants.devUrl}${EventsConstants.showEventsTopicsAndSession}',
|
'${EventsConstants.url}${EventsConstants.showEventsTopicsAndSession}',
|
||||||
options: Options(),
|
options: Options(),
|
||||||
queryParameters: {
|
queryParameters: {
|
||||||
"user_email": "vinodh@aissel.com",
|
"user_email": "vinodh@aissel.com",
|
||||||
|
@ -411,16 +446,24 @@ class ApiCall {
|
||||||
data: formData);
|
data: formData);
|
||||||
print("response user SESSIONTOPICS here!!!!!!!!!!!!!!!!!!!!! ");
|
print("response user SESSIONTOPICS here!!!!!!!!!!!!!!!!!!!!! ");
|
||||||
print(response.data.toString());
|
print(response.data.toString());
|
||||||
Map<String, dynamic> jsondata = json.decode(response.data);
|
// Map<String, dynamic> jsondata = json.decode(response.data)[0];
|
||||||
SessionTopicsResponse sessionTopicsResponse =
|
// SessionTopicsResponse sessionTopicsResponse =
|
||||||
SessionTopicsResponse.fromJson(jsondata);
|
// SessionTopicsResponse.fromJson(jsondata);
|
||||||
List<SessionsTopicsData> data = sessionTopicsResponse.data!;
|
List<SessionsTopicsData> data =
|
||||||
|
SessionsTopicsDataFromJson(response.data.toString());
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<dynamic> addSessionNotes(String eventid, String kolid,
|
Future<dynamic> addSessionNotes(
|
||||||
String event_attendees_id, String kid, String notes) async {
|
String eventid,
|
||||||
|
String kolid,
|
||||||
|
String event_attendees_id,
|
||||||
|
String kid,
|
||||||
|
String notes,
|
||||||
|
String? filepath,
|
||||||
|
String? filename,
|
||||||
|
String? noteId) async {
|
||||||
Dio dio = Dio();
|
Dio dio = Dio();
|
||||||
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
||||||
(HttpClient client) {
|
(HttpClient client) {
|
||||||
|
@ -428,16 +471,32 @@ class ApiCall {
|
||||||
(X509Certificate cert, String host, int port) => true;
|
(X509Certificate cert, String host, int port) => true;
|
||||||
return client;
|
return client;
|
||||||
};
|
};
|
||||||
|
var formData;
|
||||||
Response response;
|
Response response;
|
||||||
var formData = FormData.fromMap({
|
if (filename != "") {
|
||||||
"user_email": "vinodh@aissel.com",
|
formData = FormData.fromMap({
|
||||||
"kol_events_id": eventid,
|
"user_email": "vinodh@aissel.com",
|
||||||
"kol_id": kolid,
|
"kol_events_id": eventid,
|
||||||
"event_attendees_id": event_attendees_id,
|
"kol_id": kolid,
|
||||||
"notes": notes,
|
"event_attendees_id": event_attendees_id,
|
||||||
});
|
"note": notes,
|
||||||
|
"file": MultipartFile.fromFileSync(filepath!, filename: filename),
|
||||||
|
"id": noteId ?? "",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
formData = FormData.fromMap({
|
||||||
|
"user_email": "vinodh@aissel.com",
|
||||||
|
"kol_events_id": eventid,
|
||||||
|
"kol_id": kolid,
|
||||||
|
"event_attendees_id": event_attendees_id,
|
||||||
|
"note": notes,
|
||||||
|
"id": noteId ?? "",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// "/Users/aissel/Library/Developer/CoreSimulator/Devices/1E435121-7E65-45C6-9E0B-411C8B9915F5/data/Containers/Data/Application/3CBC1CFF-79AD-49FA-A6E0-13D0AA2959D2/tmp/Flutter Questionaire.pdf",
|
||||||
|
|
||||||
response = await dio.post(
|
response = await dio.post(
|
||||||
'${EventsConstants.devUrl}${EventsConstants.showEventsTopicsAndSession}',
|
'${EventsConstants.url}${EventsConstants.saveEventsTopicNote}',
|
||||||
options: Options(),
|
options: Options(),
|
||||||
data: formData);
|
data: formData);
|
||||||
print("response user ADDSESSION here!!!!!!!!!!!!!!!!!!!!! ");
|
print("response user ADDSESSION here!!!!!!!!!!!!!!!!!!!!! ");
|
||||||
|
@ -450,6 +509,37 @@ class ApiCall {
|
||||||
return jsondata;
|
return jsondata;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<List<AllSessionNotesResponse>> getAllSessionNotes(
|
||||||
|
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",
|
||||||
|
"kol_events_id": eventid,
|
||||||
|
});
|
||||||
|
// "proj_kol_id": 0,
|
||||||
|
response = await dio.post(
|
||||||
|
'${EventsConstants.url}${EventsConstants.eventUserAnalytics}',
|
||||||
|
options: Options(),
|
||||||
|
data: formData);
|
||||||
|
print("response user ALLSESSIONNOTES here!!!!!!!!!!!!!!!!!!!!! ");
|
||||||
|
List<AllSessionNotesResponse> data = [];
|
||||||
|
if (response.data != "null") {
|
||||||
|
print(response.data.toString());
|
||||||
|
// Map<String, dynamic> jsondata = json.decode(response.data)[0];
|
||||||
|
// SessionTopicsResponse sessionTopicsResponse =
|
||||||
|
// SessionTopicsResponse.fromJson(jsondata);
|
||||||
|
data = AllSessionNotesResponseFromJson(response.data.toString());
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
//************ K2 API CALLS ***********************************************************************************************************************************
|
//************ K2 API CALLS ***********************************************************************************************************************************
|
||||||
|
|
||||||
Future<List<EventsList>> getEventsFromK2(int page, String search,
|
Future<List<EventsList>> getEventsFromK2(int page, String search,
|
||||||
|
|
|
@ -22,7 +22,9 @@ class EventsConstants {
|
||||||
// 192.168.2.109:8007 - office
|
// 192.168.2.109:8007 - office
|
||||||
//K1 API~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
//K1 API~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
static const String stagingUrl =
|
static const String stagingUrl =
|
||||||
"https://cardio-staging.konectar.io/reports/";
|
"https://cardio-staging.konectar.io/eventapis/";
|
||||||
|
static const String url = stagingUrl;
|
||||||
|
|
||||||
static const String devUrl =
|
static const String devUrl =
|
||||||
"http://192.168.2.130/konectar-sandbox/eventapis/";
|
"http://192.168.2.130/konectar-sandbox/eventapis/";
|
||||||
static const String eventslistapi = "loadFutureEvents/";
|
static const String eventslistapi = "loadFutureEvents/";
|
||||||
|
@ -38,6 +40,20 @@ class EventsConstants {
|
||||||
static const String saveEventsTopicNote = "saveEventsTopicNote";
|
static const String saveEventsTopicNote = "saveEventsTopicNote";
|
||||||
static const String eventUserAnalytics = "eventUserAnalytics";
|
static const String eventUserAnalytics = "eventUserAnalytics";
|
||||||
|
|
||||||
|
//Hive
|
||||||
|
/*
|
||||||
|
{
|
||||||
|
{
|
||||||
|
name:"loadFutureEvents",
|
||||||
|
interval:5,
|
||||||
|
method:POST,
|
||||||
|
}
|
||||||
|
"saveUserInterestedEvent",
|
||||||
|
"getSpecialitiesDonutChart",
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
//K1 API END~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
//K1 API END~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
static const String eventslistapifromk2 =
|
static const String eventslistapifromk2 =
|
||||||
"http://192.168.2.130:8888/api/kolevents/v1/en/fetch";
|
"http://192.168.2.130:8888/api/kolevents/v1/en/fetch";
|
||||||
|
|
|
@ -2,4 +2,5 @@ class HiveTypeIdConstants {
|
||||||
static const int topspeakersHiveId = 103;
|
static const int topspeakersHiveId = 103;
|
||||||
static const int topSponsorsHiveId = 104;
|
static const int topSponsorsHiveId = 104;
|
||||||
static const int topTopicsHiveId = 105;
|
static const int topTopicsHiveId = 105;
|
||||||
|
static const int hiveApiConstantsId = 106;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import 'package:expandable/expandable.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
|
@ -39,7 +40,7 @@ class EventsListingScreen extends StatefulWidget {
|
||||||
|
|
||||||
class _EventsListingScreenState extends State<EventsListingScreen>
|
class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
with TickerProviderStateMixin {
|
with TickerProviderStateMixin {
|
||||||
late final TabController _tabController;
|
late final TabController tabController;
|
||||||
int itemcount = 3;
|
int itemcount = 3;
|
||||||
bool isExtended = false;
|
bool isExtended = false;
|
||||||
bool isExtendedInterested = false;
|
bool isExtendedInterested = false;
|
||||||
|
@ -49,14 +50,17 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
static const _pageSize = 20;
|
static const _pageSize = 20;
|
||||||
int lastIndex = 0;
|
int lastIndex = 0;
|
||||||
String searchSpeaker = "";
|
String searchSpeaker = "";
|
||||||
|
bool isClientOverview = false;
|
||||||
|
bool isLoading = true;
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_tabController = TabController(length: 2, vsync: this);
|
tabController = TabController(length: 2, vsync: this);
|
||||||
final provider = Provider.of<EventsProvider>(context, listen: false);
|
final provider = Provider.of<EventsProvider>(context, listen: false);
|
||||||
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
||||||
init();
|
init();
|
||||||
|
isLoading = false;
|
||||||
});
|
});
|
||||||
pagingController.addPageRequestListener((pageKey) {
|
pagingController.addPageRequestListener((pageKey) {
|
||||||
_fetchPages(pageKey, provider);
|
_fetchPages(pageKey, provider);
|
||||||
|
@ -108,7 +112,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
|
|
||||||
Future<void> _fetchPages(int pageKey, EventsProvider provider) async {
|
Future<void> _fetchPages(int pageKey, EventsProvider provider) async {
|
||||||
List<EventSpeakersData> list = await provider
|
List<EventSpeakersData> list = await provider
|
||||||
.getInitialSpeakersDetails("47336", searchkey: searchSpeaker);
|
.getInitialSpeakersDetails(widget.event.id!, searchkey: searchSpeaker);
|
||||||
print("CHECK LENGTH ${list.length}");
|
print("CHECK LENGTH ${list.length}");
|
||||||
final isLastPage = pageKey + _pageSize >= list.length;
|
final isLastPage = pageKey + _pageSize >= list.length;
|
||||||
final nextItems =
|
final nextItems =
|
||||||
|
@ -137,24 +141,32 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
// await Provider.of<EventsProvider>(context, listen: false)
|
// await Provider.of<EventsProvider>(context, listen: false)
|
||||||
// .getTopicsCloud(widget.event);
|
// .getTopicsCloud(widget.event);
|
||||||
print("FIRST INITIAL");
|
print("FIRST INITIAL");
|
||||||
await Provider.of<EventsProvider>(context, listen: false)
|
|
||||||
.getInitialSpeakersDetails(widget.event.id!, searchkey: searchSpeaker);
|
|
||||||
Provider.of<EventsProvider>(context, listen: false).getSessionCount();
|
|
||||||
|
|
||||||
await Provider.of<EventsProvider>(context, listen: false)
|
await Provider.of<EventsProvider>(context, listen: false)
|
||||||
.getOverviewData(widget.event.id!, start, end);
|
.getOverviewData(widget.event.id!, start, end);
|
||||||
|
await Provider.of<EventsProvider>(context, listen: false)
|
||||||
|
.getInitialSpeakersDetails(widget.event.id!, searchkey: searchSpeaker);
|
||||||
|
await Provider.of<EventsProvider>(context, listen: false).getSessionCount();
|
||||||
|
await Provider.of<EventsProvider>(context, listen: false)
|
||||||
|
.getTopicsCloud(widget.event);
|
||||||
await Provider.of<EventsProvider>(context, listen: false)
|
await Provider.of<EventsProvider>(context, listen: false)
|
||||||
.getSpecialtyData(widget.event);
|
.getSpecialtyData(widget.event);
|
||||||
await Provider.of<EventsProvider>(context, listen: false)
|
await Provider.of<EventsProvider>(context, listen: false)
|
||||||
.getAffiliations(widget.event);
|
.getAffiliations(widget.event);
|
||||||
|
await Provider.of<EventsProvider>(context, listen: false)
|
||||||
|
.getAllSessionNotesFromApi(widget.event.id!);
|
||||||
|
Provider.of<EventsProvider>(context, listen: false).isLoadingInsights =
|
||||||
|
false;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_tabController.dispose();
|
tabController.dispose();
|
||||||
pagingController.dispose();
|
pagingController.dispose();
|
||||||
|
Provider.of<EventsProvider>(context, listen: false).allSessionNotes.clear();
|
||||||
|
widget.event = EventsList();
|
||||||
|
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -771,18 +783,31 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
children: [
|
children: [
|
||||||
expandableDetails(provider),
|
expandableDetails(provider),
|
||||||
speakersList(context, provider),
|
speakersList(context, provider),
|
||||||
|
|
||||||
EventsInsights(
|
EventsInsights(
|
||||||
|
eid: widget.event.id!,
|
||||||
|
eventsdetail: widget.event,
|
||||||
eventid: widget.event.eventId!,
|
eventid: widget.event.eventId!,
|
||||||
kFlutterHashtags: provider.kFlutterHashtags,
|
kFlutterHashtags: provider.kFlutterHashtags,
|
||||||
specialtyList: provider.specialtyList,
|
specialtyList: provider.specialtyList,
|
||||||
affiliations: provider.affiliations,
|
affiliations: provider.affiliations,
|
||||||
|
allSessionNotes: provider.allSessionNotes,
|
||||||
),
|
),
|
||||||
|
|
||||||
// medicalInsights(),
|
// medicalInsights(),
|
||||||
//SocialMedia(),
|
//SocialMedia(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: isLoading,
|
||||||
|
child: Center(
|
||||||
|
child: CircularProgressIndicator(
|
||||||
|
backgroundColor: EventsConstants.blueColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -1512,13 +1537,18 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
List<String> topSponsors = [];
|
List<String> topSponsors = [];
|
||||||
List<String> topTopics = [];
|
List<String> topTopics = [];
|
||||||
|
|
||||||
if (provider.overviewData!.topSpeakers!.length != 0) {
|
if (provider.overviewData.eventTopics!.length != 0) {
|
||||||
for (var obj in provider.overviewData!.topSpeakers!) {
|
for (var obj in provider.overviewData.eventTopics!) {
|
||||||
topSpeakers.add(obj.firstName!);
|
topTopics.add(obj.eventTopics ?? "-");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (provider.overviewData!.eventSponsers!.length != 0) {
|
if (provider.overviewData.topSpeakers!.length != 0) {
|
||||||
for (var obj in provider.overviewData!.eventSponsers!) {
|
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!);
|
topSponsors.add(obj.sessionSponsor!);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1517,10 +1517,10 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
));
|
));
|
||||||
},
|
},
|
||||||
child: Card(
|
child: Card(
|
||||||
elevation: 4,
|
//elevation: 4,
|
||||||
//color: EventsConstants.homeCardBackgound,
|
color: EventsConstants.homeCardBackgound,
|
||||||
surfaceTintColor: Colors.white,
|
//surfaceTintColor: Colors.white,
|
||||||
//surfaceTintColor: EventsConstants.homeCardBackgound,
|
surfaceTintColor: EventsConstants.homeCardBackgound,
|
||||||
// shadowColor: Constants.bgcolor,
|
// shadowColor: Constants.bgcolor,
|
||||||
child: buildCardView(context, eventsList, provider),
|
child: buildCardView(context, eventsList, provider),
|
||||||
),
|
),
|
||||||
|
@ -1571,12 +1571,20 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
// Build each card in the grid view.
|
// Build each card in the grid view.
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context, rootNavigator: true)
|
if (provider.eventList[index].sessionName != "") {
|
||||||
.push(MaterialPageRoute(
|
Navigator.of(context, rootNavigator: true)
|
||||||
builder: (context) => EventsTab(
|
.push(MaterialPageRoute(
|
||||||
event: provider.eventList[index],
|
builder: (context) => EventsTab(
|
||||||
),
|
event: provider.eventList[index],
|
||||||
));
|
),
|
||||||
|
));
|
||||||
|
} else {
|
||||||
|
//Alert
|
||||||
|
Alert(
|
||||||
|
data: "Data for the ",
|
||||||
|
onPressed: () {},
|
||||||
|
);
|
||||||
|
}
|
||||||
// Navigator.of(context).push(new MaterialPageRoute<Null>(
|
// Navigator.of(context).push(new MaterialPageRoute<Null>(
|
||||||
// builder: (BuildContext context) {
|
// builder: (BuildContext context) {
|
||||||
// return new EventsTab();
|
// return new EventsTab();
|
||||||
|
@ -1599,8 +1607,8 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
|
|
||||||
buildCardView(
|
buildCardView(
|
||||||
BuildContext context, EventsList event, EventsProvider provider) {
|
BuildContext context, EventsList event, EventsProvider provider) {
|
||||||
print(
|
// print(
|
||||||
"CHECK EVENT INTERESTED : ${provider.checkIfUserInterested(event.eventId!)}}");
|
// "CHECK EVENT INTERESTED : ${provider.checkIfUserInterested(event.eventId ?? "")}}");
|
||||||
double height = isTablet
|
double height = isTablet
|
||||||
? MediaQuery.of(context).size.height * 0.35
|
? MediaQuery.of(context).size.height * 0.35
|
||||||
: MediaQuery.of(context).size.height * 0.65;
|
: MediaQuery.of(context).size.height * 0.65;
|
||||||
|
@ -1610,14 +1618,14 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
// color: Color.fromARGB(179, 248, 238, 238),
|
// color: Color.fromARGB(179, 248, 238, 238),
|
||||||
|
|
||||||
color: Colors.white,
|
// color: Colors.white,
|
||||||
// color: EventsConstants.homeCardBackgound,
|
color: EventsConstants.homeCardBackgound,
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20))),
|
borderRadius: BorderRadius.all(Radius.circular(20))),
|
||||||
// height: MediaQuery.of(context).size.height * 0.2,
|
// height: MediaQuery.of(context).size.height * 0.2,
|
||||||
// height: 136,
|
// height: 136,
|
||||||
// height: double.minPositive,
|
// height: double.minPositive,
|
||||||
padding: isTablet
|
padding: isTablet
|
||||||
? EdgeInsets.symmetric(horizontal: 8.0, vertical: 2.0)
|
? EdgeInsets.symmetric(horizontal: 12.0, vertical: 12.0)
|
||||||
: EdgeInsets.symmetric(horizontal: 10.0, vertical: 10.0),
|
: EdgeInsets.symmetric(horizontal: 10.0, vertical: 10.0),
|
||||||
child:
|
child:
|
||||||
// Column(
|
// Column(
|
||||||
|
@ -1657,7 +1665,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
// decorationColor: Colors.blue,
|
// decorationColor: Colors.blue,
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: isTablet ? 22 : 16,
|
fontSize: isTablet ? 18 : 16,
|
||||||
|
|
||||||
// fontFamily: "SourceSerif",
|
// fontFamily: "SourceSerif",
|
||||||
),
|
),
|
||||||
|
@ -1695,7 +1703,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
//fontStyle: FontStyle.italic,
|
//fontStyle: FontStyle.italic,
|
||||||
fontSize: isTablet ? 20 : 12),
|
fontSize: isTablet ? 16 : 12),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -1717,7 +1725,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
//fontStyle: FontStyle.italic,
|
//fontStyle: FontStyle.italic,
|
||||||
|
|
||||||
fontSize: isTablet ? 20 : 12),
|
fontSize: isTablet ? 16 : 12),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -1733,7 +1741,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
provider.ifOfflineExists(event.eventId!)
|
provider.ifOfflineExists(event.eventId ?? "")
|
||||||
? Padding(
|
? Padding(
|
||||||
padding: EdgeInsets.only(right: 10),
|
padding: EdgeInsets.only(right: 10),
|
||||||
child: Icon(Icons.bookmark,
|
child: Icon(Icons.bookmark,
|
||||||
|
|
|
@ -1,28 +1,39 @@
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
|
||||||
import 'package:fl_chart/fl_chart.dart';
|
import 'package:fl_chart/fl_chart.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_scatter/flutter_scatter.dart';
|
import 'package:flutter_scatter/flutter_scatter.dart';
|
||||||
import 'package:konectar_events/model/affiliationsmodel.dart';
|
import 'package:konectar_events/model/affiliationsmodel.dart';
|
||||||
|
import 'package:konectar_events/model/allsessionnotesmodel.dart';
|
||||||
|
import 'package:konectar_events/model/neweventsmodel.dart';
|
||||||
import 'package:konectar_events/model/specialtymodel.dart';
|
import 'package:konectar_events/model/specialtymodel.dart';
|
||||||
import 'package:konectar_events/utils/constants.dart';
|
import 'package:konectar_events/utils/constants.dart';
|
||||||
|
import 'package:konectar_events/viewmodel/eventsprovider.dart';
|
||||||
import 'package:konectar_events/viewmodel/hcpprofprovider.dart';
|
import 'package:konectar_events/viewmodel/hcpprofprovider.dart';
|
||||||
import 'package:konectar_events/widgets/chartline.dart';
|
import 'package:konectar_events/widgets/chartline.dart';
|
||||||
import 'package:konectar_events/widgets/piechart.dart';
|
import 'package:konectar_events/widgets/piechart.dart';
|
||||||
import 'package:konectar_events/widgets/word_cloud.dart';
|
import 'package:konectar_events/widgets/word_cloud.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
import 'package:zoom_widget/zoom_widget.dart';
|
||||||
|
|
||||||
class EventsInsights extends StatefulWidget {
|
class EventsInsights extends StatefulWidget {
|
||||||
//EventsList eventsdetail;
|
EventsList eventsdetail;
|
||||||
String eventid;
|
String eventid;
|
||||||
|
String eid;
|
||||||
|
|
||||||
List<FlutterHashtag> kFlutterHashtags = [];
|
List<FlutterHashtag> kFlutterHashtags = [];
|
||||||
List<Specialty> specialtyList = [];
|
List<Specialty> specialtyList = [];
|
||||||
List<Affiliations> affiliations;
|
List<AllSessionNotesResponse> allSessionNotes = [];
|
||||||
|
Affiliations affiliations;
|
||||||
EventsInsights(
|
EventsInsights(
|
||||||
{super.key,
|
{super.key,
|
||||||
|
required this.eventsdetail,
|
||||||
|
required this.eid,
|
||||||
required this.eventid,
|
required this.eventid,
|
||||||
required this.kFlutterHashtags,
|
required this.kFlutterHashtags,
|
||||||
required this.affiliations,
|
required this.affiliations,
|
||||||
|
required this.allSessionNotes,
|
||||||
required this.specialtyList});
|
required this.specialtyList});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -34,6 +45,8 @@ class _EventsInsightsState extends State<EventsInsights> {
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
String wordstring = '';
|
String wordstring = '';
|
||||||
|
bool isClientOverview = false;
|
||||||
|
Matrix4 matrix = Matrix4.identity();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
@ -45,26 +58,22 @@ class _EventsInsightsState extends State<EventsInsights> {
|
||||||
}
|
}
|
||||||
|
|
||||||
init() async {
|
init() async {
|
||||||
await Provider.of<HcpProfileProvider>(context, listen: false)
|
// await Provider.of<EventsProvider>(context, listen: false)
|
||||||
.getAllSessionNotesList(widget.eventid);
|
// .getAllSessionNotesFromApi(widget.eid);
|
||||||
|
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
super.dispose();
|
||||||
|
Provider.of<EventsProvider>(context, listen: false).allSessionNotes = [];
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final screenSize = MediaQuery.of(context).size;
|
final screenSize = MediaQuery.of(context).size;
|
||||||
final ratio = screenSize.width / (screenSize.height / 2);
|
final ratio = screenSize.width / (screenSize.height / 2);
|
||||||
List<int> affCountList = [];
|
return Consumer<EventsProvider>(
|
||||||
int maximum = 0;
|
|
||||||
if (widget.affiliations.isNotEmpty) {
|
|
||||||
for (var obj in widget.affiliations) {
|
|
||||||
affCountList.add(int.parse(obj.orgCount!));
|
|
||||||
}
|
|
||||||
maximum = affCountList.reduce(max);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Consumer<HcpProfileProvider>(
|
|
||||||
builder: (BuildContext context, provider, Widget? child) {
|
builder: (BuildContext context, provider, Widget? child) {
|
||||||
List<Widget> widgets = <Widget>[];
|
List<Widget> widgets = <Widget>[];
|
||||||
for (var i = 0; i < widget.kFlutterHashtags.length; i++) {
|
for (var i = 0; i < widget.kFlutterHashtags.length; i++) {
|
||||||
|
@ -78,258 +87,210 @@ class _EventsInsightsState extends State<EventsInsights> {
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
// Text(
|
Container(
|
||||||
// '2024 Hematology/Oncology Pharmacy Association Annual Conference (HOPA)',
|
child: Wrap(
|
||||||
// style: TextStyle(
|
children: [
|
||||||
// color: Colors.blue,
|
Padding(
|
||||||
// fontWeight: FontWeight.bold,
|
padding: const EdgeInsets.only(
|
||||||
// fontSize: 17,
|
right: 2.0, bottom: 30, top: 10.0),
|
||||||
// ),
|
child: CupertinoSwitch(
|
||||||
// maxLines: 2,
|
activeColor: Color.fromARGB(255, 0, 71, 132),
|
||||||
// softWrap: true,
|
value: isClientOverview,
|
||||||
// overflow: TextOverflow.ellipsis,
|
onChanged: (value) async {
|
||||||
// ),
|
isClientOverview = value;
|
||||||
// Container(
|
if (isClientOverview) {
|
||||||
// decoration: BoxDecoration(
|
provider.isLoadingInsights = true;
|
||||||
// // color: Colors.white,
|
await provider.callInsightsDataForClientSpecific(
|
||||||
// border: Border.all(color: Colors.blueAccent)),
|
widget.eventsdetail, true);
|
||||||
// width: 180,
|
|
||||||
// child: DropdownButton<String>(
|
setState(() {});
|
||||||
// items: ["All Events Insights", "My Events Insights"]
|
} else {
|
||||||
// .map((String value) {
|
await provider.callInsightsDataForClientSpecific(
|
||||||
// return DropdownMenuItem<String>(
|
widget.eventsdetail, false);
|
||||||
// value: value,
|
setState(() {});
|
||||||
// child: Text(value),
|
}
|
||||||
// );
|
setState(() {});
|
||||||
// }).toList(),
|
},
|
||||||
// value: _value,
|
|
||||||
// onChanged: (value) {
|
|
||||||
// setState(() {
|
|
||||||
// _value = value!;
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// SizedBox(
|
|
||||||
// height: 20,
|
|
||||||
// ),
|
|
||||||
labelWidget("Topics Discussed"),
|
|
||||||
widgets.isNotEmpty
|
|
||||||
? Card(
|
|
||||||
surfaceTintColor: Colors.white,
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.all(2.0),
|
|
||||||
margin: EdgeInsets.all(2.0),
|
|
||||||
height: screenSize.height / 2,
|
|
||||||
width: screenSize.width,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.all(Radius.circular(20))),
|
|
||||||
child: Center(
|
|
||||||
child: FittedBox(
|
|
||||||
child: Scatter(
|
|
||||||
fillGaps: true,
|
|
||||||
delegate: ArchimedeanSpiralScatterDelegate(
|
|
||||||
ratio: ratio),
|
|
||||||
children: widgets,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
right: 8.0, top: 20.0, bottom: 20),
|
||||||
|
child: !isClientOverview
|
||||||
|
? const Text(
|
||||||
|
'Client Overview',
|
||||||
|
style:
|
||||||
|
TextStyle(fontSize: 15, color: Colors.grey),
|
||||||
|
)
|
||||||
|
: const Text(
|
||||||
|
'Client Overview',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 15,
|
||||||
|
),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
: SizedBox.shrink(),
|
],
|
||||||
SizedBox(
|
|
||||||
height: 20,
|
|
||||||
),
|
|
||||||
labelWidget("Specialty of speakers"),
|
|
||||||
Card(
|
|
||||||
surfaceTintColor: Colors.white,
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.all(2.0),
|
|
||||||
margin: EdgeInsets.all(5.0),
|
|
||||||
height: screenSize.height / 2,
|
|
||||||
width: screenSize.width,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
child: CustomPieChart(
|
|
||||||
specialtyList: widget.specialtyList,
|
|
||||||
),
|
|
||||||
// child: PieChartWidget([
|
|
||||||
// Sector(
|
|
||||||
// value: 35.0,
|
|
||||||
// color: Colors.purple,
|
|
||||||
// title: "35% Engineering"),
|
|
||||||
// Sector(
|
|
||||||
// value: 40, color: Colors.amber, title: "40% Development"),
|
|
||||||
// Sector(value: 55, color: Colors.green, title: "55% Social"),
|
|
||||||
// Sector(value: 70, color: Colors.orange, title: "70% Live"),
|
|
||||||
// ]),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
provider.isLoadingInsights
|
||||||
height: 20,
|
? Center(
|
||||||
),
|
child: CircularProgressIndicator(
|
||||||
labelWidget("Speaker counts by providers"),
|
color: EventsConstants.blueColor,
|
||||||
widget.affiliations.isNotEmpty
|
),
|
||||||
? Card(
|
)
|
||||||
|
: _buildCharts(provider, widgets),
|
||||||
|
widget.allSessionNotes.isNotEmpty
|
||||||
|
? labelWidget("Session Notes")
|
||||||
|
: SizedBox.shrink(),
|
||||||
|
widget.allSessionNotes.isEmpty
|
||||||
|
? SizedBox.shrink()
|
||||||
|
: Card(
|
||||||
surfaceTintColor: Colors.white,
|
surfaceTintColor: Colors.white,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.all(12.0),
|
padding: EdgeInsets.all(4.0),
|
||||||
// margin: EdgeInsets.all(10.0),
|
margin: EdgeInsets.all(4.0),
|
||||||
// height: screenSize.height / 3,
|
// height: screenSize.height / 3,
|
||||||
width: screenSize.width,
|
width: screenSize.width,
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
maxHeight: widget.allSessionNotes.length > 3
|
||||||
|
? screenSize.height
|
||||||
|
: 400,
|
||||||
|
minHeight: 400),
|
||||||
|
// height: double.minPositive,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius.all(Radius.circular(20)),
|
BorderRadius.all(Radius.circular(20)),
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
child: Column(
|
child: widget.allSessionNotes.isNotEmpty
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
? ListView.separated(
|
||||||
children: List.generate(
|
padding: EdgeInsets.zero,
|
||||||
widget.affiliations.length, (index) {
|
itemCount: widget.allSessionNotes.length,
|
||||||
return ChartLine(
|
itemBuilder: (context, index) {
|
||||||
title: widget.affiliations[index].orgName!,
|
return ExpansionTile(
|
||||||
number: int.parse(
|
initiallyExpanded: false,
|
||||||
widget.affiliations[index].orgCount!),
|
shape: Border(),
|
||||||
rate: int.parse(widget.affiliations[index]
|
expandedCrossAxisAlignment:
|
||||||
.orgCount!) ==
|
|
||||||
maximum
|
|
||||||
? 1
|
|
||||||
: int.parse(widget.affiliations[index]
|
|
||||||
.orgCount!) /
|
|
||||||
maximum);
|
|
||||||
}),
|
|
||||||
)),
|
|
||||||
)
|
|
||||||
: SizedBox.shrink(),
|
|
||||||
SizedBox(
|
|
||||||
height: 20,
|
|
||||||
),
|
|
||||||
labelWidget("Session Notes"),
|
|
||||||
Card(
|
|
||||||
surfaceTintColor: Colors.white,
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.all(4.0),
|
|
||||||
margin: EdgeInsets.all(4.0),
|
|
||||||
// height: screenSize.height / 3,
|
|
||||||
width: screenSize.width,
|
|
||||||
constraints: BoxConstraints(
|
|
||||||
maxHeight: provider.allSessionNotesList.length > 3
|
|
||||||
? screenSize.height
|
|
||||||
: 400,
|
|
||||||
minHeight: 400),
|
|
||||||
// height: double.minPositive,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
child: provider.allSessionNotesList.isNotEmpty
|
|
||||||
? ListView.separated(
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
itemCount: provider.allSessionNotesList.length,
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
return ExpansionTile(
|
|
||||||
initiallyExpanded: true,
|
|
||||||
shape: Border(),
|
|
||||||
expandedCrossAxisAlignment:
|
|
||||||
CrossAxisAlignment.start,
|
|
||||||
expandedAlignment: Alignment.topLeft,
|
|
||||||
childrenPadding: EdgeInsets.all(8.0),
|
|
||||||
title: Text(
|
|
||||||
"\"${provider.allSessionNotesList[index].notes}\"",
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 15,
|
|
||||||
fontStyle: FontStyle.italic)),
|
|
||||||
subtitle: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(
|
|
||||||
vertical: 8.0),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
"Added by: ${provider.allSessionNotesList[index].addedBy}",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.grey[900],
|
|
||||||
fontSize: 12),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"On: ${provider.allSessionNotesList[index].addedDate}",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.grey[900],
|
|
||||||
fontSize: 12),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.all(8.0),
|
|
||||||
// width: isTablet
|
|
||||||
// ? MediaQuery.of(context).size.width * 0.25
|
|
||||||
// : MediaQuery.of(context).size.width * 0.5,
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment:
|
|
||||||
CrossAxisAlignment.start,
|
CrossAxisAlignment.start,
|
||||||
children: [
|
expandedAlignment: Alignment.topLeft,
|
||||||
Text(
|
childrenPadding: EdgeInsets.all(8.0),
|
||||||
"Session: ${provider.allSessionNotesList[index].selectedSession}",
|
title: Text(
|
||||||
maxLines: 3,
|
"Session: ${widget.allSessionNotes[index].sessionName}",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 15,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
)),
|
||||||
|
subtitle: Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.only(top: 8.0),
|
||||||
|
child: Text(
|
||||||
|
"Speaker: ${widget.allSessionNotes[index].firstName}",
|
||||||
|
// maxLines: 3,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
// decoration: TextDecoration.underline,
|
// decoration: TextDecoration.underline,
|
||||||
// decorationColor: Colors.blue,
|
// decorationColor: Colors.blue,
|
||||||
//fontFamily: "SourceSerif",
|
// //fontFamily: "SourceSerif",
|
||||||
color: Colors.grey[700],
|
//color: Colors.grey[700],
|
||||||
|
|
||||||
//fontStyle: FontStyle.italic,
|
//fontWeight: FontWeight.bold,
|
||||||
fontSize: 14),
|
fontSize: 14),
|
||||||
),
|
),
|
||||||
SizedBox(
|
),
|
||||||
height: 5,
|
children: List.generate(
|
||||||
),
|
widget.allSessionNotes[index]
|
||||||
Text(
|
.addedBy!.length, (i) {
|
||||||
"Speaker: ${provider.allSessionNotesList[index].hcpname}",
|
return Container(
|
||||||
maxLines: 3,
|
padding: EdgeInsets.all(8.0),
|
||||||
style: TextStyle(
|
// width: isTablet
|
||||||
// decoration: TextDecoration.underline,
|
// ? MediaQuery.of(context).size.width * 0.25
|
||||||
// decorationColor: Colors.blue,
|
// : MediaQuery.of(context).size.width * 0.5,
|
||||||
//fontFamily: "SourceSerif",
|
child: Column(
|
||||||
color: Colors.grey[700],
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"\"${widget.allSessionNotes[index].notes![i]}\"",
|
||||||
|
maxLines: 3,
|
||||||
|
style: TextStyle(
|
||||||
|
// decoration: TextDecoration.underline,
|
||||||
|
// decorationColor: Colors.blue,
|
||||||
|
//fontFamily: "SourceSerif",
|
||||||
|
color: Colors.grey[900],
|
||||||
|
fontStyle:
|
||||||
|
FontStyle.italic,
|
||||||
|
fontSize: 14),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 5,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets
|
||||||
|
.symmetric(vertical: 8.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Added by ${widget.allSessionNotes[index].addedBy![i]}",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors
|
||||||
|
.grey[900],
|
||||||
|
fontSize: 13),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
" On ${widget.allSessionNotes[index].createdOn![i]}",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors
|
||||||
|
.grey[900],
|
||||||
|
fontSize: 13),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
widget.allSessionNotes[index]
|
||||||
|
.addedBy!.length >
|
||||||
|
1
|
||||||
|
? (i + 1) !=
|
||||||
|
widget
|
||||||
|
.allSessionNotes[
|
||||||
|
index]
|
||||||
|
.addedBy!
|
||||||
|
.length
|
||||||
|
? Divider(
|
||||||
|
//color: Colors.grey[900],
|
||||||
|
)
|
||||||
|
: SizedBox.shrink()
|
||||||
|
: SizedBox.shrink(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
//),
|
||||||
|
// Text(
|
||||||
|
// "Notes : ${sessionNotesList[index]}",
|
||||||
|
// maxLines: 3,
|
||||||
|
// style: TextStyle(
|
||||||
|
// // decoration: TextDecoration.underline,
|
||||||
|
// // decorationColor: Colors.blue,
|
||||||
|
// fontFamily: "SourceSerif",
|
||||||
|
// color: Colors.grey[700],
|
||||||
|
|
||||||
//fontStyle: FontStyle.italic,
|
// //fontStyle: FontStyle.italic,
|
||||||
fontSize: 14),
|
// fontSize: 14),
|
||||||
),
|
// ),
|
||||||
],
|
);
|
||||||
),
|
},
|
||||||
),
|
separatorBuilder:
|
||||||
// Text(
|
(BuildContext context, int index) {
|
||||||
// "Notes : ${sessionNotesList[index]}",
|
return Divider();
|
||||||
// maxLines: 3,
|
},
|
||||||
// style: TextStyle(
|
// separatorBuilder: (context, index) {
|
||||||
// // decoration: TextDecoration.underline,
|
// return Divider();
|
||||||
// // decorationColor: Colors.blue,
|
// },
|
||||||
// fontFamily: "SourceSerif",
|
)
|
||||||
// color: Colors.grey[700],
|
: Center(
|
||||||
|
child: Text("No added session notes"))),
|
||||||
// //fontStyle: FontStyle.italic,
|
),
|
||||||
// fontSize: 14),
|
|
||||||
// ),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
},
|
|
||||||
separatorBuilder:
|
|
||||||
(BuildContext context, int index) {
|
|
||||||
return Divider();
|
|
||||||
},
|
|
||||||
// separatorBuilder: (context, index) {
|
|
||||||
// return Divider();
|
|
||||||
// },
|
|
||||||
)
|
|
||||||
: Center(child: Text("No added session notes"))),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -338,6 +299,128 @@ class _EventsInsightsState extends State<EventsInsights> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _buildCharts(EventsProvider provider, List<Widget> widgets) {
|
||||||
|
final screenSize = MediaQuery.of(context).size;
|
||||||
|
final ratio = screenSize.width / (screenSize.height / 2);
|
||||||
|
List<int> affCountList = [];
|
||||||
|
int maximum = 0;
|
||||||
|
if (widget.affiliations.affiliationCount.isNotEmpty) {
|
||||||
|
for (var obj in widget.affiliations.affiliationCount) {
|
||||||
|
affCountList.add(int.parse(obj));
|
||||||
|
}
|
||||||
|
maximum = affCountList.reduce(max);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
widgets.isNotEmpty
|
||||||
|
? labelWidget("Topics Discussed")
|
||||||
|
: SizedBox.shrink(),
|
||||||
|
widgets.isNotEmpty
|
||||||
|
? Card(
|
||||||
|
surfaceTintColor: Colors.white,
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.all(2.0),
|
||||||
|
margin: EdgeInsets.all(2.0),
|
||||||
|
height: screenSize.height / 2,
|
||||||
|
width: screenSize.width,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(20))),
|
||||||
|
child: Center(
|
||||||
|
// child: Zoom(
|
||||||
|
// backgroundColor: Colors.white,
|
||||||
|
// initTotalZoomOut: true,
|
||||||
|
// centerOnScale: false,
|
||||||
|
// scrollWeight: 5,
|
||||||
|
child: FittedBox(
|
||||||
|
child: Scatter(
|
||||||
|
fillGaps: true,
|
||||||
|
delegate:
|
||||||
|
ArchimedeanSpiralScatterDelegate(ratio: ratio),
|
||||||
|
children: widgets,
|
||||||
|
// ),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: SizedBox.shrink(),
|
||||||
|
provider.specialtyList.isEmpty
|
||||||
|
? SizedBox.shrink()
|
||||||
|
: SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
provider.specialtyList.isNotEmpty
|
||||||
|
? labelWidget("Specialty of speakers")
|
||||||
|
: SizedBox.shrink(),
|
||||||
|
provider.specialtyList.isNotEmpty
|
||||||
|
? Card(
|
||||||
|
surfaceTintColor: Colors.white,
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.all(2.0),
|
||||||
|
margin: EdgeInsets.all(5.0),
|
||||||
|
height: screenSize.height / 2,
|
||||||
|
width: screenSize.width,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
child: CustomPieChart(
|
||||||
|
specialtyList: widget.specialtyList,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: SizedBox.shrink(),
|
||||||
|
provider.specialtyList.isEmpty
|
||||||
|
? SizedBox.shrink()
|
||||||
|
: SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
provider.affiliations.affiliationCount.isNotEmpty
|
||||||
|
? labelWidget("Speaker counts by providers")
|
||||||
|
: SizedBox.shrink(),
|
||||||
|
provider.affiliations.affiliationCount.isNotEmpty
|
||||||
|
? Card(
|
||||||
|
surfaceTintColor: Colors.white,
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.all(12.0),
|
||||||
|
// margin: EdgeInsets.all(10.0),
|
||||||
|
// height: screenSize.height / 3,
|
||||||
|
width: screenSize.width,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: List.generate(
|
||||||
|
widget.affiliations.affiliationCount.length, (index) {
|
||||||
|
return ChartLine(
|
||||||
|
title: widget.affiliations.affiliationNames[index],
|
||||||
|
number: int.parse(
|
||||||
|
widget.affiliations.affiliationCount[index]),
|
||||||
|
rate: int.parse(widget.affiliations
|
||||||
|
.affiliationCount[index]) ==
|
||||||
|
maximum
|
||||||
|
? 1
|
||||||
|
: int.parse(widget
|
||||||
|
.affiliations.affiliationCount[index]) /
|
||||||
|
maximum);
|
||||||
|
}),
|
||||||
|
)),
|
||||||
|
)
|
||||||
|
: SizedBox.shrink(),
|
||||||
|
provider.specialtyList.isEmpty
|
||||||
|
? SizedBox.shrink()
|
||||||
|
: SizedBox(
|
||||||
|
height: 20,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Widget labelWidget(String title) {
|
Widget labelWidget(String title) {
|
||||||
return Text(
|
return Text(
|
||||||
title,
|
title,
|
||||||
|
|
|
@ -285,109 +285,115 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||||
Center(
|
Center(
|
||||||
child: CustomButton(
|
child: CustomButton(
|
||||||
backgroundColor: EventsConstants.onboardButtonColor,
|
backgroundColor: EventsConstants.onboardButtonColor,
|
||||||
onPressed: () async {
|
// onPressed: () async {
|
||||||
setState(() {
|
// setState(() {
|
||||||
print("loading");
|
// print("loading");
|
||||||
provider.loading = true;
|
// provider.loading = true;
|
||||||
});
|
// });
|
||||||
|
|
||||||
if (textFieldsValidation(provider).isEmpty) {
|
// if (textFieldsValidation(provider).isEmpty) {
|
||||||
print("email:${emailTextController.text}");
|
// print("email:${emailTextController.text}");
|
||||||
// if (await _logout) {
|
// // if (await _logout) {
|
||||||
// print("LOGOUT");
|
// // print("LOGOUT");
|
||||||
// provider.code = secretKeyTextConrtroller.text;
|
// // provider.code = secretKeyTextConrtroller.text;
|
||||||
// Map<String, dynamic> resp = await provider.verifyCode(
|
// // Map<String, dynamic> resp = await provider.verifyCode(
|
||||||
// emailTextController.text, secretKeyTextConrtroller.text);
|
// // emailTextController.text, secretKeyTextConrtroller.text);
|
||||||
// if (resp["code"] == "1200") {
|
// // if (resp["code"] == "1200") {
|
||||||
// provider.loading = false;
|
// // provider.loading = false;
|
||||||
// provider.showCodeField = false;
|
// // provider.showCodeField = false;
|
||||||
// provider.showMessage = true;
|
// // provider.showMessage = true;
|
||||||
// _displaySnackBar("You have logged in successfully");
|
// // _displaySnackBar("You have logged in successfully");
|
||||||
// _saveprefs(resp["token"], emailTextController.text,
|
// // _saveprefs(resp["token"], emailTextController.text,
|
||||||
// secretKeyTextConrtroller.text, true)
|
// // secretKeyTextConrtroller.text, true)
|
||||||
// .then((value) {
|
// // .then((value) {
|
||||||
// Navigator.of(context).pushReplacement(
|
// // Navigator.of(context).pushReplacement(
|
||||||
// MaterialPageRoute(
|
// // MaterialPageRoute(
|
||||||
// builder: (context) => NavigationHomeScreen()),
|
// // builder: (context) => NavigationHomeScreen()),
|
||||||
// );
|
// // );
|
||||||
// });
|
// // });
|
||||||
// } else {
|
// // } else {
|
||||||
// provider.message = resp["message"];
|
// // provider.message = resp["message"];
|
||||||
// }
|
// // }
|
||||||
// } else {
|
// // } else {
|
||||||
print("FIRST LOGIN");
|
// print("FIRST LOGIN");
|
||||||
if (!provider.showCodeField) {
|
// if (!provider.showCodeField) {
|
||||||
provider.email = emailTextController.text;
|
// provider.email = emailTextController.text;
|
||||||
String encoded =
|
// String encoded =
|
||||||
base64.encode(utf8.encode(provider.deviceId));
|
// base64.encode(utf8.encode(provider.deviceId));
|
||||||
|
|
||||||
Map<String, dynamic> resp = await provider.verifyEmail(
|
// Map<String, dynamic> resp = await provider.verifyEmail(
|
||||||
emailTextController.text, encoded, platform);
|
// emailTextController.text, encoded, platform);
|
||||||
print("resp:${resp["code"]}");
|
// print("resp:${resp["code"]}");
|
||||||
if (resp.isEmpty) {
|
// if (resp.isEmpty) {
|
||||||
print("isEmplty");
|
// print("isEmplty");
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (resp["code"] == "1200") {
|
// if (resp["code"] == "1200") {
|
||||||
provider.loading = false;
|
// provider.loading = false;
|
||||||
provider.showCodeField = true;
|
// provider.showCodeField = true;
|
||||||
provider.showMessage = true;
|
// provider.showMessage = true;
|
||||||
} else {
|
// } else {
|
||||||
provider.loading = false;
|
// provider.loading = false;
|
||||||
provider.showCodeField = false;
|
// provider.showCodeField = false;
|
||||||
provider.showMessage = true;
|
// provider.showMessage = true;
|
||||||
}
|
// }
|
||||||
|
|
||||||
provider.message = resp["message"];
|
// provider.message = resp["message"];
|
||||||
setState(() {
|
// setState(() {
|
||||||
emailTextController.text = provider.email!;
|
// emailTextController.text = provider.email!;
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
provider.code = secretKeyTextConrtroller.text;
|
// provider.code = secretKeyTextConrtroller.text;
|
||||||
Map<String, dynamic> resp = await provider.verifyCode(
|
// Map<String, dynamic> resp = await provider.verifyCode(
|
||||||
emailTextController.text,
|
// emailTextController.text,
|
||||||
secretKeyTextConrtroller.text);
|
// secretKeyTextConrtroller.text);
|
||||||
if (resp["code"] == "1200") {
|
// if (resp["code"] == "1200") {
|
||||||
provider.loading = false;
|
// provider.loading = false;
|
||||||
provider.showCodeField = false;
|
// provider.showCodeField = false;
|
||||||
provider.showMessage = true;
|
// provider.showMessage = true;
|
||||||
_displaySnackBar("You have logged in successfully");
|
// _displaySnackBar("You have logged in successfully");
|
||||||
_saveprefs(resp["token"], emailTextController.text,
|
// _saveprefs(resp["token"], emailTextController.text,
|
||||||
secretKeyTextConrtroller.text, true)
|
// secretKeyTextConrtroller.text, true)
|
||||||
.then((value) {
|
// .then((value) {
|
||||||
Navigator.of(context).pushReplacement(
|
// Navigator.of(context).pushReplacement(
|
||||||
MaterialPageRoute(
|
// MaterialPageRoute(
|
||||||
builder: (context) => NavigationHomeScreen()),
|
// builder: (context) => NavigationHomeScreen()),
|
||||||
);
|
// );
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
provider.message = resp["message"];
|
// provider.message = resp["message"];
|
||||||
}
|
// }
|
||||||
setState(() {
|
// setState(() {
|
||||||
emailTextController.text = provider.email!;
|
// emailTextController.text = provider.email!;
|
||||||
secretKeyTextConrtroller.text = provider.code!;
|
// secretKeyTextConrtroller.text = provider.code!;
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
// }
|
// // }
|
||||||
|
|
||||||
//_joinMeeting(roomText.text, "demo meet2");
|
// //_joinMeeting(roomText.text, "demo meet2");
|
||||||
// _saveprefs(
|
// // _saveprefs(
|
||||||
|
|
||||||
// emailTextController.text,
|
// // emailTextController.text,
|
||||||
|
|
||||||
// true)
|
// // true)
|
||||||
// .then((value) {
|
// // .then((value) {
|
||||||
// Navigator.of(context).pushReplacement(
|
// // Navigator.of(context).pushReplacement(
|
||||||
// MaterialPageRoute(
|
// // MaterialPageRoute(
|
||||||
// builder: (context) => FirebaseExample(
|
// // builder: (context) => FirebaseExample(
|
||||||
// title: secretKeyTextConrtroller.text,
|
// // title: secretKeyTextConrtroller.text,
|
||||||
// )),
|
// // )),
|
||||||
// );
|
// // );
|
||||||
// }
|
// // }
|
||||||
// );
|
// // );
|
||||||
} else {
|
// } else {
|
||||||
_displaySnackBar(textFieldsValidation(provider));
|
// _displaySnackBar(textFieldsValidation(provider));
|
||||||
}
|
// }
|
||||||
|
// },
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pushReplacement(
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => NavigationHomeScreen()),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
textColor: Colors.white,
|
textColor: Colors.white,
|
||||||
fontsize: isTablet ? 22 : 18,
|
fontsize: isTablet ? 22 : 18,
|
||||||
|
|
|
@ -96,7 +96,7 @@ class _IntroductionAnimationScreenState
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onSkipClick() {
|
void _onSkipClick() {
|
||||||
_animationController?.animateTo(0.8,
|
_animationController?.animateTo(0.6,
|
||||||
duration: Duration(milliseconds: 1200));
|
duration: Duration(milliseconds: 1200));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ class _IntroductionAnimationScreenState
|
||||||
|
|
||||||
void _signUpClick() {
|
void _signUpClick() {
|
||||||
Navigator.of(context).pushReplacement(
|
Navigator.of(context).pushReplacement(
|
||||||
MaterialPageRoute(builder: (context) => NavigationHomeScreen()),
|
MaterialPageRoute(builder: (context) => LoginScreen()),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ import 'package:konectar_events/contacts_module/ui_screen/interactionform/new_dy
|
||||||
import 'package:konectar_events/contacts_module/ui_screen/interactionform/viewinteractionprovider.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/interactionform/widget/custombutton.dart';
|
||||||
import 'package:konectar_events/contacts_module/ui_screen/new_editinteraction.dart';
|
import 'package:konectar_events/contacts_module/ui_screen/new_editinteraction.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/ui_screen/new_new_profile.dart';
|
||||||
import 'package:konectar_events/contacts_module/ui_screen/new_viewinteraction.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/events_speakers_k1.dart';
|
||||||
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
||||||
|
@ -29,6 +30,7 @@ import 'package:konectar_events/utils/dateformater.dart';
|
||||||
import 'package:konectar_events/utils/util.dart';
|
import 'package:konectar_events/utils/util.dart';
|
||||||
import 'package:konectar_events/viewmodel/hcpprofprovider.dart';
|
import 'package:konectar_events/viewmodel/hcpprofprovider.dart';
|
||||||
import 'package:konectar_events/widgets/customdropdown.dart';
|
import 'package:konectar_events/widgets/customdropdown.dart';
|
||||||
|
import 'package:konectar_events/widgets/snackbar.dart';
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
import 'package:permission_handler/permission_handler.dart';
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
@ -61,6 +63,9 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
bool isExtended = false;
|
bool isExtended = false;
|
||||||
List<String> sessionList = [];
|
List<String> sessionList = [];
|
||||||
String attachedFileName = '';
|
String attachedFileName = '';
|
||||||
|
String attachedFilePath = '';
|
||||||
|
bool isLoading = false;
|
||||||
|
String btnText = "Add Notes";
|
||||||
final List<String> _fruits = ['Events', 'Sessions'];
|
final List<String> _fruits = ['Events', 'Sessions'];
|
||||||
final List<String> topics = [
|
final List<String> topics = [
|
||||||
" Admin. & Managemente",
|
" Admin. & Managemente",
|
||||||
|
@ -70,6 +75,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
"Program Committee",
|
"Program Committee",
|
||||||
"Practical Application of CDK 4/6 Inhibitor"
|
"Practical Application of CDK 4/6 Inhibitor"
|
||||||
];
|
];
|
||||||
|
final ValueNotifier<List<int>> valueList = ValueNotifier<List<int>>([]);
|
||||||
TextEditingController notesController = TextEditingController(text: "");
|
TextEditingController notesController = TextEditingController(text: "");
|
||||||
List<String> sessionNotesList = [];
|
List<String> sessionNotesList = [];
|
||||||
Future<void> dialogBuilder(BuildContext context, Eventsdetail eventsdetail,
|
Future<void> dialogBuilder(BuildContext context, Eventsdetail eventsdetail,
|
||||||
|
@ -161,9 +167,14 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
setState(() {
|
setState(() {
|
||||||
_selectedFruit = newValue!.sessionName;
|
_selectedFruit = newValue!.sessionName;
|
||||||
sessionsTopicsData = newValue;
|
sessionsTopicsData = newValue;
|
||||||
|
notesController.text = newValue.note ?? "";
|
||||||
|
if (newValue.note != "" && notesController.text.length != 0) {
|
||||||
|
btnText = "Update";
|
||||||
|
}
|
||||||
|
setState(() {});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
hint: Text("Select Session", style: hintStyle),
|
hint: Text("Select Session *", style: hintStyle),
|
||||||
items: provider.sessionTopics
|
items: provider.sessionTopics
|
||||||
.map((session) => DropdownMenuItem<SessionsTopicsData>(
|
.map((session) => DropdownMenuItem<SessionsTopicsData>(
|
||||||
value: session, child: Text(session.sessionName!)))
|
value: session, child: Text(session.sessionName!)))
|
||||||
|
@ -171,6 +182,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
valueList.value = [0, 0, 0];
|
||||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
||||||
init();
|
init();
|
||||||
});
|
});
|
||||||
|
@ -183,8 +195,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
.getSessionData();
|
.getSessionData();
|
||||||
await Provider.of<HcpProfileProvider>(context, listen: false)
|
await Provider.of<HcpProfileProvider>(context, listen: false)
|
||||||
.getSessionTopics(widget.eventsdetail);
|
.getSessionTopics(widget.eventsdetail);
|
||||||
// await Provider.of<HcpProfileProvider>(context, listen: false)
|
Provider.of<HcpProfileProvider>(context, listen: false).getCounts();
|
||||||
// .getCounts(widget.eventsdetail);
|
|
||||||
|
|
||||||
await Provider.of<InteractionProvider>(context, listen: false)
|
await Provider.of<InteractionProvider>(context, listen: false)
|
||||||
.initConfigData();
|
.initConfigData();
|
||||||
|
@ -197,6 +208,12 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
await Provider.of<ViewInteractionProvider>(context, listen: false)
|
await Provider.of<ViewInteractionProvider>(context, listen: false)
|
||||||
.getRecords(formname, hcp: widget.kolFullName);
|
.getRecords(formname, hcp: widget.kolFullName);
|
||||||
|
|
||||||
|
valueList.value[0] =
|
||||||
|
Provider.of<HcpProfileProvider>(context, listen: false).totalNotes;
|
||||||
|
valueList.value[1] =
|
||||||
|
Provider.of<HcpProfileProvider>(context, listen: false).totalSessions;
|
||||||
|
valueList.value[2] =
|
||||||
|
Provider.of<HcpProfileProvider>(context, listen: false).totalTopics;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,6 +354,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
buildprofile(
|
buildprofile(
|
||||||
BuildContext context, EventSpeakersData eventsdetail, String title) {
|
BuildContext context, EventSpeakersData eventsdetail, String title) {
|
||||||
MediaQuery.of(context).size.height * 0.35;
|
MediaQuery.of(context).size.height * 0.35;
|
||||||
|
print("ORG:${eventsdetail.orgName}");
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
//color: Colors.yellowAccent,
|
//color: Colors.yellowAccent,
|
||||||
|
@ -379,16 +397,69 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
// color: Colors.white,
|
// color: Colors.white,
|
||||||
// // fontFamily: "SourceSerif",
|
// // fontFamily: "SourceSerif",
|
||||||
// )),
|
// )),
|
||||||
Text(
|
|
||||||
"${eventsdetail.orgName ?? ""} ${eventsdetail.country ?? ""} ${eventsdetail.city ?? ""}",
|
RichText(
|
||||||
softWrap: true,
|
|
||||||
maxLines: 2,
|
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
text: TextSpan(children: [
|
||||||
color: Colors.white,
|
TextSpan(
|
||||||
// fontFamily: "SourceSerif",
|
text: eventsdetail.orgName != null ||
|
||||||
fontSize: 14,
|
eventsdetail.orgName!.trim() != ""
|
||||||
)),
|
? '${eventsdetail.orgName}'
|
||||||
|
: "",
|
||||||
|
style: TextStyle(
|
||||||
|
// decoration: TextDecoration.underline,
|
||||||
|
// decorationColor: Colors.blue,
|
||||||
|
color: Colors.white,
|
||||||
|
|
||||||
|
fontSize: 14,
|
||||||
|
|
||||||
|
// fontFamily: "SourceSerif",
|
||||||
|
),
|
||||||
|
|
||||||
|
// maxLines: isTablet ? 4 : 4,
|
||||||
|
// softWrap: true,
|
||||||
|
// overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text: eventsdetail.country != null
|
||||||
|
? '${eventsdetail.country},'
|
||||||
|
: "",
|
||||||
|
style: TextStyle(
|
||||||
|
// decoration: TextDecoration.underline,
|
||||||
|
// decorationColor: Colors.blue,
|
||||||
|
color: Colors.white,
|
||||||
|
|
||||||
|
fontSize: 14,
|
||||||
|
|
||||||
|
// fontFamily: "SourceSerif",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text: eventsdetail.city != null
|
||||||
|
? '${eventsdetail.city}'
|
||||||
|
: "",
|
||||||
|
style: TextStyle(
|
||||||
|
// decoration: TextDecoration.underline,
|
||||||
|
// decorationColor: Colors.blue,
|
||||||
|
color: Colors.white,
|
||||||
|
|
||||||
|
fontSize: 14,
|
||||||
|
|
||||||
|
// fontFamily: "SourceSerif",
|
||||||
|
),
|
||||||
|
)
|
||||||
|
])),
|
||||||
|
|
||||||
|
// Text(
|
||||||
|
// "${eventsdetail.orgName ?? ""},${eventsdetail.country ?? ""},${eventsdetail.city ?? ""}",
|
||||||
|
// softWrap: true,
|
||||||
|
// maxLines: 2,
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// style: TextStyle(
|
||||||
|
// color: Colors.white,
|
||||||
|
// // fontFamily: "SourceSerif",
|
||||||
|
// fontSize: 14,
|
||||||
|
// )),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -563,11 +634,14 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
),
|
),
|
||||||
// const Spacer(),
|
// const Spacer(),
|
||||||
Center(
|
Center(
|
||||||
child: _ProfileInfoRow(items: [
|
child: ValueListenableBuilder<List<int>>(
|
||||||
ProfileInfoItem("Topic(s)", widget.topics.length),
|
valueListenable: valueList,
|
||||||
ProfileInfoItem("Session(s)", widget.sessionNames.length),
|
builder: (context, value, child) => _ProfileInfoRow(items: [
|
||||||
ProfileInfoItem("Note(s)", provider.totalNotes),
|
ProfileInfoItem("Topic(s)", value[2]),
|
||||||
])),
|
ProfileInfoItem("Session(s)", value[1]),
|
||||||
|
ProfileInfoItem("Note(s)", value[0]),
|
||||||
|
]),
|
||||||
|
)),
|
||||||
// SizedBox(
|
// SizedBox(
|
||||||
// height: 20,
|
// height: 20,
|
||||||
// ),
|
// ),
|
||||||
|
@ -583,9 +657,10 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
return Container(
|
return Container(
|
||||||
color: EventsConstants.bgcolor,
|
color: EventsConstants.bgcolor,
|
||||||
child: Column(
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.all(15.0),
|
padding: const EdgeInsets.only(left: 15.0, top: 15, right: 15),
|
||||||
// decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
// border: Border.all(color: Colors.grey),
|
// border: Border.all(color: Colors.grey),
|
||||||
// borderRadius: BorderRadius.circular(8.0)),
|
// borderRadius: BorderRadius.circular(8.0)),
|
||||||
|
@ -608,6 +683,9 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
TextFormField(
|
TextFormField(
|
||||||
controller: notesController,
|
controller: notesController,
|
||||||
maxLines: 3,
|
maxLines: 3,
|
||||||
|
inputFormatters: [
|
||||||
|
LengthLimitingTextInputFormatter(1000),
|
||||||
|
],
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
// add email validation
|
// add email validation
|
||||||
if (value == null || value.isEmpty) {
|
if (value == null || value.isEmpty) {
|
||||||
|
@ -624,13 +702,17 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
decoration: const InputDecoration(
|
decoration: const InputDecoration(
|
||||||
labelText: 'Notes',
|
labelText: 'Notes *',
|
||||||
hintText: 'Notes',
|
// hintText: 'Notes',
|
||||||
// prefixIcon: Icon(Icons.note),
|
// prefixIcon: Icon(Icons.note),
|
||||||
border: OutlineInputBorder(),
|
border: OutlineInputBorder(),
|
||||||
focusedBorder: OutlineInputBorder(),
|
focusedBorder: OutlineInputBorder(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Text(
|
||||||
|
'Maximum Characters: 1000',
|
||||||
|
style: TextStyle(fontSize: 12),
|
||||||
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
|
@ -647,7 +729,13 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
// sectionItem.selectedValue = [];
|
// sectionItem.selectedValue = [];
|
||||||
// sectionItem.extension = [];
|
// sectionItem.extension = [];
|
||||||
// sectionItem.fileName = [];
|
// sectionItem.fileName = [];
|
||||||
await getEncodedFile();
|
if (_selectedFruit != null) {
|
||||||
|
await getEncodedFile();
|
||||||
|
} else {
|
||||||
|
SnackBarWidget.displaySnackBar(
|
||||||
|
"Please select a session", context,
|
||||||
|
error: true);
|
||||||
|
}
|
||||||
|
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
|
@ -655,7 +743,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
height: 40,
|
height: 40,
|
||||||
fontsize: 12,
|
fontsize: 12,
|
||||||
textColor: Colors.black,
|
textColor: Colors.black,
|
||||||
title: "Upload file"),
|
title: "Attach file"),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 5,
|
width: 5,
|
||||||
),
|
),
|
||||||
|
@ -672,53 +760,95 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
)),
|
)),
|
||||||
Align(
|
Align(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: SizedBox(
|
child: Stack(
|
||||||
height: 45,
|
children: [
|
||||||
child: FloatingActionButton.extended(
|
Align(
|
||||||
// backgroundColor: const Color.fromARGB(255, 222, 237, 247),
|
alignment: Alignment.center,
|
||||||
backgroundColor: Colors.green,
|
child: SizedBox(
|
||||||
onPressed: () async {
|
height: 45,
|
||||||
//"Program Committee Admin. & Management"
|
child: FloatingActionButton.extended(
|
||||||
//setState(() {
|
// backgroundColor: const Color.fromARGB(255, 222, 237, 247),
|
||||||
print("ADD : ${_selectedFruit} ${notesController.text}");
|
backgroundColor: Colors.green,
|
||||||
if (notesController.text.length != 0 ||
|
onPressed: () async {
|
||||||
notesController.text != "") {
|
//"Program Committee Admin. & Management"
|
||||||
sessionNotesList
|
//setState(() {
|
||||||
.add("${_selectedFruit} \n\n ${notesController.text}");
|
isLoading = true;
|
||||||
// });
|
|
||||||
print(" eventid:${widget.eventid},hcp:${widget.eventid}");
|
|
||||||
|
|
||||||
await provider.submitSessionNotes(eventsdetail,
|
if (notesController.text.isNotEmpty &&
|
||||||
sessionsTopicsData!, notesController.text);
|
sessionsTopicsData != null) {
|
||||||
|
print("ADD : ${_selectedFruit}");
|
||||||
|
sessionNotesList.add(
|
||||||
|
"${_selectedFruit} \n\n ${notesController.text}");
|
||||||
|
// });
|
||||||
|
print(
|
||||||
|
" eventid:${widget.eventid},hcp:${widget.eventid} session: ${sessionsTopicsData}");
|
||||||
|
|
||||||
SessionNotesModel notesModel = SessionNotesModel(
|
await provider.submitSessionNotes(
|
||||||
notes: notesController.text,
|
eventsdetail,
|
||||||
addedBy: "user",
|
sessionsTopicsData!,
|
||||||
addedDate: CustomDateFormatter().formatDate(),
|
notesController.text,
|
||||||
eventid: widget.eventid,
|
attachedFileName != '' ? attachedFilePath : "",
|
||||||
hcpid: widget.eventid,
|
attachedFileName != '' ? attachedFileName : "",
|
||||||
selectedSession: _selectedFruit);
|
);
|
||||||
print(
|
//HIVESTORE
|
||||||
"${notesModel.addedBy},${notesModel.notes},${notesModel.addedDate},${notesModel.eventid},${notesModel.hcpid},${notesModel.selectedSession}");
|
|
||||||
await provider.addSessionNotes(notesModel);
|
SessionNotesModel notesModel = SessionNotesModel(
|
||||||
_selectedFruit = null;
|
notes: notesController.text,
|
||||||
sessionsTopicsData = null;
|
addedBy: "user",
|
||||||
notesController.clear();
|
addedDate: CustomDateFormatter().formatDate(),
|
||||||
} else {
|
eventid: widget.eventid,
|
||||||
print("something went wrong");
|
hcpid: widget.eventid,
|
||||||
}
|
selectedSession: _selectedFruit);
|
||||||
},
|
print(
|
||||||
heroTag: 'addnotes',
|
"${notesModel.addedBy},${notesModel.notes},${notesModel.addedDate},${notesModel.eventid},${notesModel.hcpid},${notesModel.selectedSession}");
|
||||||
elevation: 0,
|
await provider.addSessionNotes(notesModel);
|
||||||
label: const Text(
|
_selectedFruit = null;
|
||||||
"Submit",
|
isLoading = false;
|
||||||
style: TextStyle(color: Colors.white),
|
sessionsTopicsData = null;
|
||||||
|
attachedFileName = "";
|
||||||
|
notesController.clear();
|
||||||
|
isLoading = false;
|
||||||
|
setState(() {});
|
||||||
|
SnackBarWidget.displaySnackBar(
|
||||||
|
"Notes added",
|
||||||
|
context,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
isLoading = false;
|
||||||
|
SnackBarWidget.displaySnackBar(
|
||||||
|
"Session/Notes cannot be empty", context,
|
||||||
|
error: true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
heroTag: 'addnotes',
|
||||||
|
elevation: 0,
|
||||||
|
label: Text(
|
||||||
|
btnText,
|
||||||
|
style: TextStyle(color: Colors.white),
|
||||||
|
),
|
||||||
|
// icon: const Icon(
|
||||||
|
// Icons.add,
|
||||||
|
// color: Colors.black,
|
||||||
|
// ),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
// icon: const Icon(
|
Visibility(
|
||||||
// Icons.add,
|
visible: isLoading,
|
||||||
// color: Colors.black,
|
child: Center(
|
||||||
// ),
|
child: CircularProgressIndicator(
|
||||||
),
|
color: EventsConstants.blueColor,
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Divider(),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 15.0),
|
||||||
|
child: Text(
|
||||||
|
"My Notes",
|
||||||
|
style: TextStyle(fontSize: 16),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Divider(),
|
Divider(),
|
||||||
|
@ -726,8 +856,8 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
//height: 200,
|
//height: 200,
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
padding: EdgeInsets.all(2.0),
|
padding: EdgeInsets.all(2.0),
|
||||||
itemCount: provider
|
itemCount: provider.sessionTopics
|
||||||
.getSessionNotesList(widget.eventid, widget.eventsdetail)
|
.where((element) => element.canEditNotes == true)
|
||||||
.length,
|
.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
|
@ -736,7 +866,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
: MediaQuery.of(context).size.width * 0.5,
|
: MediaQuery.of(context).size.width * 0.5,
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
"\"${provider.sessionNotesList[index].notes}\"",
|
"\"${provider.sessionTopics[index].note}\"",
|
||||||
// maxLines: 3,
|
// maxLines: 3,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
// decoration: TextDecoration.underline,
|
// decoration: TextDecoration.underline,
|
||||||
|
@ -754,7 +884,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"Session: ${provider.sessionNotesList[index].selectedSession}",
|
"Session: ${provider.sessionTopics[index].sessionName}",
|
||||||
// maxLines: 3,
|
// maxLines: 3,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
// decoration: TextDecoration.underline,
|
// decoration: TextDecoration.underline,
|
||||||
|
@ -765,38 +895,59 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
//fontStyle: FontStyle.italic,
|
//fontStyle: FontStyle.italic,
|
||||||
fontSize: 14),
|
fontSize: 14),
|
||||||
),
|
),
|
||||||
|
CustomButton(
|
||||||
|
backgroundColor:
|
||||||
|
const Color.fromARGB(255, 233, 229, 229),
|
||||||
|
onPressed: () {
|
||||||
|
sessionsTopicsData =
|
||||||
|
provider.sessionTopics[index];
|
||||||
|
_selectedFruit =
|
||||||
|
provider.sessionTopics[index].sessionName;
|
||||||
|
notesController.text =
|
||||||
|
provider.sessionTopics[index].note ?? "";
|
||||||
|
if (notesController.text.length != 0) {
|
||||||
|
btnText = "Update";
|
||||||
|
}
|
||||||
|
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
width: 80,
|
||||||
|
height: 30,
|
||||||
|
fontsize: 12,
|
||||||
|
textColor: Colors.black,
|
||||||
|
title: "Edit"),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 5,
|
height: 5,
|
||||||
),
|
),
|
||||||
Row(
|
// Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
// children: [
|
||||||
Text(
|
// Text(
|
||||||
"Added By: ${provider.sessionNotesList[index].addedBy}",
|
// "Added By:me",
|
||||||
// maxLines: 3,
|
// // maxLines: 3,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
// decoration: TextDecoration.underline,
|
// // decoration: TextDecoration.underline,
|
||||||
// decorationColor: Colors.blue,
|
// // decorationColor: Colors.blue,
|
||||||
//fontFamily: "SourceSerif",
|
// //fontFamily: "SourceSerif",
|
||||||
color: const Color.fromARGB(255, 66, 65, 65),
|
// color: const Color.fromARGB(255, 66, 65, 65),
|
||||||
|
|
||||||
//fontStyle: FontStyle.italic,
|
// //fontStyle: FontStyle.italic,
|
||||||
fontSize: 12),
|
// fontSize: 12),
|
||||||
),
|
// ),
|
||||||
Text(
|
// Text(
|
||||||
"On: ${provider.sessionNotesList[index].addedDate}",
|
// "On: ${provider.sessionNotesList[index].addedDate}",
|
||||||
// maxLines: 3,
|
// // maxLines: 3,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
// decoration: TextDecoration.underline,
|
// // decoration: TextDecoration.underline,
|
||||||
// decorationColor: Colors.blue,
|
// // decorationColor: Colors.blue,
|
||||||
//fontFamily: "SourceSerif",
|
// //fontFamily: "SourceSerif",
|
||||||
color: const Color.fromARGB(255, 66, 65, 65),
|
// color: const Color.fromARGB(255, 66, 65, 65),
|
||||||
|
|
||||||
//fontStyle: FontStyle.italic,
|
// //fontStyle: FontStyle.italic,
|
||||||
fontSize: 12),
|
// fontSize: 12),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -819,7 +970,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
: await Permission.storage.status;
|
: await Permission.storage.status;
|
||||||
if (status.isGranted) {
|
if (status.isGranted) {
|
||||||
FilePickerResult? result =
|
FilePickerResult? result =
|
||||||
await FilePicker.platform.pickFiles(allowMultiple: true);
|
await FilePicker.platform.pickFiles(allowMultiple: false);
|
||||||
|
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
print(result.files.first.path);
|
print(result.files.first.path);
|
||||||
|
@ -850,6 +1001,10 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
Uint8List imageUint8List = Uint8List.fromList(imageBytes);
|
Uint8List imageUint8List = Uint8List.fromList(imageBytes);
|
||||||
base64Image = base64Encode(imageUint8List);
|
base64Image = base64Encode(imageUint8List);
|
||||||
attachedFileName = fileName;
|
attachedFileName = fileName;
|
||||||
|
attachedFilePath = newFile.path;
|
||||||
|
if (notesController.text == "") {
|
||||||
|
notesController.text = "This attachment is loaded by Vinod Hangal";
|
||||||
|
}
|
||||||
// sectionItem.selectedValue!.add(base64Image);
|
// sectionItem.selectedValue!.add(base64Image);
|
||||||
// sectionItem.extension!.add(extension);
|
// sectionItem.extension!.add(extension);
|
||||||
// sectionItem.fileName!.add(fileName);
|
// sectionItem.fileName!.add(fileName);
|
||||||
|
@ -1214,6 +1369,10 @@ class _ProfileInfoRow extends StatelessWidget {
|
||||||
List<ProfileInfoItem> items;
|
List<ProfileInfoItem> items;
|
||||||
_ProfileInfoRow({Key? key, required this.items}) : super(key: key);
|
_ProfileInfoRow({Key? key, required this.items}) : super(key: key);
|
||||||
|
|
||||||
|
bool shouldRebuild(_ProfileInfoRow delegate) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
|
|
|
@ -7,6 +7,7 @@ import 'package:flutter/services.dart';
|
||||||
import 'package:hive_flutter/hive_flutter.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/contacts_module/model_class/k2_api_model/kol_event_k2.dart';
|
||||||
import 'package:konectar_events/model/affiliationsmodel.dart';
|
import 'package:konectar_events/model/affiliationsmodel.dart';
|
||||||
|
import 'package:konectar_events/model/allsessionnotesmodel.dart';
|
||||||
import 'package:konectar_events/model/events_details.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_list_resp_2.dart';
|
||||||
import 'package:konectar_events/model/events_speakers_k1.dart';
|
import 'package:konectar_events/model/events_speakers_k1.dart';
|
||||||
|
@ -54,11 +55,13 @@ class EventsProvider extends ChangeNotifier {
|
||||||
List<FlutterHashtag> kFlutterHashtags = [];
|
List<FlutterHashtag> kFlutterHashtags = [];
|
||||||
List<TopicsCloudData> topics = [];
|
List<TopicsCloudData> topics = [];
|
||||||
List<Specialty> specialtyList = [];
|
List<Specialty> specialtyList = [];
|
||||||
EventsOverviewData? overviewData;
|
EventsOverviewData overviewData = EventsOverviewData(
|
||||||
List<Affiliations> affiliations = [];
|
arrEvents: [], topSpeakers: [], eventSponsers: [], eventTopics: []);
|
||||||
|
Affiliations affiliations =
|
||||||
|
Affiliations(affiliationCount: [], affiliationNames: []);
|
||||||
|
List<AllSessionNotesResponse> allSessionNotes = [];
|
||||||
late StreamSubscription<List<ConnectivityResult>> connectivitySubscription;
|
late StreamSubscription<List<ConnectivityResult>> connectivitySubscription;
|
||||||
|
bool isLoadingInsights = true;
|
||||||
Future<void> onSelectAll(int page) async {
|
Future<void> onSelectAll(int page) async {
|
||||||
isFavSeleted = false;
|
isFavSeleted = false;
|
||||||
isAllSelected = !isAllSelected;
|
isAllSelected = !isAllSelected;
|
||||||
|
@ -236,13 +239,13 @@ class EventsProvider extends ChangeNotifier {
|
||||||
|
|
||||||
offlineEvents = await getOfflineMyEvents();
|
offlineEvents = await getOfflineMyEvents();
|
||||||
eventList = isFavSeleted
|
eventList = isFavSeleted
|
||||||
? await ApiCall().getEventsFromK1(type: "2")
|
? await ApiCall().getEventsFromK1(type: 2)
|
||||||
: await ApiCall().getEventsFromK1();
|
: await ApiCall().getEventsFromK1();
|
||||||
print("see the list : $neweventList");
|
print("see the list : $neweventList");
|
||||||
if (eventList.isEmpty) {
|
if (eventList.isEmpty) {
|
||||||
// eventList = (await ApiCall().getEvents())!;
|
// eventList = (await ApiCall().getEvents())!;
|
||||||
eventList = isFavSeleted
|
eventList = isFavSeleted
|
||||||
? await ApiCall().getEventsFromK1(type: "2")
|
? await ApiCall().getEventsFromK1(type: 2)
|
||||||
: await ApiCall().getEventsFromK1();
|
: await ApiCall().getEventsFromK1();
|
||||||
//eventList = (await ApiCall().getStagingEvents())!;
|
//eventList = (await ApiCall().getStagingEvents())!;
|
||||||
for (var events in eventList) {
|
for (var events in eventList) {
|
||||||
|
@ -268,11 +271,11 @@ class EventsProvider extends ChangeNotifier {
|
||||||
|
|
||||||
Future<List<EventsList>> getMyEvents(int page) async {
|
Future<List<EventsList>> getMyEvents(int page) async {
|
||||||
// eventList = await getAllEventsData();
|
// eventList = await getAllEventsData();
|
||||||
myEvents = await ApiCall().getEventsFromK1(type: "2");
|
myEvents = await ApiCall().getEventsFromK1(type: 2);
|
||||||
print("see the list : $myEvents");
|
print("see the list : $myEvents");
|
||||||
if (myEvents.isEmpty) {
|
if (myEvents.isEmpty) {
|
||||||
// eventList = (await ApiCall().getEvents())!;
|
// eventList = (await ApiCall().getEvents())!;
|
||||||
myEvents = await ApiCall().getEventsFromK1(type: "2");
|
myEvents = await ApiCall().getEventsFromK1(type: 2);
|
||||||
//eventList = (await ApiCall().getStagingEvents())!;
|
//eventList = (await ApiCall().getStagingEvents())!;
|
||||||
}
|
}
|
||||||
for (var events in myEvents) {
|
for (var events in myEvents) {
|
||||||
|
@ -309,7 +312,7 @@ class EventsProvider extends ChangeNotifier {
|
||||||
|
|
||||||
Future<List<EventSpeakersData>> getInitialSpeakersDetails(String eventid,
|
Future<List<EventSpeakersData>> getInitialSpeakersDetails(String eventid,
|
||||||
{required String searchkey}) async {
|
{required String searchkey}) async {
|
||||||
speakersList = (await ApiCall().getEventsSpeakersFromK1(eventid));
|
speakersList = await ApiCall().getEventsSpeakersFromK1(eventid);
|
||||||
getSessionCount();
|
getSessionCount();
|
||||||
if (searchkey.length != 0) {
|
if (searchkey.length != 0) {
|
||||||
List<EventSpeakersData> searchspeakers = speakersList
|
List<EventSpeakersData> searchspeakers = speakersList
|
||||||
|
@ -481,37 +484,52 @@ class EventsProvider extends ChangeNotifier {
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
FutureOr getTopicsCloud(EventsList event) async {
|
FutureOr getTopicsCloud(EventsList event, {bool? client}) async {
|
||||||
List<TopicsCloudData> topics = (await ApiCall().insightsTopicsCloud(
|
List<TopicsCloudData> topics = await ApiCall().insightsTopicsCloud(
|
||||||
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!)),
|
||||||
|
client: client ?? false);
|
||||||
// for (var events in eventList) {
|
// for (var events in eventList) {
|
||||||
// await saveEventsData(events);
|
// await saveEventsData(events);
|
||||||
// }
|
// }
|
||||||
//notifyListeners();
|
//notifyListeners();
|
||||||
kFlutterHashtags = [];
|
kFlutterHashtags = [];
|
||||||
for (var topic in topics) {
|
for (var topic in topics) {
|
||||||
kFlutterHashtags
|
kFlutterHashtags.add(
|
||||||
.add(FlutterHashtag(topic.topic!, int.parse(topic.total!), false));
|
FlutterHashtag(topic.topic!, int.parse(topic.total!) + 500, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
FutureOr getSpecialtyData(EventsList event) async {
|
FutureOr getSpecialtyData(EventsList event, {bool? client}) async {
|
||||||
specialtyList = (await ApiCall().specialtyOfSpeakers(
|
String date = CustomDateFormatter().formatYearDate(
|
||||||
|
CustomDateFormatter().convertStringToDate(event.start!));
|
||||||
|
print("Formatted_DATE :$date");
|
||||||
|
specialtyList = await ApiCall().specialtyOfSpeakers(
|
||||||
eventid: event.eventId!,
|
eventid: event.eventId!,
|
||||||
startDate: CustomDateFormatter().formatYearDate(
|
startDate: CustomDateFormatter().formatYearDate(
|
||||||
CustomDateFormatter().convertStringToDate(event.start!)),
|
CustomDateFormatter().convertStringToDate(event.start!)),
|
||||||
endDate: CustomDateFormatter().formatYearDate(
|
endDate: CustomDateFormatter().formatYearDate(
|
||||||
CustomDateFormatter().convertStringToDate(event.end!))));
|
CustomDateFormatter().convertStringToDate(event.end!)),
|
||||||
|
client: client ?? false);
|
||||||
|
//isLoadingInsights = false;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
FutureOr getAffiliations(EventsList event) async {
|
FutureOr getAffiliations(EventsList event, {bool? client}) async {
|
||||||
affiliations = (await ApiCall().insightsBarChart(
|
// isLoadingInsights = true;
|
||||||
eventid: event.eventId!, startDate: event.start!, endDate: event.end!));
|
affiliations = await ApiCall().insightsBarChart(
|
||||||
|
eventid: event.eventId!,
|
||||||
|
startDate: CustomDateFormatter().formatYearDate(
|
||||||
|
CustomDateFormatter().convertStringToDate(event.start!)),
|
||||||
|
endDate: CustomDateFormatter().formatYearDate(
|
||||||
|
CustomDateFormatter().convertStringToDate(event.end!)),
|
||||||
|
client: client ?? false);
|
||||||
|
//isLoadingInsights = false;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -523,5 +541,19 @@ class EventsProvider extends ChangeNotifier {
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FutureOr getAllSessionNotesFromApi(String eid) async {
|
||||||
|
print("Check hcp id");
|
||||||
|
// print("$eid,$hcpid");
|
||||||
|
allSessionNotes = await ApiCall().getAllSessionNotes(eid);
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
FutureOr callInsightsDataForClientSpecific(
|
||||||
|
EventsList event, bool client) async {
|
||||||
|
await getTopicsCloud(event, client: client);
|
||||||
|
await getSpecialtyData(event, client: client);
|
||||||
|
await getAffiliations(event, client: client);
|
||||||
|
isLoadingInsights = false;
|
||||||
|
}
|
||||||
//INTERNET CONNECTIVITY
|
//INTERNET CONNECTIVITY
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import 'dart:math';
|
||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:hive_flutter/hive_flutter.dart';
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
import 'package:konectar_events/model/allsessionnotesmodel.dart';
|
||||||
import 'package:konectar_events/model/events_speakers_k1.dart';
|
import 'package:konectar_events/model/events_speakers_k1.dart';
|
||||||
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
||||||
import 'package:konectar_events/model/eventspeakers.dart';
|
import 'package:konectar_events/model/eventspeakers.dart';
|
||||||
|
@ -15,37 +16,65 @@ import 'package:konectar_events/widgets/word_cloud.dart';
|
||||||
|
|
||||||
class HcpProfileProvider extends ChangeNotifier {
|
class HcpProfileProvider extends ChangeNotifier {
|
||||||
List<SessionNotesModel> sessionNotesList = [];
|
List<SessionNotesModel> sessionNotesList = [];
|
||||||
List<SessionNotesModel> allSessionNotesList = [];
|
List<SessionNotesModel> allSessionNotesHiveList = [];
|
||||||
int totalTopics = 0;
|
int totalTopics = 0;
|
||||||
int totalSessions = 0;
|
int totalSessions = 0;
|
||||||
int totalNotes = 0;
|
int totalNotes = 0;
|
||||||
List<SessionsTopicsData> sessionTopics = [];
|
List<SessionsTopicsData> sessionTopics = [];
|
||||||
|
List<AllSessionNotesResponse> allSessionNotes = [];
|
||||||
late Box<SessionNotesModel> box;
|
late Box<SessionNotesModel> box;
|
||||||
|
|
||||||
Future<void> getSessionTopics(EventSpeakersData detail) async {
|
Future<void> getSessionTopics(EventSpeakersData detail) async {
|
||||||
sessionTopics = await ApiCall().getSessionsTopics(detail.eid!,
|
sessionTopics = await ApiCall().getSessionsTopics(detail.eid!,
|
||||||
detail.kolId == "0" ? detail.hcpPinAlias! : detail.kolId!, detail.kId!);
|
detail.kolId == "0" ? detail.hcpPinAlias! : detail.kolId!, detail.kId!);
|
||||||
totalSessions = sessionTopics.length;
|
totalSessions = sessionTopics.length;
|
||||||
|
getCounts();
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<dynamic> submitSessionNotes(EventSpeakersData detail,
|
Future<dynamic> submitSessionNotes(
|
||||||
SessionsTopicsData sessionsTopicsData, String notes) async {
|
EventSpeakersData detail,
|
||||||
var data = await ApiCall().addSessionNotes(
|
SessionsTopicsData sessionsTopicsData,
|
||||||
sessionsTopicsData.kolEventsId!,
|
String notes,
|
||||||
detail.kolId == "0" ? detail.hcpPinAlias! : detail.kolId!,
|
String? selectedfilepath,
|
||||||
detail.eventAttendeesId!,
|
String? selectedfilename) async {
|
||||||
detail.kId!,
|
var data = await ApiCall()
|
||||||
notes);
|
.addSessionNotes(
|
||||||
|
sessionsTopicsData.kolEventsId!,
|
||||||
|
sessionsTopicsData.kolId!,
|
||||||
|
sessionsTopicsData.eventAttendeesId!,
|
||||||
|
detail.kId!,
|
||||||
|
notes,
|
||||||
|
selectedfilepath,
|
||||||
|
selectedfilename,
|
||||||
|
sessionsTopicsData.id ?? "",
|
||||||
|
)
|
||||||
|
.then(
|
||||||
|
(value) {
|
||||||
|
getSessionTopics(detail);
|
||||||
|
},
|
||||||
|
);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
getCounts(Eventsdetail eventsdetail) {
|
getCounts() {
|
||||||
List<String> topics = eventsdetail.eventTopics!.split("|");
|
// List<String> topics = eventsdetail.eventTopics!.split("|");
|
||||||
totalTopics = topics.length;
|
// totalTopics = topics.length;
|
||||||
|
|
||||||
totalSessions = int.parse(eventsdetail.numSess ?? "1");
|
// totalSessions = int.parse(eventsdetail.numSess ?? "1");
|
||||||
totalNotes = sessionNotesList.length;
|
// totalNotes = sessionNotesList.length;
|
||||||
|
int total = 0;
|
||||||
|
int totalT = 0;
|
||||||
|
if (sessionTopics.isNotEmpty) {
|
||||||
|
for (var obj in sessionTopics) {
|
||||||
|
print("Notes_count : ${obj.noteCount}");
|
||||||
|
total = total + int.parse(obj.noteCount ?? "0");
|
||||||
|
totalT = totalT + obj.eventTopics!.split("|").length ?? 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
totalNotes = total;
|
||||||
|
totalTopics = totalT;
|
||||||
|
totalSessions = sessionTopics.length;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,7 +116,7 @@ class HcpProfileProvider extends ChangeNotifier {
|
||||||
print("Check hcp id");
|
print("Check hcp id");
|
||||||
// print("$eid,$hcpid");
|
// print("$eid,$hcpid");
|
||||||
await getSessionData();
|
await getSessionData();
|
||||||
allSessionNotesList =
|
allSessionNotesHiveList =
|
||||||
sessionNotesList.where((element) => element.eventid == eid).toList();
|
sessionNotesList.where((element) => element.eventid == eid).toList();
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,16 +27,18 @@ class ChartLine extends StatelessWidget {
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
//constraints: BoxConstraints(minWidth: lineWidget),
|
constraints: BoxConstraints(
|
||||||
child: IntrinsicWidth(
|
minWidth: lineWidget, minHeight: constraints.minHeight),
|
||||||
|
child: Expanded(
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
//mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
title,
|
title,
|
||||||
|
maxLines: 2,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.clip,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -2,14 +2,17 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:konectar_events/utils/constants.dart';
|
import 'package:konectar_events/utils/constants.dart';
|
||||||
|
|
||||||
class SnackBarWidget {
|
class SnackBarWidget {
|
||||||
static displaySnackBar(String msg, BuildContext context) {
|
static displaySnackBar(String msg, BuildContext context,
|
||||||
|
{bool error = false}) {
|
||||||
final snackBar = SnackBar(
|
final snackBar = SnackBar(
|
||||||
content: Text(
|
content: Text(
|
||||||
msg,
|
msg,
|
||||||
style: TextStyle(color: Colors.black),
|
style: TextStyle(color: Colors.black),
|
||||||
),
|
),
|
||||||
backgroundColor: EventsConstants.oldbgcolor,
|
backgroundColor: error
|
||||||
duration: Durations.long1,
|
? Color.fromARGB(255, 235, 110, 76)
|
||||||
|
: EventsConstants.oldbgcolor,
|
||||||
|
duration: error ? Durations.long3 : Durations.long1,
|
||||||
);
|
);
|
||||||
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
||||||
//scaffoldKeyLogin.currentState!.showSnackBar(snackBar);
|
//scaffoldKeyLogin.currentState!.showSnackBar(snackBar);
|
||||||
|
|
|
@ -1685,6 +1685,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.2"
|
version: "3.1.2"
|
||||||
|
zoom_widget:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: zoom_widget
|
||||||
|
sha256: "50fbaa460ffc938ca14c0077f8c9e5968c437897242d7f552dacff1bf3270225"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.1"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.3.0 <4.0.0"
|
dart: ">=3.3.0 <4.0.0"
|
||||||
flutter: ">=3.19.0"
|
flutter: ">=3.19.0"
|
||||||
|
|
|
@ -94,6 +94,7 @@ dependencies:
|
||||||
animations: ^2.0.11
|
animations: ^2.0.11
|
||||||
overlay_support: ^2.1.0
|
overlay_support: ^2.1.0
|
||||||
flutter_svg_provider: ^1.0.7
|
flutter_svg_provider: ^1.0.7
|
||||||
|
zoom_widget: ^2.0.1
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue