Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sai Srinivas
GEN_ERP_2025
Commits
b38d986d
Commit
b38d986d
authored
Jul 24, 2025
by
Sai Srinivas
Browse files
23-07-2025 By Sai Srinivas
CRM Lead Details, Generate Quotation & Followup and Prospect List.
parent
c0252747
Changes
26
Expand all
Show whitespace changes
Inline
Side-by-side
lib/screens/crm/pendingTasksList.dart
View file @
b38d986d
...
...
@@ -33,7 +33,7 @@ class _PendingTasksListState extends State<PendingTasksList> {
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
var
prov
=
Provider
.
of
<
Crmdashboardprovider
>(
context
,
listen:
false
);
prov
.
accessPagesAPIFunction
(
context
);
prov
.
crmDashboardAPIFunction
(
context
,
"executive"
,
""
,
""
,
""
);
prov
.
crmDashboardAPIFunction
(
context
);
prov
.
crmPendingTasksAPIFunction
(
context
);
});
}
...
...
lib/screens/notifierExports.dart
View file @
b38d986d
...
...
@@ -53,3 +53,4 @@ export 'package:generp/Notifiers/crmProvider/crmNearbyOpenLeadsProvider.dart';
export
'package:generp/Notifiers/crmProvider/crmGenerateQuotationProvider.dart'
;
export
'package:generp/Notifiers/crmProvider/crmEditProspectAccountProvider.dart'
;
export
'package:generp/Notifiers/crmProvider/addProspectLeadsProvider.dart'
;
export
'package:generp/Notifiers/crmProvider/followUpUpdateProvider.dart'
;
lib/screens/old/crmDashboardold.dart
View file @
b38d986d
...
...
@@ -35,7 +35,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
var
prov
=
Provider
.
of
<
Crmdashboardprovider
>(
context
,
listen:
false
);
prov
.
accessPagesAPIFunction
(
context
);
prov
.
crmDashboardAPIFunction
(
context
,
"executive"
,
""
,
""
,
""
);
prov
.
crmDashboardAPIFunction
(
context
);
prov
.
crmPendingTasksAPIFunction
(
context
);
});
}
...
...
lib/screens/old/genrateQuoteOld.dart
0 → 100644
View file @
b38d986d
This diff is collapsed.
Click to expand it.
lib/services/api_calling.dart
View file @
b38d986d
...
...
@@ -61,6 +61,7 @@ import '../Models/UpdatePasswordResponse.dart';
import
'../Models/VersionsResponse.dart'
;
import
'../Models/ViewVisitDetailsResponse.dart'
;
import
'../Models/commonModels/commonAddAccountsSubmitResponse.dart'
;
import
'../Models/crmModels/crmAddFollowUpResponse.dart'
;
import
'../Models/crmModels/crmDashboardResponse.dart'
;
import
'../Models/crmModels/crmPendingTasksResponse.dart'
;
import
'../Models/crmModels/crmUniversalSearchResponse.dart'
;
...
...
@@ -3319,24 +3320,18 @@ class ApiCalling {
static
Future
<
crmDashboardResponse
?>
crmDashboardAPI
(
empId
,
session
,
mode
,
from
,
to
,
teamemployee
,
emp_loc
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'mode'
:
(
mode
).
toString
(),
'from'
:
(
from
).
toString
(),
'to'
:
(
to
).
toString
(),
'teamemployee'
:
(
teamemployee
).
toString
(),
'emp_loc'
:
emp_loc
.
toString
()
};
final
res
=
await
post
(
data
,
crmDashboardUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
res
.
body
);
print
(
jsonDecode
(
res
.
body
)[
'nearby_leads'
]
);
return
crmDashboardResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
...
...
@@ -3412,7 +3407,7 @@ class ApiCalling {
final
res
=
await
post
(
data
,
crmLeadListViewUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
"ListView:
${res.body}
"
);
debugPrint
(
"ListView
2
:
${res.body}
"
);
return
LeadListViewResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
...
...
@@ -3634,6 +3629,92 @@ class ApiCalling {
}
}
static
Future
<
CommonResponse
?>
crmLeadDetailsAddEditProductsAPI
(
empId
,
session
,
lead_id
,
type
,
lead_product_id
,
product_id
,
qty
,
amount
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'emp_id'
:
(
empId
).
toString
(),
'session_id'
:
(
session
).
toString
(),
'lead_id'
:
(
lead_id
).
toString
(),
'type'
:
(
type
).
toString
(),
'lead_product_id'
:
(
lead_product_id
).
toString
(),
'product_id'
:
(
product_id
).
toString
(),
'qty'
:
(
qty
).
toString
(),
'amount'
:
(
amount
).
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadDetailsAddEditProductsUrl
,
{});
if
(
res
!=
null
)
{
print
(
"AddEditProducts
$data
"
);
debugPrint
(
"AddEditProducts:
${res.body}
"
);
return
CommonResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
crmAddFollowUpResponse
?>
crmLeadDetailsAddFollowUpAPI
(
session_id
,
emp_id
,
nextapp
,
orderstatus
,
lead_id
,
followup_feedback
,
followup_type
,
followupintime
,
loc
,
competitor
,
reason
,
followup_status
,
next_appointment_date
,
appointment_type
,
sms
,
app_note
,
)
async
{
try
{
Map
<
String
,
String
>
data
=
{
'session_id'
:
session_id
.
toString
(),
'emp_id'
:
emp_id
.
toString
(),
'nextapp'
:
nextapp
.
toString
(),
'orderstatus'
:
orderstatus
.
toString
(),
'lead_id'
:
lead_id
.
toString
(),
'followup_feedback'
:
followup_feedback
.
toString
(),
'followup_type'
:
followup_type
.
toString
(),
'followupintime'
:
followupintime
.
toString
(),
'loc'
:
loc
.
toString
(),
'competitor'
:
competitor
.
toString
(),
'reason'
:
reason
.
toString
(),
'followup_status'
:
followup_status
.
toString
(),
'next_appointment_date'
:
next_appointment_date
.
toString
(),
'appointment_type'
:
appointment_type
.
toString
(),
'sms'
:
sms
.
toString
(),
'app_note'
:
app_note
.
toString
(),
};
final
res
=
await
post
(
data
,
crmLeadDetailsAddFollowUpUrl
,
{});
if
(
res
!=
null
)
{
print
(
"crmAddFollowUp:
$data
"
);
debugPrint
(
"crmAddFollowUp:
${res.body}
"
);
return
crmAddFollowUpResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
return
null
;
}
}
catch
(
e
)
{
debugPrint
(
'hello bev=bug
$e
'
);
return
null
;
}
}
static
Future
<
crmLeadDetailsEditAccountViewResponse
?>
crmLeadDetailsEditAccountViewAPI
(
empId
,
session
,
lead_id
,
mode
)
async
{
try
{
...
...
@@ -3865,7 +3946,7 @@ class ApiCalling {
final
res
=
await
post
(
data
,
crmLeadDetailsGenerateQuotationViewUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
"ListView:
${res.body}
"
);
debugPrint
(
"ListView
1
:
${res.body}
"
);
return
crmLeadDetailsGenerateQuotationViewResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
);
...
...
@@ -3915,7 +3996,7 @@ class ApiCalling {
{},
);
if
(
res
!=
null
)
{
print
(
"Filter:
${data}
"
);
print
(
"Filter:
${data}
"
);
debugPrint
(
res
.
body
);
return
crmLeadDetailsGenerateQuotationSubmitResponse
.
fromJson
(
jsonDecode
(
res
.
body
),
...
...
@@ -3944,7 +4025,7 @@ class ApiCalling {
final
res
=
await
post
(
data
,
crmProspectListViewUrl
,
{});
if
(
res
!=
null
)
{
print
(
data
);
debugPrint
(
"ListView:
${res.body}
"
);
debugPrint
(
"ListView
3
:
${res.body}
"
);
return
ProspectListViewResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
debugPrint
(
"Null Response"
);
...
...
lib/services/api_names.dart
View file @
b38d986d
...
...
@@ -137,6 +137,8 @@ const crmLeadListDistrictOnStateUrl = "${baseUrl_test}get_district_on_state";
const
crmLeadListSubLocOnDistrictUrl
=
"
${baseUrl_test}
get_sublocation_on_district"
;
const
crmLeadListContactPopUpUrl
=
"
${baseUrl_test}
crm_lead_list_contact_popup"
;
const
crmLeadDetailsUrl
=
"
${baseUrl_test}
crm_lead_details"
;
const
crmLeadDetailsAddEditProductsUrl
=
"
${baseUrl_test}
crm_lead_details_add_edit_product"
;
const
crmLeadDetailsAddFollowUpUrl
=
"
${baseUrl_test}
crm_lead_details_add_followup"
;
const
crmLeadDetailsEditAccountViewUrl
=
"
${baseUrl_test}
crm_lead_details_edit_account_view"
;
const
crmLeadDetailsEditProductsUrl
=
"
${baseUrl_test}
crm_lead_details_edit_products"
;
const
crmLeadDetailsEditProductsViewUrl
=
"
${baseUrl_test}
crm_lead_details_edit_products_view"
;
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment