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

30-07-2025 By Sai Srinivas

CRM Module
parent 56ca3566
......@@ -149,15 +149,17 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
borderRadius: BorderRadius.circular(14),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Container(
alignment: Alignment.centerLeft,
padding: const EdgeInsets.fromLTRB(0.0, 0.0, 10, 0),
margin: const EdgeInsets.fromLTRB(10.0, 0.0, 10, 10),
child: Text(
"Search",
style: TextStyle(
height: 1,
color: AppColors.grey_thick,
fontSize: 14,
),
......@@ -232,22 +234,22 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
final colors = [
0xFFE7FFE5,
0xFFF3EDFF,
0xFFEEF1FF,
0xFFFFFCD5,
0xFFFFF6F0,
0xFFE7FFE5,
0xFFF3EDFF,
0xFFFFFCD5,
0xFFFFF6F0,
0xFFFFEFEF,
0xFFEDF7FF,
0xFFFFF1CE,
];
final textcolors = [
0xFF0D9C00,
0xFF493272,
0xFF6563FF,
0xFF605C00,
0xFF91481B,
0xFF0D9C00,
0xFF493272,
0xFF605C00,
0xFF91481B,
0xFFED3424,
0xFF586000,
0xFF326D72,
];
return InkResponse(
......@@ -261,11 +263,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
MaterialPageRoute(
builder:
(context) => Leadlistbymode(
pageTitleName:
provider
.allLeads[jndex]
.filter!
.pageName!,
pageTitleName: "${leadTitles[jndex]}",
mode:
provider
.allLeads[jndex]
......@@ -278,6 +276,17 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
);
}
}
if (leadTitles[jndex] == "Pending Tasks") {
await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => PendingTasksList(),
settings: RouteSettings(
name: "PendingTasksList",
),
),
);
}
},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 13),
......@@ -441,7 +450,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
// },
// ),
Container(
height: MediaQuery.of(context).size.height * 0.2,
height: MediaQuery.of(context).size.height * 0.22,
margin: EdgeInsets.symmetric(horizontal: 10),
child: Row(
children: [
......@@ -492,7 +501,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
),
),
Text(
"Leads",
"Details,\nFollowup",
// "Product and \nservice orders",
style: TextStyle(
color: AppColors.grey_semi,
......@@ -559,7 +568,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
),
),
Text(
"Accounts",
"Account Details,\nLead Details",
// "Assigned agents, \nperformance",
style: TextStyle(
color: AppColors.grey_semi,
......@@ -617,7 +626,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
children: [
Expanded(
child: Text(
"Appointment",
"Appointment\nCalendar",
style: TextStyle(
color: AppColors.app_blue,
fontSize: 14,
......@@ -628,7 +637,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
),
),
Text(
"Calendar",
"",
// "Records,\nLedger",
style: TextStyle(
color: AppColors.grey_semi,
......@@ -664,7 +673,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
child: Row(
children: [
Text(
"NearBy Leads",
"Nearby Leads",
style: TextStyle(
fontSize: 16,
color: AppColors.grey_semi,
......@@ -727,16 +736,14 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
final longitude = location.lng;
return InkResponse(
onTap: () async {
await Navigator.push(
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => NearbyOpenLeads(
latitude: latitude,
longitude: longitude,
),
settings: RouteSettings(
name: "NearbyOpenLeads",
(context) => LeadDetailsByMode(
mode: "",
pageTitleName: "Lead Details",
leadId: provider.nearByLeads[index].id,
),
),
);
......@@ -789,6 +796,22 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
),
SizedBox(width: 10),
Expanded(
child: InkResponse(
onTap: () async {
await Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => NearbyOpenLeads(
latitude: latitude,
longitude: longitude,
),
settings: RouteSettings(
name: "NearbyOpenLeads",
),
),
);
},
child: Container(
decoration: BoxDecoration(
border: Border.all(
......@@ -812,6 +835,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
),
),
),
),
],
),
),
......@@ -929,7 +953,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
Container(
width: double.infinity,
child: ListView.builder(
physics: AlwaysScrollableScrollPhysics(),
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
padding: EdgeInsets.symmetric(
vertical: 5,
......@@ -973,8 +997,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
...List.generate(3, (j) {
return Container(
Container(
padding: EdgeInsets.symmetric(
vertical: 3,
horizontal: 0,
......@@ -982,43 +1005,95 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
child: Column(
children: [
if (j == 2) ...[
Padding(
padding: const EdgeInsets.only(
top: 3.0,
bottom: 3.0,
Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
"${provider.pendingTasksLists[index].aname}",
maxLines: 1,
overflow: TextOverflow.visible,
style: TextStyle(
decoration:
TextDecoration.underline,
height: 1,
decorationStyle:
TextDecorationStyle.dotted,
decorationColor: Color(
0xFF676767,
),
color: AppColors.semi_black,
fontFamily: "JakartaRegular",
fontSize: 14,
),
),
),
Expanded(
child: Text(
"${provider.pendingTasksLists[index].appdate}",
textAlign: TextAlign.right,
maxLines: 1,
style: TextStyle(
color: AppColors.grey_semi,
fontFamily: "JakartaRegular",
fontSize: 14,
),
child: DottedLine(
dashGapLength: 4,
dashGapColor: Colors.white,
dashColor: AppColors.grey_semi,
dashLength: 4,
lineThickness: 0.5,
),
),
],
Row(
),
SizedBox(height: 10),
Container(
padding: EdgeInsets.symmetric(
vertical: 10,
horizontal: 10,
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
16,
),
gradient: LinearGradient(
colors: [
Color(0xFFFFFFFF),
Color(0xFFE8F7FF),
],
),
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
"${subHeadings[j]}",
"Remarks",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color:
j == 0
? AppColors.semi_black
: AppColors.grey_semi,
color: AppColors.app_blue,
fontFamily: "JakartaRegular",
fontSize: 14,
),
),
),
Expanded(
child: Text(
"${provider.pendingTasksLists[index].anote}",
textAlign: TextAlign.right,
maxLines: 1,
style: TextStyle(
color: AppColors.semi_black,
fontFamily: "JakartaRegular",
fontSize: 14,
),
),
),
],
),
),
],
),
);
}),
),
],
),
),
......@@ -1043,9 +1118,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
context,
MaterialPageRoute(
builder: (context) => Addleadsprospectsscreen(),
settings: RouteSettings(
name: 'Addleadsprospectsscreen'
)
settings: RouteSettings(name: 'Addleadsprospectsscreen'),
),
);
// }
......
......@@ -518,7 +518,7 @@ class _EditProductsListState extends State<EditProductsList> {
.map((ord) => DropdownMenuItem<Products>(
value: ord,
child: Text(
"(Product Name: ${ord.name})",
"${ord.name}",
style: const TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
......
This diff is collapsed.
......@@ -61,8 +61,11 @@ class _GeneratequotationaddeditproductState
if (widget.type == "add") {
// Initialize controllers and dropdowns after API call
provider.addEditInitializeForm(context);
} else {
provider.preFillFormForEdit(widget.product);
} else if (widget.type == "edit"){
print(widget.index);
print(widget.product);
provider.preFillFormForEdit(widget.product,widget.index);
}
});
}
......@@ -149,7 +152,7 @@ class _GeneratequotationaddeditproductState
) => DropdownMenuItem<Products>(
value: ord,
child: Text(
"(Product Name: ${ord.name})",
"${ord.name}",
style: const TextStyle(
fontSize: 14,
),
......@@ -185,6 +188,7 @@ class _GeneratequotationaddeditproductState
value!.id!;
provider.selectedAddEditProductName =
value.name;
print(value.id.toString());
provider.crmSelectedProductDetailsApiFunction(context, value.id.toString());
}
},
......@@ -256,12 +260,13 @@ class _GeneratequotationaddeditproductState
FloatingActionButtonLocation.centerFloat,
floatingActionButton: InkWell(
onTap: () {
if (provider.selectedLeadProducts != null) {
if (provider.selectedProducts != null) {
var newProduct;
if (widget.type == "add") {
newProduct = LeadProducts(
id: provider.selectedAddEditLeadProductId,
productName: provider.selectedAddEditLeadProductName,
productId: provider.selectedAddEditProductId,
productName: provider.selectedAddEditProductName,
price: provider.addEditProductPriceController.text,
qty: provider.addEditQuantityController.text,
......@@ -269,16 +274,16 @@ class _GeneratequotationaddeditproductState
);
provider.leadProductsList.add(newProduct);
provider.productRows.add({
"product_id": provider.selectedAddEditLeadProductId!,
"product_id": provider.selectedAddEditProductId!,
"price": provider.addEditProductPriceController.text,
"qty": provider.addEditQuantityController.text,
"net_price": provider.addEditTotalAmountController.text,
});
Navigator.pop(context, newProduct);
} else {
} else if (widget.type == "edit"){
final updatedProduct = LeadProducts(
id: provider.selectedAddEditLeadProductId,
productName: provider.selectedAddEditLeadProductName,
productId: provider.selectedAddEditProductId,
productName: provider.selectedAddEditProductName,
price: provider.addEditProductPriceController.text,
qty: provider.addEditQuantityController.text,
prodTotalPrice: provider.addEditTotalAmountController.text,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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