Commit dddda326 authored by Sai Srinivas's avatar Sai Srinivas
Browse files

09-07-2025 By Sai Srinivas

New UI Changes Home, Finance , crm , service, attendance
parent c92f4c79
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="20" cy="20" r="20" fill="white"/>
<path d="M19.6586 30.9281C19.8785 31.0238 20.1297 31.0238 20.3496 30.9281C22.9512 29.7953 28.2883 24.3922 28.2883 19.2797C28.2883 14.707 24.5812 11 20.0086 11H19.991C15.418 11 11.7109 14.707 11.7109 19.2797C11.7109 24.3926 17.0562 29.7957 19.6582 30.9281H19.6586ZM19.9508 14.6891C21.2449 14.6891 22.2941 15.7383 22.2941 17.0324C22.2941 18.3266 21.2449 19.3758 19.9508 19.3758C18.6566 19.3758 17.6074 18.3266 17.6074 17.0324C17.6074 15.7383 18.6566 14.6891 19.9508 14.6891ZM16.1293 22.6875C16.0875 22.2809 16.1059 21.9387 16.1059 21.9383C16.1059 21.9383 16.0875 21.7176 16.1293 21.3176C16.1293 21.3141 16.1301 21.3109 16.1305 21.3074C16.1648 20.9793 16.3125 20.6738 16.5469 20.4391C16.7812 20.2051 17.0918 20.0531 17.4219 20.0176C17.9066 19.9664 19.3812 19.9383 20.1309 19.9383C20.8805 19.9383 22.0836 19.966 22.5684 20.0176C22.898 20.0527 23.209 20.2051 23.4434 20.4391C23.6777 20.6738 23.8254 20.9793 23.8598 21.3074C23.8598 21.3109 23.8605 21.3141 23.8609 21.3176C23.9027 21.718 23.8973 21.9375 23.8973 21.9379C23.8973 21.9379 23.9027 22.2813 23.8613 22.6883C23.8613 22.6918 23.8605 22.6949 23.8602 22.6984C23.8258 23.032 23.6789 23.3613 23.4453 23.6285C23.2121 23.8953 22.9023 24.0867 22.573 24.1562C22.0895 24.2656 20.884 24.3734 20.1316 24.3684C19.3793 24.3871 17.9012 24.2703 17.4176 24.1555C17.0883 24.0859 16.7785 23.8945 16.5453 23.6277C16.3121 23.3605 16.1648 23.0313 16.1305 22.698C16.1305 22.6945 16.1297 22.691 16.1293 22.6879V22.6875Z" fill="url(#paint0_linear_106_719)"/>
<defs>
<linearGradient id="paint0_linear_106_719" x1="11.7198" y1="20.888" x2="34.4129" y2="31.1599" gradientUnits="userSpaceOnUse">
<stop stop-color="#CE7138"/>
<stop offset="1" stop-color="#91481B"/>
</linearGradient>
</defs>
</svg>
......@@ -77,6 +77,7 @@ class Generatordetailsprovider extends ChangeNotifier {
ComplaintDescriptionList? _selectedDescriptionType;
List<ContactList> get contactsList => _contactList;
List<ScheduleList> get scheduleList => _scheduleList;
File? get image => _image;
......@@ -114,7 +115,9 @@ class Generatordetailsprovider extends ChangeNotifier {
String? _selectedDescriptionId;
bool get submitLoading => _submitLoading;
bool get showMoreScheduleDetails => _showMoreScheduleDetails;
bool get showMoreScheduleList => _showMoreScheduleList;
List<ComplaintTypeList> get complaintTypeDropdown => _complaintTypeDropdown;
......@@ -218,6 +221,7 @@ class Generatordetailsprovider extends ChangeNotifier {
_showMoreScheduleList = value;
notifyListeners();
}
set showMoreScheduleDetails(bool value) {
_showMoreScheduleDetails = value;
notifyListeners();
......@@ -289,7 +293,11 @@ class Generatordetailsprovider extends ChangeNotifier {
_selectedDescriptionId = "";
_selectedDescription = "";
_qrViewController!.dispose();
_imageName = null;
_image = null;
_imagePicked = 0;
_imageError = null;
notifyListeners();
}
initialFunction(from) async {
......@@ -543,8 +551,8 @@ class Generatordetailsprovider extends ChangeNotifier {
_cmsngDate = data.cmsngDate;
_status = data.status;
_genLocation = data.loc;
_contactList = data.contactList??[];
_scheduleList = data.scheduleList??[];
_contactList = data.contactList ?? [];
_scheduleList = data.scheduleList ?? [];
_complaintTypeDropdown = data.complaintTypeList ?? [];
_complaintCategorydropdown = data.complaintCategoryList ?? [];
_complaintDescriptionDropdown = data.complaintDescriptionList ?? [];
......@@ -795,7 +803,7 @@ class Generatordetailsprovider extends ChangeNotifier {
]) async {
_submitLoading = true;
notifyListeners();
if (!valid()) {
if (!valid(context)) {
return;
}
try {
......@@ -855,11 +863,19 @@ class Generatordetailsprovider extends ChangeNotifier {
}
}
bool valid() {
bool valid(context) {
bool isValid = true;
if (_image == null || _imagePicked == 0) {
_imageError = "Please Add Proof";
notifyListeners();
isValid = false;
// notifyListeners();
}
if (latlongs.isEmpty) {
toast(
context,
"Error in Location, Please Check your location and Try again",
);
isValid = false;
}
notifyListeners();
return isValid;
......@@ -944,6 +960,67 @@ class Generatordetailsprovider extends ChangeNotifier {
}
}
Future<void> TagGeneratorCheckAPIFunction(
homeProvider,
BuildContext context,
genID,
) async {
try {
_submitLoading = true;
notifyListeners();
final data = await ApiCalling.TagGeneratorCheckAPI(
homeProvider.empId,
homeProvider.session,
genID,
);
if (data != null) {
if (data.sessionExists == 1) {
if (data.error == 0) {
_submitLoading = false;
Navigator.pop(context);
showTagGeneratorBottomSheet(context, genID);
notifyListeners();
_isLoading = false;
} else if (data.error == 1) {
_submitLoading = false;
notifyListeners();
toast(context, data.message);
} else if (data.error == 2) {
_submitLoading = false;
notifyListeners();
toast(context, data.message);
} else {
_isLoading = true;
_submitLoading = false;
notifyListeners();
print("error");
}
} else {
_isLoading = true;
_submitLoading = false;
notifyListeners();
// SharedpreferencesService().clearPreferences();
// toast(context, "Your Session expired, Please Login Again!");
// Navigator.push(
// context,
// MaterialPageRoute(builder: (context) => Splash()),
// );
}
} else {
_isLoading = true;
_submitLoading = false;
notifyListeners();
toast(context, "Something Went Wrong, Please try again!");
print("error2");
}
} on Error catch (e) {
_submitLoading = false;
notifyListeners();
print(e.toString());
}
}
imgFromCamera() async {
// Capture a photo
try {
......
......@@ -25,15 +25,25 @@ class HomescreenNotifier extends ChangeNotifier {
String? _onlineStatus = "Offline";
String get username => _username;
String get email => _email;
String get curdate => _curdate;
String get empId => _empId;
String get session => _session;
String get webPageUrl => _webPageUrl;
String get whizzdomPageUrl => _whizzdomPageUrl;
String get roleStatus => _roleStatus;
int get att_status => _att_status;
get Sessionid => _Sessionid;
String? get onlineStatus => _onlineStatus;
WebSocketManager webSocketManager = WebSocketManager(
......
......@@ -9,63 +9,88 @@ import '../../Models/crmModels/crmUniversalSearchResponse.dart';
import '../../services/api_calling.dart';
import '../HomeScreenNotifier.dart';
class Crmdashboardprovider extends ChangeNotifier{
class Crmdashboardprovider extends ChangeNotifier {
TextEditingController searchController = TextEditingController();
List<PagesAccessible> _accessPages = [];
List<PagesAccessible> get accessPages => _accessPages;
List<PendingTasks> _pendingTasks = [];
List<PendingTasks> get pendingTasksLists => _pendingTasks;
List<Accounts> _accountsList = [];
List<Leads> _leadsList = [];
List<Enquires> _enquiresList = [];
List<Accounts> get accountsList => _accountsList;
List<Leads> get leadsList => _leadsList;
List<Enquires> get enquiresList => _enquiresList;
Hotleads _hotleads = Hotleads();
Hotleads get hotleads => _hotleads;
Hotleads _coldleads = Hotleads();
Hotleads get coldleads => _coldleads;
Hotleads _warmleads = Hotleads();
Hotleads get warmleads => _warmleads;
Hotleads _totalleads = Hotleads();
Hotleads get totalleads => _totalleads;
Hotleads _orderlost = Hotleads();
Hotleads get orderlost => _orderlost;
Hotleads _norequirement = Hotleads();
Hotleads get norequirement => _norequirement;
Hotleads _openEnquiries = Hotleads();
Hotleads get openEnquiries => _openEnquiries;
List<Hotleads> _allLeads = [];
List<Hotleads> get allLeads => _allLeads;
Future<void>accessPagesAPIFunction(context) async {
try{
var HomeProv = Provider.of<HomescreenNotifier>(context,listen: false);
final data = await ApiCalling.crmAccessiblePagesAPI(HomeProv.empId, HomeProv.session);
if(data!=null){
if(data.error=="0"){
Future<void> accessPagesAPIFunction(context) async {
try {
var HomeProv = Provider.of<HomescreenNotifier>(context, listen: false);
final data = await ApiCalling.crmAccessiblePagesAPI(
HomeProv.empId,
HomeProv.session,
);
if (data != null) {
if (data.error == "0") {
_accessPages = data.pagesAccessible!;
_accessPages.add(PagesAccessible(mode: "",id: 0,pageName: "Nearby Leads"));
_accessPages.add(
PagesAccessible(mode: "", id: 0, pageName: "Nearby Leads"),
);
notifyListeners();
}
}
}catch (e,s){
}
} catch (e, s) {}
}
Future<void> crmDashboardAPIFunction(context, mode,
from,to,teamemployee) async {
try{
var HomeProv = Provider.of<HomescreenNotifier>(context,listen: false);
final data = await ApiCalling.crmDashboardAPI(HomeProv.empId, HomeProv.session, mode,
from,to,teamemployee);
if(data!=null){
if(data.error=="0"){
Future<void> crmDashboardAPIFunction(
context,
mode,
from,
to,
teamemployee,
) async {
try {
var HomeProv = Provider.of<HomescreenNotifier>(context, listen: false);
final data = await ApiCalling.crmDashboardAPI(
HomeProv.empId,
HomeProv.session,
mode,
from,
to,
teamemployee,
);
if (data != null) {
if (data.error == "0") {
_hotleads = data.hotleads!;
_coldleads = data.coldleads!;
_warmleads = data.warmleads!;
......@@ -85,45 +110,41 @@ class Crmdashboardprovider extends ChangeNotifier{
notifyListeners();
}
}
}catch (e,s){
}
} catch (e, s) {}
}
Future<void> crmPendingTasksAPIFunction(context) async {
try{
var HomeProv = Provider.of<HomescreenNotifier>(context,listen: false);
final data = await ApiCalling.crmPendingTasksAPI(HomeProv.empId, HomeProv.session);
if(data!=null){
if(data.error=="0"){
Future<void> crmPendingTasksAPIFunction(context) async {
try {
var HomeProv = Provider.of<HomescreenNotifier>(context, listen: false);
final data = await ApiCalling.crmPendingTasksAPI(
HomeProv.empId,
HomeProv.session,
);
if (data != null) {
if (data.error == "0") {
_pendingTasks = data.pendingTasks!;
notifyListeners();
}
}
}catch (e,s){
}
} catch (e, s) {}
}
Future<void> crmUniversalSearchFunction(context) async {
try{
var HomeProv = Provider.of<HomescreenNotifier>(context,listen: false);
final data = await ApiCalling.crmUniversalSearchAPI(HomeProv.empId, HomeProv.session,searchController.text);
if(data!=null){
if(data.error=="0"){
_accountsList = data.accounts??[];
_leadsList = data.leads??[];
_enquiresList = data.enquires??[];
Future<void> crmUniversalSearchFunction(context) async {
try {
var HomeProv = Provider.of<HomescreenNotifier>(context, listen: false);
final data = await ApiCalling.crmUniversalSearchAPI(
HomeProv.empId,
HomeProv.session,
searchController.text,
);
if (data != null) {
if (data.error == "0") {
_accountsList = data.accounts ?? [];
_leadsList = data.leads ?? [];
_enquiresList = data.enquires ?? [];
notifyListeners();
}
}
}catch (e,s){
}
} catch (e, s) {}
}
}
\ No newline at end of file
}
......@@ -12,7 +12,8 @@ class AppColors {
static Color cyan_blue = Color(0xFF219EBC);
static Color profile_card_gradient1 = Color(0xFFCFEEFF);
static Color profile_card_gradient2 = Color(0xFF97D9FF);
static Color scaffold_bg_color = Color(0xFFF0F4F5);
static Color profile_card = Color(0xFFDBF2FF);
static Color scaffold_bg_color = Color(0xFFF6F6F8);
static Color button_disabled = Color(0xFFBEE5FB);
static Color text_field_color = Color(0xFFF0F4F5);
static Color overlay_box_color = Color(0xFFE6F6FF);
......
......@@ -42,6 +42,43 @@ PreferredSizeWidget appbar(BuildContext context, title) {
);
}
PreferredSizeWidget appbarNew(BuildContext context, title,int color) {
return AppBar(
backgroundColor: Color(color),
automaticallyImplyLeading: false,
title: SizedBox(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
InkResponse(
onTap: () => Navigator.pop(context, true),
child: SvgPicture.asset("assets/svg/appbar_back_button.svg", height: 25),
),
SizedBox(width: 10,),
InkResponse(
onTap: () => Navigator.pop(context, true),
child: Text(
title,
style: TextStyle(
fontSize: 16,
height: 1.1,
fontFamily: "JakartaSemiBold",
color: AppColors.semi_black,
),
),
),
],
),
),
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.vertical(
// bottom: Radius.circular(30), // Adjust the radius as needed
// ),
// ),
);
}
PreferredSizeWidget appbar2(BuildContext context, title, reset, widget) {
return AppBar(
automaticallyImplyLeading: false,
......@@ -91,6 +128,56 @@ PreferredSizeWidget appbar2(BuildContext context, title, reset, widget) {
);
}
PreferredSizeWidget appbar2New(BuildContext context, title, reset, widget,int color) {
return AppBar(
backgroundColor: Color(color),
automaticallyImplyLeading: false,
elevation: 2.0,
title: SizedBox(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
InkResponse(
onTap: () {
reset();
Navigator.pop(context, true);
},
child: SvgPicture.asset("assets/svg/app_bar_back.svg", height: 25),
),
Expanded(
flex: 4,
child: InkResponse(
onTap: () {
reset();
Navigator.pop(context, true);
},
child: Text(
title,
overflow: TextOverflow.ellipsis,
maxLines: 1,
style: TextStyle(
fontSize: 16,
height: 1.1,
fontFamily: "JakartaSemiBold",
color: AppColors.semi_black,
),
),
),
),
Spacer(),
widget,
],
),
),
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.vertical(
// bottom: Radius.circular(30), // Adjust the radius as needed
// ),
// ),
);
}
Future<bool> onBackPressed(BuildContext context) async {
Navigator.pop(context, true);
return true;
......
This diff is collapsed.
......@@ -345,7 +345,7 @@ class _WebErpScreenState extends State<WebErpScreen> {
print(uri);
print(uri.scheme);
if (uri.toString().contains(
'file_viewer_n ame.php',
'file_viewer_name.php',
) &&
uri.toString().contains('.pdf')) {
final pdfPath =
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -571,6 +571,7 @@ class ApiCalling {
'gen_hash_id': (gen_hash_id).toString(),
'location': (location).toString(),
};
print("Tag Loation: ${data}");
var res;
if (attachment != null) {
res = await postImageNew(
......@@ -625,6 +626,31 @@ class ApiCalling {
}
}
static Future<TagGeneratorResponse?> TagGeneratorCheckAPI(
empId,
session,
gen_hash_id,
) async {
try {
Map<String, String> data = {
'emp_id': (empId).toString(),
'session_id': (session).toString(),
'gen_hash_id': (gen_hash_id).toString(),
};
final res = await post(data, genTrackerCheckTagGeneratorUrl, {});
if (res != null) {
// debugPrint(res.body);
return TagGeneratorResponse.fromJson(jsonDecode(res.body));
} else {
debugPrint("Null Response");
return null;
}
} catch (e) {
debugPrint('hello bev=bug $e ');
return null;
}
}
static Future<SubmitComplaintResponse?> SubmitGeneratorComplaintAPI(
empId,
session,
......
......@@ -25,6 +25,7 @@ const genTrackerGeneratorDetailsUrl = "${baseUrl}home/gen_tracker_generator_deta
const genTrackerGeneratorComplaintsUrl = "${baseUrl}home/gen_tracker_generator_complaints_list";
const genTrackerTagLocationUrl = "${baseUrl}home/gen_tracker_tag_location";
const genTrackerTagGeneratorUrl = "${baseUrl}home/gen_tracker_tag_generator";
const genTrackerCheckTagGeneratorUrl = "${baseUrl}home/gen_tracker_check_tag_generator";
const genTrackerRegisterComplaint = "${baseUrl}home/gen_tracker_register_complaint";
///complaint
......
......@@ -45,10 +45,10 @@ packages:
dependency: transitive
description:
name: async
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
url: "https://pub.dev"
source: hosted
version: "2.13.0"
version: "2.12.0"
auto_size_text:
dependency: "direct main"
description:
......@@ -273,6 +273,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.1"
dotted_line:
dependency: "direct main"
description:
name: dotted_line
sha256: "41e3d655939559815daa1370fc1e07673a205fa628cf40ce3af45d90029a77b6"
url: "https://pub.dev"
source: hosted
version: "3.2.3"
dropdown_button2:
dependency: "direct main"
description:
......@@ -301,10 +309,10 @@ packages:
dependency: transitive
description:
name: fake_async
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
url: "https://pub.dev"
source: hosted
version: "1.3.3"
version: "1.3.2"
ffi:
dependency: transitive
description:
......@@ -662,6 +670,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.0.0+4"
flutter_staggered_grid_view:
dependency: "direct main"
description:
name: flutter_staggered_grid_view
sha256: "19e7abb550c96fbfeb546b23f3ff356ee7c59a019a651f8f102a4ba9b7349395"
url: "https://pub.dev"
source: hosted
version: "0.7.0"
flutter_svg:
dependency: "direct main"
description:
......@@ -948,26 +964,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "8dcda04c3fc16c14f48a7bb586d4be1f0d1572731b6d81d51772ef47c02081e0"
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
url: "https://pub.dev"
source: hosted
version: "11.0.1"
version: "10.0.8"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
url: "https://pub.dev"
source: hosted
version: "3.0.10"
version: "3.0.9"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
url: "https://pub.dev"
source: hosted
version: "3.0.2"
version: "3.0.1"
lints:
dependency: transitive
description:
......@@ -1673,10 +1689,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
url: "https://pub.dev"
source: hosted
version: "15.0.0"
version: "14.3.1"
web:
dependency: transitive
description:
......
......@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.93+97
version: 1.0.94+98
environment:
sdk: ^3.7.2
......@@ -82,6 +82,8 @@ dependencies:
collection: ^1.19.1
auto_size_text: ^3.0.0
app_settings: ^6.1.1
flutter_staggered_grid_view: ^0.7.0
dotted_line: ^3.2.3
dev_dependencies:
flutter_test:
......@@ -113,6 +115,11 @@ flutter:
- assets/
- assets/images/
- assets/svg/
- assets/svg/home/
- assets/svg/finance/
- assets/svg/attendance/
- assets/svg/service/
- assets/svg/crm/
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/to/resolution-aware-images
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment